#
Mathematica -Special applications

##
Mathematica

- is a computer algebra program, i.e. it performs formula manipulation;

- can do simple algebraic manipulations, integrate, differentiate,

solve equations, solve differential equations etc.;

- can do numerics e.g. if you need to fit a Voigt function;

- can perform matrix operations, numerical integration, numerical

solutions of equations, of differential equations etc.

- can be used to write programs;

- is very useful for a quick overview, for projects where you need

combinations of algebra, numerics and graphics;

- can do everything, but may be not equally well, and with some

high entrance barrier.

##
Example 1: Simple differentiation and integration

###
differentiation

###
integration

##
Example 2: Propagation of a scalar wave in a medium:

phase- and group velocity

###
fictitious refractive index

###
dispersion relation

###
phase- and group velocity

###
assume a gaussian spectral distribution of the wave

###
scalar wave

###
time evolution

##
Example 3: Web export

###
make html

###
export

##
Example 4: Curve fitting:

determination of the exchange parameters of a magnetic molecule

from high T susceptibility data

###
N=8, s=2/2

####
coupling a=, b= in Kelvin

H=

####
Interaction matrix

###
experimental data for

###
the function is known to be a series in 1/T,

try it with various orders

###
plot the data and the approximations

###
zero-field susceptibility

####

####

####

####

####
higher orders

###
determine coefficients with nonlinear fit

a=20;

b=10;

####
originally third order

####
originally fourth order

####
originally fifth order

####
sixt order

##
Example 5: Solving Hamiltons equation of motion:

collisions of Argon clusters

Energies in meV,

Distances in A,

Velocities in A/ps,

Masses in u

###
Definitions

####
Number of particles = Teilchenzahl

###
Hamilton-Function and generalized gardients

####
P and X are defined as arrays, so *Mathematica* knows what they are

####
Hamilton-Function in P and X,

interaction: Lennard-Jones-(6-12)

####
gradients

###
dynamics

####
differential equations

####
initial conditions: two clusters of 3 Argon each,

CM1 at {-Rand,0,0}, CM2 at {+Rand,0,1}

####
all equations

####
all momenta and coordinates

####
solve differential equations numerically

####
plot dynamics

Converted by *Mathematica*
November 26, 2002