title: Difference quotient
text: # Difference quotient
  
  In single-variable calculus, the difference quotient is usually the name for the expression
  
      ${\frac {f(x+h)-f(x)}{h}}$
  
  which when taken to the limit as h approaches 0 gives the derivative of the function f. The name of the expression stems from the fact that it is the quotient of the difference of values of the function by the difference of the corresponding values of its argument (the latter is (x + h) - x = h in this case). The difference quotient is a measure of the average rate of change of the function over an interval (in this case, an interval of length $h).^{:237}$ The limit of the difference quotient (i.e., the derivative) is thus the instantaneous rate of change.
  
  By a slight change in notation (and viewpoint), for an interval [a, b], the difference quotient
  
      ${\frac {f(b)-f(a)}{b-a}}$
  
  is called the mean (or average) value of the derivative of f over the interval [a, b]. This name is justified by the mean value theorem, which states that for a differentiable function f, its derivative f′ reaches its mean value at some point in the interval. Geometrically, this difference quotient measures the slope of the secant line passing through the points with coordinates (a, f(a)) and (b, f(b)).
  
  Difference quotients are used as approximations in numerical differentiation, but they have also been subject of criticism in this application.
  
  Difference quotients may also find relevance in applications involving Time discretization, where the width of the time step is used for the value of h.
  
  The difference quotient is sometimes also called the Newton quotient (after Isaac Newton) or Fermat's difference quotient (after Pierre de Fermat).
  
  ## Overview
  
  The typical notion of the difference quotient discussed above is a particular case of a more general concept. The primary vehicle of calculus and other higher mathematics is the function. Its "input value" is its argument, usually a point ("P") expressible on a graph. The difference between two points, themselves, is known as their Delta (ΔP), as is the difference in their function result, the particular notation being determined by the direction of formation:
  
  * Forward difference: ΔF(P) = F(P + ΔP) − F(P);
  * Central difference: δF(P) = F(P + ½ΔP) − F(P − ½ΔP);
  * Backward difference: ∇F(P) = F(P) − F(P − ΔP).
  
  The general preference is the forward orientation, as F(P) is the base, to which differences (i.e., "ΔP"s) are added to it. Furthermore,
  
  * If |ΔP| is finite (meaning measurable), then ΔF(P) is known as a finite difference, with specific denotations of DP and DF(P);
  * If |ΔP| is infinitesimal (an infinitely small amount—$\iota$—usually expressed in standard analysis as a limit: $\lim _{\Delta P\rightarrow 0}\,\!$), then ΔF(P) is known as an infinitesimal difference, with specific denotations of dP and dF(P) (in calculus graphing, the point is almost exclusively identified as "x" and F(x) as "y").
  
  The function difference divided by the point difference is known as "difference quotient":
  
      ${\frac {\Delta F(P)}{\Delta P}}={\frac {F(P+\Delta P)-F(P)}{\Delta P}}={\frac {\nabla F(P+\Delta P)}{\Delta P}}.\,\!$
  
  If ΔP is infinitesimal, then the difference quotient is a derivative, otherwise it is a divided difference:
  
      ${\text{If }}|\Delta P|={\mathit {\iota }}:\quad {\frac {\Delta F(P)}{\Delta P}}={\frac {dF(P)}{dP}}=F'(P)=G(P);\,\!$
      ${\text{If }}|\Delta P|>{\mathit {\iota }}:\quad {\frac {\Delta F(P)}{\Delta P}}={\frac {DF(P)}{DP}}=F[P,P+\Delta P].\,\!$
  
  ## Defining the point range
  
  Regardless if ΔP is infinitesimal or finite, there is (at least—in the case of the derivative—theoretically) a point range, where the boundaries are P ± (0.5) ΔP (depending on the orientation—ΔF(P), δF(P) or ∇F(P)):
  
      LB = Lower Boundary; UB = Upper Boundary;
  
  Derivatives can be regarded as functions themselves, harboring their own derivatives. Thus each function is home to sequential degrees ("higher orders") of derivation, or differentiation. This property can be generalized to all difference quotients. As this sequencing requires a corresponding boundary splintering, it is practical to break up the point range into smaller, equi-sized sections, with each section being marked by an intermediary point $(P_i),$ where LB = $P_0$ and UB = $P_ń,$ the nth point, equaling the degree/order:
  
  ## The primary difference quotient (Ń = 1)
  
      ${\frac {\Delta F(P_{0})}{\Delta P}}={\frac {F(P_{\acute {n}})-F(P_{0})}{\Delta _{\acute {n}}P}}={\frac {F(P_{1})-F(P_{0})}{\Delta _{1}P}}={\frac {F(P_{1})-F(P_{0})}{P_{1}-P_{0}}}.\,\!$
  
  ### As a derivative
  
      The difference quotient as a derivative needs no explanation, other than to point out that, since $P_0$ essentially equals $P_1$ = $P_2$ = ... = $P_ń$ (as the differences are infinitesimal), the Leibniz notation and derivative expressions do not distinguish P to $P_0$ or $P_ń:$
            ${\frac {dF(P)}{dP}}={\frac {F(P_{1})-F(P_{0})}{dP}}=F'(P)=G(P).\,\!$
  
  There are other derivative notations, but these are the most recognized, standard designations.
  
  ### As a divided difference
  
      A divided difference, however, does require further elucidation, as it equals the average derivative between and including LB and UB:
         ${\begin{aligned}P_{(tn)}&=LB+{\frac {TN-1}{UT-1}}\Delta B\ =UB-{\frac {UT-TN}{UT-1}}\Delta B;\\[10pt]&\qquad {\color {white}.}(P_{(1)}=LB,\ P_{(ut)}=UB){\color {white}.}\\[10pt]F'(P_{\tilde {a}})&=F'(LB<P<UB)=\sum _{TN=1}^{UT=\infty }{\frac {F'(P_{(tn)})}{UT}}.\end{aligned}}$
      In this interpretation, $P_ã$ represents a function extracted, average value of P (midrange, but usually not exactly midpoint), the particular valuation depending on the function averaging it is extracted from. More formally, $P_ã$ is found in the mean value theorem of calculus, which says:
         For any function that is continuous on [LB,UB] and differentiable on (LB,UB) there exists some $P_ã$ in the interval (LB,UB) such that the secant joining the endpoints of the interval [LB,UB] is parallel to the tangent at $P_ã.$
      Essentially, $P_ã$ denotes some value of P between LB and UB—hence,
         $P_{\tilde {a}}:=LB<P<UB=P_{0}<P<P_{\acute {n}}\,\!$
      which links the mean value result with the divided difference:
         ${\begin{aligned}{\frac {DF(P_{0})}{DP}}&=F[P_{0},P_{1}]={\frac {F(P_{1})-F(P_{0})}{P_{1}-P_{0}}}=F'(P_{0}<P<P_{1})=\sum _{TN=1}^{UT=\infty }{\frac {F'(P_{(tn)})}{UT}},\\[8pt]&={\frac {DF(LB)}{DB}}={\frac {\Delta F(LB)}{\Delta B}}={\frac {\nabla F(UB)}{\Delta B}},\\[8pt]&=F[LB,UB]={\frac {F(UB)-F(LB)}{UB-LB}},\\[8pt]&=F'(LB<P<UB)=G(LB<P<UB).\end{aligned}}$
      As there is, by its very definition, a tangible difference between $LB/P_0$ and $UB/P_ń,$ the Leibniz and derivative expressions do require divarication of the function argument.
  
  ## Higher-order difference quotients
  
  ### Second order
  
      ${\begin{aligned}{\frac {\Delta ^{2}F(P_{0})}{\Delta _{1}P^{2}}}&={\frac {\Delta F'(P_{0})}{\Delta _{1}P}}={\frac {{\frac {\Delta F(P_{1})}{\Delta _{1}P}}-{\frac {\Delta F(P_{0})}{\Delta _{1}P}}}{\Delta _{1}P}},\\[10pt]&={\frac {{\frac {F(P_{2})-F(P_{1})}{\Delta _{1}P}}-{\frac {F(P_{1})-F(P_{0})}{\Delta _{1}P}}}{\Delta _{1}P}},\\[10pt]&={\frac {F(P_{2})-2F(P_{1})+F(P_{0})}{\Delta _{1}P^{2}}};\end{aligned}}$
      ${\begin{aligned}{\frac {d^{2}F(P)}{dP^{2}}}&={\frac {dF'(P)}{dP}}={\frac {F'(P_{1})-F'(P_{0})}{dP}},\\[10pt]&=\ {\frac {dG(P)}{dP}}={\frac {G(P_{1})-G(P_{0})}{dP}},\\[10pt]&={\frac {F(P_{2})-2F(P_{1})+F(P_{0})}{dP^{2}}},\\[10pt]&=F''(P)=G'(P)=H(P)\end{aligned}}$
      ${\begin{aligned}{\frac {D^{2}F(P_{0})}{DP^{2}}}&={\frac {DF'(P_{0})}{DP}}={\frac {F'(P_{1}<P<P_{2})-F'(P_{0}<P<P_{1})}{P_{1}-P_{0}}},\\[10pt]&{\color {white}.}\qquad \neq {\frac {F'(P_{1})-F'(P_{0})}{P_{1}-P_{0}}},\\[10pt]&=F[P_{0},P_{1},P_{2}]={\frac {F(P_{2})-2F(P_{1})+F(P_{0})}{(P_{1}-P_{0})^{2}}},\\[10pt]&=F''(P_{0}<P<P_{2})=\sum _{TN=1}^{\infty }{\frac {F''(P_{(tn)})}{UT}},\\[10pt]&=G'(P_{0}<P<P_{2})=H(P_{0}<P<P_{2}).\end{aligned}}$
  
  ### Third order
  
      ${\begin{aligned}{\frac {\Delta ^{3}F(P_{0})}{\Delta _{1}P^{3}}}&={\frac {\Delta ^{2}F'(P_{0})}{\Delta _{1}P^{2}}}={\frac {\Delta F''(P_{0})}{\Delta _{1}P}}={\frac {{\frac {\Delta F'(P_{1})}{\Delta _{1}P}}-{\frac {\Delta F'(P_{0})}{\Delta _{1}P}}}{\Delta _{1}P}},\\[10pt]&={\frac {{\frac {{\frac {\Delta F(P_{2})}{\Delta _{1}P}}-{\frac {\Delta F'(P_{1})}{\Delta _{1}P}}}{\Delta _{1}P}}-{\frac {{\frac {\Delta F'(P_{1})}{\Delta _{1}P}}-{\frac {\Delta F'(P_{0})}{\Delta _{1}P}}}{\Delta _{1}P}}}{\Delta _{1}P}},\\[10pt]&={\frac {{\frac {F(P_{3})-2F(P_{2})+F(P_{1})}{\Delta _{1}P^{2}}}-{\frac {F(P_{2})-2F(P_{1})+F(P_{0})}{\Delta _{1}P^{2}}}}{\Delta _{1}P}},\\[10pt]&={\frac {F(P_{3})-3F(P_{2})+3F(P_{1})-F(P_{0})}{\Delta _{1}P^{3}}};\end{aligned}}$
      ${\begin{aligned}{\frac {d^{3}F(P)}{dP^{3}}}&={\frac {d^{2}F'(P)}{dP^{2}}}={\frac {dF''(P)}{dP}}={\frac {F''(P_{1})-F''(P_{0})}{dP}},\\[10pt]&={\frac {d^{2}G(P)}{dP^{2}}}\ ={\frac {dG'(P)}{dP}}\ ={\frac {G'(P_{1})-G'(P_{0})}{dP}},\\[10pt]&{\color {white}.}\qquad \qquad \ \ ={\frac {dH(P)}{dP}}\ ={\frac {H(P_{1})-H(P_{0})}{dP}},\\[10pt]&={\frac {G(P_{2})-2G(P_{1})+G(P_{0})}{dP^{2}}},\\[10pt]&={\frac {F(P_{3})-3F(P_{2})+3F(P_{1})-F(P_{0})}{dP^{3}}},\\[10pt]&=F'''(P)=G''(P)=H'(P)=I(P);\end{aligned}}$
      ${\begin{aligned}{\frac {D^{3}F(P_{0})}{DP^{3}}}&={\frac {D^{2}F'(P_{0})}{DP^{2}}}={\frac {DF''(P_{0})}{DP}}={\frac {F''(P_{1}<P<P_{3})-F''(P_{0}<P<P_{2})}{P_{1}-P_{0}}},\\[10pt]&{\color {white}.}\qquad \qquad \qquad \qquad \qquad \ \ \neq {\frac {F''(P_{1})-F''(P_{0})}{P_{1}-P_{0}}},\\[10pt]&={\frac {{\frac {F'(P_{2}<P<P_{3})-F'(P_{1}<P<P_{2})}{P_{1}-P_{0}}}-{\frac {F'(P_{1}<P<P_{2})-F'(P_{0}<P<P_{1})}{P_{1}-P_{0}}}}{P_{1}-P_{0}}},\\[10pt]&={\frac {F'(P_{2}<P<P_{3})-2F'(P_{1}<P<P_{2})+F'(P_{0}<P<P_{1})}{(P_{1}-P_{0})^{2}}},\\[10pt]&=F[P_{0},P_{1},P_{2},P_{3}]={\frac {F(P_{3})-3F(P_{2})+3F(P_{1})-F(P_{0})}{(P_{1}-P_{0})^{3}}},\\[10pt]&=F'''(P_{0}<P<P_{3})=\sum _{TN=1}^{UT=\infty }{\frac {F'''(P_{(tn)})}{UT}},\\[10pt]&=G''(P_{0}<P<P_{3})\ =H'(P_{0}<P<P_{3})=I(P_{0}<P<P_{3}).\end{aligned}}$
  
  ### Nth order
  
      ${\begin{aligned}\Delta ^{\acute {n}}F(P_{0})&=F^{({\acute {n}}-1)}(P_{1})-F^{({\acute {n}}-1)}(P_{0}),\\[10pt]&={\frac {F^{({\acute {n}}-2)}(P_{2})-F^{({\acute {n}}-2)}(P_{1})}{\Delta _{1}P}}-{\frac {F^{({\acute {n}}-2)}(P_{1})-F^{({\acute {n}}-2)}(P_{0})}{\Delta _{1}P}},\\[10pt]&={\frac {{\frac {F^{({\acute {n}}-3)}(P_{3})-F^{({\acute {n}}-3)}(P_{2})}{\Delta _{1}P}}-{\frac {F^{({\acute {n}}-3)}(P_{2})-F^{({\acute {n}}-3)}(P_{1})}{\Delta _{1}P}}}{\Delta _{1}P}}\\[10pt]&{\color {white}.}\qquad -{\frac {{\frac {F^{({\acute {n}}-3)}(P_{2})-F^{({\acute {n}}-3)}(P_{1})}{\Delta _{1}P}}-{\frac {F^{({\acute {n}}-3)}(P_{1})-F^{({\acute {n}}-3)}(P_{0})}{\Delta _{1}P}}}{\Delta _{1}P}},\\[10pt]&=\cdots \end{aligned}}$
      ${\begin{aligned}{\frac {\Delta ^{\acute {n}}F(P_{0})}{\Delta _{1}P^{\acute {n}}}}&={\frac {\sum _{I=0}^{\acute {N}}{-1 \choose {\acute {N}}-I}{{\acute {N}} \choose I}F(P_{0}+I\Delta _{1}P)}{\Delta _{1}P^{\acute {n}}}};\\[10pt]&{\frac {\nabla ^{\acute {n}}F(P_{\acute {n}})}{\Delta _{1}P^{\acute {n}}}}\\[10pt]&={\frac {\sum _{I=0}^{\acute {N}}{-1 \choose I}{{\acute {N}} \choose I}F(P_{\acute {n}}-I\Delta _{1}P)}{\Delta _{1}P^{\acute {n}}}};\end{aligned}}$
      ${\begin{aligned}{\frac {d^{\acute {n}}F(P_{0})}{dP^{\acute {n}}}}&={\frac {d^{{\acute {n}}-1}F'(P_{0})}{dP^{{\acute {n}}-1}}}={\frac {d^{{\acute {n}}-2}F''(P_{0})}{dP^{{\acute {n}}-2}}}={\frac {d^{{\acute {n}}-3}F'''(P_{0})}{dP^{{\acute {n}}-3}}}=\cdots ={\frac {d^{{\acute {n}}-r}F^{(r)}(P_{0})}{dP^{{\acute {n}}-r}}},\\[10pt]&={\frac {d^{{\acute {n}}-1}G(P_{0})}{dP^{{\acute {n}}-1}}}\\[10pt]&={\frac {d^{{\acute {n}}-2}G'(P_{0})}{dP^{{\acute {n}}-2}}}=\ {\frac {d^{{\acute {n}}-3}G''(P_{0})}{dP^{{\acute {n}}-3}}}=\cdots ={\frac {d^{{\acute {n}}-r}G^{(r-1)}(P_{0})}{dP^{{\acute {n}}-r}}},\\[10pt]&{\color {white}.}\qquad \qquad \qquad ={\frac {d^{{\acute {n}}-2}H(P_{0})}{dP^{{\acute {n}}-2}}}=\ {\frac {d^{{\acute {n}}-3}H'(P_{0})}{dP^{{\acute {n}}-3}}}=\cdots ={\frac {d^{{\acute {n}}-r}H^{(r-2)}(P_{0})}{dP^{{\acute {n}}-r}}},\\&{\color {white}.}\qquad \qquad \qquad \qquad \qquad \qquad \ =\ {\frac {d^{{\acute {n}}-3}I(P_{0})}{dP^{{\acute {n}}-3}}}=\cdots ={\frac {d^{{\acute {n}}-r}I^{(r-3)}(P_{0})}{dP^{{\acute {n}}-r}}},\\[10pt]&=F^{({\acute {n}})}(P)=G^{({\acute {n}}-1)}(P)=H^{({\acute {n}}-2)}(P)=I^{({\acute {n}}-3)}(P)=\cdots \end{aligned}}$
      ${\begin{aligned}{\frac {D^{\acute {n}}F(P_{0})}{DP^{\acute {n}}}}&=F[P_{0},P_{1},P_{2},P_{3},\ldots ,P_{{\acute {n}}-3},P_{{\acute {n}}-2},P_{{\acute {n}}-1},P_{\acute {n}}],\\[10pt]&=F^{({\acute {n}})}(P_{0}<P<P_{\acute {n}})=\sum _{TN=1}^{UT=\infty }{\frac {F^{({\acute {n}})}(P_{(tn)})}{UT}}\\[10pt]&=F^{({\acute {n}})}(LB<P<UB)=G^{({\acute {n}}-1)}(LB<P<UB)=\cdots \end{aligned}}$
  
  ## Applying the divided difference
  
  The quintessential application of the divided difference is in the presentation of the definite integral, which is nothing more than a finite difference:
  
      ${\begin{aligned}\int _{LB}^{UB}G(p)\,dp&=\int _{LB}^{UB}F'(p)\,dp=F(UB)-F(LB),\\[10pt]&=F[LB,UB]\Delta B,\\[10pt]&=F'(LB<P<UB)\Delta B,\\[10pt]&=\ G(LB<P<UB)\Delta B.\end{aligned}}$
  
  Given that the mean value, derivative expression form provides all of the same information as the classical integral notation, the mean value form may be the preferable expression, such as in writing venues that only support/accept standard ASCII text, or in cases that only require the average derivative (such as when finding the average radius in an elliptic integral). This is especially true for definite integrals that technically have (e.g.) 0 and either $\pi \,\!$ or $2\pi \,\!$ as boundaries, with the same divided difference found as that with boundaries of 0 and ${\begin{matrix}{\frac {\pi }{2}}\end{matrix}}$ (thus requiring less averaging effort):
  
      ${\begin{aligned}\int _{0}^{2\pi }F'(p)\,dp&=4\int _{0}^{\frac {\pi }{2}}F'(p)\,dp=F(2\pi )-F(0)=4(F({\begin{matrix}{\frac {\pi }{2}}\end{matrix}})-F(0)),\\[10pt]&=2\pi F[0,2\pi ]=2\pi F'(0<P<2\pi ),\\[10pt]&=2\pi F[0,{\begin{matrix}{\frac {\pi }{2}}\end{matrix}}]=2\pi F'(0<P<{\begin{matrix}{\frac {\pi }{2}}\end{matrix}}).\end{aligned}}$
  
  This also becomes particularly useful when dealing with iterated and multiple integrals (ΔA = AU − AL, ΔB = BU − BL, ΔC = CU − CL):
  
      ${\begin{aligned}&\qquad \int _{CL}^{CU}\int _{BL}^{BU}\int _{AL}^{AU}F'(r,q,p)\,dp\,dq\,dr\\[10pt]&=\sum _{T\!C=1}^{U\!C=\infty }\left(\sum _{T\!B=1}^{U\!B=\infty }\left(\sum _{T\!A=1}^{U\!A=\infty }F^{'}(R_{(tc)}:Q_{(tb)}:P_{(ta)}){\frac {\Delta A}{U\!A}}\right){\frac {\Delta B}{U\!B}}\right){\frac {\Delta C}{U\!C}},\\[10pt]&=F'(C\!L<R<CU:BL<Q<BU:AL<P<\!AU)\Delta A\,\Delta B\,\Delta C.\end{aligned}}$
  
  Hence,
  
      $F'(R,Q:AL<P<AU)=\sum _{T\!A=1}^{U\!A=\infty }{\frac {F'(R,Q:P_{(ta)})}{U\!A}};\,\!$
  
  and
  
      $F'(R:BL<Q<BU:AL<P<AU)=\sum _{T\!B=1}^{U\!B=\infty }\left(\sum _{T\!A=1}^{U\!A=\infty }{\frac {F'(R:Q_{(tb)}:P_{(ta)})}{U\!A}}\right){\frac {1}{U\!B}}.\,\!$
  