# Describing solution of particular ODE with small parameter

I have differential equation (1) $$x''+2\epsilon \nu x'+x+\epsilon x^3=0$$. I try to solve it using a method of multiple scales. So $$x=x(t)=x(T_0,T_1,T_2,...,T_n)$$, where $$T_i=\epsilon^i t$$.

Then $$\frac{d}{dt}=\frac{\partial }{\partial T_0}+\epsilon \frac{\partial }{\partial T_1}+\epsilon^2 \frac{\partial }{\partial T_2}+...+\epsilon^n \frac{\partial }{\partial T_n}=D_0+\epsilon D_1+...+\epsilon^n D_n$$

and $$\frac{d^2}{dt^2}=(\frac{\partial }{\partial T_0}+\epsilon \frac{\partial }{\partial T_1}+\epsilon^2 \frac{\partial }{\partial T_2}+...+\epsilon^n \frac{\partial }{\partial T_n})^2=(D_0+\epsilon D_1+...+\epsilon^n D_n)^2$$

Using $$x=x_0+\epsilon x_1+\epsilon^2 x_2+...$$ we can rewrite (1): $$D_0^2x_0+2\epsilon D_0 D_1 x_0+...+\epsilon D_0^2 x_1+...+2\epsilon \nu D_0 x_0+...+x_0+\epsilon x_1+...+\epsilon x_0^3+3\epsilon^2 x_0^2 x_1+...=0$$

How can I describe these(where $$n$$ is a variable) using Mathematica?

• Welcome to Mathematica.SE, tim! I suggest the following: 1) Take the tour and check the faqs. 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. Commented May 7, 2019 at 21:53

This is precisely what AsymptoticDSolveValue does:

X[t_] = AsymptoticDSolveValue[{x''[t] + 2 ε ν x'[t] + x[t] + ε x[t]^3 == 0,
x[0] == x0, x'[0] == v0},
x[t], t, {ε, 0, 3}]


(huge output to third order in $$\varepsilon$$)

Check that this solution satisfies the differential equation to third order in $$\varepsilon$$:

Series[X''[t] + 2 ε ν X'[t] + X[t] + ε X[t]^3, {ε, 0, 3}]


O[ε]^4

If you don't have access to AsymptoticDSolveValue, you can do it yourself iteratively (to $$m^{\text{th}}$$ order):

m = 3;
x[t_] = Sum[X[n, t]*ε^n, {n, 0, m}];

Do[X[n, t_] = X[n, t] /. FullSimplify[First[
DSolve[Normal[Series[{x''[t] + 2 ε ν x'[t] + x[t] + ε x[t]^3 == 0,
x[0] == x0, x'[0] == v0}, {ε, 0, n}]],
X[n, t], t]]], {n, 0, m}];


Now you can look at the resulting $$x(t)$$:

x[t]


(huge output to third order in $$\varepsilon$$)

Check that this solution satisfies the differential equation to third order in $$\varepsilon$$:

Series[{x''[t] + 2 ε ν x'[t] + x[t] + ε x[t]^3, x[0], x'[0]}, {ε, 0, m}]


O[ε]^4

• Thank you, it's easier than I thought. But I consider that there are no so new functions on my university computers. How can I do it without any new functionality? Commented May 7, 2019 at 21:56
• @timbars you can use it free in wolfram development platform Commented May 8, 2019 at 6:41
• I’d ask your system administrators if they could upgrade. They might have a site license that includes updates, but just haven’t gotten around to it yet, since v12 was just released. Commented May 8, 2019 at 6:48
• I do not need a solution to this problem(because it's incorrect), I just want to rewrite it as a partial differential equation(the last equation in my question) Commented May 8, 2019 at 11:41
• How about just using part of the second solution: m = 3; x[t_] = Sum[X[n, t]*ε^n, {n, 0, m}]; and then look at Series[x''[t] + 2 ε ν x'[t] + x[t] + ε x[t]^3 == 0, {ε, 0, m}] Commented May 8, 2019 at 12:22