# Solution of Wave Equation initial conditions

A vibrating string fixed at $$x=0$$ and $$x=L$$ undergoes oscillations described by the wave equation $$\frac{\partial^2u}{\partial x^2} = \frac{1}{c^2} \frac{\partial^2u}{\partial t^2}$$ where $$u(x,t)$$ represents the displacement from equilibrium of the string. Initially, the profile of the string is $$u(x,0) = \sin(\frac{4 \pi}{L}x)$$ and its initial velocity is $$u_t(x,0)=8 \pi \sin( \frac{4 \pi}{L} x )$$.

My attempt at a solution:

Take $$u(x,t) = [ A \cos(kx) + B \sin(kx) ][ C \cos (kct) + D \sin(kct) ]$$

$$u(x,0) = [A \cos(kx) + B \sin(kx)] \times C = \sin( \frac{4 \pi}{L} x)$$.

So, $$A = 0; k = \frac{4 \pi}{L}$$

Then, $$B \sin({ \frac{4 \pi}{L} x})[ C \cos (\frac{4 \pi}{L} ct) + D \sin( \frac{4 \pi}{L} ct )]$$

$$u_t(x,t) = B \sin( \frac{4 \pi}{L} x)[ \frac{4 \pi}{L}c \times C \times -\sin( \frac{4 \pi}{L}ct) + \frac{4 \pi}{L} \times D \times \cos( \frac{4 \pi}{L} ct) ]$$

$$u_t(x,0) = \frac{4 \pi}{L} c BD \sin( \frac{4 \pi}{L} x ) = 8 \pi \sin ( \frac{8 \pi}{L}x )$$

How do I solve this? Can I take $$BD = \frac{L}{c} \times 4 \cos( \frac{4 \pi}{L} x )$$

You won't get $$\sin(\frac{8\pi}{L}x)$$. You are actually dealing with $$\cos(\frac{4\pi}{L}c 0)=1$$.

Update: I see that you may have a typo in the initial velocity condition which should have contained $$\sin(\frac{8\pi}{L}x)$$.

To handle that begin with the solutions as $$\sum_n a_n e^{i\frac{2\pi n}{L}(x-ct)}+b_ne^{i\frac{2\pi n}{L}(x+ct)}$$. With the initial conditions you can easily recognize the only coefficients left would be $$a_2,b_2,a_4,b_4$$. With the constraints of getting real solutions, you can see it is $$\frac12 \sin(\frac{4\pi}{L}(x-ct))+\frac12\sin(\frac{4\pi}{L}(x-ct) + \frac{L}{2c}\cos(\frac{8\pi}{L}(x-ct))-\frac{L}{2c}\cos(\frac{8\pi}{L}(x+ct)).$$