My Mathematica notebooks.

Here is a listing of my mathematica notebooks. The most recent of any of these notebooks can all be obtained from my github Mathematica repository.

The Wolfram CDF player can also be used to view a number of these notebooks after download.

• Sep 28, 2015 phy1520/anticommutingWithZeroEigenvalue.nb

Construct and verify an example of a pair of anticommuting matrices each having a zero eigenvalue, and a shared eigenvector. This was for Sakurai p.1.17, and includes some numeric commutator expansions to verify the example constructions done with that problem.

• Oct 18, 2015 phy1520/ps3/ps3Fig2.nb

Plot some probability densities for ps3 p2.

• Oct 25, 2015 phy1520/energyVsMomentumForDiracStepPotentialWaveFunctions.nb

A Manipulate to explore the energy vs momentum curves for a stepped potential barrier and the Dirac Hamiltonian.

• Nov 1, 2015 phy1520/spinOneHalfSymbolicManipulation.nb

For a spin one-half system Sakurai leaves it to the reader (and also to problem 3.10) to verify that knowledge of the three ensemble averages $$\expectation{S_x}, \expectation{S_y}, \expectation{S_z}$$ is sufficient to reconstruct the density operator. Showing that is algebraically messy, and well suited to do in Mathematica.

• Nov 2, 2015 phy1520/eulerAngleVsNormalRotationPauliMatrices.nb

Comparing a unimodular transformation to an arbitrary rotation matrix was trivial. To do the same for an Euler angle rotation matrix and arbitrary matrix is less so because of sign differences. Here is a dumb symbol expansion of the full rotation on a general vector in Pauli matrix form to have a look at the two results and see if there is anything striking. It turns out there is not anything striking. Both expressions are messy even after FullSimplify.

• Nov 16, 2015 phy1520/spinOneOperatorRepresentation.nb

Spin one operators. Sakurai only seems to list the $$S_y$$ spin one matrix representation. See these in Desai, but need to verify that all my corrections to Desai eq. (27.117) are correct.

• Nov 19, 2015 phy1520/diracDeltaFunctionIntegrals.nb

Double check the integral done in the Dirac delta function problem, and perform the first Fourier transformation.

• Nov 22, 2015 phy1520/ps6/clebschGordan.nb

First pass of a Clebsch-Gordon computation engine, used to compute coefficients for spin one plus spin half, checking against what was done by hand for in class example.

• Nov 22, 2015 phy1520/ps6/clebschGordan2.nb

Generalize and improve code to compute Clebsch-Gorgon coefficients, and apply to spin two plus spin one.

• Nov 24, 2015 phy1520/spinOneDensityOperatorRepresentationInTermsOfEnsembleAverages.nb

Solution for Sakurai problem 3.12: What must we know in addition to the ensemble averages of the spin operators to completely characterize the density matrix of a spin 1 system? I guessed that we also needed the ensemble averages of at least the squares, but that and the unit trace, was not enough, since those relations do not provide nine equations, for the nine unknowns. Omitting the trace requirement, but also introducing variables for the other second order products was enough to solve the problem. Printing out all those products is helpful to show why this is the case: you can see visually that these products appear to span the space of $$3 \times 3$$ matrices.

• Nov 24, 2015 phy1520/squareOfAngularMomentumOperatorSphericalCoordinates.nb

Expand out $$\BL$$ in spherical coordinates in terms of $$L_x, L_y, L_z$$ operators and compare to stated result (Sakurai (6.15)).

• Nov 26, 2015 phy1520/lecture19integralsAndPlots.nb

Confirm some of the lecture 19 (variational method) integrals, and plot the energy distribution.

• Nov 28, 2015 phy1520/ps7/ps7p3VariationalAbsoluteExponential.nb

An attempt to do ps7 pr. 3 with Mathematica. It was hard to figure out how to make Mathematica cope with the delta functions, so I gave up and did it manually.

• Nov 28, 2015 phy1520/ps7/doubleWellPotential.nb

Double well potential. ps7 p1, part I.

• Nov 30, 2015 phy1520/ps7/hydrogenAtomGroundState.nb

Verify all the hand calculations for ps7 p2, Hydrogen atom ground state. I found a better way to do the Hydrogen vs Helium ground state comparison, and rewrote all the content that this notebook applied to. This is, however, a nice standalone computation of the Hydrogen ground state energy.

• Nov 30, 2015 phy1520/ps7/heliumAtomGroundStateWithInteraction.nb

Verify all the hand calculations for ps7 p2. Started with the Helium atom ground state calculation, without electron-electron interaction. This was followed up with a verification of the electron-electron interaction integrals and end results too.

• Dec 1, 2015 phy1520/ps7/hydrogenComparedToHeliumGroundStateEnergy.nb

