Example
1. Find all the real solutions to the
cubic equation
.
Solution 1.
Plot the function.
![[Graphics:../Images/RegulaFalsiMod_gr_13.gif]](../Images/RegulaFalsiMod_gr_13.gif)
![[Graphics:../Images/RegulaFalsiMod_gr_14.gif]](../Images/RegulaFalsiMod_gr_14.gif)
There appears to be only one real root which lies in the interval [1,2].
![[Graphics:../Images/RegulaFalsiMod_gr_17.gif]](../Images/RegulaFalsiMod_gr_17.gif)
Call the Regula Falsi subroutine on the interval [1,2] using 10 iterations
![[Graphics:../Images/RegulaFalsiMod_gr_19.gif]](../Images/RegulaFalsiMod_gr_19.gif)
|
k |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
After 10 iterations, the interval has been reduced to [a,b] where
The root lies somewhere in the interval [a,b] width of which is
The reported root is alleged to be
The estimate of "how things are going" is the distance between c and the nearest endpoint to the interval.
Is this the desired accuracy you want ? If not, more iterations are required.
![[Graphics:../Images/RegulaFalsiMod_gr_90.gif]](../Images/RegulaFalsiMod_gr_90.gif)
|
k |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compare our result with Mathematica's built in root finder.
|
|
|
|
|
|
(c) John H. Mathews 2004