P r o j e c t s


          N o t e s



         I n f o r m a t i o n
         g i t h u b









Euler-Lagrange Equation



    This equation is useful when finding the critical point of the integral equation.
    Suppose that `y(x)` passes through the points `(x_1, y_1)` and `(x_2, y_2)` and it is a continuously differentiable function in `[x_1, x_2]`. We want to find `min int_{x_1}^{x_2}y(x)dx` or `max int_{x_1}^{x_2}y(x)dx`.

Step 1. Define the extreme value `F(y)`.

    Introducing a path function `f` which consists of `y(x)` and `y prime (x)`, `F(y)` can be defined by
\begin{align} F(y)= \int_{x_1}^{x_2} f(y(x), y^{\prime}(x), x) dx. \end{align}
    This function `F` assumes that `y` is the extreme value when it follows the path function `f`.



    Now, consider `F(y+\delta y)` near the extreme value `F(y)` with the same start and end points. Then it represents another path function `f` which consists of `y(x)+\delta y(x)` and `y prime (x)+\delta y prime (x)`. By Taylor Theorem, 
\begin{align} F(y+\delta y) &= \int_{x_1}^{x_2} f(y(x)+\delta y(x), y^{\prime}(x)+\delta y^{\prime}(x), x)dx \\ & \approx 
\int_{x_1}^{x_2} f(y(x), y^{\prime}(x), x) + f_y \delta y + f_{y^{\prime}}\delta y^{\prime} + f_x 0\  dx \\ &=
F(y) + \int_{x_1}^{x_2} f_y \delta y + f_{y^{\prime}}\delta y^{\prime} dx
\end{align}
    It yields the following `delta F`,
\begin{align} \delta F= F(y+\delta y) - F(y) \approx
\int_{x_1}^{x_2}f_y \delta y + f_{y^{\prime}}\delta y^{\prime} dx
\end{align}

Step 2. Apply the integration by parts to `delta F`.

    The second part of `delta F` can be modified using the integration by parts. 
\begin{align} \int_{x_1}^{x_2} f_{y^{\prime}}\delta y^{\prime} dx = \left[ f_{y^{\prime}}\delta y \right]_{x_1}^{x_2} - \int_{x_1}^{x_2}\frac{d}{dx} \left( f_{y^{\prime}}\right) \delta y\  dx =  - \int_{x_1}^{x_2}\frac{d}{dx} \left( f_{y^{\prime}}\right) \delta y\  dx
\end{align}
    This is because that `delta y(x_1)=delta y(x_2)=0` since `f(y(x), y prime (x), x)` and `f(y(x)+delta y(x), y prime (x) + delta y prime (x), x)` have the same start and end points. Therefore, `delta F` is rewritten as
\begin{align} \delta F \approx
\int_{x_1}^{x_2} \left( f_y - \frac{d}{dx} f_{y^{\prime}} \right) \delta y\  dx
\end{align}

Step 3. Use the fact that `delta F(y)=0`.


    Since `F(y)` is the extreme value, `delta F(y)=0` for the small enough `delta y`. Therefore, it leads to 
\begin{gather} \delta F \approx
\int_{x_1}^{x_2} \left( f_y - \frac{d}{dx} f_{y^{\prime}} \right)\delta y\  dx = 0, \\
\color{red}{f_y - \frac{d}{dx} f_{y^{\prime}} = 0}
\end{gather}
    which is called Euler-Lagrange equation.


Example.  Find the smallest distance between `(x_1, y_1)` and `(x_2, y_2)` points.

    It is to find the smallest path among all the possible paths. From the step 1,
\begin{align} \min \int_{x_1}^{x_2} \sqrt{(dx)^2+(dy)^2} = \min \int_{x_1}^{x_2} \sqrt{1+y^{\prime 2}} dx = F(y). \end{align}
    Now, step 2 and step 3 lead to the following Euler-Lagrange eqation.
\begin{align} & f_y - \frac{d}{dx} f_{y^{\prime}} = 0 - \frac{d}{dx}\left( \frac{y^{\prime}}{\sqrt{1+y^{\prime 2}}} \right) = 0 \\ & \Rightarrow  \frac{y^{\prime}}{\sqrt{1+y^{\prime 2}}} = C \\  & \Rightarrow y^{\prime} = \pm \sqrt{\frac{C^2}{1-C^2}}
\end{align}
    where `C in mathbb{R}`. It means that `y` is of form `ax+b` for `a, b in mathbb{R}`, and `y prime=a=frac{y_2-y_1}{x_2-x_1}`. Therefore, 
\begin{align} F(y) &= \min \int_{x_1}^{x_2} \sqrt{1+y^{\prime 2}} dx = \int_{x_1}^{x_2} \sqrt{1+a^2} dx =  \sqrt{1+a^2}(x_2-x_1) \\ \\ &= 
\sqrt{1+ \frac{(y_2-y_1)^2}{(x_2-x_1)^2}}(x_2-x_1)=
\sqrt{ (x_2-x_1)^2 + (y_2-y_1)^2}
\end{align}
    This result is right because Euclidean distance is the smallest one between `(x_1, y_1)` and `(x_2, y_2)` points.



emoy.net
Mark