Actual classical time evolution in a closed Cavity I'm stuck with the question how the actual time evolution of a given classical electric field in a closed cavity will look like. 
The initial conditions are a given function $u(x)$ in a one dimensional region between the points $0$ and $L$. At those points there are mirrors, that are said to reflect 100 % of the intensity. The function is to represent an electrical field. 
I now want to know what equations will govern the time evolution. Surely, inside the cavity, the time evolution is given by a one dimensional wave equation $\partial_x^2 u - \partial_t^2 \frac{1}{c^2} u = 0$.
But how to account for the mirrors?
I'm stuck with this question because usualy reflection at a dielectric mirror is modeled by two regions with different dielectric constant. There, you solve the wave equations for both regions, apply proper boundary conditions for the boundary layer, and are finished. But I can't model a 100 % reflecting mirror as a dielectric mirror, so I'm clueless on this. 
 A: It's a perfect electrical conductor (PEC) at the endpoints. Assuming $u(x)$ represents a component of the electric field perpendicular to the $x$-axis, the boundary conditions are $u(0)=u(L)=0$, which implies that the tangential component of the electric field is zero.
A: *

*Consider a wave $u(z)=e^{-ikz}$ incident from the right on a boundary at $z=0$ that is 100% reflecting. Then the total wave function in the region $z>0$, including the scattered part, will be $$u_{tot}(z)=e^{-ikz} + re^{ikz}$$ where $r$ is the reflection coefficient of the boundary. Let $r=\pm 100\%=\pm 1$. Then $$u^+_{tot}(z) \propto \cos(z)$$ OR $$u^-_{tot}(z) \propto \sin(z)$$ depending on the sign of $r$, indicated in the superscript. This is one way to see which boundary conditions you need for a "totally reflecting mirror". There are two options with different physical interpretations. Usually the negative sign will be relevant (to see that you gotta look how almost perfect mirrors are made in practice. See also this. And, because I am a fan, have a look at the Ley-Loudon cavity.).

*From here it is a piece of cake, you just solve your differential equation, which you have given in the question with the above boundary conditions as constraints.

