Applying String Plucking Condition to the Wave Equation So having derived the wave equation for a string with fixed ends I have reached the answer:
$$u(x,t) = \sum_{n=1}^{\infty} \sin\left(\frac{n\pi x}{L}\right) \left(A_{n} \cos\left(\frac{cn\pi t}{L}\right) + B_{n} \sin\left(\frac{cn\pi t}{L}\right)\right).$$
I then consider the case that the string is plucked at the centre with an intial velocity of zero giving the conditions $u_{t}(x,0)=0$ and at $t=0$ and initial shape 
$$f(x) = \begin{cases} x & 0 \leq x \leq \frac{L}{2} \\ L-x & \frac{L}{2} \leq x \leq L \end{cases}.$$
I can apply the first condition and have 
$$u(x,t)=\sum_{n=1}^{\infty} A_{n} \, \sin\left(\frac{n\pi x}{L}\right) \, \cos\left(\frac{cn\pi t}{L}\right)$$
however I'm note sure how to apply the second condition to get the solution given:
$$u(x,t) = \frac{4 L}{\pi^{2}} \, \sum_{n=1}^{\infty} \frac{(-1)^{\frac{n-1}{2}}}{n^{2}} \sin\left(\frac{n\pi x}{L}\right) \, \cos\left(\frac{cn\pi t}{L}\right).$$
 A: For 
$$u(x,t) = \sum_{n=1}^{\infty} \sin\left(\frac{n\pi x}{L}\right) \left(A_{n} \cos\left(\frac{cn\pi t}{L}\right) + B_{n} \sin\left(\frac{cn\pi t}{L}\right)\right)$$
and $u_{t}(x,0) = 0$, then as stated, $B_{n} = 0$ which results in
$$u(x,t) = \sum_{n=1}^{\infty} A_{n} \, \sin\left(\frac{n\pi x}{L}\right) \cos\left(\frac{cn\pi t}{L}\right).$$ 
Now, for
$$f(x) = \begin{cases} x & 0 \leq x \leq \frac{L}{2} \\ L-x & \frac{L}{2} \leq x \leq L \end{cases}$$
then use 
$$A_{n} = \frac{2}{L} \, \int_{0}^{L} f(x) \, \sin\left(\frac{n \pi x}{L}\right) \, dx$$
to obtain
\begin{align}
A_{n} &= \frac{2}{L} \, \left[\int_{0}^{L/2} x \, \sin\left(\frac{n \pi x}{L}\right) \, dx  + \int_{L/2}^{L} (L-x) \, \sin\left(\frac{n \pi x}{L}\right) \, dx \right] \\
&= \frac{4 L^2}{n^2 \, \pi^2} \, \sin\left(\frac{n \pi}{2}\right).
\end{align}
This leads to
$$u(x,t) = \frac{4 \, L^2}{\pi^2} \, \sum_{n=1}^{\infty} \frac{1}{n^2} \,  \sin\left(\frac{n \pi}{2}\right) \, \sin\left(\frac{n\pi x}{L}\right) \cos\left(\frac{cn\pi t}{L}\right).$$
