Calculus of variations condition

277 Views Asked by At

Given this:

$$\int_0^1\left(\frac{1}{2}y'^2+yy'+y'+y\right)dx$$

where

$$y(0)=1$$

I'm to show that the extremal can be found by imposing this condition:

$$y'+y+1=0$$

at $x=1$

Beltrami's identity gives:

$$\frac{d}{dx}\left(y'\left(y'+y+1\right)-\left(\frac{1}{2}y'^2+yy'+y'+y\right)\right)=0$$

So

$$\frac{d}{dx}\left(\frac{1}{2}y'^2-y\right)=0$$

which doesn't appear to give me the condition I need.

If I try the Euler-Lagrange equation, I get something nearer:

$$\frac{d}{dx}\left(y'+y+1\right)-\left(y'+1\right)=0$$

So

$$\left(y'+y+1\right)|_{x=1}=\left(y+x\right)|_{0}^{1}+\left(y'+y+1\right)|_{x=0}$$

$$\left(y'+y+1\right)|_{x=1}=y(1)+y'(0)+2$$

The LHS is what I'm looking for, but I don't see how to make the RHS be $0$. How do I show the required condition?

2

There are 2 best solutions below

2
On BEST ANSWER

When deriving the Euler-Lagrange equation you take variations of $y$. Let $h$ be a variation. Because $y(0)=1$ is fixed, we have $h(0)=0$ for the variation. However, $h(1)$ can be arbitrary. Then $$ \int_0^1 y'h' + y'h + yh' + h' + h \,dx = 0 $$ After we integrate by parts, we obtain $$ (y'+y+1)h\big|_0^1 + \int_0^1 (-y'' +1)h \, dx = 0\,, $$ and so the Euler-Lagrange equation is $$ y'' = 1\,,$$ together with the boundary condition $$ y'(1)+y(1)+1 = 0\,.$$

0
On

The following SymPy script

from sympy import *

x = Symbol('x')
y = Function('y')(x)

# define Lagrangian
L = 0.5*(Derivative(y,x))**2 + y*Derivative(y,x) + Derivative(y,x) + y

# Euler-Lagrange equation
print euler_equations(L,y,x)

produces

[Eq(-1.0*Derivative(y(x), x, x) + 1, 0)]

Thus, the Euler-Lagrange ODE is $y'' = 1$. Integrating twice, we obtain the family of solutions

$$y (x) = c_0 + c_1 x + \frac{x^2}{2}$$

From $y (0) = 1$, we obtain $c_0 = 1$. To determine $c_1$, more information is needed.