9. Topic 9(COLON) Mathematical Modelling and Numerical Methods

Lesson 9.2: Numerical Solution Of Equations

#### Lesson focus #### Learning outcomes Students should be able to:.

Lesson 9.2: Numerical Solution of Equations

Introduction

Welcome to Lesson 9.2 on the Numerical Solution of Equations! 🎉 In this lesson, we are diving into some exciting mathematical methods that help us solve equations that can't be tackled with traditional algebraic techniques.

Learning Objectives

By the end of this lesson, students will be able to:

  • Locate roots by sign change and interval bisection.
  • Use fixed-point iteration and the Newton–Raphson method.
  • Understand convergence, failure cases, and stopping criteria.
  • Find a root using a change of sign.
  • Apply the Newton–Raphson method to refine a root.

Section 1: Locating Roots by Sign Change and Interval Bisection

Understanding Roots

First, let’s clarify what we mean by roots: a root of a function $f(x)$ is a value $r$ such that $f(r) = 0$. For example, consider the quadratic function $f(x) = x^2 - 4$. The roots of this function are $x = 2$ and $x = -2$, since:

$$egin{align} f(2) & = 2^2 - 4 = 0 \ f(-2) & = (-2)^2 - 4 = 0 \end{align}$$

Sign Change Method

One intuitive way to find roots visually is to identify when the graph of the function crosses the x-axis. This leads us to the sign change method:

  1. Choose two points $a$ and $b$ such that $f(a)$ and $f(b)$ have opposite signs (i.e., one is positive and the other is negative). This implies there is a root between $a$ and $b$ due to the Intermediate Value Theorem.
  2. The function will transition from positive to negative (or vice versa) in this interval.

Example 1

Consider the function:

$$f(x) = x^3 - x - 2$$

To find a root, we evaluate:

  • $f(1) = 1^3 - 1 - 2 = -2$ (negative)
  • $f(2) = 2^3 - 2 - 2 = 4$ (positive)

Since $f(1)$ is negative and $f(2)$ is positive, there is a root between 1 and 2. We can proceed to bisection.

Interval Bisection Method

Bisection is an iterative method where we repeatedly narrow down the interval containing the root:

  1. Calculate the midpoint $m = \frac{a + b}{2}$.
  2. Evaluate $f(m)$:
  • If $f(m) = 0$, then $m$ is the root.
  • If $f(m)$ has the same sign as $f(a)$, update $a = m$, otherwise update $b = m$.
  1. Repeat until the interval is sufficiently small.

Section 2: Fixed-Point Iteration and Newton–Raphson Method

Fixed-Point Iteration

Fixed-point iteration is another way to find the root defined by the equation $g(x) = x$. Re-arrange the original equation into this form:

$$x = g(x)$$

Start with an initial guess $x_0$, then iterate:

$$x_{n+1} = g(x_n)$$

Example 2

Let’s say we have the function $f(x) = x^2 - x - 2$. We can isolate $x$ by rearranging it:

$$x = \sqrt{x + 2}$$

Starting with $x_0 = 2$, we can compute:

  1. $x_1 = g(2) = \sqrt{2 + 2} = 2$

This suggests convergence towards the root.

Newton–Raphson Method

The Newton–Raphson method is more powerful. It uses tangents at points to quickly approximate roots. We need the function $f(x)$ and its derivative $f'(x)$:

The formula is:

$$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$$

Example 3

Using the same function $f(x) = x^2 - x - 2$:

  • First, calculate the derivative: $f'(x) = 2x - 1$.
  • Starting with $x_0 = 3$:

$$x_1 = 3 - \frac{f(3)}{f'(3)} = 3 - \frac{3^2 - 3 - 2}{2 \cdot 3 - 1} = 3 - \frac{4}{5} = 2.2$$

Continue iterating until desired accuracy.

Convergence and Failure Cases

Understanding how these methods converge is crucial. The Newton–Raphson can fail if:

  • $f'(x)$ is zero (it requires the derivative).
  • The function is not well-behaved around the root.

To ensure success, we need to select good initial guesses and define stopping criteria, such as when the absolute difference between iterations is less than a small threshold (e.g., 0.01).

Conclusion

In this lesson, we learned how to locate roots of equations using various numerical methods. Knowing when to apply the sign change method, interval bisection, fixed-point iteration, and Newton-Raphson method is crucial for finding solutions where common algebra falls short. As we delve deeper into mathematical modeling, these techniques become essential tools in your arsenal! 🛠️

Study Notes

  • A root is a solution to $f(x) = 0$.
  • Sign change indicates a root in the interval [a, b].
  • The bisection method narrows down ranges to find roots.
  • Fixed-point iteration re-arranges equations to find roots iteratively.
  • The Newton-Raphson method uses derivatives for rapid convergence.
  • Monitor convergence and be cautious of failure by checking derivatives and behaviors of functions.

Practice Quiz

5 questions to test your understanding