`Most mathematical functions (exp, sin, cos, etc) cannot be in general
evaluated exactly. By hand, and on a computer as well,
we usually calculate some approximations to these functions.
The approximate functions need to be easy to evaluate, and have
to provide values which are close enough to the values
of the original function. One of the most convenient ways
to compute functions is to approximate them by polynomials.
`

`A Taylor polynomial of degree is
constructed to mimic the behavior of near a point .
If is a degree Taylor polynomial,
`

`We have to choose the coefficients such that
for . For this, it is natural to require that the value of the
polynomial (and the values of its first derivatives)
coincides with the value of the function
(and the values of function's first
derivatives, respectively) for .
This means that , and since
we have determined .
This one condition is clearly not
sufficient to determine all coefficients of the
polynomial. An extra condition, that forces more resemblance
between and when
is
. Since ,
we have determined the second coefficient also.
If this is enough; if not, we continue
imposing conditions on higher derivates of , until we have
conditions for the coefficients:
`

`To fix the ideas, let , and . Then
`

`For , we add the third condition
,
which reads , or .
Thus the quadratic approximation of near is
`

`In the general case, if is easy to see that
`

`In order to be able to write this formula, we need of course
to assume that is at least times continuously differentiable;
we will actually assume
for the purpose of
writing an error estimate also.
`

`For
( has derivatives of any order)
we can increase indefinitely; the approximations
get better and better, and, in the limit, they will coincide
with . In the limit the summation becomes
infinite, and we obtain the Taylor series expansion
`

`Question: to define we have to evaluate ,
together with several of its derivatives. Aren't we better off just
evaluating , and forgetting about this whole
approximation stuff? The answer is that, indeed, we have to
evaluate
at once.
Then , once constructed, will be a cheap approximation
for thousands of future calls. Moreover, and its derivatives
are evaluated at one point , while is a good
approximation of for an entire interval
.
`

`
`

`
`