1
$\begingroup$

I want to solve the equation by means of asymptotic expansion. After having defined the equation and the series:

eq1 = u[x] == 1 + ϵ u[x]^3;
w[x_, ϵ_] = 1 + ϵ Subscript[u, 1][x] + ϵ^2 Subscript[u, 2][x] + ϵ^3 Subscript[u, 3][x];
eq1exp = eq1 /. u[x] -> w[x, ϵ]

I have to get a set of equations for each degree of the small paramater $\varepsilon$. How can I get the list of equations mentioned?

$\endgroup$

2 Answers 2

3
$\begingroup$

Update

In version M12 you can use the new function AsymptoticSolve to do all the work:

AsymptoticSolve[u == 1 + ϵ u^3, u, {ϵ, 0, 3}] //TeXForm

$\left\{\left\{u\to 12 \epsilon ^3+3 \epsilon ^2+\epsilon +1\right\},\left\{u\to \frac{105 \epsilon ^{3/2}}{128}-\frac{3 \epsilon ^2}{2}-\frac{\epsilon }{2}+\frac{3 \sqrt{\epsilon }}{8}-\frac{1}{\sqrt{\epsilon }}-\frac{1}{2}\right\},\left\{u\to -\frac{105 \epsilon ^{3/2}}{128}-\frac{3 \epsilon ^2}{2}-\frac{\epsilon }{2}-\frac{3 \sqrt{\epsilon }}{8}+\frac{1}{\sqrt{\epsilon }}-\frac{1}{2}\right\}\right\}$

Old answer

Something like:

SolveAlways[Normal @ Series[eq1exp, {ϵ, 0, 3}], ϵ]

{{Subscript[u, 3][x] -> 12, Subscript[u, 2][x] -> 3, Subscript[u, 1][x] -> 1}}

perhaps?

For just the equations you can use one of the following:

Thread[Series[eq1exp,{ϵ, 0, 3}][[All, 3]]]
Thread[CoefficientList[#, ϵ]& /@ Series[eq1exp, {ϵ, 0, 3}]]

{True, Subscript[u, 1][x] == 1, Subscript[u, 2][x] == 3 Subscript[u, 1][x], Subscript[u, 3][x] == 3 (Subscript[u, 1][x]^2 + Subscript[u, 2][x])}

{True, Subscript[u, 1][x] == 1, Subscript[u, 2][x] == 3 Subscript[u, 1][x], Subscript[u, 3][x] == 3 (Subscript[u, 1][x]^2 + Subscript[u, 2][x])}

$\endgroup$
4
  • $\begingroup$ This solution is perfectly suited to this example. But in case of differential equations it seems that a command like DSolveAlways doesn't exists. Could I get just a list of equations I would be able to solve it. $\endgroup$ Jun 23, 2017 at 19:04
  • $\begingroup$ @ArtemZefirov See update. $\endgroup$
    – Carl Woll
    Jun 23, 2017 at 22:16
  • $\begingroup$ The second variant is what I need. Thanks. $\endgroup$ Jun 24, 2017 at 7:22
  • $\begingroup$ Could you modify your last answer, which I've accepted, in order to make it work with equations like u[x]- ϵ u[x]^3 == 1 The current command returns "False" because of the right part of the equation has only one coefficient in expansion but not three. $\endgroup$ Jul 1, 2017 at 16:41
0
$\begingroup$

CoefficientArrays[eq1exp, ϵ] returns the list of required coefficients.

$\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.