Math Help - Calculus of Variations problem

1. Calculus of Variations problem

Find solutions of the Euler-Lagrange equations for critical points of the following functionals with the given endpoint conditions.

$I(y)=\int_1^2 x(y')^2~dx$ where $y(1)=1$ and $y(2)=2$
So I decided to use the Euler Lagrange equations:

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

Inputting this into the Euler-Lagrange equations gives:

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

So integrating both sides w.r.t x gives $y=A$ where $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?

2. No , we should take total differential not partial ...

It is

$\frac{d}{dx}( 2xy' ) = 0$

Actually , we obtain $2xy' = c$ immediately but in other situations , we should be careful that what we are doing is taking total differential .

$\frac{d}{dx}( 2xy' ) = 2 \frac{d}{dx}( xy' )$

$= 2 [\frac{\partial }{\partial x}(xy') \frac{dx}{dx} + \frac{\partial }{\partial y'}(xy') \frac{dy'}{dx}]$

$= 2 ( y' + x y'' )$

3. Originally Posted by Showcase_22
So I decided to use the Euler Lagrange equations:

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

Inputting this into the Euler-Lagrange equations gives:

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

So integrating both sides w.r.t x gives $y=A$ where $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?
Just because a functional has an extremal does not mean that it is actually a minimum or maximum, just like how the first derivative equals zero does not imply you have a maximum there. In fact, the E-L equations can be thought very informally as an infinite dimensional analogue of a gradient.