1.-numerical-methods-ee4a
1.-numerical-methods-ee4a
𝒙 − 𝒙′
• Relative Error = | 𝒙 |
𝒙 − 𝒙′
• Percentage Error = 100 * | |
𝒙
ROOTS OF EQUATION
Bracketing Method
a. Graphical Method
b. Bisection Method
c. False-Position Method
Open Method
a. Simple Fixed-Point Iteration
b. Newton-Raphson Method
c. Secant Method
a. Gauss Elimination
b. Gauss-Jordan Method
c. Gauss-Seidel Method
d. Jacobi Method
CURVE FITTING
Least-Square Regression
a. Linear Regression
b. Polynomial Regression
Interpolation
a. Newton Divided Difference Interpolating Polynomials
b. Lagrange Interpolating Polynomials
NUMERICAL DIFFERENTIATION AND INTEGRATION
a. Trapezoidal Rule
b. Rectangular Rule
BRACKET METHOD
• Bracketing methods determine successively smaller
intervals (brackets) that contain a root.
• When the interval is small enough, then a root has been
found.
• They generally use the intermediate value theorem, which
asserts that if a continuous function has values of
opposite signs at the end points of an interval, then the
function has at least one root in the interval.
Graphical Method
A simple method for obtaining an estimate of the roots of the equation
f(x) = 0 , is to make a plot of the function and observe where it intersects
the x- axis.
Ex. 𝑓 𝑥 = −0.5𝑥 2 + 2.5𝑥 + 4.5
10
x f(x)
5
5 4.5
0
6 1.5 0 5 10 15
-5
7 - 2.5
8 -7.5 -10
9 -13.5 -15
10 -20.5 -20
-25
Bisection Method
Method in which the interval is always divided in half step .
𝑋𝑟 = 𝑋𝑙 + 𝑋𝑢 /2
= (6 + 7) / 2
=6.5
c. evaluate
f(Xl)f(Xr) =f(6)*f(6.5)
(1.5)*(-0.375)= -0.5625
Therefore f(Xl)*f(Xr)<0,𝑠𝑒𝑡 𝑋𝑢 = 𝑋𝑟 𝑎𝑛𝑑 𝑟𝑒𝑡𝑢𝑟𝑛 𝑡𝑜 𝑠𝑡𝑒𝑝 𝑏
2nd iteration
a. Xl=6 Xu= 6.5
b. 𝑋𝑟 = 𝑋𝑙 + 𝑋𝑢 /2
= (6 + 6.5) / 2
=6.25
c. evaluate
f(Xl)f(Xr) =f(6)f(6.25)
(1.5)(0.59375)= 0.890625
Therefore f(Xl)f(Xr)>0,𝑠𝑒𝑡 𝑋𝑙 = 𝑋𝑟 𝑎𝑛𝑑 𝑟𝑒𝑡𝑢𝑟𝑛 𝑡𝑜 𝑠𝑡𝑒𝑝 𝑏
3rd iteration
a. Xl=6.25 Xu= 6.5
b. 𝑋𝑟 = 𝑋𝑙 + 𝑋𝑢 /2
= (6.25 + 6.5) / 2
=6.375
c. evaluate
f(Xl)f(Xr) =f(6.25)f(6.375)
(1.5)(0.11718)= 0.069580
Therefore f(Xl)f(Xr)=0, root is equal to Xr, terminate the
computation
False-Position Method
Alternative method that exploits the graphical insight is to join f(Xl) and
f(Xu) by a straight line. The intersection of the line with X axis represents
an improved estimate of the root.
𝑓(𝑋𝑙) 𝑓(𝑋𝑢)
𝑋𝑙−𝑋𝑟
= 𝑋𝑟−𝑋𝑢
𝐹(𝑋𝑢)(𝑋𝑙−𝑋𝑢)
𝑋𝑟 = 𝑋𝑢 - 𝐹 𝑋𝑙 −𝐹(𝑋𝑢)
Disadvantages of False Position Method.
• One of the interval definitions can get stuck.
• It may slowdown in unfavorable situations.
(−2.5)(6−7)
Xr = 7- = 6.375; f(x) = 0.11718
1.5−(−2.5)
f(Xl)*f(Xr)
1.5*(0.11718) = 0.17577
(−2.5)(6.375−7)
Xr=7- = 6.4029; f(x) = 0.00932608
0.11718−(−2.5)
f(Xl)*f(Xr)
0.11718*(0.00932608) = 0.0010928