Given equation:
\(\sin \left(\theta + \frac{\pi}{6} \right) = \cos \theta\)
Using the identity:
\(\cos \theta = \sin \left(\frac{\pi}{2} - \theta\right)\), we rewrite the equation as:
\(\sin \left(\theta + \frac{\pi}{6} \right) = \sin \left(\frac{\pi}{2} - \theta\right)\)
For \(\sin A = \sin B\), the general solution is:
\(A = B + 2k\pi\) or \(A = \pi - B + 2k\pi\) for some integer \(k\).
Applying this to our equation:
\(\theta + \frac{\pi}{6} = \frac{\pi}{2} - \theta\)
Solving for \(\theta\):
\(\theta + \theta = \frac{\pi}{2} - \frac{\pi}{6}\)
\(2\theta = \frac{\pi}{3}\)
\(\theta = \frac{\pi}{6}\)
Since \(\theta\) lies in the given range \(0 \leq \theta \leq \frac{\pi}{2}\), the valid solution is:
\(\theta = \frac{\pi}{6}\)