# Math Help - Integral problem

1. ## Integral problem

I am trying to solve the integral:

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

This is what I did:

$u = tan(x)$
$x = arctan(u)$
$dx = (1+u^2) du$

So that the integral is:

$\int\frac{u{^2}(1+u^2)}{1 + 2u{^2}} du$

Then I did polynomial division, and got that:

$\int\frac{u{^2}(1+u^2)}{1 + 2u{^2}} du$ =

$\int\frac{1}{2}u^2 + \frac{1}{4} -\frac{1}{4}\frac{1}{2u^2+1} du$

But the according to Wolfram, the answer that I should have got from the integral I started solving, is not the same as the answer to this new integral.

What mistake did I do?

2. you are doing it right..after integrating, you have to substitute back the value of u, which is tanx.

Edit: A correction is needed in the step where you found dx. Look at the post below.

3. Is...

$\displaystyle u= \tan x \implies x = \tan^{-1} u \implies \frac{dx}{du}= \frac{1}{1+u^{2}}$

Kind regards

$\chi$ $\sigma$

4. You might go an other way, or whatever we like to cal it. If we massage the trigonometric functions out of $tan²x$ instead.

$\displaystyle tan²x = \frac{sin²x}{cos²x} = \frac{\frac{1-cos 2x}{2}}{\frac{1+cos2x}{2}} = \frac{1-cos 2x}{1+cos2x}$

$\displaystyle \frac{tan²x}{1+2tan²x} = \frac{\frac{1-cos 2x}{1+cos2x}}{1+2 \left( \frac{1-cos 2x}{1+cos2x} \right)} = \frac{\frac{1-cos 2x}{1+cos2x}}{\frac{1+cos2x + 2-2cos 2x}{1+cos2x} } = \frac{1-cos 2x}{3-cos2x} } = \frac{2-2 + 1-cos 2x}{3-cos2x} = 1 - \frac{2}{3-cos2x}$
Try solving $\int 1 - \frac{2}{3-cos2x} dx$ and see if it computes.
$\displaystyle \int\frac{\tan^2{x}}{1+2\tan^2{x}}\;{dx} = \frac{1}{2}\int\frac{2\tan^2{x}-1+1}{1+2\tan^2{x}}\;{dx} = \frac{1}{2}\;{x}-\frac{1}{2}\int\frac{1}{1+2\tan^2{x}}\;{dx}.$