Trig integral help

Homework Statement

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

n/a

The Attempt at a Solution

Here's what I've tried:
u=tanx
x=arctanu

dx=$$\frac{du}{1+u^2}$$

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

I then used partial fractions to get:
$$\int$$$$\frac{0.5}{1-u^2}$$+$$\frac{0.5}{1+u^2}$$du

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

The left side is simply arctanu while I used trig substitution to solve the right side
$$\frac{1}{2}$$arctanu-$$\frac{1}{2}$$$$\int$$csc$$\theta$$d$$\theta$$

$$\frac{1}{2}$$arctan(tanx)+$$\frac{1}{2}$$ln(csc$$\theta$$+cot$$\theta$$) + C

$$\frac{1}{2}$$x + $$\frac{1}{2}$$ln($$\frac{1}{\sqrt{1-u^2}}$$+$$\frac{u}{\sqrt{1-u^2}}$$) + C

With more re-substitution, I end up with:

$$\frac{1}{2}$$x+$$\frac{1}{2}$$ln(tanx+1)-$$\frac{1}{2}$$ln($$\sqrt{1-tan(x)^2}$$+C

For some reason, this is incorrect because when I try to take the derivative of that, I do not end up with $$\frac{1}{1-tan(x)^2}$$

Is there something I'm doing wrong? What should I do?

Related Calculus and Beyond Homework Help News on Phys.org
I'd like to see your work with the partial fractions.

Did it look like ... $$\frac{1}{(1+u^2)(1-u^2)}=\frac{Ax+B}{1+u^2}+\frac{Cx+D}{1-u^2}$$ ... ?

rock.freak667
Homework Helper
I'd like to see your work with the partial fractions.

Did it look like ... $$\frac{1}{(1+u^2)(1-u^2)}=\frac{Au+B}{1+u^2}+\frac{Cu+D}{1-u^2}$$ ... ?
Shouldn't it be

$$\frac{1}{(1+u^2)(1-u)(1+u)} \equiv \frac{Au+B}{1+u^2}+\frac{C}{1-u}+ \frac{D}{1+u}$$

or does it not matter about the $1-u^2$?

Shouldn't it be

$$\frac{1}{(1+u^2)(1-u)(1+u)} \equiv \frac{Au+B}{1+u^2}+\frac{C}{1-u}+ \frac{D}{1+u}$$

or does it not matter about the $1-u^2$?
Good question, I overlooked that part.

exk
I think his decomposition is valid (it certainly combines back correctly).

Try using this: $$\int \frac{1}{a^{2}-u^{2}}du = \frac{1}{2a}\ln{\frac{|u+a|}{|u-a|}}+c$$

For your sake I hope you are using a calculator when you work it out.

To rocomath: yes, my partial fractions work did look like that. I did not try it the way rock.freak667 did it. Does it matter?

To exk: Thanks for the help, but could you maybe explain how that you got that integral? And yes, I am using a calculator : D

Gib Z
Homework Helper
He got that integral through partial fractions again, and then using $\log b - \log a = \log \left( \frac{b}{a}\right)$

benorin
Homework Helper
I think his decomposition is valid (it certainly combines back correctly).

Try using this: $$\int \frac{1}{a^{2}-u^{2}}du = \frac{1}{2a}\ln{\frac{|u+a|}{|u-a|}}+c$$

For your sake I hope you are using a calculator when you work it out.
To do this integral, use partial fractions and integrate.

How do I make

$$\int$$$$\frac{dx}{1-tan^2x}$$ look like $$\int$$$$\frac{du}{a^2-u^2}$$ though?

Do I need to subtitute u=tanx? If so, I don't know how to change the variable of integration so that it matches that the second integral

Or can I simply take tanx as plug it into that equation?

benorin
Homework Helper
Wow! noblerare, your solution is correct!

$$\int\frac{dx}{1-\tan^2 x}=\frac{1}{2}x+\frac{1}{2}\ln\left( 1+ \tan x\right)-\frac{1}{2}\ln \sqrt{1- \tan^2 x}+C$$

Check:

$$\frac{d}{dx}\left[\frac{1}{2}x+\frac{1}{2}\ln\left( 1+ \tan x\right)-\frac{1}{2}\ln \sqrt{1- \tan^2 x}+C\right] = \frac{1}{2}+\frac{\sec^2 x}{2(1+ \tan x)}+\frac{\sec^2 x\tan x}{2(1- \tan^2 x)} = \frac{1}{1- \tan^2 x}$$

exk
How do I make

$$\int$$$$\frac{dx}{1-tan^2x}$$ look like $$\int$$$$\frac{du}{a^2-u^2}$$ though?

Do I need to subtitute u=tanx? If so, I don't know how to change the variable of integration so that it matches that the second integral

Or can I simply take tanx as plug it into that equation?
$$\frac{1}{2}\int\frac{du}{1+u^2}+\frac{1}{2}\int\frac{du}{1-u^2}$$