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?