# Vanishing First Variational Derivative implies Euler's Equation for Vanishing Variation

## Theorem

Let $y \left({x}\right)$ be a real function such that $y \left({a}\right) = A$ and $y \left({b}\right) = B$

Let $J \left[{y}\right]$ be a functional of the form:

$\displaystyle J \left[{y}\right] = \int_a^b F \left({x, y, y'}\right) \rd x$

Then:

$\dfrac {\delta J} {\delta y} = 0 \implies F_y - \dfrac \d {\d x} F_{y'} = 0$

## Proof

The method of finite differences will be used here.

Consider a closed real interval $\left[{a \,.\,.\, b}\right]$, which is divided in $n + 1$ equal parts.

Choose its subdivision to be normal:

$a = x_0 < x_1 < \cdots < x_n < x_{n + 1} = b$

such that for $i \in \left\{ {0, 1, \ldots, n - 1, n}\right\}$ we have $x_{i + 1} - x_i = \Delta x$.

Approximate the desired function $y$ by a polygonal line with vertices $\left({x_i, y_i}\right)$ where $i \in \left\{ {0, 1, \ldots, n, n + 1}\right\}$, where $y_i = y \left({x_i}\right)$.

Hence, the functional $J \left[{y}\right]$ can be approximated by the following sum:

$\displaystyle \mathscr J \left({y_1, y_2, \ldots, y_{n - 1}, y_n}\right) = \sum_{i \mathop = 0}^n F \left({x_i, y_i, \frac{y_{i + 1} - y_i} {\Delta x} }\right) \Delta x$

Note that the values $y \left({x_0}\right) = A$ and $y \left({x_1}\right) = B$ are fixed, and therefore not varied.

Now, consider a partial derivative of $J$ with respect to $y_k$, where $k \in \left\{{1, 2, \ldots, n-1, n}\right\}$.

 $\displaystyle \frac{ \partial \mathscr{ J } }{ \partial y_k }$ $=$ $\displaystyle \frac{ \partial }{ \partial{ y_k } } \sum_{ i=0 }^{ n } F\left(x_i, y_i, \frac{ y_{ i+1 }-y_i }{ \Delta x } \right)\Delta x$ $\displaystyle$ $=$ $\displaystyle \sum_{ i=0 }^{ n } \frac{ \partial }{ \partial{ y_k } } F\left(x_i, y_i, \frac{ y_{ i+1 }-y_i }{ \Delta x } \right)\Delta x$ $\displaystyle$ $=$ $\displaystyle \sum_{ i=0 }^{ n }\left[ \frac{\partial{ F } }{ \partial{ y_i } }\left(x_i, y_i, \frac{ y_{ i+1 }-y_i }{ \Delta x } \right)\frac{ \partial{y_i} }{ \partial{ y_k } }+\frac{ \partial{ F } }{ \partial{ \frac{ y_{i+1}-y_i }{ \Delta x } } } \left(x_i, y_i, \frac{ y_{ i+1 }-y_i }{ \Delta x } \right) \frac{ \partial{ \frac{ y_{i+1}-y_i }{ \Delta x } } }{ \partial{ y_k } } \right]\Delta x$

Since all the functions $y_i$ are independent w.r.t each other, we have $\frac{ \partial{y_m} }{ \partial{y_k} }=\delta_{mk}$, where $\delta_{mk}$ is Kronecker Delta.

Then, the aforementioned sum simplifies to

$\displaystyle \frac{ \partial \mathscr{ J } }{ \partial y_k }= \left[ \frac{\partial{ F } }{ \partial{ y_k } }\left(x_k, y_k, \frac{ y_{ k+1 }-y_k }{ \Delta x } \right)+\frac{ \partial{ F } }{ \partial{ \frac{ y_k-y_{k-1} }{ \Delta x } } } \left(x_{k-1}, y_{k-1}, \frac{ y_{ k }-y_{k-1} }{ \Delta x } \right) \frac{ 1 }{ \Delta x } - \frac{ \partial{ F } }{ \partial{ \frac{ y_{k+1}-y_k }{ \Delta x } } } \left(x_k, y_k, \frac{ y_{ k+1 }-y_k }{ \Delta x } \right) \frac{ 1 }{ \Delta x }\right]\Delta x$

In order to get a variational derivative, the denominator of the left hand side has to represent an area.

For this reason, divide everything by $\Delta x$, and take the limit $\Delta\to 0$. Then for all $k\in\left\{1, 2, ..., n-1, n\right\}$

 $\displaystyle \lim_{\Delta x\to 0}\frac{ y_{k+1}-y_k }{ \Delta x }$ $=$ $\displaystyle \lim_{\Delta x\to 0} \frac{ y(x_{k+1})-y(x_k) }{ \Delta x }$ $\displaystyle$ $=$ $\displaystyle \lim_{\Delta x\to 0} \frac{ y(x_k+\Delta x)-y(x_k) }{ \Delta x }$ $\displaystyle$ $=$ $\displaystyle y'(x_k)$ Definition of a derivative

Similarly, for $F(x, y, y')$ we have

 $\displaystyle \lim_{\Delta x\to 0}\frac{ F_{y'(x_k)}\left( x_k, y_k, y'(x_k) \right)-F_{y'(x_{k-1})}(x_{k-1},y_{k-1},y'(x_{k-1})) }{ \Delta x }$ $=$ $\displaystyle \lim_{\Delta x\to 0}\frac{ F_{y'(x_{k-1}+\Delta x)}\left( x_{k-1}+\Delta x, y(x_{k-1}+\Delta x), y'(x_{k-1}+\Delta x) \right)-F_{y'(x_{k-1})}\left(x_{k-1},y(x_{k-1}),y'(x_{k-1})\right) }{ \Delta x }$ $\displaystyle$ $=$ $\displaystyle \frac \d {\d x} F_{y'(x_{k-1})} \left(x_{k-1}, y(x_{k-1}), y'(x_{k-1})\right)$

Thus,

$\displaystyle \lim_{\Delta x\to 0}\frac{ \partial{\mathscr{J} } }{ \partial{y_k}\Delta x }=F_{y(x_k)}\left(x_k, y(x_k), y'(x_k) \right) - \frac \d {\d x} F_{y'(x_{k-1})} \left(x_{k-1}, y(x_{k-1}), y'(x_{k-1})\right)$

Note that the denominator on the left is an area covered by a rectangle with sides $\Delta x$ and $\partial{y}$, and vanishes as $\Delta x\to 0$.

Finally, since the distance between any two neighbouring points approaches 0 as $\Delta x\to 0$,

the set of all $x_k\in\left[{{a}\,.\,.\,{b}}\right]$ can be treated as continuous, and the index $k$ dropped:

$\displaystyle \lim_{\Delta x\to 0}\frac{ \partial{J } }{ \partial{y}\Delta x } = F_{y \left({x}\right)}\left(x, y \left({x}\right), y' \left({x}\right) \right) - \frac \d {\d x} F_{y' \left({x}\right)} \left(x, y \left({x}\right), y' \left({x}\right)\right)$

The left hand side by definition is a variational derivative.

Suppose the left hand side vanishes.

Then the right hand side vanishes as well.