MathGroup Archive 2007

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

Search the Archive

FindRoot[] with mixed complex and real variables?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79563] FindRoot[] with mixed complex and real variables?
  • From: AES <siegman at stanford.edu>
  • Date: Sun, 29 Jul 2007 00:15:09 -0400 (EDT)
  • Organization: Stanford University

I'd like to find the roots of two complex equations, specifically a 
fiber dispersion equation

u * BesselJ[1,u] BesselK[0,w] == w BesselK[1,w] BesselJ[0,u]

and a fiber propagation equation

   u^2 + w^2 == g

which involve three complex variables  u, w, g, but with the two 
constraints that

   Re[g] == DN    (an input constant)

and

   Re[w] ==  0     (a constraint on the desired solution)

so that there are two complex-valued equations and four real variables 
to be solved for.

I've tried writing these equations in the complex form given above with  
Re[g] == DN  and  Re[w] == 0  added to the eqns part of FindRoot[]; and 
using  {{u,u0}, {w,w0}, {g,g0}}  as the vars.

I've tried writing u, w, g in the form  u = ur + I ui,  w =  0 + I wi,  
and  g= DN + I gi  everywhere in the eqns; splitting the second equation 
into its real and imaginary parts; and using {ur,ur0}, {ui,ui0}, 
{wi,wi0}, {gi,gi0}  as the vars part of FindRoot[].

Neither of these seems to work -- "Number of variables doesn't match 
number of equations".

Is there a straightforward way to do this? (beyond a more complicated 
workaround I'm now using).

If anyone wants to try this, a reasonable set of initial values for the 
FindRoot[] process, i.e., a set that is close to but not exactly at the 
desired solution, for a particular choice of the input variable of  DN = 
-200  would be

   g0 = DN + 0.8 I = -200 + 0.8 I
   u0 = 2.39 + 0.17 I
   w0 = 0 + 14.34 I


  • Prev by Date: Re: Re: spurious $Aborted messages. How to track down cause?
  • Next by Date: RE: Re: Cyclic permutations
  • Previous by thread: Re: Module inside Module. Conflict between inner Module local variable with outer module parameter
  • Next by thread: Serious Bug in 6.0 Help Browser