Solve and Reduce

• To: mathgroup at smc.vnet.net
• Subject: [mg52128] Solve and Reduce
• From: "Carol Ting" <tingyife at msu.edu>
• Date: Thu, 11 Nov 2004 04:53:03 -0500 (EST)
• References: <200411100834.DAA10359@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hello list,

I want to find q as a function of c, q(c), given the following
equation:

2500*c^2 - 25*c^3 + 3500*c*q - 320*c^2*q - 1104*c*q^2 - 1152*q^3 == 0

However, each of the following three methods gives different results.
I check the Mathematica Book but still cannot figure out why there are
such differences.  Could someone please explain this to me?  Thanks a
lot!

(1) Use "Reduce"

In[5]:=
q1[c_] = Reduce[{2500*c^2 - 25*c^3 +3500*c*q - 320*c^2*q -1104*c*q^2
-1152*q^3 == 0, c > 0,q > 0}, q]

Out[5]=
0<c<=(5*(-109199 + 1497*Sqrt[5489]))/2744] &&q == Root[-2500*c^2 +
25*c^3 - 3500*c*#1 + 320*c^2*#1 + 1104*c*#1^2 + 1152*#1^3 & ,3] ||
(5*(-109199 + 1497*Sqrt[5489]))/2744 < c < 100 && q ==Root[-2500*c^2 +
25*c^3 -3500*c*#1 + 320*c^2*#1 + 1104*c*#1^2 + 1152*#1^3 & , 1]

In[6]:=
Plot[Root[-2500*c^2 + 25*c^3 - 3500*c*#1 + 320*c^2*#1 + 1104*c*#1^2 +
1152*#1^3 & ,1], {c, 0, 100}]
Plot[Root[-2500*c^2 + 25*c^3 - 3500*c*#1 + 320*c^2*#1 + 1104*c*#1^2 +
1152*#1^3 & ,3], {c, 0, 100}]

Out[6]=
Graphics[]

Out[7]=
Graphics[]

(2) Use "Solve" and Immediate assignment

In[32]:=
qdroot1[c_] = q /. Solve[2500*c^2 - 25*c^3 + 3500*c*q - 320*c^2*q -
1104*c*q^2 - 1152*q^3 == 0,q][[1]]
qdroot3[c_] = q /. Solve[2500*c^2 - 25*c^3 + 3500*c*q - 320*c^2*q -
1104*c*q^2 - 1152*q^3 == 0,q][[3]]

In[34]:=
Plot[qiroot1[c], {c, 0, 100}]

Out[34]=
Graphics[]

In[35]:=
Plot[qiroot3[c], {c, 0, 100}]

Out[35]=
Graphics[]

(3) Use "Solve" and delayed assignment

In[28]:=
qdroot1[c_] := q /. Solve[2500*c^2 - 25*c^3 + 3500*c*q - 320*c^2*q -
1104*c*q^2 - 1152*q^3 == 0,q][[1]]
qdroot3[c_] := q /. Solve[2500*c^2 - 25*c^3 + 3500*c*q - 320*c^2*q -
1104*c*q^2 - 1152*q^3 == 0,q][[3]]

In[30]:=
Plot[qdroot1[c], {c, 0, 100}]

Out[30]=
Graphics[]

In[31]:=
Plot[qdroot3[c], {c, 0, 100}]

Out[31]=
Graphics[]

Carol

```

• Prev by Date: Re: NonlinearFit problem
• Next by Date: Re: nonlinear programming with differential-algebraic constraints (2)
• Previous by thread: Re: equal distribution of last digits base ten in the primes by b-normality
• Next by thread: Re: Solve and Reduce