Theorem (Euler-Lagrange Equation).
For a functional of the form
$$\int L(x, y, z, x^{'}, y^{'}, z^{'}) \ \mathrm{d}s,$$the path that minimizes/maximizes the integral is determined by the following equations:
$$\frac{d}{ds}\left(\frac{\partial L}{\partial x'}\right) - \frac{\partial L}{\partial x} = 0 \quad \text{(and similarly for } y, z\text{)}.$$- Two cases (hopefully, at least… I might have to update this as time goes on):
- Easy case: The path is parametrized in terms of the arc length, $s$, so that $L(\mathbf{r}) \coloneqq \langle x(s), y(s), z(s)\rangle$
- Since $\left(\frac{\mathrm{d}x}{\mathrm{d}s}\right)^2 + \left(\frac{\mathrm{d}y}{\mathrm{d}s}\right)^2 + \left(\frac{\mathrm{d}z}{\mathrm{d}s}\right)^2 = 1$, which implies $|\mathrm{d}\mathbf{r}| = ds$
- Thus, $L = n(\mathbf{r})$ with no velocity dependence. However, the arc-length constraint must still be accounted for (typically via Lagrange multipliers), and the EL equations yield the ray equations: $\frac{d}{ds}\left(n\frac{d\mathbf{r}}{ds}\right) = \nabla n$
- Hard case: The path is parametrized in terms of an arbitrary parameter (e.g., $t$ instead of $s$)
- The Lagrangian includes the speed factor: $L = n(\mathbf{r}(t))\sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2 + \left(\frac{dz}{dt}\right)^2}$, making the EL equations more complex due to the velocity dependence, though the resulting ray path is the same
- Easy case: The path is parametrized in terms of the arc length, $s$, so that $L(\mathbf{r}) \coloneqq \langle x(s), y(s), z(s)\rangle$