Solution of the Wave Equation, the not so simple direction

I read that the solution of the one-dimensional wave equation $$\frac{1}{c^2} \frac{\partial^2 u}{\partial t^2} = \frac{\partial^2 u}{\partial x^2}$$ are exactly the function of the form $$u(t,x) = f(x + ct) + g(x - ct)$$ with $f$ and $g$ being twice differentiable. To show that every such function is a solution is simply, but what about the other direction, how can I show that if I have a solution $u$ then it must have the form as a sum of two functions f and g? In my textbooks I just find the simple direction, but not the other?

-
The solution you posted does not speak of initial/boundary conditions which determine $f$ and $g$. For example, a wave source at $x=0$ and a domain that extends to $\infty$ on the other end will clearly have no back-traveling waves; in such a case, $f(x) = 0$ for all $x$. – Ron Gordon Jan 2 '13 at 22:40
There is no need to talk of initian conditions, so long as the domain of interest satisfies suitable convexity conditions. – Harald Hanche-Olsen Jan 2 '13 at 22:49
i know, but i asked for a proof that every solution must have this form with two functions $f$ and $g$. – Stefan Jan 2 '13 at 22:49

Change independent variables from $(x,t)$ to $\xi=x+ct$ and $\eta=x-ct$. You will find that the equation transforms to $$\frac{\partial^2 u}{\partial\xi\partial\eta}=0.$$ Now integrate out the $\xi$ variable: $$\frac{\partial u}{\partial\eta}=\gamma(\eta)$$ for some function $\gamma$. ($\gamma(\eta)$ is the integration “constant”). Integrate with respect to $\eta$ and get $u=f(\xi)+g(\eta)$, where $g'=\gamma$ and $f(\xi)$ is another integration “constant”.

Edit: It appears that a more detailed argument is requested. In the first part, fix $\eta$ and consider the function $\xi\mapsto u_\eta(\xi,\eta)$. (I use subscript notation for partial derivatives here, and abuse the notation by still using the letter $u$ for a function of $\xi$ and $\eta$.) The equation states that the derivative of this function is zero, so it must be constant. But you might get a different constant for each choice of $\eta$, so the “constant” is really a function of $\eta$. I called it $\gamma(\eta)$.

Next, fix $\xi$ and consider the map $\eta\mapsto u(\xi,\eta)$ the equation we just proved says that the derivative of this is $\gamma(\eta)$. So the function itself is $g(\eta)$ plus some constant, where $g'=\gamma$. Again, the “constant” may depend on $\xi$, so we call it $f(\xi)$.

-
i know this method, but why does it guarantees that every solution must have this form? for me it just looks like a heuristic to gain some solution, but were is the argument that this are all(!) solutions? – Stefan Jan 2 '13 at 22:51
It's basically just the fundamental theorem of calculus, right? Things get trickier if you wish the generality of weak solutions. But if that is what you wanted, you should have said so at the start. – Harald Hanche-Olsen Jan 2 '13 at 22:53
What about $u(t,x) = x$, it's a solution, but obviously not one of the form $f(x+ct) + g(x-ct)$, or am i wrong? – Stefan Jan 2 '13 at 23:00
Yes it is: $f(\xi)=\xi/2$, $g(\eta)=\eta/2$. – Harald Hanche-Olsen Jan 2 '13 at 23:04

This is called d'Alembert's formula. Basically you transform the wave equation to $u_{\mu\eta}=0$ and solve this one instead.

If additionally initial conditions $u(x,0) = u_0(x)$ and $u_t(x,0) = u_1(x)$ are specified, one has $$f(y) = \frac{1}{2}u_0(y) + \frac{1}{2c}\int_0^{y}u_1(\xi)\,d\xi\quad \text{and} \quad g(y)= \frac{1}{2}u_0(y) - \frac{1}{2c}\int_0^y u_1(\xi)\,d\xi.$$

-