Re: Plot results not right

• To: mathgroup at smc.vnet.net
• Subject: [mg89925] Re: Plot results not right
• From: Peter Breitfeld <phbrf at t-online.de>
• Date: Tue, 24 Jun 2008 03:32:13 -0400 (EDT)
• References: <g3nhbc\$g6\$1@smc.vnet.net>

```BrenB schrieb:
> I'm new to Mathematica.
>
> I'm studying Calculus, and I'm trying to reproduce, in Mathematica,
> the graph results of an equation in my book.
>
> Plot[2 x - 3 x^(2/3) + 4, {x, -1, 6}]
>
> The output graph is correct, except there should be graphing in the
> 2nd and 3rd quadrant, and there is none.
>
> Is there another way to enter this equation into Mathematica to get
> the correct graph results?
>
> Thanks
>

Mathematicas Power uses the principal branch for rational Powers. So
e.g. (-1)^(2/3)==-1/2+I Sqrt[3]/2. This is complex and will not be
plotted.

You may write your own function as a replacement for Power to take a
real branch if possible:

-------------------
Attributes[ReellePotenz]={Listable, NumericFunction, OneIdentity};
ReellePotenz[b_?Negative, Rational[m_,n_?OddQ]] := (-(-b)^(1/n))^m;
ReellePotenz[x__]:=Power[x]
-------------------

Then

Plot[2 x - 3 ReellePotenz[x, 2/3] + 4, {x, -1, 6}]

will give you the plot you expected.

Gruss Peter
--
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

```

• Prev by Date: Re: Plot results not right
• Next by Date: Re: simple Sin
• Previous by thread: Re: Plot results not right
• Next by thread: Re: Plot results not right