Let $\displaystyle y = cos(x)$. Then $\displaystyle dy = -sin(x) dx$. So your integral becomes:
$\displaystyle \int \frac{sin(x)~dx}{1+ cos^2(x)} = \int \frac{-dy}{1 + y^2}$
Let $\displaystyle y = cos(x)$. Then $\displaystyle dy = -sin(x) dx$. So your integral becomes:
$\displaystyle \int \frac{sin(x)~dx}{1+ cos^2(x)} = \int \frac{-dy}{1 + y^2}$
Whoops... I'd throw $\displaystyle \cos(x)$ in place of $\displaystyle u$ though, right?
Yup! Yup!
Actually, if you know the quadrant x is in you can simplify the $\displaystyle atn(cos(x))$ expression somewhat. But if it's an indefinite integral then you'll have to leave it like that.