Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working through an integral suggested for practice at the end of the Wikipedia article on differentiation under the integral sign, and I'm stuck.

I am attempting to evaluate this integral:

$$\int_0^{\pi/2} \frac{x}{\tan x} \ dx.$$

The article suggests the following parameterization:

$$F(a)=\int_0^{\pi/2} \frac{\tan^{-1}(a\tan (x))}{\tan x} \ dx.$$

Differentiating with respect to $a$, we get

$$F'(a)=\int_0^{\pi/2} \frac{1}{1+a^2\tan^2 x} \ dx.$$

I can't find a way to evaluate this, and neither can Wolfram Alpha. The special values $a=0,1$ are easy, but I fail to see how they help.

How can I finish evaluating this integral?

Edit: I think it's just substitution, maybe. I'll update the post accordingly soon.

Edit 2: Indeed, the substitution $u=\tan x$ and identity $\sec^2 = 1 + \tan^2$ transform the above integral into

$$F'(a) = \int_0^{\pi/2} \frac{1}{(1+u^2)(1+a^2u^2)}.$$

This can be solved with partial fractions.

share|cite|improve this question
What happened to posting the solutions to all of Rudin's exercises? – William Jul 5 '12 at 3:15
Is that a serious question? – Potato Jul 5 '12 at 3:15
I am actually thinking about possibly posting the solution to all the exercises from some textbook sometime in the future. I even asked the following meta question… I wanted to see how that was going for you. – William Jul 5 '12 at 3:19
It was never my intent to write up all of them, just a few. I wanted to review a few concepts. – Potato Jul 5 '12 at 3:20
Possible duplicate (even though none of the answers use diff. under the integral):… – Joe Jul 5 '12 at 4:07
up vote 3 down vote accepted

You have that

$$\frac{1}{{\left( {1 + {u^2}} \right)\left( {1 + {a^2}{u^2}} \right)}} = \left( {\frac{A}{{1 + {u^2}}} + \frac{B}{{1 + {a^2}{u^2}}}} \right)$$

Thus you want (after cross mult.)

$$1 = A + A{a^2}{u^2} + B + B{u^2}$$

This is

$$\eqalign{ & A + B = 1 \cr & A{a^2} + B = 0 \cr} $$

Which gives

$$A = \frac{1}{{1 - {a^2}}}$$

and in turn

$$B = 1 - A = \frac{{{a^2}}}{{{a^2} - 1}}$$

which means

$$\frac{1}{{\left( {1 + {u^2}} \right)\left( {1 + {a^2}{u^2}} \right)}} = \frac{1}{{{a^2} - 1}}\left( {\frac{{{a^2}}}{{1 + {a^2}{u^2}}} - \frac{1}{{1 + {u^2}}}} \right)$$

Can you move on?

share|cite|improve this answer
Yes, I've done it out in full. I just missed the substitution I noted in my original post. – Potato Jul 5 '12 at 3:47
@Potato I'll delete this then, I guess. – Pedro Tamaroff Jul 5 '12 at 3:47
It's nice to have around. Please don't. – Potato Jul 5 '12 at 3:48

Mathematica can do this integral just fine:

$$F'(a) = \frac{a \tan^{-1}(a \tan x)-\tan^{-1}(\tan x)}{a^2-1} \Bigg|_{0}^{\tfrac{\pi}{2}} = \frac{\pi}{2+2a}.$$

Hence the desired integral is: $$F(1) = F(0) +\int_{0}^{1} \! \frac{\pi}{2+2a}\,\mathrm{d}a =\frac{\pi}{2} \log(2).$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.