Multivariable Calculus – How to Take a Partial Derivative of a Sum of Functions

euler-lagrange-equationmultivariable-calculuspartial derivativephysics

I'm trying to derive the Euler-Lagrange equation from the path of least action $A$

$$A = \int_{t_{0}}^{t_1}L(x,\dot x)dt$$
and
$$\int L dt=\sum L\Delta t$$

we can replace $\dot x$ with $\frac{x_{n+1}-x_{n}}{\Delta t}$ and $x$ with $\frac{x_{n}+x_{n+1}}{2}$, so

$$A = \sum_n L\bigg(\frac{x_{n+1}-x_{n}}{\Delta t},\frac{x_{n}+x_{n+1}}{2}\bigg)\Delta t$$

if we want to take the partial derivative of $A$ with respect to $x_n$ we will only have to look at the last two terms of the sum because those are the only terms that contain $x_n$. In the example, we are taking the partial derivative of $A$ with respect to $x_8$ so it looks like this:

$$\frac{\partial A}{\partial x_8} = \frac{\partial}{\partial x_8}\biggr (L\bigg(\frac{x_{9}-x_{8}}{\Delta t},\frac{x_{8}+x_{9}}{2}\bigg)\Delta t + L\bigg(\frac{x_{8}-x_{7}}{\Delta t},\frac{x_{7}+x_{8}}{2}\bigg)\Delta t \biggr )$$

how do you even approach this? The answer seems to be

$$\frac{\partial A}{\partial x_8} = \frac {1}{\Delta t} \bigg (-\frac {\partial L}{\partial \dot x}\bigg |_{n=9}+\frac {\partial L}{\partial \dot x}\bigg |_{n=8}\bigg )+ \frac {1}{2}\bigg(\frac {\partial L}{\partial x}\bigg |_{n=8}+\frac {\partial L}{\partial x}\bigg |_{n=9}\bigg )$$

I've tried rearranging this to make it
$$\frac{\partial A}{\partial x_8} = \bigg(\frac{-\frac {\partial L}{\partial \dot x}\bigg |_{n=9}}{\Delta t}+\frac{\frac {\partial L}{\partial x}\bigg |_{n=9}}{2}\bigg ) + \bigg(\frac{\frac {\partial L}{\partial \dot x}\bigg |_{n=8}}{\Delta t}+\frac{\frac {\partial L}{\partial x}\bigg |_{n=8}}{2}\bigg )$$

but still had no luck in finding the answer. Why do we solve for n=9 when we are differentiating by $x_8$? and why are $\Delta t$ and $2$ the outside of the 'solve'?

Best Answer

I think it is simply the chain rule that says that \begin{equation} \frac{\partial}{\partial x_k}\left(L(u(x_1, \ldots ,x_n), v(x_1,\ldots,x_n))\right) = \frac{\partial u}{\partial x_k}\frac{\partial L}{\partial x}(u, v) + \frac{\partial v}{\partial x_k}\frac{\partial L}{\partial \dot x}(u, v) \end{equation} in your case, with $u(x_1,\ldots, x_n) = \displaystyle \frac{x_9+x_8}{2}$ and $v(x_1,\ldots, x_n) = \displaystyle \frac{x_9-x_8}{\Delta t}$, it gives \begin{equation} \frac{\partial u}{\partial x_8} = \frac{1}{2} \qquad \frac{\partial v}{\partial x_8} = -\frac{1}{\Delta t} \end{equation} It also seems that some signs are wrong in your formula.