- #1
Silversonic
- 130
- 1
Homework Statement
I'm having a hard time understanding when we approximate higher order powers by order notation, especially when it comes to working out the Truncation Error for Finite Differences.
My notes say "We use the order notation O([itex]h^{n}[/itex]) and write X(h) = O([itex]h^{n}[/itex]) if there exists a constant K such that |X(h)| < [itex]Kh^{n}[/itex].
But, for example, my notes say to approximate derivatives [itex]u'(x_{j})[/itex] at a grid point [itex]x = x_{j}[/itex] we write;[itex]u'(x_{j})[/itex] ~= [itex]\frac{1}{h}\delta u(x_{j})[/itex]
where [itex]\delta u(x_{j})[/itex] = [itex] u(x_{j} + h/2) - u(x_{j} - h/2) [/itex]
Then my notes say the error in approximating [itex] u'(x_{j}) [/itex] by [itex]\frac{1}{h}\delta u(x_{j})[/itex] is;
[itex] e_{j} = u'(x_{j}) - \frac{1}{h}\delta u(x_{j}) = O(h^{2}) [/itex]
Fair enough, I think, but then it proves this by taylor expanding [itex] u(x_{j} + h/2) [/itex] and [itex] u(x_{j} - h/2) [/itex], where
(This taylor expansion works on the assumption u(x) is smooth, i.e. derivatives of any order exist).
[itex] u(x_{j} + h/2) = u(x_{j}) + \frac{h}{2}u'(x_{j}) + \frac{h^{2}}{8}u''(x_{j}) + O(h^{3}) [/itex]
Why can we use the Order notation of 3 here? We don't even know what u(x) is, so how can we make the assumption that there is some K such that [itex]|O(h^{3})| < Kh^{3}[/itex]?