Results 1 to 2 of 2

Thread: 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 $\displaystyle \int_0^1 sin(\pi x) \, dx$

    The actual value of this integral in $\displaystyle 2/\pi$. Applying the trapezoidal method to the integral results for a small step size $\displaystyle h$ results in: $\displaystyle h \frac{sin(\pi h)}{1 - cos(\pi h)}$. (I've checked this result and for small h, this is approximately equal to $\displaystyle 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 $\displaystyle \int_a^b f(x) \, dx$ is $\displaystyle \epsilon(h) = h^2/12 ( f'(b) - f'(a) ) + O(h^4)$.

    So I'm having trouble finding the taylor expansion of $\displaystyle h \frac{sin(\pi h)}{1 - cos(\pi h)}$, but i know the coefficent of the h^2 term should be $\displaystyle (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 $\displaystyle 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 $\displaystyle 1 - cos(\pi h)$, I was able to find the correct coefficients of $\displaystyle C_0, C_1, C_2...$ such that the right side equals that taylor expansion of $\displaystyle h sin(\pi h)$.

    btw, $\displaystyle 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; Apr 21st 2008 at 08: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: Feb 3rd 2010, 02:05 PM
  2. Taylor Expansion
    Posted in the Calculus Forum
    Replies: 2
    Last Post: Dec 9th 2009, 05:44 AM
  3. Taylor Expansion?
    Posted in the Differential Geometry Forum
    Replies: 2
    Last Post: Oct 31st 2009, 03:12 PM
  4. Taylor expansion
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: Jun 10th 2009, 07:05 AM
  5. taylor expansion
    Posted in the Calculus Forum
    Replies: 2
    Last Post: Feb 19th 2009, 04:20 AM

Search Tags


/mathhelpforum @mathhelpforum