Let $$F[y,z]=\int_a^b \left[y'(t)z(t)-\frac{1}{2}y(t)^2-\frac{1}{2}z(t)^2 \, \right]dt$$ and let $$L[x]=\int_a^b f(x(t),x'(t)) \, dt$$
I'm told that if $\tilde{x}$ is a stationary point of $L$ then $(\tilde{x},\tilde{x}')$ is a stationary point of $F$. I'm now asked to find $f$.
I have considered the Euler-Lagrange equations for $F$ and found that $y'=z$ and $z'=-y$. Using the Beltrami equation I have also found that $\frac{1}{2}y^2+\frac{1}{2}z^2=c \text{ (constant)}$. Putting this all together gives me the differential equation $(y')^2+y^2=c$.
I'm not sure if this helps me in any way but I don't know what else I can do here.