12  Integral Calculus

12.1 The Indefinite Integral

So far, we’ve been interested in finding the derivative f=Ff=F' of a function FF. However, sometimes we’re interested in exactly the reverse: finding the function FF for which ff is its derivative. We refer to FF as the antiderivative of ff.

Definition 12.1 (Antiderivative) The antiverivative of a function f(x)f(x) is a differentiable function FF whose derivative is ff.

F=f.F^\prime = f.

Another way to describe is through the inverse formula. Let DFDF be the derivative of FF. And let DF(x)DF(x) be the derivative of FF evaluated at xx. Then the antiderivative is denoted by D1D^{-1} (i.e., the inverse derivative). If DF=fDF=f, then F=D1fF=D^{-1}f.

This definition bolsters the main takeaway about integrals and derivatives: They are inverses of each other.

Exercise 12.1 (Antiderivative) Find the antiderivative of the following:

  1. f(x)=1x2f(x) = \frac{1}{x^2}
  2. f(x)=3e3xf(x) = 3e^{3x}

We know from derivatives how to manipulate FF to get ff. But how do you express the procedure to manipulate ff to get FF? For that, we need a new symbol, which we will call indefinite integration.

Definition 12.2 (Indefinite Integral) The indefinite integral of f(x)f(x) is written

f(x)dx\int f(x) dx

and is equal to the antiderivative of ff.

Example 12.1 Draw the function f(x)f(x) and its indefinite integral, f(x)dx\int\limits f(x) dx

f(x)=(x24)f(x) = (x^2-4)

Solution. The Indefinite Integral of the function f(x)=(x24)f(x) = (x^2-4) can, for example, be F(x)=13x34x.F(x) = \frac{1}{3}x^3 - 4x. But it can also be F(x)=13x34x+1F(x) = \frac{1}{3}x^3 - 4x + 1, because the constant 1 disappears when taking the derivative.

Some of these functions are plotted in the bottom panel of Figure 12.1 as dotted lines.

Figure 12.1: The Many Indefinite Integrals of a Function

Notice from these examples that while there is only a single derivative for any function, there are multiple antiderivatives: one for any arbitrary constant cc. cc just shifts the curve up or down on the yy-axis. If more information is present about the antiderivative — e.g., that it passes through a particular point — then we can solve for a specific value of cc.

Properties of Integration

Some useful properties of integrals follow by virtue of being the inverse of a derivative.

12.1.1 Properties of Integration

  1. Constants are allowed to slip out: af(x)dx=af(x)dx\int a f(x)dx = a\int f(x)dx
  2. Integration of the sum is sum of integrations: [f(x)+g(x)]dx=f(x)dx+g(x)dx\int [f(x)+g(x)]dx=\int f(x)dx + \int g(x)dx
  3. Reverse Power-rule: xndx=1n+1xn+1+c\int x^n dx = \frac{1}{n+1} x^{n+1} + c
  4. Exponents are still exponents: exdx=ex+c\int e^x dx = e^x +c
  5. Recall the derivative of ln(x)\ln(x) is one over xx, and so: 1xdx=lnx+c\int \frac{1}{x} dx = \ln x + c
  6. Reverse chain-rule: ef(x)f(x)dx=ef(x)+c\int e^{f(x)}f^\prime(x)dx = e^{f(x)}+c
  7. More generally: [f(x)]nf(x)dx=1n+1[f(x)]n+1+c\int [f(x)]^n f'(x)dx = \frac{1}{n+1}[f(x)]^{n+1}+c
  8. Remember the derivative of a log of a function: f(x)f(x)dx=lnf(x)+c\int \frac{f^\prime(x)}{f(x)}dx=\ln f(x) + c

Example 12.2 (Common Integration) Simplify the following indefinite integrals:

  • 3x2dx\int 3x^2 dx
  • (2x+1)dx\int (2x+1)dx
  • exeexdx\int e^x e^{e^x} dx

12.2 The Definite Integral

If there is a indefinite integral, there must be a definite integral. Indeed there is, but the notion of definite integrals comes from a different objective: finding the are a under a function. We will find, perhaps remarkably, that the formula we find to get the sum turns out to be expressible by the anti-derivative.

Suppose we want to determine the area A(R)A(R) of a region RR defined by a curve f(x)f(x) and some interval axba\le x \le b.

Figure 12.2: The Riemann Integral as a Sum of Evaluations

