What is the finite difference method and how does it involve a grid?

  • Thread starter Thread starter courtrigrad
  • Start date Start date
  • Tags Tags
    Conceptual
Click For Summary

Homework Help Overview

The discussion revolves around the finite difference method, particularly its relationship with difference equations and grid usage. Participants explore how this method approximates solutions to differential equations by utilizing discrete points on a grid.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • The original poster seeks clarification on the finite difference method and its application to grids, asking for examples. Some participants explain that the method involves replacing differential equations with difference equations that are satisfied on a grid. Others provide a simple example involving a specific differential equation and discuss the implications of grid partitioning on accuracy.

Discussion Status

The conversation is ongoing, with participants providing insights into the finite difference method and discussing its mathematical foundations. There is a mix of examples and theoretical exploration, but no consensus has been reached on specific applications or graphical representations.

Contextual Notes

Participants are working within the constraints of homework guidelines, which may limit the depth of examples and the extent of solutions discussed. The original poster's request for sources indicates a desire for further learning resources on the topic.

courtrigrad
Messages
1,236
Reaction score
2
What exactly is the finite difference method and difference equations? I know you work backwards, but could you provide some examples? Also how does the finite difference method involve a grid?

Thanks
 
Physics news on Phys.org
Effectively, the finite difference method replaces a differential equation with a difference equation.
Since a differential equation must hold for all points on a domain (like the real line, or plane), we require that the difference equation must be satisfied on a grid (which is the discrete version of the domain).
 
A very simple example is the best I can do here.

Suppose you have the differential equation y"- y= 0 with boundary conditions y(0)= 1, y(1)= 2. Divide the interval from 0 to 1 into 4 equal parts (I SAID "simple"). We can approximate the derivative y' (which is limit (y(x+h)- y(x))/h with h going to 0)by the "finite difference" (y(x+y)- y(x))/h. Obviously, the smaller h is, the more accurate this is- here h= 0.25 which isn't all that accurate. The more partitions, the more accurate.
There are a variety of possible "finite difference" formulas for the second derivative- the best is the "centered difference": y" is approximately ((y(x)- y(x-h))/h - (y(x+y)- y(x))/h)/h= (2y(x)- y(x+h)-y(x-h))/h2. Let yi be y(x) at each of the "partition" points (also called "knots") and plug into the differential equation using the finite difference equation. That will give an equation (linear if the de is linear) for the "unknowns" yi. Because we are using the centered difference we can only do that at the "internal" knots, not the endpoints. If we have n intervals, there will be n-2 internal knots and so that only gives n-2 equations for the n yi values. Fortunately, we are given the values at the endpoints so we have n (linear) equations for the n values.

In the example I gave, The equations would be
y1= 1
-y1+ 2y2- y3= 0
-y2+ 2y3- y4= 0
y4= 2


Notice, by the way, that, for each i, the equation involves only yi, yi-1, and yi+1: 3 values only out of the possible n values. Written as a matrix, we would have a matrix in which only the central 3 diagonals have non-zero entries. That's a "tri-diagonal" matrix, a special case that is well studied. There are methods for solving tri-diagonal matrix equations using only the three diagonal values. If we divided into, say, 10000 intervals to get really good accuracy, that would give us 10000 equations in 10000 unknowns- but the three central diagons have 10000+ 9991+ 9991= 29998 entries- still large but only 0.03% of 10000x10000 possible entries- a "sparce" matrix.
 
Also, could you graph finite difference methods on as a curve? Are there any sources that are good fot this topic?

Thanks
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
3
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 10 ·
Replies
10
Views
1K
Replies
6
Views
1K