# Evaluating an Improper Integral using a Double Integral

1. Oct 16, 2014

### whoareyou

1. The problem statement, all variables and given/known data

Here is a more interesting problem to consider. We want to evaluate the improper integral

$$\intop_{0}^{\infty}\frac{\tan^{-1}(6x)-\tan^{-1}(2x)}{x}dx$$

Do it by rewriting the numerator of the integrand as $$\intop_{f(x)}^{g(x)}h(y)dy$$ for appropriate $f, g, h$ and then reversing the order of integration in the resulting double integral.

2. Relevant equations

--

3. The attempt at a solution

Writing the numerator of the integrand as an integral:
$$\Rightarrow\intop_{0}^{\infty}\frac{\intop_{2x}^{6x}\frac{1}{1+y^{2}}dy}{x}dx$$
$$\Rightarrow\intop_{0}^{\infty}\frac{1}{x}\intop_{2x}^{6x}\frac{1}{1+y^{2}}dydx$$
$$\Rightarrow\intop_{2x}^{6x}\frac{1}{x}\intop_{0}^{\infty}\frac{1}{1+y^{2}}dxdy$$

But it seems to be a dead end from here since you have to evaluate x at infinity and 0. I don't know how to continue from here.

2. Oct 16, 2014

### RUber

Can you change the limits of integration so the interior limits are in terms of y? And the exterior limits might be for y from zero to infinity.

3. Oct 17, 2014

### Staff: Mentor

Minor point. The "implies" arrow, $\Rightarrow$, should not be used in place of =; i.e., between expressions that have equal values. Because it means "implies" you also shouldn't use it is the first symbol you write in your work.

"Implies" should be used between two statements (generally equations or inequalities) where the first being true means that the following statement will also be true.

As a simple example,
$$x^2 - 3x + 2 = 0$$
$$\Rightarrow (x - 2)(x - 1) = 0$$
$$\Rightarrow x = 2 \text{ or } x = 1$$

4. Oct 17, 2014

### whoareyou

I don't understand? The question specifically says that the bounds for the integral in the numerator should be functions of x.

Edit: I think I made a mistake with the bounds when I switched the order of integration. I think it should be:

$$\intop_{y/2}^{y/6}\frac{1}{x}\intop_{0}^{\infty}\frac{1}{1+y^{2}}dxdy$$

But I still run into the same problem ...

Thanks for the explanation! I always try to make my answers more formal by trying to write my solutions as they would appear in the textbook.

Last edited: Oct 17, 2014
5. Oct 17, 2014

### RUber

Your 1/x should be inside the integral with respect to x. Also the limits in terms of y have to be on the inside integral with respect to x. That should take care if the infinity problem.

6. Oct 17, 2014

### Ray Vickson

$$\int_{x=0}^{\infty} \int_{y=2x}^{6x} \cdots \: dy \: dx$$
Here, $x$ goes from 0 to $\infty$ and $y$ goes from $2x$ to $6x$. So, if you draw an $xy$ diagram and plot the integration region, you will see that any $y$ from $0$ to $\infty$ can occur, and for any fixed $y > 0$, $x$ will run from $y/6$ to $y/2$. Thus, you can write, instead:
$$\int_{y=0}^{\infty} \int_{x=y/6}^{y/3} \cdots \: dx \: dy$$

7. Oct 17, 2014

### LCKurtz

$$\Rightarrow\intop_{0}^{\infty}\frac{1}{x}\intop_{2x}^{6x}\frac{1}{1+y^{2}}dydx$$
$$\Rightarrow\intop_{2x}^{6x}\frac{1}{x}\intop_{0}^{\infty}\frac{1}{1+y^{2}}dxdy$$

But it seems to be a dead end from here since you have to evaluate x at infinity and 0. I don't know how to continue from here.[/QUOTE]

When you change the order of integration you have to change the limits accordingly. You need to draw a picture of the region of integration to see the dxdy limits. Draw a picture of the region described in the first integral above between $y=2x$ and $y=6x$ as $x$ goes from $0$ to $\infty$. Then set it up as a dxdy integral using the picture.

8. Oct 17, 2014

### whoareyou

Following your suggestions, I got this:
$$\intop_{0}^{\infty}\frac{\tan^{-1}(6x)-\tan^{-1}(2x)}{x}dx$$
$$=\intop_{0}^{\infty}\frac{\intop_{2x}^{6x}\frac{1}{1+y^{2}}dy}{x}dx$$
$$=\intop_{0}^{\infty}\frac{1}{x}\intop_{2x}^{6x}\frac{1}{1+y^{2}}dydx$$
$$=\intop_{0}^{\infty}\intop_{2x}^{6x}\frac{1}{x}\frac{1}{1+y^{2}}dydx$$
$$=\intop_{0}^{\infty}\intop_{y/6}^{y/2}\frac{1}{x}\frac{1}{1+y^{2}}dxdy$$
$$=\intop_{0}^{\infty}\frac{1}{1+y^{2}}\intop_{y/6}^{y/2}\frac{1}{x}dxdy$$
$$=\intop_{0}^{\infty}\frac{1}{1+y^{2}}[\ln(x)]^{y/2}_{y/6}dy$$
$$=\intop_{0}^{\infty}\frac{1}{1+y^{2}}[\ln(3)]dy$$
$$=\ln(3)\intop_{0}^{\infty}\frac{1}{1+y^{2}}dy$$
$$=\ln(3)[\tan^{-1}(x)]^{\infty}_{0}$$
$$=\frac{\pi}{2}\ln(3)$$

This seems to be the correct answer. However, I'm unsure of the validity of the steps. Like in the third step, is it legal to just bring the 1/x inside the second integral?

9. Oct 17, 2014

### HallsofIvy

Yes, that is always valid. As far as integration with respect to y is concerned, "x" is a constant. $\frac{1}{x}\int_{2x}^{6x} \frac{1}{x^2+ 1} dy= \int_{2x}^{6x} \frac{1}{x}\frac{1}{y^2+ 1} dy$ is exactly the same as $C\int_{2x}^{6x} \frac{1}{x^2+ 1} dy= \int_{2x}^{6x} C\frac{1}{y^2+ 1} dy$