# Replacing Variables in Integration

Tags:
1. Jan 7, 2015

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

$$I = \int_{-\infty}^{\infty} e^{-x^2} dx$$

2. Relevant equations
Below

3. The attempt at a solution
$$I = \int_{-\infty}^{\infty} e^{-x^2} dx$$

I dont understand, we say:

$$I = \int_{-\infty}^{\infty} e^{-x^2} dx$$

Then we say:

$$I = \int_{-\infty}^{\infty} e^{-t^2} dt$$

I want to see how this process works?

We consider

$$f(x) = e^{-x^2}$$

Right? Then we say that:

$$f(t) = e^{-t^2}$$

Right? Ideally we are replacing x with t correct? Then we say: where R is the whole real axis.

$$I^2 = \int_{R} \int_{R} e^{-(t^2 + x^2)} dtdx$$

But the problem is that now you consider t and x different axes, while before they lay on the same axis.

How does this work?

2. Jan 7, 2015

### RUber

This is more a bookkeeping problem than anything else.
$I = \int_{-\infty}^\infty e^{x^2} dx$ when you square this, you get $I^2 = \left( \int_{-\infty}^\infty e^{x^2} dx\right)^2$
Since you need to be careful not to simply see this as $\int_{-\infty}^\infty (e^{x^2})^2 dx$, the addition of a second variable is useful.
$I^2 = \left( \int_{-\infty}^\infty e^{x^2} dx\right) \left( \int_{-\infty}^\infty e^{x^2} dx\right)= \left( \int_{-\infty}^\infty e^{x^2} dx\right) \left( \int_{-\infty}^\infty e^{t^2} dt\right)$.
Then, becuase these are two continuous functions, you can combine the integrals...
$I^2 = \int_{-\infty}^\infty \int_{-\infty}^\infty e^{x^2} e^{t^2} dxdt = \int_{-\infty}^\infty \int_{-\infty}^\infty e^{x^2+t^2} dxdt$.
This is not a geometrical problem, so there is no need to worry about axes, you are just trying to account for every term on the real line being multiplied by every other term on the real line. If it helps you to visualize it, give the variables different names, like $x_1$ and $x_2$. The result should be the same.

3. Jan 7, 2015

I do not understand.

We are saying that $t = x$, then $dt = dx$

but If I want to see the geometric representation of the integral then I do not see how $t$ and $x$ would be the $xt$ plane. That is the question?

4. Jan 7, 2015

### RUber

What if you replaced t with y? Would that make more sense?
The bottom line is that in the two integrations, you are varying x so that it can have one value in the first and a different value in the second. By only using x, this gets very confusing, so you use a different variable in the second integration.

A simple example is
$B = \sum _{i = 1} ^3 x$
$B^2 = \left( \sum _{i = 1} ^3 i \right)^2 = (1+2+3)^2 =36$
$\left( \sum _{i = 1} ^3 i \right)\left( \sum _{i = 1} ^3 i \right)=\left( \sum _{i = 1} ^3 i \right)\left( \sum _{j = 1} ^3 j \right)$
$B^2 =\sum _{i = 1} ^3 \sum _{j = 1} ^3 ij = 1*1 + 1*2+ 1*3 + 2*1 + 2*2 + 2*3 + 3* 1 + 3*2+3*3 = 36$

5. Jan 7, 2015

I am not having trouble changing variables, I am having trouble converting it into 3D

But this is the issue:

$$I=\int_{-\infty}^{\infty}e^{-x^2} \, dx$$

What you are doing is:

let $x = y \implies dx = dy$ Then

$$I = \int_{-\infty}^{\infty}e^{-y^2} \, dy$$

But when you combine it:

$$I = \int_{R}\int_{R} e^{-(x^2 + y^2)} dxdy$$

This is really:

$$I = \int_{R}\int_{R} e^{-2x^2} (dx)^2$$

Applying $x^2 + y^2 = r^2$ requires $x$ to be perpendicular to $y$.

Which means it requires one to be the "range part," and one to be the "domain part." Doesn't it? Due to the Pythagorean theorem?

QUESTION #2

We defined in the beginning,

$$h(x) = e^{-x^2}$$

$$\therefore, h(y) = e^{-y^2}$$

But so $x$ and $y$ are colinear, lie in the same line. $y = x$ is not necessary. But still, when you make this 3D, $x$ and $y$ cannot have different axes can they? So it cannot be a multivariable function?

6. Jan 7, 2015

### RUber

