Solve the first order ordinary differential equation $y'(x)=2x \cos^2 y(x)$ 
Solve $$y'(x) =2x \cos^2 y(x) .$$

\begin{align}
\frac{dy}{dx} &= \ 2x \cos^2 y(x) \\
\frac{dy}{\cos^2 y(x)} &=2x \, dx \\
\tan y(x) &=x^2+k, \qquad\qquad k \in \mathbb{R} \\
y(x) &=\arctan (x^2+k)
\end{align}
Is is correct?
Thanks!

You can check if your proposed solution actually solves the equation. Let's calculate the derivative:
$$
y(x) = \arctan(x^2 + k)\\
y'(x) = \frac{2x}{(x^2+k)^2+1}
$$
This should equal $2x\cos^2(y(x))$ if $y(x)$ solved the original equation:
$$
2x\cos^2(y(x)) = 2x\cos^2(\arctan(x^2 + k)) = 2x\left(\frac{1}{\sqrt{(x^2+k)^2+1}}\right)^2 = \frac{2x}{(x^2+k)^2+1}
$$
Since those are the same quantity, you can say that what you derived solves the equation. Some comments and other answer underscore that that this may not be a unique solution since the inverse tangent of the tangent of an angle is not necessarily the original angle.
