# Rewriting integrals

1. Jan 28, 2008

### shwin

How does one evaluate $$\int (arctan(pi*x) - arctan(x))dx$$ from 0 to 2 by rewriting the integrand as an integral?

Last edited: Jan 28, 2008
2. Jan 28, 2008

### HallsofIvy

Staff Emeritus
The point is that you have F(b)- F(a) which can be written as
[tex]\int_a^b f(x) dx[/itex] where f is the derivative of F. The derivative of arctan(x) is
[tex]\frac{x^2+ 1}[/itex] so this could be
[tex]\int_0^2 \int_x^{\pi x} \frac{1}{t^2+ 1} dt dx[/itex]

Now see what happens if you reverse the order of integration:
For every x, t goes from x to $\pi x$ so boundaries on the region on which you are integrating are t= x, t= $\pi x$, and x= 2 (x= 0 just gives the intersection of the two straight lines).

If you reverse the order of integration, you will need to take t going from 0 to $2\pi$. The limits of integration for x are a bit more complicated. The left end will be at $t= \pi x$ or $x= t/\pi$. For t between 0 and 2, the right end will be t= x or x= t, but for t between 2 and $2\pi$ the right end is at x= 2. The integral is
[tex]\int_{t=0}^2 \int_{x= t/\pi}^t \frac{1}{1+ t^2} dx dt+ \int_{t= 2}^{2\pi} \int_{x= t/\pi}^2 \frac{1}{1+t^2} dx dt[/itex]