Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

MATH 5

Kim Marinelle C. Tiamson, REE


MATH 5

• Incremental Search method


• Bisection Method
• Regula Falsi and Secant Methods
• Newton-Raphson Method
MATH 5

Algebraic Functions

Involves arithmetic operations between some real numbers and rational


powers of 𝑥. It is represented as 𝑓(𝑥) and referred to as a ‘function of 𝑥’.
- Multivariate function - when more than one variable makes up an
algebraic function
- Monomial - single term
- Binomial - two terms
- Polynomial - more than two terms
MATH 5

Algebraic Functions

Example:
𝑓(𝑥) = 𝑥 2 + 2𝑥 contains two terms and is therefore a binomial in
one variable 𝑥
𝑓(𝑥, 𝑦) = 2𝑥 2 𝑦 2 + 6𝑥 2 𝑦 – 8𝑥𝑦 is a multivariate as it is made up of
two variables. It is a polynomial as it contains more than two terms.
MATH 5

Transcendental Functions

A function which is not algebraic is a transcendental function.


They are also referred to as Non-Algebraic Functions. For e.g.,
trigonometric functions, exponential functions, their inverse, and
their combinations, etc.

Example:
𝑓(𝑥) = 𝑥 2 + tan 𝑥 is a transcendental function.
MATH 5
MATH 5

Types of functions

Functions belong to groups of functions called “families” which share


similarities. There exist many families of functions. Outer families
include the inner ones.

For example, Transcendental functions include the Algebraic, Rational,


Polynomial families. However, the inner families do not include the
outer families (The family of Algebraic functions does not include
Transcendental functions)
MATH 5

Algebraic and Transcendental Equation

An ‘algebraic equation’ is an equation of the form 𝑃 = 0, where 𝑃 is a


polynomial made up of some finite number of terms in single or more
than one variable. Similarly, we define a ‘transcendental equation’ as a
transcendental function equated to zero.
MATH 5

Roots of an Algebraic Equation

2𝑥 – 1 = 0 is a linear algebraic equation and has a root 𝑥 = ½


𝑥2 – 1 = 0 is a quadratic equation and has roots 𝑥 = ± 1
(𝑥 − 1) is also a quadratic equation and has repeated double roots
2

at 𝑥 = 1
MATH 5

Equations need to be solved in all areas of science and engineering.


An equation of one variable can be written in the form:

𝑓(𝑥) = 0

A solution to the equation (also called a root of the equation) is a


numerical value of 𝑥 that satisfies the equation. Graphically, as
shown in Fig. 2.2, the solution is the point where the function
𝑓(𝑥) crosses or touches the 𝑥-axis. An equation might have no
solution or can have one or several (possibly many) roots.
MATH 5

Figure 2.2 Illustration of equations with no, one, or several solutions.


MATH 5

Finding the Roots Using Numerical Methods

Numerical methods can be used to find the roots of an equation.


Trial and error are often used to find the root or zero of an equation.
Usually, you make a guess until the function is sufficiently close to
zero. All the methods that will be discussed require an initial guess to
get the solution started. Then we get closer and closer to the root
using multiple iterations in the solution
MATH 5

Two types of finding the roots:

Bracketing Methods – Two initial guesses are used to bracket the


root
1. Bisection Method
2. Regula - Falsi Method
Open Method – involves one or more guesses, but there is no need
to bracket the root
1. Newton – Raphson Method
2. Secant Method
MATH 5

Bisection Method (Binary Chopping Method)


- simplest method of finding the roots.

Steps:
1. Make two initial guesses, 𝑋𝑎 and 𝑋𝑏 , that brackets the roots, thus
you have the interval (𝑋𝑎 , 𝑋𝑏 )
2. Let 𝑓𝑎 = 𝑓 (𝑋𝑎 ) and 𝑓𝑏 = 𝑓 (𝑋𝑏 )
𝑋𝑎 +𝑋𝑏
3. Let 𝑋𝑐 =
2
MATH 5

4. If 𝑓𝑐 = 𝑓 (𝑋𝑐 ) = 0, then 𝑋𝑐 is an exact solution


5. Else if 𝑓𝑎 𝑓𝑐 < 0, then the roots lie in the interval [𝑋𝑎 , 𝑋𝑐 ]
6. Else the root lies in the interval [𝑋𝑐 , 𝑋𝑏 ]
7. Replace the interval [𝑋𝑎 , 𝑋𝑏 ] with either [𝑋𝑎 , 𝑋𝑐 ]or [𝑋𝑐 , 𝑋𝑏 ] and
repeat this interval halving until either the exact root has been found
or the interval is smaller than some specified tolerance.
𝑋𝑛𝑒𝑤 −𝑋𝑜𝑙𝑑
8. Solve the percentage error using %𝑒𝑟𝑟𝑜𝑟 = × 100%
𝑋𝑛𝑒𝑤
MATH 5

Example 2.1: Find the root between 0.5 and 1 for 𝑓(𝑥) = 𝑥 −
𝑐𝑜𝑠𝑥 until the error becomes less than 3%.

*Set Scientific Calculator to SHIFT-SETUP-4:Rad

Computation
MATH 5

Example 2.1: Find the root between 0.5 and 1 for 𝑓(𝑥) = 𝑥 − 𝑐𝑜𝑠𝑥 until the error becomes less than 3%
*Set Scientific Calculator to SHIFT-SETUP-4:Rad
MATH 5

Example 2.1: Find the root between 0.5 and 1 for 𝑓(𝑥) = 𝑥 − 𝑐𝑜𝑠𝑥 until the error becomes less than 3%
*Set Scientific Calculator to SHIFT-SETUP-4:Rad
MATH 5

