Question about the solution of the wave equation The solution of the wave equation
$$u_{tt}-c^2u_{xx}=0$$ is given as $$u(x,t)=f(x+ct)+g(x-ct)$$
where $f,g$ are arbitrary functions of one variable.
One way to prove this is the following:
$$(\partial_{tt}-c^2 \partial_{xx})u=0$$
$$(\partial_t-c \partial_x)(\partial_t+c \partial_x)u=0$$
So solutions must satisfy
$$
(\partial_t-c \partial_x)u=0 \;\;\cup\;\; 
(\partial_t+c \partial_x)u=0
$$
$\displaystyle{(\partial_t-c \partial_x)u=0 \Rightarrow u=f(x+ct)}$
$\displaystyle{(\partial_t+c \partial_x)u=0 \Rightarrow u=g(x-ct)}$

Could you explain me why the last two equations stand??
 A: $$\displaystyle{(\partial_t-c \partial_x)u=0 \Rightarrow u=f(x+ct)} \text{   (1)}$$
Define $\xi=x+ct$.
The solution of the above equation is called traveling wave solution, because the wave front is the same at constant $\xi=x+ct$.
$$\frac{\partial \xi}{\partial t}=c$$
$$\frac{\partial \xi}{\partial x}=1$$
$$\partial_t f(\xi)=\partial_\xi f(\xi)\frac{\partial \xi}{\partial t}=c\partial_\xi f(\xi)$$
$$\partial_x f(\xi)=\partial_\xi f(\xi)\frac{\partial \xi}{\partial x}=\partial_\xi f(\xi)$$
Substituting these two quantities into (1) above and we conclude that $f(\xi)$ is a solution of (1).
Define $\eta=x-ct$
Similarly we have:
$$\partial_t g(\eta)=-c\partial_\eta g(\eta)$$
$$\partial_x g(\eta)=\partial_\eta g(\eta)$$
Substituting these two quantities into (2) below and we conclude that $g(\eta)$ is a solution of (2)
$$\displaystyle{(\partial_t+c \partial_x)u=0 \Rightarrow u=g(x-ct)}\text{    (2)}$$
Thus this PDE with a traveling wave solution becomes an ODE.
As a matter of factor, for any PDE that does not explicitly on $x$ or $t$, if you search for traveling wave solution, then you can convert it to an ODE (maybe nonlinear though).
For example, the nonlinear Schrodinger equation:
$$\left(i\partial_t+a (\partial_x)^2\right)\psi(x,t)+ |\psi(x,t)|^2\psi(x,t)=0$$
