Sign flip for every TWO terms in a sum? (Instead of one)

251 Views Asked by At

It's easy to see that $(-1)^n$ in a summation with index n will yield alternating signs on the terms, but what if I want to alternate the sign every 2 terms? I haven't found a way to do this.

Effectively, I have a piecewise function expressed as a Fourier Series,

$f(x) = \frac{4L}{\pi^2}\sin(\pi x/L) - \frac{4L}{9\pi^2}sin(3\pi x/L) + \frac{4L}{25\pi^2}sin(5\pi x/L) - ...$

that I want to express as a summation.

So far I have: $\sum_{n=1}^\infty \frac{4L}{n^2\pi^2}sin(\frac{n\pi x}{L})$

because the terms evaluate to zero for $n=2,4,6...$

But the sign doesn't flip for $n = 1,3,5...$

1

There are 1 best solutions below

3
On BEST ANSWER

It seems that what you want is

$$ \sum_{n=1}^\infty \frac{4L}{n^2\pi^2} \sin \left( \frac{n\pi}{2} \right) \sin \left( \frac{n\pi x}{L} \right) $$

There are other ways to get the even terms to go to zero, and the odd terms to alternate sign. But this seems the most straightforward to me.