EMATH 124: Numerical Methods

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

EMATH 124

Numerical Methods
Module 1: Introduction

Numerical Methods Algorithms


Algorithms that are used to  a process or set of rules to be
obtain numerical solutions of a followed in calculations or other
mathematical problem problem – solving operations
especially by a computer
Flowchart

 Is a type of diagram that


represents an algorithm,
workflow or process
 show the steps as boxes
of various kinds and their
order by connecting the
boxes with arrows
Module 1: Introduction

Numerical Methods Two types of error:


• Are methods to find numerical 1. Round – off Error
approximations to the solutions of 2. Truncation Error
ordinary differential equations

Note:
Since the numerical method
involved an approximation there
was a discrepancy or error
Error
Round – off Error
• Rounding error
• The difference between the calculated approximation of a number and its exact mathematical
value due to rounding
• The difference between a rounded – off numerical value and the actual value
• A rounded quantity is represented by a numeral with a fixed number of allowed digits, with the
last digit set to the value that produces the smallest difference between the rounded quantity
and the actual quantity
Example:
The irrational number π
π = 3.14159625… round to
π = 3.14….
Error

Truncation Error Example:


• Are those that result from using •If  we approximate the sine function by
an approximation in place of an the first two non-zero term of its Taylor
exact mathematical procedure series as:

• Error made by truncating an


infinite sum and approximating for small the resulting error is
truncation error. It is present even with
it by a finite sum infinite – precision arithmetic, because
it is caused by truncation of infinite
Taylor – series to form the algorithm.
Taylor Series:

Question: Answer:
Given the temperature now, can •No.
  No one can predict
you tell what will be the unless someone told you the rate
temperature tomorrow? of temperature.
Taylor Series:
Formula:

•   in approximating the value


Used Provides a means to predict a
of functions: function value at one point in
terms of the function value and
its derivatives at another point.
This theorem states that any
smooth function can be
approximated as a polynomial.
•  ∞ 𝑛 𝑛
𝑓 (𝑎)(𝑥 − 𝑎)
𝑓 ( 𝑥 )= ∑
𝑛=0 𝑛!
• 
 series of infinite number of terms
Where a is the initial value of x
Taylor Series:

Derivations:
•of  x=0.
Approximation of the value of function at f(x) given intial value
Example:
• 
Given:

Construct a Taylor Series at


Example:
•   Find the series for about
1.
2. Expand series of in powers of
MACLAURIN’S SERIES
• Maclaurin’s
A   Series is the power series expansion of about a It is named after the Scottish
Mathematician Colin Maclaurin (1698-1746). The series can be express in the form:

Note: There are some functions such as , which do not have Maclaurin’s series since their derivatives do
not exist when at
Sample Problem:
•   the Maclaurin’s Series Expansion for
Find
Roots of Equation

Quadratic Formula: Equations:


•  •  Polynomial equations

 roots are sometimes known as


the zeros of the equation
Roots of Equation:

Equations: Bracketing Methods


Transcendental Function  two initial guesses for the roots
 is one that is non – algebraic are required
 trigonometric  these guesses must be
 logarithmic “bracket”, or be on the either
 exponential side of the root
 [ 2, 3 ]
Bracketing Method

Graphical Method Bisection Method


•  a simple method for obtaining  binary chopping
an estimate of the root of the  interval halving
equation is:
 to make a plot of the function  Bolzano’s method
and  is one type of incremental
 observe where it crosses the x – search method in which the
axis interval is always divided in half
Bisection Method
•  changed sign on opposite sides of the root
In General:
If is real and continuous in the interval from to and and have
opposite signs, that is:
0
then there is at least one real root between to .
•   algorithm for the bisection calculation:
Simple

Bisection Method 1. Choose lower and upper guesses for the


root such that the function changes sign over
the interval. This can be check by ensuring 0.
2. An estimate of the root is determined by:
Sample Problem:
•   the root of equation
Find 3. Make the following evaluations to determine
in which subinterval the root lies:
 if 0, the root lies in the lower sub interval.
Therefore, set and return to step 2
Initial guess: [ 1, 4 ]  if 0, the root lies in the upper subinterval.
Therefore , set and return to step 2
 If 0, the root equals ; terminate the computation.

You might also like