0% found this document useful (0 votes)
14 views17 pages

Lecture 2

The document discusses numerical methods for solving differential equations, including deriving an equation to compute the velocity of a parachutist over time based on mass, drag coefficient, and other factors. It also covers sources of numerical error from approximations, the concept of significant figures in determining the reliability of numerical values, and defines accuracy as how close a value is to the true value while precision refers to the agreement between individual measured values. Examples are provided to illustrate computing true and percent relative errors to evaluate the accuracy of numerical solutions.
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)
14 views17 pages

Lecture 2

The document discusses numerical methods for solving differential equations, including deriving an equation to compute the velocity of a parachutist over time based on mass, drag coefficient, and other factors. It also covers sources of numerical error from approximations, the concept of significant figures in determining the reliability of numerical values, and defines accuracy as how close a value is to the true value while precision refers to the agreement between individual measured values. Examples are provided to illustrate computing true and percent relative errors to evaluate the accuracy of numerical solutions.
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/ 17

Numerical Methods

ETB/ETE/ETG/ETM/ETT 2092
Dr. N.A. Weerasekara
Dept of Civil and Environmental Technology

1
From last week lecture

2
Numerical Approach
𝑑𝑣 𝑐
=𝑔 − 𝑣
𝑑𝑡 𝑚
𝑔𝑚
𝑣(𝑡) = (1 − 𝑒 −(𝑐Τ𝑚)𝑡 )
𝑐

3
Example: parachutist of mass 68.1 kg jumps out of a stationary hot air
balloon. Use equation derived to compute velocity prior to
opening the chute. The drag coefficient is equal to 12.5 kg/s.

4
Errors
Numerical errors arise from the use of approximations to represent exact
mathematical operations and quantities.
𝑔𝑚
𝑣(𝑡) = (1 − 𝑒 −(𝑐Τ𝑚)𝑡 )
𝑐

Error

5
Approximations and Errors

6
Significant Figures
• The concept has been developed to formally
designate the reliability of a numerical value
• The significant digits of a number are those
that can be used with confidence
• They correspond to the number of certain
digits plus one estimated digit
• It is conventional to set the estimated digit
at one-half of the smallest scale division on
the measurement device
7
Significant Figures
0.00700
➢ Nonzero numbers are always significant
0.052
➢ In between zeros are always significant
370.
➢ Leading zeros are never significant
10.0
➢ Trailing zeros are sometimes significant
608.002

56,000
8
Accuracy and Precision
Accuracy: how closely a computed
or measured value agrees with the
true value.
Precision: how closely individual
computed or measured values agree
with each other.

9
Errors
Numerical errors arise from the use of approximations to represent exact
mathematical operations and quantities.

10
Types of Errors
There are two major forms of numerical error: round-off error and
truncation error

• Round-Off Error: originate from the fact that computers retain only a
fixed number of significant figures during a calculation

• Truncation Error: discrepancy introduced by the fact that numerical


methods may employ approximations to represent exact
mathematical operations and quantities
11
True Error
𝐸𝑡 = 𝑇𝑟𝑢𝑒 𝑉𝑎𝑙𝑢𝑒 − 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛

A shortcoming of this definition is that it takes no account of the order of


magnitude of the value under examination

𝑇𝑟𝑢𝑒 𝐸𝑟𝑟𝑜𝑟
True Percent Relative Error (𝜀𝑡 ) = %
𝑇𝑟𝑢𝑒 𝑉𝑎𝑙𝑢𝑒

12
Approximate Error
➢ For numerical methods, the true value will be known only when we
deal with functions that can be solved analytically
➢ When we investigate the theoretical behavior of a simple system, this
is usually the case.
➢ For real-world applications, we will obviously not know the true
answer a priori.
➢ In these cases, error is normalized by utilizing the best available
estimate of the true value.
13
Approximate Error
𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝐸𝑟𝑟𝑜𝑟
Approximate Percent Relative Error (𝜀𝑎 ) = %
𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛

𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛 − 𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛


𝜀𝑎 = %
𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑖𝑜𝑛
Perform iterations till
𝜺𝒂 < 𝜺𝒔

𝜺𝒔 = 𝟎. 𝟓 × 𝟏𝟎𝟐−𝒏 %
14
Example 1: Student who measured the length of rivet and a bridge
came up with 9 and 9999 cm, respectively. If the true
values are 10 and 10000 cm, respectively, compute the
true error and true percent relative error for each case

15
Example 2: Use the Maclaurin series to determine the value of e0.5.
Make sure to employ the error criterion that ensures a
result is correct to at least three significant figures

𝑴𝒂𝒄𝒍𝒂𝒖𝒓𝒊𝒏 𝑺𝒆𝒓𝒊𝒆𝒔

𝑛
𝑥 𝑛
𝑒𝑥 ≅ ෍
𝑛!
𝑛=0

16
Example 3:

17

You might also like