0% found this document useful (0 votes)
2 views

Numerical-Methods-Learning-Module-1-24-2

The document outlines the course CpE 221 – Numerical Methods at President Ramon Magsaysay State University, detailing its objectives, structure, and assessment methods. The course covers essential numerical techniques for solving mathematical problems in engineering, including root finding, systems of equations, and error analysis. Students are expected to have a background in calculus and differential equations to succeed in this three-unit lecture course.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Numerical-Methods-Learning-Module-1-24-2

The document outlines the course CpE 221 – Numerical Methods at President Ramon Magsaysay State University, detailing its objectives, structure, and assessment methods. The course covers essential numerical techniques for solving mathematical problems in engineering, including root finding, systems of equations, and error analysis. Students are expected to have a background in calculus and differential equations to succeed in this three-unit lecture course.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

CpE 221 – Numerical

Methods

This is a property of
PRESIDENT RAMON MAGSAYSAY STATE UNIVERSITY
NOT FOR SALE
CpE 221 – Numerical Methods
First Edition, 2021

Copyright. Republic Act 8293 Section 176 provides that “No copyright shall subsist in any work of
the Government of the Philippines. However, prior approval of the government agency or office
wherein the work is created shall be necessary for exploitation of such work for profit. Such agency or
office may, among other things, impose as a condition the payment of royalties.

Borrowed materials included in this module are owned by their respective copyright holders. Every
effort has been exerted to reach and seek permission to use these materials from their respective
copyright owners. The University and authors do not claim ownership over them.

Learning Module Development Team

Assigned
Title Author
Chapter
Chapter 1: Introduction to Numerical Methods
Dionisio M. Martin Jr.
Chapter 2: Root Finding
Chapter 3: Systems of Equations

Evaluators:

(First Name, Middle Initial, Last Name), Position


(First Name, Middle Initial, Last Name), Position
(First Name, Middle Initial, Last Name), Position
Course Overview
Introduction

Numerical Methods is a three-unit computer engineering professional course, that requires


knowledge in calculus and differential equation. This course discusses the root findings,
systems of equations, least-squares approximation, interpolation, integration and the ordinary
differential equations.

Numerical methods are techniques to approximate mathematical procedures (e.g., integrals).


Approximations are needed because we either cannot solve the procedure analytically (e.g., the
standard normal cumulative distribution function) or because the analytical method is
intractable (e.g., solving a set of a thousand simultaneous linear equations for a thousand
unknowns). By end of this course, students will be able to apply the numerical methods for
the following mathematical procedures and topics: differentiation, nonlinear equations, and
simultaneous linear equations, interpolation, regression, integration, and ordinary differential
equations. Additionally, they will be able to calculate errors and implement their relationship
to the accuracy of the numerical solutions. To be prepared for this course, students should have
a passing grade in introductory physics, integral calculus, differential calculus, and ordinary
differential equations.

Course General Objectives

At the end of the semester, 85% of the students have attained 90% level of understanding for
being aware in the engineering economics, locally and globally.

1. Understand the concepts of numerical methods in solving functions.


2. Recognize the difference between analytical and numerical solutions.
3. Understand and used the rules truncation and round-off as well as the concept of
significant figures, accuracy and precision.
4. Familiar with the concepts of stability and conditions.
5. Understand the difference between bracketing and open method for root location.
6. Familiar with terminology such as forward elimination, back substitution, pivot
equation and pivot coefficient.
7. Solve problems using the inverse and matrix norms to evaluate system condition.
8. Understand the difference between local and global truncation errors and how they
relate to the choice of a numerical method for a particular problem.

Course Details:

• Course Code: CpE 221


