Lab 12: Integration Help with Evaluating Functions and Substitution

The following material should be read prior to attending lab. You are responsible for preparing for lab so that you don't slow down your group.

Now that you have been introduced to the definite integral, you will be spending the rest of the semester integrating various types of functions. The goal of this lab is to help you so that you avoid some common mistakes when integrating and to help you better prepare for integration by substitution, which is one of the most important integration techniques that you will learn.

Evaluating Definite Integrals

We now know that if F'(x) is continuous on [a, b], then $\int\limits_{a}^{b}{F'(x) \;dx = F(b) - F(a)}$. Thus, it is important that once we have the antiderivative of a function, we plug the values a and b into the antiderivative correctly. You have probably already made the observation that if F'(x) is a polynomial and the lower limit of integration, a, is zero, then you only need to evaluate F(b). If you hadn't noticed this, then Example 12.1 will help you.

Example 12.1:

Evaluate the integral.

$\int\limits_{0}^{3}{(x^3 - 5x + 4) \;dx}$

The antiderivative of $F'(x) = x^3 - 5x + 4$ is $F(x) = \dfrac{x^4}{4} - \dfrac{5x^2}{2} + 4x + C$. Now we need to evaluate the antiderivative at the limits of integration. This gives us the following.

$\begin{array}{rcl} F(3) - F(0) &=& \left[\frac{3^4}{4} - \frac{5(3)^2}{2} + 4(3) + C\right] - \left[\frac{0^4}{4} - \frac{5(0)^2}{2} + 4(0) + C\right] \\ &=& \dfrac{81}{4} - \dfrac{45}{2} + 12 + C - 0 - C \\ &=& \dfrac{81}{4} - \dfrac{90}{4} + \dfrac{48}{4} = \dfrac{39}{4} \end{array}$

The notion of only needing to evaluate F(b) only works if the function is a polynomial—this DOES NOT work for all functions as seen in the next examples. Another observation to make would be that the arbitrary constant C that we needed for general antiderivatives is not needed when using the Fundamental Theorem of Calculus. Think about why you don't have to worry about + C anymore!

Example 12.2:

Evaluate the following integrals.

(a) $ \begin{array}{rcl} \int\limits_{0}^{\pi/3}{\sec(\theta)\; \tan(\theta) \;d\theta } & = & \sec(\theta)\biggr|_{0}^{\pi/3} \\ &=& \sec\left(\frac{\pi}{3}\right) - \sec(0) \\ &=& \dfrac{1}{\cos(\pi/3)} - \dfrac{1}{\cos(0)} \\ &=& \dfrac{1}{1/2} - \dfrac{1}{1} \\ &=& 2 - 1 = 1 \end{array} $

(b) $\begin{array}{rcl} \int\limits_{0}^{2}{(e^x + 2x - 5)\;dx} & = & e^x + x^2 - 5x\biggr|_{0}^{2} \\ & = & \left[e^2 + 2^2 - 5 \cdot 2\right] - \left[e^0 + 0^2 - 5 \cdot 0\right] \\ & = & e^2 + 4 - 10 - 1 - 0 \\ & = & e^2 - 7 \end{array}$

Integration by Substitution

Integration by substitution is one of the hardest and most important concepts in the Calculus I material. To help you better prepare for this section, it would be a good time to review the portion of Lab 3 on composition of functions and the chain rule for derivatives. One might think of integration by substitution as the antiderivative version of the chain rule. It involves being able to correctly decompose a function as you did in Lab 3. Let's look at an example.

Example 12.3:

Evaluate the indefinite integral.

$\int{xe^{x^2}}\;dx$

This function definitely looks more complicated than the other definite integrals we have encountered thus far. Let's focus on the most complicated part of the function to be integrated, namely $e^{x^2}$. It appears that this part is the composition of two functions, $(f \circ g)(x)$, with $f(x) = e^x$ and $g(x) = x^2$. What is somewhat confusing in the problem is the extra x in front of $e^{x^2}$, but don't get worried yet as you will see that we need it. In integration by substitution, you will substitute a variable, u, for some function of x. In this example, we will let $u = x^2$, and in most cases, you should let u represent the inside function when the composite function is decomposed. If we are going to change the integrand to a function of u, then we will need to integrate with respect to u, so we need to convert dx to something in terms of du. If $u = x^2$, then $\frac{du}{dx} = 2x$. Then solving for du, we have that $du = 2x \;dx$. If you look closely at the original problem, there is an $x \;dx$ in addition to $e^{x^2}$. Now let's solve for $x \;dx$ in terms of du. This gives us $\frac{du}{2} = x \;dx$, and converting the original problem, we have

$\int{xe^{x^2}}\;dx = \displaystyle\int{e^{u}}\;\dfrac{du}{2}$.
Now the integral looks like one that you may have seen before so you can finish the problem on your own.

Example 12.4:

Evaluate the indefinite integral.

$\displaystyle\int{\dfrac{dx}{1 - 2x}}$

This problem might seem a little trickier. Again, we need to think of it as a decomposition of functions. Here we have that $(f \circ g)(x)$, with $f(x) = \frac{1}{x}$ and $g(x) = 1 - 2x$.

We will make the following substitution

$u = 1 - 2x$
$du = -2\;dx \implies \dfrac{du}{-2} = dx$,
and then the original problem becomes
$\displaystyle\int\frac{dx}{1 - 2x} = \displaystyle\int\frac{1}{u} \cdot \frac{du}{-2}$,
which we know how to integrate.

How do we deal with definite integrals that require integration by substitution? Instructors show students how to tackle these types of problems in various ways. In this lab, we will focus on how to convert the entire integral so it is in terms of the new variable, which will mean that we will change the limits of integration. In the many years of teaching this topic, we have found this method to be least prone to errors and sometimes the integral is even easier to compute with the new limits of integration.

Example 12.5:

Evaluate the indefinite integral.

$\int\limits_{0}^{\pi}{\cos\!\left(\frac{t}{2}\right)\;dt}$

We approach this problem just as we have done earlier in the section. In this case, we let

$u = \dfrac{t}{2}$
$du = \dfrac{1}{2}\;dt \implies 2\;du = dt$.

So far, the problem is exactly the same as the earlier examples, but now we know that the limits of integration in terms of t are 0 and $\pi$. If we are going to convert the problem in terms of u, we need to have the limits of integration in terms of u as well. We will show the details on how to change the limits of integration for this example since it is the first one we have shown.

We know that the limits of integration in terms of t are 0 and $\pi$, and we plan to use the substitution, $u = \frac{t}{2}$. Combining this information, we have that

when $t = 0$, $u = \dfrac{0}{2} = 0$, and

when $t = \pi$, $u = \dfrac{\pi}{2}$.

Now putting it all together, we will have

$\int\limits_{0}^{\pi}{\cos\!\left(\frac{t}{2}\right)}\;dt = \int\limits_{0}^{\pi/2}{\cos(u)} \cdot 2\;du$.

The integral on the right-hand side is now completely in terms of u so we just need to find the antiderivative and plug in the values of a and b.