325. Simplify

$$
\cos ^{2} \alpha+\cos ^{2} 2 \alpha+\ldots+\cos ^{2} n \alpha
$$

and

$$
\sin ^{2} \alpha+\sin ^{2} 2 \alpha+\ldots+\sin ^{2} n \alpha
$$
325. Let's use the fact that $\cos ^{2} x=\frac{1+\cos 2 x}{2}$. From this, using the result of the previous problem, we get:

$$
\begin{aligned}
& \cos ^{2} \alpha+\cos ^{2} 2 \alpha+\ldots+\cos ^{2} n \alpha= \\
& \quad=\frac{1}{2}[\cos 2 \alpha+\cos 4 \alpha+\ldots+\cos 2 n \alpha+n]= \\
& =\frac{1}{2}\left[\frac{\sin (n+1) \alpha \cos n \alpha}{\sin \alpha}-1\right]+\frac{n}{2}=\frac{\sin (n+1) \alpha \cos n \alpha}{2 \sin \alpha}+\frac{n-1}{2} \\
& \text { And since } \sin ^{2} x=1-\cos ^{2} x, \text { then } \\
& \sin ^{2} \alpha+\sin ^{2} 2 \alpha+\ldots+\sin ^{2} n \alpha= \\
& =n-\frac{\sin (n+1) \alpha \cos n \alpha}{2 \sin \alpha}-\frac{n-1}{2}=\frac{n+1}{2}-\frac{\sin (n+1) \alpha \cos n \alpha}{2 \sin \alpha}
\end{aligned}
$$