# Homework Help: Ordinary Diffusion and integration by parts

1. Sep 12, 2011

### Old Guy

1. The problem statement, all variables and given/known data
For ordinary 1D diffusion show that the mean value of the square of the position is equal to 2Dt

2. Relevant equations
$$\left\langle {x^2 \left( t \right)} \right\rangle \equiv \int\limits_0^\infty {x^2 p\left( {x,t} \right)dx}$$

$$\frac{\partial }{{\partial t}}p\left( {x,t} \right) = D\frac{{\partial ^2 }}{{\partial x^2 }}p\left( {x,t} \right)$$

3. The attempt at a solution
$$\begin{array}{l} \left\langle {x^2 \left( t \right)} \right\rangle \equiv \int\limits_0^\infty {x^2 p\left( {x,t} \right)dx} \\ \frac{\partial }{{\partial t}}\left\langle {x^2 \left( t \right)} \right\rangle = \frac{\partial }{{\partial t}}\int\limits_0^\infty {x^2 p\left( {x,t} \right)dx} = \int\limits_0^\infty {x^2 \frac{\partial }{{\partial t}}p\left( {x,t} \right)dx} + \int\limits_0^\infty {p\left( {x,t} \right)\frac{\partial }{{\partial t}}x^2 dx} \\ \frac{\partial }{{\partial t}}\left\langle {x^2 \left( t \right)} \right\rangle = \int\limits_0^\infty {x^2 \frac{\partial }{{\partial t}}p\left( {x,t} \right)dx} + \int\limits_0^\infty {p\left( {x,t} \right)\frac{\partial }{{\partial t}}x^2 dx} \\ \frac{\partial }{{\partial t}}\left\langle {x^2 \left( t \right)} \right\rangle = \int\limits_0^\infty {x^2 \frac{\partial }{{\partial t}}p\left( {x,t} \right)dx} + \int\limits_0^\infty {p\left( {x,t} \right)\frac{\partial }{{\partial t}}x^2 dx} \\ \\ \int\limits_0^\infty {x^2 \frac{\partial }{{\partial t}}p\left( {x,t} \right)dx} = D\int\limits_0^\infty {x^2 \frac{{\partial ^2 }}{{\partial x^2 }}p\left( {x,t} \right)dx} \\ u = x^2 \Rightarrow du = 2xdx \\ dv = \frac{{d^2 }}{{dx^2 }}p\left( {x,t} \right)dx \Rightarrow v = \frac{d}{{dx}}p\left( {x,t} \right) \\ \int\limits_0^\infty {x^2 \frac{\partial }{{\partial t}}p\left( {x,t} \right)dx} = Dx^2 \frac{d}{{dx}}p\left( {x,t} \right) - 2D\int\limits_0^\infty {x\frac{d}{{dx}}p\left( {x,t} \right)dx} \\ \\ \int\limits_0^\infty {x\frac{d}{{dx}}p\left( {x,t} \right)dx} \\ u = x \Rightarrow du = dx \\ dv = \frac{d}{{dx}}p\left( {x,t} \right)dx \Rightarrow v = p\left( {x,t} \right) \\ \int\limits_0^\infty {x\frac{d}{{dx}}p\left( {x,t} \right)dx} = xp\left( {x,t} \right) - \int\limits_0^\infty {p\left( {x,t} \right)dx} \\ \end{array}$$

I see that I'm home free if
$$Dx^2 \frac{d}{{dx}}p\left( {x,t} \right) = 0$$
and

$$xp\left( {x,t} \right) = 0$$

but how can I justify that?

Thanks!

2. Sep 12, 2011

### diazona

Remember that when you integrate by parts, you have to evaluate the boundary term at the endpoints of the integral.
$$\int_a^b u\,\mathrm{d}v = uv\color{red}{\biggr|_a^b} - \int_a^b v\,\mathrm{d}u$$
You're missing the part in red. You'll also need to make an assumption about the form of $p(x,t)$ as $x\to \infty$.

3. Sep 13, 2011

### Old Guy

I understand, of course, about the boundary terms. It seems to work out if I assume that p(0,t)=1 (ie, the particle(s) all start at the origin) and that p($\infty$,t)=0 (there is nothing at the infinite boundary). This still leaves me multiplying zero times infinity, and isn't that considered to be indeterminate? So I still don't see how to make these terms vanish.

4. Sep 13, 2011

### diazona

nooo no no no, that's the wrong way to interpret p(x,t). It's a probability density. The probability itself that a particle is found between a and b at time t is given by $P = \int_a^b p(x,t)\mathrm{d}x$, and that integral can be very small even if $p(x,t)=1$ in the range in question. A probability density can go all the way up to infinity, as long as the integral is finite.

In any case, I don't think you can necessarily assume that p(0,t) = 1, but you don't need to.
This is why I said you have to assume something about the form of the probability density as $x\to \infty$, not at infinity. Infinity is always a limit in physics, so you will have to think about the functional form (linear, quadratic, exponential, etc.) of p(x,t) in the limit of very large x. You could try coming at it backwards: what form could p(x,t) take (at large x) such that the limit of xp(x,t) would not be well-defined? Then make your assumption that p(x,t) does not take such a form.

5. Sep 14, 2011

### Old Guy

Thank you for your help, diazona. I still haven't completely wrapped my mind around probability densities yet. Nonetheless, with your suggestion (and some mathematical sleight of hand) I was able to satisfy myself that p(x,t) in the form of 2/x made the terms vanish as needed. A function that approaches 0 as x approaches infinity makes physical sense, to me, too. Thanks again!

6. Sep 14, 2011

### diazona

You're welcome Just make sure your derivation doesn't require that p(x,t) = 2/x. You can assume that p(x,t) goes to zero as x goes to infinity at least as fast as 2/x because otherwise it wouldn't be normalizable, but it's not necessarily equal to 2/x.