Welcome to calculus. I'm professor Ghrist. And we're about to begin lecture 21 on substitution. Now that we've seen what indefinite integrals are good for, differential equations and more, we turn to the problem of the mechanics of integration. How does one compute an antiderivative, that is a large and convoluted subject. In this lesson, we'll begin with our first method, that of substitution. Our first set of strategies, for computing integrals, exploits the fact that integration is anti differentiation. Therefore, integration rules can be derived from differentiation rules. Let's consider, for example, the linearity for derivatives. What this tells us, when we take those rules, and then integrate them, is that integration is also linear. The integral of a sum, is the sum of integrals. The integral of a constant times an integrant is that constant times the integral. So integration, like differentiation, is a linear operator as you, certainly, already knew. Other differentiation rules lead to other integration techniques. We're going to focus on the chain rule, where tradition dictates the use of u as a function of x. In this case, the chain rule says that du is du dx times dx. We can integrate both sides, and after composing with a function f(u), then one obtains what is, typically, called the u substitution formula, namely, the integral of f(u) du is the integral of f(u(x)) times du dx, dx. Now, of course, this use substitution formula is just the chain rule, in reverse. However, it is very useful, if you can determine what is u and what is f. Your goal is the integral on the left, the f of u, du. Which is, hopefully, simpler than what you are given on the right, the more complex looking integral, in terms, of x. It's best to see this through a simple example. Consider the integral of e to the side of x times cosine of x dx. You may or may not be able to see what the antiderivative is. However, if we let u be equal to sin of x, then du is cos of x, dx. We can see that e to the sin x, is really just the exponential of u. Whereas, the cosine of x, dx, is the du term. Thus, by substitution, we can say that this integral is the same as the integral of e to the u, du. Now, of course, we all know that the integral of e to the u is simply e to the u plus a constant. We're not quite done, in that we need to substitute back in, for a function of x. So, our original integral evaluates to e to the sin of x + a constant. Now, we could, and should, check that this is actually the correct answer. We should differentiate e to the sin of x and see that we obtain either the sin of x times cosine dx, that's the wonderful thing about these types of problems, you can always check your results. Now, in this case, choosing the u and choosing the f were easy. Almost transparent. This is not always the case. A trickier example would be something like the integral of x times the square root of x minus one dx. In this case, what is the u here what is f of u, in general, its best to make a substitution that simplifies your integrant to whatever extent possible. In this case, if we were to let u be equal to x minus 1, it would seem to be trivial since du = dx. However, notice what happens, x is u + 1, and square root of x- 1 is square root of u. We can, therefore, expand this integrant out as u to the 3, 1/2's plus u to the 1, 1/2. Notice, we could not do that with x. Now, we can easily integrate this to yield 2/5's, u to the 5, 1/2's, plus 2/3's, u to the 3, 1/2's. Substituting back in x minus 1 for u yields the answer, 2/5's quantity, x- 1 to the 5/2 + 2/ 3, x- 1 to the 3/2, plus a constant. I'll leave it to you to check this. Another example, that is perhaps not so obvious, is the following, the integral of cos theta times cotangent theta, d theta. Again, in the absence of something obvious to do, try simplifying your integrant. In this case, using the definition of cosecant and cotangent yields cosine theta over sin squared theta, d theta. And now, it's a bit more apparent which substitution to try. Let's try u equals sin theta. In this case, du is cosine theta d theta, and we see the du sitting right in front of us. This becomes the integral of 1 over u- squared times du. That we can certainly integrate to yield negative 1 over u, plus a constant, substituting back in, we get negative 1 over sin theta. That is, negative cosecant theta, plus a constant. I'll leave it to you to check. We're going to put this techniques to use in a differential equation, that models the growth of a tumor. The Gompertz model for the size N of t of a tumor as a function of time, t, is the following differential equation. dN/dt = -aNln(bN). Here a is a constant that is positive, and b is a constant that is between 0 and 1. Using the method of separation, we move all of the N's to the left hand side and we obtain dN. Over N times log of B times N on the right hand side we're left with negative A, DT. Now we need to integrate both sides of this equation, how do we perform the integral on the left, we're going to have to do a substitution. If we let u be log (bN), then du = dN/N. And we see that this integral is going to simplify dramatically to du/u. On the right hand, side we, again, have the integral of -adt. Computing both the integrals gives us log of u equals -at plus a constant. As with other equations we've done, we're going to exponentiate both sides to obtain an answer, u is constant e to the -80, but we're not quite done. Because u, is not what we're looking for. We were looking for N, and so we must substitute back in for u, aug b times n Is constant e to the negative at. Now, to solve for N, we're going to have to exponentiate both sides again. Doing so, and dividing by b, gives us n the size of the tumor as a function of time t. Is one for b times e to the constant times e to the negative at. This is a double exponential. It has an exponential in the exponent. Now what about this constant c? I'll leave it to you to check. That c is given as the log of b times N not, where N not is the size of the tumor at times 0. But deriving the solution is not the end of the story. We'd like to know something about how that solution behaves. Let's consider things from the point of view of equilibria. If we set dn dT equal to 0, what do we observe. We observe that there is an equilibrium at 0 plugging in N equals 0 certainly gives Dndt equal to 0, as you can see by taking a limit. And it certainly makes biological sense that, if the initial size of the tumor is 0, then no tumor will grow. However there's another equilibrium. At N equals 1 over b. In this case, that log term vanishes. What happens when we plot various solutions, N as a function of t, we see that the solution with a non 0 initial condition, will converge to this 1 over b equilibrium. This is sometimes called the carrying capacity of the model. Now, indeed, if we plot N dot versus N, we will see these two equilibriam arising, and we will see that 1b is a stable equilibrium, whereas 0 is an unstable equilibrium. This is what linearization will give. Now the global perspective in what we have done, in this lesson, is all about this u substitution formula. But really, it should go under a different name, and you will learn it later in life, under the name of the change of variables formula. What we're really doing is changing from x variables to u variables, and this change of coordinates facilitates integration. It makes it easier. For example, if we look at 2 x sin x squared, then converting that over to sin of u, makes something that's easily integrated, 2 negative cosine of u, and then we go back to the original x coordinates. That allows us to compute a difficult integral, by means of a simple integral, in a new coordinate system, and that is the important point. Notice that, as well, we could run things backwards. And obtain derivatives of complicated functions, by a change of coordinates. That is what we did when we learned the all important chain rule. Now why is this perspective important? When you get to multivariable calculus, you are going to use a more sophisticated, change of variables formula, to solve some truly difficult integrals. Work now on the simple cases, and when you get to multi variable, you'll be fully prepared. Substitution, or better yet, a change of variables, is one important method of integration. But it's, merely, the first in an increasingly intricate sequence of methods. In our next lesson, we'll introduce a second technique, that of integration by parts.