One way to calculate the area would be to divide the interval axba\le x\le b into nn subintervals of length Δx\Delta x and then approximate the region with a series of rectangles, where the base of each rectangle is Δx\Delta x and the height is f(x)f(x) at the midpoint of that interval. A(R)A(R) would then be approximated by the area of the union of the rectangles, which is given by S(f,Δx)=i=1nf(xi)ΔxS(f,\Delta x)=\sum\limits_{i=1}^n f(x_i)\Delta x and is called a Riemann sum.

As we decrease the size of the subintervals Δx\Delta x, making the rectangles “thinner,” we would expect our approximation of the area of the region to become closer to the true area. This allows us to express the area as a limit of a series:

A(R)=limΔx0i=1nf(xi)ΔxA(R)=\lim\limits_{\Delta x\to 0}\sum\limits_{i=1}^n f(x_i)\Delta x

Figure 12.2 shows that illustration. The curve depicted is f(x)=15(x5)+(x5)3+50.f(x) = -15(x - 5) + (x - 5)^3 + 50. We want approximate the area under the curve between the xx values of 0 and 10. We can do this in blocks of arbitrary width, where the sum of rectangles (the area of which is width times f(x)f(x) evaluated at the midpoint of the bar) shows the Riemann Sum. As the width of the bars Δx\Delta x becomes smaller, the better the estimate of A(R)A(R).

This is how we define the “Definite” Integral:

Definition 12.3 (The Definite Integral (Riemann)) If for a given function ff the Riemann sum approaches a limit as Δx0\Delta x \to 0, then that limit is called the Riemann integral of ff from aa to bb. We express this with the \int, symbol, and write abf(x)dx=limΔx0i=1nf(xi)Δx\int\limits_a^b f(x) dx= \lim\limits_{\Delta x\to 0} \sum\limits_{i=1}^n f(x_i)\Delta x

The most straightforward of a definite integral is the definite integral. That is, we read

abf(x)dx\int\limits_a^b f(x) dx as the definite integral of ff from aa to bb and we defined as the area under the “curve” f(x)f(x) from point x=ax=a to x=bx=b.

The fundamental theorem of calculus shows us that this sum is, in fact, the antiderivative.

Theorem 12.1 (First Fundamental Theorem of Calculus) Let the function ff be bounded on [a,b][a,b] and continuous on (a,b)(a,b). Then, suggestively, use the symbol F(x)F(x) to denote the definite integral from aa to xx

F(x)=axf(t)dt,axbF(x)=\int\limits_a^x f(t)dt, \quad a\le x\le b

Then F(x)F(x) has a derivative at each point in (a,b)(a,b) and F(x)=f(x),a<x<bF^\prime(x)=f(x), \quad a<x<b That is, the definite integral function of ff is the one of the antiderivatives of some ff.

This is again a long way of saying that that differentiation is the inverse of integration. But now, we’ve covered definite integrals.

The second theorem gives us a simple way of computing a definite integral as a function of indefinite integrals.

12.2.1 Second Fundamental Theorem of Calculus

Let the function ff be bounded on [a,b][a,b] and continuous on (a,b)(a,b). Let FF be any function that is continuous on [a,b][a,b] such that F(x)=f(x)F^\prime(x)=f(x) on (a,b)(a,b). Then abf(x)dx=F(b)F(a)\int\limits_a^bf(x)dx = F(b)-F(a)

So the procedure to calculate a simple definite integral abf(x)dx\int\limits_a^b f(x)dx is then

  1. Find the indefinite integral F(x)F(x).
  2. Evaluate F(b)F(a)F(b)-F(a).

Example 12.3 (Definite Integral of a monomial)

Solve 133x2dx.\int\limits_1^3 3x^2 dx. Let f(x)=3x2f(x) = 3x^2.

Exercise 12.2

What is the value of 22exeexdx\int\limits_{-2}^2 e^x e^{e^x} dx?

Properties for Definite Integrals

The area-interpretation of the definite integral provides some useful properties for definite integrals

  1. There is no area below a point: aaf(x)dx=0\int\limits_a^a f(x)dx=0
  2. Reversing the limits changes the sign of the integral: abf(x)dx=baf(x)dx\int\limits_a^b f(x)dx=-\int\limits_b^a f(x)dx
  3. Sums can be separated into their own integrals: ab[αf(x)+βg(x)]dx=αabf(x)dx+βabg(x)dx\int\limits_a^b [\alpha f(x)+\beta g(x)]dx = \alpha \int\limits_a^b f(x)dx + \beta \int\limits_a^b g(x)dx
  4. Areas can be combined as long as limits are linked: abf(x)dx+bcf(x)dx=acf(x)dx\int\limits_a^b f(x) dx +\int\limits_b^c f(x)dx = \int\limits_a^c f(x)dx

