Professional Documents
Culture Documents
Week 2 PDF
Week 2 PDF
Week 2 PDF
No analytical solution!
Graphical solution
! " = $ %& − " = 0
#$ +
!= (1 − ) * -
, )
%
$% )
*
,
! " = 1−( + −-
"
668.06
! " = 1 − , -2.15/056. − 40
"
c f(c)
4 34.190
8 17.712
12 6.114
16 -2.230
20 -8.368
Bisection Method
When applying the graphical technique, we saw that f(x) changes
sign on opposite sides of the root.
668.06
! " = 1 − * +,.-./0.12 − 40
"
Example
First step is to guess an initial xl and xu.
We can use the graphical method.
! 12 ! 14 = 9.850 > 0
!" = 14
!& = 16
14 + 16
!( = = 15
2
Iteration 2
We again check the conditions and
compute the function value at the lower
bound and the midpoint.
! 14 ! 15 = −0.619 < 0
!" = 14
!& = 15
14 + 15
!( = = 14.5
2
Iteration 3
Doing this for 3 iterations, we can stop
here and consider 14.5 as an
approximation of the real root.
!" = 14.5
&'()$ *+,
$% %
!" = &'(
$%
100%
Diverging
Converging
Newton-Raphson Method
If the initial guess at the root is xi, a tangent 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.
Newton-Raphson Method
Newton-Raphson Formula
Estimating the slope
"(#$ ) − 0
"! #$ =
#$ − #$*+
% ! = & '( − !
Let’s apply NR formula
! " = $ %& − "
!( ") = −$ %& − 1
/(+, )
+,-. = +, −
/( +,
$ %&3 − ")
")-2 = ") − %&
−$ 3 − 1
Iterative process
Starting with an initial guess of !" = 0
)(+" )
)(+"#$) ≅ )(+" ) + )′(+" )(+"#$−+" ) +"#$ = +" −
)1 +"
Another example
Use the Newton-Raphson method to estimate the root of the
following function, employing an initial guess of !" = 0.5.
' ! = !(" − 1
Let’s apply NR formula
! " = "$% − 1
!( ") = 10" +
0(,- )
,-./ = ,- −
0( ,-
") $% − 1
").$ = ") −
10") +
Iterative process
iteration !" #$ (%)
0 0.5 -
1 51.65 99.03
2 46.485 -11.11
3 41.8365 -11.11
4 37.652 -11.11
5 33.887565 -11.11
… … …
infinity 1.0000
Was the convergence normal?
From iteration 1 to 2, the error reduced from 99% to 11%.
However, since iteration 2, the convergence has been super slow.
But why?
( ! = ) "* − !
First iteration
"#$ = 0 ! "#$ = 1.0000
12 = 8.0%
Second iteration
"- = 1 ! "#$ = −0.63212
45 = 0.58%
Comparison of
convergence rates