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
AI Thread Summary
The finite difference method transforms differential equations into difference equations by evaluating them on a discrete grid. This grid represents the domain, where the accuracy of the approximation improves with smaller intervals between points. For example, the second derivative can be approximated using the centered difference formula, which involves only three adjacent grid points. The resulting system of equations can be organized into a tri-diagonal matrix, allowing for efficient solutions. The discussion also touches on the potential for graphing finite difference methods and seeks additional 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
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...

Similar threads

Back
Top