# [SOLVED]Wave Equation Question Part 3

#### Cbarker1

##### Active member
Dear Everybody,

I do not know how to begin with the following problem:

you are asked to solve the wave equation subject to the boundary conditions ($u(0,t)=u(L,t)=0$), $u(x,0)=f(x)$ for $0\le x\le L$ and ${u}_{t}(x,0)=g(x)$ for $0\le x\le L$ . Hint: using the $u(x,t)=\sum_{n=1}^{\infty}{{b}_{n}\sin(\frac{n\pi x}{L})\cos(\frac{n\pi c t}{L})}$ and the remark is that if the initial velocity is nonzero, then additional terms of the form ${{{b}^{*}}_{n}\sin(\frac{n\pi x}{L})\cos(\frac{n\pi c t}{L})}$ must be included where n is nonnegative integer.

$f(x)=\sin{\frac{2\pi x}{L}}$ and $g(x)=0$

Thanks,
Cbarker1

#### GJA

##### Well-known member
MHB Math Scholar
Hi Cbarker1 ,

Let's start by utilizing the remark you mentioned. Is the initial velocity non-zero? After answering that question, let's ask ourselves if there is a formula we can apply to calculate the $b_{n}$ terms.

#### Country Boy

##### Well-known member
MHB Math Helper
You have that $$u(x, t)= \sum_{n=0}^\infty b_n\sin\left(\frac{n\pi x}{L}\right)\cos\left(\frac{n\pi ct}{L}\right)$$ and that $$u(x, 0)= \sin\left(\frac{2\pi x}{L}\right)$$. So $$u(x, 0)= \sum_{n=0}^\infty b_n\sin\left(\frac{n\pi x}{L}\right)=$$$$\sin\left(\frac{2\pi x}{L}\right)$$ which is true if $$b_2= 1$$ and $$b_n= 0$$ for all $$n\ne 2$$. That is, $$u(x, t)= \sin\left(\frac{2\pi x}{L}\right)\cos\left(\frac{2\pi ct}{L}\right)$$.