Can you apply the Euler-Lagrange equations when trying to find the extrema of a (real valued) functional of a complex function?

85 Views Asked by At

I have a complex valued function $f:[0,1]\longrightarrow \mathbb{C}$ and I want to minimise a functional of the form: $ J = \int_{0}^{1} g(|f(x)|^2) \,dx $ where $g$ is some function. So the functional $J$ is real, even though $f$ is complex. Can I apply the Euler Lagrange equations and get an ODE in terms of $f$ or $f^*$, or is this unjustified because $f$ is complex valued?