I was wondering how to do stability analysis for the classical wave equation if we discretize in space with finite element and step forward in time using some explicit scheme like for example leapfrog or Euler forward.
A reference or example of such a calculation would be much appreciated.
I assume that the starting level with discretizing stuff is "zero". The first thing most people would try would be something like this. The PDE is $$ \Delta u + u_{tt} = 0 \text{ in } \Omega$$ with some appropriate initial and boundary conditions. The most obvious approach would be to write $v = u_t$, and get a system of equations \begin{align*} \Delta u + v_t &= 0, \\ u_t - v &= 0. \end{align*} Then, the most straightforward discretization would be to use the same finite element basis functions $\phi_i$ for $u$ and $v$, leading to a system \begin{align*} Ku + M \dot v &= 0, \\ M \dot u - M v &= 0, \end{align*} where $K_{ij} = \int \nabla \phi_i \cdot \nabla \phi_j \, dx$ is the stiffness matrix, and $M_{ij} = \int \phi_i \phi_j \, dx$ the mass matrix. Rearranging the previous linear system, you get $$ \begin{bmatrix} \dot u \\ \dot v \end{bmatrix} = \begin{bmatrix} 0 & I \\ -M^{-1} K & 0 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = J \begin{bmatrix} u \\ v \end{bmatrix} $$ Assuming, e.g., boundary condition $u=0$ on $\partial \Omega$, the matrix $-M^{-1} K$ is negative definite, so the matrix $J$ looks very much like $\begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}$, that is, the ODE system looks like a harmonic oscillator.
Consider a simple harmonic oscillator $$ \begin{bmatrix} \dot q \\ \dot p \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} q \\ p \end{bmatrix}, $$ which has the energy $W = p^2 + q^2$ as a conserved quantity. It is a straightforward computation to show that the forward Euler increases the energy each time step, whereas the leap frog conserves energy exactly each time step. By doing a similar computation for the above finite element-ODE system, you should find a similar result (try to identify the conserved quantity $W$ first).
This is just to get started. In real life, more advanced schemes are used. For example, the first Google hit for "wave equation FEM" is https://hal.archives-ouvertes.fr/hal-01443184/document