# Primitive function

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.

Related Introductory Physics Homework Help News on Phys.org
arildno
Homework Helper
Gold Member
Dearly Missed
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.

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.