The Superposition of Waves

1. Introduction

In this laboratory you will apply the notion of the superposition of waves to determine the spectral distribution of an initial wave packet that is contained in an infinite square well with walls at x=0 and x=1.0. You will determine the spectral distribution and plot it for this wave.

2. Constants and Commands

Constants are defined and some necessary Mathematica  commands are demonstrated here.

2.1 Constants

The constants needed to describe the initial wave packet are set here.

x0 = 0.4;  (* Lower limit of the initial wave in angstroms (Å). *)
x1 = 0.5;  (* Upper limit of the initial wave in angstroms (Å). *)
m = 7.01; (* Slope of the wave. *)
hbarc = 1.970; (* units of keV-A *)
mass = 511.0; (* assume we have an electron with mass in keV. *)

2.2 The initial wave packet

The initial wave is a variation on the square wave. In Mathematica  this non-continuous function can be described with the "Which" function demonstrated below. The next command demonstrates the generation of a graphical object for later use.

f[x_] := Which[x < x0,0,
               x0 <= x <= x1, m*x,
               x1 < x, 0]
A = Plot[f[x], {x,0,1},Exclusions -> None]

2.3 A finite sum of terms

The commands below are used to generate a truncated Fourier series for a square wave (not the sloped wave packet defined above). In the example below the sum is from n=1 to n=3 in steps of unity. See the Mathematica  book for more details.

a0=1.0;  (* Width of the well. *)
d=x1-x0; (* Width of the initial wave packet. *)
g[x_]=Sum[(Sqrt[((2*a0)/((n^2)*(π^2)*d))])*(Cos[((n*π*x0)/a0)]-Cos[((π*x1)/a0)])*(Sqrt[(2/a0)]) Sin[((n*π*x)/a0)],
{n,1,3,1}];B=Plot[g[x],{x,0,1},PlotRange->{-1,4},PlotStyle->RGBColor[1,0,0]]

2.4 Combining plots

The plots A and B from above can be combined into one with the following command.

Show[A,
     B,
     Graphics[Text["N=3",{0.7,3.2}]],
     Frame->True,
     FrameLabel->{"x","Psi","Wave Superposition",""},
     PlotRange->{-0.5,4.2},
     BaseStyle->FontSize->16]

2.5 Performing Integrals in Mathematica

The following commands demonstrate indefinite and definite integrals. You can also use the Basic Math Palette.

Integrate[Sin[x],x]

Integrate[Sin[n*Pi*x]*m*x,{x,a,b}]

2.6 Plotting Points and Setting Scales

The following commands show how to plot a set of points. We start by making a list of points that are the squares of the coefficients used in the example above and the integer index for each energy level.

table1 = Table[{n,((((Sqrt[((2*a0)/((n^2)*(π^2)*d))])*(Cos[((n*π*x0)/a0)]-Cos[((n*π*x1)/a0)])))^2)},{n,1,25}];
plot1 = ListPlot[table1,
Frame->True,
FrameLabel->{"Energy Level","|(Subscript[b, n])((|)^2)"},
PlotStyle->{PointSize[0.02],RGBColor[1,0,0]},
BaseStyle->FontSize->16
]

Sometimes Mathematica will make unwise choices for the scales on your plot. To set your own scales use the PlotRange option.

plot2 = ListPlot[table1,PlotRange->{{0,27},{0,0.3}},
Frame->True,
FrameLabel->{"Energy Level","|(Subscript[b, n])((|)^2)"},
PlotStyle->{PointSize[0.02],RGBColor[1,0,0]},
BaseStyle->FontSize->16
]

3. Procedure

A particle trapped in an square well with infinitely high walls at x=0 and x=1 has the initial wave function defined in Section 2.2. 

1. What are the eigenfunctions appropriate for this problem (don’t work them out, just write down the results)?

2. What is the normalization constant for the wave packet of Section 2.2?

3. What is the spectrum of wave numbers (the spectral distribution) necessary to produce the wave packet of Section 2.2? Make a plot representing the distribution (see Section 2.6 for guidance on making plots of a list of data) for the first hundred or so values of the wave number. What are the allowed values of the wave number?

4. When Fourier first introduced his ideas for expanding any function, including those with "sharp" edges like the initial wave packet here, the notion was met with some skepticism. How would you convince someone that one can use the eigenfunctions of the infinite square well to describe the initial wave packet above? (Hint: Consider using the truncated sum and graphical commands demonstrated in Section 2). Make the neccessary figures.

5. How would you define the width of a distribution? Come up with a graphical method for determining the width of a distribution. What is the "width" of your spectral distribution in Section 3.2? How did you arrive at your result?

Include purpose, calculations, figures,  and a discussion in your report.