Re: FindRoot with complex roots
- To: mathgroup at smc.vnet.net
- Subject: [mg9727] Re: FindRoot with complex roots
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Tue, 25 Nov 1997 00:06:24 -0500
- Organization: University of Western Australia
- Sender: owner-wri-mathgroup at wolfram.com
Paul Hines wrote:
> I've been having trouble with the FindRoot function when the root(s) is
> complex. One such function is:
>
> r*Cos[x]+zs*Sin[x]-zwCos[x]Sin[x]/Sqrt[n^2-Sin^2[x]]=0
There are 3 problems with the syntax of this expression:
[1] No multiplication sign (or space) between zw and Cos[x]
[2] = instead of ==
[3] Sin^2[x] instead of Sin[x]^2
> where r,zs,zw are real and zs<0, and n complex. Typical values are
> r=100,zs=-10, and zw=20, n=1.0067+0.01I.
For these values I get
In[1]:= r*Cos[x] + zs*Sin[x] - (zw*Cos[x]*Sin[x])/Sqrt[n^2 - Sin[x]^2]
== 0 /.
{r -> 100, zs -> -10, zw -> 20, n -> 1.0067 + 0.01 I}
Out[1]=
20 Sin[x] Cos[x]
-(------------------------------------) + 100 Cos[x] - 10 Sin[x] == 0
2
Sqrt[1.01334 + 0.020134 I - Sin[x] ]
and then FindRoot works fine
In[2]:= FindRoot[-((20*Sin[x]*Cos[x])/ Sqrt[1.01334489 + 0.020134*I -
Sin[x]^2]) + 100*Cos[x] - 10*Sin[x] == 0, {x, 0.1}]
Out[2]= {x -> 1.29469 + 0.0215355 I}
Cheers,
Paul
____________________________________________________________________
Paul Abbott Phone: +61-8-9380-2734
Department of Physics Fax: +61-8-9380-1014
The University of Western Australia Nedlands WA 6907
mailto:paul at physics.uwa.edu.au AUSTRALIA
http://www.pd.uwa.edu.au/~paul
God IS a weakly left-handed dice player
____________________________________________________________________