In this question I “derive” the Schrödinger equation. A similar argument could be used for the Klein-Gordon’s or Dirac’s equations (with Dirac's equation having one more step of linearization of the Klein-Gordon Hamiltonian).
In short these derivations are as follows:
- Admit the plane wave ansatz $$ψ=e^{i(kx-ω t)} \tag{1}$$
- Get its derivatives with respect to $x$ and $t$.
$$\begin{equation} \begin{cases} k^2=- ψ^{-1} \frac{∂^2ψ}{∂x^2}\\ ω =iψ^{-1} \frac{∂ψ}{∂t} \end{cases} \tag{2} \end{equation}$$
- Make use of the De Broglie’s relations
$$\begin{equation} \begin{cases} E=ħω\\ p=ħk \end{cases} \tag{3} \end{equation}$$
- Use the right dispersion relation
$$\begin{equation} \begin{cases} E=\frac{p^2}{2m}+U\\ E^2=c^2p^2+m^2c^4 \end{cases} \tag{4} \end{equation}$$
Substituting (2) into (4) via (3) we get Schrödinger’s and Klein-Gordon’s equations. The thing is, how do we add $U$ into the relativistic one’s if that relation is supposed to be valid for free particles only? (restrict relativity)
**PS: I’m aware that wave equations are not rigorously speaking, derived. They are postulated. Take these “derivations” as arguments in favour for the definition of a certain wave equation.