0% found this document useful (0 votes)
21 views29 pages

Lesson 1 - Bisection - Regula - Falsi

The document outlines a course on numerical solutions to civil engineering problems, detailing grading criteria and a comprehensive course outline covering topics such as non-linear equations, numerical interpolation, differentiation, integration, and differential equations. It includes specific methods for finding roots, including the Bisection Method and the False Position Method, along with examples to illustrate their application. The document serves as a guide for students to understand and apply various numerical methods in engineering contexts.

Uploaded by

Emman Dizon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views29 pages

Lesson 1 - Bisection - Regula - Falsi

The document outlines a course on numerical solutions to civil engineering problems, detailing grading criteria and a comprehensive course outline covering topics such as non-linear equations, numerical interpolation, differentiation, integration, and differential equations. It includes specific methods for finding roots, including the Bisection Method and the False Position Method, along with examples to illustrate their application. The document serves as a guide for students to understand and apply various numerical methods in engineering contexts.

Uploaded by

Emman Dizon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

NUMERICAL SOLUTIONS

TO CE PROBLEMS
Prepared by: Engr. Carlos Brylle M. Artates
GRADING SYSTEM
QUIZ = 25%
LABORATORY = 10%
SEATWORKS = 10%
PARTICIPATION = 5%
EXAM = 50%
COURSE OUTLINE
1. Roots of Non-Linear Equation
1.1 Definition of roots
1.2 Methods of Solution
1.3 Bisection Method
1.4 False Position Method
1.5 Newton Rhapson Method
1.6 Secant Method
COURSE OUTLINE
2. Solutions of Non-linear System
2.1 Linear System and its solution
2.2 Uniqueness of Solutions
2.3 Methods of Solutions
2.4 Gauss Elimination
2.5 Gauss – Jordan Method
2.6 Row Pivoting
2.7 Jacobi Method
2.8 Gauss – Seidel Method
COURSE OUTLINE
3. Numerical Interpolation
3.1 Polynomial Interpolation
3.1.1 Lagrange Interpolating
Polynomial
3.1.2 Newton’s Divided
Difference Method
3.2 Spline Interpolation
3.2.1 Quadratic Splines
3.2.2 Cubic Splines
3.2.3 Alternative Method for
Cubic Spline Interpolation
COURSE OUTLINE
4. Numerical Differentiation and
Integration
4.1 Finite Difference Method
4.2 More Accurate Formulas for
the Central Finite Difference
Method
4.3 Trapezoidal Rule
4.4 Simpson’s 1/3 Rule
4.5 Simpson’s 3/8 Rule
COURSE OUTLINE
5. Numerical Solution to Ordinary
Differential Equations
5.1 Euler’s Method
5.2 Heun’s Method
5.3 Midpoint Method
5.4 2nd Order Runge – Kutta Method
5.5 3rd Order Runge – Kutta Method
5.6 4th Order Runge – Kutta Method
ROOTS OF NON-LINEAR
EQUATION
ROOTS OF NON-LINEAR EQUATION
Definition of Roots
The roots of an equation are the values of the variable that satisfy the equation,
making it true. In other words, they are the solutions to the equation where the left-
hand side equals the right-hand side. Consider a function f(x), a is the root of the
function if f(a) = 0

Example: Prove that x ={- 3, 5} are the roots of f(x) =𝑥 2 − 2𝑥 − 15

Solution:
Substitute x = - 3 and x = 5 in the function:
𝑓(− 3) = 3 2 − 2(− 3) − 15 = 0
𝑓(5) = 5 2 − 2(5) − 15 = 0

x = {-3, 5} are the roots of the function.


ROOTS OF NON-LINEAR EQUATION

Methods of Solution
CLOSED
ROOTS OF NON-LINEAR EQUATION

Methods of Solution
OPEN
ROOTS OF NON-LINEAR EQUATION

