Originally Posted by

**MarkFL2** If your original integral is:

$\displaystyle \int \tan\left(\frac{x}{2} \right)\sec^2\left(\frac{x}{2} \right)+\sec^2\left(\frac{x}{2} \right)\,dx$

I would first factor the integrand:

$\displaystyle \int \sec^2\left(\frac{x}{2} \right)\left(\tan\left(\frac{x}{2} \right)+1 \right)\,dx$

Now, let:

$\displaystyle u=\tan\left(\frac{x}{2} \right)+1\,\therefore\,du=\frac{1}{2}\sec^2\left( \frac{x}{2} \right)\,dx$

and the integral becomes:

$\displaystyle 2\int u\,du$

Now, find the anti-derivative, then back-substitute for $\displaystyle u$.