APPROXIMATION
OF FUNCTIONS
To evaluate most mathematical functions,
we
must first produce computable
approximations to them. Functions are defined in a variety of
ways
in applica-
tions, with integrals and infinite series being the most common types of formulas
used for the definition. Such a definition
is
useful in establishing the properties of
the
function,
but
it is generally not an efficient way to evaluate the function. In
this chapter
we
examine the use of polynomials as approximations to a given
function. Various means of producing polynomial approximations are described,
and they are compared
as
to their relative accuracy.
For
evaluating a function
f(x)
on a computer, it
is
generally more efficient of
space and time to have an analytic approximation to
f(x)
rather than to store a
table and use interpolation. It
is
also desirable
to
use the lowest possible degree
of polynomial that
will
give
the desired accuracy in approximating
f(x).
The
following sections
give
a number of methods for producing an approximation,
and generally the better approximations are also the more complicated to
produce. The amount of time and
effort expended on producing an approxima-
tion should be directly proportional to
hdw much the approximation
will
be used.
If
it
is
only
to
be used a
few
times; a truncated Taylor series
will
often suffice. But
if an approximation
is
to be used millions of times by many people, then much
care should be used
in
producing·· the approximation.
There are forms of approximating functions other than polynomials. Rational
functions are quotients of polynomials, and they are usually a somewhat more
efficient form of approximation. But because polynomials furnish an adequate
and efficient form of approximation, and because the theory for rational function
approximation
is
more complicated than that of
poly!J-omial
approximation,
we
have chosen to consider only polynomials. The results of this chapter can also be
used to produce piecewise polynomial approximations, somewhat analogous to
the piecewise polynomial interpolating functions of Section
3.7
of the preceding
chapter.
4.1 The Weierstrass Theorem
and
Taylor's Theorem
To justify using polynomials to approximate continuous functions,
we
present the
following theorem.
197