CLOSED METHOD
In the closed method, finding the root's value starts by assuming that it is
in the interval with lower limit 𝑥𝑙 and upper limit 𝑥𝑢 (or 𝑥𝑙 , 𝑥𝑢 ). Series of
iterations are performed so that the interval become as close to the actual roots
as possible. The main advantage of this method compared to the other one is the
result always converges; thus, these methods will still solve for the root/s. Some
of the closed methods are:

1. Bisection Method
2. Method of False Position (Regula Falsi)
Bisection Method

𝑓(𝑥𝑈 )
𝑥𝐿 + 𝑥𝑈
𝑥𝑚 = 𝑓(𝑥)
2
𝑓(𝑥𝑚 )

𝑥𝐿 𝑥
𝑥𝑚 𝑥𝑈

𝑓(𝑥𝐿 )
Bisection Method

𝑓(𝑥𝑈 )
To choose the span that
𝑓(𝑥) contains the root, determination of
𝑓(𝑥𝑚 )
the values (or sign) of 𝑓(𝑥𝑙 ) ,
𝑓(𝑥𝑚 )and 𝑓(𝑥𝑢 )is necessary. If the
numerical sign of 𝑓(𝑥𝑙 )and 𝑓(𝑥𝑚 )are
opposite, then the root is between
[𝑥𝑙 , 𝑥𝑚 ]. However, if the numerical
𝑥𝐿 𝑥
sign of 𝑓(𝑥𝑚 ) and 𝑓(𝑥𝑢 ) are
𝑥𝑚 𝑥𝑈
opposite, then the root is between
[𝑥𝑚 , 𝑥𝑢 ].

𝑓(𝑥𝐿 )
Bisection Method
The following is the step-by-step procedure to perform the Bisection Method:
1. Determine the middle point between [𝑥𝑙 , 𝑥𝑢 ].
𝑥𝑙 +𝑥𝑢
𝑥𝑚 =
2
2. Solve for the values of 𝑓 𝑥𝑙 , 𝑓(𝑥𝑚 ), and 𝑓(𝑥𝑢 ).
3. To choose the new interval for the next iteration:
a . If 𝑓 𝑥𝑙 and 𝑓 𝑥𝑚 are opposite in signs (or 𝑓 𝑥𝑙 * 𝑓 𝑥𝑚 < 0 ), the
new interval will be [𝑥𝑙 , 𝑥𝑚 ]. It means that 𝑥𝑙 retains the lower limit but 𝑥𝑚 will
be the new upper limit of the interval.
b. If 𝑓 𝑥𝑚 and 𝑓(𝑥𝑢 )are opposite in signs (or 𝑓 𝑥𝑚 * 𝑓 𝑥𝑢 < 0 ), the
new interval will be [𝑥𝑚 , 𝑥𝑢 ].It means that 𝑥𝑚 will be the new lower limit, but
𝑥𝑢 retains as the upper limit of the interval.
4. Repeat the first three steps for every new interval until it becomes relatively
small and the approximate value of root can be accepted. The tabular
presentation of the results of iteration is helpful. Notice that the size of the
interval halves after every iteration. The root of the function will be the average
of the last produced interval.
EXAMPLE
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0, 2]. Use
bisection method and perform seven iterations.
1ST ITERATION:
STEP 1: Determine the middle point STEP 3: To choose the new interval
between [𝑥𝑙 , 𝑥𝑢 ]. for the next iteration:
𝑥𝐿 + 𝑥𝑈 0+2
𝑥𝑚 = = =1 New Interval: [𝑥𝑚 , 𝑥𝑢 ] ; [1, 2]
2 2
STEP 2: Solve for the values of 𝑓 𝑥𝑙 ,
𝑓(𝑥𝑚 ), and 𝑓(𝑥𝑢 ).
𝑓 𝑥 = 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 − 17
𝑓 𝑥𝐿 = −17 - NEGATIVE
𝑓 𝑥𝑚 = −17 - NEGATIVE
𝑓 𝑥𝑢 = 37 - POSITIVE
EXAMPLE
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0, 2]. Use
bisection method and perform seven iterations.
2nd ITERATION: Interval: [1, 2]
STEP 1: Determine the middle point STEP 3: To choose the new interval
between [𝑥𝑙 , 𝑥𝑢 ]. for the next iteration:
𝑥𝐿 + 𝑥𝑈 1+2
𝑥𝑚 = = = 1.5 New Interval: [𝑥𝑚 , 𝑥𝑢 ] ; [1.5, 2]
2 2
STEP 2: Solve for the values of 𝑓 𝑥𝑙 ,
𝑓(𝑥𝑚 ), and 𝑓(𝑥𝑢 ).
𝑓 𝑥 = 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 − 17
𝑓 𝑥𝐿 = −17 - NEGATIVE
𝑓 𝑥𝑚 = −4.4375 - NEGATIVE
𝑓 𝑥𝑢 = 37 - POSITIVE
EXAMPLE
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0, 2]. Use
bisection method and perform seven iterations.

