# Anyone know how to integrate (Tanx)^2(Secx) thanks

1. Dec 5, 2008

### coverband

(Tanx)^2(Secx)

2. Dec 5, 2008

### HallsofIvy

Not necessarily the simplest: tan(x)= sin(x)/cos(x) and sec(x)= 1/cos(x) so tan^2(x) sec(x)= sin^2(x)/cos^3(x). That involves cosine to an odd power so we can "factor out" one to use with a substitution. Specifically, multiply both numerator and denominator by cos(x) to get sin^2(x)cos(x)/cos^4(x). cos^4(x)= (cos^2(x))^2=(1- sin^2(x))^2 so let u= sin(x). Then du= cos(x) dx so the integral becomes
$$\int \frac{u^2}{(1-u^2)^2} du$$
That integral can be done by partial fractions.

3. Dec 5, 2008

Here's another substitution you could make, inspired by stereographic projection, and it always works when you have a rational function of trigonometric functions of x.

Let $$u = \tan(x/2)$$. From that, using various trigonometric identities, obtain the following:
$$\sin x = \frac{2u}{1+u^2}; \cos x = \frac{1-u^2}{1+u^2}; dx = \frac{2 \,du}{1+u^2}$$
and in particular
$$\tan x = \frac{2u}{1-u^2}; \sec x = \frac{1+u^2}{1-u^2}.$$
$$\int \tan^2 x \sec x \,dx = \int \frac{8u^2}{(1-u^2)^3} \,du$$
which can be done by partial fractions. Admittedly, you've ended up with a higher degree denominator than what HallsofIvy gets, but again it always reduces a rational function of trig functions to a rational function of u, which can be done by partial fractions (or if you're lucky, substitution).

Last edited: Dec 5, 2008
4. Dec 7, 2008

### Gib Z

Expanding using Pythagorean Identities yields

$$\int \tan^2 x \sec x dx = \int \sec^3 x dx - \int \sec x dx$$

The second integral, upon multiplying both the numerator and denominator by (sec x + tan x), evaluates to log |sec x + tan x|+ C

The first requires integration by parts. You should be able to see the integral you want on both sides of the equation now, so isolate it and solve.

5. Dec 7, 2008

### Hurkyl

Staff Emeritus
My calculus book gives an algorithm that can be used to solve all such kinds of trigonometric integrals. Doesn't yours have a similar thing?

6. Dec 7, 2008