# Evaluating integral, first year calculus

We started integrals not too long ago, I understand it for the most part but I always have a problem figuring out how to solve ones involving trig identities. Like this:

$$\int \frac{1+\cos^{2}x}{1+\cos2x}$$

Indefinite integral of $$\frac{ 1 + \cos^2(x)}{ 1 + \cos(2x) }.$$

I tried changing the denominator to $2\cos^2(x)$ but I still can't make a u substitution.

-
$\frac{1+\cos^2 x}{\cos^2 x}=\sec^2 x+1$. –  André Nicolas Jan 27 '13 at 1:42

$$1+\cos{2x}=2 \cos^2{x}$$
$$1/\cos^2{x}=\frac{d}{dx} \tan{x}$$
Thanks. I forgot about the derivative of tanx. I got $\frac {tanx}{2} + \frac {x}{2}$. –  Ddayne Jan 27 '13 at 1:49