Hi ↑ stuart clark:
This might work:
Skrytý text:First of all there is
![kopírovat do textarea $\cos{(mx)} = \cos{[m(2\pi - x)]}$](/mathtex/7a/7ae16a40a3a3a564d277d76c5f203282.gif)
for
![kopírovat do textarea $x\in [0,\pi]$](/mathtex/96/96c58ab913f49e0415f17388d6692778.gif)
and

with nonzero
values on the interval boundaries, so we can look for the roots on the interval
![kopírovat do textarea $[0,\pi]$](/mathtex/13/1337ed550e0d119c374eaa7a1ed6fc47.gif)
and then double the count.
Then, for fixed

assuming

, for every

, there is for


So no matter what, in all points

the sign of the value of

is determined by expression

,
which is positive for even

and negative for odd

and it therefore alternates running through those

points.
By intermediate value theorem,

has at least

real zeros inside the interval
![kopírovat do textarea $[0,\pi]$](/mathtex/13/1337ed550e0d119c374eaa7a1ed6fc47.gif)
.
On the other hand,

can be transformed into

using transformation

on each term , where

is
Chebyshev polynomial of the first kind of degree

.
Note that on interval
![kopírovat do textarea $[0,\pi]$](/mathtex/13/1337ed550e0d119c374eaa7a1ed6fc47.gif)
where we work,

is injective function.
Thus

becomes ultimately polynomial of degree

; also visible in explicit expression

.
As such, it has at most

real zeros.
This leads to final result that

has

real roots on the interval
![kopírovat do textarea $[0,2\pi]$](/mathtex/15/15c80fb5b47715783a5fa5e1aeed97f1.gif)
.