Welcome to Numerical Methods!
In your journey through A Level Mathematics, you have spent a lot of time solving equations using algebraic methods (like factorising or using the quadratic formula). But here is a secret: most equations in the real world cannot be solved exactly!
Numerical methods are like a toolkit of "smart guessing" strategies. They allow us to find answers that are "good enough" for engineering, physics, and computer science when exact algebra fails us. Don't worry if this seems a bit different from what you're used to; it’s all about following logical steps to get closer and closer to the truth.
1. Locating Roots: The Change of Sign Method
Before we can solve an equation like \(f(x) = 0\), we first need to know roughly where the answer (the root) is. A root is simply the x-value where the graph crosses the x-axis.
How it works
If a function is continuous (meaning you can draw it without lifting your pen) and it changes from a negative value to a positive value over an interval, it must have crossed the x-axis (zero) at some point in between.
Analogy: Imagine you are walking across a field. At 1:00 PM you are 5 meters South of a fence, and at 1:05 PM you are 5 meters North of it. Even if you didn't look down, you know for a fact you crossed that fence line at some point between 1:00 and 1:05!
When the method fails
You need to be careful! A change of sign doesn't always guarantee exactly one root:
- Multiple Roots: If the interval is too wide, there might be two (or any even number) of roots. You might start and end on the "positive" side but have dipped below zero twice in the middle.
- Discontinuities (Asymptotes): If the graph has a vertical asymptote (like \(y = \frac{1}{x}\)), the sign might change because the graph "jumped" over the axis rather than crossing it. This is why we say the function must be well-behaved or continuous.
Quick Review: To show a root exists between \(x=a\) and \(x=b\), calculate \(f(a)\) and \(f(b)\). If one is positive and one is negative, there is likely a root between them.
Key Takeaway: A sign change in \(f(x)\) over a small interval usually indicates the presence of a root, provided the function is continuous.
2. Iteration: The Fixed Point Method
Once we've found an interval, we want to zoom in on the root. One way is to rearrange \(f(x) = 0\) into the form \(x = g(x)\). We then use the formula \(x_{n+1} = g(x_n)\).
Step-by-Step Process
- Start with an initial "guess" called \(x_0\).
- Plug \(x_0\) into your formula to get \(x_1\).
- Plug \(x_1\) back in to get \(x_2\), and so on.
Calculator Tip: Use the ANS button! Type your first guess and hit [=]. Then type the formula using [ANS] instead of \(x\). Keep hitting [=] to see the numbers get closer to the root.
Staircase and Cobweb Diagrams
We can visualize this process by drawing the line \(y = x\) and the curve \(y = g(x)\). The root is where they intersect.
- Staircase Diagram: This happens when the numbers approach the root from one side (e.g., 2.1, 2.2, 2.25...). It looks like a set of steps.
- Cobweb Diagram: This happens when the numbers "spiral" or bounce back and forth around the root (e.g., 2, 3, 2.1, 2.9...).
Common Mistake: Not every rearrangement works! If your numbers are getting huge or going off to infinity, the iteration is diverging. You might need to try a different rearrangement of the original equation.
Key Takeaway: Iteration uses a recurrence relation to "hone in" on a root. The success depends on the choice of \(g(x)\) and the starting value.
3. The Newton-Raphson Method
This is a high-speed way to find roots using tangents. It is generally much faster than simple iteration.
The Formula
The standard formula you need to know is:
\(x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}\)
The Geometric Idea
Newton-Raphson takes your guess, goes up to the curve, and draws a tangent line. Where that tangent hits the x-axis becomes your next, better guess. It follows the slope of the curve down to the root.
When it fails
The method is brilliant but has one major weakness: stationary points.
Did you know? If your guess is at a turning point (where the gradient is zero), the tangent is horizontal. It will never hit the x-axis! In the formula, \(f'(x_n)\) would be zero, and you can't divide by zero. Your calculator will give you an error.
Key Takeaway: Newton-Raphson uses differentiation to find roots quickly, but it fails if the gradient at your guess is zero or very close to zero.
4. Numerical Integration: The Trapezium Rule
Sometimes we can't integrate a function using the usual rules. Instead, we estimate the area under the curve by splitting it into vertical strips and treating each strip as a trapezium.
The Formula
\(Area \approx \frac{1}{2}h [y_0 + y_n + 2(y_1 + y_2 + ... + y_{n-1})]\)
Where \(h\) is the width of each strip: \(h = \frac{b - a}{n}\).
Memory Aid: The "Ends and Middles" Rule
To remember the formula, think: "Half the width, times (the sum of the two end heights + two times all the heights in the middle)."
Over-estimates vs. Under-estimates
You can tell if your answer is too big or too small by looking at the convexity of the curve:
- Convex (curves "downwards" like a valley): The straight top of the trapezium stays above the curve, so it's an over-estimate.
- Concave (curves "upwards" like a hill): The straight top of the trapezium stays below the curve, so it's an under-estimate.
Key Takeaway: The Trapezium Rule approximates the area under a curve. Increasing the number of strips (\(n\)) makes the estimate more accurate.
Summary Checklist
- Can I show a root exists using a sign change?
- Can I explain why a sign change might fail (asymptotes/even roots)?
- Can I use the ANS button to perform iteration?
- Do I know the Newton-Raphson formula and when it fails?
- Can I apply the Trapezium Rule and determine if my answer is an over or under-estimate?
Don't worry if these formulas look intimidating at first! With practice, you'll see that Numerical Methods is often the "easier" part of Pure Maths because it follows a very predictable, step-by-step pattern. Keep at it!