Im trying to solve the following problem:
Approximate with an error of $O(\epsilon ^3)$ the extremals of the Lagrangian $$L(y,y',x) = y^2 + (y')^2 - 2y \sin(x) + \epsilon y^3$$ with $y(0)=1$ and $y(1) =2$.
Here is what I have done so far:
Im assuming the statement refers to finding the extremals of the functional $F(y) = \int_0^1 L(y,y',x) dx$. This is equivalent to finding $y$ that satisfies the Euler-Lagrange equations:
$\frac{d}{dx}\frac{\partial L}{\partial y'} - \frac{\partial L}{\partial y} = 0$
So we have to solve the following IVP
$2y'' -2y + 2sin(x) - 3\epsilon y^2$, $y(0) = 1, y(1)=2$ (1)
Applying regular perturbation methods we get for the 0th order on $\epsilon$
$2y_0" -2y_0 + 2sin(x) = 0$, $y_0(1)=0, y_0(1)=2$
and 1rst order:
$2y_1" - 2y_1 + 2sin(x) -3y_0^2$, $y_1(0)=0$, $y_0(1)=0$
To solve for $y_0$ I used variation of constants, substituting $y=A(x)e^{-x}$, then solved for $A'$ then integrated. This gives quite a cumbersome equation when substituting $y_0$ on the equation of first order on $\epsilon$ that I don't think its right.
Alternatively I also tired with the canonical formulation. Remember we set $p = \frac{\partial L}{y'}$ and $H = py' - L(y,y',x)$. Then solving (1) is equivalent to
$\dot y = 3/2p$, $\dot p = -2y -2sin(x) + \epsilon y^3$
To solve this I note
$\frac{dp}{dy} = \frac{-2y -2sin(x) + \epsilon y^3}{3/2 p}$
Which is separable. Doing the proper changes, integrating on both sides and substituting $p = 2y'$ I get:
$3/2 (y')^2 + y^2 + 2sin(x)y - \epsilon/4 y^4$
And I don't really know how to proceed. I must admit that my differential equation knowledge is a bit rusty so any hint or mistake that you can point out is very helpful. Is there anything obvious that i'm doing wrong?