Calculus/Indefinite integral

DefinitionEdit

Now recall that F is said to be an antiderivative of f if $F'(x) = f(x)\,.$. However, F is not the only antiderivative. We can add any constant to F without changing the derivative. With this, we define the indefinite integral as follows:

$\int f(x) dx = F(x) + C \;\;\;$ where F satisfies $F'(x) = f(x)\;$ and C is any constant.

The function $f(x)$, the function being integrated, is known as the integrand. Note that the indefinite integral yields a family of functions.

Example

Since the derivative of $x^4$ is $4x^3$, the general antiderivative of $4x^3$ is $x^4$ plus a constant. Thus,

$\int 4x^3 dx = x^4 + C.$

Example: Finding antiderivatives

Let's take a look at $6x^2$. How would we go about finding the integral of this function? Recall the rule from differentiation that

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

In our circumstance, we have:

$\frac{d}{dx} x^3 = 3 x^2\$

This is a start! We now know that the function we seek will have a power of 3 in it. How would we get the constant of 6? Well,

$2 \frac{d}{dx} x^3= 2 \times 3 x^2 =6x^2.\$

Thus, we say that $2x^3$ is an antiderivative of $6x^2$.

ExercisesEdit

1. Evaluate $\int \frac{3x}{2}dx$

$\frac{3}{4}x^2+C$

2. Find the general antiderivative of the function $f(x)=2x^4$.

$\frac{2x^5}{5}+C$

Solutions

Indefinite integral identitiesEdit

Basic Properties of Indefinite IntegralsEdit

Constant Rule for indefinite integrals

If c is a constant then $\int c f(x) dx = c \int f(x) dx.$

Sum/Difference Rule for indefinite integrals

$\int (f(x) + g(x)) dx = \int f(x) dx + \int g(x) dx.$
$\int (f(x) - g(x)) dx = \int f(x) dx - \int g(x) dx.$

Indefinite integrals of PolynomialsEdit

Say we are given a function of the form, $f(x)= x^n$, and would like to determine the antiderivative of f. Considering that

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

we have the following rule for indefinite integrals:

Power rule for indefinite integrals

$\int x^n {dx}= \frac{1}{n+1} x^{n+1} +C \;$ for all $n \not= -1.$

Integral of the Inverse functionEdit

To integrate $f(x)=\frac{1}{x}$, we should first remember

$\frac{d}{dx} \ln x = \frac{1}{x}.$

Therefore, since $\frac{1}{x}$ is the derivative of $\ln(x)$ we can conclude that

$\int \frac{dx}{x} = \ln \left| x \right| +C.$

Note that the polynomial integration rule does not apply when the exponent is -1. This technique of integration must be used instead. Since the argument of the natural logarithm function must be positive (on the real line), the absolute value signs are added around its argument to ensure that the argument is positive.

Integral of the Exponential functionEdit

Since

$\frac{d}{dx} e^x= e^x$

we see that $e^x$ is its own antiderivative. This allows us to find the integral of an exponential function:

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

Integral of Sine and CosineEdit

Recall that

$\frac{d}{dx}\sin{x}= \cos{x} \,$
$\frac{d}{dx}\cos{x}= -\sin{x}. \,$

So sin x is an antiderivative of cos x and -cos x is an antiderivative of sin x. Hence we get the following rules for integrating sin x and cos x

$\int \cos{x}\ dx= \sin{x} +C$
$\int \sin{x}\ dx= -\cos{x} + C.$

We will find how to integrate more complicated trigonometric functions in the chapter on integration techniques.

Example

Suppose we want to integrate the function $f(x)=x^4+1+2\sin{x}$. An application of the sum rule from above allows us to use the power rule and our rule for integrating $\sin{x}$ as follows,

$\int f(x)\,dx = \int x^4 + 1 + 2\sin{x}\,dx$
$= \int x^4dx + \int 1\,dx + \int 2\sin{x}\,dx$
$= \frac{x^5}{5} + x - 2\cos{x} + C.$

ExercisesEdit

3. Evaluate $\int(7x^2+3\cos(x)-e^x)dx$

$\frac{7}{3}x^3+3\sin(x)-e^x+C$

4. Evaluate $\int(\frac{2}{5x}+\sin(x))dx$

$\frac{2}{5}\ln|x|-\cos(x)+C$

Solutions

The Substitution RuleEdit

The substitution rule is a valuable asset in the toolbox of any integration greasemonkey. It is essentially the chain rule (a differentiation technique you should be familiar with) in reverse. First, let's take a look at an example:

Preliminary ExampleEdit

Suppose we want to find $\int x \cos(x^2) dx$. That is, we want to find a function such that its derivative equals $x \, \cos(x^2)$. Stated yet another way, we want to find an antiderivative of $f(x)= x \, \cos (x^2)$. Since $\sin(x)$ differentiates to $\cos(x)$, as a first guess we might try the function $\sin (x^2)$. But by the Chain Rule,

