From 16555851b6514a736c5c9d8e73de7da7fc9b6288 Mon Sep 17 00:00:00 2001 From: Prefetch Date: Thu, 20 Oct 2022 18:25:31 +0200 Subject: Migrate from 'jekyll-katex' to 'kramdown-math-sskatex' --- .../know/concept/calculus-of-variations/index.md | 130 ++++++++++----------- 1 file changed, 65 insertions(+), 65 deletions(-) (limited to 'source/know/concept/calculus-of-variations') diff --git a/source/know/concept/calculus-of-variations/index.md b/source/know/concept/calculus-of-variations/index.md index 0b1d070..7701358 100644 --- a/source/know/concept/calculus-of-variations/index.md +++ b/source/know/concept/calculus-of-variations/index.md @@ -11,24 +11,24 @@ layout: "concept" The **calculus of variations** lays the mathematical groundwork for [Lagrangian mechanics](/know/concept/lagrangian-mechanics/). -Consider a **functional** $J$, mapping a function $f(x)$ to a scalar value -by integrating over the so-called **Lagrangian** $L$, -which represents an expression involving $x$, $f$ and the derivative $f'$: +Consider a **functional** $$J$$, mapping a function $$f(x)$$ to a scalar value +by integrating over the so-called **Lagrangian** $$L$$, +which represents an expression involving $$x$$, $$f$$ and the derivative $$f'$$: $$\begin{aligned} J[f] = \int_{x_0}^{x_1} L(f, f', x) \dd{x} \end{aligned}$$ -If $J$ in some way measures the physical "cost" (e.g. energy) of -the path $f(x)$ taken by a physical system, -the **principle of least action** states that $f$ will be a minimum of $J[f]$, +If $$J$$ in some way measures the physical "cost" (e.g. energy) of +the path $$f(x)$$ taken by a physical system, +the **principle of least action** states that $$f$$ will be a minimum of $$J[f]$$, so for example the expended energy will be minimized. In practice, various cost metrics may be used, -so maxima of $J[f]$ are also interesting to us. +so maxima of $$J[f]$$ are also interesting to us. -If $f(x, \varepsilon\!=\!0)$ is the optimal route, then a slightly +If $$f(x, \varepsilon\!=\!0)$$ is the optimal route, then a slightly different (and therefore worse) path between the same two points can be expressed -using the parameter $\varepsilon$: +using the parameter $$\varepsilon$$: $$\begin{aligned} f(x, \varepsilon) = f(x, 0) + \varepsilon \eta(x) @@ -36,19 +36,19 @@ $$\begin{aligned} \delta f = \varepsilon \eta(x) \end{aligned}$$ -Where $\eta(x)$ is an arbitrary differentiable deviation. -Since $f(x, \varepsilon)$ must start and end in the same points as $f(x,0)$, +Where $$\eta(x)$$ is an arbitrary differentiable deviation. +Since $$f(x, \varepsilon)$$ must start and end in the same points as $$f(x,0)$$, we have the boundary conditions: $$\begin{aligned} \eta(x_0) = \eta(x_1) = 0 \end{aligned}$$ -Given $L$, the goal is to find an equation for the optimal path $f(x,0)$. +Given $$L$$, the goal is to find an equation for the optimal path $$f(x,0)$$. Just like when finding the minimum of a real function, -the minimum $f$ of a functional $J[f]$ is a stationary point -with respect to the deviation weight $\varepsilon$, -a condition often written as $\delta J = 0$. +the minimum $$f$$ of a functional $$J[f]$$ is a stationary point +with respect to the deviation weight $$\varepsilon$$, +a condition often written as $$\delta J = 0$$. In the following, the integration limits have been omitted: $$\begin{aligned} @@ -63,14 +63,14 @@ $$\begin{aligned} \end{aligned}$$ The boundary term from partial integration vanishes due to the boundary -conditions for $\eta(x)$. We are thus left with: +conditions for $$\eta(x)$$. We are thus left with: $$\begin{aligned} 0 = \int \eta \bigg( \pdv{L}{f} - \dv{}{x}\Big( \pdv{L}{f'} \Big) \bigg) \dd{x} \end{aligned}$$ -This holds for all $\eta$, but $\eta$ is arbitrary, so in fact +This holds for all $$\eta$$, but $$\eta$$ is arbitrary, so in fact only the parenthesized expression matters: $$\begin{aligned} @@ -79,27 +79,27 @@ $$\begin{aligned} } \end{aligned}$$ -This is known as the **Euler-Lagrange equation** of the Lagrangian $L$, -and its solutions represent the optimal paths $f(x, 0)$. +This is known as the **Euler-Lagrange equation** of the Lagrangian $$L$$, +and its solutions represent the optimal paths $$f(x, 0)$$. ## Multiple functions -Suppose that the Lagrangian $L$ depends on multiple independent functions -$f_1, f_2, ..., f_N$: +Suppose that the Lagrangian $$L$$ depends on multiple independent functions +$$f_1, f_2, ..., f_N$$: $$\begin{aligned} J[f_1, ..., f_N] = \int_{x_0}^{x_1} L(f_1, ..., f_N, f_1', ..., f_N', x) \dd{x} \end{aligned}$$ -In this case, every $f_n(x)$ has its own deviation $\eta_n(x)$, -satisfying $\eta_n(x_0) = \eta_n(x_1) = 0$: +In this case, every $$f_n(x)$$ has its own deviation $$\eta_n(x)$$, +satisfying $$\eta_n(x_0) = \eta_n(x_1) = 0$$: $$\begin{aligned} f_n(x, \varepsilon) = f_n(x, 0) + \varepsilon \eta_n(x) \end{aligned}$$ -The derivation procedure is identical to the case $N = 1$ from earlier: +The derivation procedure is identical to the case $$N = 1$$ from earlier: $$\begin{aligned} 0 @@ -113,8 +113,8 @@ $$\begin{aligned} + \int \sum_{n} \eta_n \bigg( \pdv{L}{f_n} - \dv{}{x}\Big( \pdv{L}{f_n'} \Big) \bigg) \dd{x} \end{aligned}$$ -Once again, $\eta_n(x)$ is arbitrary and disappears at the boundaries, -so we end up with $N$ equations of the same form as for a single function: +Once again, $$\eta_n(x)$$ is arbitrary and disappears at the boundaries, +so we end up with $$N$$ equations of the same form as for a single function: $$\begin{aligned} \boxed{ @@ -127,7 +127,7 @@ $$\begin{aligned} ## Higher-order derivatives -Suppose that the Lagrangian $L$ depends on multiple derivatives of $f(x)$: +Suppose that the Lagrangian $$L$$ depends on multiple derivatives of $$f(x)$$: $$\begin{aligned} J[f] = \int_{x_0}^{x_1} L(f, f', f'', ..., f^{(N)}, x) \dd{x} @@ -144,9 +144,9 @@ $$\begin{aligned} &= \int \pdv{L}{f} \eta + \sum_{n} \pdv{L}{f^{(n)}} \eta^{(n)} \dd{x} \end{aligned}$$ -The goal is to turn each $\eta^{(n)}(x)$ into $\eta(x)$, so we need to -partially integrate the $n$th term of the sum $n$ times. In this case, -we will need some additional boundary conditions for $\eta(x)$: +The goal is to turn each $$\eta^{(n)}(x)$$ into $$\eta(x)$$, so we need to +partially integrate the $$n$$th term of the sum $$n$$ times. In this case, +we will need some additional boundary conditions for $$\eta(x)$$: $$\begin{aligned} \eta'(x_0) = \eta'(x_1) = 0 @@ -161,7 +161,7 @@ $$\begin{aligned} &= \int \eta \bigg( \pdv{L}{f} + \sum_{n} (-1)^n \dvn{n}{}{x}\Big( \pdv{L}{f^{(n)}} \Big) \bigg) \dd{x} \end{aligned}$$ -Once again, because $\eta(x)$ is arbitrary, the Euler-Lagrange equation becomes: +Once again, because $$\eta(x)$$ is arbitrary, the Euler-Lagrange equation becomes: $$\begin{aligned} \boxed{ @@ -172,16 +172,16 @@ $$\begin{aligned} ## Multiple coordinates -Suppose now that $f$ is a function of multiple variables. -For brevity, we only consider two variables $x$ and $y$, +Suppose now that $$f$$ is a function of multiple variables. +For brevity, we only consider two variables $$x$$ and $$y$$, but the results generalize effortlessly to larger amounts. -The Lagrangian now depends on all the partial derivatives of $f(x, y)$: +The Lagrangian now depends on all the partial derivatives of $$f(x, y)$$: $$\begin{aligned} J[f] = \iint_{(x_0, y_0)}^{(x_1, y_1)} L(f, f_x, f_y, x, y) \dd{x} \dd{y} \end{aligned}$$ -The arbitrary deviation $\eta$ is then also a function of multiple variables: +The arbitrary deviation $$\eta$$ is then also a function of multiple variables: $$\begin{aligned} f(x, y; \varepsilon) = f(x, y; 0) + \varepsilon \eta(x, y) @@ -199,7 +199,7 @@ $$\begin{aligned} &= \iint \pdv{L}{f} \eta + \pdv{L}{f_x} \eta_x + \pdv{L}{f_y} \eta_y \dd{x} \dd{y} \end{aligned}$$ -We partially integrate for both $\eta_x$ and $\eta_y$, yielding: +We partially integrate for both $$\eta_x$$ and $$\eta_y$$, yielding: $$\begin{aligned} 0 @@ -208,7 +208,7 @@ $$\begin{aligned} &\quad + \iint \eta \bigg( \pdv{L}{f} - \dv{}{x}\Big( \pdv{L}{f_x} \Big) - \dv{}{y}\Big( \pdv{L}{f_y} \Big) \bigg) \dd{x} \dd{y} \end{aligned}$$ -But now, to eliminate these boundary terms, we need extra conditions for $\eta$: +But now, to eliminate these boundary terms, we need extra conditions for $$\eta$$: $$\begin{aligned} \forall y: \eta(x_0, y) = \eta(x_1, y) = 0 @@ -216,15 +216,15 @@ $$\begin{aligned} \forall x: \eta(x, y_0) = \eta(x, y_1) = 0 \end{aligned}$$ -In other words, the deviation $\eta$ must be zero on the whole "box". -Again relying on the fact that $\eta$ is arbitrary, the Euler-Lagrange +In other words, the deviation $$\eta$$ must be zero on the whole "box". +Again relying on the fact that $$\eta$$ is arbitrary, the Euler-Lagrange equation is: $$\begin{aligned} 0 = \pdv{L}{f} - \dv{}{x}\Big( \pdv{L}{f_x} \Big) - \dv{}{y}\Big( \pdv{L}{f_y} \Big) \end{aligned}$$ -This generalizes nicely to functions of even more variables $x_1, x_2, ..., x_N$: +This generalizes nicely to functions of even more variables $$x_1, x_2, ..., x_N$$: $$\begin{aligned} \boxed{ @@ -235,14 +235,14 @@ $$\begin{aligned} ## Constraints -So far, for multiple functions $f_1, ..., f_N$, -we have been assuming that all $f_n$ are independent, and by extension all $\eta_n$. -Suppose that we now have $M < N$ constraints $\phi_m$ -that all $f_n$ need to obey, introducing implicit dependencies between them. +So far, for multiple functions $$f_1, ..., f_N$$, +we have been assuming that all $$f_n$$ are independent, and by extension all $$\eta_n$$. +Suppose that we now have $$M < N$$ constraints $$\phi_m$$ +that all $$f_n$$ need to obey, introducing implicit dependencies between them. -Let us consider constraints $\phi_m$ of the two forms below. +Let us consider constraints $$\phi_m$$ of the two forms below. It is important that they are **holonomic**, -meaning they do not depend on any derivatives of any $f_n(x)$: +meaning they do not depend on any derivatives of any $$f_n(x)$$: $$\begin{aligned} \phi_m(f_1, ..., f_N, x) = 0 @@ -250,14 +250,14 @@ $$\begin{aligned} \int_{x_0}^{x_1} \phi_m(f_1, ..., f_N, x) \dd{x} = C_m \end{aligned}$$ -Where $C_m$ is a constant. -Note that the first form can also be used for $\phi_m = C_m \neq 0$, -by simply redefining the constraint as $\phi_m^0 = \phi_m - C_m = 0$. +Where $$C_m$$ is a constant. +Note that the first form can also be used for $$\phi_m = C_m \neq 0$$, +by simply redefining the constraint as $$\phi_m^0 = \phi_m - C_m = 0$$. -To solve this constrained optimization problem for $f_n(x)$, -we introduce [Lagrange multipliers](/know/concept/lagrange-multiplier/) $\lambda_m$. -In the former case $\lambda_m(x)$ is a function of $x$, while in the -latter case $\lambda_m$ is constant: +To solve this constrained optimization problem for $$f_n(x)$$, +we introduce [Lagrange multipliers](/know/concept/lagrange-multiplier/) $$\lambda_m$$. +In the former case $$\lambda_m(x)$$ is a function of $$x$$, while in the +latter case $$\lambda_m$$ is constant: $$\begin{aligned} \int \lambda_m(x) \: \phi_m(\{f_n\}, x) \dd{x} = 0 @@ -265,15 +265,15 @@ $$\begin{aligned} \lambda_m \int \phi_m(\{f_n\}, x) \dd{x} = \lambda_m C_m \end{aligned}$$ -The reason for this distinction in $\lambda_m$ -is that we need to find the stationary points with respect to $\varepsilon$ +The reason for this distinction in $$\lambda_m$$ +is that we need to find the stationary points with respect to $$\varepsilon$$ of both constraint types. Written in the variational form, this is: $$\begin{aligned} \delta \int \lambda_m \: \phi_m \dd{x} = 0 \end{aligned}$$ -From this, we define a new Lagrangian $\Lambda$ for the functional $J$, +From this, we define a new Lagrangian $$\Lambda$$ for the functional $$J$$, with the contraints built in: $$\begin{aligned} @@ -283,7 +283,7 @@ $$\begin{aligned} &= \int L + \sum_{m} \lambda_m \phi_m \dd{x} \end{aligned}$$ -Then we derive the Euler-Lagrange equation as usual for $\Lambda$ instead of $L$: +Then we derive the Euler-Lagrange equation as usual for $$\Lambda$$ instead of $$L$$: $$\begin{aligned} 0 @@ -297,15 +297,15 @@ $$\begin{aligned} + \int \sum_n \eta_n \bigg( \pdv{\Lambda}{f_n} - \dv{}{x}\Big( \pdv{\Lambda}{f_n'} \Big) \bigg) \dd{x} \end{aligned}$$ -Using the same logic as before, we end up with a set of Euler-Lagrange equations with $\Lambda$: +Using the same logic as before, we end up with a set of Euler-Lagrange equations with $$\Lambda$$: $$\begin{aligned} 0 = \pdv{\Lambda}{f_n} - \dv{}{x}\Big( \pdv{\Lambda}{f_n'} \Big) \end{aligned}$$ -By inserting the definition of $\Lambda$, we then get the following. -Recall that $\phi_m$ is holonomic, and thus independent of all derivatives $f_n'$: +By inserting the definition of $$\Lambda$$, we then get the following. +Recall that $$\phi_m$$ is holonomic, and thus independent of all derivatives $$f_n'$$: $$\begin{aligned} \boxed{ @@ -316,18 +316,18 @@ $$\begin{aligned} These are **Lagrange's equations of the first kind**, with their second-kind counterparts being the earlier Euler-Lagrange equations. -Note that there are $N$ separate equations, one for each $f_n$. +Note that there are $$N$$ separate equations, one for each $$f_n$$. -Due to the constraints $\phi_m$, the functions $f_n$ are not independent. -This is solved by choosing $\lambda_m$ such that $M$ of the $N$ equations hold, -i.e. solving a system of $M$ equations for $\lambda_m$: +Due to the constraints $$\phi_m$$, the functions $$f_n$$ are not independent. +This is solved by choosing $$\lambda_m$$ such that $$M$$ of the $$N$$ equations hold, +i.e. solving a system of $$M$$ equations for $$\lambda_m$$: $$\begin{aligned} \dv{}{x}\Big( \pdv{L}{f_n'} \Big) - \pdv{L}{f_n} = \sum_{m} \lambda_m \pdv{\phi_m}{f_n} \end{aligned}$$ -And then the remaining $N - M$ equations can be solved in the normal unconstrained way. +And then the remaining $$N - M$$ equations can be solved in the normal unconstrained way. -- cgit v1.2.3