*Computational Physics, 2nd Edition*

### Briefly about the book:

This *new* edition of **Computational Physics** expands the original
greatly on both the range of the physics problems treated and the numerical
algorithms described. It contains a whole new chapter on the physics of music
as well as several new sections such as those discussing the scaling in
phase transitions, coupled nonlinear oscillators, two-dimensional
time-dependent Schroedinger equation, real neurons, and cellular automata.
In addition, a series of self-contained appendices that elaborate on
the various numerical algorithms and theories behind them are given
including one that discusses the solution of linear systems, a topic
that was little touched in the original edition.
View the Table of Contents

View the bood-end Index
View the Preface to the 2nd Edition

### Sample programs

Some sample programs are available in True Basic or Fortran. However, please
note that they are provided only to guide you in suggesting some particular
ways to implement the strategies given in the book and **not** intended as
the model or exemplarly programs at all. They clearly show the
authors' prejudices and background, and they may even still contain some bugs.
So please be warned. You may access them
from this page, or for each chapter
and appendix from below:

### Supplementary Material created by Dr. Kevin Berwick

Dr. Kevin Berwick of Dublin Institute of Technology created a
large compendium of sample programs in MATLAB, covering many examples in
the text of the book as well as some in the problem excercises:
**Computational Physics using MATLAB** (Version 2)

Dr. Berwick has also put together a video showcasing some of his
programs on the book material, including movies of the wave functions
for two-dimensional, time-dependent Schrödinger Equation:

**Computational Physics
Video**

### Some general comments

As discussed in the book, the language choice is always an issue in
numerical work. Although sample programs provided in these web pages
are mostly in True Basic
and Fortran. (A free compiler for many languages including Fortran is
available in GCC.)
We are not promoting either of
these languages. They are used simply because they have certain strengths
that make them useful as samples (such as the good built-in graphics
in True Basic and the wide-spread familiarity with Fortran among the
scientists). Over the years of our teaching a course based on these
materials, many students used other languages to great effects, such as
Java, Python
(VPython, a 3D graphics enabled Python),
C, and C++.
We consider graphical presentation of the results to be an important
part of much of the numerical work. This is not only true for the
demonstration purposes and for quick grasp of the main features of
the results, but also true even for most demanding numerical calculations
in some cases. As a result we include graphics in many of the sample
programs/algorithms in the book and in these web pages. Some languages
(such as Java and True Basic) have built-in graphics, but others lack
them (such as Fortran and C). In the latter case, the choice is usually
either to link to a graphics subroutine library or use your programs
to produce/save numerical data only and then plot them later with
a stand-alone graphics software. Both approaches are perfectly acceptable
as long as you have a way of visualizing the results in the end.

### Corrections, remarks, and comments

Mistakes and typos: nobody is perfect - errors are bound to be found
either by us authors or by you the reader. As we collect them along with
your remarks and comments, we will compile them. Please
click **Errata**
to view them. (Printable version)
Any error is too many, but with your help, we already caught a fair
number of them. We hope to correct them if we get a chance for a
second printing, or certainly for a third edition if one comes along.
If you find an error or would like to make some comments on the material,
please inform us by email or other means, via the address given above,
or simply click
Nick Giordano or
Hisao Nakanishi.