Calculus PDF
Calculus PDF
Calculus
Kenneth E. Iverson
Preface
Calculus is at once the most important and most difficult subject encountered early by
students of mathematics; introductory courses often succeed only in turning students
away from mathematics, and from the many subjects in which the calculus plays a major
role.
The present text introduces calculus in the informal manner adopted in my Arithmetic [1],
a manner endorsed by Lakatos [2], and by the following words of Lanczos from his
preface to [3]:
Furthermore, the author has the notion that mathematical formulas have their “secret
life” behind their Golem-like appearance. To bring out the “secret life” of
mathematical relations by an occasional narrative digression does not appear to him
a profanation of the sacred rituals of formal analysis but merely an attempt to a more
integrated way of understanding. The reader who has to struggle through a maze of
“lemmas”, “corollaries”, and “theorems”, can easily get lost in formalistic details, to
the detriment of the essential elements of the results obtained. By keeping his mind
on the principal points he gains in depth, although he may lose in details. The loss is
not serious, however, since any reader equipped with the elementary tools of algebra
and calculus can easily interpolate the missing details. It is a well-known experience
that the only truly enjoyable and profitable way of studying mathematics is the
method of “filling in the details” by one’s own efforts.
The scope is broader than is usual in an introduction, embracing not only the differential
and integral calculus, but also the difference calculus so useful in approximations, and
the partial derivatives and the fractional calculus usually met only in advanced courses.
Such breadth is achievable in small compass not only because of the adoption of
informality, but also because of the executable notation employed. In particular, the array
character of the notation makes possible an elementary treatment of partial derivatives in
the manner used in tensor analysis.
The text is paced for a reader familiar with polynomials, matrix products, linear
functions, and other notions of elementary algebra; nevertheless, full definitions of such
matters are also provided.
Chapter 1 Introduction 3
Table Of Contents
Introduction ..............................................................................6
A. Calculus .......................................................................................... 6
B. Notation and Terminology.............................................................. 10
C. Role of the Computer and of Notation............................................ 14
D. Derivative, Integral, and Secant Slope ........................................... 14
E. Sums and Multiples......................................................................... 15
F. Derivatives of Powers ..................................................................... 16
G. Derivatives of Polynomials............................................................. 17
H. Power Series ................................................................................... 18
I. Conclusion ....................................................................................... 20
Differential Calculus.................................................................23
A. Introduction .................................................................................... 23
B. The derivative operator ................................................................... 24
C. Functions Defined by Equations (Relations) .................................. 24
D. Differential Equations..................................................................... 26
E. Growth F d.1 = F...................................................................... 26
F. Decay F d.1 = -@F ................................................................... 27
G. Hyperbolic Functions F d.2 = F ............................................... 28
H. Circular Functions F d.2 = -@F ............................................... 29
I. Scaling.............................................................................................. 30
J. Argument Transformations .............................................................. 31
K. Table of Derivatives ...................................................................... 31
L. Use of Theorems ............................................................................. 33
M. Anti-Derivative .............................................................................. 34
N. Integral............................................................................................ 35
Analysis.....................................................................................107
A. Introduction .................................................................................... 107
B. Limits .............................................................................................. 108
C. Continuity ....................................................................................... 111
D. Convergence of Series .................................................................... 111
Appendix ...................................................................................117
A. Polynomials .................................................................................... 117
B. Binomial Coefficients ..................................................................... 119
C. Complex Numbers .......................................................................... 119
D. Circular and Hyperbolic Functions................................................. 120
Chapter 1 Introduction 5
Index ..........................................................................................126
6 Calculus
Chapter
1
Introduction
A. Calculus
Calculus is based on the notion of studying any phenomenon (such as the position of a
falling body) together with its rate of change, or velocity. This simple notion provides
insight into a host of familiar things: the growth of trees or financial investments (whose
rates of change are proportional to themselves); the vibration of a pendulum or piano
string; the shape of the cables in a powerline or suspension bridge; and the logarithmic
scale used in music.
In spite of the simplicity and ubiquity of its underlying notion, the calculus has long
proven difficult to teach, largely because of the difficult notion of limits. We will defer
this difficulty by first confining attention to the polynomials familiar from high-school
algebra.
We begin with a concrete experiment of dropping a stone from a height of twenty feet,
and noting that both the position and the velocity (rate of change of position) appear to
depend upon (are functions of) the elapsed time. However, because of the rapidity of the
process, we are unable to observe either with any precision.
More precise observation can be provided by recording the fall with a video camera,
playing it back one frame at a time, and recording the successive positions in a vertical
line on paper. A clearer picture of the motion can be obtained by moving the successive
points to a succession of equally spaced vertical lines to obtain a graph or plot of the
position against elapsed time.
The position of the falling stone can be described approximately by an algebraic
expression as follows:
p(t) = 20 - 16 * t * t
We will use this definition in a computer system (discussed in Section B) to compute a
table of times and corresponding heights, and then to plot the points detailed in the table.
The computer expressions may be followed by comments (in Roman font) that are not
executed:
t,.h
0 20
0.1 19.84
0.2 19.36
0.3 18.56
0.4 17.44
0.5 16
0.6 14.24
0.7 12.16
0.8 9.76
0.9 7.04
1 4
load ’plot’
PLOT=:’stick,line’&plot
PLOT t;h
The plot gives a graphic view of the velocity (rate of change of position) as the slopes of
the lines between successive points, and emphasizes the fact that it is rapidly increasing
in magnitude. Moreover, the table provides the information necessary to compute the
average velocity between any pair of points.
For example, the last two rows appear as:
0.9 7.04
1 4
and subtraction of the first of them from the last gives both the change in time (the
elapsed time) and the corresponding change in position:
1 4 - 0.9 7.04
8 Calculus
0.1 _3.04
Finally, the change in position divided by the change in time gives the average velocity:
The negative value of this velocity indicates that the velocity is in a downward direction.
Both the table and the plot suggest abrupt changes in velocity, but smaller intervals
between points will give a truer picture of the actual continuous motion:
t=:0.01*i.101 Intervals of one-hundredth over the same range
h=:20-16*t*t
PLOT t;h
This plot suggests that the actual (rather than the average) rate of change at any point is
given by the slope of the tangent (touching line) to the curve of the graph. In terms of the
table, it suggests the use of an interval of zero.
But this would lead to the meaningless division of a zero change in position by a zero
change in time, and we are led to the idea of the "limit" of the ratio as the interval
"approaches" zero.
For many functions this limit is difficult to determine, but we will avoid the problem by
confining attention to polynomial functions, where it can be determined by simple
algebra.
The velocity (rate of change of position) is also a function of t and, because it is derived
from the function p, it is called the derivative of p . It also can be expressed algebraically
as follows: v(t) = -32*t.
Moreover, since the velocity is also a function of t, it has a derivative (the acceleration)
which is also called the second derivative of the original function p .
Chapter 1 Introduction 9
Various notations (with various advantages) have been used for the derivative:
. ..
newton p p
leibniz dy/dt d2y/d2t dny/dnt (y = p (t))
Heaviside also introduced the notion of D as a derivative operator, an entity that applies
to a function to produce another function. This is a new notion not known in elementary
algebra.
In the foregoing we have seen that calculus requires three notions that will not have been
met by most students of high school algebra:
1. The notion of the rate of change of a function.
2. The notion of an operator that applies to a function to produce a function.
3. The notion of a limit of an expression that depends upon a parameter whose
limiting value leads to an indeterminate expression such as 0%0.
Although the notion of an operator that produces a function is not difficult in itself, its
first introduction as the derivative operator (that is, jointly with another new notion of
rate of change) makes it more difficult to embrace. We will therefore begin with the use
of simpler (and eminently useful) operators before even broaching the notion of rate of
change.
A further obstacle to the teaching of calculus (common to other branches of mathematics
as well) is the absence of working models of mathematical ideas, models that allow a
student to gain familiarity through concrete and accurate experimentation. Such working
models are provided automatically by the adoption of mathematical notation that is also
executable on a computer.
In teaching mathematics, the necessary notation is normally introduced in context and in
passing, with little or no discussion of notation as such. Notation learned in a simple
context is often expanded without explicit comment. For example, although the
significance of a fractional power may require discussion, the notations x1/2 and xm/n and
xpi used for it may be silently adapted from the more restricted integer cases x2 and xn.
Although an executable notation must differ somewhat from conventional notation (if
only to resolve conflicts and ambiguities), it is important that it be introducible in a
similarly casual manner, so as not to distract from the mathematical ideas it is being used
to convey. The subsequent section illustrates such use of the executable notation J
(available free from webside jsoftware.com) in introducing and using vectors and
operators.
10 Calculus
c) Vectors and matrices are also referred to by the more suggestive terms
lists and tables.
Because the notation is executable, the computer can be used to explore and elucidate
topics with a clarity that can only be appreciated from direct experience of its use. The
reader is therefore urged to use the computer to do the exercises provided for each
section, as well as other experiments that may suggest themselves.
To avoid distractions from the central topic of the calculus, we will assume a knowledge
of some topics from elementary math (discussed in an appendix), and will introduce the
necessary notation with a minimum of comment, assuming that the reader can grasp the
meaning of new notation from context, from simple experiments on the computer, from
the on-line Dictionary, or from the study of more elementary texts such as Arithmetic [1].
The remainder of this section is a computer dialog (annotated by comments in a different
font) that introduces the main characteristics of the notation.
The reader is urged to try the following sentences (and variants of them) on the computer:
3.45+6.78+0.01 Plus
10.24
2*3 Times
6
2^3 Power (product of three twos)
8
1 2 3 * 4 5 6 Lists or vectors
4 10 18
4+5+6
15
*/4 5 6
120
x=: 4
1+x*(3+x*(3+x*(1))) Parentheses provide punctuation
125 as in high-school algebra. However,
1+x*3+x*3+x*1 there is no precedence or hierarchy
125 among verbs; each applies to the
(3*4)+5 result of the entire phrase to its right
17
3*4+5
27
12 Calculus
x=:1 2 3 4
^&3 x Cube of x
1 8 27 64
We will write informal proofs by writing a sequence of sentences to imply that each is
equivalent to its predecessor, and that the last is therefore equivalent to the first. For
example, to show that the sum of the first n odd numbers is the square of n, we begin
with:
] odds=: 1+2*i.n=: 8 The identity function ]causes display of result
1 3 5 7 9 11 13 15
|.odds
15 13 11 9 7 5 3 1
odds + |.odds
16 16 16 16 16 16 16 16
n#n
8 8 8 8 8 8 8 8
+/odds
+/|.odds
-:(+/odds) + (+/|.odds)
-:+/ (odds+|.odds)
+/ -:(odds+|.odds)
+/n#n
n*n
*:n
Exercises
Solutions or hints appear in bold brackets. Make serious attempts before consulting them.
B1 To gain familiarity with the keyboard and the use of the computer, enter some of
the sentences of this section and verify that they produce the results shown in the
text. Do not enter any of the comments that appear to the right of the sentences.
B2 To test your understanding of the notions illustrated by the sentences of this
section, enter variants of them, but try to predict the results before pressing the
Enter key.
B3 Enter p=: 2 3 5 7 11 and predict the results of +/p and */p; then review the
discussion of parentheses and predict the results of -/p and %/p .
Chapter 1 Introduction 13
B4 Enter i. 5 and #p and i.#p and i.-#p . Then state the meanings of the
primitives # and i. .
B5 Enter asp=: p * _1 ^ i. # p to get a list of primes that alternate in sign
(enter asp alone to display them). Compare the results of -/p and +/asp and state
in English the significance of the phrase -/ .
[ -/ yields the alternating sum of a list argument]
B6 Explore the assertion that %/a is the alternating product of the list a.
[ Use arp=: p^_1^i.#p ]
B7 Execute (by entering on the computer) each of the sentences of the informal proof
preceding these exercises to test the equivalences. Then annotate the sentences to
state why each is equivalent to its predecessor (and thus provide a formal proof).
B8 Experiment with, and comment upon, the following and similar sentences:
s=: '4%5'
|.s
do=: ".
do s
do |.s
|.i.5
|. 'I saw'
[ Enclosing quotes produce a list of characters that may be manipulated like other
lists and may, if they represent proper sentences, be executed by applying the verb
". .]
cube
^&3
[ Entering the name of a function alone shows its definition in linear form;
14 Calculus
B11 Press the key F1 (in the top row) to display the J vocabulary, and click the mouse
on any item (such as -) to display its definition.
These properties concern the local behavior of a function in the sense that they concern
how rapidly the function value is changing at any point. They are not easily discerned
from the expression for the function itself, but are expressed directly by its derivative.
More surprisingly, a host of important functions can be defined simply in terms of their
derivatives. For example, the important exponential (or growth) function is completely
defined by the fact that it is equal to its derivative (therefore growing at a rate equal to
itself), and has the value 1 for the argument 0.
The difference calculus (Chapter 4) is based upon secant slopes, such as illustrated by the
lines in the foregoing plot of the square function. The slope of the secant (from ligne
secante, or cutting line) through the points x,f x and (x+r),(f x+r) is obtained by
dividing the rise(f x+r)-(f x) by the run r; the result of ((f x+r)-f x)%r is
called the r-slope of f at the point x.
The difference calculus proves useful in a wide variety of applications, including
approximations to arbitrary functions, and financial calculations in which events (such as
payments) occur at fixed intervals.
The function used to plot the square must be prepared as follows:
PLOT=:'stick,line'&plot
x=:(i.11)%5
Since each value of the sum function is the sum of the component functions, the slopes of
its secants are also the sum of the corresponding slopes. Since this is true for every
secant, it is true for the derivative.
Similarly, the slopes of a multiple of a function p are all the same multiple of the slopes
of p, and its derivative is therefore the same multiple of the derivative of p. For example:
PLOT x;>(p x);(2 * p x)
F. Derivatives of Powers
The derivative of the square function f=: ^&2 can be obtained by algebraically
expanding the expression f(x+r) to the equivalent form (x^2)+(2*x*r)+(r^2), as
shown in the following proof, or list of identical expressions:
Moreover, if r is set to zero in the final expression (2*x)+r, the result is 2*x, the value
of the derivative of ^&2.
Similar analysis can be performed on other power functions. Thus if g=: ^&3 :
((g x+r)-(g x)) % r
((3*(x^2)*r)+(3*x*r^2)+(r^3)) % r
(3*x^2)+(3*x*r)+(r^2)
Again the derivative is obtained by setting r to zero, leaving 3*x^2.
Chapter 1 Introduction 17
Similar analysis shows that the derivative of ^&4 is 4*^&3 and, in general, the derivative
of ^&n is n*^&n. Since the first term of the expansion of (x+r)^n is cancelled by the
subtraction of x^n, and since all terms after the second include powers of r greater than
1, the only term relevant to the derivative is the second, that is, n*x^n-1.
G. Derivatives of Polynomials
The expression (8*x^0)+(_20*x^1)+(_3*x^2)+(2*x^3) is an example of a
polynomial. We may also express it as 8 _20 _3 2 p. x, using the polynomial
function denoted by p. . The elements of the list 8 _20 _3 2 are called the coefficients
of the polynomial. For example:
x=:2
(8*x^0)+(_20*x^1)+(_3*x^2)+(2*x^3)
_28
8 _20 _3 2 p. x
_28
c=:8 _20 _3 2
x=:0 1 2 3 4 5
(0*8)+(_20*1*x^0)+(_3*2*x^1)+(2*3*x^2)
This is a polynomial with coefficients given by c*i.#c, with the leading element
removed to reduce each of the powers by 1 :
c
8 _20 _3 2
i.#c
0 1 2 3
c*i.#c
0 _20 _6 6
dc=:}.c*i.#c
dc
_20 _6 6
dc p. x
_20 _20 _8 16 52 100
x,.(c p. x),.(dc p. x)
0 8 _20
1 _13 _20
18 Calculus
2 _28 _8
3 _25 16
4 8 52
5 83 100
As remarked in Section A, " … the functions of interest in elementary calculus are easily
approximated by polynomials … ". The following illustrates this for the sine function and
its derivative (the cosine), using _1r6 for the rational fraction negative one-sixths:
H. Power Series
We will call s a series function if s n produces a list of n elements. For example:
x=:0.5*i.6
(s1 5) p. x Sum of odd powers
0 0.625 2 4.875 10 18.125
Chapter 1 Introduction 19
We will define an adverb PS such that n (s PS) x gives the n-term power series
determined by the series function s:
5 s1 PS x
0 0.625 2 4.875 10 18.125
8 s2 PS x
1 0.664063 0 _9.85156 _85 _435.68
S1=:s1 PS
5 S1 x
0 0.625 2 4.875 10 18.125
Power series can be used to approximate the functions needed in elementary calculus. For
example:
s3 7
1 1 0.5 0.166667 0.0416667 0.00833333 0.00138889
s4 7
0 1 0 _1 0 1 0
s5 7
0 1 0 _0.166667 0 0.00833333 0
S3=:s3 PS
S4=:s4 PS
S5=:s5 PS
Since c=:s5 10 provides the coefficients of an approximation to the sine function, the
expression }. c * i.10 provides (according to the preceding section) the coefficients
of an approximation to its derivative (the cosine). Thus:
c=:s5 10
20 Calculus
y1=:c p. y=:0.5*i:6
y2=:(}.c*i.10) p. y
PLOT y;>y1;y2
I. Conclusion
We conclude with a brief statement of the ways in which the present treatment of the
calculus differs from most introductory treatments. For the differential calculus of
Chapter 2, the important difference is the avoidance of problems of limits by restricting
attention to polynomials, and the use of power series to extend results to other functions.
Moreover:
1. In Vector Calculus (Chapter 3), Partial derivatives are treated in a simpler
and more general way made possible by the use of functions that deal with
arguments and results of arbitrary rank; this in contrast to the restriction to
scalars (single elements) common in elementary treatments of the calculus.
2. The Calculus of Differences (Chapter 4) is developed as a topic of interest in
its own right rather than as a brief way-station to integrals and derivatives.
3. Fractional derivatives (Chapter 5) constitute a powerful tool that is seldom
treated in calculus courses. They are an extension of derivatives of integral
order, introduced here in a manner analogous to the extension of the power
function to fractional exponents, and the extension of the factorial and
binomial coefficient functions to fractional arguments.
4. Few formal proofs are presented, and proofs are instead treated (as they are
in Arithmetic [1]) in the spirit of Lakatos in his Proofs and Refutations [2], of
which the author says:
"Its modest aim is to elaborate the point that informal, quasi-empirical,
mathematics does not grow through the monotonous increase of the number
of indubitably established theorems but through the incessant improvement
of guesses by speculation and criticism, by the logic of proofs and
refutations."
5. The notation used is unambiguous and executable. Because it is executable, it
is used for experimentation; new notions are first introduced by leading the
student to see them in action, and to gain familiarity with their use before
analysis is attempted.
6. As illustrated at the end of Section B, informal proofs will be presented by
writing a sequence of expressions to imply that each is equivalent to its
predecessor, and that the last is therefore equivalent to the first.
Chapter 1 Introduction 21
The present text defers discussion of the analytical basis to Chapter 8, first
providing the reader with experience with the derivative and the importance of its
fruits, so that she may better appreciate the point of the analysis.
23
Chapter
2
Differential Calculus
A. Introduction
In Chapter 1 it was remarked that:
• The power of the calculus rests upon the study of functions together with their
derivatives, or rates-of-change.
• The difficult notion of limits encountered in determining derivatives can be deferred
by restricting attention to functions expressible as polynomials.
• The results for polynomials can be extended to other functions by the use of power
series.
• The derivative of the polynomial c&p. is the polynomial d&p., where
d=:}.c*i.#c.
We begin by defining a function deco for the derivative coefficients, and applying it
repeatedly to a list of coefficients that represent the cube (third power):
deco=:}.@(] * i.@#)
c=:0 0 0 1
x=:0 1 2 3 4 5 6
c p. x
0 1 8 27 64 125 216
x^3
0 1 8 27 64 125 216
c=:3 1 _4 _2
f=:c&p.
g=:(deco c)&p.
]x=:i:3
_3 _2 _1 0 1 2 3
f x
18 1 0 3 _2 _27 _84
g x
_29 _7 3 1 _13 _39 _77
Since deco provides the computations for obtaining the derivative of f in terms of its
defining coefficients, it can also provide the basis for a derivative operator that applies
directly to the function f. For example:
f d. 1 x
_29 _7 3 1 _13 _39 _77
In the expression f d. 1, the right argument determines the order of the derivative, in
this case giving the first derivative. Successive derivatives can be obtained as follows:
Chapter 2 Differential Calculus 25
f d. 2 x
28 16 4 _8 _20 _32 _44
(deco deco c) p. x
28 16 4 _8 _20 _32 _44
f d. 3 x
_12 _12 _12 _12 _12 _12 _12
(deco deco deco c) p. x
_12 _12 _12 _12 _12 _12 _12
invcube=: ^&(%3)
invcube cube x
1 2 3 4 5
cube invcube x
1 2 3 4 5
reccube=: %@cube
reccube x
1 0.125 0.037037 0.015625 0.008
(reccube * cube) x
1 1 1 1 1
s=:0 0 0 0 0.25&p.
s x
0.25 4 20.25 64 156.25
s d.1 x
1 8 27 64 125
26 Calculus
A stated relation may not specify a function completely. For example, the equation for
Example 3 is also satisfied by the alternative function as=: 8"0+s. Thus:
as=:8"0 + s
as x
8.25 12 28.25 72 164.25
as d.1 x
1 8 27 64 125
Further conditions may therefore be stipulated to define the function completely. For
example, if it is further required that s 2 must be 7, then s is completely defined. Thus:
as=:3"0 + s
as 2
7
as d.1 x
1 8 27 64 125
C1 Experiment with the expressions of this section.
D. Differential Equations
An equation that involves derivatives of the function being defined is called a differential
equation. The remainder of this chapter will use simple differential equations to define an
important collection of functions, including the exponential, hyperbolic, and circular (or
trigonometric).
We will approach the solution of differential equations through the use of polynomials.
Because a polynomial includes one more term than its derivative, it can never exactly
equal the derivative, and we consider functions that approximate the desired solution.
However, for the cases considered, successive coefficients decrease rapidly in magnitude,
and approximation can be made as close as desired. Consideration of the convergence of
such approximations is deferred to Chapter 8.
E. Growth F d.1 = F
If the derivative of a function is equal to (or proportional to) the function itself, it is said
to grow exponentially. Examples of exponential growth include continuous compound
interest, and the growth of a well-fed colony of bacteria.
If f is the polynomial c&p., then the derivative of f is the polynomial with coefficients
deco c. Thus:
]c=:1,(%1),(%1*2),(%1*2*3),(%!4),(%!5),(%!6)
1 1 0.5 0.166667 0.0416667 0.00833333 0.00138889
c*i.#c
0 1 1 0.5 0.166667 0.0416667 0.00833333
}. c*i.#c
1 1 0.5 0.166667 0.0416667 0.00833333
deco c
1 1 0.5 0.166667 0.0416667 0.00833333
In this case the coefficients of the derivative polynomial agree with the original
coefficients except for the missing final element. The same is true for any coefficients
produced by the following exponential coefficients function:
Chapter 2 Differential Calculus 27
ec=: %@!
]c=: ec i. n=: 7
1 1 0.5 0.166667 0.0416667 0.00833333 0.00138889
deco c
1 1 0.5 0.166667 0.0416667 0.00833333
Consequently, the function c&p. is approximately equal to its derivative. For example:
c&p. x=: 0 1 2 3
1 2.71806 7.35556 19.4125
(deco c)&p. x
1 2.71667 7.26667 18.4
The primitive exponential function, denoted by ^, is defined as the limiting case for large
n. For example:
c=: ec i. n=: 12
c&p. x
1 2.71828 7.38905 20.0841
^x
1 2.71828 7.38906 20.0855
The related function ^@(r&*) grows at a rate proportional to the function, the ratio
being r. For example:
r=:0.1
q=: ^@(r&*)
q d.1 x
0.1 0.110517 0.12214 0.134986
r * q x
0.1 0.110517 0.12214 0.134986
eca=: _1&^ * ec
eca i.7
1 _1 0.5 _0.166667 0.0416667 _0.00833333 0.00138889
deco eca 7
_1 1 _0.5 0.166667 _0.0416667 0.00833333
28 Calculus
(eca 20)&p. x
1 0.367879 0.135335 0.0497871 0.0183153
The relation between the growth and decay functions will be explored in exercises and in
Chapter 6.
F1 Define a function pp such that (a pp b)&p. is equivalent to the product
(a&p.*b&p.) ; test it for a=:1 2 1 [ b=:1 3 3 1.
[ pp=: +//.@(*/) ]
F2 Predict the value of a few elements of (ec pp eca) i.7 and enter the expression
to validate your prediction.
F3 Enter x=:0.1*i:30 and y1=:^ x and y2=:^@-x. Then enter PLOT x;>y1;y2.
F4 Predict and confirm the result of the product y1*y2.
2|i.n=: 9
0 1 0 1 0 1 0 1 0
hsc=: 2&| * ec
]c=: hsc i.n
0 1 0 0.166667 0 0.00833333 0 0.000198413 0
deco c
1 0 0.5 0 0.0416667 0 0.00138889 0
deco deco c
0 1 0 0.166667 0 0.00833333 0
The result of deco c was shown above to make clear that the first derivative differs from
the function. However, it should also be apparent that it qualifies as a second function
that equals its second derivative. We therefore define a corresponding function hcc :
hcc=: 0&=@(2&|) * ec
hcc i.n
1 0 0.5 0 0.0416667 0 0.00138889 0 2.48016e_5
Chapter 2 Differential Calculus 29
The limiting values of the corresponding polynomials are called the hyperbolic sine and
hyperbolic cosine, respectively. They are the functions defined by hsin=: 5&o. and
hcos=: 6&o.. Thus:
hsin=:5&o.
hcos=:6&o.
hsin x
0 1.1752 3.62686 10.0179 27.2899
(hcc i.20)&p. x
1 1.54308 3.7622 10.0677 27.3082
hcos x
1 1.54308 3.7622 10.0677 27.3082
It should also be noted that each of the hyperbolic functions is the derivative of the other.
Further properties of these functions will be explored in Chapter 6. In particular, it will be
seen that a plot of one against the other yields a hyperbola. The more pronounceable
abbreviations cosh and sinh (pronounced cinch) are also used for these functions.
G1 Enter x=:0.1*i:30 and y1=:hsin x and y2=:hcos x. Then plot the two
functions by entering PLOT x;>y1;y2.
G2 Enter PLOT y1;y2 to plot cosh against sinh, and comment on the shape of the plot.
G3 Predict the result of (y2*y2)-(y1*y1) and test it on the computer.
(sc i.20)&p. x
0 0.841471 0.909297 0.14112 _0.756803
sin=:1&o.
cos=:2&o.
sin x
0 0.841471 0.909297 0.14112 _0.756802
(cc i.20)&p. x
1 0.540302 _0.416147 _0.989992 _0.653644
cos x
1 0.540302 _0.416147 _0.989992 _0.653644
It may be surprising that these functions defined only in terms of their derivatives are
precisely the sine and cosine functions of trigonometry (expressed in terms of arguments
in radians rather than degrees); these relations are examined in Section 6F.
H1 Repeat Exercises G1-G3 with modifications appropriate to the circular functions.
H2 Use the "power series” operator PS and other ideas from Section 1G in
experiments on the hyperbolic and circular functions.
I. Scaling
The function ^@(r&*) used in Section B is an example of scaling; its argument is first
multiplied by the scale factor r before applying the main function ^. Such scaling is
generally useful, and we define a more convenient conjunction for the purpose as
follows:
For example:
^&(0.1&*) x=: 0 1 2 3 4
1 1.10517 1.2214 1.34986 1.49182
^ AM 0.1 x
1 1.10517 1.2214 1.34986 1.49182
J. Argument Transformations
Scaling is only one of many useful argument transformations; we define two further
conjunctions, atop addition and atop polynomial:
AA=: 2 : 'x. @ (y.&+)'
AP=: 2 : 'x. @ (y.&p.)'
In Section H it was remarked that the circular functions sin and cos "repeat" their
values after a certain period. Thus:
per=: 6.28
cos x
1 0.540302 _0.416147 _0.989992 _0.653644
cos AA per x
0.999995 0.54298 _0.413248 _0.989538 _0.656051
f AM 3 AA 4 is f AP 12 3
A function FfC to yield Fahrenheit from Celsius can be used to further illustrate the use
of argument transformation:
] AA 32 AM 1.8 fahr
_40 32 212
] AP 32 1.8 fahr
_40 32 212
The following derivatives are easily obtained by substitution and the use of the table of
Section K:
Function Derivative
f AA r f D AA r
f AM r (f D AM r * r"0)
f AP c (f D AP c * (d c)&p.)
K. Table of Derivatives
The following table lists a number of important functions, together with their derivatives.
Each function is accompanied by a phrase (such as Identity) and an index that will be
used to refer to it, as in Theorem 2 or θ2 (where θ is the Greek letter theta) .
32 Calculus
Although more thorough analysis will be deferred to Chapter 8, we will here present
arguments for the plausibility of the theorems:
θ1 Since a"0 x is a for any x, the rise is the zero function 0"0.
θ2 Since (]a+x)-(]x) is (a+x)-x, the rise is a, and the slope is a%a
θ3 Multiplying a function by a multiplies all of its rises, and hence its slopes, by a
as well.
θ 4,5 The rise of f+g (or f-g) is the sum (or difference) of the rises of f and g. Also
see the discussion in Section 1D.
θ6 If the result of f is fixed while the result of g changes, the result of f*g changes
by f times the change in g; conversely if f changes while g is fixed. The total
change in f*g is the sum of these changes.
θ7 If h=: f%g, then g*h is f, and, using θ 6 :
f d.1
(g*h) d.1
(g*(h d.1))+((g d.1)*h)
θ9 f@(f INV) d.1 is the product (f d.1)@(f INV) * ((f INV) d.1) (from
θ 6). But since f@(f INV) is the identity function, its derivative is 1&p. and the
second factor (f INV) d.1 is therefore the reciprocal of the first.
θ 10 This can be obtained from θ 7 using the case f=: ] .
θ 11 Since ^&5 is equivalent to the product function ] * ^&4, its derivative may be
obtained from θ 6 and the result for the derivative of ^&4. Further cases may be
obtained similarly; that is, by induction.
θ 12 This follows from θ 3 and θ 11.
K1 Enter f=: ^&2 and f=: ^&3 and x=: 1 2 3 4 ; then test the equivalence of
the functions in the discussion of Theorem 7 by entering each followed by x,
being sure to parenthesize the entire sentence if need be.
K2 If a is a noun (such as 2.7), then a"0 is a constant function. Prove that
((a"0 + f) d.1 = f d.1) is a tautology, that is, gives 1 (true) for every
argument.
L. Use of Theorems
The product of the identity function (]) with itself is the square (^&2 or *:), and the
expression for the derivative of a product can therefore be used as an alternative
determination of the derivative of the square and of higher powers:
(] * ]) d.1
] + ]
Further powers may be expressed as products with the identity function. Thus:
f4=:]*f3=:]*f2=:]*f1=:]*f0=:1"0
x=:0 1 2 3 4
>(f0;f1;f2;f3;f4) x
1 1 1 1 1
0 1 2 3 4
0 1 4 9 16
0 1 8 27 64
0 1 16 81 256
Their derivatives can be analyzed in the manner used for the square:
f3 d.1
(]*f2) d.1
(f2+2"0 * f2)
(3"0 * f2)
M. Anti-Derivative
The anti-derivative is an operator defined by a relation: applied to a function f, it
produces a function whose derivative is f. Simple algebra can be applied to produce a
function adeco that is inverse to deco.
Since deco multiplies by indices and then drops the leading element, the inverse must
divide by one plus the indices, and then append an arbitrary leading element. We will try
two different leading elements, and then define adeco as a dyadic function whose left
argument specifies the arbitrary element (known as the constant of integration):
c=:3 1 4 2
f1 c
5 3 0.5 1.33333 0.5
deco f1 c
3 1 4 2
Just as deco provides a basis for the derivative operator d., so does adeco provide the
basis for extending d. to the anti-derivative, using negative arguments. For example:
x=:i.6
f=:c&p.
f x
3 10 37 96 199 358
f d._1 x
0 5.33333 26.6667 90 233.333 506.667
(0 adeco c) p. x
0 5.33333 26.6667 90 233.333 506.667
Chapter 2 Differential Calculus 35
N. Integral
The area under (bounded by) the graph of a function has many important interpretations
and uses. For example, if circle=: %: @ (1"0 - *:), then circle x gives the y
coordinate of a point on a circle with radius 1. The first quadrant may then be plotted as
follows:
x=:0.1*i.11
y=:circle x
x,.y
0 1
0.1 0.994987
0.2 0.979796
0.3 0.953939
0.4 0.916515
0.5 0.866025
0.6 0.8
0.7 0.714143
0.8 0.6
0.9 0.43589
1 0
PLOT x;y
The approximate area of the quadrant is given by the sum of the ten trapezoids, and
(using r=:0.1) its change from x to x+r is r times the average height of the trapezoid,
that is, the average of circle x, and circle x+r. Therefore, its rate-of change
(derivative) at any argument value x is approximately the corresponding value of the
circle function.
As the increment r approaches zero, the rate of change approaches the exact function
value, as illustrated below for the value r=:0.01:
x=:0.01*i.101
36 Calculus
PLOT x;circle x
In other words, the area under the curve is given by the anti-derivative.
37
Chapter
3
Vector Calculus
A. Introduction
Applied to a list of three dimensions (length, width, height) of a box, the function
vol=:*/ gives its volume. For example:
lwh=:4 3 2
vol=:*/
vol lwh
24
Since vol is a function of a vector, or list (rank-1 array), the rank-0 derivative operator
d. used in the differential calculus in Chapter 1 does not apply to it. But the derivative
operator D. does apply, as illustrated below:
The last element of this result is the rate of change as the last element of the argument
(height) changes or, as we say, the derivative with respect to the last element of the vector
argument. Geometrically, this rate of change is the area given by the other two
dimensions, that is, the length and width (whose product 12 is the area of the base).
Similarly, the other two elements of the result are the derivatives with respect to each of
the further elements; for example, the second is the product of the length and height. The
entire result is called the gradient of the function vol.
The function vol produces a rank-0 (called scalar, or atomic) result from a rank-1
(vector) argument, and is therefore said to have form 0 1 or to be a 0 1 function; its
derivative produces a rank-1 result from a rank-1 argument, and has form 1 1.
The product over the first two elements of lwh gives the "volume in two dimensions"
(that is, the area of the base), and the product over the first element alone is the "volume
in one dimension". All are given by the function VOLS as follows:
VOLS=:vol\
VOLS lwh
4 12 24
The function VOLS has form 1 1, and its derivative has form 2 1. For example:
38 Calculus
Strictly speaking, vector calculus concerns only functions of the forms 0 1 and 1 1;
other forms tend to be referred to as tensor analysis. Since the analysis remains the same
for other forms, we will not restrict attention to the forms 0 1 and 1 1. However, we
will normally restrict attention to three-space (as in vol 2 3 4 for the volume of a box)
or two-space (as in vol 3 4 for the area of a rectangle), although an arbitrary number of
elements may be treated.
Because the result of a 1 1 function is a suitable argument for another of the same form,
a sequence of them can be applied. We therefore reserve the term vector function for 1 1
functions, even though 0 1 and 2 1 functions are also vector functions in a more
permissive sense.
We adopt the convention that a name ending in the digits r and a denotes an r,a func-
tion. For example, F01 is a scalar function of a vector, ABC11 is a vector function of a
vector, and G02 is a scalar function of a matrix (such as the determinant det=: -/ .
*). The functions vol and VOLS might therefore be renamed vol01 and VOLS11.
Although the function vol was completely defined by the expression vol=:*/ our initial
comments added the physical interpretation of the volume of a box of dimensions lwh.
Such an interpretation can be exceedingly helpful in understanding the function and its
rate of change, but it can also be harmful: to anyone familiar with finance and fearful of
geometry, it might be better to use the interpretation cost=:*/ applied to the argument
cip (c crates of i items each, at the price p).
We will mainly allow the student to provide her own interpretation from some familiar
topic, but will devote a separate Chapter (7) to the matter of interpretations. Chapter 7
may well be consulted at any point.
B. Gradient
As illustrated above for the vector function VOLS, its first derivative produces a matrix
result called the complete derivative or gradient. We will now use the conjunction D. to
define an adverb GRAD for this purpose:
GRAD=:D.1
VOLS GRAD lwh
1 0 0
3 4 0
6 8 12
We will illustrate its application to a number of functions:
E01=: +/@:*: Sum of squares
F01=: %:@E01 Square root of sum of squares
G01=: 4p1"1 * *:@F01 Four pi times square of F01
Chapter 3 Vector Calculus 39
H01=: %@G01
p=: 1 2 3
(E01,F01,G01,H01) p
14 3.74166 175.929 0.00568411
E01 GRAD p
2 4 6
F01 GRAD p
0.267261 0.534522 0.801784
G01 GRAD p
25.1327 50.2655 75.3982
H01 GRAD p
_0.000812015 _0.00162403 _0.00243604
F01 p is the distance to a point p, or the radius of the sphere (with centre at the
origin) through the point p.
G01 p is the surface area of the sphere through the point p.
H01 is the intensity of illumination at point p provided by a unit light source at the
origin.
B2 Without using GRAD, provide definitions of functions equivalent to the derivatives of
each of the functions defined above.
ANSWERS:
E11=: +:"1
F11=: -:@%@%:@E01 * E11
G11=: 4p1"0 * E11
H11=: -@%@*:@G01 * G11
Three important results (called the Jacobian, Divergence, and Laplacian) are obtained
from the gradient by applying two elementary matrix functions. They are the
determinant, familiar from high-school algebra, and the simpler but less familiar trace,
defined as the sum of the diagonal. Thus:
det=:+/ . *
trace=:+/@((<0 1)&|:)
We will also have occasion to use the corresponding adverbs det@ and trace@. Thus:
DET=:det@
VOLS GRAD DET lwh
48
TRACE=:trace@
VOLS GRAD TRACE lwh
17
C. Jacobian
The Jacobian is defined as the determinant of the gradient. Thus:
VOLS lwh
4 12 24
L11=: mp&m"1
]fig1=:>1 1;1 0;0 0;0 1
1 1
1 0
0 0
0 1
L11 JAC 1 1
6
L11 JAC 1 0
6
The result of the Jacobian is indeed the ratio of the areas of fig1 and fig2, as may be
verified by plotting the two figures by hand. Moreover, for a linear function, the value of
the Jacobian is the same at every point.
[ a&R30"1 produces a rotation through an angle a in the plane of the last two axes
in 3-space (or about axis 0). Test the value of the Jacobian.]
C10 Define functions R31 and R32 that rotate about the other axes, and experiment with
functions such as a1&R31@(a2&R30)"1.
[Experiment with the permutations p=: 2&A. and p=: 5&A. in the expression
p&.|:@p@RM3 o.%2, and use the ideas in functions defined in terms of R30. ]
42 Calculus
f=: +/\"1
f a
1 3 6
f GRAD a f DIV a
1 0 0 3
1 1 0
1 1 1
1.5 0 _4
3 4 0
The determinant of any skew-symmetric matrix is 0, and its vectors therefore lie in a
plane:
]a=:i.2 2 2
0 1
2 3
4 5
6 7
0 2 1 |: a Interchange last two axes
0 2
1 3
4 6
5 7
1 0 2 |: a Interchange first two axes
0 1
4 5
2 3
6 7
The permutation 0 2 1 is said to have odd parity because it can be brought to the normal
order 0 1 2 by an odd number of interchanges of adjacent elements; 1 2 0 has even
parity because it requires an even number of interchanges. The function C.!.2 yields the
parity of its argument, 1 if the argument has even parity, _1 if odd, and 0 if it is not a
permutation.
We will generate a completely skew array by applying the parity function to the table of
all indices of an array:
indices=:{@(] # <@i.)
indices 3
+-----+-----+-----+
|0 0 0|0 0 1|0 0 2|
44 Calculus
+-----+-----+-----+
|0 1 0|0 1 1|0 1 2|
+-----+-----+-----+
|0 2 0|0 2 1|0 2 2|
+-----+-----+-----+
+-----+-----+-----+
|1 0 0|1 0 1|1 0 2|
+-----+-----+-----+
|1 1 0|1 1 1|1 1 2|
+-----+-----+-----+
|1 2 0|1 2 1|1 2 2|
+-----+-----+-----+
+-----+-----+-----+
|2 0 0|2 0 1|2 0 2|
+-----+-----+-----+
|2 1 0|2 1 1|2 1 2|
+-----+-----+-----+
|2 2 0|2 2 1|2 2 2|
+-----+-----+-----+
e 3
0 0 0
0 0 1
0 _1 0
0 0 _1
0 0 0
1 0 0
0 1 0
_1 0 0
0 0 0
|0 0 0 0| 0 0 1 0|0 _1 0 0|0 0 0 0 |
|0 0 _1 0| 0 0 0 0|1 0 0 0|0 0 0 0 |
|0 1 0 0|_1 0 0 0|0 0 0 0|0 0 0 0 |
|0 0 0 0| 0 0 0 0|0 0 0 0|0 0 0 0 |
+--------+--------+--------+--------+
F. Curl
The curl is the perpendicular to the grade, and is produced by the function norm. We will
use the adverb form as follows:
NORM=:norm@
subtotals=:+/\
subtotals lwh
4 7 9
Interpretation of the curl is perhaps even more intractable than the divergence. Again
Woods offers some help:
The reason for the use of the word curl is hard to give without extended treatment
of the subject of fluid motion. The student may obtain some help by noticing that
if F is the velocity of a liquid, then for velocity in what we have called irrotational
motion, curl F=0, and for vortex motion, curl F≠0.
It may be shown that if a spherical particle of fluid be considered, its motion in a
time dt may be analyzed into a translation, a deformation, and a rotation about an
instantaneous axis. The curl of the vector v can be shown to have the direction of
this axis and a magnitude equal to twice the instantaneous angular velocity.
In his Div, Grad, Curl, and all that [9], H.M. Schey makes an interesting attempt to
introduce the concepts of the vector calculus in terms of a single topic. His first chapter
begins with:
In this text the subject of the vector calculus is presented in the context of simple
electrostatics. We follow this procedure for two reasons. First, much of vector
calculus was invented for use in electromagnetic theory and is ideally suited to it.
This presentation will therefore show what vector calculus is, and at the same
time give you an idea of what it's for. Second, we have a deep-seated conviction
that mathematics -in any case some mathematics- is best discussed in a context
which is not exclusively mathematical.
Schey's treatment includes Maxwell's equations which, in Heaviside's elegant
formulation, exhibit the powers of div, grad, and curl in joint use.
F1 Experiment with GRAD, CURL, DIV, and JAC on the functions in Exercise B2.
F2 Experiment with GRAD, CURL, DIV, and JAC on the following 1 1 functions:
q=: *:"1
r=: 4&A. @: q
s=: 1 1 _1&* @: r
t=: 3&A. @: ^ @: -
u=: ]% (+/@(*~)) ^ 3r2"0
F3 Enter the definitions x=: 0&{ and y=: 1&{ and z=: 2&{, and use them to define
the functions of the preceding exercise in a more conventional form.
[ as=: *:@z,*:@x,-@*:@y
at=: ^@-@y,^@-@z,^@-@x
Chapter
4
Difference Calculus
A. Introduction
Although published some fifty years ago, Jordan's Calculus of Finite Differences [10]
still provides an interesting treatment. In his introductory section on Historical and
Biographical Notes, he contrasts the difference and differential (or infinitesimal)
calculus:
Two sorts of functions are to be distinguished. First, functions in which the
variable x may take every possible value in a given interval; that is, the variable is
continuous. These functions belong to the domain of the Infinitesimal Calculus.
Secondly, functions in which the variable takes only the given values x0, x1, x2,
... xn; then the variable is discontinuous. To such functions the methods of
Infinitesimal Calculus are not applicable, The Calculus of Finite Differences
deals especially with such functions, but it may be applied to both categories.
The present brief treatment is restricted to three main ideas:
cube=:^&3"0
x=:1 2 3 4 5
r=:0.1
((cube x+r)-(cube x))%r
3.31 12.61 27.91 49.21 76.51
r cube D: 1 x
3.31 12.61 27.91 49.21 76.51
0.01 cube D: 1 x
3.0301 12.0601 27.0901 48.1201 75.1501
0.0001 cube D: 1 x
3.0003 12.0006 27.0009 48.0012 75.0015
cube d. 1 x
3 12 27 48 75
3*x^2
3 12 27 48 75
In the foregoing sequence, smaller runs appear to be approaching a limiting value, a value
given by the derivative. It is also equal to three times the square.
The alternate expression ((cube x)-(cube x-r))%r could also be used to define a
slope, and it will prove more convenient in our further work. We therefore define an
alternate conjunction for it as follows:
r cube SLOPE 1 x
2.71 11.41 26.11 46.81 73.51
cube d. 1 x
3 12 27 48 75
Much like the derivative, the slope conjunction can be used to give the slope of the slope,
and so on. Thus:
cube d.2 x
6 12 18 24 30
r cube SLOPE 2 x
6 12 18 24 30
We will be particularly concerned with the "first" slope applied to scalar (rank-0)
functions, and therefore define a corresponding adverb:
S=:("0) SLOPE 1
r cube S x
2.71 11.41 26.11 46.81 73.51
names p0 and p1 and p2, etc., for the functions ^&0 and ^&1 and ^&2, and by showing
how each member of the family can be defined in terms of another. Thus:
The following expressions for the derivatives of sums and products of functions were
derived in Chapter 1. The corresponding expressions for the r-slopes may be obtained by
simple algebra:
f + g Sum
(r f S)+(r g S) r-Slope
(f d.1) + (g d.1) Derivative
f * g Product
For example:
r=:0.1
x=:1 2 3 4 5
f=:^&3
g=:^&2
(f+g) x
2 12 36 80 150
(f d.1 + g d.1) x
5 16 33 56 85
Since the derivative of the identity function ] is the constant function 1"0, expressions
for the derivatives of the power functions can be derived using the expressions for the
sum and product in informal proofs as follows:
p3 d.1 p4 d.1
(]*p2) d.1 (]*p3) d.1
(]*p2 d.1)+(] d.1*p2) (]*p3 d.1)+(] d.1*p3)
(]*2"0*p1)+(1"0*p2) (]*3"0*p2)+(1"0*p3)
(2"0*p2)+p2 (3"0*p3)+p3
3"0*p2 4"0*p3
Each of the expressions in the proofs may be tested by applying it to an argument such as
x=: i. 6, first enclosing the entire expression in parentheses.
We will next introduce stope functions whose behavior under the slope operator is
analogous to the behavior of the power function under the derivative.
D. Stope Functions
The list x+r*i.n begins at x and changes in steps of size r, like the steps in a mine stope
that follows a rising or falling vein of ore. We will call the product over such a list a
stope:
x=:5
r=:0.1
n=:4
x+r*i.n
5 5.1 5.2 5.3
*/x+r*i.n
702.78
x ^!.r n
Chapter 4 Difference Calculus 51
702.78
x ^!.0 n
625
We now define a set of stope functions analogous to the functions p0=:^&0 and
p1=:^&1, etc. used for successive powers. Thus:
q0=:r stope&0
q1=:r stope&1
q2=:r stope&2
q3=:r stope&3
q4=:r stope&4
x=:0 1 2 3 4
>(q0;q1;q2;q3;q4) x
1 1 1 1 1
0 1 2 3 4
0 1.1 4.2 9.3 16.4
0 1.32 9.24 29.76 68.88
0 1.716 21.252 98.208 296.184
r q4 S x
0 5.28 36.96 119.04 275.52
4*q3 x
0 5.28 36.96 119.04 275.52
r q3 S x
0 3.3 12.6 27.9 49.2
3*q2 x
0 3.3 12.6 27.9 49.2
This behavior is analagous to that of the power functions p4, p3, etc. under the
derivative. Moreover, the stope functions can be defined as a sequence of products, in a
manner similar to that used for defining the power functions. Thus (using R for a constant
function):
R=:r"0
f4=:(]+3"0*R)*f3=:(]+2"0*R)*f2=:(]+1"0*R)*f1=:(]+0"0*R)*f0=:1"0
From these definitions, the foregoing property of the r-slopes of stopes can be obtained in
the manner used for the derivative of powers, but using the expression:
52 Calculus
F. Stope Polynomials
The polynomial function p. also possesses a variant p.!.r, in which the terms are based
upon the stope ^!.r rather than upon the power ^ . For example:
spr=:p.!.r
c=:4 3 2 1
c&spr x
4 10.52 27.64 61.36 117.68
The r-slope of the stope polynomial c&spr then behaves analogously to the derivative of
the ordinary polynomial. Thus:
We now define a stope polynomial adverb, whose argument specifies the run:
(0 adeco c)&spr x
0 6.959 25.773 70.342 160.566
G. Coefficient Transformations
It is important to be able to express an ordinary polynomial as an equivalent stope
polynomial, and vice versa. We will therefore show how to obtain the coefficients for an
ordinary polynomial that is equivalent to a stope polynomial with given coefficients:
x=:2 3 5 7 11
c=:3 1 4 2 1
c p. x
53 177 983 3293 17801
]vm=:x ^/ i.#c
1 2 4 8 16
1 3 9 27 81
1 5 25 125 625
1 7 49 343 2401
1 11 121 1331 14641
mp=:+/ . *
]y=:vm mp c
53 177 983 3293 17801
If x has the same number of elements as c, and if the elements of x are all distinct, then
the matrix vm is non-singular, and its inverse can be used to obtain the coefficients of a
polynomial that gives any specified result. If the result is y, these coefficients are, of
course, the original coefficients c. Thus:
(%.vm) mp y
3 1 4 2 1
The coefficients c used with a stope polynomial give a different result y2, to which we
can apply the same technique to obtain coefficients c2 for an equivalent ordinary
polynomial:
r=:0.1
]y2=:c p.!.r x
61.532 200.928 1077.98 3536.71 18690.4
]c2=:(%.vm) mp y2
3 1.446 4.71 2.6 1
c2 p. x
61.532 200.928 1077.98 3536.71 18690.4
54 Calculus
We now incorporate this method in a conjunction FROM, such that r1 FROM r2 gives a
function which, applied to coefficients c, yields d such that d p.!.r1 x is equivalent to
c p.!.r2 x. Thus:
]cr=:r FROM 0 c
3 0.619 3.47 1.4 1
cr p.!.r x
53 177 983 3293 17801
c p.!.0 x
53 177 983 3293 17801
A conjunction that yields the corresponding Vandermonde matrix rather than the
coefficients can be obtained by removing the final matrix product from FROM. For the
case of the falling factorial function (r=:_1) this matrix gives results of general interest:
0 VMFROM _1 c
1 0 0 0 0
0 1 _1 2 _6
0 0 1 _3 11
0 0 0 1 _6
0 0 0 0 1
_1 VMFROM 0 c
1 0 0 0 0
0 1 1 1 1
0 0 1 3 7
0 0 0 1 6
0 0 0 0 1
The elements of the last of these tables are called Stirling numbers of the scond kind, and
the magnitudes of those of the first are Stirling numbers of the first kind.
]v=: ^&3 i. 6
0 1 8 27 64 125
Chapter 4 Difference Calculus 55
mp=: +/ . *
ag=: <:/~@i.@#
sum=: ag v
sum sum mp sum
1 1 1 1 1 1 1 2 3 4 5 6
0 1 1 1 1 1 0 1 2 3 4 5
0 0 1 1 1 1 0 0 1 2 3 4
0 0 0 1 1 1 0 0 0 1 2 3
0 0 0 0 1 1 0 0 0 0 1 2
0 0 0 0 0 1 0 0 0 0 0 1
L1 v L2 v
0 1 9 36 100 225 0 1 10 46 146 371
L1 v L2 v
0 1 9 36 100 225 0 1 10 46 146 371
The results of L1 v are rough approximations to the areas under the graph of ^&3, that is,
to the integrals up to successive points. Similarly, the inverse matrix dif=: %. sum
can define a linear function that produces differences between successive elements of its
argument. For example:
dif=: %. sum
These results may be compared with the 1-slopes of the cube function, noting that the
first k elements of the kth slope are meaningless. The r-slopes of a function f can be
obtained similarly, by applying %&r@LD1 to the results of f applied to arguments
differing by r. For example:
]x=: r*i.6 [ r=: 0.1
0 0.1 0.2 0.3 0.4 0.5
%&r@LD1 ^&3 x
0 0.01 0.07 0.19 0.37 0.61
r (^&3) S x
0.01 0.01 0.07 0.19 0.37 0.61
Because the results for the 1-slope are so easily extended to the case of a general r-slope,
we will discuss only the 1-slope provided by the linear function DIF=: mp&dif .
Consider the successive applications of DIF to the identity matrix:
ID=: (i. =/ i.) 6
DIF=: mp&dif
ID DIF ID DIF DIF ID
1 0 0 0 0 0 1 _1 0 0 0 0 1 _2 1 0 0 0
0 1 0 0 0 0 0 1 _1 0 0 0 0 1 _2 1 0 0
0 0 1 0 0 0 0 0 1 _1 0 0 0 0 1 _2 1 0
0 0 0 1 0 0 0 0 0 1 _1 0 0 0 0 1 _2 1
0 0 0 0 1 0 0 0 0 0 1 _1 0 0 0 0 1 _2
0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1
2 3$ <"2@(DIF^:0 1 2 3 4 5) ID
+----------------+----------------+-------------------+
| 1 0 0 0 0 0 |1 _1 0 0 0 0| 1 _2 1 0 0 0 |
| 0 1 0 0 0 0 |0 1 _1 0 0 0| 0 1 _2 1 0 0 |
| 0 0 1 0 0 0 |0 0 1 _1 0 0| 0 0 1 _2 1 0 |
| 0 0 0 1 0 0 |0 0 0 1 _1 0| 0 0 0 1 _2 1 |
| 0 0 0 0 1 0 |0 0 0 0 1 _1| 0 0 0 0 1 _2 |
| 0 0 0 0 0 1 |0 0 0 0 0 1| 0 0 0 0 0 1 |
+----------------+----------------+-------------------+
|1 _3 3 _1 0 0|1 _4 6 _4 1 0|1 _5 10 _10 5 _1|
|0 1 _3 3 _1 0|0 1 _4 6 _4 1|0 1 _5 10 _10 5|
|0 0 1 _3 3 _1|0 0 1 _4 6 _4|0 0 1 _5 10 _10|
|0 0 0 1 _3 3|0 0 0 1 _4 6|0 0 0 1 _5 10|
|0 0 0 0 1 _3|0 0 0 0 1 _4|0 0 0 0 1 _5|
|0 0 0 0 0 1|0 0 0 0 0 1|0 0 0 0 0 1|
+----------------+----------------+-------------------+
The foregoing results suggest that the k-th difference is a weighted sum of k+1 elements
in which the weights are the alternating binomial coefficients of order k. For example:
]v=: ^&3 i. 8
0 1 8 27 64 125 216 343
w=: mp & 1 _2 1
w 0 1 2{v
6
w 1 2 3{v w 2 3 4{v w 3 4 5{v
12 18 24
3 <\ v Box applied to each 3-element window
+-----+------+-------+---------+----------+-----------+
Chapter 4 Difference Calculus 57
i ! table i
+--+-------------------------------------------------+
| | _7 _6 _5 _4 _3 _2 _1 0 1 2 3 4 5 6 7|
+--+-------------------------------------------------+
|_7| 1 _6 15 _20 15 _6 1 0 0 0 0 0 0 0 0|
|_6| 0 1 _5 10 _10 5 _1 0 0 0 0 0 0 0 0|
|_5| 0 0 1 _4 6 _4 1 0 0 0 0 0 0 0 0|
|_4| 0 0 0 1 _3 3 _1 0 0 0 0 0 0 0 0|
|_3| 0 0 0 0 1 _2 1 0 0 0 0 0 0 0 0|
|_2| 0 0 0 0 0 1 _1 0 0 0 0 0 0 0 0|
|_1| 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|
| 0| 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1|
| 1| _7 _6 _5 _4 _3 _2 _1 0 1 2 3 4 5 6 7|
| 2| 28 21 15 10 6 3 1 0 0 1 3 6 10 15 21|
| 3| _84 _56 _35 _20 _10 _4 _1 0 0 0 1 4 10 20 35|
| 4| 210 126 70 35 15 5 1 0 0 0 0 1 5 15 35|
| 5| _462 _252 _126 _56 _21 _6 _1 0 0 0 0 0 1 6 21|
| 6| 924 462 210 84 28 7 1 0 0 0 0 0 0 1 7|
| 7|_1716 _792 _330 _120 _36 _8 _1 0 0 0 0 0 0 0 1|
+--+-------------------------------------------------+
Except for a change of sign required for those of odd order, the required alternating
binomial coefficients can be seen in the diagonals beginning in row 0 of the negative
columns of the foregoing table. The required weights are therefore given by the following
function:
]v=: ^&3 i. 8
0 1 8 27 64 125 216 343
2 mp & (w 1)\ v
1 7 19 37 61 91 127
3 mp & (w 2)\ v
6 12 18 24 30 36
(i.7)!4
1 4 6 4 1 0 00
Chapter
5
Fractional Calculus
A. Introduction
The differential and the difference calculus of Chapters 2 and 4 concern derivatives and
integrals of integer order. The fractional calculus treated in this chapter unites the
derivative and the integral in a single differintegral, and extends its domain to non-
integral orders.
Section H of Chapter 1 included a brief statement of the utility of the fractional calculus
and a few examples of fractional derivatives and integrals. Section E of Chapter 4
concluded with the use of the alternating binomial coefficients produced by the outof
function ! to compute differences of arbitrary integer order. The extension of the function
! to non-integer arguments was also cited as the basis for an analogous treatment of non-
integer differences, and therefore as a basis for approximating non-integer differintegrals.
Our treatment of the fractional calculus will be based on Equation 3.2.1 on page 48 of
OS (Oldham and Spanier [5]). Thus:
x=: 3 Argument
q=: 1
". OS Approximation to the first derivative (the exact value
26.7309 is 3*x^2, that is, 27)
q=: 0
27
q=: _1
". OS The first integral (exact value is 4%~x^4)
20.657
q=: _2
". OS The second integral (exact value is 20%~x^5)
12.7677
q=: 0.5
". OS
27.9682 Semi-derivative (exact value is 28.1435)
For example:
2 (0,100) fd (^&3) 3
17.82
2 (0,100) fd (^&3)"0 i. 4
_. 5.94 11.88 17.82
x=: 6
1 (0,100) fd f x
106.924
3*x^2
108
1 ((x-0.01),100) fd f x
107.998
Anyone wishing to study the OS formulation and discussion will need to appreciate the
relation between the function ! used here, and the gamma function (G) used by OS.
Although the gamma function was known to be a generalization of the factorial function
on integer arguments, it was not defined to agree with it on integers. Instead, G n is
equivalent to ! n-1. Moreover, the dyadic case m!n is here defined as
(!n)%(!m)*(!n-m); the three occurrences of the gamma function in Equation 3.2.1 of
OS may therefore be written as j!j-1+q, as seen in the expression OS used above.
The related complete beta function is also used in OS, where it is defined (page 21) by
B(p,q) = (G p) * (G q) % (G p+q). This definition may be re-expressed so as to show its
Chapter 5 Fractional Calculus 61
relation to the binomial coefficients, by substituting m for p-1 and n for p+q-1. The
expression B(p,q) is then equivalent to (!m)*(!n-m)%(!n), or simply % m!n.
B. Table of Semi-Differintegrals
The differintegrals of the sum f+g and the difference f-g are easily seen to be the sums
and differences of the corresponding differintegrals, and it might be expected that
fractional derivatives satisfy further relationships analogous to those shown in Section 2K
for the differential calculus. Such relations are developed by Oldham and Spanier, but
most are too complex for treatment here.
We will confine attention to a few of their semi-differintegrals (of orders that are integral
multiples of 0.5 and _0.5). We begin by defining a conjunction FD (similar to fd, but
with the parameters a and N fixed at 0 and 100), and using it to define adverbs for
approximating semi-derivatives and semi-integrals:
Although the conjunctions sd and si and s3i provide only rough approximations, we
will use them in the following table to denote exact conjunctions for the semi-
differintegrals. This makes it possible to use the expressions in computer experiments,
remembering, of course, to wrap any fork in parentheses before applying it.
Function Semi-derivative Semi-integral
f+g f sd + g sd f si + g si
f-g f sd - g sd f si - g si
]*g (]*g sd)+-:@(g si) (]*g si)--:@(g s3i)
c"0*g c"0 * g sd c"0 * g si
c"0 c"0 % %:@o. (2*c)"0*%:@(]%1p1"0)
1"0 %@%:@o. +:@%:@%@o.@%
] +:@%:@%@o.@% 4r3"0*(^&3r2)%1p1r2"0
62 Calculus
*: 8r3"0*(^&3r2)%1p1r2"0 16r15"0*(^&5r2)%1p1r2"0
%: 1r2p1r2"0 -:@(]*1p1r2"0)
%@>: (%:@>:-%:*_5&o.@%: +:@(_5&o.@%:)%%:@(>:*1p1"0)
).%%:@o.*>:^3r2"0
%@%: 0"0 %:@(1p1"0)
%:@>: 1p1r2"0%~%:@%+_3&o.@%: 1p1r2"0%~%:+>:*_3&o.@%:
%@%:@>: %@(>:*%:*1p1r2"0) +:@(_3&o.)@%:%1p1r2"0
^&p %/@!@((p-0 1r2)"0 %/@!@((p+0 1r2)"0)*^&(p+1r2)
)*^&(p-1r2)
^&n *:@!@(n"0)*^&n@4: *:@!@(n"0)*^&(n+1r2)@4:
%!@+:@(n"0)*%:@o. %!@>:@+:@(n"0)*1p1r2"
^&(n+1r2) !@>:@+:@(n"0)*1p !@>:@>:@+:@(n"0)*1p1
1r2"0*^&n@(1r4& r2"0*^&(>:n)@(%&4)
*)%+:@*:@!@(n"0) %*:@!@>:@(n"0)
_3&o.@%: -:@%:@(1p1"0%>:) 1p1r2"0*%:&.>:
Notes:
f Function
g Function
n Integer
c Constant
To experiment with entries in the foregoing table, first enter the definitions of sd and si
and s3i, and definitions for f and g (such as f=: ^&3 and g=: ^&2). The first row
would then be treated as:
(f+g) sd x=: 1 2 3 4
3.29303 14.3887 35.7565 69.404
(f sd + g sd) x
3.29303 14.3887 35.7565 69.404
(f+g) si x
1.12591 9.31267 33.7741 85.9827
(f si + g si) x
1.12591 9.31267 33.7741 85.9827
Entries in the table can be rendered more readable to anyone familiar only with
conventional notation by a few assignments such as:
twice=: +:
sqrt=: %:
pitimes=: o.
reciprocal=: %
on=: @
Chapter 5 Fractional Calculus 63
The table entry for the semi-derivative of the identity function could then be expressed as
follows:
] sd x
1.12697 1.59378 1.95197 2.25394
under=: &.
twice on sqrt on (pitimes under reciprocal) x
1.12838 1.59577 1.95441 2.25676
65
Chapter
6
Properties of Functions
A. Introduction
In this chapter we will analyze relations among the functions developed in Chapter 2, and
express them all as members of a single family. We will first attempt to discover
interesting relations by experimentation, and then to construct proofs. In this section we
will use the growth and decay functions to illustrate the process, and then devote separate
sections to experimentation and to proof. We will use the adverb D=: ("0)(D.1) .
The reader is urged to try to develop her own experiments before reading Section B, and
her own proofs before reading Section C.
In Sections E and F of Chapter 2, the functions ec and eca were developed to
approximate growth and decay functions. Thus:
eca i.7
1 _1 0.5 _0.166667 0.0416667 _0.00833333 0.00138889
We will now use the approximate functions to experiment with growth and decay:
GR=: (ec i.20)&p.
It might be suspected that the decay function would be the reciprocal of the growth
function, in other words that their product is one. We will test this conjecture in two
ways, first by computing the product directly, and then by computing the coefficients of
the corresponding product polynomial. Thus:
GR x=: 0 1 2 3 4
1 2.71828 7.38906 20.0855 54.5981
DE x
1 0.367879 0.135335 0.0497871 0.0183153
(GR x) * (DE x)
66 Calculus
1 1 1 1 0.999979
(GR * DE) x
1 1 1 1 0.999979
PP=: +//.@(*/)
1 2 1 PP 1 3 3 1
1 5 10 10 5 1
Since the growth and decay functions were defined only in terms of their derivatives, any
proof of the foregoing conjecture must be based on these defining properties. We begin
by determining the derivative of the product as follows:
(DE*GR) d.1
(DE*GR) x 1"0 x
1 1 1 1 0.999979 1 1 1 1 1
r=: _1
DE x=: 0 1 2 3 4
1 0.367879 0.135335 0.0497871 0.0183153
^@(r&*) x
1 0.367879 0.135335 0.0497871 0.0183156
^ AM r x
1 0.367879 0.135335 0.0497871 0.0183156
Chapter 6 Properties of Functions 67
The final expression uses the scaling conjunction of Section I of Chapter 2. We may now
conclude that the function ^ AM r describes growth at any rate, and that negative values
of r subsume the case of decay.
In the foregoing discussion we have used simple observations (such as the probable
reciprocity of growth and decay) to motivate experiments that led to the statement and
proof of significant identities. To any reader already familiar with the exponential
function these matters may seem so obvious as to require neither suggestion nor proof,
and he may therefore miss the fact that all is based only on the bare definitions given in
Sections 2E and 2F.
Similar remarks apply to the hyperbolic and circular functions treated in Sections 2G,H.
The points might be better made by using featureless names such as f1, f2, and f3 for
the functions. However, it seems better to adopt commonly used names at the outset.
A1 Test the proof of this section by entering each expression with an argument.
A2 Make and display the table T whose (counter) diagonal sums form the product of
the coefficients ec i.7 and eca i.7.
[ T=: (ec */ eca) i.7 ]
A3 Denoting the elements of the table t=: 2 2{.T by t00, t01, t10, and t11, write
explicit expressions for them. Then verify that t00 and t01+t10 agree with the
first two elements of the product polynomial given in the text.
[ t00 is 1*1 t01+t10 is (1*_1)+(1*1) ]
B. Experimentation
Hyperbolics. One hyperbolic may be plotted against the other as follows:
sinh=: 5&o.
cosh=: 6&o.
load'plot'
plot (cosh;sinh) 0.1*i:21
The resulting plot suggests a hyperbola satisfying the equation 1= (sqr x)-(sqr y). Thus:
68 Calculus
Finally, each of the hyperbolics is the derivative of the other, and their second derivatives
equal the original functions:
sinh x=: 0 1 2 3 4
0 1.1752 3.62686 10.0179 27.2899
cosh x
1 1.54308 3.7622 10.0677 27.3082
sinh d.1 x
1 1.54308 3.7622 10.0677 27.3082
cosh d.1 x
0 1.1752 3.62686 10.0179 27.2899
sinh d.2 x
0 1.1752 3.62686 10.0179 27.2899
cosh d.2 x
1 1.54308 3.7622 10.0677 27.3082
sin=: 1&o.
cos=: 2&o.
plot (cos;sin) 0.1*i:21
The resulting (partial) circle (flattened by scaling) suggests that the following sum of
squares should give the result 1 :
f=:^&2
x=:0 1 2 3 4
f x
0 1 4 9 16
f -x
0 1 4 9 16
plot f i:4
If f -x equals -f x, then f is said to be odd, and its plot is reflected in the origin:
f=:^&3
f x
0 1 8 27 64
f -x
0 _1 _8 _27 _64
plot f i:3
The adverbs:
EVEN=: .. -
ODD=: .: -
give the even and odd parts of a function to which they are applied; that is, f EVEN is an
even function, f ODD is odd, and their sum is equal to f. For example:
^ x
0.0497871 0.135335 0.367879 1 2.71828 7.38906 20.0855
70 Calculus
^ EVEN x
10.0677 3.7622 1.54308 1 1.54308 3.7622 10.0677
^ ODD x
_10.0179 _3.62686 _1.1752 0 1.1752 3.62686 10.0179
(^EVEN x)+(^ODD x)
0.0497871 0.135335 0.367879 1 2.71828 7.38906 20.0855
Since the coefficients that define the hyperbolic and circular functions each have zeros in
alternate positions, each is either odd or even. The following functions are all tautologies,
that is, they yield 1 for any argument:
(sinh = sinh ODD) (sinh = ^ ODD)
(cosh = cosh EVEN) (cosh = ^ EVEN)
(sin = sin ODD) (cos = cos EVEN)
C. Proofs
We will now use the definitions of the hyperbolic and circular functions to establish the
two main conjectures of Section B:
(*:@cosh - *:@sinh) is 1
(*:@cos + *:@sin) is 1
The circular case differs only in the values for the derivatives:
cos d.1 is -@sin
sin d.1 is cos
C1 Write and test a proof of the fact that the sum of the squares of the functions 1&o.
and 2&o. is 1.
^ AM r Growth at rate r
^ EVEN Hyperbolic cosine
^ ODD Hyperbolic sine
Complex numbers can be used to add the circular functions to the exponential family as
follows:
^@j. EVEN Cosine
^@j. ODD Sine multiplied by 0j1
For example:
^@j. EVEN x=: 0 1 2 3 4
1 0.540302 _0.416147 _0.989992 _0.653644
cos x
1 0.540302 _0.416147 _0.989992 _0.653644
^@j. ODD x
0 0j0.841471 0j0.909297 0j0.14112 0j_0.756802
j. sin x
0 0j0.841471 0j0.909297 0j0.14112 0j_0.756802
^ ODD &. j. x
0 0.841471 0.909297 0.14112 _0.756802
^ I x=: 1 2 3 4 5
0 0.693147 1.09861 1.38629 1.60944
^ ^ I x
1 2 3 4 5
^. x Natural log
0 0.693147 1.09861 1.38629 1.60944
72 Calculus
^. d.1 x
1 0.5 0.333333 0.25 0.2
% ^. d.1 x
1 2 3 4 5
^. x ^ b=: 3
0 2.07944 3.29584 4.15888 4.82831
b * ^. x
0 2.07944 3.29584 4.15888 4.82831
The dyadic case of the logarithm ^. is defined in terms of the monadic as illustrated
below:
(^.x) % (^.b)
0 0.63093 1 1.26186 1.46497
b ^. x
0 0.63093 1 1.26186 1.46497
b %&^.~ x
0 0.63093 1 1.26186 1.46497
The dyadic case of ^ is the power function; it has, like other familiar dyads (including +
- * %) been used without definition. We now define it in terms of the dyadic logarithm
as illustrated below:
b ^ x
3 9 27 81 243
This definition extends the domain of the power function beyond the non-negative
integer right arguments embraced in the definition of power as the product over
repetitions of the left argument, as illustrated below:
m=: 1.5
n=: 4
n # m
1.5 1.5 1.5 1.5
*/ n # m
5.0625
m^n
5.0625
Moreover, the extended definition retains the familiar properties of the simple definition.
For example:
Chapter 6 Properties of Functions 73
5 ^ 4+3
78125
(5^4)*(5^3)
78125
E1 Comment on the question of whether the equivalence of */n#m and m^n holds for
the case n=:0.
F. Trigonometric Functions
Just as a five-sided (or five-angled) figure may be characterized either as pentagonal or
pentangular, so may a three-sided figure be characterized as trigonal or triangular. The
first of these words suggests the etymology of trigonometry, the measurement of three-
sided figures. This section concerns the equivalence of the functions sin and cos (that
have been defined only by differential equations) and the corresponding trigonometric
functions sine and cosine.
The sine and cosine are also called circular functions, because they can be defined in
terms of the coordinates of a point on a unit circle (with radius 1 and centre at the origin)
as functions of the length of arc to the point, measured counter-clockwise from the
reference point with coordinates 1 0. As illustrated in Figure F1, the cosine of a is the
horizontal (or x) coordinate of the point whose arc is a, and the sine of a is the vertical
coordinate.
The length of arc is also called the angle, and the ratio of the circumference of a circle to
its diameter is called pi, given by pi=: o. 1, or by the constant 1p1. The circular
functions therefore have the period 2p1, that is two pi. Moreover, the coordinates of the
end points of arcs of lengths 1p1 and 0.5p1 are _1 0 and 0 1; the supplementary angle
1p1&- a and the complementary angle 0.5p1&- a are found by moving clockwise from
these points.
sin a
1 a
cos a
Figure F1
Taken together with these remarks, the properties of the circle make evident a number of
useful properties of the sine and cosine. We will illustrate some of them below by
tautologies, each of which can be tested by enclosing it in parentheses and applying it to
an argument, as illustrated for the first of them:
S=: 1&o.
74 Calculus
C=: 2&o.
x=: 1 2 3 4 5
(1"0 = *:@S + *:@C) x Theorem of Pythagoras
1 1 1 1 1
a=: 2 3 5 7
b=: 4 3 2 1
+: a+b
12 12 14 16
(+:a)+(+:b)
12 12 14 16
*: a+b
36 36 49 64
(*:a)+(+:a*b)+(*:b)
36 36 49 64
^ a+b
403.429 403.429 1096.63 2980.96
(^a)*(^b)
403.429 403.429 1096.63 2980.96
Sum formulas may also be expressed as tautologies:
The following sum formulas for the sine and cosine are well-known in trigonometry:
Since a S@+ a is equivalent to (the monadic) S@+:, we may obtain the following
identities for the double angle:
S@+: = +:@(S * C)
C@+: = *:@C - *:@S
The theorem of Pythagoras can be used to obtain two further forms of the identity for
C@+: :
C@+: = -.@+:@*:@S
C@+: = <:@+:@*:@C
An identity for the sine of the half angle may be obtained as follows:
The last two tautologies above compare magnitudes (=&|) because the square root yields
only the positive of the two possible roots. Similarly for the cosine:
(C@+:@-: = <:@+:@*:@C@-:)
(C = <:@+:@*:@C@-:)
(C@-: =&| %:@-:@>:@C)
Derivatives. Using the results of Section 2A, we may express the secant slope of the sine
function at the points x and i+x as follows:
76 Calculus
O C T
Figure F2
ST is the tangent to the circle, and its length is called the tangent of i. Its value (S%C) i
follows from the ratios in the similar triangles.
The values of the cited areas are therefore -:@(S*C) i and -:@i and -:@(S%C) i .
Multiplying by 2 and dividing by S i gives the relative sizes C i and i%S i and %C i .
Hence, the ratio i%S i lies between C i and %C i, both of which are 1 if i=: 0.
Finally, the desired limiting ratio (S i)%i is the reciprocal, also 1.
The limiting value of (1-C i)%i is given by the identity +:@*:@S@-: = 1"0-C, for
:
(1-C i)% i
(+: *: S i%2) % i
(*: S i%2) % (i%2)
Chapter 6 Properties of Functions 77
The limit of the first factor has been shown to be 1, and the limit of S i%2 is 0; hence the
limit of (1-C i)%i is their product, that is, 0.
Substituting these limiting values in the expression for the secant slope ((C x)*((S
i)%i)) - (S x)*((1-C i)%i) we obtain the expression for the derivative of the
sine, namely:
a=: 1 2 3 [ b=: 4 3 2
+/a*b
16
78 Calculus
dot=: +/ . *
L a,:b
3.74166 5.38516
0 0 1 cos 0 1 1
0.707107
The following expressions lead to a definition of the cross product and to a definition of
the sine of the angle between two vectors:
a +/@:*:@(sin , cos) b
1
The following expressions suggest interpretations of the dot and cross products that will
be pursued in exercises:
G1 Experiment with the dot and cross products, beginning with vectors in 2-space (that
is with two elements) for which the results are obvious. Continue with other
vectors in 2-space and in 3-space. Sketch the rays defined by the vectors, showing
their intersection with the unit circle (or sphere).
H. Normals
We now use the function e introduced in Section 3E to define a function norm that is a
generalization of the cross product; it applies to arrays other than vectors, and produces a
result that is normal to its argument. Moreover, when applied to skew arrays of odd order
(having an odd number of items) it is self-inverse. Thus:
indices=:{@(] # <@i.)
e=:C.!.2@>@indices Result is called an "e-system" by McConnell [4]
+/ v * e #v Inverse transformation
0 _4 _16
4 0 _12
16 12 0
norm=: +/^:(]`(#@$)`(* e@#)) % !@(#-#@$)
]m=: (a=: 1 2 3) */ (b=: 4 3 2)
4 3 2
8 6 4
12 9 6
1 n m
_5 10 _5
a cross b
_5 10 _5
2 n m Skew part of m
0 _2.5 _5
2.5 0 _2.5
5 2.5 0
3 n m
_5 10 _5
1 n a
0 1.5 _1
_1.5 0 0.5
1 _0.5 0
mp=: +/ . *
a mp 1 n a*/b
0
b mp 1 n a*/b
0
x=: 1 2
1 n x
_2 1
x mp 1 n x
0
4 n x
1 2
2 n y=: 1 2 3 4
_1 _2 _3 _4
4 n y 2 n 1 2 3 4 5
1 2 3 4 1 2 3 4 5
a cross b
_5 10 _5
Chapter
7
A. Introduction
As remarked in Section 3A, various interpretations of a particular function definition are
possible (as in vol=: */ and cost=: */), and any one of them may be either helpful
or confusing, depending upon the background of the reader. A helpful interpretation may
also be misleading, either by suggesting too little or too much. We will illustrate this
point by three examples.
Example 1. The sentences:
define and use the function sf. Moreover, sf can be helpfully interpreted as the secant
slope of the exponential with spacing h, and (because h is small) as an approximation to
the tangent slope of the exponential.
However, for the case of the discontinuous integer part function <. this interpretation
would be misleading because its "tangent slope" at the point 1 is infinite. Thus:
h S <. x
1e8
Example 2. If the spacing h is complex, the function h S ^ has the behaviour expected
of a secant slope:
^ y=: 2j3
_7.31511j1.04274
h=: 1e_6j1e_8
h S ^ y
84 Calculus
_7.31511j1.04274
(r=: 1e_6j0) S ^ y
_7.31511j1.04274
(i=: 0j1e_8) S ^ y
_7.31511j1.04274
h S + y r S + y i S + y
0.9998j_0.019998 1 _1
The problem arises because the conjugate is not an analytic function. A clear and simple
discussion of this matter may be found in Churchill [12].
Example 3.
Section 2D interprets the integral of a function f as a function that gives the area under
the graph of f from a point a (that is, the point a,f a on the graph of f) to a second
point b. This interpretation is helpful for real-valued functions, but how should we
visualize the area under a function that gives a complex result?
It is, of course, possible to interpret the integral as a complex result whose real and
imaginary parts are the areas under the real and imaginary parts of f, respectively.
However, the beginning and end points may themselves be complex, and although there
is a clearly defined "path" through real numbers between a pair of real numbers a and b,
there are an infinity of different paths through complex numbers from complex a to
complex b.
This observation leads to the more difficult, but highly useful, notion of integration along
a prescribed path (called a line or contour integral), a notion not hinted at by the
interpretation of integration as the area under a curve.
may be interpreted as the “Position of a car ... moving on a circular path at an angular
velocity of 0.1 radians per second”. Conversely, the expression in quotes could be
considered as an application of the circular functions, and could be posed as a word
problem requiring as its solution a definition of the function f.
Similarly, the phrase f D.1 may be interpreted as the velocity of the car whose position
is prescribed by f. Because the phrase involved a derivative, the corresponding word
problem would be considered as an application of the calculus.
Chapter 7 Interpretations And Applications 85
suggest that it has a (local) maximum (of 1.9) near 1.2 and a minimum near 4.9.
Moreover, a graph of the function over the interval from 0 to 4 shows their location more
precisely.
A graph of the derivative f d.1 over the same interval illustrates the obvious fact that
the derivative is zero at an extremum (minimum or maximum):
fmt f d.1 x
1.4 1.8 2.0 2.1 2.1 2.1 1.9 1.7 1.4 1.0
0.6 0.1 _0.4 _1.0 _1.6 _2.3 _2.9 _3.6 _4.3 _5.0
_5.7 _6.4 _7.1 _7.7 _8.4 _9.0 _9.6_10.1_10.6_11.0
_11.4_11.7_11.9_12.1_12.1_12.1_12.0_11.8_11.4_11.0
_10.4 _9.8 _8.9 _8.0 _6.9 _5.6 _4.2 _2.6 _0.9 1.0
3.1 5.4 7.8 10.5 13.4 16.5 19.8 23.3 27.0 31.0
m=: +/ % #
bis=: 1 : '2&{.@(m , ] #~ m ~:&(*@x.) ])'
f y=: 1 4 Interval that bounds a root of f
1.75 _20
f root
_3.55271e_14
f d.1 droot
_9.52571e_14
When the derivative of f is increasing, the graph of f bends upward; when the derivative
is decreasing, it bends downward. At a maximum (or minimum) point of the derivative,
the graph of f therefore changes its curvature, and the graph crosses its own tangent.
Such a point is called a point of inflection.
Since an extremum of the derivative occurs at a zero of its derivative, an inflection point
of f occurs at a zero of f d.2 . Thus:
fmt f d.2 x
3.8 2.7 1.7 0.7 _0.3 _1.1 _1.9 _2.7 _3.4 _4.0
_4.6 _5.1 _5.5 _5.9 _6.3 _6.5 _6.7 _6.9 _7.0 _7.0
_7.0 _6.9 _6.7 _6.5 _6.2 _5.9 _5.5 _5.1 _4.6 _4.0
_3.4 _2.7 _1.9 _1.1 _0.2 0.7 1.7 2.7 3.8 5.0
6.2 7.5 8.9 10.3 11.8 13.3 14.9 16.5 18.2 20.0
21.8 23.7 25.7 27.7 29.8 31.9 34.1 36.3 38.6 41.0
* f (d.2) 0 1
1 _1
f d.2 infl
_6.83897e_14
A graph of f will show that the curve crosses its tangent at the point infl.
Chapter 7 Interpretations And Applications 87
D. Newton's Method
Although the bisection method is certain to converge to a root when applied to an interval
for which the function values at the endpoints differ in sign, this convergence is normally
very slow. The derivative of the function can be used in a method that normally
converges much faster, although convergence is assured only if the initial guess is
"sufficiently near" the root.
The function g=: (]-1:)*(]-2:) has roots at 1 and 2, as shown by its graph:
plot y;g y=: 1r20*i.60
Draw a tangent at the point x,g x=: 3 intersecting the axis at a point nx,0 and note
that nx is a much better approximation to the nearby root at 2 than is x. The length x-nx
is the run that produces the rise g x with the slope g d.1 x. As a consequence,
nx=:x-(g x) % (g d.1 x) is a better approximation to the root at 2. Thus:
x=:3
g=: (]-1:)*(]-2:)
g x
2
]nx=:x-(g x) % (g d.1 x)
2.33333
g nx
0.444444
A root can be determined by repeated application of this process, using an adverb N as
follows:
N=:(1 : '] - x. % x. d.1') (^:_)
f=: (c=: 0 1 2.5 _2 0.25)&p. Used in Section C
88 Calculus
f N 6
6.31662
f f N 6 Test if f N 6 is a root of f
7.01286e_16
f f N x
0 0 0 0 0 7.01286e_16 7.01286e_16
This use of the derivative to find a root is called Newton's method. Although it converges
rapidly near a single root, the method may not converge to the root nearest the initial
guess, and may not converge at all. The initial guess droot determined in the preceding
section as a maximum point of f illustrates the matter; the derivative at the point is
approximately 0, and division by it yields a very large value as the next guess:
f N droot
6.31662
Since the derivative of a polynomial function c&p. can be computed directly using the
coefficients }.c*i.#c, it is possible to define a version of Newton's method that does
not make explicit use of the derivative adverb. Thus:
c&p. N x
0 _0.316625 2 2 2 6.31662 6.31662
The following utilities are convenient for experimenting with polynomials and their
roots:
1 3 3 1 p. x
1 8 27 64 125 216 343
(1 2 1 pp 1 3 3 1) p. x
1 32 243 1024 3125 7776 16807
(1 2 1 p. x) * (1 3 3 1 p. x)
1 32 243 1024 3125 7776 16807
1 3 3 1
D1 Use Newton's method to determine the roots for which the bisection method was
used in Section C.
E. Kerner's Method
Kerner's method for the roots of a polynomial is a generalization of Newton's method; at
each step it treats an n-element list as an approximation to all of the <:#c roots of the
polynomial c&p., and produces an "improved" approximation. We will first define and
illustrate the use of an adverb K such that c K b yields the <:#c (or #b) roots of the
polynomial with coefficients c:
c K b Limit of Kerner
1.5 2.5 3.5 4.5 Roots of c&p.
c K rb
1.5 3.5 4.5 2.5
The adverb K applies only to a normalized coefficient c, that is, one whose last non-zero
element (for the highest order term) is 1. Thus:
norm=:(] % {:)@(>./\.@:|@:* # ])
norm 1 2 0 3 4 0 0
0.25 0.5 0 0.75 1
The polynomials c&p. and (norm c)&p. have the same roots, and norm c is a suitable
argument to the adverb K.
Kerner's method applies to polynomials with complex roots; however it will not converge
to complex roots if the beginning guess is completely real: begin provides a suitable
beginning argument:
90 Calculus
(begin=: %:@-@i.@<:@#) 1 3 3 1
0 0j1 0j1.41421
For example, the coefficients d=: cfr 1 2 2j3 4 2j_4 define a polynomial with two
complex roots. Thus:
d=: cfr 1 2 2j3 4 2j_4
]roots=: (norm d) K begin d
4 2j3 2j_4 2 1
The definition of the adverb k (for a single step of Kerner) can be revised to give an
alternative equivalent adverb by replacing the division (%) by matrix division (%.), and
removing the phrase (<0 1)&|:@ that extracts the diagonal of the matrix produced by
the subsequent phrase. Thus:
In this form it is clear that the vector of residuals produced by x.&p. (the values of the
function applied to the putative roots, which must all be reduced to zero) is divided by the
matrix produced by the expression to the right of %. . This expression produces the
vector derivative with respect to each of the approximate roots; like the analogous case of
the direct calculation of the derivative in the adverb NP it is a direct calculation of the
derivative without explicit use of the vector derivative adverb VD=: ("1) (D. 1).
These matters are left for exploration by the reader.
E1 Find all roots of the functions used in Section C.
E2 Define some polynomials that have complex roots, and use Kerner's method to find
all roots.
det=: -/ . *
]m=: >3 1 4;2 7 8;5 1 6
3 1 4
2 7 8
5 1 6
det m
_2
The determinant is a function of rank 2 that produces a rank 0 result; its derivative is
therefore a rank 2 function that produces a rank 2 result. For example:
det MD m
34 28 _33
_2 _2 2
_20 _16 19
This result can be checked by examining the evaluation of the determinant as the
alternating sum of the elements of any one column, each weighted by the determinant of
its respective complementary minor, the matrix occupying the remaining rows and
columns; the derivative with respect to any given element is its weighting factor. For
example, the complementary minor of the leading element of m is the matrix m00=: 7
8,:1 6, whose determinant is 34, agreeing with the leading element of the derivative.
Corresponding results can be obtained for the permanent, defined by the function +/ .*.
For example:
(per=: +/ . *) m
350
per MD m
50 52 37
10 38 8
36 32 23
F1 Read the following sentences and try to state the meanings of the functions defined
and the exact results they produce. Then enter the expressions (and any related
expressions that you might find helpful) and again try to state their meanings and
results.
alph=: 4 4$ 'abcdefghijklmnop'
m=: i. 4 4
box=: <"2
minors=: 1&(|:\.)"2 ^:2
box minors m
box minors alph
box^:2 minors^:2 alph
[The function minors produces the complementary minors of its argument; the
complementary minor of any element of a matrix is the matrix obtained by deleting
the row and column in which the element lies.]
F2 Enter and then comment upon the following sentences:
sqm=: *:m
det minors sqm
det D.1 sqm
(det D.1 sqm) % (det minors sqm)
((+/ .*D.1)%+/ .*@minors)sqm
92 Calculus
G. Matrix Inverse
The matrix inverse is a rank 2 function that produces a rank 2 result; its derivative is
therefore a rank 2 function that produces a rank 4 result. For example:
mp=: +/ . *
]m=: i. 3 3
0 1 2
3 4 5
6 7 8
L=: m&mp A linear function
L a
9 33 57
L b
11 56 101
L a+b
20 89 158
r =/~a
0 0 1
0 1 0
1 0 0
perm a
1 3 4
perm VD a
0 1 0
1 0 0
0 0 1
F 3
1 3 9
F y=: 3 4 5
1 3 9
1 4 16
1 5 25
The function L@F provides weighted sums or linear combinations of the members of the
family F, and the adverb L@ is called a linear operator. Thus:
21 60 99
36 99 162
55 148 241
C LO y A Fourier series
0.930348 3.84088 6.75141
_0.944644 _0.342075 0.260494
_1.39448 _0.0607089 1.27306
then F is a family of derivatives of f. If the function L@F is identically zero, then the
function f is said to be a solution of the linear differential equation defined by the linear
function L. In the present example, f was chosen to be such a solution:
The solution of such a differential equation is not necessarily unique; in the present
instance the sine function is also a solution:
f=: 1&o.
L@F y=: 0.1*i.4
0 0 0 0
In general, the basic solutions of a linear differential equation defined by the linear
function L=: mp&c are f=: ^@(*&sr), where sr is any one root of the polynomial
c&p.. In the present instance:
f=: s=: ^@(*&0j1)
L@F y
0 0 0 0
c=: 1 0 1
c K begin c Roots of c&p. using Kerner’s method
0j_1 0j1
Moreover, any linear combination of the basic solutions s and t is also a solution. In
particular, the following are solutions:
J. Differential Geometry
The differential geometry of curves and surfaces, as developed by Eisenhart in his book
of that title [13], provides interpretations of the vector calculus that should prove
understandable to anyone with an elementary knowledge of coordinate geometry. We
will provide a glimpse of his development, beginning with a function which Eisenhart
calls a circular helix.
The following defines a circular helix in terms of an argument in degrees, with a rise of 4
units per revolution:
CH=:(1&o.@(%&180p_1),2&o.@(%&180p_1),*&4r360)"0
CH 0 1 90 180 360
0 1 0
0.0174524 0.999848 0.0111111
1 0 1
0 _1 2
_2.44921e_16 1 4
CH D x
0.0174533 0 0.0111111
0.0174506 _0.000304602 0.0111111
0.0174427 _0.000609111 0.0111111
0.0174294 _0.000913435 0.0111111
0.0174108 _0.00121748 0.0111111
CH D D x
0 0 0
_5.3163e_6 _0.000304571 0
_1.0631e_5 _0.000304432 0
_1.59424e_5 _0.0003042 0
_2.1249e_5 _0.000303875 0
The derivatives produced by CH D in the expression above are the directions of the
tangents to the helix; their derivatives produced by CH D D are the directions of the
binormals. The binormal is perpendicular to the tangent, and indeed to the osculating
(kissing) plane that touches the helix at the point given by CH.
96 Calculus
These matters may be made more concrete by drawing the helix on a mailing tube or
other circular cylinder. An accurate rendering of a helix can be made by drawing a
sloping straight line on a sheet of paper and rolling it on the tube. A drawing to scale can
be made by marking the point of overlap on the paper, unrolling it, and drawing the
straight line with a rise of 4 units and a run of the length of the circumference. Finally,
the use of a sheet of transparent plastic will make visible successive laps of the helix.
Then proceed as follows:
1. Use a nail or knitting needle to approximate the tangent at one of the points
where its directions have been computed, and compare with the computed results.
2. Puncture the tube to hold the needle in the direction of the binormal, and again
compare with the computed results.
3. Puncture a thin sheet of flat cardboard and hang it on the binormal needle to
approximate the osculating plane.
4. Hold a third needle in the direction of the principal normal, which lies in the
osculating plane perpendicular to the tangent.
To compute the directions of the principal normal we must determine a vector
perpendicular to two other vectors. For this we can use the skew array used in Section 6I,
or the following simpler vector product function:
a +/ . * q b +/ . * q
0 0
Although we used degree arguments for the function CH we could have used radians, and
it is clear that the choice of the argument to describe a curve is rather arbitrary. As
Eisenhart points out, it is possible to choose an argument that is intrinsic to the curve,
namely the length along its path. In the case of the helix defined by CH, it is easy to
determine the relation between the path length and the degree argument. From the
foregoing discussion of the paper tube model it is clear that the length of the helix
corresponding to 360 degrees is the length of the hypotenuse of the triangle with sides
360 and 4. Consequently the definition of a function dfl to give degrees from length is
given by:
1. Replace the constant multiple function for the last component by other
functions, such as the square root, square, and exponential.
2. Multiply the functions for the first two elements by constants a and b
respectively, to produce a helix on an elliptical cylinder. This can be
Chapter 7 Interpretations And Applications 97
modelled by removing the cardboard core from the cylinder and flattening it
somewhat to form an approximate ellipse.
K. Approximate Integrals
Section M of Chapter 2 developed a method for obtaining the integral or anti-derivative
of a polynomial, and Section N outlined a method for approximating the integral of any
function by summing the function values over a grid of points to approximate the area
under the graph of the function. Better approximations to the integral can be obtained by
weighting the function values, leading to methods known by names such as Simpson's
Rule.
We will here develop methods for producing these weights, and use them in the
definition of an adverb (to be called I) such that f I x yields the area under the graph of
f from 0 to x.
The fact that the derivative of f I equals f can be seen in Figure C1; since the difference
(f I x+h)-(f I x)is approximately the area of the rectangle with base h and altitude
f x, the secant slope of the function f I is approximately f. Moreover, the
approximation approaches equality for small h.
Figure C1
x x+h
Figure C1 can also be used to suggest a way of approximating the function AREA=: f I;
if the area under the curve is broken into n rectangles each of width x%n, then the area is
approximately the sum of the areas of the rectangles with the common base h and the
altitudes f h*i.n. For example:
3.24 4
The approximation can be improved by taking a larger number of points, but it can also
be improved by using the areas of the trapezoids of altitudes f h*k and f h*k+1 (and
including the point h*n). Since the area of each trapezoid is its base times the average of
its altitudes, and since each altitude other than the first and last enter into two trapezoids,
this is equivalent to multiplying the altitudes by the weights w=: 0.5,(1 #~ n-
1),0.5 . Thus:
The trapezoids provide, in effect, linear approximations to the function between grid
points; much better approximations to the integral can be obtained by using groups of
1+2*k points, each group being fitted by a polynomial of degree 2*k. For example, the
case k=: 1 provides fitting by a polynomial of degree 2 (a parabola) and a consequent
weighting of 3%~1 4 1 for the three points. If the function to be fitted is itself a
polynomial of degree two or less, the integration produced is exact. For example:
w=: 3%~1 4 1
h=: (x=: 5)%(n=:2)
]grid=: h*i. n+1
0 2.5 5
f=: ^&2
w*f grid
0 8.33333 8.33333
Better approximations are given by several groups of three points, resulting in weights of
the form 3%~1 4 2 4 2 4 2 4 1. For example, using g groups of 1+2*k points each:
n=: (g=: 4) * 2 * (k=: 1)
]h=: n %~ x=: 5
0.625
This case of fitting by parabolas (k=:1) is commonly used for approximate integration,
and is called Simpson's Rule. The weights 3%~1 4 1 used in Simpson's rule will now be
derived by a general method that applies equally for higher values of k, that is, for any
odd number of points. Elementary algebra can be used to determine the coefficients c of
a polynomial of degree 2 that passes through any three points on the graph of a function
f. The integral of this polynomial (that is, (0,c%1 2 3)&p.) can be used to determine
the exact area under the parabola, and therefore the approximate area under the graph of
f.
The appropriate weights are given by the function W, whose definition is presented below,
after some examples of its use:
W 1
0.333333 1.33333 0.333333
W 2
0.311111 1.42222 0.533333 1.42222 0.311111
3*W 1 45*W 2
1 4 1 14 64 24 64 14
%. vm 2 Inverse of Vandermonde
1 _2.08333 1.45833 _0.416667 0.0416667
0 4 _4.33333 1.5 _0.166667
0 _3 4.75 _2 0.25
0 1.33333 _2.33333 1.16667 _0.166667
0 _0.25 0.458333 _0.25 0.0416667
definition of W (by replacing each function used in its definition by itsdefinition in terms
of primitives:
W f.
(0: ,. %.@(^~/~) %"1 >:)@(i.@>:@+:) p. +:
1 2 3 4 5 6 % x:3
1r3 2r3 1 4r3 5r3 2
W x:1
1r3 4r3 1r3
3*W x:1
1 4 1
W x:3
41r140 54r35 27r140 68r35 27r140 54r35 41r140
140*W x:3
41 216 27 272 27 216 41
We now define a function EW for extended weights, such that g EW k yields the weights
for g groups of fits for 1+2*k points:
3*2 EW x:1
1 4 2 4 1
45*2 EW x:2
14 64 24 64 28 64 24 64 14
Finally, we define a conjunction ai such that w ai f x gives the approximate integral
of the function f to the point x, using the weights w:
(x^3)%3
Chapter 7 Interpretations And Applications 101
(x^5)%5
0.2 6.4 48.6 204.8
4 * (2 EW 2) ai cir 1 Approximation to pi
3.1237
4*(20 EW 3) ai (0&o.) 1
3.14132
o.1
3.14159
For use in exercises and in the treatment of interpretations in Section L, we will define
the adverb I in terms of the weights 4 EW 4, that is, four groups of a polynomial
approximation of order eight:
I=: (4 EW 4) ai
^&9 I x=: 1 2 3 4
0.0999966 102.397 5904.7 104854
(x^10) % 10
0.1 102.4 5904.9 104858
^&9 d._1 x
0.1 102.4 5904.9 104858
K1 Use the integral adverb I to determine the area under the square root function up to
various points.
K2 Since the graphs of the square and the square root intersect at 0 and 1, they enclose
an area. Determine its size.
[ (%:I-*:I) 1 or (%:-*:)I 1 ]
K3 Experiment with the expression (f - f I D) x for various functions f and
arguments x.
0.784908
4 * (0&o.) I 1 Approximation to pi
3.13963
*: I x=: 1 2 3 4
0.333317 2.66654 8.99956 21.3323
(^&3 % 3"0) x
0.333333 2.66667 9 21.3333
The foregoing integral of the square function can be interpreted as the area under its
graph. Alternatively, it can be interpreted as the volume of a three-dimensional solid as
illustrated in Figure L1; that is, as the volume of a pyramid. In particular, the equivalent
function ^&3 % 3"0 is a well-known expression for the volume of a pyramid.
Similarly for a function that defines the area of a circle in terms of its radius:
h*x
Figure L1
By drawing a figure analogous to Figure L1, it may be seen that the cone whose volume
is determined by ca I can be generated by revolving the 45-degree line through the
origin about the axis. The volume is therefore called a volume of revolution.
Functions other than ] (the 45-degree line) can be used to generate volumes of
revolution. For example:
Because the expression f I y applies the function f to points ranging from 0 to y, the
area approximated is the area over the same interval from 0 to y. The area under f from a
to b can be determined as a simple difference. For example:
f=: ^&3
f I b=: 4 f I a=: 2
63.9965 3.99978
g=: %@(+&a)
g 0 g b-a
0.5 0.25
L1 Use integration to determine the areas and volumes of various geometrical figures,
including cones and other volumes of revolution.
M. Physical Experiments
Simple experiments, or mere observation of everyday phenomena, can provide a host of
problems for which simple application of the calculus provides solutions and significant
insights. The reason is that phenomena are commonly governed by simple relations
between the functions that describe them, and their rates of change (that is, derivatives).
For example, the position of a body as a function of time is related to its first derivative
(velocity), its second derivative (acceleration), and its third derivative (jerk). More
specifically, if p t gives the position at time t of a body suspended on a spring or rubber
band, then the acceleration of the body (p d.2) is proportional to the force exerted by
the spring, which is itself a simple linear function of the position p.
If position is measured from the rest position (where the body rests after motion stops)
this linear function is simply multiplication by a constant function c determined by the
elasticity of the spring, and c*p must be equal and opposite to m*p d.2, where the
constant function m is the mass of the body. In other words, (c*p)-(m*p d.2) must be
zero.
This result is only an approximation, since a body oscillating in this manner will finally
come to rest, unlike the sine and cosine functions which continue with undiminished
amplitude. The difference is due to resistance (from friction with the air and internal
friction in the rubber band) which is approximately proportional to the velocity. In other
words, the differential equation:
0: = (d*p)+(e*p D. 1)+(f*p D. 2)
2. On the other hand, a superficial treatment that does not lead the student far
enough to actually produce significant new results is likely to leave her
uninterested. Textbook pictures of suspension bridges with encouraging but
unhelpful remarks that calculus can be used to analyze the form assumed by
the cables, are more likely to discourage than stimulate a student.
3. The use of scalar notation makes it difficult to reach the interesting results of
the vector calculus in an introductory course.
Chapter
8
Analysis
A. Introduction
To a math student conversant only with high-school algebra and trigonometry, the
arguments used in Section 1E to determine the exact derivative of the cube (dividing the
rise in the function value by the run r, and then setting r to zero in the resulting
expression) might appear not only persuasive but conclusive. Moreover, the fact that the
derivative so determined leads to consistent and powerful results would only tend to
confirm a faith in the validity of the arguments.
On the other hand, a more mature student familiar with the use of rigorous axiomatic and
deductive methods would, like Newton's colleagues at the time of his development of
what came to be the calculus, have serious qualms about the validity of assuming a
quantity r to be non-zero and then, at a convenient point in the argument, asserting it to
be zero.
Should a student interested primarily in the practical results of the calculus dismiss such
qualms as pedantic “logic-chopping”, or are there important lessons to be learned from
the centuries-long effort to put the calculus on a “firm” foundation? If so, what are they,
and how may they be approached?
The important lesson is to appreciate the limitations of the methods employed, and to
learn the techniques for assuring that they are being properly observed. As Morris Kline
says in the preface to his Mathematics: The Loss of Certainty [14]:
But intellectually oriented people must be fully aware of the powers of the tools at
their disposal. Recognition of the limitations, as well as the capabilities, of reason is
far more beneficial than blind trust, which can lead to false ideologies and even to
destruction.
Concerning “This history of the illogical development [of the calculus] ...”, Kline states
(page 167):
But there is a deeper reason. A subtle change in the nature of mathematics had been
unconsciously made by the masters. Up to about 1500, the concepts of mathematics
were immediate realizations of or abstractions from experience. ... In other words,
mathematicians were [now] contributing concepts rather than abstracting ideas from
the real world.
108 Calculus
Chapter VII of Kline provides a brief and readable overview of ingenious attempts to put
the calculus on a firm basis, and equally ingenious refutations. Students are urged to read
it in full, and perhaps to supplement it with Lakatos’ equally readable account of the
interplay between proof and refutation in mathematics. In particular, a student should be
aware of the fact that weird and difficult functions sometimes brought into presentations
of the calculus are included primarily because of their historical role as refutations. The
words of Poincare (quoted by Kline on page 194) are worth remembering:
When earlier, new functions were introduced, the purpose was to apply them.
Today, on the contrary, one constructs functions to contradict the conclusions of
our predecessors and one will never be able to apply them for any other purpose.
The central concept required to analyze derivatives is the limit; it is introduced in Section
B, and applied to series in Section D.
B. Limits
The function h=: (*: - 9"0) % (] - 3"0) applied to the argument a=: 3 yields
the meaningless result of zero divided by zero. On the other hand, a list of arguments that
differ from a by successively smaller amounts appear to be approaching the limiting
value g=:6"0. Thus:
g=: 6"0
h=: (*:-9"0) % (]-3"0)
a=: 3
h a
0
a+i
4 2 3.1 2.9 3.01 2.99 3.001 2.999 3.0001 2.9999
h a+i
7 5 6.1 5.9 6.01 5.99 6.001 5.999 6.0001 5.9999
|(g-h) a+i
1 1 0.1 0.1 0.01 0.01 0.001 0.001 0.0001 0.0001
As illustrated at the beginning of this section, the function g=: 6"0 is the apparent limit
of the function h=: (*:-9"0) % (]-3"0) at the point a=: 3. The simple frame
function fr=: ] suffices, as illustrated (and later proved) below:
0 a-d a a+d
Figure B1
fr=: ]
a=: 3
e=: 0.2
]d=: a fr e
0.2
]i=: ,(+,-)"0,5%~>:i.5
0.2 _0.2 0.4 _0.4 0.6 _0.6 0.8 _0.8 1 _1
]j=: d*i
0.04 _0.04 0.08 _0.08 0.12 _0.12 0.16 _0.16 0.2 _0.2
|(g-h) a+j
0.04 0.04 0.08 0.08 0.12 0.12 0.16 0.16 0.2 0.2
e>:|(g-h) a+j
1 1 1 1 1 1 1 1 1 1
We now offer a proof that fr=: ] suffices, by examining the difference function g-h in
a series of simple algebraic steps as follows:
g-h
6"0 - (*:-9"0) % (]-3"0) Definitions of g and h
6"0 + (*:-9"0) % (3"0-])
((6"0*3"0-])+(*:-9"0))%(3"0-])
((18"0-6"0*])+(*:-9"0))%(3"0-])
((9"0-6"0*])+*:)%(3"0-])
((3"0-])*(3"0-]))%(3"0-])
3"0-] Cancel terms, but the domain now excludes 3
To recapitulate: for the limit point a=: 3 we require a frame function fr such that the
magnitude of the difference (g-h) at the point a+a fr e shall not exceed e. We have
just shown that the difference function (g-h) is equivalent to (3"0-]). Hence:
|(g-h) a + a fr e
110 Calculus
f=: ^&4
h=: [ %~ ] -&f -~
x=: 0 1 2 3 4
]a=: 10^->:i. 6
0.1 0.01 0.001 0.0001 1e_5 1e_6
a h"0/ x
_0.001 3.439 29.679 102.719 246.559
_1e_6 3.9404 31.7608 107.461 255.042
_1e_9 3.994 31.976 107.946 255.904
_1e_12 3.9994 31.9976 107.995 255.99
_1e_15 3.99994 31.9998 107.999 255.999
_1e_18 3.99999 32 108 256
The last row of the foregoing result suggests the function 4"0*^&3 as the limit. Thus:
g=: 4:*^&3
g x
0 4 32 108 256
a=: 1e_6
(g-a&h) x
1e_18 5.99986e_6 2.4003e_5 5.39897e_5 9.59728e_5
In simplifying the expression for the difference (g-a&h) x we will use functions for the
polynomial and for weighted binomial coefficients as illustrated below:
(4 w -a) p. x
0.0001 0.6561 13.0321 70.7281 231.344 576.48
4 w -a
0.0001 _0.004 0.06 _0.4 1
The following expressions for the difference can each be entered so that their results may
be compared:
(g-a&h) x
(4*x^3)-a %~ (f x) - (f x-a)
Chapter 8 Analysis 111
We will now obtain a simple upper bound for the magnitude of the difference (that is,
|(g-a&h) x), beginning with the final expression above, and continuing with a
sequence of expressions that are greater than or equal to it: (If the expressions are to be
entered, x should be set to a scalar value, as in x=: 5, to avoid length problems)
x=:5
|(1 _4 6 * a^3 2 1) p. x Magnitude of (g-a&h) x
| +/1 _4 6*(a^3 2 1)*x^i.3 Polynomial as sum of terms
+/(|1 _4 6)*(|a^3 2 1)*(|x^i.3) Sum of mags>:mag of sum
+/1 4 6*(a^3 2 1)*|x^0 1 2 a is non-negative
+/6*(a^3 2 1)*|x^0 1 2
e=: 0.001
a=: e % (6*+/|x^0 1 2)
|(g-a&h) x
0.000806451
C. Continuity
Informally we say that a function f is continuous in an interval if its graph over the
interval can be drawn without lifting the pen. Formally, we define a function f to be
continuous in an interval if it possesses a limit at every point in the interval.
For example, the integer part function <. is continuous in the interval from 0.1 to 0.9,
but not in an interval that contains integers.
D. Convergence of Series
The exponential coefficients function ec=:%@!, generates coefficients for a polynomial
that approximates its own derivative, and the growth function (exponential) is defined as
the limiting value for an infinite number of terms. Since the coefficients produced by ec
decrease rapidly in magnitude (the 20th element is %!19, approximately 8e_18), it
seemed reasonable to assume that the polynomial (ec i.n)&p. would converge to a
112 Calculus
limit for large n even when applied to large arguments. We will now examine more
carefully the conditions under which a sum of such a series approaches a limit.
It might seem that the sum of a series whose successive terms approach zero would
necessarily approach a limiting value. However, the series %@>:@i. n provides a
counter example, since (by considering sums over successive groups of 2^i. k
elements) it is easy to show that its sum can be made as large as desired.
If at a given term t in a series the remaining terms are decreasing in such a manner that
the magnitudes of the ratios between each pair of successive terms are all less than some
value r less than 1, then the magnitude of the sum of the terms after t is less than the
magnitude of t%(1-r); if this quantity can be shown to approach 0, the sum of the entire
series therefore approaches a limit.
This can be illustrated by the series r^i.n, which has a fixed ratio r, and has a sum
equal to (1-r^n) % (1-r). For example:
S=: [ ^ i.@]
T=: (1"0-^)%(1"0-[)
r=: 3
n=: 10
r S n
1 3 9 27 81 243 729 2187 6561 19683
+/ r S n
29524
r T n
29524
A proof of the equivalence of T and the sum over S can be based on the patterns observed
in the following:
(1,-r) */ r S n
1 3 9 27 81 243 729 2187 6561 19683
_3 _9 _27 _81 _243 _729 _2187 _6561 _19683 _59049
]dsums=:+//.(1,-r) */ r S n
1 0 0 0 0 0 0 0 0 0 _59049
%/ec j-0 1
0.25
%j
0.25
The ratio of the corresponding terms of the polynomial (ec i.n)&p. applied to x is x
times this, namely, x%j. At some point this ratio becomes less than 1, and the series for
the exponential therefore converges. Similar proofs of convergence can be made for the
series for the circular and hyperbolic sines and cosines, after removing the alternate zero
coefficients.
Another generally useful proof of convergence can be made for certain series by
establishing upper and lower bounds for the series. This method applies if the elements
alternate in sign and decrease in magnitude.
We will illustrate this by first developing a series approximation to the arctangent, that is,
the inverse tangent _3o.. The development proceeds in the following steps:
1. Derivative of the tangent
2. Derivative of the inverse tangent
3. Express the derivative as a polynomial in the tangent
4. Express the derivative as the limit of a polynomial
5. Integrate the polynomial
6. Apply the polynomial to the argument 1 to get a series whose sum approximates
the arctangent of 1 (that is, one-quarter pi):
]x=: 1,1r6p1,1r4p1,1r3p1
1 0.523599 0.785398 1.0472
sin x
0.841471 0.5 0.707107 0.866025
cos x
0.540302 0.866025 0.707107 0.5
tan x
1.55741 0.57735 1 1.73205
(sin % cos) x
1.55741 0.57735 1 1.73205
INV=: ^:_1
tan INV tan x
1 0.523599 0.785398 1.0472
D=:("0) (D.1)
tan D
(sin % cos) D Definition of tan
(sin%cos)*(sin D%sin)-(cos D%cos) θ7§2K
tan*(cos%sin)-(-@sin%cos) §2K
tan * %@tan +tan
114 Calculus
tan INV D
1"0 % tan D @(tan INV) θ7§2K
1"0 % (1"0 + *:@tan) @ (tan INV)
1"0 % (1"0@(tan INV)) + *:@tan@(tan INV)
1"0 % 1"0 + *:@]
1"0 % 1"0 + *:
%@(1"0+*:) Derivative of inverse tan QED
c=: 1 0 1
% c&p. x Derivative of inverse tangent as
0.5 0.784833 0.618486 0.476958 reciprocal of a polynomial
%@(1:+*:) x
0.5 0.784833 0.618486 0.476958
int=: 0: , ] % 1: + i.&#
a=: int b The fn a&p. is the integral of b&p.
a&p. x Approximation to arctangent
0.744012 0.482334 0.6636 0.736276
tan INV x
0.785398 0.482348 0.665774 0.808449
gaor=: _1&^@i. * 1: % 1: + 2: * i.
gaor 6 Generate alternating odd reciprocals
1 _0.333333 0.2 _0.142857 0.111111 _0.0909091
+/\gaor 6
1 0.666667 0.866667 0.72381 0.834921 0.744012
7 2 $ +/\ gaor 14
1 0.666667 First column (sums of odd number
Chapter 8 Analysis 115
D1 Test the derivations in this section by enclosing a sentence in parens and applying
it to an argument, as in (1: + *:@tan) x
D2 Prove that a decreasing alternating series can be bounded as illustrated.
[Group pairs of successive elements to form a sum of positive or negative terms]
117
Appendix
For example:
c=: 1 2 3 [ x=: 0 1 2 3 4
c pol x 1 3 3 1 pol x
1 6 17 34 57 1 8 27 64 125
The polynomial may therefore be viewed as a weighted sum of powers, the weights being
specified by the coefficients. It is important enough to be treated as a primitive, denoted
by p. .
(b p. x) * (c p. x) Product of polynomials
1 32 243 1024 3125
vm=: [ ^/ i.@#@]
x=: 0 1 2 3 4 5
c=: 1 3 3 1
x vm c (x vm c) mp c c p. x
1 0 0 0 1 8 27 64 125 216 1 8 27 64 125
216
1 1 1 1
1 2 4 8
1 3 9 27
1 4 16 64
1 5 25 125
c p. x !x
1 1 2 6 24 1 1 2 6 24
]c=: 4 FIT ! x
0.871429 3.27381 _3.71429 1.08333
Appendix 119
c p. x
0.871429 1.51429 1.22857 6.51429 23.8714
B. Binomial Coefficients
m!n is the number of ways that m things can be chosen out of n; for example 2!3 is 3,
and 3!5 is 10. The expression c=: (i. n+1)!n yields the binomial coefficients of
order n, and c p. x is equivalent to (x+1)^n. For example:
c p. x=: 0 1 2 3 4 5
1 8 27 64 125 216
(x+1) ^ n
1 8 27 64 125 216
<@(i.@>: ! ])"0 i. 6
┌─┬───┬─────┬───────┬─────────┬─────────────┐
│1│1 1│1 2 1│1 3 3 1│1 4 6 4 1│1 5 10 10 5 1│
└─┴───┴─────┴───────┴─────────┴─────────────┘
C. Complex Numbers
Just as subtraction and division applied to the counting numbers (positive integers)
introduce new classes of numbers (called negative numbers and rational numbers), so
does the square root applied to negative numbers introduce a new class called imaginary
numbers. For example:
a=: 1 2 3 4 5 6
]b=: -a Negative numbers
_1 _2 _3 _4 _5 _6
% a Rational numbers
1 0.5 0.333333 0.25 0.2 0.166667
%: b Imaginary numbers
0j1 0j1.41421 0j1.73205 0j2 0j2.23607 0j2.44949
Arithmetic functions are extended systematically to this new class of numbers to produce
complex numbers, which are represented by two real numbers, a real part and an
imaginary part, separated by the letter j. Thus:
%: d*+d Magnitude of a
5.09902 4.47214 4.24264 4.47214 5.09902 6 complex number
|d
5.09902 4.47214 4.24264 4.47214 5.09902 6
mp=: +/ . *
]m=: i. 3 3 ]n=: i. 4 3
0 1 2 0 1 2
3 4 5 3 4 5
6 7 8 6 7 8
9 10 11
n mp m 3 2 1 mp m
15 18 21 12 18 24
42 54 66 1 4 6 mp m
69 90 111 48 59 70
96 126 156
Left and right bonds of the matrix product distribute over addition; that is, a&mp c+d is
(a&mp c)+(a&mp d), and mp&b c+d is (mp&b c)+(mp&b d). For example:
mp&m 3 2 1 + 1 4 6
60 77 94
(mp&m 3 2 1) + (mp&m 1 4 6)
60 77 94
A function that distributes over addition is said to be linear; the name reflects the fact that
a linear function applied to the coordinates of collinear points produces collinear points.
For example:
Appendix 121
a&mp line
11 _19 7
_8 32 4
c=: 4 3 2 1
even=: c&p. EVEN Even part of polynomial c&p.
Exercises
AP1 Enter the expressions of this section, and verify that the results agree with those
given in the text.
AP2 Predict the results of each of the following sentences, and then enter them to
validate your predictions:
D=: ("1) (D.1)
x=: 1 2 3 4 5
|. D x
2&|. D x
3 1 0 2 &{ D x
+/\ D x
+/\. D x
AP3 Define show=: {&'.*' and use it to display the results of Exercises G2, as in
show |. D x .
AP4 Define a function rFd to produce radians from degrees, and compare rFd 90 180
with
o. 0.5 1 .
[ rFd=: %&180@o. ]
AP5 Define a function AREA such that AREA v yields the area of a triangle with two
sides of lengths 0{v and 1{v and with an angle of 2{v degrees between them.
Test it on triangles such as 2 3 90 and 2 3 30, whose areas are easily
computed.
[AREA=: -:@(0&{ * 1&{ * 1&o.@rFd@{:)"1]
AP6 Experiment with the vector derivative of the triangle area function of Exercise
G5, using VD=: ("1)(D.1) .
[AREA VD 2 3 90]
AP7 Heron's formula for the area of a triangle is the square root of the product of the
semiperimeter with itself less zero and less each of the three sides. Define a
function hat to give Heron's area of a triangle, and experiment with its vector
derivative hat VD. In particular, try the case hat VD 3 4 5, and explain the
(near) zero result in the final element.
[ hat=: %:@(*/)@(-:@(+/) - 0: , ])"1 ]
AP8 Define a function bc such that bc n yields the binomial coefficients of order n, a
function tbc such that tbc n yields a table of all binomial coefficients up to
Appendix 123
tabc=: %.@tbc ]
AP9 Test the assertion that (bc n) p. x=: i. 4 is equivalent to x^n+1 for
various values of n.
AP10 Write an expression to yield the matrix m such that mp&m is equivalent to a given
linear function L. Test it on the linear functions L=:|."1 and L=:3&A."1, using
the argument x=:3 1 4 1 6
[ L = i. # x ]
AP11 Experiment with the use of various functions on imaginary and complex
numbers, including the exponential, the sine, cosine, hyperbolic sine and
hyperbolic cosine. Also experiment with matrices of complex numbers and with
the use of the matrix inverse and matrix product functions upon them.
125
References
1. Iverson, Kenneth E., Arithmetic, ISI 1991
5. Oldham, Keith B., and Jerome Spanier, The Fractional Calculus, Academic Press,
1974.
6. Johnson, Richard E., and Fred L. Kiokemeister, Calculus with analytic geometry,
Allyn and Bacon, 1957.
9. Schey, H.M., Div, Grad, Curl, and All That, W.W. Norton, 1973.
13. Eisenhart, Luther Pfahler, A Treatise on the Differential Geometry of Curves and
Surfaces, Ginn, 1909.
Index
adverb, 11, 12, 15, 25, 32, 49, 67, 73, 74, 82, 87, Calculus of Finite Differences, 49
90, 91, 92, 96, 99, 103, 104, 123
Celsius, 31
adverbs, 11, 12, 63, 123
chain rule, 15
aggregation, 57
circle, 70
alternating binomial coefficients, 59, 125
circular, 26, 30, 31, 69, 70, 72, 73, 75, 86, 97,
alternating sum, 14, 93 98, 115
angle, 41, 42, 75, 77, 78, 79, 80, 81, 124 closed, 119
binomial coefficients, 59, 60, 61, 63, 112, 121, conjugate, 86, 122
125
conjunction, 12, 13, 15, 30, 31, 62, 63, 65, 69,
Binomial Coefficients, 121 103, 120, 122
cos, 30, 31, 70, 72, 73, 75, 79, 80, 81, 86, 106, Differential Equations, 25
116, 122
Differential Geometry, 97
cosh, 29, 69, 70, 72, 73, 106, 122
differintegral, 61, 62
cosine, 29, 30, 31, 73, 75, 76, 77, 80, 97, 106,
125 differintegrals, 60
cross, 79 direction, 41
curves, 97 Divergence, 42
degrees, 30, 79, 80, 97, 98, 122, 124 Elementary Math, 119
derivative, 9, 10, 15, 16, 17, 18, 22, 25, 26, 27, ellipse, 99, 107
28, 29, 32, 33, 37, 40, 49, 52, 61, 62, 63, 65,
68, 70, 78, 79, 86, 87, 88, 89, 90, 92, 93, 94, Even part, 123
95, 99, 105, 109, 112, 114, 115, 124
executable, 10, 11, 22
Derivative, 15, 16
executed, 14
Derivative of polynomial, 120
EXERCISES, 13, 124
derivative operator, 10
experimentation, 10, 15, 22, 67
derivatives, 15, 16, 21, 26, 30, 31, 32, 39, 51, 52,
60, 61, 63, 68, 70, 72, 79, 96, 98, 105, 110,
Experimentation, 69
119
experiments, 11, 63, 67, 69, 105, 106, 107
derived function, 15
explore, 11
determinant, 38, 41, 83, 92, 93
exponential, 12, 16, 26, 27, 28, 29, 69, 73, 85, 99,
Determinant, 92
105, 114, 115, 125
diagonal sums, 69
Exponential Family, 73
difference, 49
exponentially, 26
Index 3
extrema, 89 Hyperbolics, 28
f., 16, 28, 47, 86, 96, 99, 101, 102 imaginary numbers, 15, 121
Fahrenheit, 31 induction, 33
function, 12 integral, 15, 21, 22, 55, 61, 62, 63, 86, 99, 100,
101, 103, 104, 105, 116, 119
functions, 7
Integral, 15, 16
Functions, 11, 32, 105
integration, 61, 86, 100, 101, 105
gamma function, 62
Interpretations, 18, 85
gamma function and imaginary numbers., 15
Inverse, 123
Gradient, 38
inverse matrix, 57
growth, 7, 16, 26, 27, 28, 67, 68, 69, 73, 114
irrotational, 46
Growth, 26
items, 12, 82, 119
harmonics, 96
Jacobian, 40, 41, 42
heaviside, 10
jerk, 105
Heaviside's, 46
Jordan, 49
helix, 97
Kerner’s method, 97
Heron's area, 124
KERNER'S METHOD, 91
hierarchy, 12
Kline, 109
high-school algebra, 12, 109
Lakatos, 21
hyperbola, 29, 70
Laplacian, 42
hyperbolic, 26, 29, 69, 72, 73, 106, 115, 125
leibniz, 10
Hyperbolic Functions, 122
Less than, 11
4 Calculus
linear function, 40, 41, 57, 58, 94, 95, 96, 106, normal, 79
123, 125
normalized coefficient, 91
linear functions, 41
Normals, 82
Linear Functions, 94
notation, 10, 11, 15, 22, 64, 102, 107
LINEAR FUNCTIONS, 122
Notation, 11
linear operator, 96
NOTATION, 15
lists, 11, 14, 32
nouns, 11, 12
local, 87
number of items, 82
local behaviour, 16
numerator, 115
local minimum, 89
Odd part, 123
logarithm, 73, 74
operators, 10, 11
Logarithm, 73
Operators, 94
Loss of Certainty, 109
oscillations, 29, 106
lower bounds, 115
osculating, 98
magnitude, 41
outof, 61
Magnitude, 122
Parentheses, 12
matrices, 11, 56, 125
Parity, 71, 123
MATRIX INVERSE, 94
Partial derivatives, 21
MATRIX PRODUCT, 122
periodic functions, 29
maximum, 87, 88, 89, 90
Permanent, 92
Maxwell's, 46
permutation, 95
mechanical system, 29
permutations, 42
minimum, 11, 15, 87, 88, 89
Index 5
perpendicular, 79 rank-0, 37
polynomial, 26, 27, 30, 31, 49, 50, 55, 67, 69, 87, Reciprocal, 123
89, 90, 91, 92, 96, 100, 101, 103, 106, 112,
114, 115, 116, 119, 120, 123, 124 residuals, 92
power, 10, 15, 17, 21, 49, 51, 52, 74, 103, 112, Rotation, 80
119
run, 89
Power, 73
scalar product, 79
precedence, 12
scalars, 21, 80
primes, 14
Scaling, 30
principal normal, 98
Secant Slope, 15, 16
Product of polynomials, 119
secant slopes, 16
pronouns, 11
second derivative, 10
proof, 14, 17, 67, 68, 69, 72, 110, 111, 114, 115
Semi-Differintegrals, 63
proofs, 13, 21, 22, 52, 67, 115
series, 115
Proofs, 72, 80
Simpson's Rule, 101
Proofs and Refutations, 21
sin, 13, 30, 31, 70, 72, 73, 75, 79, 81, 86, 106,
proverbs, 11 116, 122
punctuation, 12 sine, 29, 30, 73, 75, 76, 77, 78, 79, 80, 81, 96, 97,
106, 125
pyramid, 104
Sine, 13, 73, 122
Pythagoras, 76
sinh, 29, 69, 70, 72, 73, 106, 122
quotes, 14, 86
Skew part, 82
radians, 30, 41, 78, 79, 86, 124
slope, 89
Random starting value, 91
Slopes As Linear Functions, 57
rank, 12, 21, 37, 93, 94, 107
Stirling numbers, 56
rank conjunction, 12
stope polynomial, 55
6 Calculus
subtraction, 12, 121 under, 15, 49, 51, 57, 65, 86, 99, 100, 101, 103,
104, 105, 114, 119
Sum Formulas, 76
upper, 115
Sum of polynomials, 119
Vandermonde, 101, 120
summation, 57
vector calculus, 38, 46, 97, 107
surfaces, 97
Vector Calculus, 37
tables, 11, 89
vector derivative, 92
tangent, 15, 22, 78, 85, 86, 88, 89, 98, 107, 115,
116 vector product, 79, 98
tautologies, 72, 73, 76, 77, 79 vectors, 10, 11, 79, 80, 81, 82, 98
Tautologies, 78 Vectors, 11
Terminology, 11 vocabulary, 15