𝒙𝒍 𝒙𝒎 𝒙𝒖 𝑓 𝑥𝑙 𝑓 𝑥𝒎 𝑓 𝑥𝒖 New Interval
1 0 1 2 -17 -17 37 [1,2]
2 1 1.5 2 -17 -4.4375 37 [1.5,2]
3 1.5 1.75 2 -4.4375 11.46483 37 [1.5,1.75]
4 1.5 1.625 1.75 -4.4375 2.47144 11.46483 [1.5,1.625]
5 1.5 1.5625 1.625 -4.4375 -1.22432 2.47144 [1.5625,1.625]

6 1.5625 1.59375 1.625 -1.22432 0.56087 2.47144 [1.5625,1.59375]


7 1.5625 1.578125 1.59375 -1.22432 -0.347098 0.56087 [1.578125,1.59375]
EXAMPLE
𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑟𝑜𝑜𝑡 = 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑙𝑎𝑠𝑡 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙 ; [1.578125,1.59375]

1.578125+1.59375
𝑎𝑝𝑝𝑟𝑥. 𝑟𝑜𝑜𝑡 =
2

𝑎𝑝𝑝𝑟𝑥. 𝑟𝑜𝑜𝑡 = 1.5859375

Conclusion:
The obtained value of the root is accurate to the nearest
hundredths after seven iterations (the exact value of x for five decimal
places is 1.58416).
FALSE POSITION METHOD(REGULA FALSI)
𝑓(𝑥𝑢 )
(𝑥𝑢 , 𝑓(𝑥𝑢 ))

𝑓(𝑥𝑚 )

𝑥𝐿 𝑥
𝑥𝑚 𝑥𝑈

𝑓(𝑥𝑙 )
(𝑥𝐿 , 𝑓(𝑥𝐿 ))
FALSE POSITION METHOD(REGULA FALSI)
(𝑥𝑢 , 𝑓(𝑥𝑢 ))
𝑭𝑹𝑶𝑴 𝑻𝑾𝑶 𝑷𝑶𝑰𝑵𝑻 𝑭𝑶𝑹𝑴
y2 − y1
𝑦 − 𝑦1 = x − x1
x2 − x1
𝑓 𝑥𝑢 − 𝑓 𝑥𝑙
𝑓(𝑥𝑚 ) 𝑦 − 𝑓 𝑥𝑢 = (𝑥 − 𝑥𝑢 )
𝑥𝑢 − 𝑥𝑙
Substituting y = 0 and x = 𝑥𝑚 (coordinates of 𝑥𝑚 )
𝑓 𝑥𝑢 − 𝑓 𝑥𝑙
−𝑓 𝑥𝑢 = (𝑥𝑚 − 𝑥𝑢 )
𝑥𝐿 𝑥 𝑥𝑢 − 𝑥𝑙
𝑥𝑚 𝑥𝑈 −𝑓 𝑥𝑢 [𝑥𝑢 − 𝑥𝑙 ] = 𝑓 𝑥𝑢 − 𝑓 𝑥𝑙 (𝑥𝑚 − 𝑥𝑢 )
−𝑥𝑢 𝑓 𝑥𝑢 +𝑥𝐿 𝑓 𝑥𝑢 = 𝑥𝑚 𝑓 𝑥𝑢 − 𝑓 𝑥𝑙 −𝑥𝑢 𝑓 𝑥𝑢 − 𝑓 𝑥𝑙
−𝑥𝑢 𝑓 𝑥𝑢 +𝑥𝐿 𝑓 𝑥𝑢 = 𝑥𝑚 𝑓 𝑥𝑢 − 𝑓 𝑥𝑙 −𝑥𝑢 𝑓 𝑥𝑢 + 𝑥𝑢 𝑓 𝑥𝑙

