Message Boards Message Boards

0
|
9255 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Problem with Plot function

Posted 10 years ago

I'm using Mathematica 8.0.4 on Mac OS X and am having a funny problem with Plot that seems pretty basic and was wondering if people might try this on newer versions of Mathematica or know why it doesn't work:

Plot[1/(x^2-1)^(4/5),{x,-2.2}]

it does not show anything between x=(-1 to +1). If you write the exponential using the n'th root style (completely equivalent mathematically) it works fine and shows the center portion of the curve fine. There are no imaginary vs real issues since the function is always real and defined everywhere except at x equal +1 and -1, but yet the entire central portion is completely missing.

I just tried this same function on Wolfram Alpha site and it too does not properly graph the center part of the function either so would guess that current versions of Mathematica also have this problem.

Any idea why in the world would something so completely basic as this gives Plot fits?

Thanks ...

ps - I'm attaching a couple of images showing the non-working and working versions

pps - the problem still shows if I leave off the PlotRange option

Example of Plot bug

POSTED BY: Bob Freeman
4 Replies

This is presumably due to the fact that the Power function (which is what is being used in the form of the expression in the second example) is defined with a particular convention for a branch cut. From the documentation for Power:

Power[x,y] has a branch cut discontinuity for non-integer y running from -[Infinity] to 0 in the complex x plane.

FullForm[1/((x^2 - 1)^4)^(1/5)]

gives

Power[Power[Plus[-1,Power[x,2]],4],Rational[-1,5]]

whereas

FullForm[1/(x^2 - 1)^(4/5)]

gives

Power[Plus[-1, Power[x, 2]], Rational[-4, 5]]
POSTED BY: David Reiss
Posted 10 years ago

Thanks for this info about the brach cut discontinuity.

But I'm not exactly sure how this fits what the results of the two plots show. since Power[] is being used the same in both cases (the only difference is Power[] is nested once more in the first case than the second) it would seem both would have the "gap" (missing portion from -1 to 1).

But, how can this branch cut discontinuity account for the missing portion of the plot from -1 to 1, but yet it is happy from minus infinity to -1.

In other words how does this account for both the absence of the entire center portion (from -1 to 1) in the second Plot but the presence of the left portion (from minus infinity to -1) in the first Plot?

Also the portion of the plot from (0,1) is missing as well on the second and also the second shows the portion of the plot from minus infinity to -1.

It would seem that if one is missing then they they both should be. And what about the fact that part of the center portion is from (0, 1) which is not part of the discontinuity region?

Plus none of these even involve any complex values (since the root is computed after the exponential so none of the intermediate values will ever be negative when the root is computed, since they are raised to an even power beforehand).

Do you see my dilemma with this issue?

Thanks again...

POSTED BY: Bob Freeman

I think that the issue is that the two expressions are fundamentally different in terms of how they are evaluated. Though they may, in some sense have the same amount of nesting (but actually they don't), that is not the issue with regard to when the branch cut comes into play.

Remember that Mathematica evaluates its expressions (in most cases) from the inside out. So in the case of

1/((x^2 - 1)^4)^(1/5)

a value of x between -1 and 1 is first raised to the 4th power before it (now a positive number) is then raised to the 1/5 power. Thus the branch cut is not encountered. But in the same range

1/(x^2 - 1)^(4/5)

a negative number is directly being raised to the 4/5 power.

POSTED BY: David Reiss

I teach my students that raising a negative number to a noninteger power is very dangerous, because all algebraic rules stop working. For example,

x^(n/m)==(x^n)^(1/m)==(x^(1/m))^n

is true if x>0, but it is trouble if x<0. I think Mathematica does the right thing in this instance. Try

N[(-2)^(4/5)]
N[((-2)^4)^(1/5)]
N[((-2)^(1/5))^4]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract