Step 1: Solve the equation.
We are given the equation \( \tan^2 \theta = 1 \). Taking the square root of both sides, we get:
\[
\tan \theta = \pm 1
\]
Step 2: Solve for \( \theta \).
The general solution for \( \tan \theta = 1 \) is:
\[
\theta = \frac{\pi}{4} + n\pi \text{where} n \in \mathbb{Z}
\]
The general solution for \( \tan \theta = -1 \) is:
\[
\theta = \frac{3\pi}{4} + n\pi \text{where} n \in \mathbb{Z}
\]
Step 3: Combine the solutions.
Thus, the general solution is:
\[
\theta = \frac{\pi}{4} + n\pi \text{or} \theta = \frac{3\pi}{4} + n\pi \text{where} n \in \mathbb{Z}
\]
Final Answer: \[ \boxed{\theta = \frac{\pi}{4} + n\pi \text{ or } \theta = \frac{3\pi}{4} + n\pi \text{where} n \in \mathbb{Z}} \]
The number of solutions of the equation $ \cos 2\theta \cos \left( \frac{\theta}{2} \right) + \cos \left( \frac{5\theta}{2} \right) = 2 \cos^3 \left( \frac{5\theta}{2} \right) $ in the interval \(\left[ -\frac{\pi}{2}, \frac{\pi}{2} \right ]\) is: