Unformatted text preview:

ECE257ECE257 NumericalNumerical Methods Methods andandScientificScientific ComputingComputingTaylor SeriesTaylor SeriesECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTodayToday’’s class:s class:••Truncation ErrorsTruncation Errors••Taylor SeriesTaylor SeriesECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTruncation ErrorsTruncation Errors••Round-offRound-off errors occurs from imprecision in errors occurs from imprecision inrepresentation of datarepresentation of data••Truncation Truncation errors result from a numericalerrors result from a numericalapproximation in place of an exact analyticalapproximation in place of an exact analyticalvaluevalue––EulerEuler’’s methods method––Infinite seriesInfinite seriesECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor SeriesTaylor Series••An infinite series approximation of a functionAn infinite series approximation of a functionbased on Taylorbased on Taylor’’s Theorems Theorem••Zero-order approximationZero-order approximation€ f (xi+1) ≅ f (xi) + f '(xi) ⋅ xi+1− xi( )••First-order approximationFirst-order approximation€ f (xi+1) ≅ f (xi)••Second-order approximationSecond-order approximation€ f (xi+1) ≅ f (xi) + f '(xi) ⋅ xi+1− xi( )+f ''(xi)2!⋅ xi+1− xi( )2ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor SeriesTaylor Series € f (x) = f (x0) + f '(x0) ⋅ x − x0( )+f ''(x0)2!⋅ x − x0( )2+L +f(n )(x0)n!⋅ x − x0( )n+ L••TaylorTaylor’’s Theorems Theorem••What if we limit the series to a finite What if we limit the series to a finite n?n?ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor SeriesTaylor Series••Lagrange remainder accounts for the termsLagrange remainder accounts for the termsfrom n+1 to from n+1 to ∞∞.. € f (x) = f (x0) + f '(x0) ⋅ x − x0( )+f ''(x0)2!⋅ x − x0( )2+L +f(n )(x0)n!⋅ x − x0( )n+ RnECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor SeriesTaylor Series€ f(n +1)(x) dxx0x∫= f(n )(x) − f(n )(x0)€ f(n +1)(x) dxx0x∫[ ]x0x∫ dx = f(n )(x) − f(n )(x0)[ ] dxx0x∫= f(n−1)(x) − f(n−1)(x0) − x − x0( )f(n )(x0)€ f(n +1)(x) dxx0x∫[ ]x0x∫ dx      x0x∫ dx = f(n−1)(x) − f(n−1)(x0) − x − x0( )f(n )(x0)[ ] dxx0x∫ = f(n−2)(x) − f(n−2)(x0) − x − x0( )f(n−1)(x0) −x − x0( )22!f(n−1)(x0)ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor SeriesTaylor Series € L f(n +1)(x) dx( )n +1x0x∫x0x∫x0x∫ = f (x) − f (x0) − x − x0( )f '(x0) −x − x0( )22!f ''(x0) −L −x − x0( )nn!f(n )(x0) € f (x) = f (x0) + x − x0( )f '(x0) +x − x0( )22!f ''(x0) + L +x − x0( )nn!f(n )(x0) + L f(n +1)(x) dx( )n +1x0x∫x0x∫x0x∫ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor SeriesTaylor Series € f (x) = f (x0) + x − x0( )f '(x0) +x − x0( )22!f ''(x0) + L +x − x0( )nn!f(n )(x0) + L f(n +1)(x) dx( )n +1x0x∫x0x∫x0x∫••Lagrange remainderLagrange remainder € Rn= L f(n +1)(x) dx( )n +1x0x∫x0x∫x0x∫= f(n +1)(t)x − t( )nn! dtx0x∫ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor SeriesTaylor Series••Lagrange remainderLagrange remainder€ Rn= f(n +1)(t)x − t( )nn! dtx0x∫€ g(t)h(t) dtab∫= g(ξ) h(t) dtab∫ where ξ∈ [a,b]€ Rn=f(n +1)ξ( )n +1( )!x − x0( )n +1 where ξ∈ [x0, x]••Mean-value theorem for integralsMean-value theorem for integrals••Let andLet and€ h(t) =x − t( )nn!€ g(t) = f(n +1)t( )ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor Series Example 1Taylor Series Example 1••ExampleExample••Approximate the function f(1) using TaylorApproximate the function f(1) using Taylorseries expansions around xseries expansions around x00=0=0••ZeroZerothth order expansion order expansion€ f (x) = −0.1x4− 0.15x3− 0.5x2− 0.25x + 1.2€ f (x) = 1.2ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor Series Example 1Taylor Series Example 1••First order expansionFirst order expansion••Second order expansionSecond order expansion••Third order expansionThird order expansion••Fourth order expasnsionFourth order expasnsion€ f (x) = 1.2 − 0.25x ⇒ f (1) = 0.95€ f (x) = 1.2 − 0.25x − 0.5x2⇒ f (1) = 0.45€ f (x) = 1.2 − 0.25x − 0.5x2− 0.15x3− 0.1x4⇒ f (1) = 0.2€ f (x) = 1.2 − 0.25x − 0.5x2− 0.15x3⇒ f (1) = 0.3ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor Series Example 1Taylor Series Example 1From Numerical Methods for Engineers, Chapra and Canale, Copyright © The McGraw-Hill Companies, Inc.ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer EngineeringUniversity of ConnecticutTaylor Series Example 2Taylor Series Example 2••ExampleExample••Series Expansion with xSeries Expansion with x00=0=0€ f (x) =11− x € f (x) = f (0) + f '(0) ⋅ x + f ''(0) ⋅x22!+ L + f(n )(0) ⋅xnn!+ L € f (x) =11− x, f '(x) = 1− x( )−2, f ''(x) = 2 1− x( )−3,Kf(n )(x) = n! 1− x( )−(n +1)=n!1− x( )n +1f(n )(0) = n!ECE 257 Numerical Methods and Scientific ComputingFall 2004Lecture 5John A. ChandyDept. of Electrical and Computer


View Full Document

UConn ECE 257 - Lecture notes

Download Lecture notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?