# How do you integrate int (tan2x+cot2x)^2 using substitution?

Mar 28, 2017

$= \frac{1}{2} \tan 2 x - \frac{1}{2} \cot 2 x + C$

#### Explanation:

There is no need to use substitution, it makes the integral more difficult. Simple trig identities will reduce to it to something more manageable

$\int \left({\left(\tan 2 x + \cot 2 x\right)}^{2}\right) \mathrm{dx}$

multiply out

$\int \left({\tan}^{2} 2 x + 2 \tan 2 x \cot 2 x + {\cot}^{2} 2 x\right) \mathrm{dx}$

$\tan 2 x = \frac{1}{\cot 2 x} \implies \tan 2 x \cot 2 x = 1$

$= \int \left({\tan}^{2} 2 x + 2 + {\cot}^{2} 2 x\right) \mathrm{dx}$

now $1 + {\tan}^{2} \theta = {\sec}^{2} \theta$

and $1 + {\cot}^{2} \theta = {\csc}^{2} \theta$

so the integral becomes

$\int \left({\sec}^{2} 2 x + {\csc}^{2} 2 x\right) \mathrm{dx}$

these are standard integrals

so we have

$= \frac{1}{2} \tan 2 x - \frac{1}{2} \cot 2 x + C$

Mar 28, 2017

If you wanted to use substitution this is a possible solution

we have to rearrange the integral first

$\int {\left(\tan 2 x + \cot 2 x\right)}^{2} \mathrm{dx} = \int {\left(\tan 2 x + \frac{1}{\tan 2 x}\right)}^{2} \mathrm{dx}$

$= \int {\left(\frac{{\tan}^{2} 2 x + 1}{\tan 2 x}\right)}^{2} \mathrm{dx} = \int \frac{\left({\tan}^{2} 2 x + 1\right) \left({\tan}^{2} 2 x + 1\right)}{{\tan}^{2} 2 x} \mathrm{dx}$

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

now substitute

$u = \tan 2 x \implies \mathrm{du} = 2 {\sec}^{2} x \mathrm{dx}$

=intcancel((sec^2 2x))(u^2+1)/u^2xx(du)/(2cancel((sec^2 2x))

$= \frac{1}{2} \int \left(1 + \frac{1}{u} ^ 2\right) \mathrm{dx}$

$= \frac{1}{2} \left(u - \frac{1}{u}\right) + C$

$= \frac{1}{2} \left(\tan 2 x - \frac{1}{\tan} 2 x\right) + C$

$= \frac{1}{2} \left(\tan 2 x - \cot 2 x\right) + C$