(𝑥𝐿 , 𝑓(𝑥𝐿 ))
FALSE POSITION METHOD (REGULA FALSI)

−𝑥𝑢 𝑓 𝑥𝑢 +𝑥𝐿 𝑓 𝑥𝑢 = 𝑥𝑚 𝑓 𝑥𝑢 − 𝑓 𝑥𝑙 −𝑥𝑢 𝑓 𝑥𝑢 + 𝑥𝑢 𝑓 𝑥𝑙

𝑥𝐿 𝑓 𝑥𝑢 −𝑥𝑢 𝑓 𝑥𝑙 = 𝑥𝑚 𝑓 𝑥𝑢 − 𝑓 𝑥𝑙
𝑓 𝑥𝑢 − 𝑓 𝑥𝑙 𝑓 𝑥𝑢 − 𝑓 𝑥𝑙

𝑥𝑙 𝑓 𝑥𝑢 − 𝑥𝑢 𝑓 𝑥𝑙
∴ 𝑥𝑚 =
𝑓 𝑥𝑢 − 𝑓 𝑥𝑙
FALSE POSITION METHOD (REGULA FALSI)
(𝑥𝑢 , 𝑓(𝑥𝑢 ))

𝑥𝑙 𝑓 𝑥𝑢 − 𝑥𝑢 𝑓 𝑥𝑙
∴ 𝑥𝑚 =
𝑓 𝑥𝑢 − 𝑓 𝑥𝑙
𝑓(𝑥𝑚 )

Note: This method is usually faster


to converge than the Bisection
𝑥𝐿 𝑥
method; however, this method is
𝑥𝑚 𝑥𝑈 not ideal if the initial interval is
large (for example, if the difference
between x₁ and x is greater than
3).
(𝑥𝐿 , 𝑓(𝑥𝐿 ))
FALSE POSITION METHOD (REGULA FALSI)
The following is the step-by-step procedure to perform the False Position Method:
1. Solve for the values of 𝑓 𝑥𝑙 and 𝑓(𝑥𝑢 ).
2. Determine 𝑥𝑚 ; that is,
𝑥𝑙 𝑓 𝑥𝑢 − 𝑥𝑢 𝑓 𝑥𝑙
𝑥𝑚 =
𝑓 𝑥𝑢 − 𝑓 𝑥𝑙

3. Solve for the value of 𝑓(𝑥𝑚 ).


