Variational gradient #
Definition of variational gradient that allows for formal treatement of variational calculus as used in physics textbooks.
Function grad
is variational gradient of functional S
at point u
.
This formalizes the notion of variational gradient δS/δu
of a functional S
at a point u
.
However, it is not defined for a functional S : (X → U) → ℝ
but rather for the function
S' : (X → U) → (X → ℝ)
which is related to the usual functional as S u = ∫ x, S' (u x) x ∂μ
.
For example for action integral, S u = ∫ t, L (u t) (deriv u t)
we have
S' u t = L (u t) (deriv u t)
. Working with S'
rather than with S
allows us to ignore certain
technicalities with integrability.
Examples:
Euler-Lagrange equations:
δ/δx ∫ L(x,ẋ) dt = ∂L/∂ x - d/dt (∂L/∂ẋ)
can be expressed as
HasVarGradientAt
(fun u t => L (u t) (deriv u t))
(fun t =>
deriv (L · (deriv u t)) ((u t))
-
deriv (fun t' => deriv (L (u t') ·) (deriv u t')) t)
u
Laplace equation is variational gradient of Dirichlet energy:
δ/δu ∫ 1/2*‖∇u‖² = - Δu
can be expressed as
HasVarGradientAt
(fun u t => 1/2 * deriv u t^2)
(fun t => - deriv (deriv u) t)
u
- intro {X : Type u_1} [NormedAddCommGroup X] [NormedSpace ℝ X] [MeasureTheory.MeasureSpace X] {U : Type u_2} [NormedAddCommGroup U] [NormedSpace ℝ U] [InnerProductSpace' ℝ U] {F : (X → U) → X → ℝ} {grad u : X → U} (F' : (X → ℝ) → X → U) (hF' : HasVarAdjDerivAt F F' u) (hgrad : grad = F' fun (x : X) => 1) : HasVarGradientAt F grad u
Instances For
The variational gradient of a function F : (X → U) → (X → ℝ)
evaulated
at a function u : X → U
.
This not defined defined for a functional S : (X → U) → ℝ
but rather for the function
F : (X → U) → (X → ℝ)
which is the integrand of the functional S u = ∫ x, F (u x) x ∂μ
.
For example for action integral, S u = ∫ t, L (u t) (deriv u t)
we have
S' u t = L (u t) (deriv u t)
.
On functions F : (X → U) → (X → ℝ)
which do not have a variational gradient,
this function is defined to give 0
.
Equations
- varGradient F u = if h : ∃ (grad : X → U), HasVarGradientAt F grad u then Classical.choose h else 0
Instances For
The variational gradient of a function F : (X → U) → (X → ℝ)
evaulated
at a function u : X → U
.
This not defined defined for a functional S : (X → U) → ℝ
but rather for the function
F : (X → U) → (X → ℝ)
which is the integrand of the functional S u = ∫ x, F (u x) x ∂μ
.
For example for action integral, S u = ∫ t, L (u t) (deriv u t)
we have
S' u t = L (u t) (deriv u t)
.
On functions F : (X → U) → (X → ℝ)
which do not have a variational gradient,
this function is defined to give 0
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The variational gradient of a function F : (X → U) → (X → ℝ)
evaulated
at a function u : X → U
.
This not defined defined for a functional S : (X → U) → ℝ
but rather for the function
F : (X → U) → (X → ℝ)
which is the integrand of the functional S u = ∫ x, F (u x) x ∂μ
.
For example for action integral, S u = ∫ t, L (u t) (deriv u t)
we have
S' u t = L (u t) (deriv u t)
.
On functions F : (X → U) → (X → ℝ)
which do not have a variational gradient,
this function is defined to give 0
.
Equations
- One or more equations did not get rendered due to their size.