So I decided to use the Euler Lagrange equations:Find solutions of the Euler-Lagrange equations for critical points of the following functionals with the given endpoint conditions.

\(\displaystyle I(y)=\int_1^2 x(y')^2~dx\) where \(\displaystyle y(1)=1\) and \(\displaystyle y(2)=2\)

\(\displaystyle \frac{\partial f}{\partial y}=0\) and \(\displaystyle \frac{\partial f}{\partial y'}=2(y')x\)

Inputting this into the Euler-Lagrange equations gives:

\(\displaystyle -\frac{d}{dx}(2y'x)=0 \ \Rightarrow -2y'=0 \Rightarrow y'=0\)

So integrating both sides w.r.t x gives \(\displaystyle y=A\) where \(\displaystyle A\) is a positive constant.

From here I was expecting to use the conditions on y to work out what A is. Unfortunately this doesn't work! y can't equal a constant and yet change from 1 to 2 as described in the conditions.

What's going wrong?