#### xaktly | Calculus

Indefinite integrals

### The antiderivative

We turn our attention to the second half of calculus, integral calculus. The integral as a mathemaical operation is, by most ways of looking at it, the inverse of the derivative. We'll begin by introducing the differential, which is just a slight shift in our thinking,

moving from Δx in the difference quotient limit to dx, an infinitessimal change in the coordinate x. Then we'll connect the derivative and the integral using the mean value theorem.

One important thing to understand right off the bat is that while you can now find the derivative of any function you encounter, no matter how complicated, you will not be able to find the antiderivative or integral of all functions analytically (using pencil and paper). While the derivative and integral are inverses of a sort, it's not a two-way door.

### The differential

If we define the differential, dx, as an infinitessimal (vanishingly small) change in the coordinate x, then the derivative

$$\frac{dy}{dx}$$

can just be viewed as a ratio of differentials in y and x, the slope of a very short (infinitessimally short) line tangent to the function y = f(x) at a point of interest. From this point of view it's easy to rearrange our notation for the derivative of f(x):

$$\frac{dy}{dx} = f'(x)$$

to a definition of the differential of x:

$$dx = f'(x) \, dy$$

Although Gottfried Leibniz, who—independently but at the same time as Isaac Newton—founded calculus, didn't really intend this interpretation of his notation, it is correct and very convenient. It has been said that acceptance of Leibniz's notation on the European continent led to a decades-long leap ahead in calculus over the mathematicians of Newton's home, England, where the notation was not adopted until much later.

In order to get comfortable with the idea of the differential, let's use it in a linear approximation problem. We'll compare it side-by-side to the notation we developed before.

#### ... in Δx notation

We recall that the linear approximation of a function f(x) is

$$f(x) \approx f(x_o) + f'(x_o)(x - x_o)$$

Our function is f(x) = x1/3 ; we'll center our approxmation at xo = 27 and evaluate the result at x = 27.3:

\begin{align} f(x) &\approx (27)^{\frac{1}{3}} + (27)^{\frac{-2}{3}}(27.3 - 27) \\ &\approx 3 + \frac{1}{9} (27.3 - 27) \\ &\approx 3.033 \end{align}

for an error of about 0.7% from the calculated value, f(27.3) = 3.011.

#### ... & in differential notation

In differential notation, that becomes:

So you see it's just a slight shift of notation to get to the same place. The linear approximation of a function near a point, xo, is just the value of the function at that point plus the differential distance from it. The smaller dx, the smaller dy and the smaller the error in the approximation.

dx and dy are infinitessimally small changes in the coordinates x and y, respectively. The derivative, dy/dx, may be considered to be a ratio of differentials.

### The antiderivative or indefinite integral

Now let's let f(x) be the function that is the derivative of F(x):

$$\frac{d}{dx} \, F(x) = f(x)$$

We define the antiderivative of f(x) to be:

