Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Show that

$d^2u/dx^2(x_i)=[(-u_{i+3})+(4u_{i+2})-(5u_{i+1})+2u_i]/h^2 +O(h^2)$

provided all terms in the expression are well defined is a second order finite difference scheme for second order derivative.

I know how to approach this question. I know I use the taylor expression and everything but I don't know which formula to use. For example, I know that when finding a first order derivative I use


I've already solved a question using this but I don't know what the formula is for $u''(x)$.

Would it be something like

$u''(x)=au(x+3h)+bu(x+2h)+cu(x+h)+du(x)+eu(x-3h)+fu(x-2h)+g(x-h) ? $

I'm pretty sure this is wrong because I don't think I should have this many unknowns. What equation should I be using?

share|cite|improve this question
I assume you meant to use subscripts in the above such as $u_{i+2}$ instead of $ui+2$ – par Oct 3 '13 at 15:41
Yes I did. I just didn't know how to do that here. – Ruth Gutierrez Oct 3 '13 at 15:42
Click edit and take a look at the syntax for future reference. I am currently working on an answer to your question. – par Oct 3 '13 at 15:44
up vote 0 down vote accepted

Substitute a smooth solution $u$ into the finite difference scheme to get \begin{align*} & \phantom{=}\frac{-u\left(x+3h\right)+4u\left(x+2h\right)-5u\left(x+h\right)+2u\left(x\right)}{h^{2}}\\ & =-\frac{1}{h^{2}}\left[u\left(x\right)+3hu^{\prime}\left(x\right)+\frac{9}{2}h^{2}u^{\prime\prime}\left(x\right)+\frac{9}{2}h^{3}u^{\prime\prime\prime}\left(x\right)+O\left(h^{4}\right)\right]\\ & \qquad+\frac{4}{h^{2}}\left[u\left(x\right)+2hu^{\prime}\left(x\right)+2h^{2}u^{\prime\prime}\left(x\right)+\frac{4}{3}h^{3}u^{\prime\prime\prime}\left(x\right)+O\left(h^{4}\right)\right]\\ & \qquad-\frac{5}{h^{2}}\left[u\left(x\right)+hu^{\prime}\left(x\right)+\frac{1}{2}h^{2}u^{\prime\prime}\left(x\right)+\frac{1}{6}h^{3}u^{\prime\prime\prime}\left(x\right)+O\left(h^{4}\right)\right]\\ & \qquad+\frac{2}{h^{2}}u\left(x\right).\\ & =\frac{u\left(x\right)}{h^{2}}\underbrace{\left[-1+4-5+2\right]}_{0}+\frac{u^{\prime}\left(x\right)}{h}\underbrace{\left[-3+8-5\right]}_{0}\\ & \qquad+u^{\prime\prime}\left(x\right)\underbrace{\left[-\frac{9}{2}+8-\frac{5}{2}\right]}_{1}+u^{\prime\prime\prime}\left(x\right)h\underbrace{\left[-\frac{9}{2}+\frac{16}{3}-\frac{5}{6}\right]}_{0}+O\left(h^{2}\right)\\ &=u^{\prime\prime}\left(x\right)+O\left(h^2\right) \end{align*} as desired.

share|cite|improve this answer
Oh so here I don't have to use a formula to find the coefficients like you can do for a first order derivative? – Ruth Gutierrez Oct 3 '13 at 16:42
The case for a first-order derivative and that of a second-order derivative are the same. The coefficients in the discretization (i.e. -1, 4, -5 and 2) are already given to you. You are required to show that if you substitute a smooth solution (as I did above), the error in the approximation is $O\left(h^2\right)$. – par Oct 3 '13 at 17:16
Oh ok. Yes I see. It makes sense. Thank you so much. – Ruth Gutierrez Oct 3 '13 at 17:36
If it is satisfactory, could you accept my answer? Click the checkmark. – par Oct 3 '13 at 22:09

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.