In article <624ijs$m2j at smc.vnet.net>, darrmis at aol.com (Darrmis) wrote:
> I'm having a problem using findroot to solve an equation. Perhaps
> someone
> could shed some light on what's wrong.
>
> FindRoot[Sqrt[x/(1.2 10^ -4)]==-0.1*Tan[Sqrt[x/(1.2*10^
> -4)]],{x,0.1,0.1,2}]
>
> Mathematica 3. returns a value of -0.07 for x which is not anywhere
> close to correct.
> Further, I've tried several different starting values and min/max
> limits, but
> a negative answer is always returned. Eventually I'de like to compile
> a list
> of all the roots of the equation up to, say, x=1000, but I can't even
> get one
> right now.
>
> Thanks,
>
> Karl Kevala
For a general (say continous function) it is harder to find a zero than
you might think. Because of this, you cannot expect a program or a
human or whatever to find all or just one zero of any function you cook
up.
In your case, combined insight in the problem and in Mathematica´s
abilities to solve equations numerically are quite helpfull. (It might
also be helpfull to plot the equation to see where the zeroes of your
function are hidden.)
First, replacing
x/(1.2 10^ -4) by y
reduces the problem slightly and
non-essentially to finding zeroes of
y==0.1*Tan[y],
say up to y=10^6. This is still too hard to be put before Mathematica,
but from elementary calculus you know that this function has simple
poles at
Pi/2 + k Pi
so that
FindRoot[y==0.1*Tan[y], {y,Pi/2-0.001}] would be my try to get
Mathematica to solve this problem, using Newton´s method which is very
appropriate for that problem.
Using this it shouldn´t be hard to find all zeroes of your function in
any range. Proving that you did in fact find all requires then some
more mathmatical skills which you also can learn in any good
undergraduate math text but not in the Mathematica handbook. If you are
really interested in locating zeroes of (say) meromorphic functions
(like yours), you should can consult text books on complex variables
where more sophisticated techniques are available.
Matthias Weber