Chapter 2 Roots of Equation
Chapter 2 Roots of Equation
𝑓𝑓𝑥𝑥=𝑎𝑎𝑥𝑥2+𝑏𝑏𝑥𝑥+𝑐𝑐
What values of x will make 𝑓𝑓(𝑥𝑥)=0? Disadvantages:
- Time-consuming
- You will only be as good as your guesses.
Start with 2 numbers as the bracket or extent of our guesses. 𝒙𝒙𝒍𝒍 and 𝒙𝒙𝒖𝒖
𝑓𝑓(𝑥𝑥) changes sign on opposite sides of the root; meaning 𝒇𝒇(𝒙𝒙𝒍𝒍)𝒇𝒇(𝒙𝒙𝒖𝒖)<𝟎𝟎
Within the two initial guesses or the interval, the point where the function changes sign is identified by
estimating it to be the midpoint of the two numbers.
If a function changes sign over an interval, the function value at the midpoint is evaluated.
The location of the root is then determined as lying at the midpoint of the subinterval within which the sign
change occurs.
The process is repeated to obtain refined estimates. ALTERNATE NAME:
Binary chopping,
Interval halving,
or Bolzano’s method
STEP 1: Choose lower 𝑥𝑥𝑙𝑙 and upper 𝑥𝑥𝑢𝑢 guesses for the root
such that the function changes sign over the interval.
𝑪𝑪𝑯𝑯𝑬𝑬𝑪𝑪𝑲𝑲: 𝒇𝒇𝒙𝒙𝒍𝒍𝒇𝒇𝒙𝒙𝒖𝒖<𝟎𝟎
𝑋𝑋𝑙𝑙 + 𝑋𝑋𝑢𝑢
STEP 2: An estimate of the root 𝑥𝑥𝑟𝑟 is determined by 𝑋𝑋𝑟𝑟 =
2
ALTERNATE NAME:
Regula Falsi Method
or Linear Interpolation
STEP 1: Choose lower 𝑥𝑥𝑙𝑙 and upper 𝑥𝑥𝑢𝑢 guesses for the root
such that the function changes sign over the interval.
𝑪𝑪𝑯𝑯𝑬𝑬𝑪𝑪𝑲𝑲: 𝒇𝒇𝒙𝒙𝒍𝒍𝒇𝒇𝒙𝒙𝒖𝒖<𝟎𝟎
SIMPLE FIXED
POINT SECANT
ITERATION METHOD
METHOD NEWTON – RAPHSON
METHOD
SIMPLE FIXED POINT ITERATION METHOD
Can be done by re-arranging the function 𝑓𝑓𝑥𝑥 = 0 such that x is on the left-hand side of the equation
become 𝑥𝑥 = 𝑔𝑔(𝑥𝑥)
SAMPLE: Find the root of the equation x2 – x – 1 = 0
If the initial guess at the root is xi, a tangent can be extended from the point [𝑥𝑥𝑖𝑖,𝑓𝑓(𝑥𝑥𝑖𝑖)].
The point where this tangent crosses the x axis usually represents an improved estimate of the root.
𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟
𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 =
𝑟𝑟𝑟𝑟𝑟𝑟
𝑓𝑓 𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 − 0
𝑓𝑓𝑓(𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 ) =
𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 − 𝑥𝑥𝑛𝑛𝑛𝑛𝑛𝑛
f(xold)
𝑓𝑓𝑓(𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 )(𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 − 𝑥𝑥𝑛𝑛𝑛𝑛𝑛𝑛 ) = 𝑓𝑓 𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜
𝑓𝑓 𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜
𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 − 𝑥𝑥𝑛𝑛𝑛𝑛𝑛𝑛 =
𝑓𝑓𝑓(𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 )
SAMPLE: Find the root of the equation x2 – x – 1 = 0 using newton – Raphson method
f(xa)
f(xb)
f(xold)
Secant Method
i xa xb f(xa) f(xb) Relative error
1 3.5 2.5 1.775 -0.475
xnew xb xa 2 2.5 2.71111 -0.475 -0.4515 7.79%
3 2.71111 6.77026 -0.4515 103.679 59.96%
4 6.77026 2.72871 38.0661 3.71716 148.11%
Secant Method 5 2.72871 2.29135 3.71716 1.95892 19.09%
𝑓𝑓 𝑥𝑥𝑎𝑎 (𝑥𝑥𝑎𝑎 − 𝑥𝑥𝑏𝑏 ) 6 2.29135 1.80406 1.95892 0.45057 27.01%
𝑥𝑥𝑛𝑛𝑛𝑛𝑛𝑛 = 𝑥𝑥𝑎𝑎 −
𝑓𝑓 𝑥𝑥𝑎𝑎 − 𝑓𝑓 𝑥𝑥𝑏𝑏