Regula - Falsi Method (Linear Interpolation)


Used to obtain a new point which is hoped to be closer to the root,
instead of simply dividing the backet into two.
Steps:
1. Make two initial guesses, 𝑋𝑎 and 𝑋𝑏 , that brackets the roots, thus
you have the interval [𝑋𝑎 , 𝑋𝑏 ]
2. Let 𝑓𝑎 = 𝑓 (𝑋𝑎 ) and 𝑓𝑏 = 𝑓 (𝑋𝑏 )
𝑋𝑎 𝑓𝑏 −𝑋𝑏 𝑓𝑎
3. Let 𝑋𝑐 =
𝑓𝑏 −𝑓𝑎
MATH 5

4. If 𝑓𝑐 = 𝑓 (𝑋𝑐 ) = 0, then 𝑋𝑐 is an exact solution


5. Else if 𝑓𝑎 𝑓𝑐 < 0, then the roots lie in the interval [𝑋𝑎 , 𝑋𝑐 ]
6. Else the root lies in the interval [𝑋𝑐 , 𝑋𝑏 ]
7. Replace the interval [𝑋𝑎 , 𝑋𝑏 ] with either [𝑋𝑎 , 𝑋𝑐 ]or [𝑋𝑐 , 𝑋𝑏 ] and
repeat this interval until either the exact root has been found or the
interval is smaller than some specified tolerance.
MATH 5

Example 2.2: Find the root between 2 and 3 for 𝑥 3 − 2𝑥 − 5 = 0 using


regula falsi method up to 11 iterations.

Computation
MATH 5

Xa Xb fa fb Xc fc fc= fafc New


0 Interv
al
2 3 -1 16 2.05882352 -0.3907999186 fc≠ 0.3907999186 Xc, Xb
9 0
2.05882352 3 -0.390799923 16 2.08126366 -0.1472040613 fc≠ 0.0575273358 Xc, Xb
9 0
2.08126366 3 -0.1472040613 16 2.08963921 -0.05467650048 fc≠ 0.008048602928 Xc, Xb
0
2.08963921 3 -0.05467650048 16 2.09273957 -0.02020286908 fc≠ 0.001104622181 Xc, Xb
4 0
2.09273957 3 -0.02020286908 16 2.09388370 - fc≠ 0.0001505216323 Xc, Xb
4 8 0.007450507735 0
2.09388370 3 -0.007450507735 16 2.09430545 - fc≠ 0.00002045668665 Xc, Xb
8 1 0.002745676855 0
2.09430545 3 -0.002745676855 16 2.09446084 -0.00101157281 fc≠ 0.000002777452052 Xc, Xb
1 6 0
2.09446084 3 -0.00101157281 16 2.09451809 -0.00037264597 fc≠ 0.000000376958531 Xc, Xb
6 4 0
2.09451809 3 -0.00037264597 16 2.09453918 - fc≠ 0.0000000511545351 Xc, Xb
4 3 0.000137273818 0 3
2
2.09453918 3 -0.0001372738182 16 2.09454695 - fc≠ 0.0000000069408876 Xc, Xb
3 1 0.000050562355 0 63
98
2.09454695 3 -0.00005056235598 16 2.09454981 - fc≈ 0.0000000009420021 Xc, Xb
1 2 0.000018630502 0 071
65

Therefore, the answer is 2.094549812.


MATH 5

Newton-Raphson Method

Used in finding better approximations to the roots of a function. It


was named after Isaac Newton and Joseph Raphson. Compared to
the Bisection Method and the Regula Falsi method, the Newton-
Raphson method converges much more rapidly.
MATH 5

Newton-Raphson Method

Steps:
Steps:
1. Make an initial guess of the root, X0
𝑓(𝑋0 )
2. Solve for 𝑋1 = 𝑋0 −
𝑓′(𝑋0 ) 𝑓(𝑋𝑛)
3. Repeat the process by solving 𝑋𝑛+1 = 𝑋𝑛 − until a sufficiently
𝑓′(𝑋𝑛)
accurate value is reached
MATH 5

Example 2.3: Find the root for 𝑥 3 − 𝑥 − 1 using Newton Raphson


Method, where 𝑋0 = 1
MATH 5

Example 2.3: Find the root for 𝑥 3 − 𝑥 − 1 using Newton Raphson


Method, where 𝑋0 = 1
MATH 5

Secant Method

Similar to the Newton-Raphson method except that the derivative


f’(x) is approximated by a finite difference based on the current and
the preceding estimate for the root.
Steps:
1. Make two initial guesses of the root, 𝑋0 and 𝑋1
2. Solve for
𝑓 𝑋𝑛−1
𝑋𝑛 = 𝑋𝑛−1 − 𝑓 𝑋𝑛−1 −𝑓 𝑋𝑛−2

(𝑋𝑛−1 )− (𝑋𝑛−2 )
MATH 5

Example 2.4: Example:


3
Solve for 𝑥 − 𝑥 − 1 using Secant Method, where 𝑥1 = 1 and 𝑋2 = 2
*Clear Calculator
MATH 5

Example 2.4: Example:


3
Solve for 𝑥 − 𝑥 − 1 using Secant Method, where 𝑥1 = 1 and 𝑋2 = 2
*Clear Calculator
MATH 5

Iterative Polynomial Function Techniques

• Open search method


• A good initial estimate of the solution is required
• The objective function must be twice differentiable
• Unlike Golden Section Search method
Lower and upper search boundaries are not required (open vs.
bracketing). May not converge to the optimal solution

You might also like