7. (4 points) Solve the equation:

$$
\sin x + \sin 3x + \ldots + \sin 2019x = \cos x + \cos 3x + \ldots + \cos 2019x
$$
# Answer:

1) $x=\frac{\pi k}{1010}, k \in \mathbb{Z}, k$ does not divide 1010.
2) $x=\frac{\pi+4 \pi k}{4040}, k \in \mathbb{Z}$.

## Solution:

First, let's prove the following formulas by induction in the case where $\sin x \neq 0$:

$$
\begin{gathered}
\sum_{k=1}^{n} \sin ((2 k-1) x)=\frac{\sin ^{2}(n x)}{\sin x} \\
\sum_{k=1}^{n} \cos ((2 k-1) x)=\frac{\sin (2 n x)}{2 \sin x}=\frac{\sin (n x) \cos (n x)}{\sin x}
\end{gathered}
$$

First formula. Base case $n=1: \sin x=\frac{\sin ^{2} x}{\sin x}$ - this is a true statement.

Inductive step: assume the statement is true for some $n$, we will prove that it is also true for $n+1$.

$$
\begin{aligned}
& \sum_{k=1}^{n+1} \sin ((2 k-1) x)=\sum_{k=1}^{n} \sin ((2 k-1) x)+\sin ((2 n+1) x)=\frac{\sin ^{2}(n x)}{\sin x}+\sin ((2 n+1) x)= \\
& \quad=\frac{\sin ^{2}(n x)+\sin (2 n x+x) \sin x}{\sin x}=\frac{\sin ^{2}(n x)+\sin (2 n x) \cos x \sin x+\cos (2 n x) \sin ^{2} x}{\sin x}=
\end{aligned}
$$

$$
\begin{gathered}
=\frac{\sin ^{2}(n x)+2 \sin (n x) \cos (n x) \cos x \sin x+\left(\cos ^{2}(n x)-\sin ^{2}(n x)\right) \sin ^{2} x}{\sin x}= \\
=\frac{\sin ^{2}(n x) \cos ^{2} x+2 \sin (n x) \cos (n x) \cos x \sin x+\cos ^{2}(n x) \sin ^{2} x}{\sin x}= \\
=\frac{(\sin (n x) \cos (x)+\cos n x \sin x)^{2}}{\sin x}=\frac{\sin ^{2}((n+1) x)}{\sin x}
\end{gathered}
$$

Second formula. Base case $n=1: \cos x=\frac{\sin 2 x}{2 \sin x}$ - this is a true statement.

Inductive step: assume the statement is true for some $n$, we will prove that it is also true for $n+1$.

$$
\begin{gathered}
\sum_{k=1}^{n+1} \cos ((2 k-1) x)=\sum_{k=1}^{n} \cos ((2 k-1) x)+\cos ((2 n+1) x)=\frac{\sin (2 n x)}{2 \sin x}+\cos ((2 n+1) x)= \\
=\frac{\sin (2 n x)+2 \cos (2 n x+x) \sin x}{2 \sin x}=\frac{\sin (2 n x)+2 \cos (2 n x) \cos x \sin x-2 \sin (2 n x) \sin ^{2} x}{2 \sin x}= \\
=\frac{\sin (2 n x)\left(1-2 \sin ^{2} x\right)+\cos (2 n x) \sin 2 x}{2 \sin x}=\frac{\sin (2 n x) \cos (2 x)+\cos (2 n x) \sin 2 x}{2 \sin x}=\frac{\sin (2(n+1) x)}{2 \sin x}
\end{gathered}
$$

First, consider the case $\sin x=0$. In this case, the left side of the equation becomes 0, while the right side is 1010 or -1010, so the numbers $x=\pi k$ for integer $k$ are not solutions to the problem.

Using the formulas proved above, we transform the original equation into $\frac{\sin ^{2} 1010 x}{\sin x}=\frac{\sin 1010 x \cos 1010 x}{\sin x}$, from which $\sin 1010 x=0$ or $\sin 1010 x=\cos 1010 x$.

$\sin x \quad \sin x$ $\sin x \neq 0$, the number $k$ does not divide 1010.

In the second case, we get $1010 x=\frac{\pi}{4}+\pi k, k \in \mathbb{Z}$, from which $x=\frac{\pi+4 \pi k}{4040}, k \in \mathbb{Z}$. For these numbers, $\sin x \neq 0$, so no numbers need to be excluded from this set of solutions.