Minimum value of $\sum_{n=0}^\infty\frac{\cos nx}{3^n}$? This question appeared on my test:

If the range of the expression $$\sum_{n=0}^\infty\frac{\cos nx}{3^n}$$ is $[a,b]$, then $(b-a)$ equals ...

and I am unable to find the lower limit.
I found the maximum value with the help of the infinite geometric series:

since $$\cos nx\leqslant1$$
then $$\cos nx/3^n\leqslant 1/3^n$$

so the sum of the series is less than or equal

$$1+1/3+1/3^2+\cdots$$

which is


$$1/(1-1/3) = 3/2$$
How do I find the minimum value?

The series can be exactly evaluated by passing to the real part of the geometric series in $e^{inx}/3^n$. You get: $$\sum_{n\ge0}\frac{\cos nx}{3^n}=\frac{1}{2}+\frac{2}{5-3\cos x}$$From which the maximum value $3/2$ is clear and the minimum value $3/4$ is also clear.
That’s overkill, however. You were right to try $\cos x=1$ for the maximum. For the minimum, note that $\cos x=-1$ (another sensible thing to try) at $x=\pi$ would give a series in $\cos n\pi=(-1)^n$. This alternating series yields $3/4$. As for proving this minimum value is indeed a minimum, without calculating the series directly, you could differentiate: $$-\sum_{n\ge0}\frac{n\sin n\pi}{3^n}=0$$And differentiate again: $$-\sum_{n\ge0}\frac{n^2\cos n\pi}{3^n}>0$$By the alternating series test technique. This gives a local minimum, but you can appeal to periodicity to claim it is a global minimum. Indeed, the only points of zero derivative are when $x=\pi k$ for some integer $k$. You could check this by again using the alternating series test (magnitude of summands is strictly decreasing) although getting the details precisely right isn’t trivial.
