Find the stationary point of the functional $$ J[y]=\int \left( x^2y'^2+2y^2 \right) dx $$ where $y(0)=0, y(1)=2.$
My Solution:
E-L equation: $x^2y''+2xy'-2y=0.$
This is also Cauchy-Euler equation.
Let $y(x)=x^m$. Substituting to eqn. , we get $m_1=-2, m_2=1$ and I found the general solution $y(x)=c_1x^{-2}+c_2x$.
Now, we will find $c_1,c_2.$
Since $y(1)=2$, we have $c_1+c_2=2$. But when I write $x=0$ to general solution, $0=y(x)=c_1.0^{-2}+c_20$, there is a uncertainty. Please help me.
Your general solution is correct:
$$y(x)=c_1\dfrac{1}{x^2}+c_2x.$$
From $y(x=0)=0$ we see that $c_1=0$ must be given or your solution will explode. One way to show this would be to multiply the equation with $x^2$ to obtain
$$x^2y(x)=c_1+c_2x^3 \implies 0 = c_1 + c_2 \cdot 0^3 \implies c_1=0.$$
Using $y(x=1)=2=c_2\cdot 1$, will give you $c_2=2$.
The final solution is $y(x)=2x$.