# Primitive function

1. Jun 7, 2005

### twoflower

Hi,
I don't know how to find this primitive function:

$$\int \frac{dx}{(1+\tan x)(1+\tan^2 x)}$$

I tried substitutions $t = \tan x$ or $t = 1 + \tan x$, but it didn't seem to help me lot...

Could someone please point me to the right direction?

Thank you.

2. Jun 7, 2005

### arildno

1. Set $$t=tan(x)\to\frac{dt}{dx}=\frac{1}{\cos^{2}(x)}=tan^{2}x+1\to{dx}=\frac{dt}{t^{2}+1}$$
Thus, you've got:
$$\int\frac{dx}{(1+tan(x))(1+tan^{2}x)}=\int\frac{dt}{(1+t)(t^{2}+1)^{2}}$$
This can be solved by partial fractions decomposition.

3. Jun 7, 2005

### twoflower

Thank you arildno, I made a mistake that I didn't simply change tan x = t and dx = dt/t^2 + 1, instead I expressed tan x as sin x / cos x and divided the denominator with cos^2 x and it turned into crazy powers of t. Your method works great, thanks.