0
$\begingroup$
HW[m_] = m ( EllipticK[ 1/m^2] - EllipticE [1/m^2]) ;
Rad[m_] = m - Sqrt[m^2 - 1] ;
Plot[{HW[m], Rad[m], 0}, {m, 1.01, 6}, 
 PlotLabel -> "HW > Rad_ immer" , GridLines -> Automatic, 
 PlotStyle -> Thick]
FindRoot[HW[m] == 1.5 Rad[m] , {m, 3 - .05 I}]

The functions plot real values alright.However they do not together iterate well enough as above. What accuracy and initial value is to be supplied/perturbed?

$\endgroup$
3
$\begingroup$

If you start with another inital value for m, it works flawlessly:

FindRoot[HW[m] == 1.5 Rad[m], {m, -1.1}]
(* {m -> -1.02646} *)

For some ms, e.g. -1.3, you might get miniscule imaginary parts due to the floating point operations involved, which can be cut off like so:

FindRoot[HW[m] == 1.5 Rad[m], {m, -1.3}] // Chop
(* {m -> -1.02646} *)

Besides: I would suggest using SetDelayed instead of Set for your functions like so:

HW[m_] := m (EllipticK[1/m^2] - EllipticE[1/m^2]);
Rad[m_] := m - Sqrt[m^2 - 1];

and maybe change your Plot command to

Plot[{HW[m], Rad[m]}, {m, 1.01, 6}, PlotLabel -> "HW > Rad_ immer", 
     PlotStyle -> Thick, AxesOrigin -> {1, 0}]

sparing you the hassle of having to add the constant 0 into the diagram.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks. I wanted positive $m$ only. However,just after posting I plotted ratio HW[m]/Rad[m] to find that it tends asymptotically to $\pi/2$, which could not be readily judged looking at separate graphs :) $\endgroup$ – Narasimham Mar 21 '15 at 16:01
  • $\begingroup$ @Narasimham: You're welcome! $\endgroup$ – Jinxed Mar 21 '15 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.