# Schrödinger Equation (5)

Daniel Fleish  A Student's Guide to the Schrödinger Equation  (Cambridge University Press  2020)

5. Solutions for Specific Potentials

We'ii see how to apply the concepts and mathematical formalism described in earlier chapters to quantum system with three specific potential: the infinite rectangular well, the finite rectangular well, and the harmonic oscillator. Although we live with (at least) three dimensional space in which 𝑉(𝑟̄, 𝑡) may vary over time and space, the essential physics of quantum potential wells can be examining the one-dimensional case with time-independent potential energy. So, in this chapter, the Schrödinger equation is written with position represented by 𝑥 and potential energy by 𝑉(𝑥).

5.1  Infinite Rectangular Potential Well

The infinite rectangular well is a potential configuration in which a quantum particle is confined to a specified region of space (called the "potential well") by infinitely strong forces at the edges of the region. We'll see that this configuration is highly instructive, though infinite forces do not occur in nature.
Because 𝐹̄ = - 𝛻̄𝑉 in which 𝛻̄ ≡ 𝑥̄∂/∂𝑥 + 𝑦̄∂/∂𝑦 + 𝑧̄∂/∂𝑧, for a one-dimensional infinite rectangular well extending from 𝑥 = 0 to 𝑥 = 𝑎, the potential energy may be written
(5.1)    𝑉(𝑥) = {∞, if 𝑥 < 0 or 𝑥 > 𝑎; 0, 0 ≤ 𝑥 ≤ 𝑎}
and we can see the configuration in Fig. 5.1. So when move along the 𝑥-axis from left to right, the potential energy drops from infinity to zero at 𝑥 = 0, and the force (negative ∂𝑉/∂𝑥) has infinite magnitude and points in the positive-𝑥 direction. Moving along 𝑥 with in the well ∂𝑉/∂𝑥 = 0, but at 𝑥 = 𝑎, the potential energy increase from zero to infinity. So at the right ell, the force is again infinitely strong but pointing in the negative-𝑥 direction. Hence any particle within the well is "trapped" by infinitely strong inward-pointing forces at both walls.