Exercise 12.3 Simplify the following definite intergrals.

  1. 113x2dx=\int\limits_1^1 3x^2 dx =
  2. 04(2x+1)dx=\int\limits_0^4 (2x+1)dx=
  3. 20exeexdx+02exeexdx=\int\limits_{-2}^0 e^x e^{e^x} dx + \int\limits_0^2 e^x e^{e^x} dx =

12.3 Integration by Substitution

From the second fundamental theorem of calculus, we now that a quick way to get a definite integral is to first find the indefinite integral, and then just plug in the bounds.

Sometimes the integrand (the thing that we are trying to take an integral of) doesn’t appear integrable using common rules and antiderivatives. A method one might try is integration by substitution, which is related to the Chain Rule.

Suppose we want to find the indefinite integral g(x)dx\int g(x)dx but g(x)g(x) is complex and none of the formulas we have seen so far seem to apply immediately. The trick is to come up with a new function u(x)u(x) such that g(x)=f[u(x)]u(x).g(x)=f[u(x)]u'(x).

Why does an introduction of yet another function end of simplifying things? Let’s refer to the antiderivative of ff as FF. Then the chain rule tells us that ddxF[u(x)]=f[u(x)]u(x)\frac{d}{dx} F[u(x)]=f[u(x)]u'(x). So, F[u(x)]F[u(x)] is the antiderivative of gg. We can then write g(x)dx=f[u(x)]u(x)dx=ddxF[u(x)]dx=F[u(x)]+c\int g(x) dx= \int f[u(x)]u'(x)dx = \int \frac{d}{dx} F[u(x)]dx = F[u(x)]+c

To summarize, the procedure to determine the indefinite integral g(x)dx\int g(x)dx by the method of substitution:

  1. Identify some part of g(x)g(x) that might be simplified by substituting in a single variable uu (which will then be a function of xx).
  2. Determine if g(x)dxg(x)dx can be reformulated in terms of uu and dudu.
  3. Solve the indefinite integral.
  4. Substitute back in for xx

Substitution can also be used to calculate a definite integral. Using the same procedure as above, abg(x)dx=cdf(u)du=F(d)F(c)\int\limits_a^b g(x)dx=\int\limits_c^d f(u)du = F(d)-F(c) where c=u(a)c=u(a) and d=u(b)d=u(b).

Example 12.4 (Integration by Substitution I)

Solve the indefinite integral x2x+1dx.\int x^2 \sqrt{x+1}dx.

For the above problem, we could have also used the substitution u=x+1u=\sqrt{x+1}. Then x=u21x=u^2-1 and dx=2ududx=2u du. Substituting these in, we get x2x+1dx=(u21)2u2udu\int x^2\sqrt{x+1}dx=\int (u^2-1)^2 u 2u du which when expanded is again a polynomial and gives the same result as above.

Another case in which integration by substitution is is useful is with a fraction.

Example 12.5 (Integration by Substitutiton II)

Simplify 015e2x(1+e2x)1/3dx.\int\limits_0^1 \frac{5e^{2x}}{(1+e^{2x})^{1/3}}dx.

12.4 Integration by Parts

Another useful integration technique is integration by parts, which is related to the Product Rule of differentiation. The product rule states that ddx(uv)=udvdx+vdudx\frac{d}{dx}(uv)=u\frac{dv}{dx}+v\frac{du}{dx} Integrating this and rearranging, we get udvdxdx=uvvdudxdx\int u\frac{dv}{dx}dx= u v - \int v \frac{du}{dx}dx or u(x)v(x)dx=u(x)v(x)v(x)u(x)dx\int u(x) v'(x)dx=u(x)v(x) - \int v(x)u'(x)dx

More easily remembered with the mnemonic “Ultraviolet Voodoo”: udv=uvvdu\int u dv = u v - \int v du where du=u(x)dxdu=u'(x)dx and dv=v(x)dxdv=v'(x)dx.

For definite integrals, this is simply

abudvdxdx=uvababvdudxdx\int\limits_a^b u\frac{dv}{dx}dx = \left. u v \right|_a^b - \int\limits_a^b v \frac{du}{dx}dx

Our goal here is to find expressions for uu and dvdv that, when substituted into the above equation, yield an expression that’s more easily evaluated.