$\frac{d}{dx} \sin (x^2) = \cos(x^2) \cdot \frac{d}{dx} x^2 = \cos(x^2) \cdot 2x = 2x \cos(x^2).$

Which is almost what we want apart from the fact that there is an extra factor of 2 in front. But this is easily dealt with because we can divide by a constant (in this case 2). So,

$\frac{d}{dx}\frac{\sin (x^2)}{2} = \frac{1}{2} \cdot \frac{d}{dx} \sin (x^2) = \frac{1}{2} \cdot 2 \cos(x^2)x=x \cos(x^2)=f(x).$

Thus, we have discovered a function, $F(x) = \frac{\sin (x^2)}{2}$, whose derivative is $x \, \cos (x^2)$. That is, F is an antiderivative of $f(x)= x \, \cos (x^2)$. This gives us

$\int x \cos(x^2) dx = \frac{\sin(x^2)}{2} + C.$

GeneralizationEdit

In fact, this technique will work for more general integrands. Suppose u is a differentiable function. Then to evaluate $\int u'(x) \cos(u(x)) dx$ we just have to notice that by the Chain Rule

$\frac{d}{dx} \sin(u(x)) = \cos(u(x)) \frac{du}{dx} = u'(x) \cos(u(x)).$

As long as $u'$ is continuous we have that

$\int \cos(u(x)) u'(x) dx = \sin(u(x)) + C.$

Now the right hand side of this equation is just the integral of $\cos(u)$ but with respect to u. If we write u instead of u(x) this becomes $\int \cos(u(x)) u'(x) dx = \sin(u) du + C = \int \cos(u) du.$

So, for instance, if $u(x) = x^3$ we have worked out that

$\int (\cos(x^3)\cdot 3x^2)dx = \sin(x^3) + C.$

General Substitution RuleEdit

Now there was nothing special about using the cosine function in the discussion above, and it could be replaced by any other function. Doing this gives us the substitution rule for indefinite integrals:

Substitution rule for indefinite integrals
Assume u is differentiable with continuous derivative and that f is continuous on the range of u. Then

$\int f(u(x)) \frac{du}{dx} dx = \int f(u) du.$

Notice that it looks like you can "cancel" in the expression $\frac{du}{dx} dx$ to leave just a $du$. This does not really make any sense because $\frac{du}{dx}$ is not a fraction. But it's a good way to remember the substitution rule.

ExamplesEdit

The following example shows how powerful a technique substitution can be. At first glance the following integral seems intractable, but after a little simplification, it's possible to tackle using substitution.

Example

We will show that

$\int\frac{1}{\left(x^2+a^2\right)^{3/2}}\,dx = \frac{x}{a^2 \sqrt{x^2+a^2}} + C$

First, we re-write the integral:

$\int \frac{1}{\left(x^2+a^2\right)^{3/2}}\,dx = \int \left(x^2 + a^2\right)^{-3/2}\,dx$
$= \int \left(x^2 \left(1 + \frac{a^2}{x^2}\right) \right)^{-3/2} dx$
$= \int x^{-3} \left(1+\frac{a^2}{x^2}\right)^{-3/2} dx$
$= \int \left(1+\frac{a^2}{x^2}\right)^{-3/2} \left(x^{-3} dx\right)$.

Now we preform the following substitution:

$u = 1 + \frac{a^2}{x^2}$
$\frac{du}{dx} = -2a^2x^{-3} \Longrightarrow x^{-3}dx = -\frac{du}{2a^2}$

Which yields:

$\int \left(1+\frac{a^2}{x^2}\right)^{-3/2} \left(x^{-3} dx\right) =$
$= \int u^{-3/2} \left(-\frac{du}{2a^2}\right)$
$= -\frac{1}{2a^2} \int u^{-3/2} du$
$= -\frac{1}{2a^2} \left(-\frac{2}{\sqrt{u}}\right) + C$
$= \frac{1}{a^2 \sqrt{1+\frac{a^2}{x^2}}} + C$
$= \left(\frac{x}{x}\right) \frac{1}{a^2 \sqrt{1+\frac{a^2}{x^2}}} + C$
$= \frac{x}{a^2 \sqrt{x^2+a^2}} + C$.

ExercisesEdit

5. Evaluate $\int x\sin(2x^2)dx$ by making the substitution $u=2x^2$

$-\frac{\cos(2x^{2})}{4}+C$

6. Evaluate $\int-3\cos(x)e^{\sin(x)}dx$

$-3e^{\sin(x)}+C$

Solutions

Integration by PartsEdit

