# Integration by substitution $r=\tan\theta$

Let's calculate the integration

$$\int_{0}^{\infty}\frac{r^{n-1}}{(1+r^2)^{(n+1)/2}}dr.$$

then let $r=\tan\theta$,

according to my book, its result is

$$\int_{0}^{\pi/2}\sin^{n-1}\theta d\theta.$$

but my calculation is

$$\int_{0}^{\pi/2}\cos^{2}\theta \sin^{n-1}\theta d\theta.$$

Is my book wrong?

-
Did you forget $dr = \dfrac{1}{\cos^2\theta}d\theta$? –  Jonas Meyer Sep 18 '12 at 3:55
yes.you're right.... –  user39843 Sep 18 '12 at 4:35

The book is right. When you make the substitution $r=\tan\theta$, you have $dr=\sec^2\theta\,d\theta$.
So our integral is equal to $$\int_0^{\pi/2} \frac{\tan^{n-1}\theta}{\sec^{n+1}\theta}\sec^2\theta\,d\theta,$$ which simplifies to the book's expression.