Example 12.6 (Integration by Parts I) Simplify the following integrals. These seemingly obscure forms of integrals come up often when integrating distributions.

xeaxdx\int x e^{ax} dx

Solution. Let u=xu=x and dvdx=eax\frac{dv}{dx} = e^{ax}. Then du=dxdu=dx and v=(1/a)eaxv=(1/a)e^{ax}. Substituting this into the integration by parts formula, we obtain
xeaxdx=uvvdu=x(1aeax)1aeaxdx=1axeax1a2eax+c\begin{align*} \int x e^{ax} dx &= u v - \int v du\nonumber\\ &=x\left( \frac{1}{a}e^{ax}\right) -\int\frac{1}{a}e^{ax}dx\nonumber\\ &=\frac{1}{a}xe^{ax}-\frac{1}{a^2}e^{ax}+c\nonumber \end{align*}

  1. Exercise 12.4 (Integration by Parts II)
  2. Integrate

xneaxdx\int x^n e^{ax} dx

  1. Integrate

x3ex2dx\int x^3 e^{-x^2} dx

Answers to Examples and Exercises

Exercise 10.1

Solution.

  1. f(x)=0f^\prime(x)= 0
  2. f(x)=1f^\prime(x)= 1
  3. f(x)=2x3f^\prime(x)= 2x^3
  4. f(x)=3x2f\prime(x)= 3x^2
  5. f(x)=2x3f\prime(x)= -2x^{-3}
  6. f(x)=14x6f\prime(x)= 14x^6
  7. f(x)=4x33x2+2x1f\prime(x) = 4x^3 - 3x^2 + 2x -1
  8. f(x)=5x4+3x22xf\prime(x) = 5x^4 + 3x^2 - 2x
  9. f(x)=6x+23x23f\prime(x) = 6x + \frac{2}{3}x^{\frac{-2}{3}}
  10. f(x)=4xx42x2+1f\prime(x)= \frac{-4x}{x^4 - 2x^2 + 1}

Example 10.3

Solution. For convenience, define f(z)=z6f(z) = z^6 and z=g(x)=3x2+5x7z = g(x) = 3x^2+5x-7. Then, y=f[g(x)]y=f[g(x)] and

ddxy=f(z)g(x)=6(3x2+5x7)5(6x+5)\begin{align*} \frac{d}{dx}y&= f^\prime(z) g^\prime(x) \\ &= 6(3x^2+5x-7)^5 (6x + 5) \end{align*}

Example 10.4

Solution.

  1. Let u(x)=3xu(x)=-3x. Then u(x)=3u^\prime(x)=-3 and f(x)=3e3xf^\prime(x)=-3e^{-3x}.
  2. Let u(x)=x2u(x)=x^2. Then u(x)=2xu^\prime(x)=2x and f(x)=2xex2f^\prime(x)=2xe^{x^2}.

Example 10.5

Solution.

  1. Let u(x)=x2+9u(x)=x^2+9. Then u(x)=2xu^\prime(x)=2x and dydx=u(x)u(x)=2x(x2+9)\frac{dy}{dx}= \frac{u^\prime(x)}{u(x)} = \frac{2x}{(x^2+9)}
  2. Let u(x)=lnxu(x)=\ln x. Then u(x)=1/xu^\prime(x)=1/x and dydx=1(xlnx)\frac{dy}{dx} = \frac{1}{(x\ln x)}.
  3. Use the generalized power rule. dydx=(2lnx)x\frac{dy}{dx} = \frac{(2 \ln x)}{x}
  4. We know that lnex=x\ln e^x=x and that dx/dx=1dx/dx=1, but we can double check. Let u(x)=exu(x)=e^x. Then u(x)=exu^\prime(x)=e^x and dydx=u(x)u(x)=exex=1.\frac{dy}{dx} = \frac{u^\prime(x)}{u(x)} = \frac{e^x}{e^x} = 1.

Example 12.3

Solution. What is F(x)F(x)? From the power rule, recognize ddxx3=3x2\frac{d}{dx}x^3 = 3x^2 so

F(x)=x313f(x)dx=F(x=3)F(x1)=3313=26\begin{align*} F(x) &= x^3\\ \int\limits_1^3 f(x) dx &= F(x = 3) - F(x - 1)\\ &= 3^3 - 1^3\\ &=26 \end{align*}

Example 12.4

Solution. The problem here is the x+1\sqrt{x+1} term. However, if the integrand had x\sqrt{x} times some polynomial, then we’d be in business. Let’s try u=x+1u=x+1. Then x=u1x=u-1 and dx=dudx=du. Substituting these into the above equation, we get

