TAYLOR S POLYNOMIAL APPROXIMATION FOR FUNCTIONS

Similar documents
xn+1 = anxn + bnxn-1 THE NUMEROV ALGORITHM FOR SATELLITE ORBITS x 4 x(t) MISN by Peter Signell

HARMONIC OSCILLATOR I

Classical Mechanics MATRICES AND TRANSFORMATIONS MISN by C. P. Frahm. 1. Introduction Procedures... 1 Acknowledgments...

ENERGY GRAPHS, MOTION, TURNING POINTS

Electricity and Magnetism

Solid State Physics LATTICE DEFECTS MISN LATTICE DEFECTS by K. Jesse

GRAVITATIONAL POTENTIAL ENERGY

ORDINARY AND SUPER-BALL BOUNCES

mean value WAVE FUNCTIONS, PROBABILITY, AND MEAN VALUES MISN by P. Signell 1. Definition of Uncertainty... 1

Electricity and Magnetism

A CHARGED PARTICLE TRAJECTORY IN A MAGNETIC FIELD: CYCLOTRON ORBITS (A COMPUTER PROJECT) MISN-0-127

BREWSTER S LAW AND POLARIZATION

Classical Mechanics NEWTONIAN SYSTEM OF PARTICLES MISN NEWTONIAN SYSTEM OF PARTICLES by C. P. Frahm

THE HELIUM ATOM: AN INTUITIVE APPROACH

AN INTERFERENCE PROJECT

INTRODUCTION TO FLUID STATICS AND DYNAMICS

CONSERVATION LAWS FOR ELEMENTARY PARTICLE REACTIONS

DAMPED MECHANICAL OSCILLATIONS

TRANSLATIONAL & ROTATIONAL MOTION OF A RIGID BODY

EXPONENTIAL DECAY: OBSERVATION, DERIVATION

ELECTROSTATIC POTENTIAL FROM DISTRIBUTED CHARGES

FUNDAMENTAL FORCES: RANGES, INTERACTION TIMES, CROSS SECTIONS MISN by J. S. Kovacs and William C. Lane

CONTINUOUS SPECTRA: PLANCK S LAW

FUNDAMENTAL FORCES AND ELEMENTARY PARTICLE CLASSIFICATION. electron's neutrino. muon MISN-0-255

Classical Mechanics NEWTONIAN MECHANICS - SINGLE PARTICLE MISN by C. P. Frahm. 1. Introduction Procedures... 2 Acknowledgments...

ORBITS IN AN INVERSE-SQUARE-LAW FORCE FIELD: A COMPUTER PROJECT MISN A COMPUTER PROJECT by Peter Signell

RELATIVE LINEAR MOTION, FRAMES OF REFERENCE

ANALYSIS OF BUBBLE CHAMBER PHOTOGRAPHS

ENERGY AND MOMENTUM IN ELECTROMAGNETIC WAVES

THE AMPERE-MAXWELL EQUATION; DISPLACEMENT CURRENT

AN INTRODUCTION TO NUMERICAL METHODS USING MATHCAD. Mathcad Release 14. Khyruddin Akbar Ansari, Ph.D., P.E.

Optimization of Geometries by Energy Minimization

AN INTRODUCTION TO NUMERICAL METHODS USING MATHCAD. Mathcad Release 13. Khyruddin Akbar Ansari, Ph.D., P.E.

Final Exam Study Guide and Practice Problems Solutions

Computing Derivatives J. Douglas Child, Ph.D. Rollins College Winter Park, FL

You should also review L Hôpital s Rule, section 3.6; follow the homework link above for exercises.

Construction of the Electronic Radial Wave Functions and Probability Distributions of Hydrogen-like Systems

Math 1B, lecture 8: Integration by parts

3.7 Implicit Differentiation -- A Brief Introduction -- Student Notes

2Algebraic ONLINE PAGE PROOFS. foundations

The derivative of a function f(x) is another function, defined in terms of a limiting expression: f(x + δx) f(x)

Solutions to Practice Problems Tuesday, October 28, 2008

Math Skills. Fractions

Integration Review. May 11, 2013

MATH , 06 Differential Equations Section 03: MWF 1:00pm-1:50pm McLaury 306 Section 06: MWF 3:00pm-3:50pm EEP 208

Review of Differentiation and Integration for Ordinary Differential Equations

Unit #6 - Families of Functions, Taylor Polynomials, l Hopital s Rule

SYDE 112, LECTURE 1: Review & Antidifferentiation

Vectors in two dimensions

