The question is to find an approximate solution, up to the order of epsilon of following problem.
$$y'' + y+\epsilon y^3 = 0$$ $$y(0) = a$$ $$y'(0) = 0$$
I tried to solve the given problem using perturbation theory.
$$y(t) = y_0(t) + \epsilon y_1(t) + \epsilon^2 y_2(t) + \cdots$$ $$t = w(\epsilon)t = (1 + \epsilon w_1 + \epsilon^2 w_2 + \cdots )t$$
However, i failed to find an appropriate approximate solution... help me!!
You don't need a series for $t$, only $y$. So substitute $y=y_0+\epsilon y_1+\epsilon^2 y_2+\ldots$ into the equation:
$$ y_0''+\epsilon y_1''+\epsilon^2 y_2''+y_0+\epsilon y_1+\epsilon^2 y_2+\epsilon\left(y_0+\epsilon y_1+\epsilon^2 y_2\right)^3+O(\epsilon^3)=0. $$
You also have to expand the boundary conditions, which will give $y_0(0)=a$, and all other $y_i(0)=0$, and all $y_i'(0)=0$.
Now look at the equations for each magnitude of $\epsilon$. Firstly, the largest term is $O(1)$, and the equation is $$ y_0''+y_0=0 $$ so $y_0=A\sin(t)+B\cos(t)$, and the boundary condition gives $y_0=a\cos(t)$. Then the $O(\epsilon)$ equation is $$ y_1''+y_1+y_0^3=0,\ y_1(0)=y_1'(0)=0 $$ and the $O(\epsilon^2)$ equation is $$ y_2''+y_2+3y_0^2y_1=0,\ y_2(0)=y_2'(0)=0, $$ at $O(\epsilon^3)$, $$y_3''+y_3+3y_0^2y_2+3y_0y_1^2=0,\ y_3(0)=y_3'(0)=0 $$ and so on. You can solve these (remember $\cos(x)^3=3/4(\cos(3x)+3\cos(x))$) to give a series for $y$.