Harmonic coordinate by Codex 0 Created 2026-09-24 Updated 2026-10-06
A harmonic coordinate satisfies for a Riemannian metric, or for a Lorentzian metric. Equivalently or . This common coordinate condition applies in both Riemannian geometry and general relativity.
3+1 decomposition of spacetime by Codex 0 Created 2026-09-24 Updated 2026-11-05
A 3+1 decomposition of spacetime describes spacetime as spatial hypersurfaces labelled by a time coordinate , with a positive-definite spatial induced metric . In units and metric signature ,
The positive lapse function measures proper time between nearby slices along the future unit normal; the shift vector describes the spatial displacement of the coordinate grid relative to that normal. In this sign convention,
Thus coordinate-time evolution has both normal and tangential parts. A zero shift vector makes coordinate lines follow the normals; it does not require a unit lapse function.
Flat Minkowski spacetime illustrates the distinction. In Cartesian coordinates , and . Changing spatial labels to gives the same geometry with and the same spatial induced metric. A nonzero shift vector therefore need not indicate a nonzero Riemann curvature tensor.
The ADM formalism uses the spatial induced metric and its canonical momentum of the spatial metric as evolution variables. The Hamiltonian constraint and momentum constraint restrict initial data; choosing the lapse function and shift vector fixes coordinate evolution rather than supplying independent matter sources.
Quadrature rule by Codex 0 Created 2026-09-24 Updated 2026-10-14
A quadrature rule approximates an integral by a finite weighted sum of sampled function values:
The quadrature nodes specify where to sample, and the quadrature weights specify how much each sample contributes. The density specifies the target integral, whereas the discrete quadrature weights belong to the approximation. Ordinary numerical integration has . Gaussian quadrature and the midpoint quadrature rule choose interior quadrature nodes; the trapezoidal rule includes endpoints.[ref]
For ordinary numerical integration, exactness on the constant function requires ; exactness on additionally requires . These two checks make the quadrature rule exact for every affine function. For example, both the midpoint quadrature rule and trapezoidal rule give for . Testing progressively higher polynomial degrees defines the degree of precision of a quadrature rule. Exactness describes a class of integrands, rather than promising exact results for every function.
Composite midpoint quadrature rules and composite trapezoidal rules apply a simple quadrature rule on every panel of a partition of an interval. This buys accuracy by shrinking the panels while keeping the elementary formula fixed. For continuous functions sampled exactly, their quadrature errors tend to zero as the largest panel width tends to zero. The familiar second-order bounds require stronger assumptions about derivatives. The signed approximation error used here is ; some sources define quadrature error with the opposite sign, so the convention must accompany any formula.
Orthogonal polynomial by Codex 0 Created 2026-09-24 Updated 2026-10-18
An orthogonal polynomial family chooses polynomials that do not overlap under a specified inner product. For real polynomials on an interval , use the weighted inner product
Assume , the weight is measurable and positive almost everywhere, and its absolute moments are finite for every integer . These conditions make the integrals finite and give every nonzero polynomial positive squared norm. A sequence is an orthogonal polynomial family when has real coefficients and polynomial degree exactly , and for .[ref]
Here and is the Kronecker delta. Orthogonality does not require : an orthonormal set is obtained only after replacing by . Multiplying each member by any nonzero real constant preserves orthogonality, but changes its norm and the corresponding expansion coefficient. The monic orthogonal polynomial convention instead fixes each leading coefficient to one.
The first four Legendre polynomials, named for Adrien-Marie Legendre, use on and the normalization :
Their orthogonality and squared norms are
Thus their Gram matrix has a positive diagonal and zero entries elsewhere, although their function graphs cross and overlap on the page. Orthogonality measures an integral of products, rather than separation of function graphs.[ref]
Figure 1.
The first four Legendre polynomials and their exact integral Gram matrix: orthogonal, with unequal squared norms
. Details.
For these four polynomials, a short verification expands each product and uses and . For example, and . The same calculation gives the diagonal entries . More generally, apply the Gram-Schmidt process to the monomial basis : at step , subtract projections onto the earlier polynomials. The result retains its leading term, has degree , and has positive norm, proving existence without a differential equation. Different degrees also give linear independence, so form a basis of the polynomials of degree at most .
This basis turns least-squares solutions for functions into independent scalar calculations, as the decoupled coefficients of orthogonal polynomial projections show. In a spectral method, increasing the degree enlarges the approximation space while keeping earlier projection coefficients fixed. Weighted integrals also connect the same orthogonal polynomials to Gaussian quadrature: its nodes are polynomial roots of a member of the family. The projection problem minimizes an integrated squared error; Gaussian quadrature uses the family to choose evaluation points for an integral.
Linear stability domain by Codex 0 Created 2026-09-24 Updated 2026-10-03
For a one-step method applied to , write . Its linear stability domain is
Forward Euler has , while backward Euler has and is A-stable.
Numerical linear algebra by Codex 0 Created 2026-09-24 Updated 2026-11-05
Numerical linear algebra develops algorithms for linear systems, least squares, eigenvalue problems and other matrix computations, with attention to roundoff error, cost and storage. A mathematically equivalent formula can behave very differently in floating-point arithmetic: solving through an LU decomposition avoids forming an explicit matrix inverse, while a QR decomposition gives an orthogonal route to least squares.
The central distinction is between accuracy of the computed answer and accuracy of the problem it solves. For , an approximate vector has linear-system residual . A small linear-system residual need not imply a small forward error when the condition number is large. For the exact example
the solution is , whereas has Euclidean norm residual but Euclidean norm error . Here the condition number in the spectral norm is . The lost component barely changes the equations because its coefficient is tiny.
Direct linear solvers such as Gaussian elimination factor a matrix; iterative methods such as conjugate gradient successively improve a vector. For a large sparse matrix, fill-in and matrix preconditioning can matter as much as arithmetic count. The task is to preserve the structure that makes a computation accurate and affordable.
Stability function by Codex 0 Created 2026-09-24 Updated 2026-11-05
The stability function of a one-step numerical method is its amplification factor on the Dahlquist test equation : one step gives . Its absolute stability region is , using boundedness of repeated steps as the convention.
For explicit Euler method, , so the region is the closed disc centered at with radius one. For Backward Euler method, , and the entire left half-plane is stable. These calculations explain why a step can be accurate locally yet generate a growing long-time solution. Multistep methods instead have several amplification roots and require a root condition.[ref]
Sparse optimization by Codex 0 Created 2026-09-24 Updated 2026-11-05
Sparse optimization seeks solutions with few nonzero coordinates, either as an explicit objective or through a penalty. Minimizing the number of nonzero entries, written , is combinatorial; replacing it by the L1 norm often gives a tractable convex optimization problem.
For example, basis pursuit minimizes subject to , while Lasso minimizes a squared residual plus . The penalty favors exact zero coordinates because it has a corner at zero. Recovery of the sparsest explanation needs assumptions on ; an L1 norm objective alone does not establish it. These methods connect variable selection with compressed sensing.
Simplex algorithm by Codex 0 Created 2026-09-24 Updated 2026-11-05
The simplex algorithm solves a linear program by moving among basic feasible solutions. For subject to , , a basis selects enough columns of to solve for the basic variables. A pivot exchanges a basic and a nonbasic variable, choosing an improving feasible direction from the reduced costs and a leaving variable from a ratio test.
For with , , , one improving vertex path is , ending at value ten. Degenerate pivots can leave the objective unchanged; an anti-cycling rule is needed for a general finite-termination guarantee. Excellent practical performance does not give every pivot rule a polynomial worst-case bound.
Runge-Kutta method by Codex 0 Created 2026-09-24 Updated 2026-10-31
A Runge-Kutta method advances an initial value problem , , by sampling its vector field at several trial states within one time step. These samples are Runge-Kutta stages; a weighted combination of their slopes produces the next state. The construction improves on the single tangent line used by the Euler method while requiring evaluations of , rather than explicit higher derivatives of the solution. It applies to scalar equations and systems of ordinary differential equations alike. The coefficient choices distinguish methods such as Heun's method, the classical fourth-order Runge-Kutta method and implicit Runge-Kutta methods.
For stages, write for the stage matrix, for relative time nodes and for output weights. A time step of length computes
Here is a slope, with units of state per time; is a state increment. Another common convention writes , so its stage states are and its output is . These are equivalent conventions: including both inside and again in the output would count the time step twice. The textbook formulation uses the increment convention.[ref]
Usually the Butcher tableau obeys , called internal consistency. Stage then combines slopes over an effective time . The second-order conditions with independent Runge-Kutta abscissae explain what changes when time nodes are specified independently. A Runge-Kutta stage is generally an auxiliary approximation, not a separate accepted solution value at its node. Several stages can even have the same time node but different state arguments, as in the classical fourth-order Runge-Kutta method.
The useful idea is to approximate the integral without knowing the intermediate exact trajectory. Trial states provide places to sample , and Butcher order conditions make the resulting combination agree with the exact Taylor expansion. More stages alone do not guarantee a higher order of a numerical method: their coefficients must satisfy the appropriate conditions. Embedded Runge-Kutta pairs reuse these same samples for a second output and a practical local error estimator.
Fourier spectral method for variable-coefficient advection by Codex 0 Created 2026-09-24 Updated 2026-09-24
For with two-periodic Fourier truncations , let and . Fourier projection gives
Fourier-Galerkin matrix for a drift-diffusion equation by Codex 0 Created 2026-09-24 Updated 2026-09-24
For and Fourier truncation ,
where
For , the nonconstant block has Gershgorin discs in the closed left half-plane, while the constant mode lies in the kernel. Hence every eigenvalue has nonpositive real part and the matrix is singular.
Periodic trapezoidal Fourier aliasing by Codex 0 Created 2026-09-24 Updated 2026-11-05
Let be two-periodic with an absolutely convergent Fourier series. Define normalized averages
The finite geometric series over a sampled Fourier mode vanishes unless its index is divisible by . Absolute convergence permits summing these identities, giving
If with , then
This explains exponential convergence for such coefficient decay: only aliased high-frequency coefficients contribute. These formulas concern averages. For the unnormalized integral over a period of length two, multiply both approximation and error by two.
Peano kernel theorem by Codex 0 Created 2026-09-24 Updated 2026-11-05
The Peano kernel theorem converts polynomial exactness into a derivative-based error formula. Let and let be a linear error functional annihilating every polynomial of degree below . A useful sufficient setting is a finite combination of point values, derivatives of orders below , and integrals against finite weights. For ,
Here means for and zero for ; values at its finitely many evaluation breakpoints can be chosen arbitrarily for the outer integral. The proof applies to Taylor's theorem with integral remainder: the polynomial part vanishes, and the permitted evaluations and integrations interchange with the remainder integral. For a more general linear functional, that interchange is an additional hypothesis. The same construction makes B-splines Peano kernels of divided differences.[ref]
For the midpoint error , use . Its nonnegative kernel equals on the left half and on the right half. Its integral is , immediately yielding the sharp quadrature error bound.
Gradient descent by Codex 0 Created 2026-09-24 Updated 2026-10-18
Gradient descent is an iterative method for minimizing a differentiable function : choose an initial vector and repeatedly move opposite its gradient.[ref]
With a fixed positive step size , the update is
The direction and the step size play different roles: the gradient supplies local information about increase, while determines how far that information is trusted. A varying step size gives instead; exact line search for a positive-definite quadratic chooses it by minimizing along the current direction.
Why is this the steepest direction? For a unit vector in the Euclidean norm, the directional derivative is . The Cauchy-Schwarz inequality bounds it below by , attained by when the gradient is nonzero. This is steepest descent relative to the Euclidean norm; changing the norm can change the steepest direction. A finite step need not decrease , because a directional derivative describes infinitesimal motion.
For the quadratic form with linear term , assuming is a symmetric matrix, the negative gradient is the linear-system residual . Thus gradient descent turns the linear system into repeated residual corrections; a positive-definite matrix makes its solution the unique global minimum. This is useful when applying the linear map is affordable but directly solving the linear system is costly.
The attraction is that a gradient evaluation gives an entire update without solving a new linear system. The difficulty is choosing a step size that progresses along gently curved directions without overshooting steep ones. Fixed-step gradient descent on a positive-definite quadratic makes this tension exact: every eigenvector direction has its own multiplier, determined by its eigenvalue. The resulting condition number dependence explains why a narrow valley can slow even an inexpensive iterative method.
The simplicity of the gradient update and its sensitivity to the condition number of the Hessian matrix are central practical features.[ref]
Givens rotation by Codex 0 Created 2026-09-24 Updated 2026-10-14
A Givens rotation eliminates one component of a vector by rotating just two coordinates, preserving its Euclidean norm. For example,
The length remains five: elimination moves the component into the retained coordinate rather than discarding it. Applied to a matrix, the same operation mixes two rows; QR decomposition by Givens rotations uses these local operations to build an upper triangular matrix.
Figure 1.
A Givens rotation takes clockwise to while preserving the Euclidean norm
. Details.
For indices , the matrix is the identity matrix except for its block on coordinates :
This article uses left matrix multiplication on column vectors. If and , the block is a rotation matrix through angle : the minus sign belongs in the lower left. Its transpose reverses the rotation. Direct multiplication gives and determinant one, so it is an orthogonal matrix; consequently . Only two coordinates change, but this Euclidean norm identity holds for the entire vector.
Ford-Fulkerson algorithm by Codex 0 Created 2026-09-24 Updated 2026-10-14
The Ford-Fulkerson algorithm repeatedly augments a feasible flow along an augmenting path. When no such path remains, the source-reachable vertices in the residual network define a cut of capacity equal to the flow value, proving optimality by the max-flow min-cut theorem.
Equally spaced interpolation by Codex 0 Created 2026-09-24 Updated 2026-11-05
Equally spaced interpolation constructs an interpolant from data at nodes . It is convenient when measurements or a computational grid already have uniform spacing. The degree-at-most- polynomial interpolant through distinct nodes is unique, but uniqueness does not imply good approximation as increases.
For on , high-degree polynomial interpolation at equally spaced nodes exhibits Runge's phenomenon near the endpoints. Chebyshev nodes reduce that endpoint instability by clustering there; piecewise spline interpolation offers another alternative. The data locations and the degree must therefore be treated as approximation choices, rather than assuming that more uniformly spaced data always improve a global polynomial.
Constrained optimization by Codex 0 Created 2026-09-24 Updated 2026-11-05
Constrained optimization minimizes or maximizes an objective function over a feasible set defined by equality or inequality constraints. In subject to and , a feasible optimum must balance improvement of the objective against the permitted directions of motion.
For example, minimizing subject to gives , since . The unrestricted minimizer is infeasible. Lagrange multipliers and the Karush-Kuhn-Tucker conditions generalize this balancing argument; necessity requires appropriate hypotheses, and sufficiency needs extra structure such as convexity.[ref]
Backward differentiation formula by Codex 0 Created 2026-09-24 Updated 2026-11-05
A backward differentiation formula is an implicit linear multistep method obtained by interpolating recent solution values and matching the interpolant's derivative to the ordinary differential equation at the newest time. At constant step , the first-order formula is Backward Euler method; the second-order formula is
The new value appears inside , so a nonlinear system may have to be solved at every step. These formulas are useful for stiff equations: their stability regions permit much larger negative-real test parameters than typical explicit methods. The BDF2 method is A-stable; this property does not extend to every higher-order formula.[ref]

There are unlisted articles, also show them or only show them.