Numerical methods: numerical solutions of equations, iterative methods

🔢 Numerical Methods for Solving Equations

In Pure Mathematics 3 (P3) we learn how to find the roots of equations when algebraic methods are too hard or impossible. Think of it like searching for a hidden treasure: you don’t know exactly where it is, but you can use clues to get closer and closer.

1️⃣ Bisection Method

The bisection method works on continuous functions where you know two points, $a$ and $b$, such that $f(a)f(b) < 0$ (the function changes sign). It repeatedly cuts the interval in half, keeping the sub‑interval where the sign change occurs.

  1. Choose $a$ and $b$ with $f(a)f(b) < 0$.
  2. Compute the midpoint $c = \frac{a+b}{2}$.
  3. Check the sign of $f(c)$:
    • If $f(c)=0$, $c$ is the root.
    • If $f(a)f(c) < 0$, set $b = c$.
    • Otherwise set $a = c$.
  4. Repeat until the interval width $|b-a|$ is smaller than the desired tolerance.

Analogy: Imagine you’re looking for a lost toy under a blanket. You first split the blanket in half, then keep searching in the half where you feel a slight weight, and keep halving until you find it.

2️⃣ Newton–Raphson Method

This method uses the function and its derivative to jump straight to the root. Starting from an initial guess $x_0$, the next approximation is $$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}.$$

  1. Choose a good initial guess $x_0$.
  2. Compute $f(x_n)$ and $f'(x_n)$.
  3. Update with the formula above.
  4. Repeat until $|x_{n+1} - x_n|$ is below tolerance.

Analogy: It’s like aiming a bow at a target. Each shot (iteration) uses the feedback (derivative) to adjust your aim more accurately.

3️⃣ Secant Method

The secant method is similar to Newton–Raphson but doesn’t require the derivative. Using two initial guesses $x_0$ and $x_1$: $$x_{n+1} = x_n - f(x_n)\,\frac{x_n - x_{n-1}}{f(x_n) - f(x_{n-1})}.$$

  1. Pick two starting points $x_0$, $x_1$.
  2. Apply the formula to get $x_2$, then use $x_1$ and $x_2$ to get $x_3$, and so on.
  3. Stop when the change is small.

Analogy: Think of two friends guessing the location of a secret door. Each new guess is based on the line (secant) connecting their previous guesses.

4️⃣ Fixed‑Point Iteration

Rewrite the equation $f(x)=0$ as $x=g(x)$. Then iterate: $$x_{n+1} = g(x_n).$$ Convergence depends on the slope of $g$ near the root: if $|g'(x^*)| < 1$, the method converges.

  1. Transform the equation to $x=g(x)$.
  2. Choose an initial guess $x_0$.
  3. Compute successive approximations using $x_{n+1} = g(x_n)$.
  4. Stop when the difference is tiny.

Analogy: It’s like a game of “hot and cold”: each guess tells you if you’re getting closer, and you keep adjusting until you’re “hot” enough.

📊 Summary of Methods

Method Idea Convergence Typical Use
Bisection Halves interval where sign changes. Linear, guaranteed if continuous. When you can bracket the root.
Newton–Raphson Uses tangent line to jump to root. Quadratic, fast if good initial guess. Smooth functions with known derivative.
Secant Approximates derivative with two points. Super‑linear, no derivative needed. When derivative is hard to compute.
Fixed‑Point Iterates a function that maps root to itself. Linear if $|g'|<1$. Rewriting equations into suitable form.

🧪 Practice Problems

  1. Use the bisection method to approximate the root of $f(x)=x^3-2x-5$ in the interval $[2,3]$ to within $10^{-3}$.
  2. Apply Newton–Raphson to $f(x)=\cos x - x$ starting from $x_0=0.5$. How many iterations are needed to reach $10^{-5}$ accuracy?
  3. Find the root of $f(x)=e^x-3x$ using the secant method with initial guesses $x_0=0$ and $x_1=1$. Show the first three iterations.
  4. Rewrite $x^3-4x+1=0$ as a fixed‑point equation and use fixed‑point iteration starting from $x_0=1$ to approximate the root. Discuss whether the method converges.

💡 Tips for Success

  • Always check the function’s behaviour before choosing a method.
  • For Newton–Raphson, a good initial guess is key; plot the function if possible.
  • Keep track of the error $|x_{n+1}-x_n|$ to decide when to stop.
  • When the derivative is zero or hard to compute, prefer the secant or bisection method.
  • Use a calculator or spreadsheet to handle the arithmetic quickly.

Happy hunting for those hidden roots! 🚀

Revision

Log in to practice.

0 views 0 suggestions