Re: Solve and Reduce

• To: mathgroup at smc.vnet.net
• Subject: [mg52146] Re: Solve and Reduce
• From: p-valko at tamu.edu (Peter Valko)
• Date: Fri, 12 Nov 2004 02:14:01 -0500 (EST)
• References: <200411100834.DAA10359@smc.vnet.net> <cmveqh\$skr\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```If you do not need a "formula", just a Mathematica function, here it is:

equ[c_] := 2500*c^2 - 25*c^3 + 3500*c*q -
320*c^2*q - 1104*c*q^2 - 1152*q^3 == 0 ;

qfun[c_] := q /.(FindInstance[equ[c] && q > 0, q] // Flatten);

Plot[qfun[c], {c, 0.1, 2}]

"Carol Ting" <tingyife at msu.edu> wrote in message news:<cmveqh\$skr\$1 at smc.vnet.net>...
> 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: equal distribution of last digits base ten in the primes by b-normality
• Next by Date: Re: Solve and Reduce
• Previous by thread: Re: Solve and Reduce
• Next by thread: Re: Solve and Reduce