In case of 𝐸 > 𝑉, we can determine the wavefunction solutions 𝜓(𝑥, 𝑡) using separation of variables, and this leads to the time-independent Schrödinger equation (TISE)
(3.40)    -(ℏ2/2𝑚) 𝑑2[𝜓(𝑥)]/𝑑𝑥2 + 𝑉[𝜓(𝑥)] = 𝐸[𝜓(𝑥)].
Recall in the region of 𝐸 > 𝑉, it's convenient to write this as
(4.8)     𝑑2[𝜓(𝑥)]/𝑑𝑥2 = -2𝑚/ℏ2 (𝐸 - 𝑉)𝜓(𝑥) = -𝑘2𝜓(𝑥).
(4.9)     𝑘 ≡ √[2𝑚/ℏ2 (𝐸 - 𝑉)],   (wavenumber 𝑘 = 2π/𝜆).
(4.10)     𝜓(𝑥) = 𝛢𝑒𝑖𝑘𝑥 + 𝐵𝑒-𝑖𝑘𝑥,
where 𝛢 and 𝐵 are constant to be determined by boundary conditions. In this case 𝑉 = 0, and the wavenumber 𝑘 is
(5.2)     𝑘 = √[(2𝑚/ℏ2) 𝐸],
which means that inside the well 𝜓(𝑥) oscillates with wavenumber proportional to the square root of energy 𝐸.
In case of 𝑉 > 𝐸,
(4.11)     𝑑2[𝜓(𝑥)]/𝑑𝑥2 = -2𝑚/ℏ2 (𝐸 - 𝑉)𝜓(𝑥) = +𝜅2𝜓(𝑥),
(4.12)     𝜅 = √[2𝑚/ℏ2 (𝑉 - 𝐸)],
(4.13)     𝜓(𝑥) = 𝐶𝑒𝜅𝑥 + 𝐷𝑒-𝜅𝑥,
where 𝐶 and 𝐷 are constant to be determined by boundary conditions.
Outside the infinite well, where 𝑉 = ∞, the constant 𝜅 is infinitely large, which means both 𝐶 and 𝐷 must be zero. Because for any positive value of 𝑥, 𝐶 must be zero and for any negative value of 𝑥, 𝐷 must be zero. So the wavefunction 𝜓(𝑥) must be zero everywhere outside the well. Since the probability density is equal to the square magnitude of the wavefunction, this means that there is zero probability of measuring the position of the particle to be outside the infinite rectangular well.
In the infinite rectangular well, at the left wall, 𝜓(0) = 0, so
(5.3)     𝜓(0) = 𝛢𝑒𝑖𝑘(0) + 𝐵𝑒-𝑖𝑘(0) = 𝛢 + 𝐵 = 0,   𝛢 = -𝐵.
At the right wall, 𝜓(𝑎) = 0, so
(5.4)     𝜓(𝑎) = 𝛢𝑒𝑖𝑘𝑎 - 𝛢𝑒-𝑖𝑘𝑎 = 0,   𝛢(𝑒𝑖𝑘𝑎 - 𝑒-𝑖𝑘𝑎) = 0,   𝑒𝑖𝑘𝑎 - 𝑒-𝑖𝑘𝑎 = 0,
Using the inverse Euler relation for sine, Eq. 4.23, sin 𝜃 = (𝑒𝑖𝜃 - 𝑒-𝑖𝜃)/2𝑖, we obtain
(5.5)     (𝑒𝑖𝑘𝑎 - 𝑒-𝑖𝑘𝑎) = 2𝑖 𝜓(𝑎) = 0.
But if 𝑘𝑎 = 0, then 𝑘 must be zero. It means that the separation constant 𝐸 must also be zero and the wavefunction solution will have zero curvature. Since the boundary conditions require that 𝜓(0) = 𝜓(𝑎) = 0, a wavefunction with no curvature would have zero amplitude everywhere. so we must choose the other approach of making 𝜓(𝑎) = 0, So we have
(5.6)     𝑘𝑎 = 𝑛π    or    𝑘n = 𝑛π/𝑎,  (𝑛: integer),
where the subscript 𝑛 is an indicator that 𝑘 takes on discrete values.
It means that the wavenumbers are quantized, meaning that they have a discrete set of possible values. And those discrete allowed energy can be found by Eq. 5.2:
(5.7)     𝐸𝑛 = 𝑘n22/2𝑚 = 𝑛2π22/2𝑚𝑎2.
By inserting 𝑘𝑛 into the TISE solution 𝜓(𝑥):
(5.8)     𝜓𝑛(𝑥) = 𝛢(𝑒𝑖𝑘n𝑥 - 𝑒-𝑖𝑘n𝑥) = 𝛢' sin (𝑛π𝑥/𝑎),
where the factor 2𝑖 has been absorbed into the constant 𝛢', and the subscript 𝑛 represents the quantum number designating 𝑘𝑛 and 𝐸𝑛 associated with the wavefunction 𝜓𝑛(𝑥).
It will be generally convenient to normalize the wavefunction. Because we can be certain that total probability of finding the particle somewhere in space is unity. For Eq. 5.8 normalization of looks like this:
1 = -∞ ∣𝜓𝑛(𝑥)∣*∣𝜓𝑛(𝑥)∣ 𝑑𝑥 = 0𝑎 [𝛢' sin (𝑛π𝑥/𝑎)]*[𝛢' sin (𝑛π𝑥/𝑎)] 𝑑𝑥 = ∣𝛢'∣2 0𝑎 sin2 (𝑛π𝑥/𝑎) 𝑑𝑥 = ∣𝛢'∣2 [𝑥/2 - sin (2𝑛π𝑥)/4𝑛π𝑥]0𝑎 = ∣𝛢'∣2 𝑎/2
which means
∣𝛢'∣2 =2/𝑎     or     𝛢' = √(2/𝑎).
where -𝛢' may be written as 𝛢'𝑒𝑖π, and a factor such as 𝑒𝑖𝜃 is called a "global phase factot" which affects only the phase, not the amplitude, of 𝜓(𝑥). Inserting √(2/𝑎) for 𝛢' into Eq. 5.8 gives
(5.9)     𝜓𝑛(𝑥) = √(2/𝑎) sin (𝑛π𝑥/𝑎).
Now we can see these wavefunctions in Fig. 5.2 for quantum numbers 𝑛 =1, 2, 3, 4, and 20. The wavefunction 𝜓1(𝑥) with lowest energy 𝐸1 is often called the "ground state". This ground stat wavefunction has a node (location of zero amplitude) at each boundary of the well. For higher-energy wavefunctions often called "excited states", each step up in energy leve have some nodes as we can check.
We should also take a careful look at the symmetry of the wavefunctions with respect to the center of the well. An even function has the same value from 𝑥 = 0, so 𝑓(𝑥) = -𝑓(-𝑥), but an odd function has the values of the function on opposite sides of the center have opposite signs, so 𝑓(𝑥) = -𝑓(-𝑥). In this case the wavefunction solutions will have always have either even or odd  have parity whenever the potential energy function 𝑉(𝑥) is symmetric. For some problems, this definite parity can be helpful to solve them.
It worth noting that the energy difference between adjacent wavefunctions increases with increasing 𝑛. So the energy-level difference between 𝜓2(𝑥) and 𝜓1(𝑥) and 𝜓3(𝑥) and 𝜓2(𝑥) are:
𝐸2 - 𝐸1 = 4π22/2𝑚𝑎2 - 1π22/2𝑚𝑎2 = 3π22/2𝑚𝑎2
𝐸3 - 𝐸2 = 9π22/2𝑚𝑎2 - 4π22/2𝑚𝑎2 = 5π22/2𝑚𝑎2
In general, the spacing between any energy level 𝐸𝑛 and the next higher level 𝐸𝑛+1 is
(5.10)     𝐸𝑛+1 - 𝐸𝑛 = (2𝑛 + 1) π22/2𝑚𝑎2.
It's worthwhile to consider how the Schrödinger equation and the boundary conditions of this case determine the behavior of the quantum wavefunctions within the well. In Eq. 4.8 the second spatial derivative of 𝜓(𝑥) represents the curvature of the wavefunction, and 𝐸 represents the total energy of the particles. So higher energy means largerer curvature and for sinusoidally varying functions, larger curvature means more cycles (higher value of wavenumber 𝑘, so shorter wavelength 𝜆).
Now consider the requirement that the amplitude of the wavefunctionmust be zero at the edge 𝑉 = ∞, which means that the distance across the well must correspond to an integer number of half-wavelengths.
These wavefunctions look familiar somehow because we have seen the standing waves that are the "normal modes" of vibration of a uniform string rigidly clamped at both ends. The analogy ,however, is not perfect, since the Schrödinger equation takes the form of a diffusion equation 9with a first-order time derivative and second-order spatial derivative) rather than a classical wave equation (with second order time and spatial derivatives). For the wave on a uniform string, the angular frequency 𝜔 is linearly proportional to the wavenumber 𝑘, while in the quantum case 𝐸 = ℏ𝜔 is proportional to 𝑘2.
We can determine the probable outcome of measurements of observable quantities such as energy (𝐸), position (𝑥), or momentum (𝑝) from wavefunction 𝜓(𝑥). The TISE is an eigenvalue equation for the Hamiltonian (total energy) operator. It means that wavefunction solutions 𝜓𝑛(𝑥) given by Eq. 5.9 are the position-space representation of the energy eigenfunctions, and energy values 𝐸𝑛 given by Eq. 5.7 are the corresponding eigenvalues.
If the particles's state 𝜓 does not correspond to one of the energy eigenfunctions 𝜓𝑛(𝑥), then they can be used as basis functions to synthesize any function:
(5.10)     𝜓 = ∑𝑛=1 𝑐𝑛𝜓𝑛(𝑥),
where 𝑐𝑛 represents the amount of each eigenfunction 𝜓𝑛(𝑥) contained in 𝜓.
Recall a version of the Dirac notation which describes a quantum state using eigenfunctions represented by kets
(1.35)     ∣𝜓⟩ = 𝑐1∣𝜓1⟩ + 𝑐1∣𝜓1⟩ + ⋅ ⋅ ⋅ + 𝑐𝑁∣𝜓𝑁⟩ = ∑𝑛=1𝑁𝑐𝑛∣𝜓𝑛⟩,
And each 𝑐𝑛 may be found by using inner product to project state ∣𝜓⟩ onto the corresponding eigenfunction 1∣𝜓𝑛⟩,
(4.1)     𝑐𝑛 = ⟨𝜓𝑛∣𝜓⟩.
Hence we can find the "amount" 𝑐𝑛 of each eigenfunction 𝜓𝑛(𝑥) using inner product:
(5.12)     𝑐𝑛 = 0𝑎 ∣𝜓𝑛(𝑥)∣*∣𝜓𝑛(𝑥)∣ 𝑑𝑥
We can determine the probability of each measurement outcome by taking the square of the magnitude of the 𝑐𝑛 corresponding that eigenfunction.Over a large ensemble of identically prepared systems, the expectation value of energy can be found using
(5.13)     ⟨𝐸⟩ = ∑𝑛 ∣𝑐𝑛2 𝐸𝑛.
To determine the probable outcomes of position measurements, start by finding the position probability density 𝑃den(𝑥) by multiplying the wavefunction by the complex conjugate:
(5.14)      𝑃den(𝑥) = [𝜓(𝑥)]*[𝜓(𝑥)] = [√(2/𝑎) sin (𝑛π𝑥/𝑎)]* [𝜓(𝑥)]*[𝜓(𝑥)] = [√(2/𝑎) sin (𝑛π𝑥/𝑎)] = 2/𝑎 sin2 (𝑛π𝑥/𝑎).
We can see the position probability densities as a function of 𝑥 for 𝑛 = 1 through 5 and for 𝑛 = 20 in Fig. 5.5. In this figure, each horizontal axis represents distance from the left boundary normalized by width 𝑎 of the rectangular well. Each vertical axis represents probability per unit length, with one length unit defined as the width of the well. As we can see, the probability density 𝑃den(𝑥) is a continuous function and is not quantized. If we integrate the position probability density over the entire potential well, we can be sure of getting a total probability of 1.0 in each state. It means that the particle is guaranteed to exist somewhere in the well. But if we wish to determine the probability of measuring the particle's position to be within a specified region inside the well as follows:
(5.15)      𝑥0-𝛥𝑥/2𝑥0+𝛥𝑥/2 ∣𝜓𝑛(𝑥)∣*∣𝜓𝑛(𝑥)∣ 𝑑𝑥 = 𝑥0-𝛥𝑥/2𝑥0+𝛥𝑥/2 2/𝑎 sin2 (𝑛π𝑥/𝑎).
To appreciate the significance of the proceeding discussion of a quantum particle in an infinite rectangular well, consider the behavior of a classical object in a same state. Then that classical particle may be found to be a rest with zero total energy, or it may be found to be moving at constant speed in either direction between the rigid walls and bouncing back and forth between perfectly reflecting walls. So if a position measurement is made, the classical particle is equally likely to be found at any position within the well.
We can gain additional insight into the quantum particle's behavior by considering the possible outcome of measurements of another observable momentum. To determine the probable outcomes of momentum measurements in this case, we need to know the probability density in momentum space, using the momentum-space wavefunction in Eq. 4.38
𝜙̄(𝑝) = 1/√(2πℏ) -∞ 𝜓(𝑥)𝑒-𝑖𝑝𝑥/ℏ 𝑑𝑥 = 1/√(2πℏ) 0𝑎 √(2/𝑎) sin (𝑛π𝑥/𝑎)𝑒-𝑖𝑝𝑥/ℏ 𝑑𝑥 = 1/√(π𝑎ℏ) 0𝑎 sin (𝑛π𝑥/𝑎)𝑒-𝑖𝑝𝑥/ℏ 𝑑𝑥.
This integral may be evaluated by using Euler's relation and since 𝑝𝑛 = ℏ𝑘𝑛, the result is (using wolframalpha possibly)
(5.16)      𝜙̄(𝑝) = √ℏ/2√(π𝑎)[2𝑝𝑛/(𝑝𝑛2 - 𝑝2) - 𝑒-𝑖(𝑝𝑛+𝑝)𝑎/ℏ/(𝑝𝑛 + 𝑝) - 𝑒𝑖(𝑝𝑛-𝑝)𝑎/ℏ/(𝑝𝑛 - 𝑝)].
The probability density 𝑃den(𝑃) can be found by multiplying by [𝜙̄(𝑝)]*, which gives
(5.17)      𝑃den(𝑝) = ℏ/(π𝑎) 2𝑝𝑛2/(𝑝𝑛2 - 𝑝2)2[1- (-)𝑛cos (𝑝𝑎/ℏ)].
We can see the plots of 𝑃den(𝑝) for the ground state and excited states 𝑛 = 2, 3, 4, 5, and 20 in Fig. 5.6. In this figure, each horizontal axis represents normalized momentum divided by ℏπ/𝑎, and each vertical axis represents momentum probability density. Since for for the ground state, the energy eigenfunction has half-circle across the width of the potential well, so the wavelength 𝜆1 = 2𝑎, 𝑘1 = 2π/𝜆1 = π/𝑎. According to deBroglie's relation 𝑝 = ℏ𝑘, we get 𝑝1 =  ℏπ/𝑎 or 𝑝𝑛 =  𝑛ℏπ/𝑎.
For ground state (𝑛 = 1), there is nonzero probability near 𝑝 = 0. Since the particle's position is confined to the width 𝑎 and Heisenberg's Uncertainty principle tells us that 𝛥𝑥𝛥𝑝 must be equal to or greater than ℏ/2. Taking 𝛥𝑥 as 18% of the well width 𝑎, and estimating 𝛥𝑝 = ℏπ/𝑎, one unit, then 𝛥𝑥𝛥𝑝 = 0.57ℏ, so the requirement of Heisenberg Uncertainty principle 𝛥𝑥𝛥𝑝 ≥ ℏ/2 are satisfied. The reason for using ℏπ/𝑎
For excited states (𝑛 > 1), the momentum probability density has two peaks one with positive momentum and another with negative momentum. We can see that the larger the quantum number, the closer the probability-density maxima get to ∓ℏ𝑘𝑛 in Fig. 5.6. (But in the ground state, 𝑝1 = ℏπ/𝑎 is not a good estimate of the probable outcome of a momentum measurement for a particle.)

