Prove that the local error of this approximation of $u'(x)$ is $O(h^3)$

72 Views Asked by At

I want to get the truncation error of $$ u'(x) \approx -\frac{1}{h} \left(\frac{3}{2}u(x) - 2u(x+h) + \frac{1}{2} u(x+2h)\right) $$

The idea is to show that the expression of the right is equal to $u'(x) + O(h^3)$. I have been stuck for two days. If anyone at least knows the name of the approximation I would really appreciate it.


Here's what I have so far:

If we drop the $h$ that is dividing, we have that $$ - \left(\frac{3}{2}u(x) - 2u(x+h) + \frac{1}{2} u(x+2h)\right) = \frac{3}{2} (u(x+h) - u(x)) + \frac{1}{2}(u(x+h)-u(x+2h)) $$ and we must prove that this equals $u'(x)h + O(h^4)$ so that when we divide by $h$ we get what we wanted.

I can apply the Taylor expansion centered in $x$ to the first term, for example, and centered in $x+2h$, to the second term.

I get $$\frac{3}{2} [u'(x)h+u''(x)\frac{h^2}{2} + u'''(x) \frac{h^3}{6} + O(h^4)] + \frac{1}{2} [-h u'(x+2h) + u''(x+2h) \frac{h^2}{2} - u'''(x+2h) \frac{h^3}{6} + O(h^4)]$$

Separating a $u'(x)h$, so I can continue working with a term I want to show is $O(h^4)$ (remember that I will need to divide by $h$ after), and rearranging terms a little bit I get:

$$u'(x) h + \frac{1}{2}h [u'(x) - u'(x+2h)] + \frac{3}{4}u''(x)h^2 + \frac{1}{4} u'''(x)h^3 + \frac{1}{4} u''(x+2h)h^2 - \frac{1}{12} u'''(x+2h)h^3 + O(h^4)$$

Doing the Taylor expansion to $u'(x) - u'(x+2h)$, centered in $x$ (an observation is that I could have chosen to center in $x+2h$), we get:

$$u'(x)h + \frac{1}{2}h[-u''(x)2h - u'''(x)2h^2 + O(h^3)] + \frac{3}{4}u''(x)h^2 + \frac{1}{4} u'''(x)h^3 + \frac{1}{4} u''(x+2h)h^2 - \frac{1}{12} u'''(x+2h)h^3 = u'(x)h + \frac{1}{4}h^2 [u''(x+2h)-u''(x)] - \frac{3}{4}u'''(x)h^3 - \frac{1}{12}u'''(x+2h) h^3 + O(h^4)$$

Again, I have a decision to make, and I choose to change the expression in brackets to $u'''(x) 2h$ (with the Taylor expansion centered in $x$).

But then I get $$u'(x)h - \frac{1}{4}u'''(x)h^3 - \frac{1}{12} u'''(x+2h)h^3 + O(h^4),$$ and I can't...finish it.

This is only one of many attempts. I checked my calculations, but it might be a calculation error on my part. Maybe at signs or coefficients at the Taylor expansion I just can't find it.

Thank you, Billy.

1

There are 1 best solutions below

1
On BEST ANSWER

It is just tedious work: Use Taylor for $$u(x+h) = u(x) + u'(x)h + u''(x)h^2/2 + u'''(x)h^3/6 + O(h^4)$$ $$u(x+2h) = u(x) + 2u'(x)h + 2u''(x)h^2 + 4u'''(x)h^3/3 + O(h^4) $$ Now multiply with the given coefficients $$3u(x)/2 = 3u(x)/2$$ $$-2u(x+h) = -2u(x) - 2hu'(x) - u''(x)h^2 - u'''(x)/3+ O(h^4)$$ $$u(x+2h)/2 = u(x)/2 + u'(x)h + u''(x)h^2 + 2u'''(x)/3+ O(h^4)$$ and add $$3u(x)/2 -2u(x+h) +u(x+h)/2 = \\u(x)(3/2-2+1/2))+ u'(x)h(-2+1) + u''(h)h^2(-1 + 1) + u'''(x)h^3(2/3 -1/3) + O(h^4)\\ =-u'(x)h + u'''(x)h^3/3 + O(h^4) $$

So the error term for $u'(x)$ is $O(h^2)$ and not $O(h^3)$.

I just verified this result with Wolfram Alpha input series[3/2*u(x)-2*u(x+h)+u(x+2*h)/2] for h -> 0