# Homework Help: Integration problem

1. Jul 23, 2014

### Mogarrr

1. The problem statement, all variables and given/known data
I'm trying to show that the definite integral:

$\int_0^{\infty} \frac 1{\sqrt{2 \pi}} \sqrt {y} e^{\frac {-y}2} dy$,

equals 1.

2. Relevant equations

it's already known that $\int_0^{\infty}\frac 1{\sqrt{2 \pi}} y^{\frac {-1}2} e^{\frac {-y}2} dy = 1$, since f(x) is a probability density function.

3. The attempt at a solution
I've tried integration by parts, but that hasn't helped.

$\int_0^{\infty} \frac 1{\sqrt{2 \pi}} \sqrt {y} e^{\frac {-y}2} dy = \frac 1{\sqrt{2 \pi}} (-2 \sqrt {y} e^{\frac {-y}2})|_0^{\infty} + \int_0^{\infty}\frac 1{\sqrt{2 \pi}} y^{\frac {-1}2} e^{\frac {-y}2} dy$,

but $lim_{t \to \infty} -2 \sqrt {y} e^{\frac {-y}2})|_0^{\infty} = 0$, so that's not very helpful.

Any ideas to evaluate the integral?

2. Jul 23, 2014

### SammyS

Staff Emeritus
If you know that $\int_0^{\infty}\frac 1{\sqrt{2 \pi}} y^{\frac {-1}2} e^{\frac {-y}2} dy = 1 \ ,\$ then it seems to me that you have all but arrived at the result.

3. Jul 23, 2014

### pixatlazaki

I believe Mogarr knows that it equals 1, though doesn't analytically know how to demonstrate that with standard integration techniques.

4. Jul 23, 2014

### Mogarrr

That's right

5. Jul 23, 2014

### SammyS

Staff Emeritus
So, which part of this problem are you having difficulty with.

6. Jul 24, 2014

### Mogarrr

I'm having a problem finding a method to evaluate:

$\int_0^{\infty} y \frac 1{\sqrt {2\pi}} \cdot y^{\frac {-1}2} e^{\frac {-y}2} dy =\int_0^{\infty} \frac 1{\sqrt {2\pi}} \cdot y^{\frac 12} e^{\frac {-y}2} dy$.

Here's some background. I know that the integral should evaluate to 1. In a previous part of the problem, I saw that for this standard normal function,

$f_X(x) = (\frac 1{\sqrt {2\pi}}) e^{\frac {-x}2}$,

the expected value of the random variable squared, $E X^2$, is equal to 1. I had to look at the answer to solve this problem. The integral I am trying to solve is the expected value of Y, $E Y$, where $Y = X^2$. So this is a transformation of the random variable, but the result should be the same as $E X^2$ (this was stated in the problem description).

The conundrum I have is, after seeing the answer, I don't believe it to be true. Here is the answer given (hopefully without typos) in equations and italics:

$E Y = \int_0^{\infty} \frac {Y}{\sqrt {2\pi y}}e^{\frac {-y}2} dy = \frac 1{2\pi} (-2y^{\frac 12}e^{\frac {-y}2}|_0^{\infty} + \int_0^{\infty} y^{\frac {-1}2}e^{\frac {-y}2}dy) = \frac 1{\sqrt {2\pi}} \cdot \sqrt {2\pi} = 1$.

This was obtained using integration by parts with $u=2y^{\frac 12}$ and $dv= \frac 12 e^{\frac {-y}2}$, and the fact that $f_Y(y)$ integrates to 1.

I don't think this answer is right though.

Isn't $-2y^{\frac 12} e^{\frac {-y}2} |_0^{\infty} = 0$ ? And if I am right, then I am fresh out of ideas to solve this problem.

7. Jul 24, 2014

### matineesuxxx

If we make a simple substitution, $u = \sqrt{y}$, then we can see that $$\int \frac{1}{2\sqrt{y}}e^{-y/2}dy = \int e^{-u^2/2}du$$, what does that tell you about the integral itself?

8. Jul 24, 2014

### Mogarrr

I think I'm getting really close, but thus far...

$\int_0^{\infty} \sqrt {y} e^{\frac {-y}2} dy = 2\sqrt {y} (-e^{\frac {-y}2})|_0^{\infty} + \int_0^{\infty} \frac 1{\sqrt {y}} e^{\frac {-y}2} dy$

where I did integration by parts with $u = 2\sqrt {y}$ and $dv = \frac 12e^{\frac {-y}2} dy$.

The first part of the sum is 0. So continuing on...

$\int_0^{\infty} \frac 1{\sqrt {y}} e^{\frac {-y}2} dy$ can be simplified with a u-substitution. If I let $u = \sqrt {y}$, then $du = \frac 12 y^{\frac {-1}2}dy$, and the limits of integration won't change.

So $\int_0^{\infty} \frac 1{\sqrt {y}} e^{\frac {-y}2} dy = 2 \int_0^{\infty} e^{-y/2} \frac 12 \frac 1{\sqrt {y}} dy = 2\int_0^{\infty} e^{\frac {-(u)^2}2}du$,

but $2\int_0^{\infty} e^{\frac {-(u)^2}2}du = 2 \cdot \sqrt {2\pi}$, where I need it to be $\sqrt {2\pi}$ so the whole thing can evaluate to 1.

I think a mistake was made. Don't know where though.

Last edited: Jul 24, 2014
9. Jul 24, 2014

### Ray Vickson

You can do it in two ways:
(1) recognize that $\sqrt{y} \exp(-y/2) = y^{3/2 - 1} \exp(-y/2)$ is proportional to the density function of the Gamma random variable G(3/2,1/2); see, eg., http://en.wikipedia.org/wiki/Gamma_distribution . You can then reduce the integral to a something involving $\Gamma(3/2) = (1/2) \Gamma(1/2)$ and use the known value of $\Gamma(1/2)$ (or work it out yourself).
(2) Use the change of variable $y = x^2$ to get $c \int_0^{\infty} x^2 \exp(-x^2/2) \, dx$ for a constant $c$; then you need to know that the standard normal random variable has variance = 1, as you have already mentioned. The easiest way to get that is to use integration by parts:
$$\int x^2 e^{-x^2/2} \, dx = \int u dv, \\ u = x, \: dv = x e^{-x^2/2} \, dx = d \left(- e^{-x^2/2} \right)$$

10. Jul 24, 2014

### Mogarrr

I found my mistake. I found this from Wikipedia:

$\int_0^{\infty} e^{-ax^{b}}dx = \frac 1{b} a^{\frac {-1}{b}} \Gamma (\frac 1{b})$

So after doing looking back at the u-substitution, I completed the problem. Thanks.