PRODUCT: TI-81 AND TI-85 SUBJ: Graphing x^y This note is posted to clarify the handling of x^y, especially where y is a rational fraction, in response to a recent question by Robert Garfunkel of Montclair State College. His question was why the graphs of x^(2/3) and (x^(1/3))^2 were not the same for x<0. Similar questions have been asked from time to time and the answer may be of general interest. To begin, let's establish some basic facts to make the discussion clear: (If you follow along with your calculator, remember that the TI-81 and TI-85 negation key is lower precedence than ^, so don't leave off the parenthesis in (-3)^.5, for instance.) If we have x^(1/q) where x is a real number and q is a positive integer, there will be q answers (roots). These multiple values are called branches and the "principal branch" has magnitude (abs(x))^(1/q) and an angle that is (angle of x)/q. (You can get the angle of a complex number on the TI-85 with the angle function. For the function to work right, remember to enter the number as a complex data type, ie (-3,0). For positive real numbers the angle is zero, and for negative real numbers the angle is PI.) As a consequence, when x is positive, the principal branch is always a real number. (Zero divided by q is zero.) When x is negative, the principal branch is always complex for q>1. (PI divided by a q>1 is never zero or PI.) However, for x<0 and q an odd integer, one of the branches is always real. (The branches for q=3 have angles PI/3, 3*PI/3 and 5*PI/3. The first branch is principal, the second branch is real. The branches for q=4 are PI/4, 3*PI/4, 5*PI/4, 7*PI/4. When q is even, there is not a real branch.) If we have x^(p/q) where x is a real number and p and q are positive integers, and compute the result as (x^(1/q))^p, the result is real if x^(1/q) is real. So, in general, x^y (for real x and y) has a real answer only for x>=0 or when y can be expressed as a rational number p/q, with q odd. However, as mentioned above, the principal branch of x^y is not real for x<0 and y<1. Now to digress for a bit of history. The universal power function is calculated as: x^y = exp(y ln x). The early scientific calculators with a universal power or root function give an error for x^y if x<0 (even (-2)^2, for example). This is because ln(-2) is complex and the early calculators did not have the memory space to compute complex intermediate results or make special tests to reformulate the problem. However, for our more modern scientific calculators, it is our standard practice to make appropriate tests to return 4 for (-2)^2 and, since a root key is featured, to return answers when a real root exists (for instance: cube root of (-8) or (-8)^(1/3) returns -2). It is this feature that seems to cause some confusion when implemented on our graphing calculators. The TI-81 and TI-85 (as well as the TI-68) return the principal branch of x^y except when y can be expressed as a rational fraction (1/q) and q is odd. For this exception, the real branch is returned. The capability to return real results for integer roots of negative numbers can lead to some confusion, but we have found it to have practical utility. Specifically to the question that was raised by Mr. Garfunkel, the principal branch of x^(1/3) and x^(2/3) are not real for x<0, but the TI-81 and TI-85 plot the real branch for x^(1/3) due to the "odd root" feature. So (x^(1/3))^2 plots as a real branch, because an integer power of a real number is always real. The formulation (x^(1/q))^p or (x^p)^(1/q) plots the real branch of x^(p/q) if a real branch exists. In the case of derivatives, if the numeric derivative function is used (NDeriv on TI-81, nDer on TI-85), you get a graph of the derivative over the same range that the function plots. However, the der1 and der2 functions on the TI-85 are exact derivatives and are computed in a manner equivalent to forming the symbolic derivative. So, der1(x^(1/3),x) only plots for x>0 because the derivative is 1/(3x^(2/3)), but der1(x^(2/3),x) plots for all x (except x=0) even though x^(2/3) doesn't plot for x<0, because the derivative is 2/(3x^(1/3)). We hope this discussion helps you. We welcome your comments for future products. Therefore, if you have an opinion or preference concerning other possible ways to handle this function please let us know through GRAPH-TI or by email to the address below. 1. Always return the principal branch for x^y. 2. Always return the real branch for x^y (the calculator would determine if y is equivalent to some (p/q) with q odd and return (x^(1/q))^p). 3. Provide a mode selection to allow the user to select either real or principal branches for multivalued functions. --------------------------------------------------------------------------- TI GRAPHIC PRODUCTS TEAM Texas Instruments (Consumer Products) P.O. Box 650311 M/S 3908 Internet: ti-cares@lobby.ti.com Dallas, Texas 75265 Fax: 214-917-7103 ---------------------------------------------------------------------------