# Bob's question at Yahoo! Answers regarding an indefinite integral

#### MarkFL

##### Administrator
Staff member
Here is the question:

I need help integrating a Calculus 2 problem?

How do I integrate tan^3(1/z)/z^2 dz
Please show all work and thanks for the help
I have posted a link there to this topic so the OP can see my work.

#### MarkFL

##### Administrator
Staff member
Hello Bob,

We are given to integrate:

$$\displaystyle \int\frac{\tan^3\left(\frac{1}{z} \right)}{z^2}\,dz$$

Let's use the substitution:

$$\displaystyle u=\frac{1}{z}\,\therefore\,du=-\frac{1}{z^2}\,dz$$

and the integral becomes:

$$\displaystyle -\int\tan^3(u)\,du$$

Next, let's employ the Pythagorean identity $$\displaystyle \tan^2(x)+1=\sec^2(x)$$, and rewrite the integral as:

$$\displaystyle -\int\tan(u)\cdot\tan^2(u)\,du=-\int\tan(u)\left(\sec^2(u)-1 \right)\,du=-\int\tan(u)\sec^2(u)-\tan(u)\,du=$$

$$\displaystyle \int\frac{\sin(u)}{\cos(u)}\,du-\int\tan(u)\sec^2(u)\,du$$

On the first integral, use the substitution:

$$\displaystyle v=\cos(u)\,\therefore\,dv=-\sin(u)\,du$$

On the second integral, use the substitution:

$$\displaystyle w=\tan(u)\,\therefore\,dw=\sec^2(u)\,du$$

And now we have:

$$\displaystyle -\int\frac{1}{v}\,dv-\int w\,dw=-\ln|v|-\frac{w^2}{2}+C$$

Back-substituting for $v$ and $w$, we have:

$$\displaystyle \ln|\sec(u)|-\frac{1}{2}\tan^2(u)+C$$

Back-substituting for $u$, we have:

$$\displaystyle \ln\left|\sec\left(\frac{1}{z} \right) \right|-\frac{1}{2}\tan^2\left(\frac{1}{z} \right)+C$$

Hence, we may state:

$$\displaystyle \int\frac{\tan^3\left(\frac{1}{z} \right)}{z^2}\,dz=\ln\left|\sec\left(\frac{1}{z} \right) \right|-\frac{1}{2}\tan^2\left(\frac{1}{z} \right)+C$$