• Course Title: Numerical Methods
• No. of Units: 3-unit lecture
• Classification: Lecture-based
• Pre-requisite / Co-Requisite: Differential Equations
• Semester and Academic Year: 2nd Semester, AY 2024-2025
• Schedule: BSCpE 2A – Tuesday and Thursday, 10:30AM-12:00NN
BSCpE 2B – Monday, Wednesday and Friday, 10:00AM-11:00AM
• Name of Faculty: Dionisio M. Martin Jr.
• Contact Details
Email: [email protected]
Mobile Number: 0939-906-0585
FB Account: Dionisio Martin Jr.
• Consultation
Day: MWF
Time: 1:00-2:00PM

Learning Management System

The University LMS will be used for asynchronous learning and assessment. The link and class
code for LMS will be provided at the start of class through the class’ official Facebook Group.

• Edmodo
• Google Classroom
• University LMS

Assessment with Rubrics

Students will be assessed in a regular basis thru quizzes, assignments, individual/group outputs
using synchronous and/or asynchronous modalities or submission of SLM exercises. Rubrics
are also provided for evaluation of individual/group outputs.

Major examinations will be given as scheduled. The scope and coverage of the examination
will be based on the lessons/topics as plotted in the course syllabus.
0323

Module Overview
Introduction

This module aims to introduce the concepts of numerical analysis in dealing with engineering
problems and techniques in finding the root of an equations, solving linear and non-linear
equations, polynomial approximation and interpolation, and the ordinary differential equations.

Numerical methods are techniques by which mathematical problems are formulated so that
engineers can solved with different arithmetic operations. Although there are many kinds of
numerical methods, they have one common characteristic: they invariably involve large
numbers of tedious arithmetic calculations.

The students will learn how to solve mathematical problems using different arithmetic
operations at the end of each lesson/chapter.

Table of Contents

Chapter 1: Introduction to Numerical Methods


Chapter 2: Root Finding
Chapter 3: System of Equations
Numerical Methods

Chapter 1

Introduction to
Numerical Methods
Chapter 1

Introduction to Numerical Methods


Introduction

Numerical methods are techniques by which the mathematical problems involved with the
engineering analysis cannot readily or possibly be solved by analytical methods.

The use of some of these numerical methods that will not only enable engineers to solve many
mathematical problems, but will also allow engineers to minimize the needs for the many
hypotheses and idealization of the conditions.

Specific Objectives

At the end of the lesson, the students should be able to:

- find the true and relative true error


- find the approximate and relative approximate error
- relate the absolute relative approximate error to the number of significant digits at least
correct in your answers, and
- know the concept of significant digits.

Duration

Chapter 1: Introduction to Numerical Method = 3 hours


(2.5-hours discussion;
0.5-hour assessment)

_____________________________________________

INTRODUCTION

Numerical methods – are techniques by which mathematical problems are formulated so that
they can be solved with arithmetic operations.
– are techniques to approximate mathematical procedures (example of a mathematical
procedure is an integral). Approximations are needed because we either cannot solve the
procedure analytically.
– are complete and unambiguous set of procedures for the solution of a problem,
together with computable error estimates.
– are essentially “trail-and-error” processes because typically, students need to estimate
an initial solution with selected increment of the variable to which the intended solution will
cover.
In any numerical analysis, errors will arise during the calculations. To be able to deal with
the issue of errors, it is need to
1. identify where the error is coming from, followed by
2. quantifying the error, and lastly
3. minimize the error as per needed.

Error Definition
Numerical errors arise from the use of approximations to represent exact mathematical
operations and quantities. There are two types of errors that are inherent with numerical
solutions:
(a) truncation errors – result when approximations are used to represent exact
mathematical procedures
– the error incurred when limiting the accuracy and/or running-time of
a procedure that requires an impractical amount of time (possibly infinite) in
order to obtain the exact true answer
(b) round-off errors – result when numbers having limited significant figures are used
to represent exact numbers
– the error incurred when representing a number with fewer digits than
are required to completely capture its exact numerical value

