# Guessing integrals - change of variable

1. Jul 29, 2012

### SpudsMcGinty

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

I'm working through Mahajan's Street-fighting Mathematics for fun, and am a bit puzzled about the following problem:

3. The attempt at a solution

It's mostly the first part that's tripping me up. I could use the substitution

$tan\theta=x$

and solve both integrals, resulting in

$\frac{\pi}{2} = 2(\frac{\pi}{4})$

but surely that defeats the purpose here, as I'm solving an integral so I can go back and re-solve it using the result...

The substitution

$x = \frac{-2u}{u^2-1}$

results in

$\int^{∞}_{0}\frac{dx}{1+x^{2}} = 2 \int^{1}_{0}\frac{du}{1+u^{2}}$

which is what we want I guess. However, after getting frustrated with trial and error, I figured out that substitution by solving a nonlinear differential equation in Mathematica, which was more work than just solving the integral.

My calculus is a bit rusty - is there some trick for figuring out substitutions that I've forgotten? Is there some easy substitution here that I've missed?

Regarding the rest of the question, when he asks for a closed form does he mean the following? I find the language in US textbooks confusing at times...

$\int\frac{dx}{1+x^{2}} = arctan(x) + C$

2. Jul 29, 2012

### awkward

Hint:
$$\int_0^{\infty} \frac{dx}{1+x^2} =\int_0^1 \frac{dx}{1+x^2}+ \int_1^{\infty} \frac{dx}{1+x^2}$$

By "closed form" he means
$$\int_0^{\infty} \frac{dx}{1+x^2} = \frac{\pi}{2}$$

(Love the book, by the way.)

3. Jul 29, 2012

### SammyS

Staff Emeritus
Hello SpudsMcGinty. Welcome to PF !

For what it's worth, this is my take on the problem ...

Mahajan says to use a change of variable to show that $\displaystyle \int^{∞}_{0}\frac{dx}{1+x^{2}} = 2 \int^{1}_{0}\frac{dx}{1+x^{2}}$

Well, $\displaystyle \frac{1}{1+x^{2}}$ is an even function, so perhaps we need a change of variable which takes $\displaystyle \int^{∞}_{0}\frac{dx}{1+x^{2}} \quad \text{to} \quad \int^{1}_{-1}\ \frac{du}{1+u^{2}}$

In that case, we need the following:

u(0) = -1

u(1) = 0

limx→∞ u(x) = 1

Such a function is $\displaystyle u(x) = \frac{x-1}{x+1}\ .$

I think it will work just fine.

4. Jul 30, 2012

### SpudsMcGinty

@awkward: Yea the book is great. I really like his material on "the art of approximation" too, hopefully he'll publish that in book form too.

Regarding your hint, I'm afraid my math skills are rustier than I thought! (One of the reasons I'm working through the book) I'm not sure how to use that expression...

So by "closed form" he means the solution? I thought closed form usually meant expressing something in terms of well-known functions, rather than a specific numerical value...

@SammyS: I like your suggestion about using the evenness of the function! Unfortunately I don't think the suggested substitution works...

Correct me if I'm wrong, but I think we need a function f(u) such that:

$\frac{1}{1+f(u)^2}f'(u) = \frac{2}{1+u^2}$

5. Jul 30, 2012

### SammyS

Staff Emeritus
Did you try $\displaystyle u(x) = \frac{x-1}{x+1}\ ?$

Finding x(u):

$\displaystyle u = 1-\frac{2}{x+1}$

$\displaystyle \frac{2}{x+1}=1-u$
.
.
.
$\displaystyle x(u) = \frac{2}{1-u}-1$

Equivalently: $\displaystyle x(u) = \frac{1+u}{1-u}\,,$ which is easier to square.

6. Jul 30, 2012

### voko

For the second integral in the sum, try z = 1/x.

7. Jul 30, 2012

### SpudsMcGinty

@SammyS: my apologies, you're absolutely right! Thanks for your help

@voko: Perfect, thanks!

8. Jul 30, 2012

### awkward

I think voko has already given you the final hint you need (I tried to start out with just a _little_ hint and give you some room to complete the problem on your own), but with regard to the "closed form", it's one thing to know from computation that the integral is about 1.57, and another to guess that the exact result may be pi / 2.

9. Jul 30, 2012

### voko

Generally speaking, when doing numerical quadratures, one always have to convert infinite integration limits to some finite bounds. And substitutions like z = 1/x spring to mind almost immediately if the integration interval does not cross or touch zero.