# Solving algebraic equations perturbatively (using function series)

I have linearised some equations and trying to solve them perturbatively in powers of small parameter $$e$$. Here is my script

Subscript[t, x] =
1 - (Subscript[B, x]^2 e^2)/2 + (7 Subscript[B, x]^4 e^4)/8;
Subscript[t, y] = Subscript[B, x] e - Subscript[B, y]^3 e^3;
Subscript[n, x] = -Subscript[t, y];
Subscript[n, y] = Subscript[t, x];
Subscript[\[Sigma], xx] = -d + 2  \[Mu]  Subscript[u, x];
Subscript[\[Sigma], yy] = -d + 2 \[Mu]  Subscript[v, y]  e^-2;
Subscript[\[Sigma],
xy] = \[Mu] ( Subscript[v, x] e^-1 + Subscript[u, y]  e^-1);
Subscript[u, x] =
Subscript[u, x0] + Subscript[u, x2]  e^2 + Subscript[u, x4]  e^4;
Subscript[u, y] =
Subscript[u, y0] + Subscript[u, y2]  e^2 + Subscript[u, y4]  e^4;
Subscript[v, x] =
Subscript[v, x0] + Subscript[v, x2]  e^2 + Subscript[v, x4]  e^4;
Subscript[v, y] =
Subscript[v, y0] + Subscript[v, y2]  e^2 + Subscript[v, y4]  e^4;
d = d0 + d2  e^2 + d4  e^4;
Series[FullSimplify[
e (Subscript[\[Sigma], xx]  Subscript[n, x] +
Subscript[\[Sigma], xy]  Subscript[n, y])]==0, {e, 0, 4}]
Series[FullSimplify[
e^2 (Subscript[\[Sigma], yy]  Subscript[n, y] +
Subscript[\[Sigma], xy]  Subscript[n, x])]==0, {e, 0, 4}]


This outputs two equations that I need to solve. In the first order $$e^0$$, these equations simplify to

(Subscript[u, y0] + Subscript[v, x0])=0


and

2 \[Mu] Subscript[v, y0]=0


Which mean I can use $$2 \mu v_{y0} =0$$ and $$(u_{y0}=- v_{x0})$$ to simplify the higher order equations $$e^2$$ and $$e^4$$. But how can I do this without manually subbing lower order equations to higher order equations?

• Calling the equations e1 and e2, one can do SolveAlways[{e1, e2}, e]. Commented Apr 24 at 14:25

t[x] = 1 - (b[x]^2  e^2)/2 + (7  b[x]^4  e^4)/8;
t[y] = b[x]  e - b[y]^3  e^3;
n[x] = -t[y];
n[y] = t[x];
sig[xx] = -d + 2   mu   u[x];
sig[yy] = -d + 2  mu   v[y]   e^-2;
sig[xy] = mu  (v[x]  e^-1 + u[y]   e^-1);
u[x] = u[x0] + u[x2]   e^2 + u[x4]   e^4;
u[y] = u[y0] + u[y2]   e^2 + u[y4]   e^4;
v[x] = v[x0] + v[x2]   e^2 + v[x4]   e^4;
v[y] = v[y0] + v[y2]   e^2 + v[y4]   e^4;
d = d0 + d2   e^2 + d4   e^4;
e1 = Series[e  (sig[xx]   n[x] + sig[xy]   n[y]) == 0, {e, 0, 4}];
e2 = Series[e^2  (sig[yy]   n[y] + sig[xy]   n[x]) == 0, {e, 0, 4}];

SolveAlways[{e1, e2}, e]

(* Out[129]= {{d2 -> 0, d0 -> 0,
mu -> 0}, {u[y4] -> (d0 b[y]^3 - 2 mu b[y]^3 u[x0] - mu v[x4])/mu,
v[y4] -> d2/(2 mu), v[y2] -> d0/(2 mu), u[y2] -> -v[x2], v[y0] -> 0,
u[y0] -> -v[x0],
b[x] -> 0}, {u[y4] -> (1/(
2 mu b[x]))(-2 d2 b[x]^2 + 4 mu b[x]^2 u[x2] + mu b[x]^3 u[y2] -
2 mu b[y]^3 u[y2] + mu b[x]^3 v[x2] - 2 mu b[y]^3 v[x2] -
2 mu b[x] v[x4]),
v[y4] -> (d2 + mu b[x] u[y2] + mu b[x] v[x2])/(2 mu),
v[y2] -> d0/(2 mu),
u[x0] -> (d0 b[x] + mu u[y2] + mu v[x2])/(2 mu b[x]), v[y0] -> 0,
u[y0] -> -v[x0]}} *)