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.
Mathematica listings by directory
Chronological listing of Mathematica notebooks
Some very first basic attempts to use mathematica. Integrate and Plot and matrix syntax.
tried to find real parts and had trouble.
An early plot attempt.
Same thing, simplified for stackoverflow question.
Trying to do some spherical polar calculations. Gave up and did them by hand.
Generate figures for an electrodynamics problem set submission.
Integrate and TrigReduce
Generate figures for square well and delta function well for phy356 notes..
plot of dipole moment
Integrate x sin(a - |x|)/|x|
Generate figures for arxiv 1104.4829 paper.
Some gamma matrix calculations.
Probably messing around with a Lorentz force problem.
Some trig double angle reductions.
Generate some double pendulum figures.
Some integrals related to QM hydrogen atom energy expectation values.
Some trig integrals that I didn't feel like doing manually.
More Gaussian integrals and some that Mathematica didn't know how to do.
Some Gaussian integrals.
Some variational method calculations for QM energy estimation.
Hankle function fitting for e^{-b|x|} and related plots.
Stripped down example notebook for stackoverflow question about Derivative[2] not behaving well.
Stripped down example notebook for stackoverflow question about Listable attribute defaults.
Plot of Gaussian weighted cosine, its Fourier transform, and figure for perturbation of Harmonic oscillator system.
Sinusoid plot turned on at t_0 and ongoing from there.
Some trig integrals that Mathematica didn't evaluate correctly. Don't trust a tool without thinking whether the results are good!
Take the wolfram twitter tip feed and try out some of the interesting recent ones.
Another worked variational method problem.
Another worked variational method problem.
Another worked variational method problem. Looks like I've learned about the /. operator for evaluating variables with values.
Some sinc function plots. Learned how to use Manipulate to make sliders.
Some energy expectation value calculations.
Some vector addition and function translation figures.
Some integrals of first order linear polynomials.
Some step and rect function plots.
A square root quadratic integral.
Figure for square well with Perturbing potential in the well, and for degeneracy splitting.
Another stackoverflow mathematica question. Why no output in my plot. Learned about Mathematica local and global variables as a result.
A sanity check on a rotation matrix calculated as part of a problem set.
Plotting last couple weeks of IBM stock history.
A SinIntegral plot and sinc integration with use of Limit[]
Exam problem 2a. Calculate the matrix of a Perturbation Hamiltonian $-\boldsymbol{\mu}_d \cdot \mathbf{E}$ with respect to the $n=2$ hydrogen atom wave functions.
Compute the cylindrical strain tensor components to second order.
Using the notation package for the first time to get results that make the mathematica notebook text intelligible as well as the final result.
Also use the Collect[] function for the first time to group the results according to the differential products of interest.
Same as strainTensorSpherical, but I didn't pre-compute the line element differentials myself, instead letting mathematica do the grunt work.
Note that in this version, I specified the definitions of rcap, thetacap, and phicap manually, but had some commented out code to verify that I had this right.
This notebook was left using Collect instead of coefficient, so the collected factors do not match the text equation results without additional manual comparison work.
Also use this to output the column matrices for rcap, thetacap and phicap and drcap/dt.
Like strainTensorCylindrical but for spherical coordinates.
Here I used Coefficient instead of Collect so that I could factor out the additional portions of the area element differentials for constancy and comparison with the Landau and Lifshitz equation.
PHY454. Problem set 1.
Final grunt calculation.
Mathematica features used: 3x3 matrix, IdentityMatrix, Tr (trace), MatrixForm, evaluate last expression.
PHY454 Problem set 1. Q2.
Confirm the characteristic equation calculated manually.
Find the root, by solving the characteristic equation.
Find the eigenvalues and normalized eigenvectors.
Interesting mathematica functions used: Map which applies operation to list, Normalize, Solve, Table, Total -- adding all elements in a list.
PHY454 Problem set 1. Q3.
Confirm some manual matrix calculations.
Used Cross product function, and Orthogonalize for Gram-Schmidt like expansion.
PHY454 Problem set 1. Q2.
Animate the stress tensor associated with the problem, for different points and values of Poisson's ratio.
This generalizes the solution of the problem since answers visually whether the point is under expansion (blue arrow) or under compression (red arrow) at each point in space.
Mathematica manipulate sliders are used to select the spatial points and the value of Poisson's ratio.
Used a number of new (for me) mathematica features: Table, Arrow, If, Part, multiple colors in Graphics3D, DiagonalMatrix, Diagonal (select diagonal into list), Tr (not Trace!), Map, Eigenvalues, Eigenvectors, and in a later version Eigensystem to replace the last two.
The code has links to various stackexchange questions for this notebook. There's an answer on scaling that's incorporated into the Graphics3D options. One more mathematica stackexchange question answered on this little notebook which motivated the Dynamic and DynamicModule calls now here, and one more that drove the change to use Eigensystem.
Based on phy454continuumProblemSet1Q2animated.cdf, with most stuff stripped out to ask about the errors on initial load in mathematica.stackexchange question.
Attempt at evaluating the potential for an infinite cylinder.
Attempt at evaluating the potential for an infinite plane. Experimenting with using mathematica to produce decent documents, as well as trying a variation of the previous calculation where I used $R^2 \sim e$.
The final output is not as nice as latex, but the save as latex option seems promising. New Mathematica tools used in this notebook include HoldForm, TraditionalForm, and ReleaseHold, which can be used to generate traditional form by default for scratch display generation.
Note that cut-and-pasting URLS in comments as I've been doing get mangled and can't be followed. Switched the ones in this doc to Insert->Hyperlink instead.
Attempt evaluation of a cylindrical potential.
New Mathematica methods used: HoldForm, Assuming, Assumptions.
Plug in some numbers for the viscosities and densities for the inclined fluid flow down a plane problem. Insertion of an air layer above the water ends up with the air speed humongous! Steady state not realistic? What are the length scales required for steady state?
New mathematica functions used: WolframAlpha, ChemicalData.
Redo the hand calculation in twoLayerInclinedFlowDifferentDensities.tex completely in mathematica and verify the results. I did it right.
Notable mathematica functions used: Do, Solve, Collect, ExpandAll.
Generate figures for continuum mechanics problem set II figure 1. Using Show and ParametericPlot for the first time. First version used Wacom tablet and graphics drawing options to put in arrows. Text labels later added with Inkscape latex-pdf. Later version used Array of Arrows to draw vector field. Looks much better.
Figure3 for continuum mechanics problem set II. Used ChemicalData again and used Piecewise.
Exact solution to Q3 velocities. Return to this and plot it later.
erf Plot. Using AxesLabel
Plotting the two layer constant pressure gradient solution.
Generate figures for lecture 20 notes.
Animation for the time evolution of a channel flow due to constant pressure gradient turned on at an initial time for fluid at rest before that.
Figure for last lecture. Defined a rectGraphic function, just to create a drawing area. Toss that in a mathematica module file to learn how to make one.
Plot the Couette flow solutions. This is by far my coolest attempt to use Mathematica to do visualization so far. The velocity field is plotted in the appropriate circular contours, albeit without arrows and without an envelope with the contours of the field profile. New tricks learned for this notebook include the use of Slider, Dynamic, and RadioButtonBar. Row and Column were used to group the sliders and labels and resulting plots. I coded up a really cool viscosity and density selector too, but that did not get used here so I commented it out and disabled the initialization cell that I had put in for the ChemicalData lookup. Things were also coded in a nice clean fashion so that I could use one helper function to generate both the Manipulate like controls and also the table that I used to save an animation for my pdf file with the original calculations.
Plot the flow between two infinite cylinders. Mathematica coding style is getting nicer. This has no prologue attempting to be self contained with a nice text description ... too much work to do that in Mathematica instead of Latex. Used Manipulate to generate an animation that includes the sliders. Tried embedding this in the associated pdf, but ffmpeg cant handle it, and I do not know how to coerce it to do so.
Take the previous calculation and display and do it in 3D instead. Very cool.
Add some explanatory text, and put in the format required for the wolfram demo upload page.
Experimenting with Function and HoldFirst. Can use that instead of HoldForm for just one arg, and then do not need a ReleaseHold.
Play around with sliders and 2D locator controls, doing something like what Aurora did in class automatically for larger numbers of lines.
Plot the Bessel function fitting for the spin down of a bottomless coffee cup. Also animate the time evolution of the spin down with a Manipulate slider. As mentioned in the text, this does not match reality too well.
The integral for chapter 7, problem 2 of Landau's fluids. Curve for a fluid meniscus up a wall.
Solving the PDE for the non-bottomless coffee cup problem. Find Bessel functions of order 1. Find the fitting coefficients for stirring above the bottom, in the layer of fluid lower than the stirring. Plot this function, and verify against boundary condition.
Some symbolic Bessel integrals over zeros.
Construct the sinh function using Fourier series and plot it with a Manipulate on the number of terms.
Plots for problem 2.6 in Fowles Modern Optics.
Problem 2.9 in Fowles Modern Optics. General Jones vector
Problem set 1 numerical and plot stuff.
Attempt to verify the circular aperture Fourier transform result from the diffraction notes. Mathematica gives me a different result than what our Prof detailed.
Problem set 2 work. Verify some results. Do the plots and numerical work. This includes the integral that yields the first order Bessel function.
Thinking about problem set 2 problem 3b. Logical want to consider the solar originated rays as random variates in the lingo of mathematica ... functions that generate frequencies or frequency ranges as opposed to the probability that a frequency is found in a certain range.
Determine the scaling and variance for a Gaussian
Plot the Etalon function. Used Evaluate and the PlotLegends package to label the level curves automatically
Plots for lecture 14. One is a simple sine squared (using Ticks to mark only on 2 Pi multiples), and the other I was experimenting with Mathematica Text label placement.
Try out Belisaris's label placement "App" for the Etalon figure.
Results from Belisaris's label placement "App" for the Etalon figure.
likely using Belisaris's labeling app
Plot the single slit diffraction wavefunction and N slit intensity, the latter using a Manipulate so that various parameters can be played with
Plots and rough calculations for problem set 3
Plots for lecture 18. First couple 1D Quantum SHO solutions
Plot of decreasing exponential
Plots for lecture 20.
Plot of the lowest order Gaussian beam envelope. Verify normalization from page 2 of the notes. Use ContourPlot3D to plot the hyperboliod of revolution for the lowest order Gaussian beam mode.
Verify sign error in the characteristic poly in Fowles just before 10.28. Functions used: Collect, Solve. Also sets up a 2 by 2 matrix.
Compute characteristic equation coefficients for unequal focal radii. Functions used: Det, CoefficientList, Factor, FullSimplify.
Plot of Abs[Sinc[]] for Lloyd's mirror problem post midterm reflection
Bessel integral for 2010 question 3 exam practice
Numerical evaluation for 2010 question 5a and 5b exam practice. Used the new Mathematica 9 Quantity function for easy handling of units. Provides a nice check that the right numerical combinations end up dimensionless.
Here's the algebra for the Van Driel notes that give expressions for z1 z2 z0 in terms of g1 g2, and for w(z) at these points. Too hard to do it by hand. Mathematica functions used include Notation package for subscript variables, Flatten, Solve, Eliminate, FullSimplify, and Factor.
Use the labeling app for a figure
Output of kittelCh2Fig1App.nb
Plots for lecture 2
Generated notebook for plot for lecture 2, figure 7
Check normalization of central limit theorem binomial fair coin result vs result given in class ... these are off by a factor of two
Plots and integrals for problem set II.
Labeling app generated notebook
problem set 3 calculations and figures
SHO elliptic plot. Have a Manipulate driven illustration of Liouville's theorem, showing the trajectory of an area in the phase space, allowing observation of the area invariance as it distorts around the path.
Plot of unfair coin binomial and the Gaussian approximation.
Plots for chapter 3, problem 1. Used the new mathematica 9 PlotLegends, a bit better than the version 8 implementation, and now built in.
Jacobian transformation, for the change of vars for the volume element from Cartesian cylindrical coordinates.
integration of $x^2 + y^2$ over a circular quadrant. Used as an example in the easy way hyper volume discussion
Jacobian calculation for phase space change of vars, Cartesian to spherical. Also verifies the hand calculations for the momenta in spherical coordinates
verify the collision of two equal masses statement made in class. Particles swap velocities. The other solution is that the final velocities equal the initial.
Problem set 4 stuff
Problem set 4 stuff
Kittel problem 3.6 plots
plots and rough calculations for problem set 5
plots and rough calculations for problem set 5
Expand and simplify some hyperbolic products. This took a bit of coercion, surprising for a simple expression. To do the simplification, I had to use all of TrigToExp, Expand, Simplify, Numerator, Denominator, ExpandAll, ExpToTrig
Increase the default display size for fonts for input and output to something readable! http://mathematica.stackexchange.com/q/745
Plot and messy algebra bits for Pathria problem 3.30
Try to Plot the Fermi occupancy. This doesn't behave well numerically at low temperatures
Kittel zipper problem and plot. Found how to use Placed PlotLegends with {Left, Top} instead of Left, to get the legend into the figure for use in Save As.
Plot the period boundary conditions density. Used Mathematica Map, pure functions, Placed PlotLegends, ToString, Text, text concatonation operator
Lecture 16, Integral verification for thermal de Broglie lambda calculation.
A new attempt at Desai 24.4.3 from scratch. This one has an error, as did the original. The original is now fixed.
Some rough calculations and plots that were discarded for ps6 p2. Mathematica functions of interest: Map, Evaluate, Flatten, pure functions, Assumptions
Numerical calculation for Nucleon energy
Boltzmann indefinite integral
problem 1 Plots for occupation number averages. Another use of pure functions and Map, for both the set of functions to Plot and for the Text of the Placed PlotLegends. Problem 2 numerical calculations for Bose condensation temperatures.
figure 2 plot
Lots of stuff, calculations and plots, for Huang 9.3 problem: relativistic gas
Verify definition of negative integer binomial coefficient for an exponent value of -2. Used pattern matching /. for the first time in this notebook
Plot Einstein function and approx from Pathria equation 7.3.10
Pathria 7.4 integrals for calculation of mean phonon drift velocity
Plots showing the relative error of a Stirling approximation
Plot for spinZeroBoseCondensation.tex, final exam reflection, problem 2
This was an attempt to decode the notation used in Desai for the Legendre functions used for Hydrogenic atoms. He defines the orbital functions in terms of Legendre functions, but does not precisely define his Legendre functions.
Hybrid orbital plots
Madelung constant calculations for NaCl
Visualize the Bravais lattice given
Plots of melting points in Kelvin vs Z
Reciprocal vector calculation from measurements
Plot of infinite sum of exponentials showing periodic sinc form. Also diagonalization of the interaction matrix for three harmonically coupled particles in a loop
Labeled plots of 1D two spring constant lattice frequency distributions. This is a generated notebook.
Verify equation 4.15 of the text, for the frequencies of the diatomic linear chain
Plots of 1D two spring constant lattice frequency distributions
Dynamic animation of two atom harmonic oscillation
Plot of sine with omitted points at integer multiples of pi.
Plot calculated density of states function
Debye temperature plot for a number of elements, and atomic radius plot. Using hash like function mappings, and ElementData. Also used colors in these plots to visually distinguish each of the s, p, d, f orbital regions. For a less selective atomic radii plotting function, I used Cases and pattern matching to filter out the ElementData values that were missing or unavailable. In a final version of the plotting function, overlapped atomic radii and Debye plots were made. A static image of that plot is saved into the notes for discussion, but the live notebook version has cool ToolTip's on all the points showing the atomic symbols and the values in question.
Plot of anharmonic oscillator solution for problem 5.5 of the text
Plots of the Fermi-Dirac distribution and its derivatives. Includes one Manipulate for exploring the effect of temperature dynamically
Numeric calculation of Fermi temperature and related values. Various wolfram queries were done here to look up the values and units. Also used Column and Row to make tables of the physical constants and the associated calculations.
Minor normalization check for particle in a box calculations.
Plots of periodic extension of inverse radial potential, with and without omission of one such potential
Attempt at a 2D lattice fitting.
A radial cap for an inverse radial function. This may have been for a stackexchange post, since I was seeing a discontinuity in the plot that should not have existed. Looks like I found a post that explained things.
1D inverse radial lattice Fourier fitting, with cubic rounding part way down the infinite hole.
Attempt at 2D Fourier fitting of capped radial.
The reason for some of these inverse radial Fourier fitting attempts was because I wanted to compute the Fourier coefficients for some sample periodic potentials for some numerical experimentation. Naturally, the first one that I tried was an inverse radial potential, however, it turns out that this isn't re presentable by Fourier series since it is not square integrable.
It is possible to artificially alter the Coulomb potential so that some neighborhood of the origin is omitted, setting the potential to some constant value after that, but that doesn't seem like a physically reasonable model. Asking Prof Julian about this he said:
"There are two effects, one is that the potential doesn't go to -infty at the origin, due to Pauli exclusion. As you suggest, putting a flat bottom on the potential probably works okay. But also, due to screening (in a metal at least) the potential isn't 1/r, but rather it cuts off more quickly.
A commonly used compromise is the "muffin tin potential, which has a flat bottom in a sphere around the atomic position, then a step up to another flat region between the atoms. In solving this one puts a linear combination of spherical harmonics inside the muffin tin, and plane waves in the interstitial region, and match them at the boundary.
But putting a flat bottom on a screened Coulomb potential is probably a reasonable first thing to try."
I appear to have hit convergence issues attempting the Fourier fittings for such a cap in a more interesting 2D lattice.
Parabolic Brillouin zone plots
Generated notebook with saved label definitions
Summation that lead to the cotangent result and intersection plot
Cos squared normalization
Sine and Cos plots. Ended up sketching instead
A manipulate to explore the variation with k at point a in the problem. Also some representative plots for the submission
Report a bug for Mathematica HCP LatticeData function
FourierSeries Mathematica colorizing front end UI bug report
Second attempt to get the computation of 2D FourierSeries computed for cubic capped inverse radial function. Mathematica gives up the computation after a long delay
Minor plots of Gaussians for L18 and L19
Plot generator for ps8 b
Ps8 i Plot with labels, generated
Ps8 ii Plot with labels, generated
Ps8 iii Plot with labels, generated
Contour plot of tight binding energy level curves. Used the really handy getTheGraphics function from stackexchange for combining the plot with the legend in one graphics object
Manually labeled the level curves instead, with the energies. This generated notebook has the labeling data.
Scratch notes and plots for ps8.e
For a given stock symbol, and some number of weeks, compute a least squares linear fit from the 'close, low and high' values for the days in that range. Plot the difference from that linear fit for the date range. Also plot the unscaled values of 'close, low, high' against the linear fit.
Ps9 figures for q2
Look for BCC basis vectors. First try was wrong, but found suitable vectors with small correction. This verifies that the new ones work, and also finds the reciprocal basis. Also used this notebook to experiment with the Report stylesheet, mixing text, inline math, and math cells in one doc. End result looks much nicer than a plain styled notebook.
Simple plot of the cubic lattice BZ overlaid with Fermi wave-vector radial surface.
Aborted attempt to write up a nicely formatted Report for the verification of an Ashcroft and Mermin suggested exercise.
This notebook generalizes the notebook for problem set 6, problem 1, which had a Fermi energy/temperature calculation. This splits out the generic physical constants, and splits out the ElementData and ChemicalData lookup. The subsequent calculation and formatting of the data was split somewhat. It would be worthwhile to experiment with reworking this to use Rule lists, like perl hashes, to tag the various fields with names, which would make the parameter passing more flexible.
Sqrt exponential integral ... probably a gamma function.
Rework fermiInfoForElementOrig.nb passing parameters by hashes, ie. Rule Lists. As expected, this was a much cleaner result, as the huge lists of Module local variables are not required passing along the previous phases of the computations. In the end, the descriptive Rule List can be used directly as a ReplaceAll on the values List, with all the grunt work of the display done by a single Rule to List, and TableFormat operation.
Log concentration vs. inverse temperature and some physical constant lookup and order of magnitude calculations.
Experiment with plotting some hypothetical transactions against stock history with Tooltips for PV and MV
A Dynamic visualization of the Bragg plane behavior of a weak periodic potential. Sliders provided for K, and U as a fraction of K, are provided
Experimentation with rasterizing only the 3D plot part of a 3D plot, and not the axes. This was to attempt to produce a small Mathematica plot of stuff that ends up huge when plotted as eps
Like rasterizeAntialiasInset.nb, but with a plotopts function. Should have noted the stackexchange post I was attempting to use.
Verified a hand calculated solution for a non-homogeneous form of the single variable harmonic oscillator. Realized after this that a more sensible approach would have been to just make a change of variables.
An animation of a two particle harmonic oscillator, considered as the most simple lattice problem. This highlighted a problem, where the masses passed through each other, since I did not include a rest length of the spring in the Lagrangian.
A check if the determinant and trace expansion for the characteristic equation of A - lambda I holds in 3D. It does not. This shows the structure, but not the underlying mechanism for a general expansion.
Try fragments of samples from Shifren's book.
Here's a bit of a laborious symbolic calculation that I messed up by hand with, phy487/oneAtomBasisPhonon.tex
N atom basis diamond lattice calculations. Allows up to 5 mass locators in the grid and a vector parameterized parallelepiped lattice cell. This uses TabView and Nasser's tricks to avoid evaluation where undesirable. This also includes the distribution relation. This is my most sophisticated sample of Mathematica programming so far.
In a 4D Euclidean space, this notebook calculates the spherical tangent space basis for a spherical parameterization of span e2,e3,e4 and their duals on that volume. The duals are calculated using the Geometric algebra methods, instead of matrix inversion. This notebook uses clifford.m
In a 4D Minkowski space, this notebook calculates the spherical tangent space basis for a spherical parameterization of span e2,e3,e4 and their duals on that volume. The duals are calculated using the Geometric algebra methods, instead of matrix inversion. This notebook uses clifford.m
A monthly compounded interest calculator
Generate some monthly compounded interest tables
Plot of somewhat ill behaved sum of linear and exponential function
Integrals of some powers of sine and cosine products
Antenna intensity plots for sine and cosine powers 1,2.
An interactive graphical visualization of a couple of radiation intensity functions.
In chapter 4 of Balanis' "Antenna Theory: Analysis and Design", are some discussions of the kr < 1, kr = 1, and kr > 1 radial dependence of the fields and power of a solution to an infinitesimal dipole system. This discussion severely lacks some plots. Here's a Mathematica Manipulate that allows for inspection of the real and imaginary parts of these functions, plotted against both k and r, with a kr == constant contour overlaid on it. The value of that constant can be altered using one of the sliders, as can the maximum range of k and r, and upper and lower bounds of the value of the functions being plotted.
think this was plots to generate figures for ps2
ps3 p1 3d plot Manipulator and figures generation for a superposition of electric and magnetic dipoles.
This is a Manipulator to show the far fields of a superposition of electric and magnetic infinestismal dipoles on the x and y axes respectively. The fields at one point on the surface can be controlled using the theta and phi sliders.
Polar plots of the radiation intensity for long z-axis electric current dipoles. This also does the radiation resistance numerical integrals.
Saved labeled plot for ps3 p2a.
A manipulate for visualizing the polar pattern for a long electric dipole, and showing the directivity. A version without the 3D checkbox option and without the directivity display is deployed as cdf in longDipolesWithLengthControl.cdf
A manipulate for visualizing the polar pattern for a long electric dipole.
Numerical directivity calculations for ps3 p2 b, long dipole.
Trig integrals and plots for ps3, p3. Numerical calculations of the directivity for part e.
A couple Cheybshev T plots.
A manipulate to show the radiation intensity of the array factor in 3D for the corner cube configuration. This doesn't include any contribution from the field itself (i.e. no sine squared term.)
Redo the plots and the numerical calculations for the corner cube configuration problem, ps3, q3.
Standalone generator for cornerCubeArrayFactorSq.cdf
Some simple trig integrals
A Manipulate for Cheybshev plot exploration. A plot of the first few, and a plot with a scale factor.
Deployed CDF manipulator for Cheybshev polynomial exploration.
Manipulate to visualize the variation with d for an N = 4 Cheybshev fitting.
This uses the Cheybshev design technique from the text to fit a 4 element array to a T3 function, and visualize it with polar plots. This includes a Manipulate to visualize the variation with d, saved separately as chebychevN4ArrayFitManipulate.cdf.
Exploring Dolph-Cheybshev method from the class notes. Plots and a Manipulator
Just the manipulator from ChebychevSecondMethod.nb
Deployed version of the manipulator from ChebychevSecondMethod.nb
Verify the paper calculations for this problem, and generate the plots and the numerical values of the angles for the nulls.
Add interactive controls to 2D PolarPlot of problem3BinomialArray.nb, deployed version.
Add interactive controls to 2D PolarPlot of problem3BinomialArray.nb.
Plots and numerical integration results for p4.
Calculate spherical coordinates for a reflected unit vector. Doesn't simplify nicely.
Check some of the trig algebra done by hand.
Plot the calculated electric field for the aperature problem. Here I did the 2D polar plots using a dB scale plot, which I hadn't done before, but makes a lot of sense to see the details of the lobes. Also did a similar log scale plot for the 3D view.
Some experimentation on how to plot a 3D surface with an arbitrary plane cut through it.
balanisProblem8_8
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.
Plot some probability densities for ps3 p2.
A Manipulate to explore the energy vs momentum curves for a stepped potential barrier and the Dirac Hamiltonian.
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.
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.
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.
Double check the integral done in the Dirac delta function problem, and perform the first Fourier transformation.
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.
Generalize and improve code to compute Clebsch-Gorgon coefficients, and apply to spin two plus spin one.
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.
Expand out \( \BL \) in spherical coordinates in terms of \( L_x, L_y, L_z \) operators and compare to stated result (Sakurai (6.15)).
Confirm some of the lecture 19 (variational method) integrals, and plot the energy distribution.
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.
Double well potential. ps7 p1, part I.
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.
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.
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.
Dynamic visualization of eigenvalues of \( 2 \times 2 \) Hermitian matrix, as sketched in lecture 20, plus some plots with specific values.
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.
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.
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.
Sakurai. Problem 5.11 (c). Verify hand calculations (diagonalization).
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.
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.
Integrals from lecture 22 (van der Walls potential).
sakuraiProblem3.17
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.
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.
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) \).
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.
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.
Semi-classical treatment of ice-pick question from Sakurai.
Plot the oscillatory function from the 2015 p5 problem set.
calculate the matrix products from the papers to verify (and as it turns out, correct).
UnitConvert verification that \( 1/\sqrt{\si{F H}} \) is an Ohm, and that \( 1/\sqrt{\si{(F/m)(H/m)}} = \si{m/s} \)
Problem 1.20 from Modern Quantum Chemistry, Intro to electronic structure theory. Variationl problem for two by two symmetric real matrix.
Got the wrong answers solving the problem with my gsl code. Redo the problem set using Mathematica to check expectations.
Plots of index of refraction and relative permittivity for passive and active media.
A verification of the hand calculated result.
Quadropole expansion comparison attempt.
ps9, p1, Slab transfer matrix eigenvalues.
Problem set 9, problem 2. Plots of transmission magnitude and phase for a one dimensional photonic crystal. Plots assume: $\mu_1 = \mu_2 = 1$, normal incidence, and use the Fresnel reflection coefficient $\rho_{ij}$ for the TE mode polarization.
Total internal reflection critical angle.
Figure illustrating projection and rejection.
One parameter differential figure.
Two parameter differential figure.
Oriented areas of different shapes representing bivectors.
Overlapping parallelograms with fixed areas. Figure: parrallelogramsFig1.eps.
This is the notebook for two rotation figures. One is for a rotation of a vector lying in a plane (but that plane is viewed from a 3D vantage point), and the other is for a rotation with respect to a plane through an angle, and applied to a vector out of the plane.
A plot attempt of a fun example of a continuous nowhere differentiable function.
Some messy evaluation of integrals that end up expressed in terms of elliptic E() and F() functions. Was associated with the evaluation of the charge of a circular segment of line charge.
Integrals for Line charge problem, including some of the special angle cases that seem to require separate evaluation. Also has a plot linechargeFig1.eps, and some plots (not in the book) of the integrands.
Figure for circular arc of line charge. One arc of charge on the x-y plane at a fixed radius. Field point, azimuthal angles for the range of the line charge.
Figure for (magnetic) vector potential: vectorPotentialFig1.eps.
Cool toroidal segment figure for the book. toroidFig1.eps
This is the figure for pillbox integration volume that was used in the boundary value analysis of Maxwell's equations.
Verify hand calculation from polarization.tex (also set as a problem). Got my hand calculation wrong. Try this with Mathematica instead. Has some additional checking of the solution.
A plot of a rotated ellipse showing the major and minor axes, and the angle of rotation. This was related to an elliptically polarized plane wave.
Figure (linearPolarizationFig1.eps) showing the electric and magnetic field directions for a linearly polarized field propagating at a fixed angle to the horizontal in the transverse plane.
Jones vector related calculations for GA representation of plane wave.
Vector addition and vector (and scalar) sign figures: VectorsWithOppositeOrientationFig1.eps, vectorAdditionFig1.eps, scalarOrientationFig1.eps.
Hyperbolic cosine and arctan double angle reductions. Probably for cosh parameterization of an ellipse.
Figure for amperesLawBetweenTwoCurrents.eps. Circles surrounding two currents, with respective phicap vectors around those sources.
Uses my GA30.m package to compute the values of the energy momentum tensor multivectors, and relate those to the conventional tensor description of the same. Calculates the expansion of the adjoint of the energy momentum tensor, and also the expansion of some of the adjoint energy momentum tensor terms for the Poynting vector.
Simple integrals for plane current distributions.
Elliptic integrals for charge and current distribution on a ring.
Some integrals related to circular current/charge distributions. A Manipulate that plots the magnitude of one of the integrands. A plot (chargeAndCurrentOnRingFig1.eps) that shows the geometric of the current ring and coordinate system used to solve or express the problem.
Symbolic evaluation of integrals for a cylindrical field distribution of finite and infinite length.
This notebook has transformation techniques to translate a couple of circular charge distribution integrals into their elliptic integral form. It also has plots of some of the electric and magnetic fields obtained from solving one such problem.
A CliffordBasic calculation of the strain portion of the stress tensor, and an explicit demonstration that it is symmetric.
A somewhat random seeming complex exponential evaluation using CliffordBasic, and an R3 bivector argument.
Some R2 complex exponential calculations using CliffordBasic.
This is a figure that has an equilateral triangle in the corner of the first quadrant. This was used to illustrate that the product of two complex exponentials is another complex exponential (in R3), but the bivector argument for that resulting exponential describes (in general) a different plane.
Figure: radialVectorCylindricalFig1.eps. Notebook uses a dynamic (Manipulate) to generate the figure at a desirable angle and radius.
Figure (dualityInR3Fig1.eps) showing the R3 dual plane to a vector graphically. The scaling of the dual plane was only for illustration purposes and did not match the length of the vector.
Verify answers for normal factorization problem. 2.16
Figures that illustrate two rectangular factorizations of a bivector in R3.
A nice little figure illustrating an infinitesimal neighbourhood around a given point. This was used as a figure in the somewhat tedious verification of a Green's function, done in one of the appendixes.
The purpose of this notebook is to show (i.e. decode) the meaning visually of the various Mathematica FourierTransform FourierParameters options available. Shows all the conventions (modern physics, pure math, signal processing, classical physics).
Hyperbolic parameterization of an ellipse, and contours for the associated curvilinear coordinates. ellipticalContoursFig1.eps, and ellipticalContoursFig1.eps figures.
Figure: 2dmanifoldFig1.eps. CliffordBasic calculation of the basis elements above and the area element. Same calculation using my GA30.m package. Generation of mmacell text for the book showing the input and output cells for the CliffordBasic calculation.
Reciprocal basis computation with conventional vector algebra. Same calculation using bivectors. Display the cells for the book latex.
A CliffordBasic solution to an R4 linear system a x + b y = c, using wedge products to solve. Also includes mmacell output to embed the solution in the book as Mathematica input and output.
CliffordBasic calculations for Figure 1.20 reflection (reflectionFig1.eps), but not the figure itself. Also has mmacell output for the input and output cells for this calculation.
Plot (curvilinearPolarFig1.eps) that shows a 2d vector in polar coordinates, the radial vector, and the angle relative to the horizon.
Spherical polar basis and volume element. Calcuation of the curvilinear basis elements done with conventional vector algebra, and CliffordBasic. Also includes mmacell output for the book.
Bivector square and parallelogram figures, Figures for 90 degree rotations. Figure for line intersection. Figure for vector addition, showing scaled multiples of orthonormal bases elements.
Unit bivectors figures in R3. unitBivectorsFig1.eps, unitBivectorsFig2.eps.
Pictoral addition of different size and shape bivectors.
A figure that shows different shape representations of unit bivectors in R2. Includes parallelogram, square, circle and ellipse representations. Also includes inscribed arc to show the orientation of the bivectors. That was done using Arrow in combination with BSplineCurve, where the points on the curve come from evaluating CirclePoints.
This is the notebook for a few bivector related illustrations. The first is two circular representations of a bivector viewed from a 3D vantage point. Another is a bivector addition figure, with two bivectors summed in 3D. That figure was confusing (but cool), and has been left out of the book. The last figure separates the space between those bivectors summed in the second figure showing the summands and the sum all distinct. The current draft of the book includes this figure, but it is still a bit confusing.
A hand calculation seemed to show that I had the wrong expressions for alphaL, alphaR in my polarization notes. Here's a check of the correction of those expressions
Uses geometric algebra to calculate the spherical polar position vector, and then take derivatives to find the trivector volume element (Jacobian).
phy2403 Hw1 problem 2(d). Phonon energy density. Ratio of the phonon energy density to the rest-mass energy density (in hardwood).
This is a check (up to the 7th derivative) that shows that the massive field wipes out the odd derivatives that contribute to the Euler-Maclaurin sum used to calculate the magnitude of the Casimir effect. Hw1 problem V.
Hw1 problem V. part 7 (g). comparative force: \( 1 \mu F \) capacitor with 1V charge.
Manipulate and figures for the Mexican hat potential.
This is plots for Lecture 10: constantMomentumSurfaceFig2, constantMomentumSurfaceFig1 (paraboloids vs. light cone).
Hw2 Problem II.1, explicitly write our the \(U_L\) matrix, and related expansions.
This is a plot for Lecture 11. spaceLikeAndLightConeFig1
Calculate the product of \( (\Bp \cdot \Bsigma)(\Bp \cdot \Bsigma)\), and then take the trace of that.
Plot: RiemannLebesqueFig1. A gaussian envelope high frequency oscillation.
Is the trace of the product of a Hermitian and a Pauli vector zero? No. Ends up kind of dot product like.
Hw2 Problem I.2. Bessel function result for the final integral after the branch cut manipulation.
Attempt to explicitly evaluate the Wightman function. Did not converge.
An attempt to use the NCAlgebra package (non-commutative algebra) to calculate the commutators of the charge operators for the Left and Right currents of Hw2 problem II.6. Did not work.
Post to Mathematica SE. How to get FullSimplify to act on scalars (-1, 0, 1, ...) that are multiplied by potentially non-commutative symbols (operators, block matrices, ...)?
Figure for momentum.tex : sortOfSincFunctionFig1
Appendix for Hw3, III.2. Relevant integrals.
Hw3 problem I. Yukawa integral.
Figure: ps3p1TRFig1. Plots \(T e^{-R}/R \) for \( T \sim R, T \gg R \)
Eigenvalues of \( i \Bsigma \cdot \Bx\)
Explicit 4x4 expansion of the Dirac matrices using the Weyl representation, and verification of some identities.
Numeric calculations for Hw4 Problem 2. hw4p2MathematicaFig1
Define Dirac Matrices (in the Weyl representation). Calculate \( \sqrt{p \cdot \sigma}, \sqrt{p \cdot \osigma}\), square roots of 2x2 matrices, and representations of u, v spinors.
A less experimental version of squarerootOfFourSigmaDotP.nb, that uses the results obtained from that code without actually taking the roots using the Eigensystem solution. Defines: DiracMatrix (Weyl representation); complex -- allow for less general complex numbers, instead of: a + I b, complex[a, b] always formed from real a, b.; diracMatrix (using complex instead of Complex); pauliMatrix (using complex instead of Complex); u, v, and square roots of p . sigma's
Traces of two, three, four Dirac matrix products.
figure in reciprocal.tex
This is a graphical illustration of bivector addition, connecting the normals of the bivectors head to tail like vector addition. The magnitudes of the bivectors are represented by the unit normals scaled by the area of the bivector representations. The notebook includes a Manipulate expression that can be used to interactively examine the effect of changing the size of each of the summed bivectors.