# Integrating mod function

1. Dec 3, 2016

### Kara386

1. The problem statement, all variables and given/known data
I need to integrate
$\langle |v_x| \rangle = \int^{\infty}_0 |v_x| \sqrt{\frac{m}{2\pi kT}}e^{-mv_x^2/2kT}dv$
For context this is a Maxwell boltzmann distribution in one dimension, and I've actually been asked to calculate $\langle v_x \rangle$ which is given by $|v_x|f(v)$ where $f(v) = \sqrt{\frac{m}{2\pi kT}}e^{-mv_x^2/2kT}$ is the Maxwell Boltzmann distribution in the x-direction. Not sure if the question is best put in physics or maths.
2. Relevant equations

3. The attempt at a solution
I'm a little confused because since $v_x$ is always positive between infinity and zero (I think?) the integral is actually just $\langle v_x \rangle$, since the mod can be ignored if it's always positive. That can't be it though, I've already been asked to calculate $\langle v_x \rangle$ in the first part of the same question. So I suppose my treatment of the mod must be wrong.

Thanks for any help!

Last edited: Dec 3, 2016
2. Dec 3, 2016

### Ray Vickson

What was your result for $\langle v_x \rangle$?

Do you see why $\langle v_x \rangle \neq \langle |v_x| \rangle$?

What slight (but important) error have you made in your expression for $\langle |v_x| \rangle$?

3. Dec 3, 2016

### Kara386

Is the error related to the limits, by any chance? Should probably go to $-\infty$ and that would explain a lot.

Last edited: Dec 3, 2016
4. Dec 3, 2016

### Ray Vickson

Try it, to see what you get.

Anyway, what is your answer to my question about $\langle v_x \rangle$?

5. Dec 3, 2016

### Kara386

It is the limits, velocity can be negative, I'd been working with speed in 3D so only needed to integrate $\infty$ to zero. Didn't read the question carefully so missed that we had moved to velocity distribution. As to $\langle v_x \rangle$, I have that equal to zero.

6. Dec 3, 2016

### Ray Vickson

Right: $\langle v_x \rangle = 0$, and this follows immediately (with essentially no work) from the fact that $f(v_x)$ is an even function of $v_x$, so $v_x f(v_x)$ is an odd function. In contrast, $|v_x| f(v_x)$ is an even function of $v_x$, so its integral over the whole line can be easily related to its integral over the half-line $\{ v_x \geq 0 \}$.