38 Symbolic anti-differentiation
You have already learned how to write down, by sight, the anti-derivative of the many of the pattern-book functions. As a reminder, here is an (almost) complete list of the derivatives and anti-derivatives of the pattern-book functions.
power-law |
||
See below. |
You can see that the derivatives and anti-derivatives of the pattern-book functions can be written in terms of the pattern-book functions. The left column contains the symbolic derivatives of the pattern book functions.1 The right column contains the symbolic anti-derivatives. We call them “symbolic,” because they are written down with the same kind of symbols that we use for writing the pattern-book functions themselves.2
We are stretching things a bit by including
Think of the above table as the “basic facts” of differentiation and anti-differentiation. It is well worth memorizing the table since it shows many of the relationships among the functions that are central to this book. For the sinusoids, we’ve used the traditional name
For differentiation, any function that can be written using combinations of the pattern-book functions by multiplication, composition, and linear combination has a derivative that can be written using the pattern-book functions. So a complete story of symbolic differentiation is told by the above table and the differentiation rules:
linear combination:
product:
composition:
This chapter is about the analogous rules for anti-differentiation. The anti-differentiation rule for linear combination is simple: essentially the same as the rule for differentiation.
How about the rules for function products and for composition? The surprising answer is that there are no such rules. There is no template analogous to the product and chain rules for derivatives, that can consistently be used for anti-derivatives. What we have instead are techniques of integration, somewhat vague rules that will sometimes guide a successful search for the anti-derivative, but often will lead you astray.
Indeed, there are many functions for which a symbolic anti-derivative cannot be constructed from compositions and/or multiplication of pattern-book functions that can be written using pattern-book functions.3
Fortunately, we already know the symbolic anti-derivative form of many functions. We will call those the cataloged functions, but this is not a term in general use in mathematics. For functions not in the catalog, it is non-trivial to find out whether the function has a symbolic anti-derivative or not. This is one reason why the techniques of integration do not always provide a result.
The following sections provide an overview of techniques of integration. We start with a description of the cataloged functions and direct you to computer-based systems for looking up the catalog. (These are almost always faster and more reliable than trying to do things by hand.) Then we introduce a new interpretation of the notation for anti-differentiation: differentials. This interpretation makes it somewhat easier to understand the major techniques of integration: substitution and integration by parts. We will finish by returning to a setting where symbolic integration is easy: polynomials.
Remember that, even if we cannot always find a symbolic anti-derivative, that we can always construct a numerical anti-derivative that will be precise enough for almost any genuine purpose.
38.1 The cataloged functions
In a traditional science or mathematics education, students encounter (almost exclusively) basic functions from a mid-sized catalog. For instance:
The professional applied mathematician’s catalog is much larger. You can see an example published by the US National Institute of Standards and Technology as the Digital Library of Mathematical Functions. (Almost all of the 36 chapters in this catalog, important though they be, are highly specialized and not of general interest across fields.)
There is a considerable body of theory for these cataloged functions, which often takes the form of relating them to one another. For instance,
Simply to illustrate what a function catalog looks like, Figure 38.1 shows a page from an 1899 handbook entitled A Short Table of Integrals.
The use of cataloged functions is particularly prevalent in textbooks, so the quantitatively sophisticated student will encounter symbolic anti-derivatives of these functions throughout his or her studies.
The cataloged functions were assembled with great effort by mathematicians over the decades. The techniques and tricks they used to find symbolic anti-derivatives are not part of the everyday experience of technical workers, although many mathematically minded people find them a good source of recreation.
Calculus textbooks that include extensive coverage of the techniques and tricks should be understood as telling a story of the historical construction of catalogs, rather than conveying skills that are widely used today. In a practical sense, when the techniques are needed, it is more reliable to access them via computer interface such as WolframAlpha, as depicted in Figure 38.2.
The systems can do a good job identifying cases where the techniques will not work. In such systems, they provide the anti-derivative as constructed by numerical integration. The R/mosaic antiD()
function works in this same way, although its catalog contains only a tiny fraction of the functions found in professional systems. (But then, only a tiny fraction of the professional cataloged function are widely used in applied work.)
38.2 Differentials
Breathing some life into the symbol
By analogy, the English sentence
consists of five parts: the five words in the sentence.
But you can also see “We loaded up on snacks” as having three parts:
Likewise, the integrate sentence can be seen as consisting of just two parts:
A differential corresponds to the little sloped segments that we add up when calculating a definite integral numerically using the slope function visualization. That is
A differential is a genuine mathematical object and is used, for example, in analyzing the geometry of curved spaces, as in the Theory of General Relativity. But this is well beyond the scope of this introductory calculus course.
Our use here for differentials will be to express rules for anti-differentiation of function compositions and products.
You should be thinking in terms of differentials when you see a sentence like the following:
“In
, make the substitution , implying that and getting , which is simple to integrate.”
The table gives some examples of functions and their differentials. “w.r.t” means “with respect to.”
As you can see, the differential of a function is simply the derivative of that function followed by the little
Notice that the differential of a function is not written with parentheses: The function
What is the differential of
As we’ve seen,
38.3 U-substitution
There is little reason to use
- Pick a function
and another function . Typically and belong to the family of basic modeling functions, e.g. , , , , and so on. For the purpose of illustration, we will use and . - Compose
with to produce a new function which, in our case, will be . - Use the chain rule to find
. In the example, the derivative of is , the derivative of is . By the chain rule,
In a sense, we have just watched a function give birth to another through the straightforward process of differentiation. Having witnessed the birth, we know who is the integration parent of
Saving this fact in your diary is helpful. The next time you need to find
Now for the u-substitution game. The trick is to take a problem of the form
Task: Evaluate the definite integral
You don’t know ahead of time that this is an integral amenable to solution by u-substitution. For all you know, it is not. So before you start, look at the function to see if it one of those for which you already know the anti-derivative, for example any of the pattern-book functions or their parameterized cousins the basic modeling functions.
If so, you’ve already memorized the answer and you are done. If not …
Assume for a moment—without any guarantee that this will work, mind you—that the answer can be built using u-substitution. You will therefore look hard at
In the problem at hand, we can readily see something of the form
If this guess matches the actual
then you win. The answer to will be . If not, see if there is any other plausible guess for to try. If you cannot find one that works, try integration by parts.
38.4 Integration by parts (standard presentation)
If you do a lot of symbolic anti-differentation, you will often come across functions that you don’t recognize as being the derivative of an already known function. Consider, for instance,
Even though the integrand
The re-organization rule is based on two fundamental properties of differentiation and anti-differentiation.
. This is saying nothing more than if is the derivative of , then must be an anti-derivative of . : the product rule of differentiation.
Let’s integrate both sides of the statement of the product rule. For the left side, applying rule (i), we get a simple result:
As for the right side, all we get is two anti-derivatives: $$dx =
dx + dx$$ Putting together the previous two expressions and re-arranging gives:
Now, consider a problem like
To implement the re-arrangement, we need to split our as yet unknown anti-derivative into two pieces:
According to this proposed splitting, we have
Now that we know the
We are in luck! We already know the anti-derivative
The key creative step in using integration by parts effectively is to choose a helpful split of the original integral into the
For the calculus student learning integration by parts, there is an irony. Gaining enough experience to make good choices of
In demonstrating that
What would happen in the previous example if we had made a bad choice for
Unless you know
On the other hand … if you are in the business of compiling diaries of anti-derivatives, you could use this situation to chalk up another entry based on already knowing
Find
Let
Then,
Using the parts re-arrangement formula …
38.5 Integration by parts (optional alternative presentation)
Integration by parts applies to integrals that are recognizably of the form
Step 1: Split up the integrand into an
Step 2: Pick one of
Step 3: Construct a helper function
Step 4: Find
We know from the way we constructed
Step 5: Anti-differentiate both sides of the previous equation. From the fundamental theorem of calculus, we know how to do the left side of the equation.
The right side of the equation has two parts:
Putting together the left and right sides of the equation, and re-arranging gives us a new expression for the original integral we sought to calculate:
It may seem that we haven’t accomplished much with this re-organization. But we have done something. We took a problem we didn’t otherwise know how to solve (that is
Task: Find
An obvious choice for the two parts is
Differentiating
Now anti-differentiate both sides of the above, the left side by the fundamental theorem of algebra and the right side by other means:
Re-arranging gives the answer
The constant of integration
To confirm the result, you can differentiate the right-hand side; differentiation is always easy.
Alternatively, we can check numerically if
Task: Find
The easy solution is to recognize that the anti-derivative of
It is hard to see a separate
Differentiating the helper function gives (by the product rule):
Integrating the differentiated helper function, we find
Re-arranging, we have
Task: Find
This isn’t the integral of a pattern book or basic modeling function, and substitution didn’t work, so we try integration by parts.
The obvious choice for the two parts is
The new integral that we need to compute does not look any friendlier than the original, but who knows? we will do
This may look like we are going in circles, and maybe we are, but let’s put everything together.
Rearranging gives
And don’t forget the constant of integration.
[The presentation of integration by parts in this section was formulated by Prof. Michael Brilleslyper.]
38.6 Didn’t work?
If integration by parts does not work … and it does not always work! … there is a variety of possibilities such as asking a math professor (who has a much larger set of functions at hand than you), looking through a table of integrals (which is to say, the collective calculus diary of generations of math professors), using a computer algebra system, or using numerical integration. One of these will work.
If you have difficulty using u-substitution or integration by parts, you will be in the same league as the vast majority of calculus students. Think of your fellow students who master the topic in the way you think of ice dancers. It is beautiful to watch, but you need a special talent and it hardly solves every problem. People who would fall on their face if strapped to a pair of skates have nonetheless made huge contributions in technical fields, even those that involve ice.
Prof. Kaplan once had a heart-to-heart with a 2009 Nobel-prize winner who confessed to always feeling bad and inadequate as a scientist because he had not done well in introductory calculus. It was only when he was nominated for the Nobel that he felt comfortable admitting to his “failure.” Even if you don’t master u-substitution or integration by parts, remember that you can integrate any function using easily accessible resources.
38.7 Integrating polynomials
One of the most famous settings for integration comes from the physics of free fall under gravity.
Here’s the setting. An object—a ball, let’s imagine—is being held at height
On release, the force that held the ball steady is removed and the object moves under the influence of only one factor: gravity. The effect of gravity near the Earth’s surface is easy to describe: it accelerates the object at a constant rate of about 9.8 m/s
Acceleration is the derivative with respect to time of velocity. Since we know acceleration, to find velocity we find an anti-derivative of acceleration:
The constant of integration
Velocity is the derivative of position: height in this case. So height is an anti-derivative of velocity.
Why is
Let’s checkout the function
An important thing to notice about
Stated generally, the anti-derivative of a polynomial is
By use of the symbol
In exercise 26.16, we introduced a Taylor polynomial approximation to the gaussian function. That might have seemed like a mere exercise in high-order differentiation at the time, but there is something more important at work.
The gaussian is one of those functions for which the anti-derivative cannot be written exactly in terms of what the mathematicians call “elementary functions.” (See Section 38.1.) Yet integrals of the gaussian are very commonly used in science, especially in statistics where the gaussian is called the normal PDF.
The approach we’ve taken in this book is simply to give a name and a computer implementation of the anti-derivative of the gaussian. This is the function we’ve called pnorm()
.
We never told you the algorithm contained in pnorm()
. Nor do we really need to. We all depend on experts and specialists to design and build the computers we use. The same is true of software implementation of functions like pnorm()
. And for that matter, for implementations of functions like exp()
, log()
, sin()
, and so on. You don’t have to know about semi-conductors to use a computer productively, and you don’t need to know about numerical algorithms to use those functions.
One feasible algorithm for implementing
Another feasible approach integrates
38.8 Exercises
Exercise 38.01
Part A What is the differential of
Part B What is the differential of
Part C What is the differential of
Part D What is the differential of
Exercise 38.02
Go through the steps above to find the anti-derivative of
Step 1 hint: We know the anti-derivative of
Part A What is the derivative of the helper function with respect to
Part B What is
- Whatever it is, it is just as complicated as the original integral. No obvious way to do it.
Part C What is the integral with respect to
Part D What is the integral with respect to
- It is the same as the original problem! I thought you were showing us how to do the problem. If we didn’t know the answer when we started, why should we be able to do it now?
- It is the same as the original problem. I’ve got an equation involving the original problem and two bits of algebra/calculus that I know how to do. Thanks!
Solve for the answer to the original function and write the function in R notation here:
makeFun( ...your stuff here... ~ x)
Exercise 38.03
Calculate each of the following anti-derivatives.
Part A
Part B
Part C
-1.5 0.5 11
Part D
Part E
Exercise 38.04
Compute symbolically the following anti-derivatives.
Part A $(x (x) ) dx=
- x^{}(x)- x^{}+C
- x{}(x)-x{}+C
- x^{}(x)- x^{}+C
- -2 x^{-}(x)-4 x^-{}+C
Part B $-3x(2x) dx=
- - (2x)-3x(2x)+C
- (2x)- (2x)+C
- - (2x)- x(2x)+C
- (2x)- x (2x)+C
Part C $(y^3 e^y ) dy=
- y4ey+C
- y3ey-3eyy2+C
- -y^3 e^y + 3y^2 ey-6yey +6e^y+C+C
- y^3 e^y - 3y^2 ey+6yey -6e^y+C
Exercise 38.05
Compute symbolically the following anti-derivatives.
Part A
Part B
Part C
Part D
Part E
Part F
Exercise 38.06
Use the same procedure to find the anti-derivative of
(We have intentionally dropped the
As you work through the steps be very careful about the constants and make sure you check your final answer by differentiating.
Part A What is
Part B What is
Part C What is
Exercise 38.07
Part A In
Part B Continuing with the integral of
Part C Taking seriously the progress we made in the previous two questions, we now need to write
Now that you have found both
Exercise 38.08
Part A
Part B Using your candidate for
Confirm that
Exercise 38.09
Using integration by parts, show that
Hint: The 2’s in
Show your work.
Exercise 38.10
The integral
Confirm this result by differentiating both side of the above equation.
As well, use the given result to figure out what was the choice of
Show your work.
Exercise 38.11
Use integration by parts to find
Exercise 38.12
A giant tortoise (with very good eyesight and standing on an unobstructed plane!) spies a head of lettuce on the ground 65 meters away. Being hungry (and knowing the shortest path between two points on the plane!), the tortoise takes off in a straight line for the lettuce. She pretty quickly reaches her top speed, but then starts to tire. If her velocity as a function of time (in meters per minute) is modeled by
We will be looking at
We will call the left side of the equation “displacement(t)”. Use integration by parts to find displacement(t) as a simple formula in
The tortoise will reach the cabbage at time
<- makeFun(7 * WHAT + C ~ t)
displacement slice_plot(displacement(t) ~ t, bounds(t=c(0,5)))
Part A At what time
- 5.95 sec
- 10.85 sec
- 15.75 sec
- Never! (That is,
is infinite.)
Exercise 38.13
Use integration by parts to find
Exercise 38.14
Part A Which of these candidates for
and and and
Once again,
Exercise 38.15
Compute the value of the definite integral
As part of your work, you will need to evaluate
Part A What is the value of
Exercise 38.16
Part A What is
Exercise 38.17
Part A Use u-substitution to find
Exercise 38.18
Tables of integrals
Although any function has an anti-derivative, that anti-derivative cannot always be presented in algebraic notation. This poses no fundamental problem to the construction of the anti-derivative, particularly when a computer is available to handle the book-keeping of numerical integration.
Still, it is convenient to have an algebraic form when it can be found. Many people have devoted considerable effort to constructing extensive collections of functions for which an algebraic form of anti-derivative is known. Think of such collections as a gallery of portraits of people who happen to have red hair. No matter how large the collection, you will often have to deal people who are not redheads. And unlike real redheads, it can be hard to know whether a function has an anti-derivative that can be expressed simply in algebraic form. For instance,
So, how to organize the gallery of redheads? Let’s take a field trip to the NIST DLMF (The US National Institute of Standards and Technology (NIST) has been a primary publisher for more than 50 years of information about functions encountered in applied mathematics. The work, published originally in book form, is also available via the internet as the NIST Digital Library of Mathematical Functions!
Warning! Many visitors to NIST DLMF encounter dizziness, fatigue, and anxiety. Should you experience such symptoms, close your eyes and remember that DLMF is a reference work and that you will not be examined on its use. Nonetheless, to help you benefit maximally from the field trip, there are a few questions in this Daily Digital for you to answer from DLMF.
You should also note that the techniques in almost universal use to help you navigate through voluminous collections of data (e.g. Twitter, Facebook, Instagram, YouTube) such as ratings, subscribing, “friending,” following, etc. are entirely absent from DLMF. There is not even a friendly introduction to each chapter saying who the material might be of interest to.
We will focus on Chapter 4, “Elementary Functions,” and indeed just a few sections from that chapter. (A better name for the chapter would be “The Functions Most Often Used.” They are not “elementary” as in “elementary school” but as in the “periodic table of elements.”)
Section 4.10 covers integrals and anti-derivatives of logarithmic, exponential and power-law functions.
Section 4.26 is similar, but for trigonometric functions.
- Navigate to equation 4.10.1. This is one of the anti-derivatives you are expected to know by heart in CalcZ.
- Notice that the input name
is used. They could have selected any other name; and are popular, less so, and even less so. The use of is a signal to the cognoscenti that the function can be applied to both real and complex numbers. - Look at equation 4.10.8. This is another of the functions whose anti-derivative you should know by heart.
- Perhaps it would have avoided some confusion if 4.10.1 had been written in terms of
so that you would know what to do if you had encountered such a function.
- Notice that the input name
Some exercises:
Part A Which of these is
- There is no anti-derivative of
.
Part B Use Section 4.10 of DLMF to find
- There is no such function listed in Section 4.10.
Part C Is
- Yes
- No
- Depends on the value of
.
Part D Using section 4.26, find
does not have an anti-derivative.- There is no
in section 4.26
One small deviation from the pattern-book functions is
. The absolute value in reflects the differing domains of the functions and . Logarithms are defined only the positive half of the number line, while the reciprocal function is defined for all non-zero . Including the absolute value in the argument to log covers situations such as which has the value .↩︎Mathematicians have a list that is a bit longer than our pattern-book functions—they call them elementary functions and include the tangent and other trig functions and their inverses, as well as what are called “hyperbolic functions” and their inverses.↩︎
Again, mathematicians prefer to refer to the “elementary functions” rather than the pattern-book functions.
and are not elementary functions, and there are several elementary function that we don’t include in the pattern-book list.↩︎Many jurisdictions tax food and clothing, etc. at a different rate than other items.↩︎