We very often need to find the zero of a complex non-linear function when working with mathematical modelling problems, perhaps most frequently when we wish to find the value (or values) of
such that two functions, say
and
, are equal, that is
.
This problem is equivalent to letting
and determining the value(s) of
such that
.
Here we will use the numerical methods of interval bisection and Newton’s method (also known as Newton–Raphson) to find the zero of a function.
Suppose
is a continuous function, such that
and
.
An approximation to
may be calculated using the following algorithm:
Let
If
, then the root lies in the interval
, so let
.
If
, then the root lies in the interval
, so let
. If
then the root is at
Repeat this process until you have a root to the desired accuracy.
Do this problem with pen and paper.
Modify this algorithm for the case
and
Let
If
, then the root lies in the interval
, so let
.
If
, then the root lies in the interval
, so let
.
If
then the root is at
.
Repeat this process until you have a root to the desired accuracy.
Suppose that
is a continuous function.
An approximation to
may be calculated using the following algorithm:
Start with an initial guess
.
Calculate the next solution using:
Repeat step 2 until you have the root to the required accuracy.
For more details on Newton–Raphson see: https://mathworld.wolfram.com/NewtonsMethod.html