Why does the sawtooth graph that uses cos(x) instead of sin(x) have a minimum value of -ln(2) when x is a multiple of pi?

26 Views Asked by At

So you know how the sawtooth function is $\sum _{n=1}^{\infty}\frac{\sin \left(n\left(x\right)\right)}{n}$, and that the minimum value approaches -2, right?

So when I use cos(x) instead of sin(x) ($\sum _{n=1}^{\infty}\frac{\cos \left(n\left(x\right)\right)}{n}$), it looks a little different. One thing I noticed was that the minimum value approaches -log(2) (or -ln(2)). The minimum value is at a multiple of pi. Basically, $\sum _{n=1}^x\frac{\cos \left(n\left(\pi \right)\right)}{n}$ approaches -log(2) when x approaches to infinity.

Why does this happen?