CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

3- 1 Chapter 3 Introduction to Numerical Methods Second-order polynomial equation: analytical solution (closed-form solution): For many types of problems,
Lecture 5 Newton-Raphson Method
Roundoff and truncation errors
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion.
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Approximations and Errors
Round-Off and Truncation Errors
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 3 Approximations and Errors.
Revision.
CVEN Exam 1 Review. Matlab.m files Matlab.m files Programming: FOR, WHILE, IF and FUNCTION Programming: FOR, WHILE, IF and FUNCTION Taylor Series.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
CISE301_Topic7KFUPM1 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM Read Chapter 21, Section 1 Read Chapter 22, Sections 2-3.
CISE301_Topic71 SE301: Numerical Methods Topic 7 Numerical Integration Lecture KFUPM (Term 101) Section 04 Read Chapter 21, Section 1 Read Chapter.
Numerical Methods Intro to Numerical Methods &
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Chapter 1 Infinite Series, Power Series
Chapter 17 Boundary Value Problems. Standard Form of Two-Point Boundary Value Problem In total, there are n 1 +n 2 =N boundary conditions.
Lecture 2 Number Representation and accuracy
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing.
EE 3561_Unit_1(c)Al-Dhaifallah EE 3561 : - Computational Methods in Electrical Engineering Unit 1: Introduction to Computational Methods and Taylor.
Introduction to Numerical Analysis I
Introduction to Numerical Analysis I MATH/CMPSC 455 Fall 2011 Instructor: Xiaozhe Hu (Shawn)
CSE 541 Rick Parent ELEMENTARY NUMERICAL METHODS Winter 2012.
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Review Taylor Series and Error Analysis Roots of Equations
Round-off Errors and Computer Arithmetic. The arithmetic performed by a calculator or computer is different from the arithmetic in algebra and calculus.
CSC 221 Computer Organization and Assembly Language
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
In section 11.9, we were able to find power series representations for a certain restricted class of functions. Here, we investigate more general problems.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Introduction Course Outline.
Numerical Methods.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
The Convergence Problem Recall that the nth Taylor polynomial for a function f about x = x o has the property that its value and the values of its first.
Numerical Analysis Intro to Scientific Computing.
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
Introduction to computing
Numerical Analysis CC413 Propagation of Errors.
Section 3.1 Introduction & Review of Power Series.
Numerical Analysis Intro to Scientific Computing.
SE301_Topic 6Al-Amer20051 SE301:Numerical Methods Topic 6 Numerical Integration Dr. Samir Al-Amer Term 053.
Numerical Analysis CC413 Propagation of Errors. 2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate.
Lecture 1 Introduction Dr. Hakikur Rahman Thanks to Dr. S. M. Lutful Kabir for Slides CSE 330: Numerical Methods.
Copyright © Cengage Learning. All rights reserved Applications of Taylor Polynomials.
Numerical Methods and Optimization C o u r s e 1 By Bharat R Chaudhari.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
Introduction to Numerical Analysis I
ME 142 Engineering Computation I
Simultaneous Linear Equations
New head garb has been ordered
Taylor series in numerical computations (review)
Chapter 2 ERROR ANALYSIS
Roundoff and Truncation Errors
CSCI206 - Computer Organization & Programming
Calculus BC AP/Dual, Revised © : Lagrange's Error Bound
Approximations and Round-Off Errors Chapter 3
Section 11.6 – Taylor’s Formula with Remainder
Numerical Analysis Lecture 2.
Chapter 1 / Error in Numerical Method
Roundoff and Truncation Errors
Errors and Error Analysis Lecture 2
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:

CISE301_Topic12 Lecture 1 Introduction to Numerical Methods  What are NUMERICAL METHODS ?  Why do we need them?  Topics covered in CISE301. Reading Assignment: Pages 3-10 of textbook

CISE301_Topic13 Numerical Methods Numerical Methods: Algorithms that are used to obtain numerical solutions of a mathematical problem. Why do we need them? 1. No analytical solution exists, 2. An analytical solution is difficult to obtain or not practical.

CISE301_Topic14 What do we need? Basic Needs in the Numerical Methods: Practical: Can be computed in a reasonable amount of time. Accurate:  Good approximate to the true value,  Information about the approximation error (Bounds, error order,… ).

CISE301_Topic15 Outlines of the Course  Taylor Theorem  Number Representation  Solution of nonlinear Equations  Interpolation  Numerical Differentiation  Numerical Integration  Solution of linear Equations  Least Squares curve fitting  Solution of ordinary differential equations  Solution of Partial differential equations

CISE301_Topic16 Solution of Nonlinear Equations  Some simple equations can be solved analytically:  Many other equations have no analytical solution:

CISE301_Topic17 Methods for Solving Nonlinear Equations o Bisection Method o Newton-Raphson Method o Secant Method

CISE301_Topic18 Solution of Systems of Linear Equations

CISE301_Topic19 Cramer’s Rule is Not Practical

CISE301_Topic110 Methods for Solving Systems of Linear Equations o Naive Gaussian Elimination o Gaussian Elimination with Scaled Partial Pivoting o Algorithm for Tri-diagonal Equations

CISE301_Topic111 Curve Fitting  Given a set of data:  Select a curve that best fits the data. One choice is to find the curve so that the sum of the square of the error is minimized.

CISE301_Topic112 Interpolation  Given a set of data:  Find a polynomial P(x) whose graph passes through all tabulated points.

CISE301_Topic113 Methods for Curve Fitting o Least Squares o Linear Regression o Nonlinear Least Squares Problems o Interpolation o Newton Polynomial Interpolation o Lagrange Interpolation

