Error Approximation Associated with Taylor Series

Click For Summary

Discussion Overview

The discussion revolves around the error approximation associated with Taylor series, specifically in the context of estimating the derivative of a function using various finite difference formulas. Participants explore the Taylor series expansions and their implications for error estimation in numerical differentiation.

Discussion Character

  • Homework-related
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Post 1 introduces the problem of estimating the derivative using different finite difference formulas and asks about the error associated with each approximation.
  • Post 2 explains the general concept of Taylor series expansions and how they can be used to approximate values at points based on derivatives, mentioning the leading error term.
  • Post 3 provides specific Taylor expansions for the formulas F1 and F2, suggesting that the error for F1 is hf''/2 and for F2 is -hf''/2, while seeking clarification on F3 and F4.
  • Post 4 discusses the nature of the finite difference approximations, labeling F1 as a first-order forward difference and F2 as a first-order backward difference, and explains the concept of central differences in relation to F3, noting that it eliminates certain error terms.
  • Post 4 also mentions that the leading error term for F3 is related to the third derivative, contrasting it with the error terms for first-order schemes.
  • Post 5 expresses understanding and appreciation for the explanations provided.

Areas of Agreement / Disagreement

Participants show some agreement on the general concepts of Taylor series and finite difference approximations, but there are varying interpretations of the error terms associated with each formula. The discussion remains unresolved regarding the exact error terms for F3 and F4.

Contextual Notes

Participants have not fully resolved the mathematical details for F3 and F4, and there are assumptions about the behavior of error terms that depend on the specific context of the Taylor series expansions used.

aznkid310
Messages
106
Reaction score
1

Homework Statement



Q1) Use the Taylor series of f (x), centered at x0 to show that

F1 =[ f (x + h) - f (x)]/h
F2 =[ f (x) - f (x - h) ]/h
F3 =[ f (x + h) - f (x - h) ]/2h
F4 =[ f (x - 2h) - 8 f (x - h) + 8 f (x + h) - f (x + 2h) ]/12h

are all estimates of f '(x). What is the error associated with the approximation
Fi ~ f ' (x), for i = 1; 2; 3; 4?

Example:
f (x + 3h) = f (x) + 3h f '(x) +[(9h^2)/2]*f ''(x) + ...

F5 = [f (x + 3h) - f (x)]/3h = f '(x) + (3h/2)*f ''(x) + ...

so F5 is f '(x) with an error 3h f ''=2, which is of order h1 (i.e., first-order).

Homework Equations



Im trying to understand the example. So is x0 = x + 3h? If so, and I plug that into the taylor equation f (x + 3h) = f(x+3h) + f'(x+3h)*(3h) + f''(x+3h)*([9h^2]/2)+...

What am I doing wrong?

The Attempt at a Solution

 
Physics news on Phys.org
Are you familiar with Taylor series expansions? When you expand a Taylor series approxmation about a point, you are saying that you can guess the value at the next point by using derivative values at the current point. By weighing the derivatives properly, you can get as close as you basically want.

There will always be terms that are left out; remember that a Taylor series is an infinite series. So, you can approximate the error by the leading error term. If you are using say a second-order stencil, then you have an leading error term that IIRC looks something like:
[tex] \frac{\Delta x^2}{2!}\frac{d^2 u}{dx^2}[/tex]
So given a point spacing, you can get some sort of estimation.
 
The taylor expansion centered at x0 is
f(x) = f(x0) + f'(x0)(x-x0) + f''(x0)[(x-x0)^2]/2! + f'''(x0)[(x-x0)^2]/3! +...

so for my case: f(x+h) = f(x) + hf'(x) + [( h^2)/2]f''(x) + ...

F1 = [f(x+h) - f(x)]/h = f'(x) + (h/2)f''(x) + (h/6)f'''(x) + ...

so error is hf''/2?

F2 = [f(x) - f(x-h)]/h = - [ f'(x) + (h/2)f''(x) + ...]

and error is -hf''/2?Are these correct?
How would I get F3,F4?
 
I'm not entirely familiar with your particular notation, but your approxmations for the derivative are based on certain stencils. In the CFD world, we call your F1 a first-order forward difference (unstable btw but off topic). F2 is a first-order backwards difference. In theory, given the same point-spacing these two stencils should give the same errors.

Look at the expansions. Actually write them out and subtract f(x+Δx) - f(x). What do you have. You'll see that the f(x) on the RHS cancel out and the first term you have is the first derivative. However, you have a bunch of stuff to the right of it. Those exist along with the derivative causing error.

Now, if we look at F3, that's what we call a second order central difference. It's central difference because we use the same points on each side of the point of interest. It's called second-order because we have algebraically eliminated one of those error terms.

If you actually take f(x+Δx) and subtract f(x-Δx), you'll see that not only have we eliminated the f(x) terms, but we've also eliminated the second derivative. However, we do still have the third derivative error term.

Since the error terms are a function of 1/n!, the values of them decrease very exponentially. Because of this, when we look at errors, we typically look at only the leading term. In your case of F3, it will be something like:
[tex] \frac{\Delta x^3}{3!}\frac{d^3 x}{dx^3}[/tex]
Actually, when you do the algebra, it might be 2x that term. That compares to the first-order schemes when our leading error term was:
[tex] \frac{\Delta x^2}{2!}\frac{d^2 x}{dx^2}[/tex]
 
That makes perfect sense. Thanks!
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
13
Views
2K
Replies
6
Views
3K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K