Module 4
Module 4
Regula-Falsi Method
Introduction
The Regula Falsi Method (False Position Method) is a numerical method used to
find the root of a function. It is a bracketing method that improves upon the bisection
method by using a secant line instead of the midpoint.
Formula
af (b) − bf (a)
xn = (0.1)
f (b) − f (a)
where:
• a and b are two initial guesses (bracket) such that f (a) and f (b) have opposite
signs ( f (a) · f (b) < 0 ).
1
Prof. Vasu V Eregowda BMATS201 (Module 4)
Working Procedure
• If yes, stop.
Example Calculation
f (1) = 13 − 1 − 2 = −2
f (2) = 23 − 2 − 2 = 4
Step 2: Compute xn
1(4) − 2(−2)
xn =
4 − (−2)
2
Prof. Vasu V Eregowda BMATS201 (Module 4)
4+4 8
= = = 1.33
6 6
Since f (1) and f (1.33) have the same sign, update a = 1.33 , keep b = 2 , and repeat
the process until convergence.
Problems
1. Find the real root of the equation cos x = 3x − 1 correct to three decimals by using
the Regula-Falsi method.
3. Use the Regula-Falsi method to obtain a root of the equation 2x−log10 x = 7 which
lies between 3.5 and 4 .
4. Find the smallest positive root of the equation x2 − loge x = 12 by the Regula-Falsi
method.
5. Find the root of the equation xex − cos x = 0 by the method of false position.
6. Find an approximate value of the root of the equation xex = 3 using the Regula-
Falsi method, and carry out three iterations.
7. Find the real root of the equation x log10 x − 1.2 = 0 which lies between 2 and 3
by the Regula-Falsi method. (June/July 2023)
3
Prof. Vasu V Eregowda BMATS201 (Module 4)
8. Find the root of the equation xex = 2 that lies between 0 and 1 using the Regula-
Falsi method. Carry out four iterations. Correct to three decimal places. (Nov/Dec
2023)
Engineering Applications
The Regula Falsi method is widely used in engineering for solving nonlinear equations.
Some of its key applications include:
Electrical Engineering
1. Used to analyze nonlinear circuits, such as diode and transistor circuits, by finding
the operating point.
Mechanical Engineering
Civil Engineering
4
Prof. Vasu V Eregowda BMATS201 (Module 4)
Chemical Engineering
Aerospace Engineering
Conclusion
The Regula Falsi method is efficient for root-finding problems and ensures convergence
if the function is continuous within the given interval. Its applications span multiple
engineering fields, making it a valuable numerical technique.
Newton-Raphson Method
Introduction
5
Prof. Vasu V Eregowda BMATS201 (Module 4)
Formula
f (xn )
xn+1 = xn − (0.2)
f ′ (xn )
where:
Working Procedure
3. Check if the difference |xn+1 − xn | is less than the desired tolerance ǫ . If yes, stop.
6
Prof. Vasu V Eregowda BMATS201 (Module 4)
Given that,
3x = cos x + 1
f (x) = 3x − cos x − 1 = 0
d
f ′ (x) = (3x − cos x − 1) = 3 + sin x
dx
Step 3: Newton-Raphson Formula The iterative formula for the Newton-Raphson method
is:
f (xn )
xn+1 = xn −
f ′ (xn )
Substituting f (x) and f ′ (x) :
3xn − cos xn − 1
xn+1 = xn −
3 + sin xn
Step 4: Initial Guess Choosing x0 = 0.3 as the initial approximation. Step 5: Iterations
Iteration 1
3(0.3) − cos(0.3) − 1
x1 = 0.3 −
3 + sin(0.3)
Computing values:
7
Prof. Vasu V Eregowda BMATS201 (Module 4)
0.0473
x2 = 0.6202 − = 0.6202 − 0.0132 = 0.6070
3.5819
Iteration 3
3(0.6070) − cos(0.6070) − 1
x3 = 0.6070 −
3 + sin(0.6070)
Computing values:
f (0.6070) = 1.8210 − 0.8200 − 1 = 0.0010
Problems
1. Find the real root of the equation 3x = cos x + 1 correct to three decimals by using
Newtons Raphson method. (Nov/Dec 2023)
2. Find the real root of the equation cos x = xex , which is nearer to x = 0.5 by the
Newton-Raphson method, correct to three decimal places.
3. Using the Newton-Raphson method, compute the real root of the equation near
x = π , correct to four decimal places. (June/July 2023)
4. Find the real root of the equation x log10 x − 1.2 = 0 correct to five decimal places
by Newton’s Raphson Method. (Dec 2023/Jan 2024)
5. Using the Newton-Raphson method, find the root that lies near x = 4.5 of the
equation tan x = x correct to four decimal places. (x is in radians)
8
Prof. Vasu V Eregowda BMATS201 (Module 4)
Engineering Applications
The Newton-Raphson method is widely used in engineering disciplines due to its rapid
convergence and efficiency.
Electrical Engineering
Mechanical Engineering
Civil Engineering
Chemical Engineering
9
Prof. Vasu V Eregowda BMATS201 (Module 4)
Aerospace Engineering
Conclusion
The Regula Falsi and Newton-Raphson methods are both essential numerical
techniques for solving nonlinear equations. While Regula Falsi is a bracketing method
ensuring convergence, Newton-Raphson offers faster convergence but requires derivative
computation. Their applications span multiple engineering fields, making them valuable
tools in computational engineering.
Finite Differences
x y ∆y ∆2 y ∆3 y
x0 y0
x1 y1 ∆y0 = y1 − y0
x2 y2 ∆y1 = y2 − y1 ∆2 y0 = ∆y1 − ∆y0
x3 y3 ∆y2 = y3 − y2 ∆2 y1 = ∆y2 − ∆y1 ∆ 3 y0 = ∆ 2 y1 − ∆ 2 y0
10
Prof. Vasu V Eregowda BMATS201 (Module 4)
Newtons forward interpolation is used when the value of x at which the function is to
be interpolated is closer to the beginning of the data points. Formula
r(r − 1) 2 r(r − 1)(r − 2) 3
f (x) = y0 + r∆y0 + ∆ y0 + ∆ y0 + . . .
2! 3!
where:
x−x0
• r= h
, where h is the difference between consecutive values of x .
x y ∇y ∇2 y ∇3 y
x0 y0
x1 y1 ∇y1 = y1 − y0
x2 y2 ∇y2 = y2 − y1 ∇2 y2 = ∇y2 − ∇y1
x3 y3 ∇y3 = y3 − y2 ∇2 y3 = ∇y3 − ∇y2 ∇ 3 y3 = ∇ 2 y3 − ∇ 2 y2
Newtons backward interpolation is used when the value of x at which the function is
to be interpolated is closer to the end of the data points. Formula
r(r + 1) 2 r(r + 1)(r + 2) 3
f (x) = yn + r∇yn + ∇ yn + ∇ yn + . . .
2! 3!
where:
11
Prof. Vasu V Eregowda BMATS201 (Module 4)
x−xn
• r= h
, where h is the difference between consecutive values of x .
Key Differences
Problems
D 80 85 90 95 100
A 5026 5674 6362 7088 7854
D A ∆A ∆2 A ∆3 A ∆4 A
80 5026 648 40 −2 4
85 5674 688 38 −2
90 6362 726 40
95 7088 766
100 7854
12
Prof. Vasu V Eregowda BMATS201 (Module 4)
where:
• h=5
x−xn 105−100
• x = 105 , so r = h
= 5
=1
• An = 7854
• ∆An = 766
• ∆2 An = 40
• ∆3 An = 2
• ∆4 An = 4
= 7854 + 766 + 40 + 2 + 4
= 8666
= 8666
13
Prof. Vasu V Eregowda BMATS201 (Module 4)
D 80 85 90 95 100
A 5026 5674 6362 7088 7854
Calculate the area of a circle of diameter 82 by using Newton’s forward interpolation
formula.
4.
x 45◦ 50◦ 55◦ 60◦
sin x 0.7071 0.7660 0.8192 0.8660
find sin 57◦ using appropriate interpolation formula
7. From the following table, estimate the number of students who have obtained i) less
than 45 marks ii) marks between 40 and 45:
14
Prof. Vasu V Eregowda BMATS201 (Module 4)
8. Estimate the probable number of people in the age group 20 to 25 years from the
following data
Introduction
For given data points (x0 , y0 ), (x1 , y1 ), . . . , (xn , yn ) , we construct a **divided difference
table** as follows:
x f (x) f [x0 , x1 ] f [x0 , x1 , x2 ] ...
x0 y0
x1 y1 f [x0 , x1 ]
x2 y2 f [x1 , x2 ] f [x0 , x1 , x2 ]
x3 y3 f [x2 , x3 ] f [x1 , x2 , x3 ] f [x0 , x1 , x2 , x3 ]
.. .. .. .. ..
. . . . .
where the **divided differences** are recursively defined as:
f (x1 ) − f (x0 )
f [x0 , x1 ] =
x1 − x0
f (x2 , x3 ) − f (x1 , x2 )
f (x1 , x2 , x3 ) =
x3 − x1
and so on.
15
Prof. Vasu V Eregowda BMATS201 (Module 4)
Problems
1. Using Newton’s divided difference formula, evaluate f(8) from the following table
x 4 5 7 10 11 13
f (x) 48 100 294 900 1210 2028
2. Using Newton’s divided difference formula, find the values of y at x=8 and x=22
from the following table
x 0 5 10 15 20 25
f (x) 7 11 14 18 24 32
x 0 5 10 15 20 25
f (x) 7 11 14 18 24 32
4. Using Newtons Divided Difference Formula, evaluate f (4) from the following data:
x 0 2 3 6
f (x) −4 2 14 158
16
Prof. Vasu V Eregowda BMATS201 (Module 4)
5. Using Newtons Divided Difference Formula, find f (9) from the following data:
Marks 5 7 11 13 17
Number of Students 150 329 1452 2366 5202
Fit an interpolating polynomial using Newton’s general interpolation formula for
the data
u10 = 355 , u0 = −5 , u8 = −21 , u4 = −125 , and hence find u2 .
6. Find the cubic polynomial which passes throgh the points: (2,4) (4,5) (9,711)
(10,980) and hence estimate the dependent variable corresponding to the values
of the independent variable 3,5,7,11.
Newtons Forward, Backward, and Divided Difference interpolation methods are widely
used in various engineering disciplines, including numerical analysis, signal processing,
thermodynamics, and structural analysis.
Newtons forward difference formula is used when data points are equally spaced and
interpolation is required near the beginning of the table.
Applications:
17
Prof. Vasu V Eregowda BMATS201 (Module 4)
• Digital Signal Processing (DSP): Interpolating discrete signals for audio and
image processing.
Newtons backward difference formula is applied when data points are equally spaced
and interpolation is required near the end of the table.
Applications:
Newtons divided difference formula is useful when data points are not equally spaced.
Applications:
• Machine Learning and Data Science: Used in polynomial regression and curve
fitting with scattered data.
18
Prof. Vasu V Eregowda BMATS201 (Module 4)
Conclusion
Newtons interpolation methods provide powerful tools for estimating unknown values
from discrete datasets, making them essential in numerical computation and engineering
applications.
• Newtons Forward and Backward formulas are best suited for equally spaced
data and help in quick interpolations in structured datasets.
• These methods significantly reduce computational efforts and improve the accuracy
of approximations in engineering analysis and simulations.
Y x − xj
Li (x) = ,
j6=i
xi − xj
i = 0, 1, 2, . . . , n and j = 0, 1, 2, . . . , n
19
Prof. Vasu V Eregowda BMATS201 (Module 4)
Problems
x 1 3 4 6
y −3 9 30 132
Solution
20
Prof. Vasu V Eregowda BMATS201 (Module 4)
Y x − xj
Li (x) =
j6=i
xi − xj
Calculate y(5)
2 2 4 8
P3 (5) = (−3) × − +9× + 30 × − + 132 ×
5 3 3 15
21
Prof. Vasu V Eregowda BMATS201 (Module 4)
6
P3 (5) = + 6 − 40 + 70 = 70
5
x 1 3 4 6
y −3 9 30 132
Solution
Y x − xj
Li (x) =
j6=i
xi − xj
(x − 3)(x − 4)(x − 6)
L0 (x) =
(1 − 3)(1 − 4)(1 − 6)
(x − 3)(x − 4)(x − 6)
=
−30
(x − 1)(x − 4)(x − 6)
L1 (x) =
(3 − 1)(3 − 4)(3 − 6)
22
Prof. Vasu V Eregowda BMATS201 (Module 4)
(x − 1)(x − 4)(x − 6)
=
6
(x − 1)(x − 3)(x − 6)
L2 (x) =
(4 − 1)(4 − 3)(4 − 6)
(x − 1)(x − 3)(x − 6)
=
−6
(x − 1)(x − 3)(x − 4)
L3 (x) =
(6 − 1)(6 − 3)(6 − 4)
(x − 1)(x − 3)(x − 4)
=
30
Finding y(5)
Substituting x = 5 :
23
Prof. Vasu V Eregowda BMATS201 (Module 4)
2 2 4 8
= (−3) × − +9× + 30 × − + 132 ×
5 3 3 15
6
= + 6 − 40 + 70 = 70
5
3. Use Lagrange’s interpolation formula to find f(4), given that
x 0 2 3 6
f (x) −4 2 14 158
x 5 6 9 11
f (x) 12 13 14 16
5. Use Lagrange’s interpolation formula to fit a polynomial for the data to find y at
x=2
x 0 1 3 4
f (x) −12 0 6 12
Trapezoidal Rule
" n−1
#
Z b
h X
f (x) dx ≈ f (x0 ) + 2 f (xi ) + f (xn )
a 2 i=1
24
Prof. Vasu V Eregowda BMATS201 (Module 4)
1. Z b
h
f (x) dx ≈ [f (x0 ) + 2f (x1 ) + 2f (x2 ) + 2f (x3 ) + f (x4 )]
a 2
2.
Z b
h
f (x) dx ≈ [f (x0 ) + 2f (x1 ) + 2f (x2 ) + 2f (x3 ) + 2f (x4 ) + 2f (x5 ) + f (x6 )]
a 2
where:
b−a
1. h = n
is the step size.
Simpsons 1/3 rule provides a more accurate approximation by using parabolic segments.
1. Z b
h
f (x) dx ≈ [f (x0 ) + 4f (x1 ) + 2f (x2 ) + 4f (x3 ) + f (x4 )]
a 3
2.
Z b
h
f (x) dx ≈ [f (x0 ) + 4f (x1 ) + 2f (x2 ) + 4f (x3 ) + 2f (x4 ) + 4f (x5 ) + f (x6 )]
a 3
25
Prof. Vasu V Eregowda BMATS201 (Module 4)
where:
1. n must be even.
b−a
2. h = n
.
Simpson’s 3/8 Rule is another numerical method that improves accuracy by fitting
cubic polynomials.
" n−3
#
b
3h
Z X X
f (x) dx ≈ f (x0 ) + 3 f (xi ) + 2 f (xi ) + f (xn )
a 8 i=1, multiples of 36=n i=3,6,9,...
where:
1. n must be a multiple of 3
b−a
2. h = n
26
Prof. Vasu V Eregowda BMATS201 (Module 4)
Problems
R1 1
1. Evaluate 0 1+x2
dx using the Trapezoidal Rule by taking 6 divisions (7 ordinates).
R3 1
2. Evaluate 0 4x+5
dx using the Trapezoidal Rule by taking 7 ordinates.
Rπ√
3. Evaluate 0
2
cos x dx using Simpsons 1/3rd Rule by taking 4 equal parts.
R1 1
4. Evaluate 0 1+x2
dx using Simpsons 1/3rd Rule by taking 4 equal parts, hence
deduce an approximate value of π .
R 0.6 2
5. Use Simpsons 1/3rd Rule to find 0
e−x dx by taking 7 ordinates.
R1 1
6. Evaluate 0 1+x2
dx using the Trapezoidal Rule by taking 6 divisions (7 ordinates).
R 5.2
7. Evaluate 4
log x dx taking 6 equal parts using Simpsons 3/8th Rule.
R3 1
8. Evaluate 0 1+x
dx using Simpsons 3/8th Rule by taking 7 ordinates.
R 1.4
9. Compute the value of 0.2
(sin x − log x + ex ) dx using Simpsons 3/8th Rule taking
six parts.
R1 1
10. Evaluate 0 1+x
dx using Simpsons 3/8th Rule by taking 7 ordinates, hence deduce
the value of loge 2 .
R3 1
11. Evaluate 0 (1+x)2
dx using Simpsons 3/8th Rule by taking n=3.
27
Prof. Vasu V Eregowda BMATS201 (Module 4)
• Signal and Image Processing: Used to compute the energy of signals, perform
filtering, and process image convolution operations.
Conclusion
These numerical integration methods are useful when an exact integral is difficult or
impossible to evaluate analytically. The accuracy increases from Trapezoidal Rule to
Simpsons 1/3 Rule to Simpsons 3/8 Rule.
28