From Example Problems
Jump to: navigation, search

Find the extremals of the functional J(y)=\int _{0}^{\pi }\left[y'(x)\right]^{2}dx\, subject to the constraint \int _{0}^{\pi }\left[y(x)\right]^{2}dx=1,y(0)=y(\pi )=0\,

Let H(y,\lambda )=\int _{0}^{\pi }([y'(x)]^{2}+\lambda [y(x)]^{2})\,dx where \lambda \, is a Lagrange multiplier. The Euler equation is

{\frac  {d}{dx}}{\frac  {\partial (y'^{2}+\lambda y^{2})}{\partial y'}}-{\frac  {\partial (y'^{2}+\lambda y^{2})}{\partial y}}=0

\implies y''-\lambda y=0

(i) Try \lambda >0\,; let \lambda =\alpha ^{2}\,. Then

y''-\alpha ^{2}y=0\,
\implies y=ae^{{\alpha x}}+be^{{-\alpha x}}

y(0)=0\implies a+b=0;\quad y(\pi )=0\implies ae^{{\alpha \pi }}+be^{{-\alpha \pi }}=0
But the solution for this is a=b=0\,, i.e., y\equiv 0\, which does not satisfy the constraint \int _{0}^{\pi }y^{2}\,dx=1

(ii) Try \lambda =0\, Then

\implies y=ax+b\,

y(0)=0\implies b=0\, so y=ax\,; then y(\pi )=0\implies a=0\implies y\equiv 0 which, again, does not satisfy the constraint.

(iii) \lambda <0\,; let \lambda =-\alpha ^{2}\,. Then

y''+\alpha ^{2}y=0\,
\implies y=a\cos(\alpha x)+b\sin(\alpha x)

y(0)=0\implies a=0; y(\pi )=0\implies b=0 or \sin(\alpha \pi )=0\,

b=0\implies y\equiv 0, so we reject this and take \sin(\alpha \pi )=0\,, which implies \alpha =\pm 1,\pm 2,\dots

Thus y=b\sin(nx)\, where n\, is any nonzero integer.

b\, is found by imposing the constraint:

\int _{0}^{\pi }b^{2}\sin ^{2}(nx)\,dx=1\implies \int _{0}^{\pi }b^{2}\,{\frac  {1-\cos(2nx)}{2}}\,dx=1\implies {\frac  {b^{2}}{2}}\left[x-{\frac  {\sin(2nx)}{2n}}\right]_{0}^{\pi }=1
\implies b=\pm {\sqrt  {2/\pi }}

Hence, the extremals of J\, subject to the given constraint are
y=\pm {\sqrt  {2/\pi }}\sin(nx),n=\pm 1,\pm 2,\dots

Calculus of Variations

Main page