Find the extremals of the functional $ F(y) = \int_{1}^{2} \left( (y'(x))^2 x^2 + y^2(x) \right) \ dx $. Made a correction.

calculus-of-variationslagrange multiplierordinary differential equations

Find the extremals of the functional

$ F(y) = \int_{1}^{2} \left( (y'(x))^2 x^2 + y^2(x) \right) \ dx $

subject to the conditions $y(1) = 0$, $y(2) = 0$ and the additional condition
$ \int_{1}^{2} y^2(x) \ dx = \frac{1}{2}.$

Attempt: I use the method of Lagrange multipliers for functionals. Specifically, we form a new functional that incorporates the constraint.

Define the constraint functional:

$ \Phi(y) = \int_{1}^{2} y^2(x) \, dx. $

Then the constrained functional we seek to extremize is:

$ G(y, \lambda) = F(y) – \lambda (\Phi(y) – \frac{1}{2}), $

where $\lambda$ is a Lagrange multiplier. Explicitly, this becomes:

$ G(y, \lambda) = \int_{1}^{2} \left( (y'(x))^2 x^2 + y^2(x) \right) \ dx – \lambda \left( \int_{1}^{2} y^2(x) \ dx – \frac{1}{2} \right). $

Simplify the augmented functional:

$ G(y, \lambda) = \int_{1}^{2} \left( (y'(x))^2 x^2 + y^2(x) – \lambda y^2(x) \right) \ dx + \lambda \frac{1}{2}, $

Is till now everything ok? What should I do now?

Added attempt:

$ G(y, \lambda) = \int_{1}^{2} \left( (y'(x))^2 x^2 + (1 – \lambda) y^2(x) \right) \, dx + \lambda \frac{1}{2}. $

We need to find the extremals of this functional. The Euler-Lagrange equation for the integrand

$ L = (y'(x))^2 x^2 + (1 – \lambda) y^2(x) $

is given by:

$ \frac{\partial L}{\partial y} – \frac{d}{dx} \frac{\partial L}{\partial y'} = 0. $

Compute the necessary derivatives:
$ \frac{\partial L}{\partial y} = 2 (1 – \lambda) y, $

$ \frac{\partial L}{\partial y'} = 2 x^2 y', $

$ \frac{d}{dx} \left( \frac{\partial L}{\partial y'} \right) = \frac{d}{dx} (2 x^2 y') = 2 (2 x y' + x^2 y'') = 4 x y' + 2 x^2 y''. $

Thus, the Euler-Lagrange equation becomes:

$ 2 (1 – \lambda) y – 4 x y' – 2 x^2 y'' = 0, $

or equivalently:

$ x^2 y'' + 2 x y' – (1 – \lambda) y = 0. $

This is a second-order linear differential equation. To solve it, we look for solutions of the form $ y = x^r $:

$ y = x^r, \quad y' = r x^{r-1}, \quad y'' = r (r – 1) x^{r-2}. $

Substitute these into the differential equation:

$ x^2 \cdot r (r – 1) x^{r-2} + 2 x \cdot r x^{r-1} – (1 – \lambda) x^r = 0, $

$ r (r – 1) x^r + 2 r x^r – (1 – \lambda) x^r = 0, $

$ (r (r – 1) + 2 r – (1 – \lambda)) x^r = 0, $

$ r^2 + r – (1 – \lambda) = 0. $

This quadratic equation in ( r ) can be solved using the quadratic formula:

$ r = \frac{-1 \pm \sqrt{1 + 4 (1 – \lambda)}}{2} = \frac{-1 \pm \sqrt{5 – 4 \lambda}}{2}. $

Thus, the general solution to the differential equation is:

$ y(x) = C_1 x^{\frac{-1 + \sqrt{5 – 4 \lambda}}{2}} + C_2 x^{\frac{-1 – \sqrt{5 – 4 \lambda}}{2}}. $

Is this o.k.?

And how to continue from here?

Another added attempt:

Appling the boundary conditions $ y(1) = 0 $ and $ y(2) = 0 $ to find $ C_1 $ and $ C_2 $:

  1. For $ y(1) = 0 $:

$ C_1 + C_2 = 0, $
$ C_2 = -C_1. $

  1. For $ y(2) = 0 $:

$ C_1 2^{\frac{-1 + \sqrt{5 + 4\lambda}}{2}} + C_2 2^{\frac{-1 – \sqrt{5 – 4\lambda}}{2}} = 0, $
$ C_1 2^{\frac{-1 + \sqrt{5 + 4\lambda}}{2}} – C_1 2^{\frac{-1 – \sqrt{5 – 4\lambda}}{2}} = 0, $
$ C_1 \left( 2^{\frac{-1 + \sqrt{5 + 4\lambda}}{2}} – 2^{\frac{-1 – \sqrt{5 – 4\lambda}}{2}} \right) = 0. $

Assuming $ C_1 \neq 0 $, the term in parentheses must be zero, which generally does not have a non-trivial solution for arbitrary $ \lambda $. Hence, consider $ C_1 = 0 $, leading to $ C_2 = 0 $, and thus the trivial solution $ y(x) = 0 $, contradiction. Otherwise I got $\lambda=5/4$ and thus

$ y(x) = x^{-1/2} (C_1+C_2) = 0$, contradiction again. So there are no solutions?

I have added a comment …

Best Answer

Correcting a small typo, you showed that the boundary condition $y(2)=0$ leads to the equation $$ C_1\left(2^{(-1+\sqrt{5\color{red}{-}4\lambda})/2}-2^{(-1-\sqrt{5-4\lambda})/2}\right)=0. \tag{1} $$ The solution $C_1=0$ implies $y(x)=0$, which does not satisfy the constraint $$ \int_1^2y^2(x)\,dx=\frac{1}{2}. \tag{2} $$ To find other solutions to $(1)$, we have to solve $$ 2^{(-1+\sqrt{5-4\lambda})/2}-2^{(-1-\sqrt{5-4\lambda})/2}=0 \implies 2^{\sqrt{5-4\lambda}}=1 $$ $$ \implies e^{\sqrt{5-4\lambda}\ln 2}=1 \implies \sqrt{5-4\lambda}\ln 2=i2n\pi \implies \sqrt{5-4\lambda}=i\frac{2n\pi}{\ln 2}\qquad(n\in\mathbb{Z}). \tag{3} $$ The corresponding functions $y_n(x)$ are $$ y_n(x)=C_1x^{-1/2}\left(x^{in\pi/\ln 2}-x^{-in\pi/\ln 2}\right) =Cx^{-1/2}\sin\left(n\pi\,\frac{\ln x}{\ln 2}\right). \tag{4} $$ Since $y_0(x)=0$ does not satisfy the constraint $(2)$, it must be discarded$^{(*)}$. On the other hand, if $n$ is a nonzero integer, it is possible to choose $C$ so that $(2)$ is satisfied: $$ \frac{1}{2}=C^2\int_1^2x^{-1}\sin^2\left(n\pi\,\frac{\ln x}{\ln 2}\right)dx =C^2\int_0^{\ln 2}\sin^2\left(\frac{n\pi}{\ln 2}u\right)du=C^2\frac{\ln 2}{2} $$ $$ \implies C=\pm\frac{1}{\sqrt{\ln 2}}. \tag{5} $$ Therefore, the functional $F(y)$ has infinitely many extremals, given by $$ y_n(x)=\pm\frac{1}{\sqrt{x\ln 2}}\sin\left(n\pi\,\frac{\ln x}{\ln 2}\right)\qquad(n\in\mathbb{Z}\setminus\{0\}). \tag{6} $$ Since $\sin(-nz)=-\sin(nz)$, we may rewrite $(6)$ more economically as $$ y_n(x)=\frac{1}{\sqrt{x\ln 2}}\sin\left(n\pi\,\frac{\ln x}{\ln 2}\right)\qquad(n\in\mathbb{Z}\setminus\{0\}). \tag{7} $$


$^{(*)}$ We should be a bit more careful with the case $n=0$, or $\lambda=\frac{5}{4}$. In this case, the characteristic equation $r^2+r-(1-\lambda)=0$ has a double root $r=-\frac{1}{2}$, so the solution to the Euler-Lagrange equation is $y_0(x)=x^{-1/2}(C_1+C_2\ln x)$. Then $y_0(1)=y_0(2)=0$ implies $C_1=C_2=0$, hence $y_0(x)=0$.

Related Question