RE: FindRoot
- To: mathgroup at smc.vnet.net
 - Subject: [mg8908] RE: [mg8887] FindRoot
 - From: Ersek_Ted%PAX1A at mr.nawcad.navy.mil
 - Date: Thu, 2 Oct 1997 22:57:00 -0400
 - Sender: owner-wri-mathgroup at wolfram.com
 
David Djajaputra wrote:
|
| I need to plot the root of a transcendental equation
|
| sin(x)=x/a,     for a from 2 to 3.
|
|  I can find the root for each a using FindRoot. But how do I make a
|  continuous plot using FindRoot?
|
|
This will work.
In[1]:=  solution[a_]:=  x/.Part[FindRoot[Sin[x]==x/a, {x, 1, 5}] , 1]
In[2]:=  solution[2.2]
Out[2]=  2.00024
In[3]:=  Plot[solution[a],{a,2,3}]
Out[3]=  - Graphics -
                (*  Graphics not shown.  *)
     Ted Ersek
     ersek_ted%pax1a at mr.nawcad.navy.mil
FindRoot is one of my favorite features.