Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Solve and Reduce

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52137] Re: Solve and Reduce
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 12 Nov 2004 02:13:50 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <200411100834.DAA10359@smc.vnet.net> <cmveqh$skr$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

the numbering in Root[], and the position in the result of Solve[]
is different when Solve[] can comput a numerical value (delayed
assigmment) or has only a symbolic value for c. The results are clearly
the same but the "first root" in one of the solutions is
not the first root in an other solution.

Regards
  Jens

"Carol Ting" <tingyife at msu.edu> schrieb im Newsbeitrag 
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: Solve and Reduce
  • Next by Date: Re: newbie question DSolve
  • Previous by thread: Re: Solve and Reduce
  • Next by thread: Re: Solve and Reduce