First note that $\cos$ is an even function; $\cos(-X)=\cos(X)$. Consequently it's the same as taking $\cos(W)$ where $W=|X|$ (or indeed you could work instead with $\cos(-W)$). Now $W$ is uniform on $[0,\pi)$. This is easier because the $\cos$ function is now monotonic over the values taken by the new variable and is now invertible.
Let $Y=\cos(W)$. Note that $P(W\leq w) = w/\pi$
\begin{eqnarray}
F_Y(y)&=&P(Y\leq y)\\
&=&P(\cos(W)\leq y) \\
&=& P(W\geq \cos^{-1}(y)) \\
&=& P(W\leq \cos^{-1}(-y)) \\
&=&\cos^{-1}(-y)/\pi \\[20pt]
f_Y(y)&=&\frac{d}{dy}F_Y(y)\\
&=&\frac{1}{\pi}\frac{d}{dy}\cos^{-1}(-y)
\end{eqnarray}
Now $\frac{d}{dx} g^{-1}(x) = \frac{1}{g'(g^{-1}(x))}$, so
\begin{eqnarray}
\frac{1}{\pi}\frac{d}{dy}\cos^{-1}(-y)&=&
-\frac{1}{\pi}\frac{d}{dy}\cos^{-1}(y)\\
&=&
\frac{1}{\pi}\cdot\frac{1}{\sin(\cos^{-1}(y))}\,,\:-1<y<1
\end{eqnarray}
Or, using the fact that $\frac{d}{dx}\cos^{-1}(x)=-\frac{1}{\sqrt{1-x^2}}$,
\begin{eqnarray}
-\frac{1}{\pi}\frac{d}{dy}\cos^{-1}(-y)&=&\frac{1}{\pi}\cdot \frac{1}{\sqrt{1-y^2}}\,,\:-1<y<1
\end{eqnarray}