It is straightforward to extend the necessary condition (2.18) to the multiple-degrees-of-freedom setting, in which . The same derivation is valid, provided that and are interpreted as gradient vectors of with respect to and , respectively, and by products of vector quantities (such as ) one means inner products in . The result is the same Euler-Lagrange equation (2.18), which is now perhaps easier to apply and interpret if it is written componentwise:
Returning to the single-degree-of-freedom case, let us examine more carefully under what differentiability assumptions our derivation of the Euler-Lagrange equation is valid. We applied Lemma 2.1 to the function given by the expression inside the large parentheses in (2.16), whose second term is shown in more detail in (2.19). In the lemma, must be continuous. The appearance of second-order partial derivatives of in (2.19) suggests that we should assume . Somewhat more alarmingly, the presence of the term indicates that we should assume , and not merely as in our original formulation of the Basic Calculus of Variations Problem. Fortunately, we can avoid making this assumption if we proceed more carefully, as follows. Let us apply integration by parts to the first term rather than the second term on the right-hand side of (2.14):
From (2.22) and Lemma 2.2 we obtain that along an optimal curve we must have
It can be shown that the Euler-Lagrange equation is invariant under arbitrary changes of coordinates, i.e., it takes the same form in every coordinate system. This allows one to pick convenient coordinates when studying a specific problem. For example, in certain mechanical problems it is natural to use polar coordinates; we will come across such a case in Section 2.4.3.