Wave equation with Neumann boundary conditions

Problem def.: Solve the wave problem in a form of a Fourier series

PDE: $$u_{tt}=2u_{xx}$$

BCs: $$u_x(0,t)=u_{x}(2\pi,t)=0$$

ICs: $$u(x,0)=-1,\:u_{t}(x,0)=1,\qquad0<x<2\pi$$

So far my solution is:

Using separation of variables and BCs, general solution to the PDE is:

$$u(x,t)=\sum_{n=0}^{\infty}[A_{n}sin(\frac{nt\sqrt{2}}{2})+B_{n}cos(\frac{nt\sqrt{2}}{2})]cos(\frac{nx}{2})$$

To satisfy ICs:

$$u_{t}(x,0)=1=\sum_{n=0}^{\infty}\frac{n\sqrt{2}}{2}A_{n}cos(nx/2)$$

$$u(x,0)=-1=\sum_{n=0}^{\infty}B_{n}cos(nx/2)$$

So, I do not know what to do from here. If I try to to solve for Fourier cosine coefficients I get trivial solutions. Can someone please check my work and suggest how to proceed?

• You can get displayed equations by using double dollar signs instead of single dollar signs. – joriki Apr 11 '16 at 10:52

I figured the answer. The eigenvalue $\lambda=0$ must be taken into consideration. This yields a general solution to PDE: $$u(x,t)=A_0+B_0t+\sum_{n=1}^{\infty}[A_{n}sin(\frac{nt\sqrt{2}}{2})+B_{n}cos(\frac{nt\sqrt{2}}{2})]cos(\frac{nx}{2})$$
Applying Initial Conditions yields the final solution: $$u(x,t)=-1+t$$