PHYCS 498CQM: Homework 1
Due 1/31/01
The following problems are meant to get you started using the EWS machines.
You should become familiar with writing simple Fortran programs and plotting
data using gnuplot.
-
Set up your account on the HP machines at EWS using the instructions given in class that set the path
to the fortran90 compiler (or you may do this on any machine you have available).
Compile the test program that can be downloaded from the class codes
page, and send the output by email to rmartin@uiuc.edu.
-
Derive formulae for the second derivative of a function f(x) using 3, 4,
and 5 points. Find the error orders of each of your formulae and verify each one
by producing an error versus h plot on a log-log scale. For your test,
use an analytic function of your choice; specify the function and
the point(s) of evaluation in your answers.
-
Derive differentiation formulae for equally spaced abscissas x_i=x_0 +
i*h using the Method of Undetermined Coefficients. What is special about
the 4-point formula?
-
Write a Fortran program to evaluate your formulae for
-
f(x)=x**4 at x=1
-
f(x)=exp(x) at x=1
-
f(x)=sin(x) at x=Pi/4
and compare to the exact results for the second derivative. Comment on
the results for x**4!
-
For one of the above functions, produce a plot of the error in the numerical
derivative versus h on a log-log scale. Determine the error order from
the slope of the resulting curve.
Hand in :
-
your differentiation formulae
-
one log-log plot of error versus h and an estimate of the error order
-
In mean-field theory, the spontaneous magnetization of a Heisenberg ferromagnet
with spin 1/2 at a temperature T below the Curie temperature is given by
the nonzero solutions of the equation
T*x=tanh(x)
where x is proportional to the magnetization. (For a brief review of
the physics background see e.g. Ashcroft-Mermin, pp. 715, especially Figure
33.11)
-
For which T does the above equation have nonzero solutions?
-
Write a Fortran program to find a nonzero solution of the above equation
for different values of T, using
-
the bisection method
-
Newton's method
Does Newton's method always converge? Can you understand what happens?
-
Plot T*x(T) versus T
-
A nice description of the Newton method with an animated graphic is given
here .
Hand in a plot of T*x(T) versus T.
Back to 498CQM Home
Back to 498CQM Calendar
Last Modified January 16
Email question/comments/corrections to
rmartin@uiuc.edu