# Summation formula for trig functions

• FrankJ777
In summary, the conversation discusses the possibility of finding a summation formula for the sum of an expression with n as an argument in a trigonometric function, similar to how an integral is defined as a Riemann sum of an infinite number of points. It is mentioned that there are some tricks that can be used, but not every series can be summed explicitly. The conversation also suggests using complex variables and the ln(1+z) series to find a summation formula for specific series, such as the periodic ramp function. It is suggested to try using this method for a square wave to better understand how it works.

#### FrankJ777

Does anyone know if there is a summation formula to find the sum of an expression with n as an argument in a trig function? I'm asking this because I'm learning about Fourier series/analysis but it seems that once we have the Fourier series we only sum for n=1,n=2,n=3... We never sum there series all the way to infinity. Is there a way to do that, simular to the way an integral is defiened as the Riemann sum of an infinate number of points?

If anyone can point me in a good dirrection I would sincerely appreciate it.

Thanks a lot

There are some tricks that can be used, but not every series can be summed explicitly. As an example, take

$$\sum \frac1n \sin nx$$

Using complex variables, we can write this as

$$\Im \sum \frac1n e^{inx}$$

Now let $z = e^{ix}$, so we can write

$$\Im \sum \frac1n z^n$$

And now use the series for $\ln (1+z)$:

$$\ln (1+z) = z - \frac{z^2}2 + \frac{z^3}3 - \frac{z^4}4 + \ldots$$

to write the sum as

$$\Im (- \ln (1-z)) = - \arg (1-z) = - \arctan \frac{\Im (1-z)}{\Re (1-z)}$$

Finally, put in the definition of z:

$$\sum \frac1n \sin nx = \arctan \frac{\sin x}{1 - \cos x}$$

If you plot this, it reproduces the periodic ramp function represented by the original series.

To learn how it works, why don't you try working it out for a square wave? Basically all you do is use the ln(1+z) series in creative ways.