Remember that an integral is similar to a sum, and the product of sums requires crossing all the terms in each of the sums. What I am trying to demonstrate is that when you have a product of integrals, it is best to think of them as different variables and place them on two different axes. Think of the integral of x from zero to 4. This is easily evaluated as 8. The square of this integral should give you 64.
To plot this in 3D, you will have the same 2D plot in the xz plane and the yz plane. The stuff in between will be defined by z = xy, which along the line y=x will look like z = x^2 = y^2 .
The integral is $\int_0^4 \int _0^4 xy dxdy = \int_0^4 8y dy =64$.
The integral is also $\int_0^4 \int _0^4 x_1 x_2 dx_1dx_2 = \int_0^4 8x_2 dx_2 =64$.
The integral is not $\int_0^4 \int _0^4 x^2 dxdx = \int_0^4 64/3 dx =256/3$.
And the integral is definitely not $\int_0^4 x^2 dx = 64/3$.

7. Jan 7, 2015

@RUber I am starting to understand it more. I suppose from the beginning you considered, a multivariable function.

$$f(x,y) = e^{-x^2}$$

$$g(x,y) = e^{-y^2}$$

So that you didnt have to convert a 2D function to a 3D function correct?

Then h(x,y) = g(x,y)*f(x,y)

I cannot convince myself that changing variables is justified. How do you convince yourself that changing variables is justified (dummy variables etc...) Is it from the Definition of a general variable?

Thanks!

8. Jan 7, 2015

### RUber

Dummy variables are inherent to integration, as they are in summations. Remember that you are multiplying the integrals, not the functions. In any two different integrals, it is often useful to use different variables to avoid confusion.

9. Jan 7, 2015

10. Jan 7, 2015

### haruspex

No, that link defines them as the bound variables in the integral. I.e. they are bound inside the integral and have no existence outside it. There are no free variables here since I does not depend on any variables, it's a constant.
Be warned that this gets confusing with indefinite integrals when written as $\int^xf(x).dx$. There are really two different things called x there (I call this a pun). You can rewrite it as $\int^{z=x}f(z).dz$ without changing the meaning at all, and now we can see that z is a bound variable while x is a free variable.

11. Jan 8, 2015

Can we replace bound varialbes then?

12. Jan 8, 2015

### RUber

Of course you can. The variables inside integrals are dummy variables. In the original problem, you did not have a function I(x), you had a number, I, which had no dependence on any variables. You can put x, y, t, bananas, etc. as the variable of integration and I will still be the same number.
When you square I, you introduce a second integral, and with is a second variable of integration.

13. Jan 8, 2015

I know we can do that, the accurate formal reason j can think of is that the the variables are BOUND variables it follows from definition then.

Informally I knew this. Formal reason is more important so is the above paragraph true? Thanks

14. Jan 8, 2015

### haruspex

I would not put formalism ahead of logic. It's more important to understand.

15. Jan 9, 2015

What I am asking, is, does that follow from definition of the bound variable?

16. Jan 9, 2015

### RUber

Yes, it does. A bound variable may always be called by a different name within the confines of the bounded environment.
ex: $\int _0^5 x dx = \int _0^5 a da$ or $\lim_{x\to 0} \frac{\sin x}{x} = \lim_{h\to 0} \frac{\sin h}{h}$.
As in this problem, two separate integrals in x are fine, but in order to combine them, it is important to distinguish which x varies within which integral, that is why we replaced one x with t.

17. Jan 9, 2015

Are we doing substitution actually?

In changing variables, are we for example saying $x = y$? If yes, then:

$$\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-(x^2+y^2)} dxdy$$

But then how do we conclude that $x^2 + y^2 = r^2$?

Since x^2 + y^2 = 2x^2

18. Jan 9, 2015

### RUber

In no way does x^2 + y^2 = 2x^2. This is not a substitution, it is a name change so you don't make that mistake. The x in one integral varies independently from the x in the other. That was the whole reason for the change of variables when you went to combine integrals. If you are plotting this on the x-y plane, x^2 +y^2 = r^2 is a very routine substitution.

19. Jan 9, 2015

I see. I still cant for some reason convince myself that this is from definition.

How do you personally convince yourself that we can change variables?

I've done it before hundreds of times, this was the example which made it all go crazy. I just cant justify it anymore...

20. Jan 9, 2015

### RUber

The variable inside the integral is bound to the integral. It can be anything. If you want to call it something else, you can. No convincing necessary.
Look back to post #2, see that if you kept both integrals in x, you would end up with
$\int_{-\infty}^\infty\int_{-\infty}^\infty e^{-x^2 -x^2 } dx dx.$ Which would be totally confusing since the first x is bound to one integral and the second x is bound to the other. At the very least you would need subscripts like $\int_{-\infty}^\infty\int_{-\infty}^\infty e^{-x_1^2 -x_2^2 } dx_1 dx_2.$ to keep them straight.
If you are asking about the polar substitution, you can always do that--I suspect that is the completion of the example you are working on which shows that $I = \sqrt \pi$