MCS 471 --- Computer Problem 1 --- Spring 1996
NonLinear Equations
Single program with computer output is due Monday 26 Feb 1996 in class.
- General Instructions:
Write a single, well documented, program that solves the following finite
precision (double precision or 64 bits = 8 bytes is required) problem.
You are required to use the following Method, Test Examples, and Output.
You may use WATFOR77, regular Fortran, Pascal or C for this
problem. However, you must hand in both copies of your program source code
and your computer output.
Document your own code with a brief description of the problem,
an important variables dictionary and headings for important programming
steps (use programming language comment lines).
- General Hybrid Method:
- Hybrid Newton'S Method with BISECTION back-up,
i.e. a hybrid method that STARTS WITH 3 BISECTION ITERATIVES, THEN
uses Newton's method STARTING WITH THE LAST BISECTION MIDPOINT until it
goes out of the current change of sign interval OR F' IS TOO SMALL,
then uses 3 MORE bisection iterations to reduce that interval, AND
THEN RETURNS TO NEWTON'S.
- Stopping Criterion:
ABS(XNEW-XOLD) + ABS(FNEW) < TOL + 3*EPS*(ABS(XOLD)+ABS(FOLD)),
{CAUTION: Note Corrected RHS Omission!}
with TOL = 0.5e-5 for all subroutines,
"EPS" is the double precision machine epsilon,
and the iteration limit is KMAX = 55.
- Difficult Test Examples:
- F1(x)=exp(-5.7*x) - x/exp(4.6) on (-1.1,1.1)
- F2(x)=39. - x*exp(4.5) + exp(3.2*x) on (-0.2,1.2).
{CAUTION: Note Corrected Search Interval!}
- F3(x)=exp(-11.2*x*x+11.6*x-4.6) - 1.5*exp(-11.8*x*x+10.9*x-4.5) on (0,2)
{Caution: Do NOT forget
that EXTERNAL statements are needed in Fortran or Watfor77,
in all subprograms in which other subprograms are called with FUNCTION
arguments; the syntax is like "EXTERNAL F1, F2, ..., FN" and must come
before any executable statements.}
- Output Requirements:
- Name of Your Computer System with Processor if Known
- For each example,
print a nicely labeled table of
NEVAL, XNEW, ABS(XNEW-XOLD), F(XNEW),F'(XOLD)
using 5 significant DIGITS,
and with the last item only for the Newton's method part of the hybrid method.
Be sure to give the starting value for both X and F.
The 3rd and 4th items of the table should be printed in e-notation,
because errors should almost always be in e-notation.
- Print whether the hybrid method converges or not converge after "KMAX"
iterations for any of the examples or methods.
- Separately, check your answers with Maple or similar symbolic computation
language, and hand in your commented Maple Worksheet with you program and
output. If you need to change precision, note that Maple works in the
background with infinite precision, but only displays 10 digits which
may be altered by command,
where <n> is the number of desired digits and
<function> is a function or expression.
For help in editing Maple Worksheet to add comments and plots, click
on
Web Source: http://www.math.uic.edu/~hanson/M471/mcs471cp1.html
Email Comments or Questions to
hanson@math.uic.edu