We've introduced the integral symbol here: ∫ . It's origin is Liebniz, who (and we'll learn why later) considered the integral to be a summation of infinitessimals (differentials), and wrote the word "summation" with an f: fummation. Thus the integral symbol looks a bit like an f, or the f-hole in a violin.

f-hole in a violin

### Some important antiderivatives

#### 1.     $\int sin(x) \, dx$

We need a function which, when differentiated, gives sin(x). We know that the derivative of cos(x) is -sin(x), so the function F(x) = -cos(x) fits the bill:

$$\int \, sin(x) \, dx = -cos(x)$$

because   $\frac{d}{dx} -cos(x) = sin(x)$

There's just one thing . . . G(x) = -cos(x) + 7   works, too, because the derivative of the constant, 7, is zero. In fact, F(x) = -cos(x) + C, where C is an arbitrary constant (just pick one) works just fine. We say that the integral of f(x) = sin(x) is -cos(x) to within an additive constant. It's the same for all indefinite integrals: don't forget to add the constant:

$$\int sin(x) \, dx = -cos(x) + C$$

An indefinite integral (antiderivative) can be found to within an additive constant (See "An Important Question" below).

#### 2.   $\int cos(x) \, dx$

We need a function which, when differentiated, gives cos(x). We know that the derivative of sin(x) is cos(x), so the function F(x) = sin(x) fits the bill:

$$\int cos(x) \, dx = sin(x) + C$$

because   $\frac{d}{dx} [sin(x) + C] = cos(x)$

#### 3.   $\int sec^2(x) \, dx$

This integral rounds out our basic trigonometric integrals:

$$\int sec^2(x) \, dx = tan(x) + C$$

because $\frac{d}{dx} [tan(x) + C] = sec^2(x)$

### The power rule of integration

#### 4. $\int x^n \, dx$   —   Power rule of integration

Here we just need to work backward from the power rule of differentiation. We need a function that when differentiated gives xn, which has no constant coefficient. The solution is:

$$\int x^n \, dx = \frac{x^{n + 1}}{n + 1}$$

because

$$\frac{d}{dx} \frac{x^{n + 1}}{n + 1} = \frac{(n + 1)x^{n + 1 - 1}}{n + 1} = x^n$$

But of course there's a catch here ... did you spot it? This indefinite integral fails if n = -1, so we don't yet know how to find the antiderivative of   f(x) = x-1. We'll cover that next.

#### 5.   $\int x^{-1} \, dx$

First, this integral is often written as

$$\int \frac{1}{x} dx = \int \frac{dx}{x}$$

Now if we recall that the derivative of f(x) = ln(x) is 1/x, we have:

$$\int \frac{1}{x} \, dx = ln|x| + C$$

because   $\frac{d}{dx} [ln(x) + C] = \frac{1}{x}$

#### 7.   $\int e^x \, dx$

Because the derivative of $f(x) = e^x$ is $e^x$, we have our easiest integral:

$$\int e^x \, dx = e^x + C$$

#### 8. Integrals involving inverse trignonometric functions

We developed the derivatives of the inverse trigonometric functions in the implicit derivatives section. That leads to six very important indifinite integrals we will use often later:

 $$\int \frac{dx}{\sqrt{1 - x^2}} = sin^{-1}(x) + C$$ $$\int \frac{-dx}{\sqrt{1 - x^2}} = cos^{-1}(x) + C$$ $$\int \frac{dx}{1 + x^2} = tan^{-1}(x) + C$$
 $$\int \frac{-dx}{|x|sqrt{x^2 - 1}} = csc^{-1}(x) + C$$ $$\int \frac{dx}{|x|sqrt{x^2 - 1}} = sec^{-1}(x) + C$$ $$\int \frac{-dx}{1 + x^2} = cot^{-1}(x) + C$$

#### An important question: How do we know that the integral of a function is unique (to within a constant)?

Mathematically speaking, it would be a bummer if sin(x) + C wasn't (notwithstanding the C) the only indefinite integral of f(x) = cos(x). Mathematics doesn't deal that well with ambiguity. Uncertainty, yes, that's OK. Ambiguity is not. How do we know that sin(x) + C is the only indefinite integral of f(x) = cos(x)?

The answer lies with the Mean Value Theorem. Here's how it works. Imagine that F(x) and G(x) are both antiderivatives of a function f(x), meaning

$$F'(x) = f(x) \: \: and \: \: G'(x) = f(x)$$

Now if this is true, then the difference between derivatives must be zero:

$$F'(x) - G'(x) = f(x) - f(x) = 0$$

Now we proved earlier, using the Mean Value Theorem , that the value of the derivative of a constant is zero (or if the derivative of a function is zero, then that function is constant) so we have

$$G(x) - F(x) = c$$

for some constant c, or

$$G(x) = F(x) + c$$

Thus we have proved that if G(x) and F(x) are both antiderivatives of f(x), then they can only differ by at most a constant.

This is a very important result in integral calculus because it proves the uniqueness (to within an additive constant) of an indefinite integral — there is no ambiguity!

### Properties of Indefinite Integrals

Two important properties of indefinite integrals (presented without proof, for now) will help us to use the basic integrals developed above to solve more complicated ones. Using these with the substitution technique in the next section will take you a long way toward finding many integrals.

#### Multiplication by a constant

The antiderivative of a function multiplied by a constant is just the antiderivative of the function multiplied by that constant:

$$\int k \cdot f(x) \, dx = k \, \int f(x) \, dx$$

#### Antiderivative of a sum or difference

The antiderivative of a sum of functions, f(x) and g(x) is just the sum of the individual antiderivatives:

$$\int [f(x) ± g(x)]dx = \int f(x) dx ± \int g(x) dx$$

These properties make many antiderivatives much easier to find, so you should learn to use them.

### Integration by substitution — "u-substitution"

Using just the indefinite integrals (antiderivatives) we've got so far, coupled with those two properties, it's possible to find the integrals of a whole class of more complicated functions. For example, this integral:

$$\int x^4 (x^5 - 3)^6 \, dx = ?$$

It's simple to try a substitution here:

$$Let: \: \: u = x^5 - 3,$$

Taking the derivative with respect to x of both sides, we get:

Now we substitute into the original integral, u for   x5- 3   and   5x4dx   for   x4dx, making sure to multiply by 1/5 outside of the integral to compensate for the extra factor of 5 we introduced. From there it's an easy matter to solve the integral (using the power rule of integration above) and then resubstitute for u:

\begin{align} \int x^4 (x^5 - 3)^6 \, dx &= \frac{1}{5} \int u^6 \, du \\ \\ &= \frac{u^7}{5 \cdot 7} + C \\ \\ &= \frac{(x^5 - 3)^7}{35} + C \end{align}

### Example 1

Find the indefinite integral (the antiderivative): $\int \frac{x^2 + 1}{x^3 + 3x} \, dx$

Solution: It's not always easy to tell whether substitution (and for what?) is going to work. Sometimes you just have to try something based on your intuition and see if it works. In this case, notice that the degree of the denominator is one greater than that of the numerator, so when we determine du, the degrees of du and the numerator match. It doesn't always work out like it does here, but it's a good thing to try.

We'll try the substitution

$$u = x^3 + 3x$$

Then taking the derivative du/dx gives us

\begin{align} du &= (3x^2 + 3) \, dx \\ \\ &= 3(x^2 + 1) \, dx \end{align}

That's everything we need in the numerator of our integrand, except the extra 3, which we'll have to divide away. Then the antiderivative is a simple one:

\begin{align} \int \frac{x^2 + 1}{x^3 + 3x} \, dx &= \frac{1}{3} \int \frac{du}{u}\, dx \\ &= \frac{1}{3} ln|u| + C \end{align}

Re-substituting for u gives us our final result:

$$\frac{1}{3} ln|x^3 + 3x| + C$$

### Example 2

Find the indefiinite integral (the antiderivative): $\int \frac{x^3}{(1 + x^4)^{1/3}} \, dx$

Solution: 1 + x4 is a good candidate for substitution:

\begin{align} Let: \: u &= 1 + x^4 \\ then: \: du &= 4x^3 \, dx \end{align}

Substitute, rearrange and solve the integral

\begin{align} \frac{1}{4} \int \frac{du}{u^{1/3}} &= \frac{1}{4} \int u^{-1/3} \, du \\ \\ &= \frac{1}{4} \frac{u^{2/3}}{\frac{2}{3}} + C \\ \\ &= \frac{3 u^{2/3}}{8} + C \end{align}

Now back-substitute for u to get the final answer:

$$\int \frac{x^3}{(1 + x^4)^{1/3}} dx = \frac{3(1 + x^4)^{2/3}}{8} + C$$

Make sure to differentiate your antiderivatives to see if they're correct. That's the nice thing about most integrals - you can easily check to make sure you've got it right.

One caution, though. Once in a while, when working integrals of trigonometric functions, differentiating the answer can give something that doesn't look too much like the original integrand. Fiddling with trig. identities will resolve it, but sometimes that's tough.

### Example 3

Find the indefinite integral: $\int \frac{e^x \, dx}{1 + e^x}$

Solution: Make the substitution u = 1 + ex, then du = ex dx. Then solve

\begin{align} Let: \: u &= 1 + e^x \\ then: \: du &= e^x \, dx \end{align}

The new integral is a simple one that should be familiar:

$$\int \frac{du}{u} = ln|u| + C$$

Re-substitution for u finally gives the result:

$$= ln|1 + e^x| + C$$

Easy peasy, lemon squeezy.

### Practice problems

Find each of the following indefinite integrals, to within an additive constant, C, either directly from a known derivative, from the integral power rule or by substitution:

 1 $$\int (2x - 1)^4 dx$$ 2 $$\int x^2 (x^3 + 1)^2 dx$$ 3 $$\int x \sqrt{1 + x^2} dx$$ 4 $$\int \frac{dx}{\sqrt{3x - 1}} dx$$ 5 $$\int \frac{x^3 \, dx}{\sqrt{x^2 + 1}}$$ 6 $$\int \frac{x^2 \, dx}{\sqrt{x^3 + 1}}$$ 7 $$\int \frac{sin(\sqrt{x})}{\sqrt{x}}$$ 8 $$\int \frac{dx}{cos^2(2x)}$$ 9 $$\int \frac{x \, dx}{\sqrt{x^2 + 9}}$$ 10 $$\int cos(x) \sqrt{sin(x)} \, dx$$
 11 $$\int x \, sin(x^2) \, dx$$ 12 $$\int \frac{cos(x) \, dx}{1 - cos^2(x)}$$ 13 $$\int \frac{(x - 1) \, dx}{(x^2 - 2x + 3)^2}$$ 14 $$\int \frac{5 - 4x^3 + 2x^6}{x^6} dx$$ 15 $$\int x (2 - x)^2 \, dx$$ 16 $$\int \frac{1 + x + x^2}{\sqrt{x}} dx$$ 17 $$\int \left[\sqrt{x^3} + \sqrt[3]{x^2} \right] dx$$ 18 $$\int 8x^7 - 3x^5 + 11x^3 \, dx$$ 19 $$\int 6x^2 - 7 sec^2(x) \, dx$$ 20 $$\int \pi^3 \, dx$$

### Video examples

#### 1. Three examples of integration by U-substitution

Here are three different examples of integration by U-substitution, spanning simple functions, logs and trigonometric functions. The trickiest things about U-substitution are (1) figuring out what to substitute – that's mostly trial-and-error and developing an intuition, and (2) figuring out how to properly substitute for the part that has "dx" in it.