See all sketches...
Sketch 10
Particle in a Box and QHO: Solving PDEs with ODEs, Ansatz, and Algebraic Approach
Huh...
I've been rereading some things about the particle in a box and QHO setups, but when I was redoing a lot of these integral computations myself, I keep running into tiny errors that keep me from getting the right answer.
Ideally, I feel that my work should be readable and simple enough that I shouldn't feel like I need a solutions manual to ensure its correctness. That's the main reason I'm making this sketch, to determine if there is some way that I can tabularize my computation, or determine a handful of things to memorize that will make organization and verification much simpler.
Even if I can't figure out a better way to organize my work, the making of this sketch should at least make me redo my computations, and on top of this, I want to do some experiments simulating these PDEs.
Date Started: July 6, 2024
Date Finished: In Progress...
Edit: I may have gotten a bit distracted from the original purpose of this sketch, :-), but I think the sketch is still pretty good!
The Premise
A while ago, I was trying to solve Problem 2.5 in Griffiths's Quantum Mechanics book (essentially about computing a bunch of things for the infinite square well). The problem is, everything got extremely messy, and now I feel like not even returning to the book, because if I go back to the book, I feel like I have to complete Problem 2.5, but looking at my past work for Problem 2.5, it just looks miserable:
To me, my work isn't thaaat messy (ehh, maybe it is). But it gets the wrong answer (I think), and I can't immediately see where I went wrong. Do I want to erase it and start from scratch? Maybe I should just skip this problem? Ugh. There has to be a better way of doing all this computation with a low error rate that doesn't involve plugging everything into a symbolic computation tool.
In any case, writing it up in LaTeX should do the trick, so that's why I'm making this sketch.
1D Particle in a Box
I'll start with the 1D Particle in the Box. The goal? It's in the name: we want to simulate a free particle in a box. To frame this mathematically, we can create a "box" by creating an appropriate potential energy function:
This is a box because particles have finite energy to begin with, so it could not leave the domain else it would have infinite energy.
The quantum mechanics perspective allows us to determine the "trajectory" of the particle via its wave function , which is a solution to the Schrödinger equation:
Generally, we solve this equation via separation by variables, which gives us so called "separable solutions". These solutions are nice for a few reasons, for which one can check out Griffiths. Most importantly, we can find general solutions by taking linear combinations of these separable solutions. So our aim is to first find the separable solutions.
Separation of Variables
For good measure, let's do the separation of variables. Let , for and . This notation is a bit different than what I've seen elsewhere, but the notation elsewhere that I've seen tends to be very notationally-abusive, so I prefer to just keep the variables and even though it isn't canonical. Then
To make some progress here, we pray that and divide both sides by . Then
But now notice, the LHS is a function of time, and the RHS of space. Since this holds for all and , we must have that
for some . Which gives us two "mini-Schrödinger equations":
which are affectionately called the time-dependent and time-independent Schrödinger equations respectively (TDSE and TISE). The solution to TDSE can be seen quickly to be:
so finding these so called "separable solutions" reduces to solving TISE. You may be saying: hold on, what about boundary conditions? Well, in our case, any Dirichlet or Neumann boundary conditions would result in a constant being multiplied out front, so a solution such as . But we can always push that constant over to , the solution to TISE, so it sufficies to just take here.
TISE for 1D Particle in a Box
We now return to the particle in a box situation. First, we need to find the separable solutions, which from above just means solving TISE. For , we know that , so we wish to solve , whose solutions are well known: sinusoids.
where . For , , so the only even slightly reasonable solution is where (technically this is a bit awkward to be multiplying and , but perhaps we could define it in that way in our extended real number line, or instead work with as a limit of a sequence of functions).
Physically, it makes the most sense if is reasonably regular, so we enforce that should be continuous. Then we must have:
so and . If we further want our solution to be "normalizable" (AKA, we want functions with finite but nonzero norm), we force either and for or and for . For a given , we may take to be the corresponding value of as per these relations. In any case, for , and for even , we obtain a solution of the form , and for odd , we obtain a solution of the form . Up to sign (which doesn't matter because we normalize anyway), then the solutions become
(we add in a to turn the cosine into a sine term by shifting). To summarize, our solution to TISE for particle in a box satisfies a few properties:
- It is continuous, but not continuously differentiable.
- It has finite but nonzero norm for (AKA normalizable).
- It has compact support, and
(this is why I made the interval on which was 0 to be as opposed to ).
Integration
I thought of a few ways to try and be more organized. I couldn't come up with a good way to tabularize all the computation, but what could be an improvement (while not as spacially efficient as tabularization) is indentation. Here's what it might look like for the computations to find above:
We would like to know several things about the particle in a box. What are the expectations of the position and momentum? Perhaps, can we compute the acceleration of the particle? Additionally, what are the variances? It would be nice to determine a few moments of the probability distributions for positions, momentums, etc. of these particles so that we can get a good feel for them distributionally.
Each computation comes with its own integral:
There are, in particular, three main integrals which need to be computed: , , and .
For the first two, we are actually very lucky, because things commute, and for separable solutions , we know from above that . The integrals are thus the same as and . Also, it turns out that for our particular problem, we may choose to be real (in the end it doesn't matter for our general solutions since they will be linear combinations), so that is real-valued, and the integrals become and .
Since is an even function, is odd, so .
On the other hand, is even, so . Now we have:
Now the first expression becomes . As for the second expression, we do integration by parts tabularly.
Signs |
D |
I |
+ |
|
|
- |
|
|
+ |
|
|
- |
|
|
so the second integral is . Now , so this reduces to . So for even, the integral evaluates to
and for odd, the integral evaluates to
This means that when is even and when is odd.
Quantum Harmonic Oscillators (QHO)
The importance of the QHO is that in nature, whenever a system is subject to a conservative force, and is around a stable equilibrium, the fluctuation around that equilibrium is approximately a harmonic oscillator. Mathematically, it is also distinct from our previous example because now isn't constant with respect to . For a harmonic motion, our angular frequency satisfies , so . This means our Shrodinger equation becomes:
Note that this section of this sketch closely follows the methods from two of my Quantum Mechanics professor's lectures.
Analytic Method
First we will use an analytic method, shown by my quantum mechanics professor. There are four steps:
- Introduce dimensionless parameters (we write , where has units of lengths and is a dimensionless parameter).
- Try to guess the ansatz by considering some limits ( and ).
- Substitute the ansatz into the TISE and consider the power series.
- Impose boundary condition to find the allowed energy values.
From the first step, our equation becomes:
which rewriting becomes:
We now notice that each term should have the same units as , so the coefficients of the second and third terms should be dimensionless. Thus, we can take which defines a length scale based on the fact that should be dimensionless. Then, , which is idneed dimensionless. It is natural here to define . With these definitions, TISE becomes:
Now it's time for the second step, guessing an ansatz.
Consider , or . Then TISE becomes . This is sorta like , which makes us guess . Then
Now in the limit, this indeed does satisfy , so this ansatz works. Since TISE is linear, this would mean is also a solution.
Consider . This becomes . The general solution is then via Taylor expansion. Considering our ansatz from the previous limit, it seems that under a taylor expansion, that would still work here! The part is somewhat like the term and the exponential term is somewhat like the other term.
Based on these two limits, we guess a form for the solution where has a power series (we want the minus sign so that is finite as blows up). You might be saying: if we were going to use a power series, why do the ansatz step? If that's what you're thinking, please see Appendix A for a more thorough discussion of that.
So far so good, for the third step, we will now substitute the ansatz into the TISE. Notice that and . The Shrodinger equation then becomes
Now using that is analytic, we write , so
From this we get the recursive relation:
Basically, once we choose and , we can find the result. In order for to go to zero as , we need the series to terminate at a finite term, so we need for some . For a demonstration of this result, see Appendix B. Since ,
which is called energy quantization.
We can only have bound states because tends to infinity as . Since so is even, the bound states are either symmetric or antisymmetric. In the symmetric case, we have . Now for each value of , we obtain a polynomial , and is an appropriate normalization factor. Notice that and lead to the same polynomial , and similarly with and in general. In the antisymmetric case, we construct , , and so on from . The polynomials here are called Hermite polynomials. We then get for each being the product of a Hermite polynomial and a Gaussian.
Algebraic Method
Notice that clasically, . This motivates trying a similar factorization of the operator in quantum mechanics. We can try to write our Hamiltonian operator in the form:
(notice that the RHS is always Hermitian for all ). We can squint at this and write:
The reason for the in the denominator is because of the "energy scale" (recall the stuff we did before with dimensionless quantiites).
These are called the annihilation and creation operators respectively. You can compute quickly via linearity and basic properties that the commutation relation between them is 𝟙, the identity! So they don't commute. One can compute fairly easily that:
from which it becomes not too difficult to compute that and . From this we get two nice results: (assuming they aren't the zero vector) is an energy eigenstate of energy , and is an energy eigenstate of energy . First let's examine the usefulness of these results, and then we will prove them later in Appendix C.
Once we know these relations, we can define a a ground state as an eigenvalue of , and notice that it must have energy . Then repeatedly applying the creation operator gets us more and more states of increasing energies.
Let denote , where and . Then
so . In other words, . Substituting this into , we see that . Sometimes we define the number operator , so that . Aside from being mathematically nice, these are very useful operators when solving problems. There are two more important ideas:
which allows us to much more easily do computations relating to and when working with energy eigenstates.
Now we can actually solve this via an algebraic method. By definition, . But this means, by acting by on the left,
Simplifying, this becomes
Separating the variables,
so . Since with , . So this is arguably a lot easier than doing all the weird analytic stuff. :-)
Appendix A: What if we skip the ansatz step?
This time, let's entirely skip the ansatz step and try to solve the differential equation by Taylor expanding .
Appendix B: Energy Quantization of QHO
Appendix C: PRoving Important Algebraic Relations
References