I have some difficulties solving this Wave Equation under Neumann BC. Here is what I have so far.
$u_{tt} = 4u_{xx}$ for $0<x<\pi, t>0$
$u_x(0,t) = u_x(\pi$, t) = 0 for t>0
$u(x,0) = 0, u_t(x,0) = \sin(x), 0 <= x <= \pi$
I used the separation of variables method to solve this problem.
$u(x,t) = X(x)T(t)$
$\frac{-X''(x)}{X(x)} = \frac{-1}{4}\frac{T''(t)}{T(t)} = \lambda$
BC: $X'(0) = 0$ and $X'(\pi) = 0$
IC: $T(0) = 0$ and $T'(0) = \sin (x)$
I get $u(x,t) = \frac{1}{2}A_0t + \frac{1}{2}B_0$ + $\sum_{n=1}^\infty(A_n \cos (4nt) + B_n \sin (4nt))\cos(nx)$
I think everything here so far is correct.
Here is where I am stuck:
I need $\psi(x) = \sin (x)$ = $\frac{1}{2}B_0$ + $\sum_{n=1}^\infty$$4n B_n \cos(nx)$
Do I calculate the coefficients $B_n$ using
$4nB_n$ = $\frac{2}{\pi} \int_0^\pi \sin(x) \cos(nx) dx$ ?
or
$B_n$ = $\frac{2}{\pi} \int_0^\pi \sin(x) \cos(nx) dx$
Thanks for any help.
Indeed, everything correct until you stuck. What about $A_n$? You don't mention that $A_n=0\,$. From your expansion $$ \sin{(x)}=\frac{1}{2}B_0+\sum_{n=1}^{\infty}4nB_n\cos{(nx)}, $$ it is absolutely clear that Fouries coefficients of $\sin{(x)}$ are $$ \frac{1}{2}B_0\,,4B_1\,,8B_2\,,\dots, 4nB_n\,,\dots $$ Hence you have $$ \begin{align*} \frac{1}{2}B_0=\frac{2}{\pi}\int\limits_0^{\pi}\sin{(x)}\,dx,\\ 4B_n=\frac{2}{\pi}\int\limits_0^{\pi}\sin{(x)}\cos{(nx)}\,dx,\;n\geqslant 1. \end{align*} $$