Wave equation on finite domain I'd like to solve the following PDE: for $x\in[0,L]$ and $t\in\mathbb{R^+}$,
$$\left\lbrace \begin{array}{l} 
\partial^2_{tt} u - c^2\partial^2_{xx}u = 0 \\
u(x,0)=0 \\
\partial_t u(x,0)=\varphi(x) \\
\partial_x u(0,0)=0\\
\partial_x u(L,0)=0
\end{array}\right.
$$
Originally, I tried the following.
The solutions are of the form $u(x,t)=f(x+ct)+g(x-ct)$, where $f,g$ are piecewise $\mathcal{C}^2$ over $\mathbb{R}$.
From the initial conditions, $\forall x\in [0,L]$, $f(x)+g(x)=0$ and $cf'(x)-cg'(x)=\varphi(x)$, or:
$$\left\lbrace\begin{array}{l}
f(x)=\frac{1}{2c}\int_0^x \varphi(\xi)\,\text{d}\xi\\
g(x)=-\frac{1}{2c}\int_0^x \varphi(\xi)\,\text{d}\xi
\end{array}\right.$$
From the boundary conditions, $\forall t\geq 0$, $f'(ct)+g'(-ct)=0$ and $f'(L+ct)+g'(L-ct)=0$ so $f'(L+ct)=-g'(L-ct)=-g'(-L-ct)$ so $f$ and $g$ are $2L$-antiperiodic.
Putting everything together, 
$$u(x,t)=\dfrac{1}{2c}\int_0^{x+ct} \varphi(\xi)\,\text{d}\xi - \dfrac{1}{2c}\int_0^{x-ct} \varphi(\xi)\,\text{d}\xi = \dfrac{1}{2c}\int_{x-ct}^{x+ct} \varphi(\xi)\,\text{d}\xi$$
I have some doubts that this is the solution over $[0,L]\times \mathbb{R}^+$ because it does not seem to much the initial $t$-derivative and the Neumann conditions:
$$2c\partial_t u(x,t)=c\varphi(x+ct)+c\varphi(x-ct)+\int_{x-ct}^{x+ct} \partial_t\varphi(\xi)\,\text{d}\xi$$
so $\partial_t u(x,0)=\varphi(x)\neq 0$. Similarly,
$$2c\partial_x u(x,t)=\varphi(x+ct)-\varphi(x-ct)+\int_{x-ct}^{x+ct}\varphi'(\xi)\,\text{d}\xi$$
so $\partial_x u(0,t)=2(\varphi(ct)-\varphi(-ct))\neq 0$ and $\partial_x u(L,t)=2(\varphi(L+ct)-\varphi(L-ct))\neq 0$. 
Additionally, $\varphi$ is defined over $[0,L]$ so that's another reason to believe there's something wrong, but where? Lastly, as commented by Ian, the form $f(x+ct)+g(x-ct)$ does not account for the wave reflections. Maybe making the problem infinite with $L$-periodic initial conditions would do the trick?
Some questions indicate separating variables but this would lead to stationnary solutions. I am interested in any way of finding the general solution.  

I figured out the answer. The solution was correct, but details were missing. The trick was to extend all the functions $f,g,\varphi$ to $\mathbb{R}$. The boundary conditions imply that they can be extended by $2L$-periodic even functions. Then, $\partial_x u(0,t)=\frac{1}{2}\varphi(ct)-\varphi(-ct)=0$ and similarly for $\partial_x u(L,t)$.
So, after extending the domains of definition, $u(x,t)=f(x-ct)+g(x+ct)$ holds.
