Finding the sum of the trigonometric serie: There are two series:
$$1) 1+\dfrac{\cos{x}}{p}+\dfrac{\cos{2x}}{p^2}+...+\dfrac{\cos{nx}}{p^n}=\sum_{k=0}^{n}{\dfrac{\cos{kx}}{p^k}}$$
$$2) \dfrac{\sin{x}}{p}+\dfrac{\sin{2x}}{p^2}+...+\dfrac{\sin{nx}}{p^n}=\sum_{k=0}^{n}{\dfrac{\sin{kx}}{p^k}}$$
Where $p$ its a real constant with absolute value greater than 1.
How can i find the sum of each series?
 A: HINT 1:
Can you evaluate $\displaystyle\sum_{k=0}^n \left(\dfrac{e^{ix}}p\right)^k$?
HINT 2:

Sum of geometric progression.

HINT 3:

 Look at the real and imaginary parts of the first sum.

A: Note that these series look like geometric series.
Namely if the first series is $S_1$ and the second is $S_2$, then $\displaystyle S_1+iS_2=\sum_{j=0}^n \left(\frac{e^{ix}}{p}\right)^j$.
Then we solve with the formula for the sum of a geometric series since $|p|>1$ so $p\ne e^{ix}$.
Thus if we let $\displaystyle S=\frac{1-\left(\frac{e^{ix}}{p}\right)^{n+1}}{1-\frac{e^{ix}}{p}}=\frac{p^{n+1}-e^{(n+1)ix}}{p^n(p-e^{ix})}$, $S_1=\operatorname{Re} S$ and $S_2=\operatorname{Im} S$.
A: Without complex numbers:
$$C_n=\sum_{k=0}^n\frac{\cos(kx)}{p^k}=\sum_{k=1}^{n+1}\frac{\cos(k-1)x}{p^{k-1}}=\sum_{k=1}^n\frac{\cos(k-1)x}{p^{k-1}}+\frac{\cos nx}{p^n}\\
=p\sum_{k=1}^{n}\frac{\cos kx\cos x+\sin kx\sin x}{p^k}+\frac{\cos nx}{p^n}\\
=p(C_n-1)\cos x+pS_n\sin x+\frac{\cos nx}{p^n}.$$
$$S_n=\sum_{k=0}^n\frac{\sin(kx)}{p^k}=\sum_{k=1}^{n+1}\frac{\sin(k-1)x}{p^{k-1}}=\sum_{k=1}^n\frac{\sin(k-1)x}{p^{k-1}}+\frac{\sin nx}{p^n}\\
=p\sum_{k=1}^{n}\frac{\sin kx\cos x-\cos kx\sin x}{p^k}+\frac{\sin nx}{p^n}\\
=pS_n\cos x-p(C_n-1)\sin x+\frac{\sin nx}{p^n}.$$
Then,
$$(1-p\cos x)C_n-p\sin xS_n=-p\cos x+\frac{\cos nx}{p^n}\\
p\sin xC_n+(1-p\cos x)S_n=p\sin x+\frac{\sin nx}{p^n}.$$
Now, solve this $2\times2$ linear system of equations in $C_n$ and $S_n$. The discriminant is
$$\Delta=1-2p\cos x+p^2,$$
and 
$$C_n\Delta=\left(-p\cos x+\frac{\cos nx}{p^n}\right)(1-p\cos x)+\left(p\sin x+\frac{\sin nx}{p^n}\right)p\sin x\\
=-p\cos x+p^2-\frac{\cos nx-p\cos(n-1)x}{p^n}$$
$$S_n\Delta=\left(p\sin x+\frac{\sin nx}{p^n}\right)(1-p\cos x)-\left(-p\cos x+\frac{\cos nx}{p^n}\right)p\sin x\\
=p\sin x+\frac{\sin nx-p\sin(n-1)x}{p^n}.$$