Analytic Scaling Formulas for Crossed Laser Acceleration in Vacuum

Module FP2. Further Pure 2. Cambridge University Press Further Pure 2 and 3 Hugh Neill and Douglas Quadling Excerpt More information

Lectures - Week 10 Introduction to Ordinary Differential Equations (ODES) First Order Linear ODEs

The Principle of Least Action

Differentiation ( , 9.5)

Rules of Differentiation

Antiderivatives. Definition (Antiderivative) If F (x) = f (x) we call F an antiderivative of f. Alan H. SteinUniversity of Connecticut

Thermal conductivity of graded composites: Numerical simulations and an effective medium approximation

Calculus Class Notes for the Combined Calculus and Physics Course Semester I

The Exact Form and General Integrating Factors

JUST THE MATHS UNIT NUMBER DIFFERENTIATION 2 (Rates of change) A.J.Hobson

Define each term or concept.

d dx But have you ever seen a derivation of these results? We ll prove the first result below. cos h 1

Diophantine Approximations: Examining the Farey Process and its Method on Producing Best Approximations

Differentiability, Computing Derivatives, Trig Review. Goals:

AP Calculus. Derivatives and Their Applications. Presenter Notes

State-Space Model for a Multi-Machine System

Implicit Differentiation

Calculus and optimization

POTENTIAL ENERGY, CONSERVATION OF ENERGY

Math 1720 Final Exam Review 1

