Transcript present

Introduction to
Computation in Physics
What do I mean by: modeling, simulation, computation
Some places/ universities are really concerned about computer in
physics education. APS-2004 W38
Using computers can be by machine coding (Assembly), highlevel language coding (Fortran or Java …etc.) or mere running of
simulations (e.g. PSPICE) and playing with physlet buttons as in
a projectile motion physlet.
Please do not think that you will ‘learn’ Mathematica from this
presentation though you will hopefully learn ‘about’ Mathematica.
Stephen Wolfram
[the creator of Mathematica]
 A physicist!
 Published his first scientific paper at the age
of 15!!
 Received his Ph.D. in theoretical physics
from Caltech by the age of 20!!!
 Worked at the Institute for Advanced Study
in Princeton!!!!, then
 Professor of Physics, Mathematics, and Computer Science
at the University of Illinois @ Urbana-Champaign!!!!!
 President and CEO of Wolfram Research (!!!wow!!!)
Mathematica
 Is a (high level) programming language developed
by Stephen Wolfram (first release in 1988) with
special capabilities to do symbolic and numeric
calculations in addition to graphing and many other
features, as will be seen shortly.
 Integrated environment for technical computing.
 It has had a profound effect on the way computers
are used in many technical and other fields.
 First released in 1988; Current version:??8??
 Used by, literally, millions worldwide.
If you do not know much Mathematica
you should benefit from the electronic
help (the -electronic- Mathematica book)
Tour of features
http://www.wolfram.com/products/mathematica/tour/
Power of Mathematica
Basic calculations, significant figures,
trigonometry, complex notation
Algebra [systems of equations, eigensystem]
Graphics:
vector fields
3-D
parametric plotting
histograms
Symbolic computation
Numeric computation
Power of Mathematica
Special functions (Legendre, Bessel, Chebysef, …etc.)
Sound
Fitting data
Statistics
Communicate with external lists and Fortran.
Tour: Power of Mathematics
“The key intellectual
advance that made
this possible was the
invention of a new
kind of symbolic
computer language
that could for the first
time manipulate the
very wide range of
objects involved in
technical computing
using only a fairly
small number of basic
primitives.”
With Mathematica, the entire approach to problem solving can be drastically changed.
We give some brief examples.
……………………………………………………………………………………
DOUBLE PENDULUM: This is a topic that is generally treated as an "advanced"
topic. With Mathematica, the solution is relatively straightforward. Once the
solutions is obtained, the textbooks try to describe (in words) the general properties
of the system, and the normal modes. (In particular, the property that the energy is
transferred back and forth between the two segments of the pendulum.) With the
animation capability of Mathematica, we do not need to lead the student to these
conclusions, but we can point them in the general direction, and let them discover
these results on their own by varying the amplitudes of the separate normal modes.
……………………………………………………………………………………
HYDROGEN ATOM: In the standard solution of the hydrogen atom, the student is
completely lost in the mathematics. Mathematica is able to recognize that the
solution of the radial equation is a Laguerre polynomial, assemble the constants to
form the principal quantum number, and plot the solutions. The student then has the
energy and the curiosity to numerically investigate the behavior of the
wavefunctions, and consider the disastrous consequences of choosing a non-integral
value for the principal quantum number.
An excerpt from Mathematica for Physics, by Robert L. Zimmerman and Fredrick I. Olness
How Mathematica benefits in phys-101/102?
 Projectile motion
 Waves
800
600
400
 Sound
200
50
By Dr. A. Al-Jalal using Mathematica
100
150
200
250
300
“Intermediate” level
physics
6
4
4
2
 Classical Mechanics
0
-2
 Thermodynamics
-4
-4
-2
0
2
4
 Optics
 Electronics
 Quantum Mechanics
2
-3
-2
-1
1
-2
-4
-6
2
3
Higher level physics
120
100
80
60
40
20
20
 Green's function
 Canonical transformations
 Chaos
40
60
80
A series R,L,C electric
circuit (assume R2 <<
4L/C) initially carries
no charge nor current. At
time t = 0+ a volage V(t)
is applied across the
circuit such that:
V(t) = Vo e-gt
Find the charge q(t) on
the capacitor for t>0.
Hint: Use Green’s
method; see M&T sect.
3.10
100
Computation and
Mathematical Models
The concept is based on three elements:
1- The evolution of a system is referred to as the independent
variable. Usually, this is the variable of time (t).
2- The state variable is the finite dimensional vector variable
{u1(t), u2(t), ….un(t)} deemed sufficient to describe the
evolution of the physical state of the system. This is also called
the dependent variable.
3- The mathematical model of a system is an evolution equation
suitable to define the evolution of the state variable {u} that is
describing the system itself.
There are issues of validation, determinism and stochasticity that one needs to be concerned
with! (c.f. see: Mechanics and Dynamical Systems with Mathematica, by Bellomo et. al.)
An Example: the setting sun
“turning” red
1- The independent variable is time (t).
2- The state variable deemed sufficient to describe the
evolution: color(t) and intensity(t).
3- The mathematical model of a system to define the time
evolution of color and intensity: for light emitted, eye sensitivity
and scattering in the atmosphere.
Check the code
Web references that serve
Mathematica
Info[rmation] Center:
•
~ five thousand Mathematica programs and document
•
easy browsing and searching
http://library.wolfram.com/infocenter
Eric’s pages:
http://scienceworld.wolfram.com/physics/
The Mathematica Journal:
http://www.mathematica-journal.com/issue/v9i1/
Mechanics and Dynamical Systems with Mathematica:
http://www.birkhauser.com/supplements/081764007X/Additional_Resources/index.html
List of available books (some with CDs) for
Mathematica in Physics
1) Mathematica for Calculus-Based Physics, by Marvin L.
De Jong.
2) Mathematica for Physics, by Robert L. Zimmerman and
Fredrick I. Olness.
3) Mechanics and Dynamical Systems with Mathematica,
by Bellomo et. al.
4) Numerical and Analytical Methods for Scientists and
Engineers, using Mathematica author: Daniel Dubin
5) Nonlinear Physics with Mathematica for Scientists and
Engineers, by Richard H. Enns and George C. McGuire
6) Mathematical Methods Using Mathematica for Students
of Physics and Related Fields, by Sadri Hassani
Conclusions:
It would be wise to seriously study computational skills
adequacy (or lack of) visa vis the current physics curriculum.
Mathematica is an interesting computer program that is very
useful in physics.
I hope I have been able to get you more interested in
computer programming for University pedagogy.
Using Mathematica is fundamentally different from using
simulations or playing with physlets.