Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This is the question:

a) Expand $y(x_i + h)$ and $y(x_i - h)$ in a second-degree Taylor polynomial about $x_i$, assuming that $y$ is three times continuously differentiable.

b) Using the expansion from part (a), show that the centered difference given by $$y'(x_i) = \frac{1}{2h}[y(x_i +h)-y(x_i - h)]-\frac{h^2}{6}y'''(\epsilon_i)***$$ for some $\epsilon_i \in (x_i -h, x_i + h)$

My attempt:

a) $$y(x_i + h) = y(x_i) + hy'(x_i) + \frac{h^2}{2}y''(x_i) + \frac{h^3}{6}y'''(x_i) + O(h^3)$$ and $$y(x_i - h) = y(x_i) - hy'(x_i) + \frac{h^2}{2}y''(x_i) + \frac{h^3}{6}y'''(x_i) + O(h^3)$$

b) subtracting the two I get: $$y'(x) = \frac{y(x_i + h) - y(x_i - h)}{2h} + O(h^3)**$$

My problem:

I don't understand how $***$ becomes $**$

Not an assignment: trying to understand class exercises...

share|improve this question
    
You have a mistake, the $y'''$ term in $y(x_i-h)$ is negative, so it doesn't cancel out. –  gt6989b Mar 18 '13 at 19:35
    
Also, in (a), you only need to add $O(h^4)$ not $O(h^3)$ as you have. –  gt6989b Mar 18 '13 at 19:37
    
@gt6989b Thanks! –  Siyanda Mar 18 '13 at 19:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.