MathGroup Archive 1997

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

Search the Archive

Re: Solve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8470] Re: [mg8458] Solve
  • From: "w.meeussen" <meeussen.vdmcc at vandemoortele.be>
  • Date: Tue, 2 Sep 1997 16:15:06 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

hi Saeed,
you hit on a Mma 3.0 bug.


two things:
** first **
remark that i only occurs as sin(i), so define y=sin(i). Then:
In[28]:=
y1= (1+q)*(0.38+0.2*Log[q])/2.844
Out[28]=
0.351617 (1 + q) (0.38 + 0.2 Log[q])

In[48]:=
{c,d}=y/.Solve[q== ((2844/1000) y/Sqrt[1-y^2])-1,y]
Out[48]=
                                 2
       62500 + 125000 q + 62500 q
{-Sqrt[----------------------------], 
                                  2
       568021 + 125000 q + 62500 q
 
                                 2
       62500 + 125000 q + 62500 q
  Sqrt[----------------------------]}
                                  2
       568021 + 125000 q + 62500 q

this solves your problem;
plot it with:

In[38]:=
Plot[{y1,c,d},{q,0,7}]

it shows a intersection around y=0.84 and q=2.94.

*** second ***

you hit on an error by accident:

In[47]:=

{a,b}=y/.Solve[q== (2.844 y/Sqrt[1-y^2])-1,y]
Out[47]=
{-1. Sqrt[62500.00000000000000000000000000 + 
 
     125000.00000000000000000000000000 q + 
 
                                       2
     62500.00000000000000000000000000 q ], 
 
  Sqrt[62500.00000000000000000000000000 + 
 
    125000.00000000000000000000000000 q + 
 
                                      2
    62500.00000000000000000000000000 q ]}

somehow produces garbage !
Compare "2." (floating point) and "2" as integer :
with rhe floating point input, the denominator "evaporates" !!
REEKS OF BUG !!

In[52]:=

{a,b}=y/.Solve[q== (2. y/Sqrt[1-y^2])-1,y]
Out[52]=
{-1. Sqrt[1.0000000000000000000000000000000 + 
 
                                            2
     2.0000000000000000000000000000000 q + q ], 
 
  Sqrt[1.0000000000000000000000000000000 + 
 
                                           2
    2.0000000000000000000000000000000 q + q ]}
In[53]:=

{a,b}=y/.Solve[q== (2 y/Sqrt[1-y^2])-1,y]
Out[53]=
                  2                   2
       1 + 2 q + q         1 + 2 q + q
{-Sqrt[------------], Sqrt[------------]}
                  2                   2
       5 + 2 q + q         5 + 2 q + q

At 00:43 30-08-97 -0400, Saeed Esmaily Rashid wrote:
>Hello!
>
>I'm a physics student, using Mma 3.0.0. My problem is to plot two functions
>simultaneously finding their intersection. The functions are
>
>sin(i) < (1+q)*(0.38+0.2*log(q))/2.844
>
>and
>
>q > (2.844*sin(i)/sqrt(1-sin(i)^2))-1.
>
>The graph must be such that one axis is sin(i) the other is q. I tried using
>the Plot function in Mma but i didn't get the desired solution. Any attampt
>to solve these equations using Solve[], fails leaving me with no answer.
>I'll be grateful of any help.
>
>Thanks
>
>
>
>
>

Dr. Wouter L. J. MEEUSSEN
eu000949 at pophost.eunet.be
w.meeussen.vdmcc at vandemoortele.be



  • Prev by Date: How to draw two curves
  • Next by Date: RGBColor vs Hue in Background->
  • Previous by thread: How to draw two curves
  • Next by thread: RGBColor vs Hue in Background->