I was interested in answering this question while I was waddling through the Internet. It goes like this:
Evaluate $ \sum_{n=1}^\infty (a_n \cos \left( \frac{n\pi x}{L}\right) + b_n \sin \left(\frac{n\pi x}{L}\right))$
My work
To evaluate $ \sum_{n=1}^\infty (a_n \cos \left( \frac{n\pi x}{L}\right) + b_n \sin \left(\frac{n\pi x}{L}\right))$, we'll do it manually. If we let $n = 1, 2, 3, 4,....$, we see that:
If $n = 1$: $$a_1 \cos \left( \frac{(1)\pi x}{L}\right) + b_1 \sin \left( \frac{(1)\pi x}{L}\right)$$
If $n = 2$: $$a_2 \cos \left( \frac{(2)\pi x}{L}\right) + b_2 \sin \left( \frac{(2)\pi x}{L}\right)$$
If $n = 3$: $$a_3 \cos \left( \frac{(3)\pi x}{L}\right) + b_3 \sin \left( \frac{(3)\pi x}{L}\right)$$
If $n = 4$: $$a_4 \cos \left( \frac{(4)\pi x}{L}\right) + b_4 \sin \left( \frac{(4)\pi x}{L}\right)$$
If $n = 5$: $$a_5 \cos \left( \frac{(5)\pi x}{L}\right) + b_5 \sin \left( \frac{(5)\pi x}{L}\right)$$
We recall that odd multiples of $n$ $(n = 1, 3, 5, 7, 9,....)$ in $\sin \pi n$ equals to $0$ while odd multiples of $n$ $(n = 1, 3, 5, 7, 9,....)$ in $\cos \pi n$ equals to $-1$.
We also remember that even multiples of $n$ $(n = 0, 2, 4, 6, 8,....)$ in $\sin \pi n$ equals to $0$ while even multiples of $n$ $(n = 0, 2, 4, 6, 8,....)$ in $\cos \pi n$ equals to $1$. With that in mind, it becomes:
$$\sum_{n=1}^\infty (a_n \cos \left( \frac{n\pi x}{L}\right) + b_n \sin \left( \frac{n\pi x}{L}\right))$$ $$ = (-a_1 + 0b_1)+(a_2 + 0b_2)+(-a_3 + 0b_3)+(a_4 + 0b_4)+(-a_5 + 0b_5)+......$$
If we let $a_1$ $=$ $b_1$ $= 1$ so we can analyze it easily, it becomes:
$$-a_1 + a_2 + -a_3 + a_4 + -a_5 + .....$$ $$-1 + 1 + -1 + 1 + -1.....=0$$
The sum of the oscillating series $(-1) + 1 + (-1) + 1 + (-1).....$ or $-1 + 1 - 1 + 1 - 1.....$ is zero. Therefore:
$$\color{green}{\sum_{n=1}^\infty \left(a_n \cos \left( \frac{n\pi x}{L}\right) + b_n \sin \left( \frac{n\pi x}{L}\right)\right) = 0}$$
Is my answer correct, ladies and gentlemen?
There is a lot of confusion in this question, but the first thing I'll note is that just because $\sin \pi n=0$ doesn't tell us anything about the values of $\sin\frac{\pi n x}{L}$ for any $x$.
If $a_0=1,b_0=0,a_n=b_n=0$ for $n>0$, then your sum is $\sin \frac{\pi x}{L},$ which is not zero.
Also, while $1-1+1-1+\cdots$ doesn't converge, that says nothing about $a_0-a_1+a_2-a_3+\cdots.$