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

  • Thread starter Thread starter Silversonic
  • Start date Start date
  • Tags Tags
    Finite Notation
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(h^{n}) and write X(h) = O(h^{n}) if there exists a constant K such that |X(h)| < Kh^{n}.

But, for example, my notes say to approximate derivatives u&#039;(x_{j}) at a grid point x = x_{j} we write;u&#039;(x_{j}) ~= \frac{1}{h}\delta u(x_{j})

where \delta u(x_{j}) = u(x_{j} + h/2) - u(x_{j} - h/2)
Then my notes say the error in approximating u&#039;(x_{j}) by \frac{1}{h}\delta u(x_{j}) is;

e_{j} = u&#039;(x_{j}) - \frac{1}{h}\delta u(x_{j}) = O(h^{2})

Fair enough, I think, but then it proves this by taylor expanding u(x_{j} + h/2) and u(x_{j} - h/2), where

(This taylor expansion works on the assumption u(x) is smooth, i.e. derivatives of any order exist).

u(x_{j} + h/2) = u(x_{j}) + \frac{h}{2}u&#039;(x_{j}) + \frac{h^{2}}{8}u&#039;&#039;(x_{j}) + O(h^{3})

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 |O(h^{3})| &lt; Kh^{3}?
 
Physics news on Phys.org
Whatever u is, its derivatives, evaluated at x_j will be numbers. So the remaining terms in the Taylor series will be number multiplied by powers of x equal to or larger than x^3. For x< 1, the largest term will be the x^3 term itself. That's why we can say "O(x^3".
 
HallsofIvy said:
Whatever u is, its derivatives, evaluated at x_j will be numbers. So the remaining terms in the Taylor series will be number multiplied by powers of x equal to or larger than x^3. For x< 1, the largest term will be the x^3 term itself. That's why we can say "O(x^3".

Thanks, but the whole thing is being taylor expanded in h. h is definitely less than or equal to one. I agree that u(x_j) is a number, but so is u'(x_j) and u''(x_j) 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 x_j. It could be that \frac{h^{3}}{24}u&#039;&#039;&#039;(x_{j}) is much greater than \frac{h}{2}u&#039;(x_{j}) at the point x_{j} because, even though we know that \frac{h^{3}}{24} is much smaller than \frac{h}{2}, we have no idea of the values u'(x_{j}) and u'''(x_{j}) are at any grid point x_{j}. So why can we assume?
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top