x2x+1dx=(u1)2udu=(u22u+1)u1/2du=(u5/22u3/2+u1/2)du\begin{align*} \int x^2\sqrt{x+1}dx&= \int (u-1)^2\sqrt{u}du\\ &= \int (u^2-2u+1)u^{1/2}du\\ &= \int (u^{5/2}-2u^{3/2}+u^{1/2})du \end{align*}

We can easily integrate this, since it is just a polynomial. Doing so and substituting u=x+1u=x+1 back in, we get x2x+1dx=2(x+1)3/2[17(x+1)225(x+1)+13]+c\int x^2\sqrt{x+1}dx=2(x+1)^{3/2}\left[\frac{1}{7}(x+1)^2 - \frac{2}{5}(x+1)+\frac{1}{3}\right]+c

Example 12.5

Solution. When an expression is raised to a power, it is often helpful to use this expression as the basis for a substitution. So, let u=1+e2xu=1+e^{2x}. Then du=2e2xdxdu=2e^{2x}dx and we can set 5e2xdx=5du/25e^{2x}dx=5du/2. Additionally, u=2u=2 when x=0x=0 and u=1+e2u=1+e^2 when x=1x=1. Substituting all of this in, we get

015e2x(1+e2x)1/3dx=5221+e2duu1/3=5221+e2u1/3du=154u2/321+e2=9.53\begin{align*} \int\limits_0^1 \frac{5e^{2x}}{(1+e^{2x})^{1/3}}dx &= \frac{5}{2}\int\limits_2^{1+e^2}\frac{du}{u^{1/3}}\\ &= \frac{5}{2}\int\limits_2^{1+e^2} u^{-1/3}du\\ &= \left. \frac{15}{4} u^{2/3} \right|_2^{1+e^2}\\ &= 9.53 \end{align*}

Exercise 12.4

Solution.

  1. xneaxdx\int x^n e^{ax} dx

As in the first problem, let

u=xn,dv=eaxdxu=x^n, dv=e^{ax}dx

Then du=nxn1dxdu=n x^{n-1}dx and v=(1/a)eaxv=(1/a)e^{ax}.

Substituting these into the integration by parts formula gives xneaxdx=uvvdu=xn(1aeax)1aeaxnxn1dx=1axneaxnaxn1eaxdx\begin{align*} \int x^n e^{ax} dx &= u v - \int v du\nonumber\\ &=x^n\left( \frac{1}{a}e^{ax}\right) - \int\frac{1}{a}e^{ax} n x^{n-1} dx\nonumber\\ &=\frac{1}{a}x^n e^{ax} - \frac{n}{a}\int x^{n-1}e^{ax}dx\nonumber \end{align*}

Notice that we now have an integral similar to the previous one, but with xn1x^{n-1} instead of xnx^n.

For a given nn, we would repeat the integration by parts procedure until the integrand was directly integratable — e.g., when the integral became eaxdx\int e^{ax}dx.

  1. x3ex2dx\int x^3 e^{-x^2} dx

We could, as before, choose u=x3u=x^3 and dv=ex2dxdv=e^{-x^2}dx. But we can’t then find vv — i.e., integrating ex2dxe^{-x^2}dx isn’t possible. Instead, notice that ddxex2=2xex2,\frac{d}{dx}e^{-x^2} = -2xe^{-x^2}, which can be factored out of the original integrand x3ex2dx=x2(xex2)dx.\int x^3 e^{-x^2} dx = \int x^2 (xe^{-x^2})dx.

We can then let u=x2u=x^2 and dv=xex2dxdv=x e^{-x^2}dx. Thedu=2xdxdu=2x dx and v=12ex2v=-\frac{1}{2}e^{-x^2}. Substituting these in, we have x3ex2dx=uvvdu=x2(12ex2)(12ex2)2xdx=12x2ex2+xex2dx=12x2ex212ex2+c\begin{align*} \int x^3 e^{-x^2} dx &= u v - \int v du\nonumber\\ &= x^2 \left( -\frac{1}{2}e^{-x^2}\right) -\int \left(-\frac{1}{2}e^{-x^2}\right)2x dx\nonumber\\ &= -\frac{1}{2}x^2 e^{-x^2}+\int x e^{-x^2}dx\nonumber\\ &= -\frac{1}{2}x^2 e^{-x^2}-\frac{1}{2}e^{-x^2}+c\nonumber \end{align*}