4. To choose the new interval for the next iteration:
a . If 𝑓 𝑥𝑙 and 𝑓 𝑥𝑚 are opposite in signs (or 𝑓 𝑥𝑙 * 𝑓 𝑥𝑚 < 0 ), the new interval
will be [𝑥𝑙 , 𝑥𝑚 ]. It means that 𝑥𝑙 retains the lower limit but 𝑥𝑚 will be the new upper limit of
the interval.
b. If 𝑓 𝑥𝑚 and 𝑓(𝑥𝑢 )are opposite in signs (or 𝑓 𝑥𝑚 * 𝑓 𝑥𝑢 < 0 ), the new interval
will be[𝑥𝑚 , 𝑥𝑢 ].It means that 𝑥𝑚 will be the new lower limit, but 𝑥𝑢 retains as the upper limit
of the interval.
5. Repeat the first four steps for every new interval until it becomes relatively small and the
approximate value of root can be accepted. The tabular presentation of the results of
iteration is helpful. Notice that the size of the interval halves after every iteration.
EXAMPLE
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0, 2]. Use
bisection method and perform seven iterations.
1ST ITERATION: ; [0,2]
STEP 1: Solve for the values of STEP 3: Solve for the value of 𝑓(𝑥𝑚 ).
𝑓 𝑥𝑙 and 𝑓(𝑥𝑢 ). 𝑓 𝑥𝑚 = −17.57963
𝑓 𝑥𝐿 = −17 𝑓 𝑥𝑢 = 37
STEP 4: Choose the new interval for
STEP 2: Determine 𝑥𝑚 the next iteration:
𝑥𝑙 𝑓 𝑥𝑢 − 𝑥𝑢 𝑓 𝑥𝑙 𝑓 𝑥𝐿 = −17 - NEGATIVE
𝑥𝑚 =
𝑓 𝑥𝑢 − 𝑓 𝑥𝑙 𝑓 𝑥𝑚 = −17.57963 - NEGATIVE
0(37) − 2(−17)
0(37)−2 (−17) 𝑓 𝑥𝑢 = 37 - POSITIVE
𝑥𝑚 =
37 −−(−17)
37 (−17)
𝑥𝑚 = 0.62963 New Interval: [𝑥𝑚 , 𝑥𝑢 ] ; [0.62963, 2]
EXAMPLE
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0, 2]. Use
bisection method and perform seven iterations.

𝒙𝒍 𝒙𝒎 𝒙𝒖 𝑓 𝑥𝑙 𝑓 𝑥𝒎 𝑓 𝑥𝒖 New Interval
1 0 0.62963 2 -17 -17.57963 37 [0.62963,2]
2 0.62963 1.071014 2 -17.5796 -16.304 37 [1.071014,2]
3 1.071014 1.355161 2 -16.304 -10.2324 37 [1.35516,2]
4 1.355161 1.494859 2 -10.2324 -4.68148 37 [1.494859,2]
5 1.494859 1.551594 2 -4.68148 -1.81869 37 [1.551594,2]
6 1.551594 1.572602 2 -1.81869 -0.66063 37 [1.572602,2]
7 1.572602 1.5801 2 -0.66063 -0.23406 37 [1.5801,2]
EXAMPLE
Determine the root of 3𝑥 4 + 7𝑥 3 − 15𝑥 2 + 5𝑥 = 17 between [0, 2]. Use
bisection method and perform seven iterations.
TAKE NOTE: WAG NYO NA I-AVERAGE DITO SA FALSE POSITION METHOD OR
REGULA FALSI. USE THE FORMULA.

LAST INTERVAL: [1.5801,2] Conclusion:


The obtained value of
𝑓 𝑥𝐿 = 𝑓 1.5801 = −0.23406 the root is accurate to the
𝑓 𝑥𝑢 = 37 nearest hundredths after seven
iterations (the exact value of x
1.5801(37) − 2(−0.23406) for five decimal places is
𝑥𝑚 =
37 − (−0.23406) 1.58416).

𝑥𝑚 = 1.58274 − 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛


PRACTICE:
SOLVE THE GIVEN PROBLEMS. USE BOTH CLOSED METHODS (Bisection
and Regula Falsi)

1. Determine the root of 5𝑥 4 + 21𝑥 3 + 15𝑥 2 + 6𝑥 = 11 between [-1, 2]. Use


bisection method and perform iterations until you can reach at least 97% accuracy.
Use 6 decimal places.

2. Determine the root of 3𝑥 3 + 7𝑥 2 + 14𝑥 − 12 between [-1, 2]. Use


bisection method and perform iterations until you can reach at least 97% accuracy.
Use 6 decimal places.

You might also like