Taylor Polynomials. 2 x2 6 x3 24 x4

Σχετικά έγγραφα
CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Section 8.3 Trigonometric Equations

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Homework 3 Solutions

derivation of the Laplacian from rectangular to spherical coordinates

2 Composition. Invertible Mappings

Section 7.6 Double and Half Angle Formulas

EE512: Error Control Coding

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Matrices and Determinants

Section 9.2 Polar Equations and Graphs

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

Areas and Lengths in Polar Coordinates

Areas and Lengths in Polar Coordinates

Solutions to Exercise Sheet 5

Finite Field Problems: Solutions

Srednicki Chapter 55

C.S. 430 Assignment 6, Sample Solutions

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Second Order Partial Differential Equations

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

CRASH COURSE IN PRECALCULUS

Approximation of distance between locations on earth given by latitude and longitude

ST5224: Advanced Statistical Theory II

4.6 Autoregressive Moving Average Model ARMA(1,1)

Inverse trigonometric functions & General Solution of Trigonometric Equations

Notes on the Open Economy

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

Statistical Inference I Locally most powerful tests

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

CHAPTER 101 FOURIER SERIES FOR PERIODIC FUNCTIONS OF PERIOD

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

6.3 Forecasting ARMA processes

Partial Differential Equations in Biology The boundary element method. March 26, 2013

( y) Partial Differential Equations

Example Sheet 3 Solutions

Concrete Mathematics Exercises from 30 September 2016

Right Rear Door. Let's now finish the door hinge saga with the right rear door

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Exercises to Statistics of Material Fatigue No. 5

10.7 Performance of Second-Order System (Unit Step Response)

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

Math221: HW# 1 solutions

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

PARTIAL NOTES for 6.1 Trigonometric Identities

Numerical Analysis FMN011

Pg The perimeter is P = 3x The area of a triangle is. where b is the base, h is the height. In our case b = x, then the area is

Similarly, we may define hyperbolic functions cosh α and sinh α from the unit hyperbola

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Capacitors - Capacitance, Charge and Potential Difference

1. For each of the following power series, find the interval of convergence and the radius of convergence:

Math 6 SL Probability Distributions Practice Test Mark Scheme

Finite difference method for 2-D heat equation

The Simply Typed Lambda Calculus

