# How can I find the nth-order problem?

I was reading Bender and Orszag's 'Advanced Mathematical Methods for Scientists and Engineers', I came up with a problem in Chapter 7 on approximating solution of an initial value problem using perturbation. Along the way, I was struggling substituting the perturbation expansion into the differential equation.

Here is the problem:

Consider the initial-value problem $y''(x)=f(x)y(x)$, $y(0)=y'(0)=1$, where $f(x)$ is continuous. This problem has no closed-form solution except for very special choices of $f(x)$. Nevertheless it can be solved perturbatively.

First, introduce an $\epsilon$ in such a way that the unperturbed problem is solvable:
$y''(x)=\epsilon f(x)y(x)$, $y(0)=y'(0)=1$
Second, assume a perturbation expansion of the form
$y(x)=\sum_{n\ge 0}\epsilon^ny_n(x)$ where $y_0(0)=y_0'(0)=1$ and $y_n(0)=y_n'(0)=0$ for $n\ge 1$.

The zeroth-order problem $y''=0$ is obtained by setting $\epsilon=0$, and the solution satisfying the initial condition is $y_0=1+x$. Find the nth-order problem.

To solve the problem, we need to:
Substitute the perturbation expansion for $y(x)$ into the differential equation and setting the coefficient of $\epsilon^n$ equal to $0$.

Then if I substitute the perturbation expansion into the differential equation, I get $(\sum_{n\ge 0}\epsilon^ny_n(x))''=f(x)\sum_{n\ge 0}\epsilon^ny_n(x)$, then I am not sure how to proceed, since it involves taking derivative of infinite series. In short, I failed to get the given solution.

The solution is $y_n''=y_{n-1}f(x)$, $y_n(0)=y_n'(0)=0$.

I am not sure how they managed to get $y_{n-1}$ on RHS and the ICs?

Many thanks!

We're substituting the expansion $$y(x) = \sum_{n = 0}^{\infty} \epsilon^{n}y_{n}(x)$$ into the equation $$y''(x) = \epsilon f(x)y(x).$$ Note that the right-hand side of this equation has already got an $\epsilon$ in it. Then $$\sum_{n = 0}^{\infty} \epsilon^{n}y''_{n}(x) = f(x)\sum_{m = 0}^{\infty} \epsilon^{m+1}y_{m}(x).$$ Consider the powers of $\epsilon$ separately:
This is how we get the equations governing the $y_{n}$ term in the expansion, but what about the associated initial conditions?
For the initial conditions we assume that the leading order term, $y_{0}(x)$, satisfies the original initial conditions on $y(x)$ and set the initial conditions for the other $y_{n}(x)$ to be zero.