Preferably one should have access to both Scientific WorkPlace and Maple. However, if only you have the access to SWP but no Maple
If you and students have access to Maple or SWP
One possible solution will be to use SWP as a wordprocessor and a basic computational tool and use Maple as a programing tool to generate animations and etc. I also found that Java will be an important tool to incorporate software in WWW technology. But when do we write a Java script? It will be too much time consuming if we have to write Java scripts for every subject. Maybe using Java to link with animations done by software is more efficient. There are two interactive web sites I would like share:
One of the topics that are studied in a first course in integral calculus is
the process of approximating a given integral
by various types of sums. In studying this topic, we are not just concerned
with the act of finding approximations to the integral. An approximate value
of an integral can be obtained by a single click on Evaluate
Numerically with SWP. The purpose of this topic is to acquaint
students with a variety of different kinds of sums such as left sums, right sums, trapezoidal sums, midpoint sums and
Simpson sums, to point out that some of these sums will approximate
a given integral more closely than others and to show that all of them
provide better approximations when the interval of integration is more
finely partitioned. We would like to know how much better the better sums
are and how much better the sums become when the interval is more finely
partitioned.
In this example, we shall show how Scientific WorkPlace can be
used to study the left sums, right sums, trapezoidal sums, midpoint sums and
Simpson sums of a given function f on an interval
and
how a course in integral calculus can thus be enriched with the help of
Scientific WorkPlace.
In this section we introduce the notions of left sum, right sum, trapezoidal
sum, midpoint sum and Simpson sum of a given function f over a partition
of an interval
We begin with a brief review of the
definition of a Riemann integral.
In a first course in integral calculus, the Riemann integral of a bounded function f on an interval
is described
as the limit of a sequence of sums of the
type
where
and where, for each
we have
Sums of this type are called Riemann sums of the function f over the interval
The sense in which the limit is taken is that if we
define the mesh of the partition
to be the largest of the lengths of the
intervals
then the above Riemann Sum can be
made as close as we like to
by making this
mesh small enough.
The simplest type of partition of a given interval
is a partition
for which all
of the intervals
have the same length. In this
case the partition is said to be regular and for each
we have
and
Since the mesh of this partition is
we make it approach 0
by letting
Given a<b and a positive integer n, we have described the regular
partition
as being the finite
sequence of numbers defined by
for each
Before we give this definition to Scientific W
orkPlace, we
shall make the notation a bit more precise. We shall replace the notation xj by
in order to account for the fact that this
number depends also upon the value of n and upon the interval that is
being partitioned. Accordingly, the first step in the procedure is to point
at the equation
and
to click on Define and New Definition.
Since the various approximating sums all depend upon the function f that
we wish to integrate, we need to let Scientific WorkPlace know that the
symbol f stands for a function before we write down the definitions of the
approximating sums. In order to achieve this, we make the nominal definition
by pointing at the equation
and clicking on Define and New Definition.
Note that this definition of f is purely temporary. We can change it at any time and all the sums will change accordingly.
The left sum of a given function f over the partition defined
above is the Riemann sum
where, for each j, the number tj is the left endpoint of
the interval that runs from
to
In other words, we define the left sum by pointing at t
he
equation
and clicking on Define and New Definition. Similarly, the right sum of f is
and we define it by pointing at the equation and
clicking on Define and New Definition. The arithmetic mean
of the left and right sums is the trapezoidal sum
which we define by pointing at the equation
Alternatively we could observe that
and use this equation for the
definition of the trapezoidal sum. As we shall see from the examples that
follow, the trapezoidal sum is frequently a much better approximation to the
integral than either the left or the right sum. An even better approximation
than the trapezoidal sum is the midpoint sum
which we define by pointing at the equation
In this sum the function f is evaluated for each j at the midpoint of
the interval that runs from
to
Finally, the Simpson sum
of f over the
given partition is defined by pointing at the equation
As you may know, the Simpson sum is used only when the number n is even.
Having supplied the definitions of the sums to Scientific WorkPlace as
described in the previous section, we can evaluate the sums for any
specified function f, interval
and any specified
value of n. In this section we work out some approximations to the
integral
We know, of course, that
![]()
To work out the various approximating sums, we begin by pointing at the
equation
and clicking on Define and New Definition.
By pointing and clicking on Evaluate Numerically we obtain
Rf(1,5,20)=81.52
Tf(1,5,20)=73.52
Mf(1,5,20)=73.24
Sf(1,5,20)=73.33333.
And we can see at once that the midpoint sum is better than the trapezoidal
sum which, in turn, is much better than the left and right sums. We see also
that the Simpson sum is the best of all. As a matter of fact, the exact
value of the Simpson sum is
which is
exactly equal to the integral. It can be proved that the Simpson sum is
always exactly correct when the function being integrated is a polynomial of
degree 3 or less.
The facts about some of the algorithms set up by Maple and Mathematica are as follows:
These facts motivate me to develop new algorithms which shall use my theoretical integration backgrounds.
Numerical integration experts can handle functions which are so called
absolute integrals. The non-absolute integrals, such as the following highly
oscillatory function
is
not Lebesgue integrable but is Henstock integrable (see [L]). Most experts
in numerical integration do not talk about how to integrate this type of
function directly.
We introduce one way of partition an interval unevenly.
Definition. A matrix A with positive
is called
uniformly regular if the following conditions are satisfied: (1)
uniformly over k. (2)
For example, we may use the finite sum formula,
m=1,2,..., to form uniform regular matrices. For m=1, we define the
matrix
. For details, see [YC].
Consider the following closed type quadrature:
![]()
We would like to experiment this quadrature with the Scientific Workplace
(which uses Maple as a tool for computation). But first we need to make the
following adjustments for computation purpose. We define the right and left
endpoints as follows:
and
which
correspond to un,k and
respectively.
We define our first closed type quadrature as follows:
We note that the first term of Q1(n), (1/2)a(n,1)f(r(n,1)), is a tail
term to take care of functions with a singularity, and the second term of Q1(n), denoted by Q(n) is a trapezoidal sum. Thus, we may call the
quadrature, Q1(n), to be the adaptive trapezoidal sum. We shall
use the combination of Q1(n) and Q(n) to come up with the rule for
Richardson extrapolation integration as follows
Example: Consider the function
, if
,
and f(0)=0. (We notice that f has a singularity at x=0.) Use Q1(n)
to approximate
If we use Evaluate
numerically with Scientific Workplace under ''Maple'', we get the following
numeric results:
Q1(400)=-2.720938148
Q1(430)=-2.720950937
By using Maple V R4 on R(n), we obtained the following info:
R(400)=-2.721164891
R(430)=-2.721149108
We observed that the Ricahrdson extrapolation gives better estimate, the answer above is accurate up to 4 digits. We note that when we increase n, we will be warned of the existence of the singularity at x=0 . For a maple worksheet on this quadrature, click here or go to the Appendix. To further investigate the convergence or divergence of this integral, we could write a separate computer program to run our quadrature.
We mention an open type quadrature in two dimensions (see [YC[) by using two
uniformly regular matrices, cnk, dml, and denote them by c(n,k)
and d(m,l) for computation purpose. Now set
, and consider the
function
if
, and
, and g(x,y)=0 if x=y=0. First, we define the followings:
![]()
Next we define the following open quadrature:
g(l(n,k),r(m,l))+g(r(m,l),l(n,k))+g(l(n,k),l(m,l))))
We obtain the following information:
Q(30,30)=3.97226585
Q(40,40)=3.98311667
For the Maple workshet on this open type quadrature, click here or go to the Appendix section. We could speed up
the rate of convergence for this
type of function by considering the following closed type quadrature.
We consider a closed type quadrature, which is an extension of Qn1(f),
as follows:
If we use
and
,we obtain the following information from Maple V Release 4:

By comparing the open type and closed type quadratures, we see that closed type quadrature is more efficient in this case.
Consider evaluating the following numerical integral
Both Maple and Mathematica could not give an answer due the singularities lie along x=y. What we will do is to transform the singularities to the boundary first and apply a quadrature which uses uniformly regular matrices for computations.
Note that the function
is symmetric
with respect to y=x, so we consider the integration over the triangle with
vertices O=(0,0), P=(1,0) and Q=(1,1). After the transformation with
change of variables, u=x, and v=x-y, the singular points are shifted to x- axis, and the Jacobian is
Thus, equation (1) becomes
By using
the uniformly regular matrices
and
and write a corresponding
Pascal program, we obtain the following information

Estimate
We use the transformation u=1-x, v=1-y,
to transform the singular points to u and v axes, and also the point (1,1); note that the Jacobian is 1.
Thus consider the new integral
By using the open type quadrature in two dimensions mentioned
earlier, with the uniformly regular matrices,
we implement the Pascal
program. Partial results are shown below:

This document was generated using the LaTeX2HTML translator Version 96.1-h (September 30, 1996) Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
The command line arguments were:
latex2html 121.
The translation was initiated by Wei-Chi Yang on Wed Jan 29 10:59:51 EST 1997