CISE301_Topic114 Integration  Some functions can be integrated analytically:

CISE301_Topic115 Methods for Numerical Integration o Upper and Lower Sums o Trapezoid Method o Romberg Method o Gauss Quadrature

CISE301_Topic116 Solution of Ordinary Differential Equations

CISE301_Topic117 Solution of Partial Differential Equations Partial Differential Equations are more difficult to solve than ordinary differential equations:

CISE301_Topic118 Summary  Numerical Methods: Algorithms that are used to obtain numerical solution of a mathematical problem.  We need them when No analytical solution exists or it is difficult to obtain it.  Solution of Nonlinear Equations  Solution of Linear Equations  Curve Fitting Least Squares Interpolation  Numerical Integration  Numerical Differentiation  Solution of Ordinary Differential Equations  Solution of Partial Differential Equations Topics Covered in the Course

CISE301_Topic119  Number Representation  Normalized Floating Point Representation  Significant Digits  Accuracy and Precision  Rounding and Chopping Reading Assignment: Chapter 3 Lecture 2 Number Representation and Accuracy

CISE301_Topic120 Representing Real Numbers  You are familiar with the decimal system:  Decimal System: Base = 10, Digits (0,1,…,9)  Standard Representations:

CISE301_Topic121 Normalized Floating Point Representation  Normalized Floating Point Representation:  Scientific Notation: Exactly one non-zero digit appears before decimal point.  Advantage: Efficient in representing very small or very large numbers.

CISE301_Topic122 Binary System  Binary System: Base = 2, Digits {0,1}

CISE301_Topic123 Fact  Numbers that have a finite expansion in one numbering system may have an infinite expansion in another numbering system:  You can never represent 1.1 exactly in binary system.

IEEE 754 Floating-Point Standard  Single Precision (32-bit representation) 1-bit Sign + 8-bit Exponent + 23-bit Fraction  Double Precision (64-bit representation) 1-bit Sign + 11-bit Exponent + 52-bit Fraction CISE301_Topic124 SExponent 8 Fraction 23 SExponent 11 Fraction 52 (continued)

CISE301_Topic125 Significant Digits  Significant digits are those digits that can be used with confidence.  Single-Precision: 7 Significant Digits … × to … ×  Double-Precision: 15 Significant Digits … × to … ×

CISE301_Topic126 Remarks  Numbers that can be exactly represented are called machine numbers.  Difference between machine numbers is not uniform  Sum of machine numbers is not necessarily a machine number

CISE301_Topic127 Calculator Example  Suppose you want to compute: * using a calculator with two-digit fractions 3.57 * = True answer:

CISE301_Topic Significant Digits - Example

CISE301_Topic129 Accuracy and Precision  Accuracy is related to the closeness to the true value.  Precision is related to the closeness to other estimated values.

CISE301_Topic130

CISE301_Topic131 Rounding and Chopping  Rounding: Replace the number by the nearest machine number.  Chopping: Throw all extra digits.

CISE301_Topic132 Rounding and Chopping

CISE301_Topic133 Can be computed if the true value is known: Error Definitions – True Error

CISE301_Topic134 When the true value is not known: Error Definitions – Estimated Error

CISE301_Topic135 We say that the estimate is correct to n decimal digits if: We say that the estimate is correct to n decimal digits rounded if: Notation

CISE301_Topic136 Summary  Number Representation Numbers that have a finite expansion in one numbering system may have an infinite expansion in another numbering system.  Normalized Floating Point Representation Efficient in representing very small or very large numbers, Difference between machine numbers is not uniform, Representation error depends on the number of bits used in the mantissa.

CISE301_Topic137 Lectures 3-4 Taylor Theorem  Motivation  Taylor Theorem  Examples Reading assignment: Chapter 4

CISE301_Topic138 Motivation  We can easily compute expressions like: 0.6 a b

CISE301_Topic139 Remark  In this course, all angles are assumed to be in radian unless you are told otherwise.

CISE301_Topic140 Taylor Series

CISE301_Topic141 Maclaurin Series  Maclaurin series is a special case of Taylor series with the center of expansion a = 0.

CISE301_Topic142 Maclaurin Series – E xample 1

CISE301_Topic143 Taylor Series Example 1

CISE301_Topic144 Maclaurin Series – Example 2

CISE301_Topic145

CISE301_Topic146 Maclaurin Series – E xample 3

CISE301_Topic147 Maclaurin Series – Example 4

CISE301_Topic148 Example 4 - Remarks  Can we apply the series for x≥1??  How many terms are needed to get a good approximation??? These questions will be answered using Taylor’s Theorem.

CISE301_Topic149 Taylor Series – Example 5

CISE301_Topic150 Taylor Series – Example 6

CISE301_Topic151 Convergence of Taylor Series  The Taylor series converges fast (few terms are needed) when x is near the point of expansion. If |x-a| is large then more terms are needed to get a good approximation.

CISE301_Topic152 Taylor’s Theorem (n+1) terms Truncated Taylor Series Remainder

CISE301_Topic153 Taylor’s Theorem

CISE301_Topic154 Error Term

CISE301_Topic155 Error Term - Example

CISE301_Topic156 Alternative form of Taylor’s Theorem

CISE301_Topic157 Taylor’s Theorem – Alternative forms

CISE301_Topic158 Mean Value Theorem

CISE301_Topic159 Alternating Series Theorem

CISE301_Topic160 Alternating Series – Example

CISE301_Topic161 Example 7

CISE301_Topic162 Example 7 – Taylor Series

CISE301_Topic163 Example 7 – Error Term