# Solving an implicit equation involving Elliptic integral

I have the following equation:

EllipticE[1/(1 + 16*(ja*me + jb*mo)^2)] +
16*(ja*me + jb*mo)^2*EllipticK[1/(1 + 16*(ja*me + jb*mo)^2)] == 0


I want to find values of me and mo. I have tried to find these by using Solve and FindRoot but I didn't get anything. Is there any other way to solve it? And how do I plot mo or me as a function of ja and jb?

• What I see is $E(1/(1+k^2)) + k^2 K(1/(1+k^2 ) >1 k real ? For k^2 -> -k^2 FindRoot[ EllipticE[1/(1 - k^2)] - k^2*EllipticK[1/(1 - k^2)], {k, 1.3}] -> {k -> 1.29066} Jun 3 at 9:19 • Please include the code you have tried with Solve and FindRoot. It's likely that an analytical solution might not be available, but it should be possible to find one numerically, if one exists. Have you tried some plotting to just get an idea of a good starting guess for root finding? Jun 3 at 11:55 • I was thinking to plot it but here we have two unknown param$mo$and$me$so should I freeze one of the param (let's say put$mo=0$) and then 3DPlot$me$as a function of$ja$and$jb\$, right?? Jun 3 at 12:01
• Replace (ja*me + jb*mo) with u and Plot[EllipticE[1/(1+16*u^2)]+16*u^2*EllipticK[1/(1+16*u^2)],{u,-1,1}]
– Bill
Jun 3 at 12:39
• @Barry For Real values of ja,me,jb,mo you appear to be correct, I haven't tried Complex values. BUT you have to check everything I do several different ways before you trust that I haven't made some mistake. When Reduce and Solve and FindRoot can't find something I try things like Plot and variations of Minimize to see if I can convince myself there is no root.
– Bill
Jun 3 at 13:29

Clear["Global*"]

eq1 = EllipticE[1/(1 + 16*(ja*me + jb*mo)^2)] +
16*(ja*me + jb*mo)^2*EllipticK[1/(1 + 16*(ja*me + jb*mo)^2)] == 0;


As recommended by @Bill,

eq2 = eq1 /. ja*me + jb*mo :> u

(* EllipticE[1/(1 + 16 u^2)] + 16 u^2 EllipticK[1/(1 + 16 u^2)] == 0 *)

FindInstance[eq2, u, Reals]

(* FindInstance::nsmet: The methods available to FindInstance are insufficient
to find the requested instances or prove they do not exist. *)


Removing the domain constraint,

(sol = FindInstance[eq2, u, 2]) // N

(* {{u -> 0. - 0.322665 I}, {u -> 0. + 0.322665 I}} *)


Verifying the solution,

eq2 /. sol // FullSimplify

(* {True, True} *)


Graphically,

ComplexPlot3D[eq2[], {u, -1 - I, 1 + I},
AxesLabel -> {Re, Im, None}] eq3 = eq2 /. u -> I*y

(* EllipticE[1/(1 - 16 y^2)] - 16 y^2 EllipticK[1/(1 - 16 y^2)] == 0 *)

FindRoot[eq3, {y, #}] & /@ {-0.3, 0.3}

(* {{y -> -0.322665}, {y -> 0.322665}} *)


Graphically,

Plot[Evaluate@eq3[], {y, -1, 1}] The equation can be reduced to a (complex) quadratic equation in four variables. One may obtain one variable in terms of the other three, but one may not obtain two of the variables in terms of the other two, as requested by the OP.

eqn = EllipticE[1/(1 + 16*(ja*me + jb*mo)^2)] +
16*(ja*me + jb*mo)^2*EllipticK[1/(1 + 16*(ja*me + jb*mo)^2)] == 0;

(* reduction to a quadratic equation *)
ueqn = eqn /. First@Solve[u == 16*(ja*me + jb*mo)^2, ja] // Simplify

(*  EllipticE[1/(1 + u)] + u EllipticK[1/(1 + u)] == 0  *)

usol = Solve[ueqn && -2 < u < -1, u]
eqn2 = Replace[
usol, {{r_Rule}} :> (Equal @@ r /.
First@Solve[u == 16*(ja*me + jb*mo)^2, u])]

(*
{{u -> Root[{EllipticE[1/(1 + #1)] +
EllipticK[1/(1 + #1)] #1 &, -1.665807876436924963209380412862432}]}}

16 (ja me + jb mo)^2 ==
Root[{EllipticE[1/(1 + #1)] +
EllipticK[1/(1 + #1)] #1 &, -1.665807876436924963209380412862432}]
*)


Note the exact Root[] object is negative, which means the solutions are complex. The solution space is a three-dimensional complex manifold (six real dimensions) in four-dimensional complex space (eight real dimensions). I don't know how one would graphically represent such a solution space, but algebraically, it is not hard to deal with.

### Numerical/graphical evidence of only one solution

One solution to ueqn inside Abs[u] <= 2.5:

Show[
ComplexPlot3D[EllipticE[1/(1 + u)] + u EllipticK[1/(1 + u)],
{u, -3 - 3 I, 3 + 3 I},
ColorFunction -> {ColorData["Rainbow"][Clip[#7/4]] &, None}
, ColorFunctionScaling -> False,
MeshFunctions -> {Re[#1] & , Im[#1] & , Abs[#1] &}
, Mesh -> {{0, -1, -2}, {0}, {2.5}}
, MeshStyle -> {Automatic, Automatic, Thick},
PlotRange -> {0, 10}],
ComplexPlot3D[0, {u, -3 - 3 I, 3 + 3 I},
ColorFunction -> {RGBColor[0.5, 0.75, 1., 0.5] &, None},
ColorFunctionScaling -> False,
MeshFunctions -> {Re[#1] & , Im[#2] & }, PlotRange -> {0, 10}]
] No solutions outside Abs[u] 5/u):
ComplexPlot3D[EllipticE[1/(1 + 5/u)] + 5/u EllipticK[1/(1 + 5/u)],
{u, -3 - 3 I, 3 + 3 I},
ColorFunction -> {ColorData["Rainbow"][Clip[#7/4]] &, None}
, ColorFunctionScaling -> False,
MeshFunctions -> {Re[5/#1] & , Im[5/#1] & , Abs[5/#1] &}
, Mesh -> {{0, -1, -2}, {0}, {2.5}}
, MeshStyle -> {Automatic, Automatic, Thick}] It is probably not hard to prove that there are no other solutions, but I'll leave that to others. For instance, EllipticE[1/(1 + u)] and EllipticK[1/(1 + u)] are bounded for u sufficiently large, of course. In fact, EllipticE[1/(1 + 5/u)] + 5/u EllipticK[1/(1 + 5/u) is asymptotic to (Pi/2) u, so there are no zeros for large u`.