Solutions To Nonlinear Equations: February 1, 2021
Solutions To Nonlinear Equations: February 1, 2021
February 1, 2021
Understand concepts of non-linear equations
y = x 2, y = x 3 − 16x + 4, y = cos x . . .
Solving for roots of non-linear equations
Consider the equation
f (x) = 0.
roots of the f (x) are the values of x which satisfy the above expression.
Understand concepts of non-linear equations
f (x) = x 2 g (x) = x 3 − 16x + 4
h(x) = cos x
Understand concepts of non-linear equations
Thus, when we look at the graphs, it tell us that the roots of the function
can be spotted when the graph intersect the x-axis.
Bisection Method
If f (x) is real and continuous inthe interval x` and xu and f (x` ) and f (xu )
have opposite signs, that is
Steps:
Choose lower xL and xu guesses for the root such that the function
changes sign over the interval. This can be checked by ensuring that
f (xL )f (xu ) < 0.
An estimate of the root xr is determined by
xL + xu
xr = .
2
Bisection Method
Example
Approximate the root of f (x) = −2x 3 + 4x − 1 up to 25% error estimate,
using bisection method. Initial guesses xL = −2 and xu = 0.
Solution:
−2 + 0
xr = = −1
2
since f (−2) = 7 and f (0) = −1, their product is −7 < 0 implies
xu = xr = −1.
−2 − 1
xr = = −1.5
2
−1.5 − (−1)
a = × 100% = 33.33%.
−1.5
Repeat the process since error is more than 25%
f (xL ) = f (−2) = 7 and f (xu ) = f (−1) = −7, implies
f (−2)f (−1) = 49 > 0.
It follows that xL = xr = −1.5, then compute the new xr
−1.5 − 1
xr = = −1.25
2
−1.25 − (−1.5)
a =
× 100% = 20%.
−1.25
If the initial guess at the root is xi , a tangent line can be extended from
the point (xi , f (xi )). The point where this tangent crosses the x-axis
usually represents an improved estimate of the root.
0 f (xi ) − 0
f (xi ) =
xi − xi+1
f (xi )
xi+1 = xi − 0 .
f (xi )
Newton-Raphson Method
Example
Approximate the root of f (x) = −2x 3 + 4x − 1 up to 25% error estimate,
using bisection method. Initial guess xi = −2.
Solution:
f (−2) = 7
0
f (x) = −6x 2 + 4
0
f (xi ) = −6(−2)2 + 4 = −20
7
xi+1 = −2 −
−20
xi+1 = −1.65
Check for error:
−1.65 − (−2)
a =
× 100% = 21.21%.
−1.65
which is less than 25% error, thus the approximate root is -1.65.