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

In summary: This taylor expansion works on the assumption u(x) is smooth, i.e. derivatives of any order exist). In summary, the notes say to approximate derivatives u'(x_{j}) at a grid point x by writing; u'(x_{j}) ~= \frac{1}{h}\delta u(x_{j}) where \delta u(x_{j}) = u(x_{j} + h/2) - u(x_{j} - h/2) and the error in approximating u'(x_{j}) by \frac{1}{h}\delta u(x_{j}) is e_{j} = u'
  • #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]?
 
Physics news on Phys.org
  • #2
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]".
 
  • #3
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?
 

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

1. What is Order Notation and why is it used in Finite Differences?

Order Notation is a mathematical concept that is used to describe the rate of growth of a function or algorithm. In Finite Differences, it is used to analyze the error that occurs when approximating derivatives of a function. It helps us understand the accuracy and efficiency of our calculations.

2. How is Order Notation calculated in Finite Differences?

In Finite Differences, Order Notation is calculated by taking the ratio of the error in the approximation to the step size used in the calculation. This allows us to determine the order of the error, which can range from first order to higher orders such as second or third order.

3. When should we use Order Notation in Finite Differences?

Order Notation should be used in Finite Differences when we want to analyze the accuracy and efficiency of our approximation of derivatives. It is particularly useful when comparing different methods of approximating derivatives, or when determining the optimal step size for a given level of accuracy.

4. What are the benefits of using Order Notation in Finite Differences?

Using Order Notation in Finite Differences allows us to understand the behavior of our approximation algorithms and make informed decisions about our calculations. It also helps us identify the sources of error and improve the accuracy of our approximations.

5. Are there any limitations to using Order Notation in Finite Differences?

One limitation of using Order Notation in Finite Differences is that it only measures the error in the approximation and does not take into account the accuracy of the original function itself. Additionally, it may not accurately reflect the performance of the algorithm in all cases, as it is based on a theoretical analysis and may not account for practical considerations such as round-off error or computational complexity.

Similar threads

  • Calculus and Beyond Homework Help
Replies
0
Views
307
  • Calculus and Beyond Homework Help
Replies
1
Views
594
  • Calculus and Beyond Homework Help
Replies
3
Views
113
Replies
1
Views
612
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
372
  • Quantum Physics
Replies
31
Views
2K
Back
Top