I'm looking for the functional analogue to the visual representations of function optimization you most commonly see.
To illustrate, if we have some function: $$ f(x) = (x-1)^2+1 $$
We can look at the problem graphically, and we can immediately find the minimum by visual inspection, and we see that it is at $x=1$

Now, lets say we have a functional: $$ J[x]=\int^t_0 \mathcal{L}\left(x(\tau),D({x})(\tau),D^{2}({x})(\tau),...,D^{n}({x})(\tau),\tau\right)\,\text{d}\tau $$
Such that the solution (one way or another) to the first variation of this functional yields the first order representation of the harmonic oscillator:
$$ \dot{x}(t)=y(t),\dot{y}(t)=-x(t),x(0)=x_0,y(0)=y_0 $$
Is there some way for me to visualize the functional in $(x,y,J)$ space, such that I can obviously see that there is some "valley" in the visual of the functional that admits the trajectory of the harmonic oscillator, something like:

Here, there is a circular valley inside of which a certain solution to the harmonic oscillator equations could fit.
So, instead of visually inspecting a single variable function and seeing where it attains a minimum, we can visually see that the functional attains a minimum along this trajectory.
One such example is plotting the contours of the Hamiltonian function, the resulting contours each relate directly to a trajectory which minimizes or makes the associated functional stationary.
The phase space plot for the contours of the Hamiltonian of a pendulum results in:

Although not all functionals can be framed in such a way, this is because of the special characteristics of Hamiltonian systems. Maybe there is some other way to generate similar visualizations for other functions? Some phase space representations of solutions based on the functional?