Recompute the Hydrogen vs. Helium ground state energy entirely in Mathematica to see if I am still getting the factor of 8 difference that I computed by hand. That factor of 8 turns out to be correct.

• Dec 2, 2015 phy1520/visualizationOfEigenvaluesOfTwoByTwoHermitianMatrix.nb

Dynamic visualization of eigenvalues of $$2 \times 2$$ Hermitian matrix, as sketched in lecture 20, plus some plots with specific values.

• Dec 3, 2015 phy1520/lecture21someSphericalHarmonicsAndTheirIntegrals.nb

Lecture 21. Print out some spherical harmonic functions and their integrals, to look at the conditions for the integral of $$Y_{lm} z$$ to be zero. Also evaluate the $$z$$ and $$z^2$$ brakets mentioned in the lecture.

• Dec 5, 2015 phy1520/ps8/harmonicOscillatorRaiseAndLoweringOperators.nb

Implement 1D SHO lowering and raising operator functions, and use to compute x operator powers on the ground state.

Uses ps8/harmonicOscillatorRaiseAndLoweringOperators.nb to verify text computations of a small quadratic perturbation.

• Dec 6, 2015 phy1520/ps8/2dHarmonicOscillatorOperators.nb

Implement 2D SHO lowering and raising operator functions, and use them to calculate $$x^4 + y^4$$ and $$x y$$ operator actions on some two particle states, and some specific ps8 p3 related calculations.

• Dec 6, 2015 phy1520/sakuraiProblem5.13c.nb

Sakurai. Problem 5.11 (c). Verify hand calculations (diagonalization).

• Dec 8, 2015 phy1520/ps8/PauliMatrixSpinOperators.nb

Systematically compute the basis for spin-half $$\Bsigma \cdot \Bn$$, and the matrix representation of $$S_z$$ in that basis. This was for ps8 p4, hyperfine interaction.

• Dec 8, 2015 phy1520/vanDerWalls.nb

Do a second order expansion of the van der Walls potential to compare to value stated. Did not figure out how to get Mathematica to simplify this gracefully and did it by hand manually instead.

ps8 p2. Compute the matrix element for the p-orbital ($$l = 1$$) subset of $$V = \lambda (x^2-y^2)$$, diagonalize it, and find the diagonalizing basis states.

• Dec 10, 2015 phy1520/lecture22Integrals.nb

Integrals from lecture 22 (van der Walls potential).

• Dec 11, 2015 phy1520/sakuraiProblem3.17.nb

sakuraiProblem3.17

• Dec 13, 2015 phy1520/sakuraiProblem5.17a.nb

Sakurai pr. 5.17 (a): Find energy eigenvalues for $$H = A L^2 + B L_z + C L_y$$.

Compute the commutator $$\antisymmetric{-\frac{\Hbar^2}{2 m r^2} \partial_r (r^2 \partial_r)}{-i \Hbar \partial_r } = -\frac{\Hbar^2}{2 m r^2} p_r$$. The first operator is a component of $$\Bp^2/2m$$ with the $$\BL^2$$ contribution removed.

• Dec 14, 2015 phy1520/sakuraiProblem5.16bSHO.nb

Verify the relation from Sakurai pr. 5.16(a) using the ground state of the 3D SHO. Verification of the potential derivative expectations for higher values of n do not complete in reasonable times.

• Dec 15, 2015 phy1520/sakuraiProblem3.33.nb

Spin three halves operator question (Sakurai 3.33). Implement operators for $$S_{+}, S_{-}, S_z$$ that act on kets $$\ket{\pm 3/2}, \ket{\pm 1/2}$$. These operators act on only a single basis element, but are used to construct the matrix representations for these operators (which are more general). Use those matrices to compute the representation of the Hamiltonian for the problem and compute its energy eigenvalues. Display the end result and the representations for all of $$S_{+}, S_{-}, S_x, S_y, S_z, H = A ( 3 S_z^2 - \BS^2) + B( S_{+}^2 + S_{-}^2)$$.

• Dec 15, 2015 phy1520/spinMatrices.nb

Compute and display $$S_{+}, S_{-}, S_x, S_y, S_z, S^2$$ for a given spin (with $$\Hbar = 1$$). Use this to display the matrix representations of these operators for each of: spin 1/2, spin 1, spin 3/2, spin 2, spin 5/2. Use this to solve the (spin one) eigensystem in Sakurai pr. 4.12.

• Dec 20, 2015 phy1520/finalExamProblem6HyperfineInteraction.nb

Spin matrix and $$S_z$$ matrix relative to a specific normal vector $$\ncap$$. This is based on PauliMatrixSpinOperators.nb from ps8 p4, hyperfine interaction, but switched up for the Fermion/Boson interaction final exam question p6.

• Dec 22, 2015 phy1520/icePick.nb

Semi-classical treatment of ice-pick question from Sakurai.