Given this:
$$\int_0^1\left(\frac{1}{2}y'^2+yy'+y'+y\right)dx$$
where
$$y(0)=1$$
I'm to show that the extremal can be found by imposing this condition:
$$y'+y+1=0$$
at $x=1$
Beltrami's identity gives:
$$\frac{d}{dx}\left(y'\left(y'+y+1\right)-\left(\frac{1}{2}y'^2+yy'+y'+y\right)\right)=0$$
So
$$\frac{d}{dx}\left(\frac{1}{2}y'^2-y\right)=0$$
which doesn't appear to give me the condition I need.
If I try the Euler-Lagrange equation, I get something nearer:
$$\frac{d}{dx}\left(y'+y+1\right)-\left(y'+1\right)=0$$
So
$$\left(y'+y+1\right)|_{x=1}=\left(y+x\right)|_{0}^{1}+\left(y'+y+1\right)|_{x=0}$$
$$\left(y'+y+1\right)|_{x=1}=y(1)+y'(0)+2$$
The LHS is what I'm looking for, but I don't see how to make the RHS be $0$. How do I show the required condition?
When deriving the Euler-Lagrange equation you take variations of $y$. Let $h$ be a variation. Because $y(0)=1$ is fixed, we have $h(0)=0$ for the variation. However, $h(1)$ can be arbitrary. Then $$ \int_0^1 y'h' + y'h + yh' + h' + h \,dx = 0 $$ After we integrate by parts, we obtain $$ (y'+y+1)h\big|_0^1 + \int_0^1 (-y'' +1)h \, dx = 0\,, $$ and so the Euler-Lagrange equation is $$ y'' = 1\,,$$ together with the boundary condition $$ y'(1)+y(1)+1 = 0\,.$$