# How to do it in Mathematica

This page will be used to accumulate short Mathematica notebooks with examples that we encounter in Physics 7701. It is not intended to be exhaustive!
URL: http://www.physics.ohio-state.edu/~ntg/7701/mathematica.php
The notebooks here were written assuming Mathematica version 7 or later (you may get an advisory with later versions but this is not likely to cause problems).

• 14-Oct-2013 --- Added a Fourier Transform examples notebook
• 11-Sep-2013 --- Fourier scribble from Mario Carneiro added.
• 02-Sep-2013 --- Upgraded "Finding Residues" notebook and added one on "Complex Integration Examples".
• 22-Aug-2013 --- The notebooks already linked here are from the last two years. New ones will be added (or old ones upgraded) as we proceed this year.

## Integrals

02-Sep-2013 Complex integration examples Some sample integrals that can also be done as contour integrals.
25-Sep-2011 Spherical coordinates volume integrals Sample integrals for doing a three-dimensional volume integral in spherical coordinates.
23-Nov-2011 Gaussian quadrature tests, Part 1 Some sample tests of gaussian quadrature (Gauss-Legendre and Gauss-Laguerre with N=3).

## Complex Numbers and Functions

02-Sep-2013 Finding Residues Using the Residue command in Mathematica.
05-Sep-2012 Complex Series Examples of expanding complex functions in series and determining the radius of convergence.
29-Aug-2012 Complex Roots Examples of how to solve zn = a.
29-Sep-2011 Complex Trigonometry Examples of trig functions with complex arguments and also converting back and forth from expoential to trig.

## Differential Equations

23-Nov-2011 Green's functions, Part 1 A look at Green's functions for a sample Helmholtz equation example.
04-Nov-2011 Diffusion Part 1 Animated solution to a diffusion problem (not derived; just plotted).
04-Sep-2013 Solving some PS#3 differential equations Examples of answers for the differential equations in PS#3, including using extracting the equations in convenient form.
25-Sep-2011 Nonlinear Diff Eq Mathematica notebook solving the nonlinear Duffing differential equation, looking at the time dependence, phase space plots, Poincare sections, and the power spectrum.
25-Sep-2011 Nonlinear Pendulum Mathematica notebook solving the nonlinear pendulum differential equation for various initial conditions, looking at the time dependence, phase space plots, Poincare sections, and the power spectrum.

## Special Functions

13-Nov-2011 Legendre polynomials Plots of polynomials and checks of orthogonality.
13-Nov-2011 Laguerre polynomials Plots of polynomials and checks of orthogonality.
23-Nov-2011 Spherical harmonics Plots of spherical harmonics. 3D!!

## Fourier Series and Transforms

14-Oct-2013 Fourier Transforms 1 Basic examples of taking Fourier transforms and inverses. Also a bit on the implementation of the theta (step) function.
15-Sep-2013 Fourier scribble Created by Mario Carneiro, with revisions by Dick Furnstahl. [Original version] Build up a mouse-drawn curve in a Fourier series.
11-Sep-2013 Fourier Series Basic integrals and plots of Fourier Series.
24-Oct-2011 Fourier Series 2 Comparing full, sine, and cosine Fourier Series.
26-Oct-2011 Fourier Series 3 Generalized string plucking and harmonics. Includes animation!
18-Sep-2013 Gibb's overshoot A physics-style analysis.

## Dirac Delta Functions

31-Oct-2011 Dirac Delta function Basics of using the built-in delta function in Mathematica.

## Simplification

07-Nov-2011 Defining Simplication Rules Simplication rules for logarithms are defined for a private function.
29-Sep-2011 Trig Simplification Simplifying cos[3θ] and simplifying cos[nπ] enforcing the assumption that n is an integer.

## Sample Mathematica notebooks

On some machines clicking the link will start Mathematica directly. If not, "right click" to save the file and then read it into Mathematica separately.