# Integral of sqrt(tan x)

#### murshid_islam

$$\int\sqrt{\tan (x)}dx$$

After using the substitution, u2 = tan(x), I got,

$$2\int\frac{u^2}{u^4 + 1}du = 2\int\frac{u^2}{\left(u^2 + \sqrt{2}u + 1\right)\left(u^2 - \sqrt{2}u + 1\right)}du$$

Next, I tried the partial fraction expansion. But it turned pretty ugly. Is there any easier way of doing it?

#### nicksauce

Homework Helper
If it is a definite integral, I think contour integration would be the way to go... otherwise I can't think of a way to make it nice.

#### dextercioby

Homework Helper
I don't think there's a neater way to compute it other than the method you already have.

#### Gib Z

Homework Helper
There is;

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

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

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

#### murshid_islam

There is;

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

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

$$= \int \frac{ d(u-\frac{1}{u})}{ (u-\frac{1}{u})^2 +2} du + \int \frac{ d(u+\frac{1}{u})}{ (u+\frac{1}{u})^2 -2} du$$
I'm sorry, but I don't see exactly how that helps.

#### Gib Z

Homework Helper
The remaining integrals are of forms which are generally considered standard integrals;

$$\int \frac{dx}{x^2+a^2} = \frac{1}{a} \tan^{-1} \frac{x}{a} + C$$

$$\int \frac{dx}{x^2-a^2} = \frac{1}{2a} \log_e \left( \frac{x-a}{x+a}\right) + C$$

#### murshid_islam

But how do I deal with the $d\left(u-\frac{1}{u}\right)$ and $d\left(u+\frac{1}{u}\right)$ in the numerators of the integrals?

#### Count Iblis

Substitution: put z = u-1/u in the first integral and z = u+1/u in the second integral

#### TheoMcCloskey

murshid_islam - Just to be clear, the trailing $du$ in Gib Z's brillant integrals should be deleted. The form of the integrals are really

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

Do you now understand how the substitution gets to the integral forms in his second post?

#### murshid_islam

murshid_islam - Just to be clear, the trailing $du$ in Gib Z's brillant integrals should be deleted.
Thanks a lot. Now everything is clear to me.

Do you now understand how the substitution gets to the integral forms in his second post?
Oh yes, now I understand.

#### Gib Z

Homework Helper
Argh! All that latex code makes me forget what I'm actually typing and it's just instict to jab a du in there after an integral! Sorry murshid_islam!

### The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving