1. What is variational calculus?
To find a stationary function of a functional
I
[
f
]
I[f]
I[f] (function of functions), solve (usually differential) equation for stationary function
f
(
x
)
f(x)
f(x).
(e.x.) We have two points
A
(
x
1
,
y
1
)
,
B
(
x
2
,
y
2
)
A(x_1, y_1), B(x_2, y_2)
A(x1,y1),B(x2,y2), find a path
f
(
x
)
f(x)
f(x) such that distance between
A
A
A and
B
B
B is minimized.
I
=
∫
A
B
d
S
=
∫
A
B
d
x
2
+
d
y
2
=
∫
x
1
x
2
1
+
(
d
y
d
x
)
2
d
x
\begin{aligned} I &= \int_{A}^{B} dS \\ &= \int_{A}^{B} \sqrt{dx^2 + dy^2} \\ &= \int_{x_1}^{x_2} \sqrt{1 + (\frac{dy}{dx})^2} dx \end{aligned}
I=∫ABdS=∫ABdx2+dy2=∫x1x21+(dxdy)2dx
(Brachistochrone Problem) Given
v
(
x
,
y
)
v(x,y)
v(x,y) of a particle, find a path
y
=
f
(
x
)
y=f(x)
y=f(x) such that the time
T
T
T taken by the particle is minimized.
T
=
∫
x
1
x
2
1
+
(
d
y
/
d
x
)
2
v
(
x
,
y
)
d
x
T = \int_{x_1}^{x_2} \frac{\sqrt{1 + (dy / dx)^2}}{v(x,y)} dx
T=∫x1x2v(x,y)1+(dy/dx)2dx
In general, calculus of variations seeks to find
y
=
f
(
x
)
y=f(x)
y=f(x) such that this integral:
I
(
f
)
=
∫
x
1
x
2
F
(
x
,
y
,
d
y
d
x
)
d
x
I(f) = \int_{x_1}^{x_2} F(x,y,\frac{dy}{dx}) dx
I(f)=∫x1x2F(x,y,dxdy)dx
is stationary.
2. Euler-Lagrange Equations
Find y = f ( x ) y=f(x) y=f(x) such that the functional I = ∫ x 1 x 2 F ( x , y , y ′ ) d x I = \int_{x_1} ^{x_2} F(x,y,y')dx I=∫x1x2F(x,y,y′)dx is stationary. Boundary conditions: y ( x 1 ) = y 1 , y ( x 2 ) = y 2 y(x_1) = y_1, y(x_2)=y_2 y(x1)=y1,y(x2)=y2
Derivation: Suppose y ( x ) y(x) y(x) (a.k.a. Extremal) makes I I I stationary and satisfies the above boundary conditions.
- (Implicit: all the functions talked below has 2 n d 2^{nd} 2nd derivative)
- Introduce a function η ( x ) \eta(x) η(x), which means the small change applied to y ( x ) y(x) y(x), the only condition on η ( ⋅ ) \eta(\cdot) η(⋅) is η ( x 1 ) = η ( x 2 ) = 0 \eta(x_1) = \eta(x_2) = 0 η(x1)=η(x2)=0 to satisfy the boundary condition. At other locations between ( x 1 , x 2 ) (x_1, x_2) (x1,x2), η ( ⋅ ) \eta(\cdot) η(⋅) is arbitrary function
- Define y ˉ ( x ) = y ( x ) + ε η ( x ) \bar{y}(x) = y(x) + \varepsilon \eta(x) yˉ(x)=y(x)+εη(x)
- Then the problems was converted to
I ( ε ) = ∫ x 1 x 2 F ( x , y ˉ , y ′ ˉ ) d x I(\varepsilon) = \int_{x_1}^{x_2} F(x,\bar{y},\bar{y'}) dx I(ε)=∫x1x2F(x,yˉ,y′ˉ)dx
that’s just a regular single variable integration, set d I d ε ∣ ε = 0 = 0 \frac{dI}{d\varepsilon} |_{\varepsilon=0} = 0 dεdI∣ε=0=0
Why ε = 0 \varepsilon=0 ε=0? Because only when ε = 0 → y ˉ = y \varepsilon = 0 \rightarrow \bar{y} = y ε=0→yˉ=y, which is the extremal, can I ( ε ) I(\varepsilon) I(ε) get to stationary point. - Now we have
d d ε ∣ ε = 0 ∫ x 1 x 2 F ( x , y ˉ , y ˉ ′ ) d x = 0 ∫ x 1 x 2 ∂ ∂ ε F ( x , y ˉ , y ˉ ′ ) ∣ ε = 0 d x = 0 ∫ x 1 x 2 [ ∂ F ∂ y ˉ ∂ y ˉ ∂ ε + ∂ F ∂ y ˉ ′ ∂ y ˉ ′ ∂ ε ] ∣ ε = 0 d x = 0 \begin{aligned} \frac{d}{d\varepsilon} |_{\varepsilon=0} \int_{x_1}^{x_2} F(x,\bar{y},\bar{y}')dx &= 0 \\ \int_{x_1}^{x_2} \frac{\partial}{\partial \varepsilon} F(x,\bar{y},\bar{y}')|_{\varepsilon=0} dx &= 0 \\ \int_{x_1}^{x_2} [\frac{\partial F}{\partial \bar{y}} \frac{\partial \bar{y}}{\partial \varepsilon} + \frac{\partial F}{\partial \bar{y}'} \frac{\partial \bar{y}'}{\partial \varepsilon}] |_{\varepsilon = 0} dx &= 0 \end{aligned} dεd∣ε=0∫x1x2F(x,yˉ,yˉ′)dx∫x1x2∂ε∂F(x,yˉ,yˉ′)∣ε=0dx∫x1x2[∂yˉ∂F∂ε∂yˉ+∂yˉ′∂F∂ε∂yˉ′]∣ε=0dx=0=0=0
Because
∂
y
ˉ
∂
ε
=
η
\frac{\partial \bar{y}}{\partial \varepsilon} = \eta
∂ε∂yˉ=η
∂
y
ˉ
′
∂
ε
=
η
′
\frac{\partial \bar{y}'}{\partial \varepsilon} = \eta'
∂ε∂yˉ′=η′
We can have
∫
x
1
x
2
[
∂
F
∂
y
ˉ
η
+
∂
F
∂
y
ˉ
′
η
′
]
∣
ε
=
0
d
x
=
0
\begin{aligned} \int_{x_1}^{x_2} [\frac{\partial F}{\partial \bar{y}} \eta + \frac{\partial F}{\partial \bar{y}'} \eta'] |_{\varepsilon = 0} dx &= 0 \end{aligned}
∫x1x2[∂yˉ∂Fη+∂yˉ′∂Fη′]∣ε=0dx=0
Because
∫
x
1
x
2
∂
F
∂
y
ˉ
′
η
′
d
x
set:
u
=
∂
F
∂
y
ˉ
′
,
d
v
=
η
′
d
u
=
d
d
x
(
∂
F
∂
y
ˉ
′
)
,
v
=
η
∫
u
d
v
=
u
v
−
∫
v
d
u
=
∂
F
∂
y
ˉ
′
∫
x
1
x
2
η
′
d
x
−
∫
x
1
x
2
(
∫
η
′
)
d
d
x
[
∂
F
∂
y
ˉ
′
]
d
x
=
∂
F
∂
y
ˉ
′
η
∣
x
1
x
2
−
∫
x
1
x
2
η
d
d
x
[
∂
F
∂
y
ˉ
′
]
d
x
=
−
∫
x
1
x
2
η
d
d
x
[
∂
F
∂
y
ˉ
′
]
d
x
\begin{aligned} &\int_{x_1}^{x_2} \frac{\partial F}{\partial \bar{y}'} \eta' dx \\ \text{set:} & \\ &u=\frac{\partial F}{\partial \bar{y}'}, dv = \eta'\\ &du = \frac{d}{dx}(\frac{\partial F}{\partial \bar{y}'}), v =\eta \\ & \int udv = uv - \int v du \\ = &\frac{\partial F}{\partial \bar{y}'} \int_{x_1}^{x_2} \eta' dx - \int_{x_1}^{x_2} (\int \eta') \frac{d}{dx}[\frac{\partial F}{\partial \bar{y}'}]dx \\ = & \frac{\partial F}{\partial \bar{y}'} \eta |^{x_2}_{x_1} - \int_{x_1}^{x_2} \eta \frac{d}{dx}[\frac{\partial F}{\partial \bar{y}'}]dx \\ = & - \int_{x_1}^{x_2} \eta \frac{d}{dx}[\frac{\partial F}{\partial \bar{y}'}]dx \\ \end{aligned}
set:===∫x1x2∂yˉ′∂Fη′dxu=∂yˉ′∂F,dv=η′du=dxd(∂yˉ′∂F),v=η∫udv=uv−∫vdu∂yˉ′∂F∫x1x2η′dx−∫x1x2(∫η′)dxd[∂yˉ′∂F]dx∂yˉ′∂Fη∣x1x2−∫x1x2ηdxd[∂yˉ′∂F]dx−∫x1x2ηdxd[∂yˉ′∂F]dx
Due to
y
=
y
ˉ
y = \bar{y}
y=yˉ when
ε
=
0
\varepsilon = 0
ε=0, we end up with
d
I
d
ε
=
∫
x
1
x
2
[
∂
F
∂
y
ˉ
−
d
d
x
[
∂
F
∂
y
ˉ
′
]
]
η
d
x
=
∫
x
1
x
2
[
∂
F
∂
y
−
d
d
x
[
∂
F
∂
y
′
]
]
η
d
x
=
0
⟶
∂
F
∂
y
−
d
d
x
[
∂
F
∂
y
′
]
=
0
\begin{aligned} \frac{dI}{d\varepsilon} &= \int_{x_1}^{x_2} [ \frac{\partial F}{\partial \bar{y}} - \frac{d}{dx}[\frac{\partial F}{\partial \bar{y}'}] ] \eta dx \\ &= \int_{x_1}^{x_2} [ \frac{\partial F}{\partial y} - \frac{d}{dx}[\frac{\partial F}{\partial y'}] ] \eta dx \\ &= 0 \\ \longrightarrow \frac{\partial F}{\partial y} - \frac{d}{dx} [\frac{\partial F}{\partial y'}] &= 0 \end{aligned}
dεdI⟶∂y∂F−dxd[∂y′∂F]=∫x1x2[∂yˉ∂F−dxd[∂yˉ′∂F]]ηdx=∫x1x2[∂y∂F−dxd[∂y′∂F]]ηdx=0=0
Remark: Euler-Lagrange Equation is a necessary condition rather than a sufficient one. It doesn’t tell you whether it’s maximum or minimum.