True error – is denoted by 𝐸𝑡 is the difference between the true value (also called the exact
value) and the approximate value.
𝑇𝑟𝑢𝑒 𝐸𝑟𝑟𝑜𝑟 = 𝑇𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒 – 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑣𝑎𝑙𝑢𝑒
𝐸𝑡 = 𝑇𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒 – 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑣𝑎𝑙𝑢𝑒

Relative true error – is denoted by 𝑡 and is defined as the ratio between the true error and
the true value.
𝑡𝑟𝑢𝑒 𝑒𝑟𝑟𝑜𝑟
𝑅𝑒𝑙𝑎𝑡𝑖𝑣𝑒 𝑡𝑟𝑢𝑒 𝑒𝑟𝑟𝑜𝑟 =
𝑡𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒
𝑡𝑟𝑢𝑒 𝑒𝑟𝑟𝑜𝑟
𝑡 = 100%
𝑡𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒

Where: 𝑡 – the true percent relative error.

Example 1. Suppose that you have the task of measuring the lengths of a bridge and a rivet
and come up with 9999 and 9 cm, respectively. If the true values are 10,000 and 10 cm,
respectively, compute (a) the true error and (b) the true percent relative error for each case.
Solution:
(a) The error for measuring the bridge is
𝐸𝑡 = 10,000 − 9999 = 𝟏 𝒄𝒎
and for the rivet it is
𝐸𝑡 = 10 − 9 = 𝟏 𝒄𝒎
(b) The percent relative error for the bridge is
1
𝑡 = 100% = 𝟎. 𝟎𝟏%
10,000
and for the rivet it is
1
𝑡 = 100% = 𝟏𝟎%
10
Example 2. The derivative of a function 𝑓(𝑥) at a particular value of 𝑥 can be approximately
calculated by
𝑓(𝑥+ℎ)−𝑓(𝑥)
𝑓′(𝑥) ≈ ℎ

of 𝑓′(2). For 𝑓(𝑥) = 7𝑒 0.5𝑥 and ℎ = 0.3, find


a) the approximate value of 𝑓’(2)
b) the true value of 𝑓’(2)
c) the true error for part (a)
Solution:
𝑓(𝑥+ℎ)−𝑓(𝑥)
a) 𝑓′(𝑥) ≈ ℎ
For x = 2 and h = 0.3,
𝑓(2+0.3)−𝑓(2)
𝑓′(2) ≈ 0.3
𝑓(2.3)−𝑓(2)
= 0.3
7𝑒 0.5(2.3) −7𝑒 0.5(2)
= 0.3
22.107−19.028
=
0.3

= 𝟏𝟎. 𝟐𝟔𝟓
b) The exact value of 𝑓’(2) can be calculated by using our knowledge of differential
calculus.
𝑓(𝑥) = 7𝑒 0.5𝑥
𝑓(𝑥) = (7)(0.5)(𝑒 0.5𝑥 )
= 3.5𝑒 0.5𝑥
So the true value of 𝑓’(2) is
𝑓(𝑥) = 3.5𝑒 0.5(2)
= 𝟗. 𝟓𝟏𝟒𝟎
c) True error is calculated as
𝐸𝑡 = 𝑇𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒 – 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑣𝑎𝑙𝑢𝑒
= 9.5140 − 10.265
= − 𝟎. 𝟕𝟓𝟎𝟔𝟏

Example 3. The derivative of a function 𝑓(𝑥) at a particular value of 𝑥 can be approximately


calculated by
𝑓(𝑥+ℎ)−𝑓(𝑥)
𝑓′(𝑥) ≈ ℎ

For 𝑓(𝑥) = 7𝑒 0.5𝑥 and ℎ = 0.3, find the relative true error at 𝑥 = 2.
Solution:
𝐸𝑡 = 𝑇𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒 – 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑣𝑎𝑙𝑢𝑒
= 9.5140 − 10.265
= − 0.75061
Relative true error is
𝑡𝑟𝑢𝑒 𝑒𝑟𝑟𝑜𝑟
𝑡 = 𝑡𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒
−0.75061
= 9.5140

