Fact-checked by Grok 2 weeks ago

Finite difference method

The finite difference method (FDM) is a numerical technique for solving differential equations by approximating continuous derivatives with discrete differences between function values at points on a structured grid. This approach discretizes the domain into a mesh of finite intervals, replacing the differential equation with a system of algebraic equations that can be solved computationally. It is widely used for both ordinary differential equations (ODEs) and partial differential equations (PDEs), particularly in boundary value problems where exact analytical solutions are unavailable. The method's theoretical foundations emerged in the early , building on earlier approximations in numerical computation dating back to the . A pivotal early application was L.F. Richardson's 1910 use of s to solve PDEs for analysis in , marking one of the first practical implementations for physical problems. In 1928, , Kurt Friedrichs, and Hans Lewy provided a seminal of schemes for hyperbolic PDEs, introducing the stability criterion now known as the CFL condition, which ensures that numerical solutions remain physically meaningful by limiting the time step relative to the spatial grid. Finite difference methods approximate using formulas such as forward differences (e.g., f'(x) \approx \frac{f(x + h) - f(x)}{h}), backward differences, or centered differences for improved accuracy (e.g., second-order precision). These are applied to generate discrete equations on uniform grids, often leading to systems solved iteratively. Key applications include simulating conduction and (via the ), wave propagation (via the wave equation), fluid flow in porous media, and electromagnetic fields through the finite-difference time-domain (FDTD) variant. In fields like and physics, FDM excels on regular geometries due to its simplicity and ease of implementation, though it struggles with complex or irregular domains where adaptive gridding or alternative methods like finite elements are preferred.

Fundamentals

Overview and Definition

The finite difference method is a numerical technique used to approximate solutions to differential equations by discretizing continuous domains into a finite of points and replacing derivatives with discrete difference quotients. This approach transforms the continuous problem into a system of algebraic equations that can be solved computationally, making it particularly suitable for problems where analytical solutions are unavailable or impractical. It assumes a basic familiarity with differential equations but focuses on the -based discretization process, where the domain is divided into evenly spaced points to enable finite approximations of rates of change. In standard notation, consider a one-dimensional discretized with grid spacing h, yielding points x_i = x_0 + i h for i, and corresponding values u_i \approx u(x_i). The first u'(x) can be approximated using forward, backward, or central differences: the forward difference is \frac{u(x + h) - u(x)}{h}, the backward difference is \frac{u(x) - u(x - h)}{h}, and the central difference is \frac{u(x + h) - u(x - h)}{2h}. For the second u''(x), a common central difference approximation is \frac{u(x + h) - 2u(x) + u(x - h)}{h^2}. These operators provide the foundational building blocks for constructing finite difference schemes across higher dimensions and more complex equations. The origins of finite differences trace back to 18th-century interpolation techniques developed by and Leonhard Euler, who used discrete differences to approximate continuous functions. The method was formalized for solving partial differential equations in the early 20th century, notably by in his 1910 work on approximate arithmetical solutions to physical problems involving differential equations. This laid the groundwork for modern applications in .

Derivation from Taylor Series

The finite difference approximations for derivatives are derived from the expansion of a smooth around a given point. For a u(x) that is sufficiently differentiable, the Taylor theorem states that u(x + h) = u(x) + h u'(x) + \frac{h^2}{2} u''(\xi) for some \xi between x and x + h. Rearranging the expansion for u(x + h) yields the forward difference approximation to the first : \frac{u(x + h) - u(x)}{h} = u'(x) + O(h). The backward difference approximation is obtained analogously from the expansion u(x - h) = u(x) - h u'(x) + \frac{h^2}{2} u''(\eta) for some \eta between x - h and x, giving \frac{u(x) - u(x - h)}{h} = u'(x) + O(h). The central difference for the first derivative combines the expansions for u(x + h) and u(x - h), where the linear terms cancel, resulting in \frac{u(x + h) - u(x - h)}{2h} = u'(x) + O(h^2). For the second derivative, adding the expansions for u(x + h) and u(x - h) eliminates the odd-powered terms, yielding the central difference formula \frac{u(x + h) - 2u(x) + u(x - h)}{h^2} = u''(x) + O(h^2). Approximations for higher-order derivatives follow a similar process, employing Taylor expansions at multiple grid points and matching coefficients through the method of undetermined coefficients to achieve the desired accuracy order.

Accuracy and Convergence Order

The truncation error in finite difference methods represents the discrepancy between the exact mathematical derivative and its discrete approximation on a finite grid. This error arises primarily from the truncation of the infinite Taylor series expansion used to derive the approximations. The leading error terms are obtained from the remainders in Taylor expansions. For the forward difference approximation of the first derivative, \frac{f(x + h) - f(x)}{h} = f'(x) + \frac{h}{2} f''(\xi) for some \xi \in (x, x + h), the truncation error is O(h). The backward difference, \frac{f(x) - f(x - h)}{h}, similarly yields an O(h) error. In contrast, the central difference for the first derivative, \frac{f(x + h) - f(x - h)}{2h} = f'(x) + \frac{h^2}{6} f'''(\xi) for some \xi \in (x - h, x + h), has a leading error of O(h^2). For the second derivative using the central difference, \frac{f(x + h) - 2f(x) + f(x - h)}{h^2} = f''(x) + \frac{h^2}{12} f^{(4)}(\xi), the truncation error is also O(h^2). The order of accuracy of a finite difference approximation is defined as the largest integer p such that the truncation error is O(h^p) as the grid spacing h approaches zero. Higher-order methods reduce the error more rapidly with decreasing h, enabling more efficient computations for a given accuracy level. For schemes applied to partial differential equations, consistency requires that the local vanishes as h \to 0. This property ensures that the discrete equations approach the continuous PDE in the limit, forming a prerequisite for of the numerical solution to the exact one. Although reducing h diminishes , it exacerbates round-off errors from finite-precision arithmetic, as more grid points amplify accumulation of floating-point inaccuracies. Optimal accuracy thus involves selecting an h that balances these competing error sources.

Applications to Ordinary Differential Equations

First-Order Initial Value Problems

The finite difference method provides a framework for numerically solving first-order initial value problems by approximating the derivative with discrete differences on a uniform grid. The model problem is the ordinary differential equation u'(x) = f(x, u) with initial condition u(0) = u_0 over the interval [0, T]. To apply the method, the interval is discretized into N equal steps of size k = T/N, yielding grid points x_n = n k for n = 0, 1, \dots, N, where u_n approximates u(x_n). This approach relies on finite difference quotients to replace the continuous derivative, enabling a step-by-step march from the initial condition. The employs the \frac{u(x_n + k) - u(x_n)}{k} \approx u'(x_n), which, when substituted into the , yields the explicit update formula u_{n+1} = u_n + k f(x_n, u_n), \quad n = 0, 1, \dots, N-1, with u_0 = u_0. This scheme is straightforward to implement and computationally efficient, as each step requires only evaluation of the known f at the current point. The local , arising from the approximation of the exact solution, is O(k^2), while the accumulated global error over the interval is O(k), establishing it as a accurate method. In contrast, the uses the backward \frac{u(x_{n+1}) - u(x_n)}{k} \approx u'(x_{n+1}), leading to the implicit relation u_{n+1} = u_n + k f(x_{n+1}, u_{n+1}). This requires solving an equation for u_{n+1} at each step, which may involve nonlinear solvers if f is nonlinear, but the method offers improved for certain problems. The combines the forward and backward approaches by averaging the right-hand side evaluations: u_{n+1} = u_n + \frac{k}{2} \left[ f(x_n, u_n) + f(x_{n+1}, u_{n+1}) \right]. This implicit scheme achieves second-order accuracy, with local O(k^3) and global error O(k^2), providing a balance between precision and the need for iterative solution at each step. A basic implementation for the forward is as follows:
function forward_euler(f, x0, u0, k, N):
    x = x0
    u = u0
    for n = 0 to N-1:
        u_next = u + k * f(x, u)
        x = x + k
        u = u_next
    return x, u
This code advances from the initial values (x_0, u_0) by N steps of size k, evaluating f explicitly at each iteration.

Boundary Value Problems

Boundary value problems (BVPs) for second-order ordinary differential equations (ODEs) involve solving equations of the form u''(x) = f(x, u(x), u'(x)) subject to boundary conditions u(a) = \alpha and u(b) = \beta, where the conditions are specified at the endpoints of the [a, b]. This setup contrasts with initial value problems by requiring the solution to satisfy conditions at two distinct points, leading to a system of algebraic equations rather than a marching procedure. The method discretizes the domain into a uniform grid with spacing h = (b - a)/N, where N is the number of interior points, and approximates the derivatives using finite difference formulas. For the second derivative, the central difference approximation is employed: \frac{u_{i-1} - 2u_i + u_{i+1}}{h^2} \approx u''(x_i), where u_i \approx u(x_i) and x_i = a + i h for i = 1, \dots, N. If the right-hand side depends on the first derivative, it is approximated centrally as u'(x_i) \approx \frac{u_{i+1} - u_{i-1}}{2h}, yielding the discretized equation \frac{u_{i-1} - 2u_i + u_{i+1}}{h^2} = f\left( x_i, u_i, \frac{u_{i+1} - u_{i-1}}{2h} \right) for i = 1, \dots, N, with boundary conditions incorporated as u_0 = \alpha and u_{N+1} = \beta. This results in a system of N nonlinear algebraic equations for linear problems where f is independent of u and u', the system takes the form A \mathbf{u} = \mathbf{b}, where A is an N \times N tridiagonal matrix with 1, -2, and 1 on the subdiagonal, diagonal, and superdiagonal (scaled by $1/h^2), respectively, and \mathbf{b} incorporates the forcing term and boundary values. Such tridiagonal systems are efficiently solved using the Thomas algorithm, a direct method based on Gaussian elimination tailored for this structure, achieving O(N) computational complexity. The central finite difference scheme for second-order BVPs exhibits second-order accuracy, with the global being O(h^2), as derived from the expansions underlying the approximations. A representative example is the one-dimensional Poisson equation u''(x) = -\pi^2 \sin(\pi x) on [0, 1] with Dirichlet boundary conditions u(0) = u(1) = 0, whose exact solution is u(x) = \sin(\pi x). Discretizing with central differences leads to the tridiagonal system \frac{u_{i-1} - 2u_i + u_{i+1}}{h^2} = -\pi^2 \sin(\pi x_i), \quad i = 1, \dots, N, which can be solved via the Thomas algorithm to approximate the solution at grid points, converging to the exact solution at rate O(h^2). For nonlinear BVPs, where f depends on u and/or u', the discretization produces a system of nonlinear equations that can be solved iteratively using methods such as . In this approach, an initial guess for the solution vector is refined through successive linearizations of the discretized equations, solving the resulting tridiagonal systems at each iteration until . The method preserves the second-order accuracy of the underlying scheme provided the nonlinearity is sufficiently smooth.

Applications to Partial Differential Equations

Discretization of the Heat Equation

The one-dimensional models the diffusion of heat in a thin and is expressed as \frac{\partial u}{\partial t} = \alpha \frac{\partial^2 u}{\partial x^2}, where u(x,t) represents the at position x and time t, and \alpha > 0 is the constant. This is typically solved on a rectangular domain $0 \leq x \leq L, t \geq 0, subject to the u(x,0) = g(x) for $0 < x < L and homogeneous Dirichlet boundary conditions u(0,t) = u(L,t) = 0 for t > 0. To apply the finite difference method, the spatial domain [0, L] is discretized into a uniform grid with points x_i = i \Delta x for i = 0, 1, \dots, N+1, where \Delta x = L / (N+1) and the interior points are at i = 1 to N. Similarly, the time domain is discretized with t_n = n \Delta t for n = 0, 1, 2, \dots, where \Delta t > 0 is the time step size. The solution u(x_i, t_n) is approximated by u_i^n. The conditions are incorporated by fixing u_0^n = 0 and u_{N+1}^n = 0 for all n. A key step in the discretization is approximating the spatial second derivative using the central difference stencil, leading to the semi-discrete form via the method of lines. At each interior grid point x_i, the approximation yields the system of ordinary differential equations \frac{du_i}{dt} = \frac{\alpha}{\Delta x^2} (u_{i-1} - 2 u_i + u_{i+1}), \quad i = 1, \dots, N, with the boundary values u_0(t) = 0 and u_{N+1}(t) = 0 enforced at all times t. This reduces the original PDE to a coupled system of N ODEs for the vector \mathbf{u}(t) = (u_1(t), \dots, u_N(t))^T, where the right-hand side is represented by a tridiagonal matrix. The initial condition is set as u_i(0) = g(x_i) for i = 1, \dots, N. Full temporal discretization of this semi-discrete can then be achieved using various time-stepping methods, but the highlights the role of the dimensionless r = \alpha \Delta t / \Delta x^2, which scales the relative importance of temporal and spatial increments in the numerical solution.

Discretization of the Laplace

The two-dimensional Laplace equation, \nabla^2 u = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0, describes steady-state phenomena such as electrostatic potentials or incompressible fluid flow in a rectangular domain \Omega = [a, b] \times [c, d] subject to Dirichlet conditions u = g on \partial \Omega. This requires to obtain a solvable algebraic system, typically via finite differences on a structured . To apply the finite difference method, a uniform Cartesian is superimposed on the with spacing \Delta x = \Delta y = h = (b-a)/N_x = (d-c)/N_y, where N_x and N_y are the number of intervals in each direction. The second derivatives are approximated using central differences, which are second-order accurate based on expansions as outlined in the derivation section. At an interior point (x_i, y_j) = (a + i h, c + j h) for $1 \leq i \leq N_x - 1 and $1 \leq j \leq N_y - 1, the discretized equation becomes the : \frac{u_{i+1,j} + u_{i-1,j} + u_{i,j+1} + u_{i,j-1} - 4u_{i,j}}{h^2} = 0, which simplifies to u_{i+1,j} + u_{i-1,j} + u_{i,j+1} + u_{i,j-1} = 4u_{i,j}. values from the Dirichlet conditions are directly incorporated to form a sparse for the unknown interior values. Ordering the unknowns row-wise (lexicographically by j then i), the resulting system A \mathbf{u} = \mathbf{b} has A that is block tridiagonal, with tridiagonal blocks along the and sub/super-diagonals connecting adjacent rows. The vector \mathbf{b} accounts for boundary contributions. This structure allows efficient solution via methods like or iterative solvers such as . The local truncation error of the is O(h^2), arising from the second-order accuracy of the central operators. Global to the true solution at order O(h^2) follows from and properties. A representative example is the unit square [0,1] \times [0,1] with boundary conditions u(0,y) = u(1,y) = u(x,0) = 0 and u(x,1) = \sin(\pi x). Discretizing with N_x = N_y = M yields (M-1)^2 unknowns and a symmetric positive definite system solvable to demonstrate the method's accuracy, with errors decreasing as O(h^2) upon refinement. For domains with irregular boundaries, one approach extends the uniform grid beyond the domain using ghost points—fictitious nodes outside \Omega—to maintain the stencil while interpolating values to enforce conditions accurately. This technique preserves the O(h^2) accuracy near the boundary without altering the interior .

Numerical Schemes for Parabolic Equations

Explicit Finite Difference Method

The explicit finite difference method, often referred to as the , provides a simple explicit for solving the one-dimensional \frac{\partial u}{\partial t} = \alpha \frac{\partial^2 u}{\partial x^2}. This approach approximates the time derivative using a forward difference and the spatial with a central difference, yielding an update rule that computes the solution at the next time level directly from known values at the current level without solving a . The scheme emerges from the method of lines, where the central difference operator discretizes the spatial derivative to produce a semi-discrete system of ordinary differential equations, subsequently integrated in time using the . The resulting fully discrete approximation is u_i^{n+1} = u_i^n + r (u_{i-1}^n - 2u_i^n + u_{i+1}^n), where r = \alpha \frac{\Delta t}{\Delta x^2}, u_i^n denotes the approximate at grid point x_i = i \Delta x and time t_n = n \Delta t, \Delta x is the spatial grid spacing, and \Delta t is the time step. Implementation involves initializing the spatial grid with the given and then performing iterative updates for each interior grid point using the explicit , while enforcing boundary conditions at the domain edges after each time step. This process is computationally inexpensive per step, relying only on nearest-neighbor values, which facilitates easy and execution on uniform grids. The local for this scheme is O(\Delta t + \Delta x^2), arising from the first-order accurate forward Euler time discretization and the second-order accurate central spatial difference. Stability of the explicit is conditional, necessitating r \leq \frac{1}{2} to prevent oscillatory and ensure to the true as the is refined. The also incorporates inherent numerical through its truncation terms, which introduce additional smoothing effects that can alter sharp features in the beyond the physical diffusion coefficient \alpha.

Implicit Finite Difference Method

The implicit finite difference method addresses the limitations of explicit schemes by using a backward difference approximation for the time in the , resulting in an unconditionally stable . This approach, known as the , approximates the solution at the next time level u_i^{n+1} while incorporating the spatial derivatives also at that future time level, leading to a fully implicit . The scheme for the one-dimensional u_t = \alpha u_{xx} is given by u_i^{n+1} - r (u_{i-1}^{n+1} - 2u_i^{n+1} + u_{i+1}^{n+1}) = u_i^n, where r = \alpha \Delta t / \Delta x^2 is the dimensionless parameter governing the relative step sizes, and the spatial stencil uses central differences for the second derivative as outlined in the discretization of the heat equation. In matrix form, this implicit scheme can be expressed as (I - r A) \mathbf{u}^{n+1} = \mathbf{u}^n, where \mathbf{u}^n is the vector of solution values at time level n, I is the identity matrix, and A is the tridiagonal matrix representing the discrete second derivative operator with entries A_{i,i-1} = 1, A_{i,i} = -2, and A_{i,i+1} = 1. At each time step, this linear system must be solved for \mathbf{u}^{n+1}, typically using a direct solver like the Thomas algorithm for tridiagonal matrices, which has a computational cost of O(N) operations per step for N spatial grid points. The local truncation error of the backward Euler implicit is O(\Delta t + \Delta x^2), achieving second-order accuracy in space but only accuracy in time due to the backward . Despite the lower temporal order, the method exhibits unconditional for any r > 0, meaning the numerical solution remains bounded regardless of the time step size, as proven via arguments showing that the discrete maximum norm does not amplify errors.

Crank-Nicolson Finite Difference Method

The is a scheme that averages the explicit and implicit methods to solve parabolic partial differential equations such as the , achieving second-order accuracy in time while maintaining the stability benefits of the implicit approach. Developed by John Crank and Phyllis Nicolson in 1947, the method was introduced as a practical technique for numerically evaluating solutions to heat conduction problems, offering improved efficiency over purely explicit schemes. The scheme arises from applying the for temporal integration to the semi-discrete form of the , after central finite differences have discretized the spatial derivatives. For the one-dimensional u_t = \alpha u_{xx} on a uniform grid with spatial step \Delta x and temporal step \Delta t, define r = \alpha \Delta t / \Delta x^2 and let u_i^n \approx u(i \Delta x, n \Delta t). The Crank–Nicolson scheme then takes the form u_i^{n+1} - \frac{r}{2} (u_{i-1}^{n+1} - 2 u_i^{n+1} + u_{i+1}^{n+1}) = u_i^n + \frac{r}{2} (u_{i-1}^n - 2 u_i^n + u_{i+1}^n). In , let \mathbf{u}^n denote the vector of solution values at time level n, and let A be the representing the discrete operator scaled by $1 / \Delta x^2. The scheme can be expressed as the \left( I - \frac{r}{2} A \right) \mathbf{u}^{n+1} = \left( I + \frac{r}{2} A \right) \mathbf{u}^n, which is solved iteratively using efficient tridiagonal solvers. The local of the is O(\Delta t^2 + \Delta x^2). It is unconditionally stable for the , permitting time steps unrestricted by stability constraints. However, for large r, the second-order time accuracy can lead to non-physical oscillations in the numerical solution.

Stability and Properties of Schemes

Stability Analysis for the Heat Equation

Stability analysis in finite difference methods for the focuses on ensuring that discretization errors do not amplify over time, preventing numerical solutions from diverging. A primary tool for this is the , which assumes a solution form u_j^n = \xi^n e^{i k j \Delta x}, where \xi is the amplification factor, k is the , \Delta x is the spatial step, and i = \sqrt{-1}. Stability requires |\xi| \leq 1 for all wavenumbers to bound error growth. For the explicit finite difference scheme applied to the one-dimensional u_t = \alpha u_{xx}, with diffusion number r = \alpha \Delta t / \Delta x^2, the amplification factor is \xi = 1 - 4 r \sin^2(\theta/2), where \theta = k \Delta x. The condition |\xi| \leq 1 holds for all \theta only if r \leq 1/2, making the scheme conditionally . In contrast, the implicit finite difference scheme yields \xi = 1 / (1 + 4 r \sin^2(\theta/2)), satisfying |\xi| \leq 1 unconditionally for any r > 0, thus providing unconditional . The Crank-Nicolson scheme, which averages explicit and implicit treatments, has amplification factor \xi = \frac{1 - 2 r \sin^2(\theta/2)}{1 + 2 r \sin^2(\theta/2)}, ensuring unconditional stability since |\xi| \leq 1 for all r > 0 and \theta, with equality only for \theta = 0; it introduces numerical damping for high frequencies. These analyses highlight a parabolic analog to the CFL condition, requiring \Delta t / \Delta x^2 to be bounded appropriately for stability in diffusive problems. Beyond Fourier methods, energy estimates provide an alternative for proving L^2-norm stability by analyzing discrete analogs of the PDE's energy dissipation properties.

Consistency and Convergence

The Lax-Richtmyer equivalence theorem establishes a fundamental connection between consistency, stability, and convergence for linear finite difference schemes approximating well-posed initial value problems for partial differential equations. Specifically, for linear problems, a consistent finite difference scheme converges to the true solution if and only if it is stable. Consistency requires that the local , denoted \tau_h, which measures the extent to which the exact satisfies the equations, approaches zero in an appropriate as the spatial size h and temporal step size k tend to zero: \|\tau_h\| \to 0 as h, k \to 0. For a p-th accurate scheme, the is bounded by O(h^p + k^q), leading to a rate of \|u - u_h\| = O(h^p + k^q) in suitable , assuming holds. In the context of the , standard explicit, implicit, and Crank-Nicolson schemes are consistent for sufficiently smooth solutions, with second-order accuracy in space and first- or second-order in time depending on the scheme. Convergence follows from the Lax equivalence theorem when combined with the stability conditions established for these schemes, such as the Courant-Friedrichs-Lewy condition for explicit methods. For convergence in the supremum norm, the discrete provides a powerful tool, ensuring that the numerical solution remains bounded by the initial and boundary data, which aligns with the for the continuous and facilitates error bounds independent of mesh refinement in certain cases. The error equation for the global error e^n = u^n - u_h^n at time level n takes the form e^{n+1} = S e^n + \tau^{n+1}, where S is the operator and \tau^{n+1} is the local at that level. Iterating this recurrence and applying the bound \|S^n\| \leq K (independent of n) yields \|e^N\| \leq K \sum_{j=0}^{N-1} \|\tau^{j+1}\|, which converges to zero as h, k \to 0 for consistent schemes, confirming the .

Maximum Principle and Subharmonic Functions

In the context of methods for elliptic partial differential equations, such as the Laplace equation discretized using the standard , the discrete states that the solution attains its maximum value on the boundary of the , provided the stencil coefficients satisfy certain positivity conditions. Specifically, for the discrete operator approximating the Laplacian, if the solution u satisfies u_{i,j} \leq \frac{1}{4}(u_{i+1,j} + u_{i-1,j} + u_{i,j+1} + u_{i,j-1}) at interior points, then the maximum of u over the grid occurs on the boundary. The proof of this proceeds by via summation over . Assume the maximum value M is attained at an interior point (i,j); then, from the stencil inequality, the neighbors must all equal M, implying the maximum propagates to adjacent points. By the connectedness of , this forces u \equiv M everywhere, contradicting non-constant data unless the is constant. This argument extends to more general irreducible operators for elliptic equations. Discrete subharmonic functions provide a natural framework for this , defined as functions u where the discrete Laplacian satisfies \Delta_h u_{i,j} \geq 0, or equivalently, u_{i,j} \leq \frac{1}{4} \sum neighbors at each interior point. Such functions inherit the : the supremum is achieved on the boundary, mirroring the continuous case for subharmonic functions with \Delta u \geq 0. This property holds for consistent discretizations of elliptic operators and underpins qualitative error estimates. For parabolic equations like the , the discrete maximum principle manifests as monotonicity preservation in time-stepping s. In the explicit finite difference method, with diffusion parameter r = \alpha \Delta t / (\Delta x)^2 \leq 1/2, the ensures that maxima and minima of the solution remain bounded by those of the and , preventing unphysical oscillations. This condition guarantees the is , preserving the order of the solution. A key underpinning of these principles is the discrete analog of the mean value property for functions. In the continuous setting, a function u is if u(x) = over any centered at x; discretely, for the solution to the homogeneous Laplace equation, u_{i,j} = \frac{1}{4}(u_{i+1,j} + u_{i-1,j} + u_{i,j+1} + u_{i,j-1}) holds exactly at interior grid points. Subharmonic functions satisfy the weak inequality \leq, linking directly to the . These properties imply and for discrete solutions. Uniqueness follows because the difference of two solutions satisfies the homogeneous equation and, by the , must be zero if boundary data match. Existence is ensured by the invertibility of the resulting , with the providing stability bounds on the .

Advanced Techniques

High-Order Finite Differences

High-order finite differences extend the basic approximation of s by incorporating more grid points in the , achieving higher accuracy in the while maintaining the framework. The general form for approximating the m-th at a point x is given by \frac{1}{h^m} \sum_{k=-p}^{q} c_k u(x + k h) \approx D^m u(x), where the coefficients c_k are determined by requiring the approximation to be exact for polynomials up to degree m + r - 1, with r denoting the . These coefficients can be obtained by solving a involving the constructed from the Taylor expansions at the points. For the first derivative, a fourth-order accurate central stencil uses five points: \frac{-u(x+2h) + 8u(x+h) - 8u(x-h) + u(x-2h)}{12 h} = u'(x) + O(h^4). This formula arises from solving the Vandermonde system to cancel terms up to the fourth order in the expansion. Similarly, for the second derivative, the fourth-order employs the same : \frac{-u(x+2h) + 16u(x+h) - 30u(x) + 16u(x-h) - u(x-2h)}{12 h^2} = u''(x) + O(h^4). The coefficients here ensure exactness for and cubic polynomials, with the error term involving the sixth . Compact high-order schemes address the limitations of explicit wide stencils by introducing implicit relations that couple the approximations at neighboring points, allowing higher accuracy with narrower effective stencils. In these methods, the derivatives f_i \approx u'(x_i) satisfy a tridiagonal system, such as \frac{1}{4} f_{i-1} + f_i + \frac{1}{4} f_{i+1} = \frac{3}{2} \frac{u_{i+1} - u_{i-1}}{2h}, which yields a fourth-order accurate for the first after solving the . This approach, derived from Padé approximations to the , provides spectral-like resolution for smooth functions while requiring fewer grid points than explicit schemes of comparable order. Despite their advantages in accuracy and efficiency, high-order finite differences introduce trade-offs. Wider stencils in explicit schemes increase inter-processor communication in parallel implementations, reducing scalability on distributed systems, and heighten sensitivity to boundary conditions, where one-sided approximations may degrade the global order. Compact schemes mitigate some stencil width issues but still necessitate careful boundary treatments to preserve high-order accuracy.

Summation-By-Parts Simultaneous Approximation Term (SBP-SAT) Method

The summation-by-parts (SBP) operators form the foundation of the SBP-SAT method, providing approximations to differential operators that discretely mimic the integration-by-parts formula from the continuous setting. For a first-derivative D \approx \frac{d}{dx}, the SBP property satisfies \mathbf{u}^T P D \mathbf{v} + \mathbf{v}^T P D \mathbf{u} = \mathbf{u}_N v_N - u_0 v_0, where P is a positive definite approximating the L^2 inner product (with diagonal entries typically h in the interior and adjusted at ), \mathbf{u} and \mathbf{v} are vectors of values, and subscripts 0 and N denote points. Here, the terms capture the continuous boundary contributions, enabling estimates analogous to those in the continuous problem. These operators are constructed using centered difference stencils in the interior, with modified stencils near boundaries to satisfy the SBP property while maintaining accuracy. SBP operators are classified by their accuracy orders: order p in the interior (where the approximation error is O(h^p)) and order q at the boundaries (with q \leq p+1), allowing for high-order schemes without sacrificing the mimicking . For instance, second-order SBP operators use standard centered differences interiorly but asymmetric stencils at boundaries to ensure the discrete integration-by-parts holds exactly. The simultaneous approximation term (SAT) complements SBP operators by weakly enforcing conditions through penalty-like additions to the semi-discrete system, rather than strong imposition via modification of stencils. A typical SAT term at the left boundary for a Dirichlet condition u(0,t) = g(t) is \tau_h (u_0 - g), added to the first equation, where \tau_h = \sigma / h and \sigma is a stabilization chosen based on the problem's characteristics (e.g., \sigma \leq -a for inflow in with speed a > 0) to guarantee . This weak enforcement preserves the SBP property and allows flexibility for complex geometries or interfaces. An illustrative application is the one-dimensional linear advection equation u_t + a u_x = 0 on [0,1] with inflow u(0,t) = g(t) and u(x,0) = f(x), assuming a > 0. Using a second-order SBP operator D, the semi-discrete becomes \frac{d\mathbf{u}}{dt} + a D \mathbf{u} = S_{AT}, where S_{AT} = \frac{\sigma}{h} (u_0 - g) \mathbf{e}_0 with \sigma \leq -a ensures an estimate \frac{d}{dt} \| \mathbf{u} \|^2_P \leq 2 a (u_0 g - u_N^2), mimicking the continuous \frac{d}{dt} \int_0^1 u^2 dx = a (u(0)^2 - u(1)^2) and yielding in the L^2 norm. Higher-order extensions follow similarly, with SAT parameters scaled appropriately for the accuracy order. The SBP-SAT method offers key advantages, including rigorous energy for hyperbolic and parabolic problems through discrete analogs of continuous estimates, which prevents instability from treatments—a common issue in high-order finite differences. It also minimizes non-physical reflections at boundaries, improving accuracy in wave propagation and simulations. Originating in the 1990s, the approach built on early SBP ideas from Bertil Gustafsson's analyses in the 1970s, the SAT technique introduced by Mark H. Carpenter, David Gottlieb, and Shaul S. Abarbanel in 1994, and their integration for high-order schemes by Jan Nordström and Mark H. Carpenter in the late 1990s, primarily for applications requiring multidimensional and accuracy.

References

  1. [1]
    Finite Difference Method - Python Numerical Methods
    In the finite difference method, the derivatives in the differential equation are approximated using the finite difference formulas.
  2. [2]
    Finite Difference Methods - ACME Labs
    The finite difference method offers a clear and intuitive starting point for approximating derivatives and solving PDEs by replacing continuous variation with ...
  3. [3]
    None
    ### Summary of Finite Difference Method History and Key Developments
  4. [4]
    [PDF] Brief Summary of Finite Difference Methods
    1.1 Finite Difference formulas. Finite differences (FD) approximate derivatives by combining nearby function values using a set of weights.
  5. [5]
    [PDF] 11. Finite Difference Methods for Partial Differential Equations
    May 18, 2008 · The first are the finite difference methods, obtained by replacing the derivatives in the equation by the appropriate numerical differentiation ...
  6. [6]
    [PDF] Numerical methods-finite difference pdf
    Numerical models solve the flow equation for head or pressure (or water content) by: 1. Subdividing the flow region into 'n' finite blocks in a mesh of grid ...Missing: analysis | Show results with:analysis
  7. [7]
    [PDF] Numerical differentiation: finite differences
    If we need to estimate the rate of change of y with respect to x in such a situation, we can use finite difference formulas to compute approximations of f0(x).
  8. [8]
    A Chronology of Interpolation - ImageScience.Org
    1611: Harriot uses an interpolation formula involving up to fifth-order differences equivalent to the Gregory-Newton formula. This is the oldest known example ...
  9. [9]
    On the approximate arithmetical solution by finite differences of ...
    Richardson Lewis Fry. 1910On the approximate arithmetical solution by finite differences of physical problems involving differential equations, with an ...
  10. [10]
    [PDF] Finite Difference Approximations For Derivatives - cs.Princeton
    Goal: given smooth function f : ℜ→ℜ, find approximate derivatives at some point x. • Consider Taylor series expansions around x: f x + ℎ = f x + f′ x ℎ +.
  11. [11]
    Finite Difference Approximating Derivatives
    The forward difference is to estimate the slope of the function at · +1 ; The backward difference is to estimate the slope of the function at · −1 ; The central ...
  12. [12]
    [PDF] Numerical Differentiation
    Feb 8, 2009 · 3.11) Use forward and backward difference approximations of O(h) and a central difference approximation of O(h2) to estimate the first.
  13. [13]
    [PDF] Lecture 1 Taylor series and finite differences
    Finite differencing is the method of approximating partial derivatives with differences between function values (on a grid). The Taylor series for fi−1(x),fi(x ...
  14. [14]
    [PDF] 1. Finite Difference Approximations
    We can use Taylor series to derive an appropriate formula, using the method of undetermined coefficients. Example 1.2. Suppose we want a one-sided ...
  15. [15]
    [PDF] Chapter 15 Finite Difference Approximation of Derivatives
    The Taylor expansion provides a very useful tool for the derivation of higher or- der approximation to derivatives of any order. There are several approaches to.
  16. [16]
    [PDF] Finite Difference Method - CS 357
    Therefore, the truncation error of the forward finite difference approximation is bounded by: 𝑓! 𝑥 −𝑑𝑓 𝑥 ≤𝑀ℎ. Finite difference method. Page 4. In a ...
  17. [17]
    [PDF] Chapter 3 Truncation Error Analysis Taylor Tables
    Finite Difference Formulas. • Take the expansion for uj−1 uj−1 = uj ... Order of accuracy is defined as the exponent on the ∆x term in ert. 4. Page ...Missing: method | Show results with:method
  18. [18]
    [PDF] Contents 1. Introduction 1 2. Finite difference approximations for ...
    Let us show that differentiating a three-point polynomial interpolant with equispaced points and evaluating its derivative at the central point gives a second ...
  19. [19]
    [PDF] Basic Finite-Difference Methods - twister.ou.edu
    The order of accuracy of the scheme is determined by the lowest powers of Ar and Ax appearing in the truncation error. According to (2.12), the upstream scheme ...
  20. [20]
    [PDF] Euler's Numerical Method - UAH
    Euler's method is used to solve first-order initial-value problems. We start with the point (x0, y0) where y0 = y(x0) is the initial data for the initial ...
  21. [21]
    Finite difference methods for first-order ODEs 1.0 documentation
    Dec 13, 2012 · The purpose of this module is to explain finite difference methods in detail for a simple ordinary differential equation (ODE). Emphasis is put ...
  22. [22]
    7.2: Numerical Methods - Initial Value Problem
    May 31, 2022 · We begin with the simple Euler method, then discuss the more sophisticated RungeKutta methods, and conclude with the Runge-Kutta-Fehlberg method.Missing: finite | Show results with:finite
  23. [23]
    3.1: Euler's Method - Mathematics LibreTexts
    Jan 6, 2020 · We say that the local truncation error of Euler's method is of order \(h^2\), which we write as \(O(h^2)\). Note that the magnitude of the local ...Euler's Method · Examples Illustrating The Error... · Truncation Error in Euler's...
  24. [24]
    1.3: Backward Euler method - Mathematics LibreTexts
    Jul 26, 2022 · The backward Euler method is an iterative method which starts at an initial point and walks the solution forward using the iteration y n + 1 − ...Stability of backward Euler for... · Example: the logistic equation
  25. [25]
    [PDF] Ordinary differential equations - Cornell: Computer Science
    This property is known as A-stability. yn+1 = yn + h 2 (f(tn,yn) + f(tn+1,yn+1)) Trapezoidal Each of these methods is consistent with the ordinary differential ...
  26. [26]
    [PDF] Finite Difference Methods for Differential Equations
    • Finite–difference approximation: – Second–order center difference formula for the interior nodes: yj+1 −2yj +yj−1 h2. = gj for j = 1,...,N where h = 2π. N ...
  27. [27]
    [PDF] Finite Difference Methods for Boundary Value Problems
    Oct 2, 2013 · When p = 1 and q = 0 we have the Poisson equation. −u//. (x) = f (x) ... (x) = π2 sin(πx) 0 < x < 1 u(0) = 0, u(1) = 0 using h = 1/4. Our ...
  28. [28]
    [PDF] Computational Mechanics 4
    Boundary-value problems have boundary conditions at more than one point. These can be solved by finite-difference methods. The solution is found at all points ...
  29. [29]
    [PDF] Handouts on solving tridiagonal system of equations - twister.ou.edu
    The use of higher-order finite difference schemes or higher-order finite elements produces a larger bandwidth in A. The Thomas algorithm is suitable for.
  30. [30]
    [PDF] 11.4 Boundary-Value Problems for Ordinary Differential Equations
    Nonlinear shooting method - Newton's method. Let M be max. number of ... Finite difference method: Set w0 = α, wN+1 = β. wi+1 − 2wi + wi-1 h2. − f. ( xi ...
  31. [31]
    [PDF] 7 Boundary Value Problems for ODEs - Applied Mathematics
    Newton's method for solving the nonlinear equation φ(z)=0is z[i+1] = z ... One can show that the nonlinear finite difference method also has O(h2) conver-.<|control11|><|separator|>
  32. [32]
    Finite Difference Methods for Ordinary and Partial Differential ...
    This book introduces finite difference methods for both ordinary differential equations (ODEs) and partial differential equations (PDEs)
  33. [33]
    [PDF] Finite Difference Solution of the Heat Equation - DSpace@MIT
    The finite difference method begins with the discretization of space and time such that there is an integer number of points in space and an integer number of ...
  34. [34]
    [PDF] Finite difference schemes for the heat equation in one dimension
    The recursion scheme (20.7), or its matrix equivalent (20.8), provides an extremely quick and simple method for solving the heat equation and its relatives ( ...
  35. [35]
    [PDF] 1 Finite difference example: 1D explicit heat equation
    Finite difference discretization of the 1D heat equation. The finite difference method approximates the temperature at given grid points, with spacing Ax.
  36. [36]
    [PDF] Numerical Methods for the Heat Equation
    Finite difference approximations are used to approximate derivatives on a discrete meshgrid. To begin, we discretize the domain. In 1D, the discretization is ...
  37. [37]
    [PDF] 4 The Heat Equation - DAMTP
    For example, in the simplest case of one dimension where Ω = [a, b] the equation becomes just ∂Φ/∂t = K ∂2Φ/∂x2 where x ∈ [a, b]. The heat equation genuinely is ...
  38. [38]
    [PDF] Finite Difference Method for the Solution of Laplace Equation
    Finite difference for a rectangular plate. Suppose we are interested only in the values of the temperature at the nine interior nodal points (xi, yj), where ...
  39. [39]
    Finite-difference ghost-point multigrid methods on Cartesian grids ...
    In ghost points the boundary conditions are enforced in order to close the linear system. ... In this paper we present an original procedure for relaxing the ...
  40. [40]
    [PDF] On the Partial Difference Equations of Mathematical Physics
    ... the difference equation converges to the solution of the differential equation. (Submitted to Math. Ann. September I , 1927). COURANT, FRIEDRICHS AND LEWY.
  41. [41]
    [PDF] Finite difference method for heat equation
    Jan 25, 2013 · The backward Euler scheme is stable in maximum norm for any value of λ. The scheme is unconditionally stable. Proof: At time level n + 1, let ...
  42. [42]
    [PDF] 17 Finite differences for the heat equation - UCSB Math
    Thus, the implicit scheme (7) is stable for all values of s, i.e. ... Using either the forward difference approximation or the backward difference approximation ...
  43. [43]
    [PDF] Implicit Scheme for the Heat Equation
    Let's see what happens if we use a backward difference approximation. We write the scheme at the point (xi,tn) so that the difference equation now becomes. Un i ...<|control11|><|separator|>
  44. [44]
    A practical method for numerical evaluation of solutions of partial ...
    This paper is concerned with methods of evaluating numerical solutions of the non-linear partial differential equation.
  45. [45]
    [PDF] Numerical Analysis – Lecture 9 - DAMTP
    4 . 2) Crank-Nicolson in 2D: Applying the trapezoidal rule to our semi-dicretization (2.12) we obtain the two-dimensional Crank-Nicolson method: (I −. 1. 2.Missing: discrete | Show results with:discrete
  46. [46]
    [PDF] Crank Nicolson Scheme for the Heat Equation
    Crank Nicolson Scheme for the Heat Equation. The goal of this section is to ... unconditionally stable. 2. Stability of Crank-Nicolson Scheme. 3. Page 4. We ...
  47. [47]
    [PDF] Crank-Nicolson Scheme for the 1D Heat Equation ME 448/548 in a ...
    The Crank-Nicolson scheme has a truncation error that is O(∆t2) + O(∆x2). Page 2. 2. 5. For the one-dimensional heat equation, the linear system of equations ...Missing: Δt² + Δx²)
  48. [48]
    Analysis of finite difference equations
    The Crank-Nicolson is unconditionally stable with respect to growing solutions, while it is conditionally stable with the criterion Δt<2/a for avoiding ...Missing: Δt² + Δx²)
  49. [49]
    [PDF] Survey of the Stability of Linear Finite Difference Equations
    Our assumption that is complete with respect to the norm plays an important role in the equivalence theorem of Section 8. 3. The Initial Value Problem. Let A ...Missing: original | Show results with:original
  50. [50]
    Discrete maximum principle for finite-difference operators
    A theorem on error estimation for finite difference analogues of the Dirichlet problem for elliptic equations.Missing: Laplace | Show results with:Laplace
  51. [51]
    [PDF] Generalized Local Maximum Principles for Finite-Difference Operators
    This discrete maximum principle can be used, like its continuous analog, to estab- lish existence, uniqueness and stability of the finite-difference solutions.
  52. [52]
    [PDF] arXiv:1404.3852v2 [math.AP] 10 Jun 2022
    Jun 10, 2022 · (Sub)harmonic functions on T are defined via the discrete Laplacian P − I (or I − P, if one desires a positive semidefinite operator), where P ...
  53. [53]
    [PDF] On the monotonicity conservation in numerical solutions of the heat ...
    Jan 1, 2000 · On the monotonicity conservation in numerical solutions of the heat equation. (RANA : reports on applied and numerical analysis; Vol. 0015).
  54. [54]
    [PDF] Lecture 7: Finite difference method - McGill University
    Jan 18, 2011 · Discrete mean value property. If f = 0, i.e., if u is harmonic, then the corresponding approximate solution satisfies. 4ui,k −ui+1,k −ui−1 ...
  55. [55]
    [PDF] Existence of PDEs Through Finite Difference Methods MATH 580
    Dec 14, 2011 · This maximum principle directly implies that the discretized system admits at most one equation. We thus have directly that for f ≡ 0 and g ≡ 0, ...
  56. [56]
    Compact finite difference schemes with spectral-like resolution
    Finite difference schemes providing an improved representation of a range of scales (spectral-like resolution) in the evaluation of first, second, and higher ...
  57. [57]
    Summation-By-Parts Operators and High-Order Quadrature - arXiv
    Mar 27, 2011 · SBP operators are finite-difference operators that mimic integration by parts. This property can be useful in constructing energy-stable discretizations.
  58. [58]
    [PDF] Summation-by-Parts Operators for High Order Finite Difference ...
    The Simultaneous Approximation Term (SAT) method [1] and the projection method [18],[19] impose the boundary conditions such that the SBP property is.Missing: seminal | Show results with:seminal