Today we talked about the "second version" of the fundamental theorem of calculus. If we assume that
f
is continuous on [a,b] and take any c in the interval and define
then we know
. Now if P is any other function with the property that
for all x in (a,b) then
so
is a constant function. We can phrase this in the language of differential equations as follows: If
are any two solutions to the differential equation
then they differ by a constant. Let's look at what this says graphically.
> with(DEtools):
> f:=x->x+sin(x^2);
> DE:=D(y)(x)=f(x);
> dfieldplot(DE,y(x),x=-3..3,y=-3..3,arrows=thick,color=f(x));
Note that any two arrows with the same x value have the same slope (color) and the solution curves are parallel...in other words they differ by a constant. .
We then talked about the implementation of symbolic differentiation versus the implementation of symbolic integration. (By "symbolic" we mean an algorithmic implementation of the process, probably with a computer).
Differentiation is straightforward. If we can "type" in a expression, then we can "parse" the expression into what we might call an expression tree. For example,
parses as a sum of two terms. The first term parses as a composition of the sin function and the squaring function, and the second term parses as a product of two basic objects.
So by simply looking at the parsing of the expression, we can proceed to differentiate the expression.
Integration is not so simple. Look at these:
and
.
Both of these "parse" in a similar fashion, namely in the form of a composition, each part of which we know how to integrate.
Yet the methods for integrating these two integrals are completely different, in spite of the similar parsing.
This is why integration is to some extent an "art". Lots of people enjoy the intellectual challenge of integration. I have never met anybody who thinks differentiation is intellectually challenging!
The fact that we can implement the "art" of integration with software is a minor triumph of artificial intelligence. Most implementations make use of what is called the Risch algorithm. This dates to about 1970. Before this date many people thought that integration would always remain an non-algorithmic art. Even with the appearance of the algorithm, it took several years before software interfaces could implement the algorithm effectively. Math software in the decade or two after 1970 tended to be numerical based: an object like
could not be handled symbolically, it had to be represented numerically like 1.414.
Integration with a computer had to wait for symbolic manipulation software.
When you integrate with Maple, it is sometimes fun to get a glimpse of what it does. Try this:
> infolevel[int]:=5:
> int(sin(t^3),t);
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/trigon: case of integrand containing trigs
int/prptrig: case ratpoly*trig(arg)
int/rischnorm: enter Risch-Norman integrator
int/rischnorm: exit Risch-Norman integrator
int/risch: enter Risch integration
int/risch/algebraic1: RootOfs should be algebraic numbers and functions
int/risch: the field extensions are
int/risch: Introduce the namings:
int/risch/int: integrand is
int/risch/exppoly: integrating
int/risch/diffeq: solving Risch d.e. y' + f y = g where f,g are:
int/risch/DEratpoly: solving Risch d.e. y' + f y = g where f,g are:
int/risch/exppoly: Risch d.e. has no solution
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/exp: case of integrand containing exp
int/prpexp: case ratpoly*exp(arg)
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/exp: case of integrand containing exp
int/prpexp: case ratpoly*exp(arg)
int/risch: exit Risch integration
We then spent some time looking at substitution and integration by parts. It is important to understand that substitution is the "reverse chain rule" and integration by parts is the "reverse product rule".
> Int(x^3*cos(x^4),x);value(%);
> Int(x^5*cos(x),x);value(%);sort(%);
Do you see how the coefficients of the trig functions in the above example descend as derivatives? (The derivative of
is
, etc). There is also a sign pattern that is ++ -- ++ -- etc.
With this observation you could probably easily write down the value of
> Int(x^3*sin(x),x);
Try it.