Potential of an alternating electric field in a capacitor

My question comes from a problem of electrodynamics where there's a relativistic particle with a given 4-momentum ($$p^\mu=(\varepsilon,\vec{p})$$) which enters a capacitor with an alternating electric field given by $$\vec{E}(t)=E_0\cos{wt}\ \hat{u}_x$$. I have to use the Lagrangian covariant formalism in order to obtain a couple of things but I don't know how to relate this electric field to my electromagnetic 4-potential $$A^\mu$$. I fixed my Lagrangian to be $$\mathcal{L}=\frac12p^\mu p_\mu+qu^\mu A_\mu$$. Does anyone know how can I construct my potential here?

• Comment to the post (v2): Lagrangian depends on momentum?? Dec 16, 2023 at 10:21
• That term is the related to kinetic energy, isn't it? Am I wrong because is a relativistic motion so the kinetic energy can no longer be represented by the square of momentum? Well I see now it should have a term $\frac{1}{m}$ Dec 16, 2023 at 10:25
• @SohanNavarroCosta The Lagrangian should generally be function of velocity rather than momentum, but as long as you're using $p^\mu$ as short form for the kinetic momentum $m u^\mu$ and not the conjugate momentum $\frac{\partial\mathcal L}{\partial u^\mu} = m u^\mu + q A_\mu$ then you're fine to write the kinetic term as $\frac1{2m}p^\mu p_\mu$, although it will have to be written in terms of $u^\mu$ to evaluate the EL equations anyway. Dec 16, 2023 at 12:22

Assuming the electric field given electric field of the capacitor only takes into account the field produced by charges, in the Coulomb gauge $$\nabla\cdot\vec A = 0$$ it is determined by the scalar potential $$\vec E = -\nabla\phi$$ so with integration constants set to $$0$$ (meaning $$x=0$$ and $$\phi = 0$$ at $$t=0$$ on the left capacitor plate) you have $$\phi(x,t) = xE_0\sin\omega t$$. With the current $$\mathbf J=0$$ inside the capacitor, the relevant Maxwell equation in this gauge is (in units of $$c=1$$): $$\nabla^2\mathbf A - \partial_t^2\mathbf A = \nabla\left(\partial_t\phi\right)$$ Expanding the RHS: $$\nabla^2\mathbf A - \partial_t^2\mathbf A = \omega E_0\cos\omega t \,\hat u_x$$ So $$A_y=A_z=0$$ and $$A_x$$ solves this inhomogeneous wave equation $$\partial_x^2A_x- \partial_t^2A_x = \omega E_0\cos\omega t$$ where $$\nabla^2$$ was replaced by $$\partial_x^2$$ since $$A_x$$ can safely be assumed to be constant wrt. $$y$$ and $$z$$. Apparently the solution is pretty complicated and trying separation of variables $$A_x(x,t) = \sum_n f_n(x)g_n(t)$$ gives a simple enough $$x$$ ODE, $$\frac{\mathrm d^2f_n}{\mathrm dx^2} = -\lambda_n^2f \implies f(x) = \cos(\lambda_n x + \delta_n)$$ but the $$t$$ ODE is $$\frac{\mathrm d^2g_n}{\mathrm dt^2} + (\omega E_0\cos\omega t)g_n = -\lambda_n^2 g_n$$ which is the Mathieu equation $$\frac{\mathrm d^2y(x)}{\mathrm dx^2} + (a-2q\cos(2x))y=0$$ with $$x = \frac{\omega}{2}t$$, $$a = \frac{2}{\omega}\lambda_n^2$$, and $$q = -E_0$$ and doesn't have any closed form solutions.
Maybe in a different gauge the solution would be nice, but whatever it is your 4-potential comes out to be $$A_\mu = (\phi,-A_x,-A_y,-A_z) = (x^1E_0\sin(\omega x^0), -A_x, 0,0)$$