This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Taylor0 = fxi0*ones(npts,1) Taylor1 = Taylor0+f1xi0*dx Taylor2 = Taylor1+(f2xi0/factorial(2))*dx.^2 Taylor3 = Taylor2+(f3xi0/factorial(3))*dx.^3 Taylor4 = Taylor3+(f4xi0/factorial(4))*dx.^4 Taylor5 = Taylor4+(f5xi0/factorial(5))*dx.^5 % Note that these Taylor series are basically polynomial approximations % to the original function. % Question: The original function went up to x^4. Theoretically, what is % the highest derivative that we need in the Taylor series to match the % original function EXACTLY at any new point x(i+1)? hold on plot(x,Taylor0,'ro-') pause plot(x,Taylor1,'gro-') pause plot(x,Taylor2,'bo-') pause plot(x,Taylor3,'co-') pause plot(x,Taylor4,'mo-') Sheet1 Page 2 pause plot(x,Taylor5,'yo-')...
View Full Document
This note was uploaded on 09/05/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.
- Spring '09