From now on we'll investigate how the particle's wavefunction evolves over time. It's necessary to consider the solutions to the time-dependent Schrödinger equation from Eq. 3.38;
(5.18)      𝜓𝑛(𝑥, 𝑡) = 𝜓𝑛(𝑥) 𝑇(𝑡) = √(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸𝑛𝑡/ℏ.
We may recall from Section 3.3 that the separable solution to the time-dependent Schrödinger equation are called "stationary state" because quantities such as expectation values and probability density functions associated with such states do not vary over time. But if a particle in an infinite rectangular well is in a states that is not an energy eigenstate. For example, a particle in a state that has a wavefunction that is in the linear superposition of the first and second energy eigenfunctions:
(5.19)      𝜓(𝑥, 𝑡) = 𝐴𝜓1(𝑥, 𝑡) + 𝐵𝜓2(𝑥, 𝑡) = 𝐴√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸1𝑡/ℏ + 𝐵√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸2𝑡/ℏ,
where the constants 𝐴 and 𝐵 determine the relative amounts of eigenfunctions 𝜓1(𝑥, 𝑡) and 𝜓2(𝑥, 𝑡).
Fior example, to synthesize a total wave function consisting of equal parts of the infinite rectangluar well eigenfunctions 𝜓1 and 𝜓2, the factors 𝐴 and 𝐵 must be equal. The normalization process is:
1 = -∞ 𝜓*𝜓 𝑑𝑥 = -∞ [𝐴𝜓1 + 𝐴𝜓2]*[𝐴𝜓1 + 𝐴𝜓2] 𝑑𝑥 = ∣𝐴∣2 -∞ [𝜓1*𝜓1 + 𝜓1*𝜓2 + 𝜓2*𝜓1 + 𝜓2*𝜓2] 𝑑𝑥.
Pugging in 𝜓1 and 𝜓2 from Eq. 5.19 with 𝐴 = 𝐵 makes this
1 = ∣𝐴∣2 {0𝑎 [√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸1𝑡/ℏ]*[√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸1𝑡/ℏ] 𝑑𝑥 + 0𝑎 [√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸1𝑡/ℏ]*[√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸2𝑡/ℏ] 𝑑𝑥
+ 0𝑎 [√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸2𝑡/ℏ]*[√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸1𝑡/ℏ] 𝑑𝑥 + 0𝑎 [√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸2𝑡/ℏ]*[√(2/𝑎) sin (𝑛π𝑥/𝑎) 𝑒-𝑖𝐸2𝑡/ℏ] 𝑑𝑥}.
Carrying out the multiplication gives
1 = ∣𝐴∣2(2/𝑎) {0𝑎 [sin2 (π𝑥/𝑎)] 𝑑𝑥 + 0𝑎 [sin (π𝑥/𝑎)][sin (2π𝑥/𝑎)] 𝑒-𝑖(𝐸2-𝐸1)𝑡/ℏ + 0𝑎 [sin (π𝑥/𝑎)][sin (2π𝑥/𝑎)] 𝑒+𝑖(𝐸2-𝐸1)𝑡/ℏ + 0𝑎 [sin2 (2π𝑥/𝑎)] 𝑑𝑥}.
Since the first and last of these integral each give a value of 2/𝑎 and the second and third integrals gives zero because of the orthogonality of the eigenfunctions, sin (π𝑥/𝑎) and sin (2π𝑥/𝑎), so 1 =  ∣𝐴∣2(2/𝑎) (𝑎), which means 𝐴 = 1/√2 in the case of equal amounts of 𝜓1(𝑥, 𝑡) and 𝜓2(𝑥, 𝑡).
A similar analysis for any two factors 𝐴 and 𝐵 indicates that the composite functions will be properly normalized as long as ∣𝐴∣2 + ∣𝐵∣2 = 1. So, for example, for a mixture n which the amount 𝐴 of 𝜓1(𝑥, 𝑡) is 0.96, the amount 𝐵 of 𝜓2(𝑥, 𝑡) must equal 0.28 (since 0.962 + 0.282 = 1).
We can see that effect in Fig. 5.7, which shows time evolution of the position probability density of the composite wavefunctions     (5.20)      𝜓(𝑥, 𝑡) = (0.96)√(2/𝑎) sin (π𝑥/𝑎) 𝑒-𝑖𝐸1𝑡/ℏ + (0.28)√(2/𝑎) sin (2π𝑥/𝑎) 𝑒-𝑖𝐸2𝑡/ℏ,
As we can see, the position probability is no longer stationary - the mixture of energy eigenfunction causes the position of maximum probability density to oscillate within rectangular well. Since by Planck-Einstein relation 𝐸 = 𝘩𝑓 = ℏ𝜔 (Eq. 3.1) different energies of 𝜓1(𝑥, 𝑡) and 𝜓2(𝑥, 𝑡) are related to angular frequency, as time passes, the relative phase between 𝜓1(𝑥, 𝑡) and 𝜓2(𝑥, 𝑡) changes.
To comprehend the mathematics of the phase variation, consider the terms of [𝜓1(𝑥, 𝑡)]*[𝜓2(𝑥, 𝑡)], In general case, 𝐴 and 𝐵 may have different values, and the position probability density [𝜓1(𝑥, 𝑡)]*[𝜓2(𝑥, 𝑡)] are given by
𝑃den(𝑥, 𝑡) = ∣𝐴∣2(2/𝑎) [sin2 (π𝑥/𝑎)] + ∣𝐵∣2(2/𝑎) [sin2 (2π𝑥/𝑎)]                     + ∣𝐴∣∣𝐵∣(2/𝑎) [sin (π𝑥/𝑎)][sin (2π𝑥/𝑎)] 𝑒-𝑖(𝐸2-𝐸1)𝑡/ℏ + ∣𝐴∣∣𝐵∣(2/𝑎) [sin (π𝑥/𝑎)][sin (2π𝑥/𝑎)] 𝑒+𝑖(𝐸2-𝐸1)𝑡/ℏ.
We can see the effect of time dependence by writing the combination of the twi cross terms [𝜓1]*[𝜓2] and [𝜓2]*[𝜓1] as
∣𝐴∣∣𝐵∣(2/𝑎) [sin (π𝑥/𝑎)][sin (2π𝑥/𝑎)] 𝑒-𝑖(𝐸2-𝐸1)𝑡/ℏ + ∣𝐴∣∣𝐵∣(2/𝑎) [sin (π𝑥/𝑎)][sin (2π𝑥/𝑎)] 𝑒+𝑖(𝐸2-𝐸1)𝑡/ℏ
= ∣𝐴∣∣𝐵∣(2/𝑎) [sin (π𝑥/𝑎)][sin (2π𝑥/𝑎)] [𝑒-𝑖(𝐸2-𝐸1)𝑡/ℏ + 𝑒+𝑖(𝐸2-𝐸1)𝑡/ℏ = ∣𝐴∣∣𝐵∣(2/𝑎) [sin (π𝑥/𝑎)][sin (2π𝑥/𝑎)] cos [(𝐸2-𝐸1)𝑡/ℏ].
The time variation in 𝑃den(𝑥, 𝑡) is caused by the cosine term and the larger the energy difference, the faster the oscillation of that cosine term. We can see bt writing the angular frequency of composite wavefunction as
(5.21)       𝜔21 = 𝜔2 - 𝜔1 = 𝐸2-𝐸1/ℏ
or using Eq. 5.7,
(5.21)       𝜔21 = 𝐸2-𝐸1/ℏ = 22π22/2𝑚𝑎2ℏ - 12π22/2𝑚𝑎2ℏ = 3π2ℏ/2𝑚𝑎2.
Adding a larger amount of 𝜓2(𝑥, 𝑡) has the effect of modifying the shape of the composite probability density function more significantly, as shown in Fig. 5.8. In this case the amount of 𝜓2(𝑥, 𝑡) is equal to the amount of 𝜓1(𝑥, 𝑡).
It's worth to note that  the larger proportion of 𝜓2(𝑥, 𝑡) causes the peak of the position probability density at time 𝑡 = 0 to occur father to the left and its amplitude is larger than the corresponding one shown in Fig. 5.7.. Comparing the both Fig. 5.8 and Fig. 5.7 carefully may be very instructive.
This analysis shows that for states of the infinite rectangular well that are made up of the weighted combination of eigenstatesm the probability density function varies over time. The mount of that variation depends on the relative proportion of the composite states, and rate of the variation is determined by the energies of those states.

attention: some rigorous derivation might be required 