-->
MCS 471 Practice Problems 1: Nonlinear Equations
Hand Calculator and Maple/MATLAB Calculations
Do NOT Hand In: Practice Problems ONLY!
Background Reading:
- Lecture Notes, Class Notes
- Heath, Chapters 1 and 5
- Gerald and Wheatley, Chapters 0 and 1
- Class Maple Web Home Page, introductions and fsolve
- Class MATLAB Web Home Page, introductions and fzero
Exam 1 Topics
Practice Problems 1 Topics
-
Floating Point Arithmetic (for advances information, see
Floating Point Arithmetic References
- Bisection Method
-
Secant Method
- Newton's Method
- Fixed Point Iteration
-
Golden Section Search,
(See Lecture Notes and or click for Class Notes,
but topic is briefly in Heath text)
Practice Problems:
In following computational questions, use 4 Digit Exam Precision:
Round to 4 significant decimal digits only
when you record an intermediate or final answer in your exam booklet;
and continue calculations with these rounded, recorded numbers.
- Considering just the field representing the fractional
part of a nonzero normalized 32 bit floating point real for the
IEEE 754 single precision standard, how many distinct numbers can
be represented assuming the exponent and sign are fixed?
Record as many digits as your calculator allows. Explain
how you got your answer. (I.e., ignore the sign bit and the biased
exponent field for this count.)
-
Using Newton's Method, find a numerical approximation to
the Zero of
on [2.5,2.9] starting with the endpoint (k = 0)
having the smallest value of |f|,
keeping track of the number of ALL function evaluations kfe,
the current change in sign interval [a_k,b_k], and
tabulating
k |
kfe |
a_k |
b_k |
x_k |
f_k |
f_k' |
x_{k+1} |
|x_{k+1}-x_k| |
0 |
| | | | | | | |
... |
| | | | | | | ... |
until |x_{k+1}-x_k| < 0.5e-2.
-
Find a numerical approximation to the intersection between
two functions
starting from x_0 = 2.400 at k = 0 by forming a
convergent
Fixed Point Iteration, other than Newton's method.
Demonstrate that the fixed point convergence criterion is satisfied near
x_0. Tabulate
for k = 0 to 3 iterations.
Answer:
If g(x)=1.984/ln(x), then
g'(x) = -1.984/(x*ln^2(x))
and |g'(2.4)|=|-1.079|>1 indicating a marginal fixed point
iteration divergence, which does not satisfy the problem statement.
So, we take a manipulated inverse
gi(x)=exp(1.984/x), gi'(x) = -1.984*exp(1.984/x)/x^2
and |gi'(2.4)|=|-0.7873|<1,
satisfying the convergence criterion at x=2.4, with
fixed point iterations x_{k+1}=gi_k, given in the table:
k |
0 |
1 |
2 |
3 |
x_k |
2.4 |
2.286 |
2.382 |
2.300 |
Note that the original form converges as a fixed point iteration in spite
of the marginal divergence warning and there are other forms that will work
too.
-
Using the method of Golden Section Search,
find the Maximum and its Interval of Uncertainty for
on [3.6,6.0] at k = 1, say. Use the rounded version of the GSS
constant (c =(4R) 0.3820).
Summarize your results with a table of
k |
kfe |
a_k |
b_k |
d_k |
x_k |
u_k |
gx_k |
gu_k |
1 |
|
|
|
|
|
|
|
|
.... |
|
|
|
|
|
|
|
...... |
for k = 1 to 3 iterations with k_{fe}
the number of function evaluations.
Circle and label your best approximation to the maximum,
its location, and state the interval of uncertainty.
is the location, and IntervalOfUncertainy=(4R)[4.167,5.083].
In the following older problems prior to Fall 1999,
use "CHOPPING EXAM PRECISION":
The answers are calculated for chopping to 4 significant (4C)
digits since the problems are from a time when chopping was used.
Note: Maple comments are not part of these sample exam problems,
but were added afterward in the editing stage to aid in analyzing
the problems.
- Using the method of BISECTION starting with A(1)=1. and B(1)=2.,
find the root of
F(X)=EXP(X)-3.5/X
Record your answer in a table of
K,A(K),B(K),F(A(K)),F(B(K))
for each iteration on (A(K),B(K)) for K=1 to 3.
Compare your answer to that using fsolve of Maple.
- Find the root of
F(X)=EXP(X)-3.5/X
using the SECANT METHOD for 2 iterations beyond the starting guesses,
X(1)=1. and X(2)=2. Record your answers in a table of
K,X(K),X(K-1),F(X(K)),F(X(K-1))
for each iteration K.
Compare your answer to the Bisection and Maple
answers from the first question.
- Find the root of
F(X)=EXP(X)-3.5/X
on [1.,2.] using NEWTON'S METHOD until ABS(X(K)-X(K-1))<.5E-1.
Record Results in table of
K,X(K),F(X(K)).
Use X(1)=1.5 to start.
Compare your answer to the Bisection, Secant and Maple
answers from the first and second questions.
- Numerically solve
F(X)=LN(X)-1/X=0
by forming a convergent, fixed point iteration, other than Newton's,
starting from X(1)=EXP(1). Record your answers in a table of
K, X(K), for K= 1 to 3.
(Corrected (2/14/99) Final Ans.=(4ch) 1.998 using g(x)=exp(1/x)).
Compare your answer to that using fsolve of Maple.
Use the plot function of Maple to plot the problem function
G(X).
- Find the minimum of
G(x)=EXP(x)+7.8/x
on (1,2) by the method of
GOLDEN SECTION SEARCH for K=1,2,3 iterations. Display your answer in a
table of
K, AK, BK, XK, UK, GXK, GUX.
Use Maple's plot to plot the function G(X) and
compare your problem answer to that using minimize of Maple.
- Find the maximum and its location for
G(x)=x*COS(x)
on (0.4,1.4) by
the method of GOLDEN SECTION SEARCH. Summarize your results by a
tabulation of
K, AK, BK, XK, UK, GXK, GUK
for K=1 to 3.
( Best Final Ans.: (0.8720,0.5609) for (X,G) or (U,G).)
{WARNING!: You can Ignore the Maple part of this exercise since "maximize"
obviously does not work for this simple trigonometric function. "Maximize"
seems to work primarily for polynomial functions over algebraic fields.
However, it may work if
you approximate "x*cos(x)" by the first few terms of its Taylor series.
Use Maple's plot to plot the function G(X) and
compare your problem answer to that using maximize of Maple.
You can also look for the critical point of the derivative "cos(X)-X*sin(x)"
by using fsolve.}
- Using Maple, get all the roots, including double and triple roots,
of the polynomial
x^5-11x^4+46x^3-90x^2+81x-27.
Also plot the polynomial using the plot function of Maple, on
[0,4].
Web Source: http://www.math.uic.edu/~hanson/mcs471/pp1.html
Email Comments or Questions to
hanson A T math uic edu
Click Here For Current Class HomePage