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: [mg79966] RE: [mg79899] FindRoot can NOT handle mixed real and complex variables
  • From: "Tony Harker" <a.harker at ucl.ac.uk>
  • Date: Thu, 9 Aug 2007 06:26:42 -0400 (EDT)


 One way is to fudge it so that the number of unknowns and the number of
equations LOOKS right:
FindRoot[{u*BesselJ[1, u]*BesselK[0, w] - 
   w*BesselK[1, w]*BesselJ[0, u], u^2 + w^2 - g, 
  Re[g] + 200 + I Re[w]}, {{u, 2.39 + .17 I}, {w, 
   14.34 I}, {g, -200 + .8 I}}]

Unfortunately, the sneakier trick of creating a new variable z whose real
part is the imaginary part of g, and whose imaginary part is the imaginary
part of w:

 FindRoot[{u*BesselJ[1, u]*BesselK[0, w] - 
    w*BesselK[1, w]*BesselJ[0, u], u^2 + w^2 - g} /. {w -> I Im[z], 
   g -> -200. + I Re[z]}, {{u, 2.39 + .17 I}, {z, 0.8 + 14.34 I}}]

 does not quite work:

FindRoot::lstol: The line search decreased the step size to within \
tolerance specified by AccuracyGoal and PrecisionGoal but was unable \
to find a sufficient decrease in the merit function.  You may need \
more than MachinePrecision digits of working precision to meet these \
tolerances. 

 Perhaps a little tweaking of the options might get this going?


Dr A.H. Harker
Department of Physics and Astronomy
University College London
Gower Street
London
WC1E 6BT

Tel: (44)(0) 2076793404
E:    a.harker at ucl.ac.uk
 

]-> -----Original Message-----
]-> From: AES [mailto:siegman at stanford.edu] 
]-> Sent: 08 August 2007 09:53
]-> To: mathgroup at smc.vnet.net
]-> Subject: [mg79899] FindRoot can NOT handle mixed real and 
]-> complex variables
]-> 
]-> 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  ]
]-> 
]-> 



  • Prev by Date: Re: Failure to convert certain symbols to InputForm when using when using AutoGeneratedPackage->True
  • Next by Date: data format on y axis
  • Previous by thread: Re: Version 6 "Mathematica Book" - updated and expanded
  • Next by thread: Re: FindRoot can NOT handle mixed real and complex variables