
DIGMATH: Dynamic Investigatory
Graphical Displays of Math:
Graphical Explorations for Numerical Analysis Using Excel
Sheldon P. Gordon

Most of the following graphical explorations require the use of
macros to operate. In order to use these spreadsheets, Excel must be set
to accept macros. To change the security setting on macros:
- When you open any of the spreadsheets, a new bar
appears near the top of the window that says something like:
"Security Warning: Active content has been disabled", depending
on the version of Excel you are using.
- Click on Options.
- Click on "Enable the Content" and then
click OK.
The following are the DIGMath explorations that are currently
(February 2025) completed and ready for use. (Many others are under
development.) Please feel free to download and use any or all
of these files. If you have any problems downloading or
running any of these files, please contact us at gordonsp@retiree.farmingdale.edu
for assistance. If you have any suggestions for improvements or for new topics,
please pass them on also.
Root Finding Methods
- The Bisection Method This DIGMath
module illustrates the convergence of the Bisection Method for finding the
real zeros of any function y = f(x).
To use it, you enter the desired function and an initial interval from a
to b over which the function has at least
one zero and the program performs successive iterations of the method,
displaying the results both graphically and in a table.
- The Secant Method This DIGMath module
illustrates the convergence of the Secant Method for finding the real
zeros of any function y = f(x).
To use it, you enter the desired function and an initial estimate x0
of any real zero and the program performs successive iterations of the
method, displaying the results both graphically and in a table.
- The Regula Falsi (or False Position)
Method This DIGMath module illustrates the convergence of the
Regula Falsi (or False Position) Method for finding the real zeros of any
function y = f(x).
To use it, you enter the desired function and an initial interval that
brackets a real zero x0 and
the program performs successive iterations of the method, displaying the
results both graphically and in a table.
- The Secant
Parabola Method for Root Finding This DIGMath module illustrates
the convergence of the Secant Parabola Method for finding the real zeros
of any function y = f(x).
It is based on the idea of using a parabola determined by three points to
find the next approximation to a real zero x0 of
the function. The next approximation is determined by one of
the two real roots of the quadratic polynomial based on the quadratic
formula. The program performs successive iterations of the method,
displaying the results both graphically and in a table.
- Newton's Method This DIGMath module
lets you investigate Newton's Method for finding the roots of a function f,
both numerically and graphically. For any desired function, any desired
starting value, and any desired number of iterations, you can see the set
of iterated approximations in a table and the graph of the process, either
in a fixed window of your choice (although the sequence of approximations
may leave the window) or in a variable window that follows the sequence of
iterations.
- Bairstow's Method This DIGMath spreadsheet
lets you investigate Bairstow's Method for approximating the complex roots
of a polynomial by creating a sequence of quadratic functions that
converges to an irreducible quadratic factor of the polynomial. You can
use any polynomial up to 8th degree and any choice of initial estimate for
the quadratic factor. The spreadsheet draws the first five quadratic
approximations to illustrate the convergence both graphically and
numerically.
Approximating a Function
- Power Series Approximations This DIGMath
spreadsheet allows you to investigate the successive polynomial
approximations to a power series S ak (x
- c)k based on the
coefficients of the series and the center point. You can enter
any desired interval and select which polynomial approximations you want
to see displayed from the constant up through the quintic (fifth degree).
- Taylor Polynomial Approximations This
DIGMath spreadsheet allows you to investigate the Taylor polynomial
approximations to the four most common transcendental function: the
exponential function, the sine function, the cosine function, and the
natural logarithm function. In each case, you can enter any desired
interval and select which polynomial approximations you want to see
displayed along with the function. For instance, with the
exponential function, you can select any or all of the linear through the
fifth degree polynomials; with the sine function, you can select any
or all of the polynomials of odd degree up to the seventh degree.
- Taylor Approximations to the
Exponential Function This DIGMath spreadsheet lets you
investigate ideas on building polynomial approximations to the exponential
function on any desired interval. Individual pages let you build
linear, quadratic, cubic, quartic, and quintic polynomials by entering
values for the coefficients via sliders and judging how well the resulting
function fits the exponential curve graphically and numerically by the
values of the greatest deviation and the sum of the squares of the
deviations.
- Taylor Approximations to the Sine
Function This DIGMath spreadsheet lets you investigate ideas on
building polynomial approximations to the sine function on any desired
interval. Individual pages let you build linear, quadratic, cubic,
quartic, and quintic polynomials by entering values for the coefficients
via sliders and judging how well the resulting function fits the sine
curve graphically and numerically by the values of the greatest deviation
and the sum of the squares of the deviations.
- Taylor Approximations to the Cosine
Function This DIGMath spreadsheet lets you investigate ideas on
building polynomial approximations to the cosine function on any desired
interval. Individual pages let you build linear, quadratic, cubic,
quartic, quintic, and 6th degree polynomials by entering values for the
coefficients via sliders and judging how well the resulting function fits
the cosine curve graphically and numerically by the values of the greatest
deviation and the sum of the squares of the deviations.
- Taylor Approximations to the Natural
Logarithm Function This DIGMath spreadsheet lets you investigate
ideas on building polynomial approximations to the natural logarithm
function on any desired interval within (0, 2). Individual pages let
you build linear, quadratic, cubic, quartic, and quintic polynomials by
entering values for the coefficients via sliders and judging how well the
resulting function fits the natural logarithm curve graphically and
numerically by the values of the greatest deviation and the sum of the
squares of the deviations.
- Taylor Polynomial Approximations This
DIGMath spreadsheet allows you to investigate the Taylor polynomial
approximations to the four most common transcendental function: the
exponential function, the sine function, the cosine function, and the
natural logarithm function. In each case, you can enter any desired
interval and select which polynomial approximations you want to see
displayed along with the function. For instance, with the
exponential function, you can select any or all of the linear through the
fifth degree polynomials; with the sine function, you can select any
or all of the polynomials of odd degree up to the seventh degree.
- Taylor
Polynomials for Any Function This
DIGMath spreadsheet allows you to investigate the Taylor polynomial
approximations to any desired functions. You need to enter the
formula for the function, the center point for the polynomials, and the
desired interval. You can select which polynomial approximations (linear,
quadratic, ..., sixth degree) you want to see displayed along with the
function. You can also trace along the curves and see the various numerical
approximations for each of the active curves.
- Creating Polynomial Approximations to the Exponential Function This DIGMath spreadsheet allows you try to create the best possible polynomial approximations to the exponential function centered at x = 0 on any desired interval. You have the choice of linear, quadratic, cubic, quartic, and quintic polynomials. For each, you can enter and vary the various coefficients using sliders and see the results of that polynomial versus the exponential curve graphically, as well as numerical measures such as the largest deviation and the sum of the squares of the deviations on the interval selected, so that you can decide on which coefficients produce the best fit and then continue the investigation with the next degree polynomial.
- Creating Polynomial Approximations to the Logarithmic Function This DIGMath spreadsheet allows you try to create the best possible polynomial approximations to the logarithmic function about x = 1 on any desired interval. You have the choice of linear, quadratic, cubic, quartic, and quintic polynomials. For each, you can enter and vary the various coefficients using sliders and see the results of that polynomial versus the logarithmic curve graphically, as well as numerical measures such as the largest deviation and the sum of the squares of the deviations on the interval selected, so that you can decide on which coefficients produce the best fit and then continue the investigation with the next degree polynomial.
- Creating Polynomial Approximations to the Sine Function This DIGMath spreadsheet allows you try to create the best possible polynomial approximations to the sine function centered at x = 0 on any desired interval. You have the choice of linear, quadratic, cubic, quartic, and quintic polynomials. For each, you can enter and vary the various coefficients using sliders and see the results of that polynomial versus the sine curve graphically, as well as numerical measures such as the largest deviation and the sum of the squares of the deviations on the interval selected, so that you can decide on which coefficients produce the best fit and then continue the investigation with the next degree polynomial.
- Creating Polynomial Approximations to the Cosine FunctionThis DIGMath spreadsheet allows you try to create the best possible polynomial approximations to the cosine function centered at x = 0 on any desired interval. You have the choice of linear, quadratic, cubic, ... sixth degree polynomials. For each, you can enter and vary the various coefficients using sliders and see the results of that polynomial versus the cosine curve graphically, as well as numerical measures such as the largest deviation and the sum of the squares of the deviations on the interval selected, so that you can decide on which coefficients produce the best fit and then continue the investigation with the next degree polynomial.
- Taylor Polynomial Errors for the Exponential Function This DIGMath spreadsheet allows you try to investigate the best possible polynomial approximations to the exponential function centered at x = 0 on any desired interval. You have the choice of linear, quadratic, cubic, quartic, and quintic polynomials. For each, you can enter and vary the various coefficients using sliders and see the results of that polynomial versus the exponential curve graphically as well as the Error Function -- the difference between the function and the approximating polynomial. The spreadsheet also displays two numerical measures -- the largest deviation and the sum of the squares of the deviations on the interval selected, so that you can decide on which coefficients produce smallest error and hence is the best fit and then continue the investigation with the next degree polynomial.
- Taylor Polynomials vs. the
Center Point This DIGMath module lets you investigate the effects of
changing the center point x0 at which Taylor polynomial approximations are based on the quadratic
polynomial so created. The spreadsheet lets you explore the effects on
both the cosine function (when the center is other than x = 0) or the natural logarithm function (when the center is other than x = 1).
- The
Indeterminate Form 0/0 and Taylor Approximations This DIGMath module
lets you investigate the indeterminate form 0/0 that arises in the limit
as x approaches a of the ratio f(x)/g(x).
l'Hopital's Rule is a way to find the value of this limit, but to
understand where the limiting value comes from, it is better to look at
the ratio of the corresponding Taylor approximations to f and g. You enter the two functions, the limit
point a, the two Taylor polynomials and
the spreadsheet produces a number of graphs, most importantly that of f/g and the ratio of the two Taylor approximations.
- Taylor Approximations to Hyperbolic Functions This DIGMath module lets you investigate how the various Taylor approximations to the hyperbolic functions y = sinh x and y = cosh x compare to one another and how well they approximate both functions.
- Fourier Series Approximations
This DIGMath spreadsheet allows you to investigate the successive Fourier
approximations to three common periodic functions -- the square wave, the
triangle wave, and the sawtooth wave. In each case, you can
select which of the first four Fourier approximations you want to see
displayed and can turn them on or off via sliders to observe how the
successive approximations relate to one another and how they begin to
converge to the shape of the desired target wave.
- Lagrange Interpolation Formula
This DIGMath module lets you investigate the Lagrange Interpolating
Polynomial based on any set of up to 8 data points. The spreadsheet draws
the graph of the Lagrange polynomial as it passes through the
interpolating points. It also displays the equation of the polynomial
using the Lagrange formula for the linear, quadratic, and cubic cases.
- Building Lagrange
Interpolation Polynomials This DIGMath spreadsheet lets you
investigate the way that the Lagrange Interpolating Polynomial is created
as a combination of the individual component polynomials. You can look at
the way that the linear, the quadratic, and the cubic Lagrange polynomials
are built based on the sum of two linear, three quadratic, or four cubic
polynomials, respectively. In each case, the individual components are
drawn along with the Lagrange polynomial based on the data points entered
and you can then examine the relationships between the roots of the
polynomial components, the interpolating points, and the associated
function values.
- Newton Interpolation Formula
This DIGMath module lets you investigate the Newton Forward Interpolating
Polynomial based on any set of up to 8 uniformly spaced data points. The
spreadsheet draws the graph of each of the successive linear, quadratic,
... Newton polynomials as they pass through the various interpolating
points.
- Approximating
the Sine using Lagrange Interpolation This DIGMath spreadsheet lets
you investigate how the sine function can be approximated on the interval
[0, p/4] using Lagrange
Interpolating Polynomials based on either three or four interpolating
points given either in radians or degrees. The spreadsheet draws the graph
of sine and the interpolating polynomial as well as the graph of the error
function P(x)
- sin x so you can see how well or poorly
the polynomial fits the function as you change the interpolating points.
- Approximating the
Sine using Newton Interpolation This DIGMath spreadsheet lets you
investigate how the sine function can be approximated on the interval [0, p/4] using Newton Interpolating Polynomials
based on either three or four uniformly spaced interpolating points given
either in radians or degrees. The spreadsheet draws the graph of sine and
the interpolating polynomial as well as the graph of the error function P(x)
- sin x so you can see how well or poorly
the polynomial fits the function as you change the interpolating points.
- Approximating
the Cosine using Lagrange Interpolation This DIGMath spreadsheet lets
you investigate how the cosine function can be approximated on the interval
[0, p/4] using Lagrange
Interpolating Polynomials based on either three or four interpolating
points given either in radians or degrees. The spreadsheet draws the graph
of cosine and the interpolating polynomial as well as the graph of the
error function P(x)
- cos x so you can see how well or poorly
the polynomial fits the function as you change the interpolating points.
- Approximating
the Cosine using Newton Interpolation This DIGMath spreadsheet lets
you investigate how the cosine function can be approximated on the
interval [0, p/4] using Newton
Interpolating Polynomials based on either three or four uniformly spaced
interpolating points given either in radians or degrees. The spreadsheet
draws the graph of sine and the interpolating polynomial as well as the
graph of the error function P(x)
- cos x, so you can see how well or how
poorly the polynomial fits the function as you change the interpolating
points.
- Approximating
the Exponential Function using Lagrange Interpolation This DIGMath
spreadsheet lets you investigate how the exponential function y
= ex can be approximated on the interval [0,
1] using Lagrange Interpolating Polynomials based on either three or four
interpolating points. The spreadsheet draws the graph of exponential
function and the interpolating polynomial as well as the graph of the
error function P(x)
- ex so you can see how well or poorly
the polynomial fits the function as you change the interpolating points.
- Approximating
the Exponential Function using Newton Interpolation This DIGMath
spreadsheet lets you investigate how the exponential function y
= ex can be approximated using Newton
Interpolating Polynomial. One page lets you work with a
quadratic polynomial based on three uniformly spaced points on the
exponential curve and another page lets you use a cubic polynomial based
on four uniformly spaced points. The spreadsheet calculates and draws the
graph of the interpolating function as it passes through the interpolating
points and seeks to match the exponential curve. It also draws the graph
of the error function -- the difference between the polynomial and the
exponential function.
- Approximating
the Natural Logarithm using Newton Interpolation This DIGMath
spreadsheet lets you investigate how the natural logarithm function y
= ln x can be
approximated using Newton Interpolating Polynomials. The first page
lets you compare the effectiveness of the quadratic, the cubic, the
quartic, and the quintic Newton polynomials based on uniformly spaced
points on the curve. The spreadsheet calculates and draws the graphs
of the four interpolating polynomials as they pass through the
interpolating points on the natural logarithm curve. It also lets you
select a particular degree for the polynomial and draws the graph of the
associated error function -- the difference between the polynomial and the
exponential function. A second page shows all four interpolating
polynomials separately and all four error functions separately.
- Approximating
Polar Curves with Newton Interpolation This DIGMath module lets you
investigate how any polar coordinate curve r = f (
q ) on any interval [a, ß] can be approximated using
Newton's forward interpolation polynomials. You enter your choice for the
function in terms of the variable Q (instead
of q ) and the desired interval using a
slider. You also have the choice of the degree n ,
between 1 and 6. The spreadsheet draws the polar curve on the desired
interval and superimposes the associated Newton interpolating polynomial.
You can see how well the corresponding polynomial attempts to match the
curve. As you change the degree, the smaller the interval, the better the
fit, usually. You can also trace along both curves and see the
corresponding coordinates of both displayed.
- Approximating
Polar Curves with Lagrange Interpolation This DIGMath module lets you
investigate how any polar coordinate curve r = f (
q ) on any interval [a, ß] can be approximated using the
Lagrange interpolation polynomials. You enter your choice for the function
in terms of the variable Q (instead of q
) and the desired interval using a slider. You also have
the choice of the degree n , between 1
and 6. The spreadsheet draws the polar curve on the desired interval and
superimposes the associated Lagrange interpolating polynomial. You can see
how well the corresponding polynomial attempts to match the curve. As you
change the degree, you can see the effect on the approximation the
higher the degree, usually the better the fit. Also, the smaller the
interval, the better the fit, usually. You can also trace along both
curves and see the corresponding coordinates of both displayed.
- Approximating
Parametric Functions with Newton Interpolation This DIGMath module
lets you investigate how any curve given as a pair of parametric functions
x = f ( t ),
y = g ( t )
on any interval [ a, b ] can be
approximated using Newton's forward interpolation polynomials. You enter
your choice for the two functions in terms of the variable t
and the desired interval using a slider. You also have
the choice of the degree n , between 1
and 6, for the polynomial. The spreadsheet draws the parametric curve on
the desired interval and superimposes the associated Newton interpolating
polynomial. You can see how well the corresponding polynomial attempts to
match the curve. As you change the degree, you can see the effect on the
approximation the higher the degree, usually the better the fit.
Also, the smaller the interval, the better the fit, usually. You can also
trace along both curves and see the corresponding coordinates of both
displayed.
- Approximating
Parametric Functions with Lagrange Interpolation This DIGMath module
lets you investigate how any curve given as a pair of parametric functions
x = f ( t ),
y = g ( t )
on any interval [ a, b ] can be
approximated using Lagrange interpolation polynomials. You enter your
choice for the two functions in terms of the variable t and
the desired interval using a slider. You also have the choice of the
degree n , between 1 and 6, for the
polynomial. The spreadsheet draws the parametric curve on the desired
interval and superimposes the associated Lagrange interpolating
polynomial. You can see how well the corresponding polynomial attempts to
match the curve As you change the degree, you can see the effect on the
approximation the higher the degree, usually the better the fit.
Also, the smaller the interval, the better the fit, usually. You can also
trace along both curves and see the corresponding coordinates of both
displayed.
- Chebyshev Nodes This DIGMath module lets
you investigate the so-called Chebyshev nodes that are often the best
points to use to construct an interpolating polynomial based on a set of
points. The Chebyshev nodes have the property that they provide the
minimum value of the maximum error in the approximation at the
interpolating points. The spreadsheet lets you enter your choice of either
three or four interpolating points on the interval [-1, 1] and compares,
both numerically and graphically, the maximum error to the corresponding
maximum error using the Chebyshev nodes.
- Cubic Splines This DIGMath spreadsheet
lets you investigate the notion of cubic splines, a way to construct a
smooth curve determined by a set of points in such a way that the curve is
made up of a series of smoothly connected cubic curves. The spreadsheet
has two components. In the first, the data points are grouped three at a
time subject to the condition that the slope at the third point must be
equal to the slope of the following cubic at the first point. In the
second, the points are grouped two at a time subject to the two conditions
that the slope and the value of the second derivative must agree at each
of the overlapping points.
Approximating the Derivative
- Tangent Line to a Curve This
DIGMath spreadsheet allows you to investigate the tangent line to the
graph of any desired function of the form y = f(x)
on any desired interval a to b.
You control the point of tangency using a slider and watch the effects on
the resulting tangent line to the curve as the point changes. The
length of the tangent line also changes to reflect the size of the slope
or, equivalently, the value of the derivative of the function at the
point.
- Newton Difference Quotients
This DIGMath module lets you investigate the notion of the Newton
difference quotient as an approximation to the slope of the tangent line
to a curve at a point. You can use any function, any interval, any desired
step-size, and any point of tangency. The spreadsheet displays graphically
the graph, the associated secant line and the triangle based on the point
of tangency. If also displays numerically slope of the secant line
compared to the slope of the tangent line, so you can see what happens to
the agreement as the step-size is decreased or as the point of tangency
moves along the curve.
Numerical Integration
- Numerical Integration Methods
This DIGMath spreadsheet allows you to investigate four different methods
to approximate the value of a definite integral -- using left and
right-hand Riemann Sums, using the Trapezoid Rule, the MidPoint Rule, and
Simpson's Rule for any function of the form y = f(x)
on any desired interval [a, b]. You
control the number of subdivisions for each method using a slider and the
spreadsheet draws the graph of the function, draws the approximating
subdivisions, and displays the associated approximation to the definite
integral.
- Monte Carlo Method for Definite
Integrals This DIGMath spreadsheet allows you to investigate visually
and numerically the use of Monte Carlo simulations for estimating the
value of the definite integral of any function of the form y
= f(x) that is
non-negative on any desired interval [a, b].
You control the number of random points, between 500 and 2500, via a
slider and the spreadsheet draws the graph of the function, plots the
random points, and displays the number and percentage of them that fall
under the curve, and uses that percentage to estimate the area of the
region.
Approximating Solutions of Differential Equations
- Euler's Method for Numerical Solutions to
Differential Equations y' = f(x, y) This DIGMath
spreadsheet lets you investigate Euler's Method for generating numerical
approximations to the solution of the differential equation y'
= f(x, y),
for any desired function of x and y,
with any desired initial condition. The spreadsheet calculates and
displays the approximation solutions corresponding to n
= 4, 8, 16, ..., 128 steps across any desired interval, so you can observe
the convergence of the successive approximations toward a smooth curve.
- Euler's Method for Numerical Solutions
to Differential Equations y' = f(x) This DIGMath
spreadsheet lets you investigate Euler's Method for generating numerical
approximations to the solution of the differential equation y'
= f(x),
for any desired function of x (but not y)
with any desired initial condition. The spreadsheet calculates and
displays the approximation solutions corresponding to n
= 4, 8, 16, ..., 128 steps across any desired interval, so you can observe
the convergence of the successive approximations toward a smooth curve.
- Picard’s Method for Numerical Solutions
to Differential Equation y’ = f(x, y)
This DIGMath Module lets you investigate the successive approximations to
the solution of the differential equation y’
= f(x, y)
subject to the initial conditions x0
and y0 generated by
Picard’s iterative method. You can select, by checking the
appropriate boxes, which of the successive approximations (n
= 1, 2, …, 6) you want displayed to better let you compare the convergence
of the approximations. You can also select how far from x0
you want the approximations to extend.
All of these files were developed under the support from a variety of
grants from the National Science Foundation, to whom the author is very
appreciative.
