Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > University Math Help > Calculus
Reply
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2008, 07:51 AM
Newbie
 
Join Date: Sep 2008
Posts: 7
Country:
Thanks: 3
Thanked 2 Times in 2 Posts
Hamm is on a distinguished road
Default Matlab 2nd order methods

This is the question I have

Let f(x) be a given function which can be evaluated at any point. In the following question, h refers to the step size or the distance between the equally spaced points used in the approximation.
Find a 2nd order method (i.e., truncation error O(h2)) approximating
f′′′(x0).
Give the formula as well as an expression for the truncation error. Hint: You may want to consider the Taylor expansions of f(x0 ±h) then f(x0 ±2h). It is easier to consider each of these cases separately, then combine the results.

I'm just looking for a start or some sort of M-file to get me going on the rest of the stuff. I know the taylor expansions for f(x+h),f(x-h),f(x+2h),f(x-2h) but im not sure how to comebine them to make this work. I know I have to get this and then plug different h's in to see the difference in error.

Please help.

Thank you very much.
Reply With Quote
Advertisement
 
  #2  
Old December 2nd, 2008, 10:13 AM
Newbie
 
Join Date: Sep 2008
Posts: 7
Country:
Thanks: 3
Thanked 2 Times in 2 Posts
Hamm is on a distinguished road
Default

I expanded the functions in the taylor and got

y(x+h) = y(x) + hy'(x) + h^2/2*y"(x) + h^3/6y"'(x) + h^4/12*O(h^4)

y(x+h) = y(x) - hy'(x) + h^2/2*y"(x) - h^3/6y"'(x) + h^4/12*O(h^4)

y(x+2h) = y(x) + 2hy'(x) + h^2*y"(x) + h^3/3y"'(x) + h^4/6*O(h^4)

y(x+2h) = y(x) - 2hy'(x) + h^2*y"(x) - h^3/3y"'(x) + h^4/6*O(h^4)

im not sure if i went too far or what. please help
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 08:03 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.