the total number of electrons passing through the lamp.

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Assalamu `alaikum wr. wb.

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

D Alembert s Solution to the Wave Equation

Problem Set 3: Solutions

Μηχανική Μάθηση Hypothesis Testing

Εγκατάσταση λογισμικού και αναβάθμιση συσκευής Device software installation and software upgrade

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

( ) 2 and compare to M.

LESSON 14 (ΜΑΘΗΜΑ ΔΕΚΑΤΕΣΣΕΡΑ) REF : 202/057/34-ADV. 18 February 2014

5.4 The Poisson Distribution.

Variational Wavefunction for the Helium Atom

MATH423 String Theory Solutions 4. = 0 τ = f(s). (1) dτ ds = dxµ dτ f (s) (2) dτ 2 [f (s)] 2 + dxµ. dτ f (s) (3)

Εγχειρίδια Μαθηµατικών και Χταποδάκι στα Κάρβουνα

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

Potential Dividers. 46 minutes. 46 marks. Page 1 of 11

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

Solution Series 9. i=1 x i and i=1 x i.

Homework 8 Model Solution Section

Solution to Review Problems for Midterm III

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

Chapter 2 * * * * * * * Introduction to Verbs * * * * * * *

Parametrized Surfaces

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

An Inventory of Continuous Distributions

Forced Pendulum Numerical approach

Q1a. HeavisideTheta x. Plot f, x, Pi, Pi. Simplify, n Integers

Arithmetical applications of lagrangian interpolation. Tanguy Rivoal. Institut Fourier CNRS and Université de Grenoble 1

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

Trigonometry 1.TRIGONOMETRIC RATIOS

Fractional Colorings and Zykov Products of graphs

Section 8.2 Graphs of Polar Equations

Modbus basic setup notes for IO-Link AL1xxx Master Block

Tridiagonal matrices. Gérard MEURANT. October, 2008

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

Lecture 2. Soundness and completeness of propositional logic

Transcript:

> Taylor Polynomials > Taylor Polynomials about x = 0. A primary use of Taylor polynomials is to find good polynomial approximations to a function near a specified value. As a first example, we use a fourth degree Taylor polynomial to approximate f( x ) = e x near x = 0. We begin by entering our function as a Maple expression. > restart;with(plots); Warning, the name changecoords has been redefined [ animate, animate3d, animatecurve, changecoords, complexplot, complexplot3d, conformal, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, display3d, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, odeplot, pareto, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, replot, rootlocus, semilogplot, setoptions, setoptions3d, spacecurve, sparsematrixplot, sphereplot, surfdata, textplot, textplot3d, tubeplot ] > f:=exp(x); f := e x We first use the comand taylor to form the Taylor series, which we will discuss later, for the function. The first parameter is the function expression, the second, assuming x is our variable, is "x =" the number we want to approximate near, and the third is an integer one higher than the degree of the Taylor polynomial we desire. We desire degree 4 here, so use 5. > T4:=taylor(f,x=0,5); T4 := + x + + + + 2 x2 6 x3 24 x4 O( x 5 ) This is the Taylor polynomial of degree 4 with a remainder term O( x 5 ). This remainder term is pronounced as "big Oh of x 5." To get the Taylor polynomial as an expression from the Taylor series, we must convert the series T4 to a polynomial using convert. > P4:=convert(T4,polynom); P4 := + x + + + 2 x2 6 x3 24 x4 Now let's plot both the function (red) with the Taylor polynomial (blue). > plot0:=plot(f,x=-2..3,color=red): > plot:=plot(p4,x=-2..3,color=blue):

We see that the graphs are basically the same for x between - and, but start to differ to the left and right of this interval. Let's check a couple of values for x. We work out from 0, checking the difference at.5,, and.5. > evalf(subs(x=.5,f-p4));.00028377 > evalf(subs(x=,f-p4));.009948495 > evalf(subs(x=.5,f-p4));.08325570 Note that the approximations are quite good near 0, but lose accuracy as one moves away from 0. We see the same effect as we move to the left. > evalf(subs(x=-.5,f-p4)); -.000240737 > evalf(subs(x=-,f-p4)); -.007205588 > evalf(subs(x=-.5,f-p4)); -.0503073399 Now let's look at a larger window. > plot0:=plot(f,x=-0..0,color=red): > plot:=plot(p4,x=-0..0,color=blue):

We now see considerable difference between the two graphs away from 0, In fact they differ by more than 20,000 at x = 0. > Suppose f has n derivatives at 0. Then the Taylor polynomial of degree n about x = 0 for f is n P n (x) = k! fk (0) x k. k = 0 This polynomial has the same value as the function at 0, and it's first n derivatives have the same value at 0 as do the corresponding derivatives of the function. Let's examine Taylor polynomials further by using the function f( x ) = ln ( x +. ) > f:=ln(x+); f := ln ( x + ) For this (and any) function, the Taylor polynomial of degree 0 is the constant polynomial that has the same value as f at 0. > T0:=taylor(f,x = 0,); > p0 := convert(t0,polynom); T0 := O( x ) p0 := 0 We plot the function (in red) along with the Taylor polynomial (in blue). > plot0:=plot(f,x=-..4,color=red): > plot:=plot(p0,x=-..4,color=blue,thickness=3):

Note that the approximation is not very good except very near x =. Let's see what happens as we move up a degree to a first order Taylor polynomial. > T:=taylor(f,x = 0,2); > p := convert(t,polynom); T := x + O( x 2 ) p := x This is also the linear approximation to f at x = 0. In the plot below, we see that this linear approximation, which also has the same derivative as f at x = 0, is better than the constant approximation. > plot0:=plot(f,x=-..4,color=red): > plot:=plot(p,x=-..4,color=blue):

When we advance to the second degree Taylor Polynomial, where the function and the polynomial have the same second derivative at 0, our quadratic approximation gets even better since the polynomial has the same concavity as the function near 0. > T2:= taylor(f,x = 0,3); > p2:=simplify(convert(t2,polynom)); T2 := x + 2 x2 O( x 3 ) p2 := x > plot0:=plot(f,x=-..4,color=red): > plot:=plot(p2,x=-..4,color=blue): 2 x2

Notice that we have very good agreement from -.2 to.6. Let's go the the third degree Taylor polynomial. > T3:= taylor(f,x = 0,4); > p3:=simplify(convert(t3,polynom)); T3 := x + + 2 x2 3 x3 O( x 4 ) p3 := x + 2 x2 3 x3 > plot0:=plot(f,x=-..4,color=red): > plot:=plot(p3,x=-..4,color=blue):

Now we have good agreement from -.6 to.8. We check degree 4. > T4:= taylor(f,x = 0,5); > p4:=simplify(convert(t4,polynom)); T4 := x + + 2 x2 3 x3 4 x4 O( x 5 ) p4 := x + 2 x2 3 x3 4 x4 > plot0:=plot(f,x=-..4,y=-4..4,color=red): > plot:=plot(p4,x=-..4,y=-4..4,color=blue):

This looks good from -.7 to.9. For the fifth degree: > T5:= taylor(f,x = 0,6); > p5:=simplify(convert(t5,polynom)); T5 := x + + + 2 x2 3 x3 4 x4 5 x5 O( x 6 ) p5 := x + + 2 x2 3 x3 4 x4 5 x5 > plot0:=plot(f,x=-..4,y=-4..4,color=red): > plot:=plot(p5,x=-..4,y=-4..4,color=blue):

Now we get good approximations from -.7 to. For degree six: > T6:= taylor(f,x = 0,7); > p6:=simplify(convert(t6,polynom)); T6 := x + + + 2 x2 3 x3 4 x4 5 x5 6 x6 O( x 7 ) p6 := x + + 2 x2 3 x3 4 x4 5 x5 6 x6 > plot0:=plot(f,x=-..4,y=-4..4,color=red): > plot:=plot(p6,x=-..4,y=-4..4,color=blue):

This looks good from -.8 to.9. Now let's jump to degree 200: > T200:= taylor(f,x = 0,20): > p200:=simplify(convert(t200,polynom)): > plot0:=plot(f,x=-..4,y=-4..4,color=red): > plot:=plot(p200,x=-..4,y=-4..4,color=blue):

With the following spreadsheet, we get a second view how well various Taylor polynomials approximate our function near 0. > for i from to 3 do > T[0^i]:= taylor(f,x = 0,0^i+): > p[0^i]:=simplify(convert(t[0^i],polynom)): > od:

A x B ln ( x + ) C P 4 ( x) D P 0 ( x) E P 00 ( x ) F P 000 ( x ) 2 -.5 -.69347806-.682296667-.6930648562-.69347808-.69347808 3 -.4 -.508256238-.5077333333-.50895900-.508256235-.508256235 4 -.3 -.3566749439-.3560250000-.356674727-.356674944-.356674944 5 -.2 -.22343553-.2230666667-.22343549-.22343554-.22343554 6 -. -.05360557-.053583333-.05360557-.05360556-.05360556 7..09530798.0953083333.09530798.09530798.09530798 8.2.82325568.822666667.82325553.82325570.82325570 9.3.2623642645.269750000.26236438.2623642645.2623642645 0.4.3364722366.3349333333.3364694450.3364722365.3364722365.5.40546508.40046667.4054346478.405465080.405465080 2.6.4700036292.4596000000.4697906479.4700036295.4700036295 3.7.53062825.5093083333.5295320470.530628250.530628250 4.8.5877866649.5482666667.5832754570.5877866646.5877866646 5.9.648538862.5739750000.62698044.64853762.648538863 6.69347806.5833333333.6456349206.68872793.6926474306 7 8 9 20 2 22 23 24 25 26 27 28 29 30 3 32 33 34

> Taylor Polynomials about x = a. > Now we look at the Taylor polynomial of degree n about x = a for a function f. This is given by n P n (x) = k! fk (a) ( x a) k. k = 0 This polynomial has the same value as the function at a, and it's first n derivatives have the same value at a as do the corresponding derivatives of the function. Let's examine these Taylor π polynomials further by using the function f( x ) = sin( x ) about x = 6. > restart:with(plots): Warning, the name changecoords has been redefined > f:=sin(x); We begin with degree 0. > T0:=taylor(f,x = Pi/6,); > p0 := convert(t0,polynom); f := sin( x) T0 := + O 2 6 π p0 := 2 We plot the function (in red) along with the Taylor polynomial (in blue). > plot0:=plot(f,x=-2*pi..2*pi,color=red): > plot:=plot(p0,x=-2*pi..2*pi,color=blue):

Degree or linear approximation. Notice the use of collect to get a polynomial in x. > T:=taylor(f,x = Pi/6,2); > p := collect(convert(t,polynom),x); T := + + 2 2 3 x 6 π O 2 6 π p := + 2 3 x 2 2 3 π > plot0:=plot(f,x=-2*pi..2*pi,color=red): > plot:=plot(p,x=-2*pi..2*pi,color=blue):

Second degree. > T2:= taylor(f,x = Pi/6,3); > p2:=collect(convert(t2,polynom),x); T2 := + + 2 2 3 2 6 π 4 6 π O x p2 := + + + 3 6 π 2 3 π 44 π2 4 x2 2 3 2 π x 2 > plot0:=plot(f,x=-2*pi..2*pi,y=-5..5,color=red): > plot:=plot(p2,x=-2*pi..2*pi,y=-5..5,color=blue):

Degree 3. > T3:= taylor(f,x = Pi/6,4); > p3:=collect(convert(t3,polynom),x); T3 := + + 2 2 3 2 6 π 4 6 π 2 3 3 6 π O 6 π p3 := 2 3 x3 + + 4 24 3 π x2 + + 2 π 2 3 44 3 π2 x + 2 2 3 π 2592 3 + π3 44 π2 > plot0:=plot(f,x=-2*pi..2*pi,y=-5..5,color=red): > plot:=plot(p3,x=-2*pi..2*pi,y=-5..5,color=blue): 4

Degree 4. > T4:= taylor(f,x = Pi/6,5); > p4:=collect(convert(t4,polynom),x); T4 := + + + 2 2 3 2 6 π 4 6 π 2 3 3 4 6 π 48 6 π O 5 6 π p4 48 x4 2 3 72 π x3 + + 4 24 3 π := + + 288 π2 x 2 + 2 π 44 3 π2 2 3 2592 π3 x 2 2 3 π 2592 3 + + + π3 44 π2 + 62208 π4 > plot0:=plot(f,x=-2*pi..2*pi,y=-5..5,color=red): > plot:=plot(p4,x=-2*pi..2*pi,y=-5..5,color=blue):

Degree 5: > T5:= taylor(f,x = Pi/6,6); > p5:=collect(convert(t5,polynom),x); T5 2 2 3 2 6 π 4 6 π 2 3 3 4 := + 6 π + 48 6 π + 240 3 5 6 π O 6 + 6 π p5 240 3 x5 48 288 3 π x4 + 2 3 864 3 := + + π2 72 π x3 + + 4 584 3 π3 24 3 π + 288 π2 x 2 + + 2 π 44 3 π2 62208 3 π4 2592 π3 2 3 x 2 2 3 π + + 866240 3 π5 44 π2 2592 3 + π3 + 62208 π4 > plot0:=plot(f,x=-2*pi..2*pi,y=-5..5,color=red): > plot:=plot(p5,x=-2*pi..2*pi,y=-5..5,color=blue):

Degree 6. > T6:= taylor(f,x = Pi/3,7); > p6:=collect(convert(t6,polynom),x); T6 2 3 2 3 π 4 3 2 3 3 π 2 3 π 48 3 4 3 π := + + + 240 5 3 π 440 3 6 3 π O 7 + 3 π p6 440 3 x6 + 240 720 3 π x5 48 3 44 π := + + 864 3 π2 x 4 + 26 π2 2 944 3 + π3 36 3 π x3 + + 4 3 648 π3 72 3 π2 2 π + 7776 3 π4 x 2 + + + 2 58320 3 π5 6 3 π 36 π2 3888 π4 324 3 π3 x 2 3 6 π + + 36 3 π2 049760 3 π6 + 324 π3 58320 π5 + 3888 3 π4 > plot0:=plot(f,x=-2*pi..2*pi,y=-5..5,color=red): > plot:=plot(p6,x=-2*pi..2*pi,y=-5..5,color=blue):

Degree 25. > T25:= taylor(f,x = Pi/6,26): > p25:=collect(convert(t25,polynom),x): > plot0:=plot(f,x=-4*pi..4*pi,y=-5..5,color=red): > plot:=plot(p25,x=-4*pi..4*pi,y=-5..5,color=blue):

> > > >