<s>
In	O
numerical	B-General_Concept
analysis	I-General_Concept
,	O
numerical	B-Algorithm
differentiation	I-Algorithm
algorithms	O
estimate	O
the	O
derivative	B-Algorithm
of	O
a	O
mathematical	O
function	O
or	O
function	O
subroutine	O
using	O
values	O
of	O
the	O
function	O
and	O
perhaps	O
other	O
knowledge	O
about	O
the	O
function	O
.	O
</s>
<s>
This	O
expression	O
is	O
Newton	B-Algorithm
's	I-Algorithm
difference	I-Algorithm
quotient	I-Algorithm
(	O
also	O
known	O
as	O
a	O
first-order	O
divided	B-Algorithm
difference	I-Algorithm
)	O
.	O
</s>
<s>
Therefore	O
,	O
the	O
true	O
derivative	B-Algorithm
of	O
f	O
at	O
x	O
is	O
the	O
limit	O
of	O
the	O
value	O
of	O
the	O
difference	B-Algorithm
quotient	I-Algorithm
as	O
the	O
secant	O
lines	O
get	O
closer	O
and	O
closer	O
to	O
being	O
a	O
tangent	O
line	O
:	O
</s>
<s>
Since	O
immediately	O
substituting	O
0	O
for	O
h	O
results	O
in	O
indeterminate	B-Algorithm
form	I-Algorithm
,	O
calculating	O
the	O
derivative	B-Algorithm
directly	O
can	O
be	O
unintuitive	O
.	O
</s>
<s>
This	O
formula	O
is	O
known	O
as	O
the	O
symmetric	O
difference	B-Algorithm
quotient	I-Algorithm
.	O
</s>
<s>
This	O
error	O
does	O
not	O
include	O
the	O
rounding	B-Algorithm
error	I-Algorithm
due	O
to	O
numbers	O
being	O
represented	O
and	O
calculations	O
being	O
performed	O
in	O
limited	O
precision	O
.	O
</s>
<s>
The	O
symmetric	O
difference	B-Algorithm
quotient	I-Algorithm
is	O
employed	O
as	O
the	O
method	O
of	O
approximating	O
the	O
derivative	B-Algorithm
in	O
a	O
number	O
of	O
calculators	O
,	O
including	O
TI-82	B-Device
,	O
TI-83	B-Device
,	O
TI-84	B-Device
,	O
TI-85	B-Device
,	O
all	O
of	O
which	O
use	O
this	O
method	O
with	O
h	O
=	O
0.001	O
.	O
</s>
<s>
An	O
important	O
consideration	O
in	O
practice	O
when	O
the	O
function	O
is	O
calculated	O
using	O
floating-point	B-Algorithm
arithmetic	I-Algorithm
of	O
finite	O
precision	O
is	O
the	O
choice	O
of	O
step	O
size	O
,	O
h	O
.	O
If	O
chosen	O
too	O
small	O
,	O
the	O
subtraction	O
will	O
yield	O
a	O
large	O
rounding	B-Algorithm
error	I-Algorithm
.	O
</s>
<s>
In	O
fact	O
,	O
all	O
the	O
finite-difference	O
formulae	O
are	O
ill-conditioned	B-Algorithm
and	O
due	O
to	O
cancellation	O
will	O
produce	O
a	O
value	O
of	O
zero	O
if	O
h	O
is	O
small	O
enough	O
.	O
</s>
<s>
For	O
basic	O
central	O
differences	O
,	O
the	O
optimal	O
step	O
is	O
the	O
cube-root	O
of	O
machine	B-Algorithm
epsilon	I-Algorithm
.	O
</s>
<s>
For	O
the	O
numerical	B-Algorithm
derivative	I-Algorithm
formula	O
evaluated	O
at	O
x	O
and	O
x	O
+	O
h	O
,	O
a	O
choice	O
for	O
h	O
that	O
is	O
small	O
without	O
producing	O
a	O
large	O
rounding	B-Algorithm
error	I-Algorithm
is	O
(	O
though	O
not	O
when	O
x	O
=	O
0	O
)	O
,	O
where	O
the	O
machine	B-Algorithm
epsilon	I-Algorithm
ε	O
is	O
typically	O
of	O
the	O
order	O
of	O
2.2	O
for	O
double	O
precision	O
.	O
</s>
<s>
For	O
computer	O
calculations	O
the	O
problems	O
are	O
exacerbated	O
because	O
,	O
although	O
x	O
necessarily	O
holds	O
a	O
representable	O
floating-point	B-Algorithm
number	I-Algorithm
in	O
some	O
precision	O
(	O
32	O
or	O
64-bit	O
,	O
etc	O
.	O
</s>
<s>
However	O
,	O
with	O
computers	O
,	O
compiler	B-Application
optimization	I-Application
facilities	O
may	O
fail	O
to	O
attend	O
to	O
the	O
details	O
of	O
actual	O
computer	O
arithmetic	O
and	O
instead	O
apply	O
the	O
axioms	O
of	O
mathematics	O
to	O
deduce	O
that	O
dx	O
and	O
h	O
are	O
the	O
same	O
.	O
</s>
<s>
With	O
C	B-Language
and	O
similar	O
languages	O
,	O
a	O
directive	O
that	O
xph	O
is	O
a	O
volatile	B-Operating_System
variable	I-Operating_System
will	O
prevent	O
this	O
.	O
</s>
<s>
Higher-order	O
methods	O
for	O
approximating	O
the	O
derivative	B-Algorithm
,	O
as	O
well	O
as	O
methods	O
for	O
higher	O
derivatives	B-Algorithm
,	O
exist	O
.	O
</s>
<s>
Given	O
below	O
is	O
the	O
five-point	O
method	O
for	O
the	O
first	B-Algorithm
derivative	I-Algorithm
(	O
five-point	B-Algorithm
stencil	I-Algorithm
in	O
one	O
dimension	O
)	O
:	O
</s>
<s>
For	O
other	O
stencil	O
configurations	O
and	O
derivative	B-Algorithm
orders	O
,	O
the	O
is	O
a	O
tool	O
that	O
can	O
be	O
used	O
to	O
generate	O
derivative	B-Algorithm
approximation	O
methods	O
for	O
any	O
stencil	O
with	O
any	O
derivative	B-Algorithm
order	O
(	O
provided	O
a	O
solution	O
exists	O
)	O
.	O
</s>
<s>
Using	O
Newton	B-Algorithm
's	I-Algorithm
difference	I-Algorithm
quotient	I-Algorithm
,	O
</s>
<s>
The	O
classical	O
finite-difference	O
approximations	O
for	O
numerical	B-Algorithm
differentiation	I-Algorithm
are	O
ill-conditioned	B-Algorithm
.	O
</s>
<s>
However	O
,	O
if	O
is	O
a	O
holomorphic	O
function	O
,	O
real-valued	O
on	O
the	O
real	O
line	O
,	O
which	O
can	O
be	O
evaluated	O
at	O
points	O
in	O
the	O
complex	O
plane	O
near	O
,	O
then	O
there	O
are	O
stable	B-Algorithm
methods	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
first	B-Algorithm
derivative	I-Algorithm
can	O
be	O
calculated	O
by	O
the	O
complex-step	O
derivative	B-Algorithm
formula	O
:	O
</s>
<s>
The	O
recommended	O
step	O
size	O
to	O
obtain	O
accurate	O
derivatives	B-Algorithm
for	O
a	O
range	O
of	O
conditions	O
is	O
.	O
</s>
<s>
The	O
complex-step	O
derivative	B-Algorithm
formula	O
is	O
only	O
valid	O
for	O
calculating	O
first-order	O
derivatives	B-Algorithm
.	O
</s>
<s>
A	O
generalization	O
of	O
the	O
above	O
for	O
calculating	O
derivatives	B-Algorithm
of	O
any	O
order	O
employs	O
multicomplex	O
numbers	O
,	O
resulting	O
in	O
multicomplex	O
derivatives	B-Algorithm
.	O
</s>
<s>
The	O
method	O
can	O
be	O
applied	O
to	O
mixed	O
derivatives	B-Algorithm
,	O
e.g.	O
</s>
<s>
A	O
C++	O
implementation	O
of	O
multicomplex	O
arithmetics	O
is	O
available	O
.	O
</s>
<s>
In	O
general	O
,	O
derivatives	B-Algorithm
of	O
any	O
order	O
can	O
be	O
calculated	O
using	O
Cauchy	O
's	O
integral	O
formula	O
:	O
</s>
<s>
where	O
the	O
integration	O
is	O
done	O
numerically	B-Algorithm
.	O
</s>
<s>
Using	O
complex	O
variables	O
for	O
numerical	B-Algorithm
differentiation	I-Algorithm
was	O
started	O
by	O
Lyness	O
and	O
Moler	O
in	O
1967	O
.	O
</s>
<s>
Their	O
algorithm	O
is	O
applicable	O
to	O
higher-order	O
derivatives	B-Algorithm
.	O
</s>
<s>
Differential	O
quadrature	O
is	O
the	O
approximation	O
of	O
derivatives	B-Algorithm
by	O
using	O
weighted	O
sums	O
of	O
function	O
values	O
.	O
</s>
<s>
Differential	O
quadrature	O
is	O
of	O
practical	O
interest	O
because	O
its	O
allows	O
one	O
to	O
compute	O
derivatives	B-Algorithm
from	O
noisy	O
data	O
.	O
</s>
<s>
The	O
name	O
is	O
in	O
analogy	O
with	O
quadrature	O
,	O
meaning	O
numerical	B-Algorithm
integration	I-Algorithm
,	O
where	O
weighted	O
sums	O
are	O
used	O
in	O
methods	O
such	O
as	O
Simpson	B-Algorithm
's	I-Algorithm
method	I-Algorithm
or	O
the	O
Trapezoidal	B-Algorithm
rule	I-Algorithm
.	O
</s>
<s>
There	O
are	O
further	O
methods	O
for	O
computing	O
derivatives	B-Algorithm
from	O
noisy	O
data	O
.	O
</s>
