You are on page 1of 2

Taylor Series Example Function: f ( x) := sin ( 2 x) + x Derivative (slope): dfdx ( x) := 2 cos ( 2 x) + 2 x Function approximation relative to a known point: xi := 2 xih

:= xi + h h := 0.5 xih = 2.5 fih = 4.59 f ( xih) = 5.291 fi := f ( xi) fi = 3.243


2

fih := fi + dfdx ( xi) h Error in approximation: Et := f ( xih) fih Illustration of results: tangent line: Et = 0.702

t ( x) := dfdx ( xi) ( x xi) + fi := 1 xt := xi , xi .. xi + x := 0 , 0.01 .. 3

10 8 f ( x) t ( xt) 6 4 2 0

right click on graph and select Trace to look at values

1.5

2 x , xt

2.5

Remainder calculation: df2dx2 ( x) := 4 sin ( 2 x) + 2 := xi Given Et = initial guess df2dx2 ( ) 2 h 2 = 2.134 Note - could solve for directly instead second derivative

:= Find ( )

R1 :=

df2dx2 ( ) 2 h 2

R1 = 0.702

You might also like