8
$\begingroup$

A paper I am reading defines a variable $\theta$ in terms of another variable $\phi$ as an expansion in $u$, where $u$ is understood to be small: $$\theta=\phi-u^2\sin\phi+\mathcal{O}(u^4).$$ They then go on to "invert this relation in the small $u$ limit" and use it to eliminate $\phi$ from another equation. How can I do this in Mathematica?

If I try the obvious guess

Theta[Phi] := Phi - u^2 Sin[Phi]
InverseFunction[Theta][Phi]

The output is just Theta^(-1)[Phi].

If I try

AsymptoticSolve[Phi-u^2 Sin[Phi] == Theta, Phi, {u, 0, 1}]

I get AsymptoticSolve[Phi-u^2 Sin[Phi] == Theta, Phi, {u, 0, 1}] as the output.

Clearly the authors of this paper have managed to find a way to invert this relation, so I am wondering if anyone has any ideas on how to do so. Thanks.

$\endgroup$
1
  • $\begingroup$ Non-Mathematica remark: This is a standard problem, see Kepler equation and the section on the inverse problem there. A somewhat related post is this. $\endgroup$
    – user293787
    Jul 27, 2022 at 8:43

2 Answers 2

9
$\begingroup$
AsymptoticSolve[θ == φ - u^2 Sin[φ], {φ, θ}, {u, 0, 10}]

(*    {{φ -> θ + u^2 Sin[θ] + 
             u^4 Cos[θ] Sin[θ] + 
             1/2 u^6 (2 Cos[θ]^2 Sin[θ] - Sin[θ]^3) + 
             1/3 u^8 (3 Cos[θ]^3 Sin[θ] - 5 Cos[θ] Sin[θ]^3) + 
             1/24 u^10 (24 Cos[θ]^4 Sin[θ] - 88 Cos[θ]^2 Sin[θ]^3 + 13 Sin[θ]^5)}}    *)
$\endgroup$
7
$\begingroup$

@Roman's answer is exactly what you asked for, but as a check, here is a second answer using Bessel's series expansion for the solution of the Kepler equation:

getExpansion[cut_]:=θ+Sum[2/m*BesselJ[m,m*u^2]*Sin[m*θ],
                          {m,1,Ceiling[cut/2]}]//Series[#,{u,0,cut}]&

For example

getExpansion[10]
(* θ
   +Sin[θ] u^2
   +1/2 Sin[2 θ] u^4
   +(-(Sin[θ]/8)+3/8 Sin[3 θ]) u^6
   +(-(1/6) Sin[2 θ]+1/3 Sin[4 θ]) u^8
   +(Sin[θ]/192-27/128 Sin[3 θ]+125/384 Sin[5 θ]) u^10
   +O[u]^11
*)

It coincides with @Roman's answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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