I am learning calculus of variations from the chapter in Mathematical Optimization and Economic Theory by Michael D. Intriligator (1971; it's what we had on the shelf). This question concerns the calculus of variations problem in a single spatial dimension, namely, a problem in the form
$$\require{cancel} \begin{align} \operatorname{maximize}_{\{x(t)\}}& \quad J = \int_{t_0}^{t_1} I\left(x(t), \dot x(t), t\right)\,dt \\ \text{subject to} & \quad x(t_0) = x_0 \\ & \quad x(t_1) = x_1 \end{align} $$
In the first set of practice problems, the prompt is:
12-A. Find the extremals of the problem with a single state variable, $x(t)$, and check the Legendre condition where:
- $I = 4xt - \dot x^2$
- ...
The idea, if I understand it correctly, is to plug the given $I()$ into the Euler(-Lagrange) condition $$\frac{\partial I}{\partial x} - \frac{d}{dt}\left(\frac{\partial I}{\partial \dot x }\right) = 0$$ to get a differential equation that can be solved for the optimal $x(t)$. Then, use the Legendre condition $$\frac{ \partial^2 I}{\partial \dot x ^2} \leq 0$$to verify that the $x(t)$ is in fact a maximum of the functional $J$ (assuming the continuity and other necessary conditions also hold). Is this interpretation of the problem statement correct?
If so, I haven't been able to find a worked example of a problem of this type, except for the rather simple case of showing that the shortest path between two points is a straight line, in which case $I = \sqrt{1 + \dot x^2}$ and the proof is given on Wikipedia.
The difficulty for me stems from applying the operator $\frac{\partial}{\partial x}$. I understand from reading the answers to this Math SE question and a similar one on Physics SE that there is a technical sense in which $x$ and $ \dot x$ are "independent." Does this mean that any term involving the derivative of one with respect to the other is zero?
I am wary of this conclusion, because Wiki tells me that functional derivatives like these require careful derivation. Indeed, applying the independence assumption to these kinds of problem (as I do below) sure makes it look like we can solve very difficult nonlinear differential equations by simply "asserting" independence between the various orders of derivative.
Nonetheless, here's what I tried for problem 1. I am able to get a solution. However, verifying the solution requires applying the very same independence assumption, so I have no way of knowing whether it is correct.
Plugging in, we have
$$ \begin{align}0= \frac{\partial I}{\partial x} - \frac{d}{dt}\left(\frac{\partial I}{\partial \dot x }\right) &= 4t - \frac{\partial}{\partial{x}} \dot x ^2 - \frac{d}{dt}\left[ \frac{\partial}{\partial \dot x} 4xt - \frac{\partial}{\partial \dot x} \dot x^2 \right]\\ &= 4t - \frac{\partial}{\partial{x}} \dot x ^2 - \frac{d}{dt}\left[ \frac{\partial}{\partial \dot x} 4xt \right] + \frac{d}{dt}2\dot x\\ &= 4t - \cancel{\frac{\partial}{\partial{x}} \dot x ^2} -\frac{d}{dt} \cancel{\left[ \frac{\partial}{\partial \dot x} 4xt \right]} + \frac{d}{dt}2\dot x\\ &= 4t + 2\ddot x \end{align}$$ where in the third line, I have canceled the mixed derivatives to zero. We are left with the differential equation $x''(t) = -2t$ whose solutions are given by $$x(t) = -\frac{1}{3} t^3 + c_1 t + c_2$$ and it is not hard to apply the boundary condition and solve for coefficients.
But how do I verify the Legendre condition? We can see that $\dot x = -2t + c_1$, so now do I need to evaluate $$\frac{ \partial^2 I}{\partial \dot x ^2} = \frac{\partial^2}{\partial(2t + c_1)^2} \left[ 4 \left(-\frac{1}{3} t^3 + c_1 t + c_2\right) t - (2t + c_1)^2 \right]$$ somehow? No, I am probably supposed to apply the independence of $\dot x$ again and just naively observe that $$0 \geq \frac{ \partial^2 I}{\partial \dot x ^2} = - 2$$ holds. But notice that this requires assuming not only that $\dot x$ is independent of $x$, but also that it is independent of the quantity $4xt$.
I am almost comfortable with the argument given in the Physics SE post, which says that our $x, \dot x$, and $t$ are just names of variables that, from the perspective of the Euler condition, do not have any explicit relation to each other. However, it seems like at some point we should to apply the constraint that says that in fact if you take the derivative of $x$ wrt $t$, you get $\dot x$. Without that added step, I don't really have the feeling that I have proven anything. Or is this relation baked into the Euler equation in some subtle way?
N.B. I welcome any suggested edits to this post that improve its legibility and brevity.