Professional Documents
Culture Documents
CH 0
CH 0
Copyright notice: care has been taken to use only those web images deemed by the instructor to be in the public domain. If you see a copyrighted image on any slide and are the copyright owner, please contact the instructor. It will be removed.
Syllabus
2
2/28/2024
4
2/28/2024
Why Numerical ?
We will learn how a computer can be used to solve problems that may not
be solvable by the techniques that are taught in most calculus courses
Analysis in Mathematics
Solve a problem through equations. The equations must then be reduced to an answer through the
procedures of algebra, calculus, differential equations, partial differential equations, or the like.
6
2/28/2024
Analysis in Mathematics
Solve a problem through equations. The equations must then be reduced to an answer through the
procedures of algebra, calculus, differential equations, partial differential equations, or the like.
𝑓 𝑥 = 𝑥 − 𝑥 − 3𝑥 + 3 𝑥 − 𝑥 − 3𝑥 + 3 = 0
𝑥 −𝑥 + (−3𝑥 + 3) = 0
𝑥 𝑥 − 1 − 3(𝑥 − 1) = 0
(𝑥 − 1)(𝑥 − 3) = 0
𝑥 = 1, ± 3
Analytical Answer
Numerical Analysis
The only procedures to solve the problem are arithmetic: add, subtract, multiply, divide, and
compare. Since these operations are exactly those that computers can do
Always an approximation
Accuracy needed or obtained???
8
2/28/2024
Numerical Analysis
The only procedures to solve the problem are arithmetic: add, subtract, multiply, divide, and
compare. Since these operations are exactly those that computers can do
𝑓 𝑥 = 𝑥 − 𝑥 − 3𝑥 + 3 −1.75 1 1.75
3 = 1.73205080757
1.414
1.41421
1.41421356237
10
2/28/2024
(3.14)(3) 28.26
𝑟=3
(3.141592)(3) 28.274328
(3.14159265359)(3) 28.2743338823
Area = 9𝜋
11
𝑥 =2
12
2/28/2024
𝑥 =2
What is x?
13
𝑥 =2
What is x?
14
2/28/2024
𝑥 =2
What is x?
15
𝑥 =2
What is x?
16
2/28/2024
𝑥 =2
What is x?
17
𝑥 =2
What is x?
18
2/28/2024
𝑥 =2
What is x?
19
𝑥 =2
What is x?
2 = 1.41421356237
20
2/28/2024
𝑥 =2
What is x?
21
Topics to cover
22
2/28/2024
23
24
2/28/2024
𝑥 − 2𝑦 = −1
4𝑥 + 3𝑦 = 7
3𝑥 + 5𝑦 = 8
25
𝑥 𝑥 𝑥 𝑥 𝑥 𝑥
26
2/28/2024
27
28
2/28/2024
Modeling
Combustion
Flow in Coal
Power Plant
Structural/Mechanical analysis,
design, and behavior
29
30
2/28/2024
31
32
2/28/2024
33
Truncation Errors
The error made by truncating an infinite sum and approximating it by a finite sum
𝑥
𝑒 = 𝑥 𝑥 𝑥
𝑛! 𝑒 ≈1+ + +
1! 2! 3!
Infinite Sum Series Finite Sum Series
34
2/28/2024
Propagated Error
The error in the succeeding steps of a process due to an occurrence of an
earlier error
35
Round-Off Error
Difference between result produced by given algorithm using exact arithmetic
and result produced by same algorithm using limited precision arithmetic
Due to inexact representation of real numbers and arithmetic operations upon them
1
≈ 0.167
6
1
≈ 0.1666667
6
1
≈ 0.1666666666666666666666666666667
6
36
2/28/2024
Computing Error
The accuracy of any computation is always of great importance. There are two
common ways to express the size of the error in a computed result
Absolute Error
Absolute Error = |True Value – Approximate Value| Relative Error =
Absolute error is usually more serious when the magnitude of the true value is small as its
|True Value|
dependent on the scale of the value The relative error is more independent of the scale of the value
37
Computing Error
The accuracy of any computation is always of great importance. There are two
common ways to express the size of the error in a computed result
Absolute Error
Absolute Error = |True Value – Approximate Value| Relative Error =
Absolute error is usually more serious when the magnitude of the true value is small as its
|True Value|
dependent on the scale of the value The relative error is more independent of the scale of the value
Example
True Value = Approximate Value = 3.333
Relative Error = =
38
2/28/2024
39
Floating-Point Arithmetic
Even though a computer follows exactly the instructions that it is given, when it performs an arithmetic
operation it does not get exact answers unless only integers or exact powers of 2 are involved.
.442E-1
40
2/28/2024
Numerical Analysis
Throughout this class
• Find where f(x) = 0 for a nonlinear equation or system of equations.
• Solve systems of linear equations, even large systems.
• Interpolate to find intermediate values from a table of values and fit curves to experimental data.
• Approximate functions with polynomials or with a ratio of polynomials.
• Approximate values for the derivatives of a function, even if this is known only by a table of function values.
• Evaluate the definite integral for any integrand, even if its values are known only from experimental
observations.
• Solve differential equations when initial values are given; these can be of any order and complexity.
Numerical analysis can even solve them if conditions are specified at the boundaries of a region.
• Find the minima or maxima of functions, even when subject to constraints.
• Solve all types of partial differential equations by several techniques.
41
42
2/28/2024
Error Origins
• Original Data
• Accuracy of measurements
• Models may not reflect the behavior perfectly
• Blunders
• Computers are programmed by humans
• Truncation
• is the error made by truncating an infinite sum and approximating it by a finite sum
• Propagated
• From former steps
• Stable vs unstable methods
• Round off
• Number representation (type and length)
43