Re: FindRoot
- To: mathgroup at smc.vnet.net
 - Subject: [mg8928] Re: [mg8887] FindRoot
 - From: David Withoff <withoff>
 - Date: Sat, 4 Oct 1997 22:08:06 -0400
 - Sender: owner-wri-mathgroup at wolfram.com
 
> 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?
>
>
> Thanks a lot!
>
> David Djajaputra
Here are a couple of possible ways to do this:
In[1]:= f[a_] := Module[{x}, x /. FindRoot[Sin[x] == x/a, {x, 2}]]
In[2]:= Plot[f[a], {a, 2, 3}]
Out[2]= -Graphics-
In[3]:= << Graphics`ImplicitPlot`
In[4]:= ImplicitPlot[Sin[x] == x/a, {a, 2, 3}, {x, 1.5, 2.5}]
Out[4]= -ContourGraphics-
This equation has three solutions in this range.  I chose the parameters
in these inputs to pick out one of those solutions.
Dave Withoff
Wolfram Research