Student handout: Mean position

Computational Physics Lab II 2022
Students compute probabilities and averages given a probability density in one dimension. This activity serves as a soft introduction to the particle in a box, introducing all the concepts that are needed.
What students learn

  1. Probability density is the norm square of the wave function
  2. An average is a weighted sum

Possible extra learning goals:
  1. Normalizing wave functions, normalizing probability density.

Probabilities and probability densities

Much of quantum mechanics is probabilistic. The most that we can predict is the probability of any given outcome of a measurement. Thus you will be spending a lot of time in the next five weeks talking about probabilities. Before we get to writing any code, we're going to spend some time talking about probabilities and probability densities.

As an example, let's consider the disribution of student residences in Corvallis. We are going to begin by collecting some data from which we can draw conclusions about probabilities.

I'll start by creating a table to find out how common different commutes are. I'd like you to figure out (or make up) the distance from where you sleep to Weniger Hall. I'll call out distances and ask you to raise your hand if your home is closer to Weniger than that distance (and you haven't yet raised your hand).

We will now discuss this distribution and how to represent it.

Particle in a box

Consider a particle that is located in a box with width \(L\). An interesting question to ask is where the particle is likely to be, but this is complicated by the fact that there are an infinite number of positions the particle could have.

We will be working today with probability densities for a particle in one dimension. This is a linear probability density, which means that it is the probability per unit distance. You can think of the probability density \(P(x)\) as being defined by \begin{align} \text{probability it's between $x_0$ and $x_0+\Delta x$} = \int_{x_0}^{x_0+\Delta x} P(x)dx \end{align} So if you imagine \(\Delta x\) becoming small, then the probability density \(P(x_0)\) is the meaningful answer to the (ill-posed) question, "How likely am I to find the particle at position \(x_0\)?"

What are the dimensions of \(P(x)\)?

The probability density of an electron being found at position \(x\) is given by \(|\psi(x)|^2\), where \(\psi(x)\) is a complex-valued function called the wave function. You will learn more about wave functions in the coming weeks, but for today it is the function that you take the norm squared of to find the probability density.

What are the dimensions of \(\psi(x)\)?

Today you will be computing an average position of the electron, given \(\psi(x)\). The electrons will be confined to a region \(0<x<L\), so your function is invalid outside of that domain, and you don't have to worry about the electron escaping.

You will be given two wave functions from the following list: \begin{align} \psi_1(x) &= \frac{\sqrt{30}}{L^2\sqrt{L}}x(x-L) & \psi_2(x) &= \frac{x^6\sin(\pi x/L)}{0.07931977085 L^6\sqrt{L}} \\ \psi_3(x) &= \frac{\sqrt{105}}{L^3\sqrt{L}}x^2(x-L) & \psi_4(x) &= \sqrt{\frac{2}{L}}\sin(\pi x/L) \\ \psi_5(x) &= \frac{\sqrt{495}}{L^5\sqrt{L}}x(x-L)^4 & \psi_6(x) &= \sqrt{\frac{2}{L}}\sin(2\pi x/L) \end{align} Using your two wave functions:

  1. Write python functions that given \(x\) returns the value \(\psi(x)\) for each of your \(\psi_i(x)\).
  2. Plot the wavefunctions, and then plot the corresponding probability density.
  3. Check that the total probability (i.e. the probability of the particle being anywhere at all) is 1 for each wavefunction.
  4. Based on your plots, guess what the average value of \(x\) will be, and plot this guess as a vertical line on your probability density plots. Do this step before the following step!
  5. Write a program to find the average value of \(x\) that would be measured, and then plot this average \(x\) as a vertical line on the same plot with the probability density (and the other vertical line). Does it look correct? Does it match what you guessed?
Extra fun
Find the probability that your particle will be found to be in the right half of the box. Do the same for the left half. Check that the two numbers add up to one.
Mean fun
Find the probability that the particle is to the left of the vertical line giving the average value of \(x\).
Other fun

Find the probability that your particle will be found to be in the center half of the box. Do the same for the outside half. Check that the two numbers add up to one.

Complex fun : Try using the following complex wave function: \begin{align} \psi_A(x) &= \sqrt{\frac{2}{L}}\sin(\pi x/L)e^{ikx} \end{align} where \(k\) is a number you may choose with dimensions of inverse distance and as usual \(i=\sqrt{-1}\). Make sure to visualize the complex wave function as well as the probability density. Try playing with the value of \(k\) to see how it affects \(\psi(x)\) and \(P(x)\).

Crazy fun
Try using the following wave function: \begin{align} \psi_B(x) &= \frac{\left(1-e^{(1-10i)x/L}\right)\left(e^{(1+7i)(x-L)/L}-1\right)}{2.1335722875015692\sqrt{L}} \end{align} If you can sketch in advance what this wave function function looks like (or its corresponding probability density), I will be very surprised. I could not do that.


Keywords
probability density particle in a box wave function quantum mechanics
Learning Outcomes