= −𝟎. 𝟎𝟕𝟖𝟖𝟗𝟓 or −𝟕. 𝟖𝟖. 𝟗𝟓%

Approximation Error – is denoted by 𝐸𝑎 and is defined as the difference between the present
approximation and previous approximation.
𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝐸𝑟𝑟𝑜𝑟 = 𝑃𝑟𝑒𝑠𝑒𝑛𝑡 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 – 𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛
𝐸𝑎 = 𝑃𝑟𝑒𝑠𝑒𝑛𝑡 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 – 𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛

Relative approximate error – is denoted by 𝑎 and is defined as the ratio between the
approximate error and the present approximation.
𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑒𝑟𝑟𝑜𝑟
𝑎 = 100%
𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛
𝑃𝑟𝑒𝑠𝑒𝑛𝑡 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 − 𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛
𝑎 = 100%
𝑃𝑟𝑒𝑠𝑒𝑛𝑡 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛

|𝑎 | < 𝜀 ; to stop computation

𝜀𝑠 = (0.5 × 102−𝑛 )%

Example 4. The derivative of a function f (x) at a particular value of x can be approximately


calculated by
𝑓(𝑥+ℎ)−𝑓(𝑥)
𝑓′(𝑥) ≈ ℎ

For 𝑓(𝑥) = 7𝑒 0.5𝑥 and at 𝑥 = 2, find the following


a) 𝑓’(2) using ℎ = 0.3
b) 𝑓’(2) using ℎ = 0.15
c) approximate error for the value of 𝑓’(2) for part (b)
Solution:
a) The approximate expression for the derivative of a function is
𝑓(𝑥+ℎ)−𝑓(𝑥)
𝑓′(𝑥) ≈ ℎ
For 𝑥 = 2 and ℎ = 0.3,
𝑓(2+0.3)−𝑓(2)
𝑓′(2) ≈ 0.3
𝑓(2.3)−𝑓(2)
= 0.3
7𝑒 0.5(2.3) −7𝑒 0.5(2)
= 0.3
22.107−19.028
= 0.3

= 𝟏𝟎. 𝟐𝟔𝟓
b) Repeat the procedure of part (a) with ℎ = 0.15,
𝑓(2+0.15)−𝑓(2)
𝑓′(2) ≈ 0.15
𝑓(2.15)−𝑓(2)
= 0.15
7𝑒 0.5(2.15) −7𝑒 0.5(2)
= 0.15
20.50−19.028
= 0.15

= 𝟗. 𝟖𝟕𝟗𝟗
c) The approximate error 𝐸𝑎 is
𝐸𝑎 = 𝑃𝑟𝑒𝑠𝑒𝑛𝑡 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 – 𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛
= 9.8799 − 10.265
= − 𝟎. 𝟑𝟖𝟒𝟕𝟒

Significant digits – are important in showing the truth one has in a reported number.
– indicate the precision of a measurement. A number with more significant digits is
more precise.
Example: 1,079,587 = 1.079587x106
1,000,000 = 1x106
8.00 = 8.0
to signify the correct number of significant digits.
– follows a following rule:
a.) All non-zero digits are significant digits.
o 4 has one significant digit
o 1.3 has two significant digits
o 4,325.334 has seven significant digits
b.) Zeros that occur between significant digits are significant digits.
o 109 has three significant digits
o 3.005 has four significant digits
o 40.001 has five significant digits
c.) Zeros to the right of the decimal point and to the right of a non-zero digit
are significant.
o 0.10 has two significant digits (the leading zero is not significant,
but the trailing zero is significant)
o 0.0010 has two significant digits (the last two)
o 3.20 has three significant digits
o 320 has two significant digits (this zero is to the left of the decimal
point - not significant.)
o 14.3000 has six significant digits
o 400.00 has five significant digits (the two zeros to the right of the
decimal point are significant because they are to the right of the
"4". The two zeros to the left of the decimal point are significant
because they lie between significant digits - the "4" and the zeros to
the right of the decimal point.)

