Discrete derivatives with finite-differences

  • Context: Graduate 
  • Thread starter Thread starter mnb96
  • Start date Start date
  • Tags Tags
    Derivatives Discrete
Click For Summary

Discussion Overview

The discussion centers on the use of finite-difference operators to approximate derivatives of a function defined on a discrete domain, specifically exploring the appropriateness of mixing forward and backward difference operators based on the sign of the input variable.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant proposes using the forward difference operator for non-negative inputs and the backward difference operator for negative inputs to maintain a certain symmetry in the approximation of the derivative.
  • Another participant challenges this approach, questioning the rationale behind using different operators for positive and negative values, suggesting that the nature of the change is independent of the sign of the input.
  • A third participant supports the initial proposal, noting that the continuous function has properties that justify the use of different operators, specifically that the function is even and its derivative is odd.
  • One participant suggests an alternative approach using the central-difference operator, which averages the forward and backward differences, potentially simplifying the calculations while preserving the desired properties.
  • A later reply acknowledges the central-difference operator as a better alternative, emphasizing its ability to maintain the relationship between even and odd functions.

Areas of Agreement / Disagreement

Participants express differing views on the appropriateness of using mixed finite-difference operators based on the sign of the input variable. There is no consensus on whether this approach is common or justified, and multiple perspectives remain unresolved.

Contextual Notes

The discussion includes assumptions about the properties of the continuous function and its discretized counterpart, as well as the implications of using different finite-difference operators. The mathematical steps and justifications for the proposed methods are not fully resolved.

Who May Find This Useful

Readers interested in numerical methods, finite-difference approximations, or the properties of even and odd functions in mathematical analysis may find this discussion relevant.

mnb96
Messages
711
Reaction score
5
Hello,
I have a function in discrete domain [tex]f:\mathbb{Z}\rightarrow \mathbb{R}[/tex], and I assume that f is an approximation of another differentiable function [tex]g:\mathbb{R}\rightarrow \mathbb{R}[/tex].
In other words [tex]f(n)=g(n)[/tex], [tex]n\in \mathbb{Z}[/tex].

When one wants to approximate the first derivative of g, it is possible to use the forward difference or backward difference operators, which are respecively:

[tex]\Delta f(n)=f(n+1)-f(n)[/tex]
[tex]\nabla f(n)=f(n)-f(n-1)[/tex]

My question is: is it common or allowed to use a mixture of these two operators in the following way:

[tex]g'(x) \approx \Delta f(x)[/tex] for [tex]x\geq 0[/tex]
[tex]g'(x) \approx \nabla f(x)[/tex] for [tex]x<0[/tex]
 
Physics news on Phys.org
No, it is not "common" and I can see no reason to do that. Why would you use one for positive x and the other for negative x? It is the change that is positive or negative in the two differences and whether x is positive or negative has nothing to do with that.
 
I would like to use different operators for positive/negative x's in order to obtain a symmetry I need. In fact, in my case the continuous function g has the property:

[tex]g'(x)=-g'(-x)[/tex], for [tex]x\in \mathbb{R}[/tex]

If f(n)=g(n), [itex]n\in \mathbb{Z}[/itex], you get [tex]\Delta f(n) \neq -\Delta f(-n)[/tex].
Instead, given g I was able to obtain:

[tex]\Delta f(n) = -\nabla f(-n)[/tex], [itex]n\in \mathbb{Z}^+ - \{ 0 \}[/itex]

EDIT: in simpler words g is an even function and its first derivative is an odd function. The discretized f is even too, but [itex]\Delta f[/itex] is not odd.
 
Last edited:
You could presumably use [itex]\frac{1}{2}(\Delta f+\nabla f)=(f(n+1)-f(n-1))/2[/itex], but that may be too much arithmetic (the shift operation is usually quite quick if you're doing it by computer).
 
Last edited:
Thanks Martin,
yours is probably a better idea. In fact, the central-difference operator keeps the property "f is even [itex]\Rightarrow[/itex] f' is odd".
 

Similar threads

  • · Replies 0 ·
Replies
0
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K