6

So I need to use Mathematica to find the solution of $y=x- \epsilon \sin(2y)$ as a power series in terms of $\epsilon$. I'd assume I'd need to create an equation $f=x-y- \epsilon \sin(2y)$, then express $y(\epsilon)=\sum_n a_n \epsilon^n$, then input into series, but I can't seem to get it to work. Some help would be appreciated.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Lenny
  • 61
  • 1
  • 2
  • Hello Lenny! Welcome to the Mathematica StackExchange community. Have you tried to do anything by yourself? I mean, is there any piece of code which you've tried to use? – Rod Jun 13 '13 at 10:13
  • I have. What I have tried so far: eq[eps_,y_]:=x-eps Sin[2y]; y[eps_]:=Sum[Subscript[a,n] eps^n,{n,0,20}]; Series[eq[eps,y[eps]],{eps,0,2}]; – Lenny Jun 13 '13 at 10:16
  • Is eps any Mathematica function? Or is it just an argument of a function? – Rod Jun 13 '13 at 10:19
  • eps is just epsilon – Lenny Jun 13 '13 at 10:20
  • Hi @Lenny, I edited you post for more readability, please do click the edited link above my avatar to see how I did it. Also please refer to the editing help. – Silvia Jun 13 '13 at 10:34
  • About your question, I think you might be interested in the Kepler's Equation, which is of the very similar form, and has been studied deeply. – Silvia Jun 13 '13 at 10:36
  • I have already looked but that does not really help me – Lenny Jun 13 '13 at 10:39
  • 1
    Hint: let $x=3\eta/2-\xi, y=\eta/2$, then your equation will reduce to Kepler's Equation. – Silvia Jun 13 '13 at 11:03
  • I would like to know a systematic way to solve this question. for example, if the equation was $$y=2x-\epsilon Cos[2y]$$ – Lenny Jun 13 '13 at 11:07
  • I don't see any difference. You can still use linear transformation to reduce to Kepler Eq. – Silvia Jun 13 '13 at 11:16
  • I don't want to reduce it into Kepler though.... – Lenny Jun 13 '13 at 11:17
  • 1
    It's just I think this type of equations are not as innocent as they look like, so instead of trying it with trivial methods, adopting some sophisticated results might be more meaningful. Anyway, you can try this method. – Silvia Jun 13 '13 at 11:33

3 Answers3

6

Let define the equation to solve $f=x-y\epsilon\sin(2 x)\equiv 0$ and series expansion of $y$ in powers of $\varepsilon$.

f = x - y - \[Epsilon] Sin[2 y];
ord = 3;
y = x + Sum[a[n] \[Epsilon]^n, {n, ord}] + O[\[Epsilon]]^(ord + 1);

Then expand the equation and solve for any value of $\varepsilon$ parameter

eqs = Normal[Series[f, {\[Epsilon], 0, ord}]];
SolveAlways[eqs == 0, \[Epsilon]]
(* => {{a[3] -> 2 (a[1] - a[1]^3 + a[1] Cos[4 x]), a[2] -> -2 a[1] Cos[2 x], Sin[2 x] -> -a[1]}} *)

If we are interested in the expansion coefficients $a_n$ in terms of $x$ then following code will refine the solution

sol = First@Solve[Equal@@@First@SolveAlways[eqs == 0, \[Epsilon]], a/@Range[ord]]
(* => {a[1] -> -Sin[2 x], a[2] -> 2 Cos[2 x] Sin[2 x],  a[3] -> 2 Sin[2 x] (-1 - Cos[4 x] + Sin[2 x]^2)} *)

One should also do check

f/.sol//Simplify
(* => O[\[Epsilon]]^4 *)
mmal
  • 3,508
  • 2
  • 18
  • 38
4

The new in M12 function AsymptoticSolve can be used to find the perturbation expansions:

AsymptoticSolve[y == x - ϵ Sin[2 y], {y, x}, {ϵ, 0, 4}]

{{y -> x - ϵ Sin[2 x] + 2 ϵ^2 Cos[2 x] Sin[2 x] - 2 ϵ^3 (2 Cos[2 x]^2 Sin[2 x] - Sin[2 x]^3) + 8/3 ϵ^4 (3 Cos[2 x]^3 Sin[2 x] - 5 Cos[2 x] Sin[2 x]^3)}}

in agreement with mmal's answer.

Carl Woll
  • 130,679
  • 6
  • 243
  • 355
2

First, one can express $\varepsilon$ as a function of $y$:

Clear[eps]
eps[y_] = ε /. Solve[x == y - ε Sin[2 y], ε][[1]]

$$-(x-y) \csc (2 y).$$

Then, expand into series around $y=x$, since it is a solution for $\varepsilon=0$. Applying InverseSeries after that gives:

res = InverseSeries[Series[eps[y], {y, x, 3}]] /. y -> ε // FullSimplify

$$x+\varepsilon \sin (2 x)+\varepsilon ^2 \sin (4 x)+\varepsilon ^3 \sin (2 x) (3 \cos (4 x)+1)+O\left(\varepsilon ^4\right).$$

Check:

Series[y - ε Sin[2 y] /. y -> res, {ε, 0, 3}] // FullSimplify

$$x+O\left(\varepsilon ^4\right).$$

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Andrew
  • 2,513
  • 17
  • 15