1 dx. where is a large constant, i.e., 1, (7.6) and Px is of the order of unity. Indeed, if px is given by (7.5), the inequality (7.

Fall 2016: Calculus I Final

TWO-DIMENSIONAL MOTION

Section 7.1: Integration by Parts

Lagrangian and Hamiltonian Mechanics

RESOLUTION AND DIFFRACTION

By writing (1) as y (x 5 1). (x 5 1), we can find the derivative using the Product Rule: y (x 5 1) 2. we know this from (2)

A Sketch of Menshikov s Theorem

Summary: Differentiation

Differentiability, Computing Derivatives, Trig Review

inflow outflow Part I. Regular tasks for MAE598/494 Task 1

A. Incorrect! The letter t does not appear in the expression of the given integral

APPROXIMATE SOLUTION FOR TRANSIENT HEAT TRANSFER IN STATIC TURBULENT HE II. B. Baudouy. CEA/Saclay, DSM/DAPNIA/STCM Gif-sur-Yvette Cedex, France

Students need encouragement. So if a student gets an answer right, tell them it was a lucky guess. That way, they develop a good, lucky feeling.

Schrödinger s equation.

Quantum Mechanics in Three Dimensions

Math Notes on differentials, the Chain Rule, gradients, directional derivative, and normal vectors

Computing Exact Confidence Coefficients of Simultaneous Confidence Intervals for Multinomial Proportions and their Functions

arxiv:physics/ v2 [physics.ed-ph] 23 Sep 2003

1 The Derivative of ln(x)

Planar sheath and presheath

Math 115 Section 018 Course Note

Chapter Primer on Differentiation

Exam 3 Review. Lesson 19: Concavity, Inflection Points, and the Second Derivative Test. Lesson 20: Absolute Extrema on an Interval

THE CAVENDISH EXPERIMENT

SECTION 3.2 THE PRODUCT AND QUOTIENT RULES 1 8 3

Topic 2.3: The Geometry of Derivatives of Vector Functions

Calculus in the AP Physics C Course The Derivative

Lecture 10 Notes, Electromagnetic Theory II Dr. Christopher S. Baird, faculty.uml.edu/cbaird University of Massachusetts Lowell

18 EVEN MORE CALCULUS

Transcription:

MISN-0-4 TAYLOR S POLYNOMIAL APPROXIMATION FOR FUNCTIONS f(x ± ) = f(x) ± f ' (x) + f '' (x) 2 ±... 1! 2! = 1.000 ± 0.100 + 0.005 ±... TAYLOR S POLYNOMIAL APPROXIMATION FOR FUNCTIONS by Peter Signell 1. Introuction a. Simplifying a Complicate Function..................... 1 b. The Goal of This Moule................................1 2. The Expansion of a Function a. The Taylor Series Metho............................... 1 b. Truncating the Series....................................2 c. Example of a Taylor Series Expansion................... 2. Convergence of the Series................................2 e. Always Check For Convergence.......................... 3 3. Approximations for Derivatives a. Rewriting the Expansion................................ 3 b. A Finite Difference Approximation for f (x)............. 3 c. Approximations for Higher Derivatives...................4. A Hany Check of Formal Derivatives................... 4 e. A Calculator Caution....................................4 Acknowlegments............................................4 Project PHYSNET Physics Blg. Michigan State University East Lansing, MI 1

ID Sheet: MISN-0-4 Title: Taylor s Polynomial Approximation for Functions Author: P. Signell, Dept. of Physics, Mich. State Univ Version: 4/16/2002 Evaluation: Stage 0 Length: 1 hr; 16 pages Input Skills: 1. Formally ifferentiate polynomial, transcenental, an exponential functions (MISN-0-1). Output Skills (Knowlege): K1. Use the Taylor Series to erive the formal expressions for the finite ifference approximations to the first an secon erivatives. Output Skills (Rule Application): R1. Use the Taylor Series to expan any given common function in a power series about any given point. R2. Evaluate the first an secon erivatives of any given function by numerical techniques. Post-Options: 1. Relativistic Energy: Threshols for Particle Reactions, Bining Energies (MISN-0-23). 2. Small Oscillation Techniques (MISN-0-28). 3. Numerov Computer Algorithm for the Dampe Oscillator (MISN-0-39). 4. Numerov Computer Algorithm in Two Dimensions for Satellite Orbits (MISN-0-104). 5. The Runge-Kutta Computer Algorithm in Two Dimensions for Trajectories in Magnetic Fiels (MISN-0-128). THIS IS A DEVELOPMENTAL-STAGE PUBLICATION OF PROJECT PHYSNET The goal of our project is to assist a network of eucators an scientists in transferring physics from one person to another. We support manuscript processing an istribution, along with communication an information systems. We also work with employers to ientify basic scientific skills as well as physics topics that are neee in science an technology. A number of our publications are aime at assisting users in acquiring such skills. Our publications are esigne: (i) to be upate quickly in response to fiel tests an new scientific evelopments; (ii) to be use in both classroom an professional settings; (iii) to show the prerequisite epenencies existing among the various chunks of physics knowlege an skill, as a guie both to mental organization an to use of the materials; an (iv) to be aapte quickly to specific user nees ranging from single-skill instruction to complete custom textbooks. New authors, reviewers an fiel testers are welcome. PROJECT STAFF Anrew Schnepp Eugene Kales Peter Signell Webmaster Graphics Project Director ADVISORY COMMITTEE D. Alan Bromley Yale University E. Leonar Jossem The Ohio State University A. A. Strassenburg S. U. N. Y., Stony Brook Views expresse in a moule are those of the moule author(s) an are not necessarily those of other project participants. c 2002, Peter Signell for Project PHYSNET, Physics-Astronomy Blg., Mich. State Univ., E. Lansing, MI 48824; (517) 355-3784. For our liberal use policies see: http://www.physnet.org/home/moules/license.html. 3 4

MISN-0-4 1 TAYLOR S POLYNOMIAL APPROXIMATION FOR FUNCTIONS by Peter Signell 1. Introuction 1a. Simplifying a Complicate Function. We frequently encounter some complicate mathematical function, f(x), which is vali over a wie range of x, in a situation where we woul prefer a simpler polynomial even if it were a goo approximation only over a limite region. For example, the force holing two atoms together in a iatomic molecule is an exceeingly complicate function of the interatomic istance. If we attempt to use this function irectly, we fin it almost impossible to calculate the vibrational motions of the atoms. Even if we succee through the use of heroic computer calculations, we get little insight. However, if we replace the complicate function by a simple best-match polynomial, the approximate atomic motions can be easily obtaine. Such approximate solutions are very important in applie mechanics an in molecular chemistry an physics. In this moule we show you how to obtain the best-match polynomial for any given (complicate) function. 1b. The Goal of This Moule. Technically, this moule explains how to make a power series expansion of a function using the Taylor series metho, an how to check the valiity of the expansion. No attempt is mae to give the mathematical basis for the metho. The moule also uses such expansions to erive hany approximations for the erivatives of a function. 2. The Expansion of a Function 2a. The Taylor Series Metho. Suppose we have a complicate function f(x) an that we know or can fin its value an the value of each of its erivatives at some point x 0. We can put that value an those erivatives into the Taylor Series an use it to evaluate f(x) at any other point x that is in neighborhoo of x 0 : MISN-0-4 2 The complete efinition of the Taylor Series is: f(x) = n= n=0 f (n) (x 0 ) (x x 0 ) n, (2) n! where f (n) (x 0 ) is the n th erivative of f(x), evaluate at x 0. The quantity n! is the factorial (n! = 1 2 3 (n 1) n). 2b. Truncating the Series. The Taylor series is an infinite series, but if x is near to x 0, the series can usually be truncate (cut-off) after a few terms an this leaves a simple polynomial. 2c. Example of a Taylor Series Expansion. Here is a specific example: Suppose you wish to have a power series expansion of f(x) = sin x about the point x 0 = 0, where x is in raians. To make the power series we evaluate the terms of the Taylor Series: f(x) = + sin x = f(0) = 0 f (x) = + cos x = f (0) = 1 f (x) = sin x = f (0) = 0 f (x) = cos x = f (0) = 1 f (x) = + sin x = f (0) = 0 Putting these an further erivatives into Eq. (1) gives us the power series: (3) sin x = x x3 6 + x5 120... (4) For cases where x is much smaller than 1, x 3 is much smaller than x an hence x 5 is much much smaller than x. Then we can truncate the series after the first term: sin x x (x 2 1). (5) 2. Convergence of the Series. How rapily oes the series approach the correct answer? Technically, this question is phrase: How rapily oes the series converge? As an example, suppose x = π/6 = 30 so that sin x = 0.500. Then various truncations of the series for the expansion of sin x about the origin gives: f(x) = f(x 0 ) + f (x 0 ) 1! (x x 0 ) + f (x 0 ) (x x 0 ) 2 +... (1) 2! 5 6

MISN-0-4 3 TERMS APPROXIMATION SUM ERROR % ERROR 1 x 0.523599 +0.023599 +5 2 x x 3 /6 0.499674 0.000326 0.07 3 x x 3 /6 + x 5 /120 0.500002 +0.000002 +0.0004 Since the series rapily approaches the exact answer, it is sai to converge rapily for x = π/6. 2e. Always Check For Convergence. A check for convergence shoul always be mae: the range of for which the series converges may be unexpectely small. 1 The usual metho of checking is to calculate the next term or two an see whether the aitional contribution to the sum is or is not significant at the esire level of accuracy. 3. Approximations for Derivatives 3a. Rewriting the Expansion. In orer to work with finite ifference equations we usually write Taylor s series in an especially convenient notation. First we substitute x = x 0 + into Eq. (1): f(x 0 + ) = f(x 0 ) + f (x 0 ) 1! + f (x 0 ) 2 +... (6) 2! A similar expression is written with x = x 0. The subscript on x 0 is then roppe an the two equations are written as one: f(x ± ) = f(x) ± f (x) 1! + f (x) 2! 2 ± f (x) 3 +... (7) 3! We say f at x plus or minus elta equals f at x plus or minus f prime at x over one factorial times elta plus... 3b. A Finite Difference Approximation for f (x). An approximation for f (x) can be obtaine by subtracting f(x ) from f(x + ): f(x + ) f(x ) = 2 f (x) 1! + 2 f (x) 3 +... (8) 3! 1 This woul be ue to a nearby singularity in the complex plane. See Some Simple Functions in the Complex Plane (MISN-0-59) for some highly visual examples. MISN-0-4 4 For small, the 3, 5, etc. terms will be much smaller than the term. Truncating an solving for f (x) gives: 2 f (x) f(x + ) f(x ) 2. (9) 3c. Approximations for Higher Derivatives. An approximation for f (x) can be obtaine by aing f(x + ) to f(x ). Truncating an solving for f (x) gives: f (x) f(x + ) 2f(x) + f(x ) 2. (10) Approximations for higher erivatives can be evelope by similar techniques. You might wish to verify that: Help: [S-1] f (x) f(x + 2 ) 2f(x + ) + 2f(x ) f(x 2 ) 2 3 (11) 3. A Hany Check of Formal Derivatives. Equations (9), (10), an (11) offer a quick calculator metho for checking your work when formally ifferentiating complicate functions. Merely choose some convenient point x an a small value for an use them to evaluate the finite ifference erivative. Then evaluate your formal erivative at the same point x an compare the two answers. 3e. A Calculator Caution. Truncation an rouning errors may lea to incorrect results if is too small. For example, in Eq. (9) the numerator is small through almost exact cancellation of its two terms. If is too small, the terms will be the same to as many significant igits as the calculator carries. The net result for the numerator is then zero! A slightly larger will result in a non-zero numerator but one with little accuracy. Watch out for this effect whenever using the finite ifference equations. Acknowlegments Preparation of this moule was supporte in part by the National Science Founation, Division of Science Eucation Development an Re- 2 Note the similarity of this approximate result to the precise efinition of the erivative: f (x) = lim x 0 f(x + x) f(x). x 7 8

MISN-0-4 5 MISN-0-4 PS-1 search, through Grant #SED 74-20088 to Michigan State University.Ray G. Van Ausal mae valuable eitorial contributions. PROBLEM SUPPLEMENT Note: There is a Table of Derivatives in the Moel Exam. Problems 9 an 10 (below) also occur in the Moel Exam. 1. Obtain the power series expansion of cos x about the point x = 0, obtaining at least the first three terms. [C] 2. Do the same as in problem 1, but for the function e x. [B] 3. Obtain the power series expansion for ln x about the point x = 1. Note that you must go back to the full Taylor Series, an you must evaluate the erivatives of ln x at x = 1. When you have finishe, ask yourself why we chose x = 1 for this expansion rather than, say, x = 0. [D] 4. Obtain the power series expansion of (x 2 +4) 1 about the point x = 0. Show, by numerical evaluation of the first few terms, that the series converges rapily for x = 1, oes not converge for x = 2, an iverges (goes away from the exact value as more terms are ae) for x = 3. [A] 5. Differentiate the power series expansion of e x an see that all the erivatives of e x are equal to itself. 6. If z = x + iy, the exponential function of z is efine by its power series: e z = 1 + z + z2 2! + z3 3! +... By substituting z = iy, show that e iy = cos y + i sin y. 7. By substituting the first two terms of the power series for sin x into the first three terms of the power series for (1 x 2 ) 1/2, etermine the first three terms of the power series for cos x. 8. Given f(x) = (x 2 + 4) 1, fin f (1) an f (1): a. by formal ifferentiation Help: [S-2] b. by numerical ifferentiation (using finite ifference approximations). [E] Help: [S-3] 9 10

MISN-0-4 PS-2 MISN-0-4 AS-1 9. Determine the first three terms of the power series expansion, about the origin, of the function: f(x) = (1 + x 2 ) 1/2. [F] 10. Use numerical ifferentiation to etermine f (x) at x = 0.5 where: Brief Answers: f(x) = (x 2 8x + 25) 1. [G] A. (x 2 + 4) 1 = 1/4 [ 1 (x/2) 2 + (x/2) 4 (x/2) 6 +... ] B. e x = 1+x+x 2 /2!+x 3 /3!+x 4 /4!+... (see moule s cover for x = 0.1) C. cos x = 1 x 2 /2! + x 4 /4! x 6 /6! +... D. ln x = (x 1) (x 1) 2 /2 + (x 1) 3 /3... E. f (1) = 0.0800 f (1) = 0.0160 F. (1 + x 2 ) 1/2 = 1 1 2 x2 + 3 8 x4 5 16 x6 +... G. f (0.5) =.00578 SPECIAL ASSISTANCE SUPPLEMENT S-1 (from TX-3c) Evaluate Eq.(4) with one more term, so you inclue f, substituting these values successively for : (2,,, an 2 ). This gives you four equations that you can properly substitute into the right sie numerator of Eq. (9). You shoul fin the terms up through the secon erivative canceling an just the proper quantity remaining. S-2 (from PS, problem 8a) f (x) = 2x(x 2 + 4) 2 hence f (1) = 2/25. S-3 (from PS, problem 8b) Stuents have aske: What are x an when x = 1? Answer: if x = 1 an, say, = 0.01, then in equations such as Eq. (7): x + = 1.01 an x = 0.99. You have to evaluate some particular problem s f(x) at some such values of x. The smaller the value of you use, the better your numerical approximation to the true value of f (1), but see Sect. 3e in the text. 11 12

MISN-0-4 ME-1 MODEL EXAM 1. See Output Skill K1 in this moule s ID Sheet. 2. Determine the first three terms of the power series expansion, about the origin, of the function: f(x) = (1 + x 2 ) 1/2. 3. Use numerical ifferentiation to etermine f (x) at x = 0.5 where: f(x) = (x 2 8x + 25) 1. Table of Derivatives Combinations of Functions f(u) (f(u)) = u u f (f ± g) = ± g g (fg) = f + g f (f/g) = ( g f f g ) /g 2 Specific Functions (xn ) = nx n 1 (ex ) = e x (ln x) = 1/x (sin x) = cos x (cos x) = sin x Brief Answers: 1. See this moule s text. 2. See this moule s Problem Supplement, problem 9. 3. See this moule s Problem Supplement, problem 10. 13 14

15 16