Example 5. Give some examples of showing the number of significant digits.


Answer:
a.) 0.0459 has three significant digits
b.) 4.590 has four significant digits
c.) 4008 has four significant digits
d.) 4008.0 has five significant digits
e.) 1.079 x 103 has four significant digits
f.) 1.0790 x 103 has five significant digits
g.) 1.07900 x 103 has six significant digits

Characteristics of Measurements
1. Accuracy refers to how closely a computed or measured value agrees with the true
value.
2. Precision refers to how closely individual computed or measured values agree with
each other.

_____________________________________________

References/Additional Resources/Readings

S. Chapra & R. Canale (2010). Numerical Methods for Engineers, 7th ed., McGraw-Hill
Education, Inc.

J. Epperson (2013). An Introduction to Numerical Methods and Analysis, 2nd ed., John Wiley
& Sons, Inc.

J. Chasnov (nd). Numerical Methods, The Hong Kong University of Science and Technology.

https://nm.mathforcollege.com/chapter-01.02-measuring-errors/
Assignment
ASSIGNMENT 1

Name: _______________________________ Course/Year/Section: _____________ Score: _______

I. Choose the correct answer.


1. True error is defined as
(a) Present Approximation – Previous Approximation
(b) True Value – Approximate Value
(c) abs (True Value – Approximate Value)
(d) abs (Present Approximation – Previous Approximation)
2. The expression for true error in calculating the derivative of 𝑠𝑖𝑛(2𝑥) at 𝑥 = 𝜋/4 by using the
approximate expression
𝑓(𝑥+ℎ)−𝑓(𝑥)
𝑓′(𝑥) ≈

is
ℎ−𝑐𝑜𝑠(2ℎ)−1 1−𝑐𝑜𝑠(2ℎ)
(a) (c)
ℎ ℎ
ℎ−𝑐𝑜𝑠(ℎ)−1 𝑠𝑖𝑛(2ℎ)
(b) (d)
ℎ ℎ

3. The relative approximate error at the end of an iteration to find the root of an equation is
0.004%. The least number of significant digits we can trust in the solution is
(a) 2 (b) 3 (c) 4 (d) 5
4. The number 0.01850 × 103 has ________ significant digits
(a) 3 (b) 4 (c) 5 (d) 6
5. The number of significant digits in the number 219900 is
(a) 4 (b) 5 (c) 6 (d) 7

II. Answer the following: (Note: Round all answers to 6 significant digits. For numbers such as
6.01000, you may simply write 6.01.)
𝑓(𝑥+ℎ)−𝑓(𝑥)
1. Use the formula ℎ
to approximate the derivative of 𝑓(𝑥) = 3𝑥 2 at 𝑥 = 1 using ℎ = 0.1.
Compute both the absolute true error |𝐸𝑡 |, and absolute relative true error |𝑡 |.
2. How many significant digits does each of the following numbers have?
a. 2340000 e. 9.569 × 102
b. 0.02965 f. 2, 314 × 105
c. 1.011 g. 200.000
d. 2.23 × 103 h. 30.001

3. The following gas stations were cited for irregular dispensation by the Dep’t of Agriculture.
Station Actual gasoline dispensed Gasoline reading at pump
Ser 9.90 10.00
Cit 19.90 20.00
Hus 29.80 30.00
Jun 29.95 30.00
Which one cheated you the most?
4. In each given below, 𝐴 is the exact value, and 𝐴ℎ is an approximation. Find the absolute error
and the relative error.
22 1
a. 𝐴 = 𝜋, 𝐴ℎ = 7
c. 𝐴 = 6 , 𝐴ℎ = 0.1667
1
b. 𝐴 = 𝑒, 𝐴ℎ = 2.71828 d. 𝐴 = 6 , 𝐴ℎ = 0.1666

You might also like