Results 1 to 2 of 2

Thread: Matlab 2nd order methods

  1. #1
    Newbie
    Joined
    Sep 2008
    Posts
    7

    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.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Sep 2008
    Posts
    7
    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
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 7
    Last Post: August 20th 2010, 04:54 PM
  2. 3rd Order NonLinear PDE in MATLAB
    Posted in the Math Software Forum
    Replies: 0
    Last Post: May 23rd 2010, 04:54 AM
  3. Numerical methods to solve higher order differential equations
    Posted in the Differential Equations Forum
    Replies: 3
    Last Post: August 18th 2009, 05:18 AM
  4. numerical methods using matlab
    Posted in the Advanced Applied Math Forum
    Replies: 0
    Last Post: October 20th 2008, 04:05 PM
  5. MATLAB Iterative Methods: URGENT
    Posted in the Math Software Forum
    Replies: 1
    Last Post: October 15th 2008, 06:12 AM

Search Tags


/mathhelpforum @mathhelpforum