WikiLean Articles · Brain · Recent changes · Proposals · Flags · Stats · About

Diff — Finite difference

Revision #1223 → #1831 · back to history

modifiedDifference operator2557a01cd614
FieldFrom #1223To #1831
anchors[{"section":"(Lead)","snippet":"is the operator that maps a function f to the function"},{"type":"math_alttext","value":"{\\displaystyle \\Delta [f](x)=f(x+1)-f(x).}"}]
modifiedDifference equation6a7c95bc2ef2
FieldFrom #1223To #1831
anchors[{"section":"(Lead)","snippet":"A difference equation is a functional equation that involves the finite difference operator"},{"type":"math_alttext","value":"{\\displaystyle \\Delta [f](x)=f(x+1)-f(x).}"}]
modifiedBackward difference17bc9fff46ef
FieldFrom #1223To #1831
anchors[{"section":"Basic types","snippet":"A backward difference uses the function values at x and x − h"},{"type":"math_alttext","value":"{\\displaystyle \\nabla _{h}[f](x)=f(x)-f(x-h)=\\Delta _{h}[f](x-h).}"}]
modifiedCentral difference2a7b56177e90
FieldFrom #1223To #1831
anchors[{"section":"Basic types","snippet":"Finally, the central difference is given by"},{"type":"math_alttext","value":"{\\displaystyle \\delta _{h}[f](x)=f(x+{\\tfrac {h}{2}})-f(x-{\\tfrac {h}{2}})=\\Delta _{\\tfrac {h}{2}}[f](x)+\\nabla _{\\tfrac {h}{2}}[f](x).}"}]
modifiedDerivative as a limitafda5040f83d
FieldFrom #1223To #1831
anchors[{"section":"Relation with derivatives","snippet":"The derivative of a function f at a point x is defined by the limit"},{"type":"math_alttext","value":"{\\displaystyle f'(x)=\\lim _{h\\to 0}{\\frac {f(x+h)-f(x)}{h}}.}"}]
modifiedForward difference approximates derivative831783fb3fe6
FieldFrom #1223To #1831
anchors[{"section":"Relation with derivatives","snippet":"Hence, the forward difference divided by h approximates the derivative when h is small"},{"type":"math_alttext","value":"{\\displaystyle {\\frac {\\Delta _{h}[f](x)}{h}}-f'(x)=o(h)\\to 0\\quad {\\text{as }}h\\to 0.}"}]
modifiedBackward difference approximatione1ddecf26d27
FieldFrom #1223To #1831
anchors[{"section":"Relation with derivatives","snippet":"The same formula holds for the backward difference"},{"type":"math_alttext","value":"{\\displaystyle {\\frac {\\nabla _{h}[f](x)}{h}}-f'(x)=o(h)\\to 0\\quad {\\text{as }}h\\to 0.}"}]
modifiedCentral difference is more accuratea7a77757be63
FieldFrom #1223To #1831
anchors[{"section":"Relation with derivatives","snippet":"However, the central (also called centered) difference yields a more accurate approximation"},{"type":"math_alttext","value":"{\\displaystyle {\\frac {\\delta _{h}[f](x)}{h}}-f'(x)=o\\left(h^{2}\\right).}"}]
modifiedCentral difference approximation of second derivative154baed043e8
FieldFrom #1223To #1831
anchors[{"section":"Higher-order differences","snippet":"we obtain the central difference approximation of the second derivative"},{"type":"math_alttext","value":"{\\displaystyle f''(x)\\approx {\\frac {\\delta _{h}^{2}[f](x)}{h^{2}}}={\\frac {{\\frac {f(x+h)-f(x)}{h}}-{\\frac {f(x)-f(x-h)}{h}}}{h}}={\\frac {f(x+h)-2f(x)+f(x-h)}{h^{2}}}~.}"}]
modifiedn-th order forward, backward, and central differencesfb15774bdc6b
FieldFrom #1223To #1831
anchors[{"section":"Higher-order differences","snippet":"the n -th order forward, backward, and central differences are given by"},{"type":"math_alttext","value":"{\\displaystyle \\Delta _{h}^{n}[f](x)=\\sum _{j=0}^{n}(-1)^{n-j}{\\binom {n}{j}}f{\\bigl (}x+jh{\\bigr )},}"},{"type":"math_alttext","value":"{\\displaystyle \\nabla _{h}^{n}[f](x)=\\sum _{j=0}^{n}(-1)^{j}{\\binom {n}{j}}f(x-jh),}"},{"type":"math_alttext","value":"{\\displaystyle \\delta _{h}^{n}[f](x)=\\sum _{j=0}^{n}(-1)^{j}{\\binom {n}{j}}f\\left(x+\\left({\\frac {n}{2}}-j\\right)h\\right)~.}"}]
modifiedSecond-order accurate first-derivative combination939b41bbd6ca
FieldFrom #1223To #1831
anchors[{"section":"Higher-order differences","snippet":"approximates f ′( x ) up to a term of order h 2"},{"type":"math_alttext","value":"{\\displaystyle {\\frac {\\Delta _{h}[f](x)-{\\frac {1}{2}}\\Delta _{h}^{2}[f](x)}{h}}=-{\\frac {f(x+2h)-4f(x+h)+3f(x)}{2h}}}"}]
modifiedSeminumerical differentiation of second derivativea13b7c8668bf
FieldFrom #1223To #1831
anchors[{"section":"Higher-order differences","snippet":"the latter can be approximated by second-order central difference of f ′( x )"},{"type":"math_alttext","value":"{\\displaystyle f''(x)\\approx {\\frac {f'(x+h)-f'(x-h)}{2h}}~.}"}]
modifiedn-th pairwise difference of degree-n polynomial06764d5b86b3
FieldFrom #1223To #1831
anchors[{"section":"Polynomials","snippet":"After n pairwise differences, the following result can be achieved"},{"type":"math_alttext","value":"{\\displaystyle \\Delta _{h}^{n}[P](x)=ah^{n}n!}"}]
modifiedBase case for polynomial difference321224d2b546
FieldFrom #1223To #1831
anchors[{"section":"Base case","snippet":"Let Q ( x ) be a polynomial of degree 1"},{"type":"math_alttext","value":"{\\displaystyle \\Delta _{h}[Q](x)=Q(x+h)-Q(x)=[a(x+h)+b]-[ax+b]=ah=ah^{1}1!}"}]
modifiedInductive step for polynomial difference20c45ca1326b
FieldFrom #1223To #1831
anchors[{"section":"Inductive step","snippet":"Let R ( x ) be a polynomial of degree m − 1 where m ≥ 2"},{"type":"math_alttext","value":"{\\displaystyle \\Delta _{h}^{m-1}[R](x)=ah^{m-1}(m-1)!}"}]
modifiedPower and Leibniz rule for differences79a806e70c9d
FieldFrom #1223To #1831
anchors[{"section":"Properties","snippet":"For all positive k and n"},{"type":"math_alttext","value":"{\\displaystyle \\Delta _{kh}^{n}\\left(f,x\\right)=\\sum \\limits _{j_{1}=0}^{k-1}\\sum \\limits _{j_{2}=0}^{k-1}\\cdots \\sum \\limits _{j_{n}=0}^{k-1}\\Delta _{h}^{n}\\left(f,x+j_{1}h+j_{2}h+\\cdots +j_{n}h\\right).}"}]
modifiedSine function and Newton series7c5e405caccf
FieldFrom #1223To #1831
anchors[{"section":"Newton's series","snippet":"the sine function vanishes at integer multiples of"},{"type":"math_alttext","value":"{\\displaystyle {\\binom {x}{k}}={\\frac {(x)_{k}}{k!}}}"},{"type":"math_alttext","value":"{\\displaystyle (x)_{k}=x(x-1)(x-2)\\cdots (x-k+1)}"}]
modifiedDoubling Fibonacci sequence Newton formulaba0454129add
FieldFrom #1223To #1831
anchors[{"section":"Newton's series","snippet":"consider the first few terms of doubling the Fibonacci sequence"},{"type":"math_alttext","value":"{\\displaystyle {\\begin{matrix}{\\begin{array}{|c||c|c|c|}\\hline x&f=\\Delta ^{0}&\\Delta ^{1}&\\Delta ^{2}\\\\\\hline 1&{\\underline {2}}&&\\\\&&{\\underline {0}}&\\\\2&2&&{\\underline {2}}\\\\&&2&\\\\3&4&&\\\\\\hline \\end{array}}&\\quad {\\begin{aligned}f(x)&=\\Delta ^{0}\\cdot 1+\\Delta ^{1}\\cdot {\\dfrac {(x-x_{0})_{1}}{1!}}+\\Delta ^{2}\\cdot {\\dfrac {(x-x_{0})_{2}}{2!}}\\quad (x_{0}=1)\\\\\\\\&=2\\cdot 1+0\\cdot {\\dfrac {x-1}{1}}+2\\cdot {\\dfrac {(x-1)(x-2)}{2}}\\\\\\\\&=2+(x-1)(x-2)\\\\\\end{aligned}}\\end{matrix}}}"}]
modifiedDivided differences for nonuniform stepsfc92d6d80fa1
FieldFrom #1223To #1831
anchors[{"section":"Newton's series","snippet":"For the case of nonuniform steps in the values of x , Newton computes the divided differences"},{"type":"math_alttext","value":"{\\displaystyle \\Delta _{j,0}=y_{j},\\qquad \\Delta _{j,k}={\\frac {\\Delta _{j+1,k-1}-\\Delta _{j,k-1}}{x_{j+k}-x_{j}}}\\quad \\ni \\quad \\left\\{k>0,\\;j\\leq \\max \\left(j\\right)-k\\right\\},\\qquad \\Delta 0_{k}=\\Delta _{0,k}}"},{"type":"math_alttext","value":"{\\displaystyle {P_{0}}=1,\\quad \\quad P_{k+1}=P_{k}\\cdot \\left(\\xi -x_{k}\\right),}"},{"type":"math_alttext","value":"{\\displaystyle f(\\xi )=\\Delta 0\\cdot P\\left(\\xi \\right).}"}]
modifiedMahler's theorem3066c8cb6e5f
FieldFrom #1223To #1831
mathlib.declhasSum_mahlerPadicInt.hasSum_mahler
noteMahler's theorem is `hasSum_mahler`: every continuous `f : C(ℤ_[p], E)` equals the sum `∑ mahlerTerm (Δ_[1]^[n] f 0) n`.Mahler's theorem is `PadicInt.hasSum_mahler`: every continuous `f : C(ℤ_[p], E)` equals the sum `∑ mahlerTerm (Δ_[1]^[n] f 0) n`.
modifiedDifference operator as shift minus identity71f904f040da
FieldFrom #1223To #1831
anchors[{"section":"Calculus of finite differences","snippet":"The forward difference can be considered as an operator , called the difference operator"},{"type":"math_alttext","value":"{\\displaystyle \\Delta _{h}=\\operatorname {T} _{h}-\\operatorname {I} ,}"}]
modifiedOperator equation T_h = e^{hD}808251bd50bc
FieldFrom #1223To #1831
anchors[{"section":"Calculus of finite differences","snippet":"Formally applying the Taylor series with respect to h , yields the operator equation"},{"type":"math_alttext","value":"{\\displaystyle \\operatorname {\\Delta } _{h}=h\\operatorname {D} +{\\frac {1}{2!}}h^{2}\\operatorname {D} ^{2}+{\\frac {1}{3!}}h^{3}\\operatorname {D} ^{3}+\\cdots =e^{h\\operatorname {D} }-\\operatorname {I} ,}"},{"type":"math_alttext","value":"{\\displaystyle h\\operatorname {D} =\\ln(1+\\Delta _{h})=\\Delta _{h}-{\\tfrac {1}{2}}\\,\\Delta _{h}^{2}+{\\tfrac {1}{3}}\\,\\Delta _{h}^{3}-\\cdots ~.}"}]
modifiedUmbral sine5aaa83abcf62
FieldFrom #1223To #1831
anchors[{"section":"Calculus of finite differences","snippet":"For example, the umbral sine is"},{"type":"math_alttext","value":"{\\displaystyle \\sin \\left(x\\operatorname {T} _{h}^{-1}\\right)=x-{\\frac {(x)_{3}}{3!}}+{\\frac {(x)_{5}}{5!}}-{\\frac {(x)_{7}}{7!}}+\\cdots }"}]
modifiedDirac delta umbral correspondentb36d6951ab87
FieldFrom #1223To #1831
anchors[{"section":"Calculus of finite differences","snippet":"the Dirac delta function maps to its umbral correspondent, the cardinal sine function"},{"type":"math_alttext","value":"{\\displaystyle \\delta (x)\\mapsto {\\frac {\\sin \\left[{\\frac {\\pi }{2}}\\left(1+{\\frac {x}{h}}\\right)\\right]}{\\pi (x+h)}},}"}]
modifiedConstant and Linearity rulescbc99dfd764e
FieldFrom #1223To #1831
anchors[{"section":"Rules for calculus of finite difference operators","snippet":"Constant rule : If c is a constant"},{"type":"math_alttext","value":"{\\displaystyle \\Delta c=0}"}]
modifiedGeneralized finite differencefd693469905c
FieldFrom #1223To #1831
anchors[{"section":"Generalizations","snippet":"A generalized finite difference is usually defined as"},{"type":"math_alttext","value":"{\\displaystyle \\Delta _{h}^{\\mu }[f](x)=\\sum _{k=0}^{N}\\mu _{k}f(x+kh),}"}]
modifiedPartial derivative finite difference approximationsdd62e7dd8063
FieldFrom #1223To #1831
anchors[{"section":"Multivariate finite differences","snippet":"Some partial derivative approximations are"},{"type":"math_alttext","value":"{\\displaystyle {\\begin{aligned}f_{x}(x,y)&\\approx {\\frac {f(x+h,y)-f(x-h,y)}{2h}}\\\\f_{y}(x,y)&\\approx {\\frac {f(x,y+k)-f(x,y-k)}{2k}}\\\\f_{xx}(x,y)&\\approx {\\frac {f(x+h,y)-2f(x,y)+f(x-h,y)}{h^{2}}}\\\\f_{yy}(x,y)&\\approx {\\frac {f(x,y+k)-2f(x,y)+f(x,y-k)}{k^{2}}}\\\\f_{xy}(x,y)&\\approx {\\frac {f(x+h,y+k)-f(x+h,y-k)-f(x-h,y+k)+f(x-h,y-k)}{4hk}}.\\end{aligned}}}"}]
modifiedEfficient mixed partial formula406f5b80a2e3
FieldFrom #1223To #1831
anchors[{"section":"Multivariate finite differences","snippet":"a more efficient formula for the last case is"},{"type":"math_alttext","value":"{\\displaystyle f_{xy}(x,y)\\approx {\\frac {f(x+h,y+k)-f(x+h,y)-f(x,y+k)+2f(x,y)-f(x-h,y)-f(x,y-k)+f(x-h,y-k)}{2hk}},}"}]
addedFinite difference methoda00a2da621ed
addedFalling factorial / Pochhammer symbol4b8c0abac0fe
addedChu–Vandermonde identitydf1a55f0c0b9