Integration by parts is another powerful tool for integration. It was mentioned above that one could consider integration by substitution as an application of the chain rule in reverse. In a similar manner, one may consider integration by parts as the product rule in reverse.

General Integration by PartsEdit

Integration by parts for indefinite integrals
Suppose f and g are differentiable and their derivatives are continuous. Then

$\int f(x)g'(x) dx = f(x)g(x) - \int f'(x) g(x) dx.$

If we write u=f(x) and v=g(x), then by using the Leibniz notation du=f'(x) dx and dv=g'(x) dx the integration by parts rule becomes

$\int u dv = uv - \int v du.$

ExamplesEdit

Example

Find $\int x\cos (x) \,dx .$

Here we let:

$u = x$, so that $du = dx$,
$dv = \cos(x)dx$ , so that $v = \sin(x)$.

Then:

 $\int x\cos (x) \,dx$ $= \int u \,dv$ $= uv - \int v \,du$
$\int x\cos (x) \,dx = x\sin (x) - \int \sin (x) \,dx$
$\int x\cos (x) \,dx = x\sin (x) + \cos (x) + C.$

Example

Find $\int x^2 e^x\,dx$

In this example we will have to use integration by parts twice.

Here we let

$u = x^2$, so that $du= 2x dx$,
$dv= e^xdx$, so that $v =e^x$.

Then:

 $\int x^2e^x \,dx$ $= \int u \,dv$ $= uv - \int v \,du$
$\int x^2e^x \,dx = x^2e^x - \int 2xe^x\,dx= x^2 e^x - 2\int xe^x\,dx.$

Now to calculate the last integral we use integration by parts again. Let

$u = ''x$, so that $du= dx$,
$dv= e^xdx$, so that $v =e^x$

and integrating by parts gives

$\int xe^x \,dx = xe^x - \int e^x\,dx= x e^x - e^x.$

So, finally we obtain

$\int x^2e^x \,dx = x^2 e^x - 2(x e^x - e^x)+ C = x^2 e^x - 2x e^x + 2e^x + C =e^x(x^2-2x+2) + C.$

Example

Find $\int \ln (x) \,dx.$

The trick here is to write this integral as

$\int \ln (x) \cdot 1 \,dx.$

Now let

$u = \ln(x)$ so $du = (1/x) dx$,
$v = x$ so $dv = 1dx$.

Then using integration by parts,

 $\int \ln (x) \,dx$ $= x \ln (x) - \int \frac{x}{x} \,dx$ $= x \ln (x) - \int 1 \,dx$
$\int \ln (x) \,dx = x \ln (x) - {x} + {C}$
$\int \ln (x) \,dx = x ( \ln (x) - 1 ) + C.$

Example

Find $\int \arctan(x) dx.$

Again the trick here is to write the integrand as $\arctan(x) = \arctan(x) \cdot 1$. Then let

u = arctan(x); du = 1/(1+x2) dx
v = x; dv = 1·dx

so using integration by parts,

 $\int \arctan (x) \,dx$ $= x \arctan (x) - \int \frac{x}{1 + x^2} \,dx$ $= x \arctan (x) - {1 \over 2} \ln \left( 1 + x^2 \right) + C.$

Example

Find $\int e^{x} \cos (x) \,dx.$

This example uses integration by parts twice. First let,

u = ex; thus du = exdx
dv = cos(x)dx; thus v = sin(x)

so

$\int e^{x} \cos (x) \,dx = e^{x} \sin (x) - \int e^{x} \sin (x) \,dx$

Now, to evaluate the remaining integral, we use integration by parts again, with

u = ex; du = exdx
v = -cos(x); dv = sin(x)dx

Then

 $\int e^{x} \sin (x) \,dx$ $= -e^{x} \cos (x) - \int -e^{x} \cos (x) \,dx$ $= -e^{x} \cos (x) + \int e^{x} \cos (x) \,dx$

Putting these together, we have

$\int e^{x} \cos (x) \,dx = e^{x} \sin (x) + e^x \cos (x) - \int e^{x} \cos (x) \,dx$

Notice that the same integral shows up on both sides of this equation, but with opposite signs. The integral does not cancel; it doubles when we add the integral to both sides to get

$2\int e^{x} \cos (x) \,dx = e^{x} ( \sin (x) + \cos (x) )$
$\int e^{x} \cos (x) \,dx = \frac{e^{x} ( \sin (x) + \cos (x) )}{2} .$

ExercisesEdit

7. Evaluate $\int \frac{2x-5}{x^3}dx$ using integration by parts with $u=2x-5$ and $dv=\frac{dx}{x^3}$

$\frac{5-4x}{2x^2} + C$

8. Evaluate $\int(2x-1)e^{-3x+1}dx$

$\frac{(1-6x)e^{-3x+1}}{9} + C$

Solutions