MathGroup Archive 2007

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

Search the Archive

Re: FindRoot can NOT handle mixed real and complex variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79980] Re: FindRoot can NOT handle mixed real and complex variables
  • From: "David W.Cantrell" <DWCantrell at sigmaxi.net>
  • Date: Fri, 10 Aug 2007 01:43:25 -0400 (EDT)
  • References: <f9c0ti$6bk$1@smc.vnet.net>

AES <siegman at stanford.edu> wrote:
> I'm (re)posting this as an assertion, not a question, hoping to rouse a
> little more interest, since it appears to be a significant weakness in
> FindRoot, and a previous post, rather unusually, brought no satisfactory
> resolution;
>
> The problem is to find the roots of two complex equations
>
>    u * BesselJ[1, u] * BesselK[0, w] == w * BesselK[1, w] * BesselJ[0, u]
>
>    u^2 + w^2 == g
>
> with constraints
>
>    Re[g] == <an input value, DN>
>
>    Re[w] ==  0
>
> So that's two complex (or four real) equations; four real numbers in the
> desired output; and at least one solution exists in general for any
> choice of DN and can be found using other methods -- but there appears
> to be NO WAY (no straightforward way, anyway) to find it using FindRoot,
> -- or even to get FindRoot to tackle the basic problem.
>
> Right????????
>
> ------
>
> [For testing purposes, a sample starting point close to but not exactly
> one particular solution, would be  DN = -200,  g0 = DN + 0.8 I = -200 +
> 0.8 I,  u0 = 2.39 + 0.17 I,  w0 = 0 + 14.34 I  ]

I revised the problem so that there are three variable, all real:

ur and ui are, resp., the real and imaginary parts of your u, and

wi is the imaginary part of your w, which is purely imaginary. Then

In[21]:= dn = -200; FindRoot[{Re[(ur + I ui) * BesselJ[1, (ur + I ui)] *
BesselK[0, I wi] - I wi * BesselK[1, I wi] * BesselJ[0, (ur + I ui)]] == 0,
Im[(ur + I ui) * BesselJ[1, (ur + I ui)] * BesselK[0, I wi] - I wi *
BesselK[1, I wi] * BesselJ[0, (ur + I ui)]] == 0, ur^2 - ui^2 - wi^2 ==
dn}, {ur, 2.39}, {ui, 0.17}, {wi, 14.34}]

Out[21]= {ur -> 2.39276, ui -> 0.168351, wi -> 14.3421}

In[22]:= 2 ur ui/.%

Out[22]= 0.805646

which gives the imaginary part of your g.

I also checked to see if this revised form worked well using different
values of dn. It seems that it does. For example, with dn set to 1000 and
without even changing the initial values for the three real variables, I
got

Out[23]= {ur -> 79.4378, ui -> -1.55712, wi -> -72.8556}

In[24]:= 2 ur ui/.%

Out[24]= -247.389

HTH,
David W. Cantrell


  • Prev by Date: Re: NMinimize a function of NMaximize
  • Next by Date: Re: FindRoot can NOT handle mixed real and complex variables
  • Previous by thread: RE: FindRoot can NOT handle mixed real and complex variables
  • Next by thread: data format on y axis