<<

Lecture 4: Substitution Rule and

Today: The Substitution Rule, Integration by Parts

If we want to evaluate a definite of a continuous , the Fundamental Theorem tells us that all we need to do is to find its and evaluate at the endpoints. However, out table of indefinite only provide a limited collection of . We still do not know how to evaluate integrals such as

1 1 2x x e− dx or xe dx. Z0 Z0 In the next three lectures, we will introduce several integration techniques to help us evaluate integrals that are not readily available in a table.

The Substitution Rule

We first recall the statement of the .

Theorem 14 (Chain Rule). If f and g are both differentiable and h = f g, then ◦

h0(x) = f 0(g(x)) g0(x). ·

If have an integral of the form

f(g(x))g0(x) dx, Z and assume that F is an antiderivative of f, that is, F 0 = f, then by the Chain Rule and the Fundamental Theorem of , we have

f(g(x))g0(x) dx = F 0(g(x))g0(x) dx = F (g(x)) + C. Z Z If we make the “substitution” u = g(x), then we have

F (g(x)) + C = F (u) + C = F 0(u) du = f(u) du. Z Z Hence, we obtain the Substitution Rule for indefinite integrals.

Theorem 15 (Substitution Rule for Indefinite Integrals). If u = g(x) is a differentiable function whose range is an interval I, and f is continuous on I, then

f(g(x))g0(x) dx = f(u) du. Z Z

26 Remark. One way to remember the Substitution Rule is to think of the dx and du as differentials. If u = g(x), then du = g0(x) dx, and thus

f(u) du = f(g(x)) g0(x) dx. · Adding the integral sign to both sides, we get the statement of the Substitution Rule.

2x Example. Evaluate the indefinite integral e− dx. We make the substitution u = 2x. Then duR = 2 dx, which means dx = du/2. Thus − − − u 2x 2x u du 1 u e e− e− dx = e = e du = + C = + C. · − 2 −2 − 2 − 2 Z Z   Z Example. Evaluate the indefinite integral x3 cos(x4 + 2) dx. We make the substitution u = x4 + 2. ThenRdu = 4x3 dx, which means x3 dx = du/4. Thus

1 sin(u) sin(x4 + 2) x3 cos(x4 + 2) dx = cos(u) du = + C = + C. 4 4 4 Z Z Example. Evaluate the indefinite integral tan(x) dx. First, we write as a quotient of sineR and cosine: sin(x) tan(x) dx = dx. cos(x) Z Z We make the substitution u = cos(x). Then du = sin(x) dx, so sin(x) dx = du. Thus − − sin(x) du tan(x) dx = dx = = ln u + C = ln cos(x) + C. cos(x) − u − | | − | | Z Z Z has the property that ln(a) = ln(1/a). Thus we can also write − tan(x) dx = ln sec(x) + C. | | Z Although we need to be cautious here because sec(x) is not a , so this indefinite integral only holds true for the domains of continuity of sec(x).

The Substitution Rule on Definite Integrals

When we have a definite integral that requires integration by substitution, we can always evaluate the indefinite integral first, and then apply the Evaluation Theorem to get the result. Alternatively, we could also change the limits of integration when the variable is substituted.

27 Theorem 16 (Substitution Rule for Definite Integrals). If g0 is continuous on [a, b] and f is continuous on the range of u = g(x), then b g(b) f(g(x))g0(x) dx = f(u) du. Za Zg(a) 2 2x Example. Evaluate the definite integral 1 e− dx. We make the substitution u = 2x. ThenRdu = 2 dx. Thus − − 2 u(2) 4 4 4 2 2 4 2x 1 u 1 − u 1 u − e− e− e− e− e− dx = e du = e du = e = − = − . 1 −2 u(1) −2 2 −2 2 − 2 2 Z Z Z− h i− e ln(x) Example. Evaluate the definite integral 1 x dx. We make the substitution u = ln(x). ThenR du = dx/x, and thus e ln(x) u(e) 1 u2 1 1 dx = u du = u du = = . 1 x u(1) 0 2 0 2 Z Z Z h i 1 3 Example. Evaluate the definite integral 1 sin(x ) dx. − We split the first integral in two pieces R 1 0 1 sin(x3) dx = sin(x3) dx + sin(x3) dx. 1 1 0 Z− Z− Z In the first term, we make the substitution u = x, then x = u, du = dx and dx = du. − − − − Thus 0 u(0) 0 1 sin(x3) dx = sin( u3) ( du) = sin(u3) du = sin(x3) dx. 1 u( 1) − · − 1 − 0 Z− Z − Z Z Adding on the second term, we get 1 sin(x3) dx = 0. 1 Z− The last example above uses the fact that sine is an odd function, i.e., sin( x) = sin(x). − − In fact, we have the following theorem regarding definite integrals of symmetric functions over symmetric intervals. Theorem 17. Let a > 0 be a positive , and let f be continuous on [ a, a]. − (1) If f is an odd function, i.e., f( x) = f(x) for all x [ a, a], then − − ∈ − a f(x) dx = 0. a Z− (2) If f is an even function, i.e., f( x) = f(x) for all x [ a, a], then − ∈ − a a f(x) dx = 2 f(x) dx. a 0 Z− Z

