Lab 1 · Lecture 1 · Why Numerical Methods?
Iteration Lab
Run your first numerical methods: watch digits appear, then write and change the loops yourself.
Pick any positive N and a starting guess. Each step averages x and N/x. Watch the correct digits column: it roughly doubles every step.
Try this: N = 10 with x₀ = 1; N = 2 with x₀ = 1000 (a terrible guess: how many extra steps?); N = 0.0001.
Try this
Try this
Q1 Find by the Babylonian method with , correct to 4 decimal places.
, , , . Since , .
Q2 State three different stopping criteria for an iteration and say when each is preferred.
Absolute change (values of moderate size); relative change (very large or very small values); residual (root finding, when is well scaled). Always add a maximum iteration count.
Q3 Distinguish analytical and numerical solutions with one example of each.
Analytical: exact formula, e.g. . Numerical: approximate number from an algorithm with an error estimate, e.g. by iteration.
Q4 Why is a maximum number of iterations needed even when we have a tolerance?
If the method diverges or oscillates, or if the tolerance is smaller than the precision of the computer allows (about relative), the tolerance is never met and the loop would run forever.
Q5 Name the two families of root-finding iteration methods and give one limitation of each.
Bracketing (bisection, false position): slow, needs . Open (fixed point, Newton, secant): may diverge; Newton needs and fails when .