ArticleslgStudy

mathematics

Finite difference method

Finite difference method is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Finite difference method rather than just read about it. In short: In numerical analysis, finite-difference methods (FDM) are a class of numerical techniques for solving differential equations by approximating derivatives with finite differences. Both the spatial domain and time domain (if applicable) are discretized, or broken into a finite number of intervals, and the values of the solution at the end points of the intervals are approximated by solving algebraic equations contain…

Finite difference method — main illustration
Finite difference method — illustration

Key takeaways

  • Finite difference method belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Finite difference method to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Finite difference method from memory before moving on to harder problems.

Reference excerpt

In numerical analysis, finite-difference methods (FDM) are a class of numerical techniques for solving differential equations by approximating derivatives with finite differences. Both the spatial domain and time domain (if applicable) are discretized, or broken into a finite number of intervals, and the values of the solution at the end points of the intervals are approximated by solving algebraic equations containing finite differences and values from nearby points. Finite difference methods convert ordinary differential equations (ODE) or partial differential equations (PDE), which may be nonlinear, into a system of linear equations that can be solved by matrix algebra techniques. Modern computers can perform these linear algebra computations efficiently, and this, along with their relative ease of implementation, has led to the widespread use of FDM in modern numerical analysis. Today, FDMs are one of the most common approaches to the numerical solution of PDE, along with finite element methods.

Derive difference quotient from Taylor's polynomial For a n-times differentiable function, by Taylor's theorem the Taylor series expansion is given as f(x0+h)=f(x0)+f′(x0)1!h+f(2)(x0)2!h2+⋯+f(n)(x0)n!hn+Rn(x), Where n! denotes the factorial of n, and Rn(x) is a remainder term, denoting the difference between the Taylor polynomial of degree n and the original function. Following is the process to derive an approximation for the first derivative of the function f by first truncating the Taylor polynomial plus remainder: f(x0+h)=f(x0)+f′(x0)h+R1(x). Dividing across by h gives: f(x0+h)h=f(x0)h+f′(x0)+R1(x)h Solving for f′(x0): f′(x0)=f(x0+h)−f(x0)h−R1(x)h. Assuming that R1(x) is sufficiently small, the approximation of the first derivative of f is: f′(x0)≈f(x0+h)−f(x0)h. This is similar to the definition of derivative, which is: f′(x0)=limh→0f(x0+h)−f(x0)h. except for the limit towards zero (the method is named after this).

Accuracy and order

The error in a method's solution is defined as the difference between the approximation and the exact analytical solution. The two sources of error in finite difference methods are round-off error, the loss of precision due to computer rounding of decimal quantities, and truncation error or discretization error, the difference between the exact solution of the original differential equation and the exact quantity assuming perfect arithmetic (no round-off).

To use a finite difference method to approximate the solution to a problem, one must first discretize the problem's domain. This is usually done by dividing the domain into a uniform grid (see image). This means that finite-difference methods produce sets of discrete numerical approximations to the derivative, often in a "time-stepping" manner. An expression of general interest is the local truncation error of a method. Typically expressed using Big-O notation, local truncation error refers to the error from a single application of a method. That is, it is the quantity f′(xi)−f'i if f′(xi) refers to the exact value and f'i to the numerical approximation. The remainder term of the Taylor polynomial can be used to analyze local truncation error. Using the Lagrange form of the remainder from the Taylor polynomial for f(x0+h), which is Rn(x0+h)=f(n+1)(ξ)(n+1)!(h)n+1,x0<ξ<x0+h, the dominant term of the local truncation error can be discovered. For example, again using the forward-difference formula for the first derivative, knowing that f(xi)=f(x0+ih), f(x0+ih)=f(x0)+f′(x0)ih+f″(ξ)2!(ih)2, and with some algebraic manipulation, this leads to f(x0+ih)−f(x0)ih=f′(x0)+f″(ξ)2!ih, and further noting that the quantity on the left is the approximation from the finite difference method and that the quantity on the right is the exact quantity of interest plus a remainder, clearly that remainder is the local truncation error. A final expression of this example and its order is: f(x0+ih)−f(x0)ih=f′(x0)+O(h). In this case, the local truncation error is proportional to the step sizes. The quality and duration of simulated FDM solution depends on the discretization equation selection and the step sizes (time and space steps). The data quality and simulation duration increase significantly with smaller step size. Therefore, a reasonable balance between data quality and simulation duration is necessary for practical usage. Large time steps are useful for increasing simulation speed in practice. However, time steps which are too large may create instabilities and affect the data quality. The von Neumann and Courant-Friedrichs-Lewy criteria are often evaluated to determine the numerical model stability.

Example: ordinary differential equation For example, consider the ordinary differential equation u′(x)=3u(x)+2. The Euler method for solving this equation uses the finite difference quotient u(x+h)−u(x)h≈u′(x) to approximate the differential equation by first substituting it for u′(x) then applying a little algebra (multiplying both sides by h, and then adding u(x) to both sides) to get u(x+h)≈u(x)+h(3u(x)+2). The last equation is a finite-difference equation, and solving this equation gives an approximate solution to the differential equation.

Example: The heat equation Consider the normalized heat equation in one dimension, with homogeneous Dirichlet boundary conditions {Ut=UxxU(0,t)=U(1,t)=0(boundary condition)U(x,0)=U0(x)(initial condition) One way to numerically solve this equation is to approximate all the derivatives by finite differences. First partition the domain in space using a mesh x0,…,xJ and in time using a mesh t0,…,tN. Assume a uniform partition both in space and in time, so the difference between two consecutive space points will be h and between two consecutive time points will be k. The points u(xj,tn)=ujn will represent the numerical approximation of U(xj,tn).

Explicit method

… excerpt ends here. Continue reading the full article.

Illustrations

Finite difference method: The stencil for the most common explicit method for the heat equation.
The stencil for the most common explicit method for the heat equation.
Finite difference method: The implicit method stencil.
The implicit method stencil.
Finite difference method: The Crank–Nicolson stencil.
The Crank–Nicolson stencil.
Finite difference method illustration
Finite difference method illustration

Worked examples

Example 1 — a first encounter with Finite difference method

Start with the simplest possible case. Write down what Finite difference method claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Finite difference method before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Finite difference method ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Finite difference method

In research
Finite difference method appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Finite difference method in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Finite difference method is common in secondary-school and first-year university syllabi. It links to neighbouring topics Finite differences, Numerical differential equations, so understanding it makes those chapters shorter.
In everyday life
Look for Finite difference method outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Finite difference method” →

How to study Finite difference method in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Finite difference method means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Finite difference method out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Finite difference method in simple terms?

In numerical analysis, finite-difference methods (FDM) are a class of numerical techniques for solving differential equations by approximating derivatives with finite differences. Both the spatial domain and time domain (if applicable) are discretized, or broken into a finite number of intervals, a…

Why does Finite difference method matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Finite difference method?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Finite difference method.

Tags

  • Finite differences
  • Numerical differential equations

Keep exploring