Results 1 to 2 of 2

Math Help - Taylor Expansion for Numerical Integration

  1. #1
    Newbie
    Joined
    Apr 2008
    Posts
    3

    Taylor Expansion for Numerical Integration

    Hey,

    I'm looking for the error of the Trapezoidal method applied to the integral \int_0^1 sin(\pi x) \, dx

    The actual value of this integral in 2/\pi. Applying the trapezoidal method to the integral results for a small step size h results in: h \frac{sin(\pi h)}{1 - cos(\pi h)}. (I've checked this result and for small h, this is approximately equal to 2/\pi. (to precision above 5 decimal places in MATLAB))

    So now I have to check the error of the method, which in general, for an integral \int_a^b f(x) \, dx is \epsilon(h) = h^2/12 ( f'(b) - f'(a) ) + O(h^4).

    So I'm having trouble finding the taylor expansion of h \frac{sin(\pi h)}{1 - cos(\pi h)}, but i know the coefficent of the h^2 term should be  (f'(b) -f'(a))/12 = \frac{-\pi}{6} .

    Thanks!!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Apr 2008
    Posts
    3

    Solved!

    Okay, so after staring at this problem some more I got the right answer.

    I assumed that h\frac{sin(\pi h)}{1 - cos(\pi h)} = C_0 + C_1 h + C_2 h^2 and by multiplying both sides by the taylor expansion of 1 - cos(\pi h), I was able to find the correct coefficients of C_0, C_1, C_2... such that the right side equals that taylor expansion of h sin(\pi h).

    btw, h\frac{sin(\pi h)}{1 - cos(\pi h)} = \frac{2}{\pi} - \frac{\pi}{6}h^2 + \frac{\pi^3}{720}h^4 + O(h^6)
    Last edited by redragon104; April 21st 2008 at 09:37 PM. Reason: Solved
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Numerical Methods Taylor Polynomial
    Posted in the Calculus Forum
    Replies: 3
    Last Post: February 3rd 2010, 03:05 PM
  2. Taylor Expansion
    Posted in the Calculus Forum
    Replies: 2
    Last Post: December 9th 2009, 06:44 AM
  3. Taylor Expansion?
    Posted in the Differential Geometry Forum
    Replies: 2
    Last Post: October 31st 2009, 04:12 PM
  4. Taylor expansion
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: June 10th 2009, 08:05 AM
  5. taylor expansion
    Posted in the Calculus Forum
    Replies: 2
    Last Post: February 19th 2009, 05:20 AM

Search Tags


/mathhelpforum @mathhelpforum