









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Igor Volobouev
Computational Physics (PHYS 5322)
Texas Tech University
1-d:
Usually easy, unless you
need to solve gazillion equations in alimited amount of time, and
f(x)
is not
cheap to evaluate
Special case: polynomials N-d:
Usually hard, except for the
important special case of linear systems.Success in the nonlinear case dependscrucially on having a good first guess forthe solution.
First, bracket the root! Then divide the interval in two and keepthe root bracketed. Repeat until thedesired tolerance is reached. You mustthink carefully what tolerance isappropriate for your problem. Converges to a root, a discontinuity point,or a singularity. The rate of convergence isusually expressed as
m n
n^
1
ε
ε^
m^
- is achieved when the
assumptions turn out to be correct.
Secant Ridder’s Brent’s See
Numerical Recipes
for details
The number of roots is known in advance Direct formula-based methods are appropriatefor polynomial up to 3
rd^ degree.
Assume simpler form near the root and iterate(Muller’s, Laguerre’s methods). Then deflate thepolynomial and repeat for another root. Jenkins-Traub and eigenvalue methods areknown to be very robust (but usually somewhatslower)
Equations of the type
A^ x
=^ b
Common way to solve:
LU
decomposition^ A = L U
Thus
A^ x
= (L U)
x^ = L (U
x ) =
b
Let^
y^ = U
x. Solve for
y^ in
L^ y
=^ b
by forward substitution.
Solve for
x^ in
U^ x
=^ y
by backward substitution.
This is the technology, for example, behind the “linsolve” module inSciPy. LAPACK is often used for C/Fortan calculations.
A particular optimization problem whichhappens very often in physics Dichotomies: local / global, 1d / multivariate,using / not using derivatives
Three points are needed to bracket theminimum:
a < b < c
so that
f(b) < f(a)
and
f(b) < f(c)
Assume the function is parabolic near theminimum. Pick the next point at theminimum of the parabola.
Converges quickly if the starting bracket is nottoo far away Derivative information can be easily included
to choose initial points.
Simulated annealing might or might nothelp – analogs of phase space and energyrequired, and they are not always easy toconstruct.