28 Integration by Parts

We first recall the statement of the .

Theorem 18 (Product Rule). If f and g are both differentiable, then

d [f(x)g(x)] = f 0(x)g(x) + f(x)g0(x). dx

If we integrate both sides with respect to x in the statement of the Product Rule, we would get d [f(x)g(x)] dx = g(x)f 0(x) dx + f(x)g0(x) dx. dx Z Z Z We can rearrange this equation to get the formula for integration by parts:

f(x)g0(x) dx = f(x)g(x) g(x)f 0(x) dx. − Z Z Remark. We can make the following substitutions to help with remembering the formula.

Let u = f(x) and v = g(x). Then du = f 0(x) dx and dv = g0(x) dx, and the formula for integration by parts becomes u dv = uv v du. − Z Z Example. Evaluate the indefinite integral xex dx. We make the choice R u = x, dv = ex dx. Then du = dx, v = ex. Thus by the integration by parts formula,

xex dx = xex ex dx = xex ex + C = (x 1)ex + C. − − − Z Z Remark. The idea of using integration by parts is to get a simpler integral than the one we started with. In the example above, we use integration by parts to transform the integral xex dx to ex dx, which we know how to integrate. When we make the choice of u and dv, Rwe shall keepR in mind that our goal is to get a v du that is simpler to integrate. Example. Evaluate the indefinite integral x2 sin(x) dx. We make the choice R u = x2, dv = sin(x) dx.

29 Then du = 2x dx, v = cos(x). − By the integration by parts formula,

x2 sin(x) dx = x2 cos(x) ( cos(x)) 2x dx = x2 cos(x) + 2 x cos(x) dx. − − − · − Z Z Z Now we need to use integration by parts again for the second integral. Choose

u = x, dv = cos(x) dx.

Then du = dx, v = sin(x). Thus x cos(x) dx = x sin(x) sin(x) dx = x sin(x) + cos(x) + C. − Z Z Combine with the first equation, we get,

x2 sin(x) dx = x2 cos(x) + 2(x sin(x) + cos(x)) + C = (2 x2) cos(x) + 2x sin(x) + C. − − Z Example. Evaluate the indefinite integral sin(x)ex dx. Notice that neither sin(x) nor ex has a simplerR . Let’s try u = sin(x) and dv = ex dx. Then du = cos(x) dx, v = ex, and sin(x)ex dx = sin(x)ex ex cos(x) dx. − Z Z Integrate by parts again on the second integral by choosing

u = cos(x), dv = ex dx; du = sin(x) dx. v = ex. − Then

ex cos(x) dx = cos(x)ex ex ( sin(x)) dx = cos(x)ex + ex sin(x) dx. − · − Z Z Z Combine the two equations together, we get

sin(x)ex dx = sin(x)ex cos(x)ex ex sin(x) dx. − − Z Z At this point, we can treat the integral ex sin(x) dx as an unknown, and solve to get R (sin(x) cos(x))ex sin(x)ex dx = − + C. 2 Z

30 1 x Example. Evaluate the definite integral 0 xe dx. From the first example, we know that theR indefinite integral

xex dx = (x 1)ex + C. − Z Apply the Evaluation Theorem, we get

1 1 xex dx = (x 1)ex = 0 e ( 1) 1 = 1. 0 − 0 · − − · Z h i Remark. If we combine the integration by parts formula with the Evaluation Theorem, we can evaluate definite integrals by parts in the following way:

b b b f(x)g0(x) dx = f(x)g(x) g(x)f 0(x) dx. a a − a Z h i Z 1 5 3 Example. Evaluate the definite integral 0 x sin(x ) dx. We first try the Substitution Rule with y R= x3. Then dy = 3x2 dx, and x2 dx = dy/3. Thus

1 y(1) dy 1 1 x5 sin(x3) dx = y sin(y) = y sin(y) dy. 3 3 Z0 Zy(0) Z0 Then we use integration by parts with the choice

u = y, dv = sin(y) dy; du = dy, v = cos(y) dy. − Thus

1 1 1 1 1 y sin(y) dy = y cos(y) cos(y) dy = y cos(y) + sin(y) 0 − 0 − 0 − − 0 0 Z h i Z h i h i = cos(1) 0 + sin(1) 0 = sin(1) cos(1). − − − − Combine the two equations together, we get

1 1 1 sin(1) cos(1) x5 sin(x3) dx = y sin(y) dy = − . 3 3 Z0 Z0

31