Solution (source code)

= Solution

Treat $\phi$ and $\phi^*$ as independent variables during <variation>. With <Minkowski metric> $(+---)$, differentiation with respect to $\phi^*$ gives
$$
\frac{\partial\mathcal L}{\partial(\partial_\mu\phi^*)}=\partial^\mu\phi+ieA^\mu\phi,\qquad \frac{\partial\mathcal L}{\partial\phi^*}=-m^2\phi-ieA^\mu\partial_\mu\phi+f(t).
$$
The <Euler-Lagrange field equation> is therefore $\Box\phi+2ieA^\mu\partial_\mu\phi+ie(\partial_\mu A^\mu)\phi+m^2\phi=f$. The static purely temporal potential has $\partial_\mu A^\mu=\partial_tV=0$, giving
$$
\boxed{(\partial_t^2-\nabla^2+2ieV(\mathbf r)\partial_t+m^2)\phi=f(t).}
$$
<variation> with respect to $\phi$ gives $(\Box-2ieA^\mu\partial_\mu+m^2)\phi^*=f(t)$. This is the <complex conjugate> equation when the driving <force> is real, as is required for the supplied <lagrangian density> to be real. For a complex driving amplitude a real <source> term would instead require conjugate coefficients. The interaction supplied here is linear in the external potential: adding the $e^2A_\mu A^\mu|\phi|^2$ term from full <minimal coupling> would change the problem and its <equation of motion>.