Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: The graph of (x + 2)^(1/5) + 4 not plotted

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104005] Re: The graph of (x + 2)^(1/5) + 4 not plotted
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 15 Oct 2009 07:17:25 -0400 (EDT)
  • References: <868306d90910120643u7f1c2299v2cd1845508dc85b7@mail.gmail.com> <33526517.1255521930532.JavaMail.root@n11>

We could plot the function this way. First generate the polynomial equation
in x and y and Solve:

(x + 2)^(1/5) + 4 == y
# - 4 & /@ %
#^5 & /@ %
sols = Solve[%, y]

This gives a set of 5 Root objects. If we investigate these, by making a
Table say, over various x domains it appears that the first root is always
the real root.

We could then plot with:

Plot[First[y /. sols] // Evaluate, {x, -20, 20},
 Frame -> True,
 PlotRange -> {{-20, 20}, {0, 6}},
 Axes -> None,
 FrameLabel -> {"x", "y"},
 PlotLabel -> Row[{"Real solution of ", 2 + x == (-4 + y)^5}],
 BaseStyle -> {FontSize -> 12},
 ImageSize -> 400]

The main point in the plot is that with Mathematica one controls the overall
look of the plot by using options. It is worthwhile learning how to use
these because Mathematica will seldom automatically make the best looking
plot. With the Plot statement Mathematica always makes an Axis plot but if
you look in technical journals such as Science you will almost always see a
Frame plot instead. The trouble with Axes plots is that the Axes often stomp
all over your curves or data.


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  




From: victor chg [mailto:kindlychung at gmail.com] 


This works, only the axes are not at normal positions, looks a bit strange:
http://i38.tinypic.com/20f6ftg.png


On Wed, Oct 14, 2009 at 11:22 AM, Mike Bryniarski
<melondisco at gmail.com>wrote:

> The link you posted does not seem to relate to your problem. you
> wanted to show :
>
> Plot[ (x + 2)^(1/5) + 4 , {x, -4, 4}]
>
> I tried plotting the function in your subject and not surprisingly it
> did not plot correctly.
> the issue is taking the fifth root of x on Mathematica can result in a
> complex number. (This can bee seen under possible issues on the Power
> page in the documentation)
> Example:
>
> in: (x + 2)^(1/5) + 4 /. x -> -3
>
> out: 4 + (-1)^(1/5)
>
> The most obvious way (at least for me) to overcome this is to perform
> some algebra on the function to eliminate the fractional power and
> plot it in ContourPlot instead:
>
> ContourPlot[(y - 4)^5 == x + 2, {x, -4, 4}, {y, 0, 6}]
>
> This is the result I assume you were looking for.
>
> On Oct 13, 7:22 am, victor chg <kindlych... at gmail.com> wrote:
> > Here is the link to the image:http://tinypic.com/view.php?pic=veae6u&s=
> =4 <http://tinypic.com/view.php?pic=veae6u&s=%0A=4>
> >
> > Victor Chg
> > --------------------------------------
> > Neuroscience Research Institute, Peking University, Beijing, P.R.China
> > 100038
>
>
>


-- 
--------------------------------------
Neuroscience Research Institute, Peking University, Beijing, P.R.China
100038





  • Prev by Date: Re: Mathematica 7.01 and Mac OS 10.6 (Snow Leopard)
  • Next by Date: Re: Mathematica 7.01 and Mac OS 10.6
  • Previous by thread: Re: Re: The graph of (x + 2)^(1/5) + 4 not plotted
  • Next by thread: Grassmann algebra package