When to use Order Notation? (Error in Finite differences)

  • Thread starter Thread starter Silversonic
  • Start date Start date
  • Tags Tags
    Finite Notation
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
Silversonic
Messages
121
Reaction score
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]?
 
Physics news on Phys.org
Whatever u is, its derivatives, evaluated at [itex]x_j[/itex] will be numbers. So the remaining terms in the Taylor series will be number multiplied by powers of x equal to or larger than [itex]x^3[/itex]. For x< 1, the largest term will be the [itex]x^3[/itex] term itself. That's why we can say "[itex]O(x^3[/itex]".
 
HallsofIvy said:
Whatever u is, its derivatives, evaluated at [itex]x_j[/itex] will be numbers. So the remaining terms in the Taylor series will be number multiplied by powers of x equal to or larger than [itex]x^3[/itex]. For x< 1, the largest term will be the [itex]x^3[/itex] term itself. That's why we can say "[itex]O(x^3[/itex]".

Thanks, but the whole thing is being taylor expanded in h. h is definitely less than or equal to one. I agree that u([itex]x_j[/itex]) is a number, but so is u'([itex]x_j[/itex]) and u''([itex]x_j[/itex]) and so on and so on. But we don't actually know the value of u, u', u'', u''', u'''' and so on at any of the [itex]x_j[/itex]. It could be that [itex]\frac{h^{3}}{24}u'''(x_{j})[/itex] is much greater than [itex]\frac{h}{2}u'(x_{j})[/itex] at the point [itex]x_{j}[/itex] because, even though we know that [itex]\frac{h^{3}}{24}[/itex] is much smaller than [itex]\frac{h}{2}[/itex], we have no idea of the values u'([itex]x_{j}[/itex]) and u'''([itex]x_{j}[/itex]) are at any grid point [itex]x_{j}[/itex]. So why can we assume?