Message Boards Message Boards

0
|
9999 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
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