Skip to main content

Section 7.3 Manipulating Integrands

We’ve looked at how to use a variable substitution to antidifferentiate composite functions. We’ve already seen, though, that sometimes identifying and actually using a helpful substitution can be difficult to do. In this section, we want to introduce some different strategies for noticing and setting up useful substitutions in some specific instances.

Subsection Rewriting the Integrand

We’re going to look at a few different examples or strategies that revolve around the same idea: we’re going to reveal a reasonable function to antidifferentiate, whether its through finding a substitution or putting our function into some other recognizeable form.

Example 7.3.1.

For each of the following integrals, rewrite the integrand function using some algebraic manipulation, trigonometric identity, or some other strategy. Then, once the integrand function is in a friendlier form, antidifferentiate.
(a)
\(\displaystyle \int \tan^2(\theta)\;d\theta\)
Hint.
Can you think of a trigonometric identity that can help translate the squared tangent function into some other squared trigonometric function that we recognize as the derivative of something?
(b)
\(\displaystyle\int \left(\frac{x^2-9}{x+3}\right)\;dx\)
Hint.
Try some factoring! Can you factor and cancel?
(c)
\(\displaystyle\int\left(\frac{\sqrt{x}-4}{x^2}\right)\;dx\)
Hint.
Split this fraction into \(\displaystyle\int \left(\frac{\sqrt{x}{x^2}} - \frac{4}{x^2}\right)\;dx\text{.}\) Then, can you write these two terms as power functions?
(d)
\(\displaystyle \int \sec(x)\;dx\)
Hint.
This is a hard one an annoying one, and we’ll revisit it later with a better strategy, but for now you can notice something nice happens when you multiply the numerator and denominator by \((\sec(x)+\tan(x))\text{:}\)
\begin{equation*} \int \sec(x)\left(\frac{\sec(x)+\tan(x)}{\sec(x)+\tan(x)}\right)\;dx = \int \frac{\sec^2(x)+\sec(x)\tan(x)}{\sec(x)+\tan(x)}\;dx\text{.} \end{equation*}
This strategy is not intuitive, in my opinion: the nice thing to multiply seemingly comes out of nowhere!
Let’s look at one more type of example, just to reiterate what we’re thinking about with these rewritten functions.

Activity 7.3.1. A Negative Exponent.

Let’s think about this integral:
\begin{equation*} \int \frac{1}{1+e^{-x}}\;dx\text{.} \end{equation*}
(a)
Is there any composition in this integral? Pick it out, and either explain or show that using this to guide your substitution will not be helpful.
Hint.
Notice that \(-x\) is composed inside of the exponential function. Try a substitution with \(u=-x\text{.}\)
(b)
What does \(e^{-x}\) mean? What does \(\frac{1}{e^{-x}}\) mean?
(c)
Rewrite the integral, specifically focusing on the negative exponent. You should find that the function looks worse! How can you clean that up?
Hint 1.
Rewrite \(e^{-x}\) as \(\frac{1}{e^x}\text{,}\) giving you:
\begin{equation*} \int \frac{1}{1+\frac{1}{e^x}}\;dx\text{.} \end{equation*}
Hint 2.
Either add the fractions in the denominator or multiply the whole fraction by \(\frac{e^x}{e^x}\text{.}\)
Solution.
You should have an integral that looks like:
\begin{equation*} \int \frac{e^x}{e^x+1}\;dx\text{.} \end{equation*}
(d)
Why is this new integral set up so much better for the purpose of \(u\)-substitution? How could we tell this just by looking at the initial integral?

Example 7.3.2.

Rewrite the integrand function for \(\displaystyle \int \frac{1}{x+x^{-1}}\;dx\text{,}\) and then integrate using an appropriate substitution.
Hint.
Try to rewrite this integral by noticing that \(x^{-1}=\dfrac{1}{x}\text{.}\) Then try to make the resulting fraction a bit nicer to look at, since it has a fraction inside of the denominator of another fraction.
Solution.
\begin{align*} \int \frac{1}{x+x^{-1}}\;dx \amp = \int \frac{1}{x+\frac{1}{x}}\cdot\frac{x}{x}\;dx\\ \amp= \int \frac{x}{x^2+1}\;dx \\ u=x^2+1\;\;\amp\;\;du=2x\;dx \\ \int \frac{x}{x^2+1}\;dx \amp= \frac{1}{2}\int \frac{2x}{x^2+1}\;dx \\ \amp = \frac{1}{2}\int \frac{1}{u}\;du\\ \amp =\frac{1}{2}\ln|u|+C\\ \amp \frac{1}{2}\ln(x^2+1)+C \end{align*}
This last example is a good one to help us transition into thinking about a whole class of functions: rational functions! As a reminder, these are just polynomials divided by polynomials.

Subsection Antidifferentiating Rational Functions

Strategies for antidifferentiating rational functions are just that: strategies. There isn’t one consistent rule to use to antidifferentiate these (like there is with derivatives and the Quotient Rule), but we’ll find some common tactics to apply and try to build our intuition for noticing the different kinds of structure we can have in these rational functions. All of these strategies are based around cleverly rewriting our rational functions (using some algebraic manipulations) to reveal some structure. We’ll try to notice the structure, so that we know what we’re trying to reveal.

Activity 7.3.2. Integrating a Rational Function Three Ways.

We’re going to think about the integral:
\begin{equation*} \int \left( \frac{x^2+3x-1}{x-1}\right)\;dx\text{.} \end{equation*}
Let’s find 3 different ways of integrating this. This is kind of misleading, since we’re actually going to look at 2, since we’ve already used \(u\)-substitution to integrate this in Example 7.2.1.
(a)
Let’s just notice some things about this rational function.
  • Are there any vertical asymptotes? How do you know where to find them?
  • Are there any horizontal asymptotes? How do you know that there aren’t?
  • When you zoom really far out on the graph of this function, it looks like a different kind of function. What kind of function? Why is that?
Solution.
  • There’s a vertical asymptote at \(x=1\text{,}\) since that’s where we’d find a limit with the form \(\frac{\#}{0}\text{,}\) like in Infinite Limits.
  • There aren’t any horizontal asymptotes! We know that because the degree is larger in the numerator, like in End Behavior Limits.
  • This graph looks linear:
    This is because the numerator is one degree larger than the denominator. When we divide these two functions, we expect to end up with some sort of linear function and a remainder that approaches 0 as \(x\to\pm\infty\text{.}\)
(b)
Now we’re going to rewrite the function itself: \(\dfrac{x^2+3x-1}{x-1}\) means we’re dividing \((x^2+3x-1)\) by \((x-1)\text{.}\) So let’s do the division!
\(x-1\) \(x^2\) \(+3x\) \(-1\)
Solution.
\(x\) \(+4\) \(+\frac{3}{x-1}\)
\(x-1\) \(x^2\) \(+3x\) \(-1\)
\(-\) \((x^2\) \(-x)\) \(\downarrow\)
\(4x\) \(-1\)
\(-\) \((4x\) \(-4)\)
\(3\)
(c)
Rewrite your integral using this new version of the function. Notice that we haven’t done any calculus or antidifferentiating yet. Explain why this new version of this integrand function is easier to antidifferentiate. What do you get?
Solution.
\begin{align*} \int \left(\frac{x^2+3x-1}{x-1}\right)\;dx \amp = \int x+4+\frac{3}{x-1}\;dx\\ \amp = \frac{x^2}{2}+4x+3\ln|x-1|+C \end{align*}
(d)
Let’s approach this integral differently. We said earlier that this function is really an “almost” linear function in disguise: when we divide the quadratic numerator by a linear denominator, we expect a linear function to be left over. In the long division, we saw this happen! We ended with a linear function and some remainder.
Let’s try to uncover this linear function. If we’re looking to find what linear functions multiply together to get \((x^2+3x-1)\text{,}\) then we can try factoring!
\begin{equation*} \frac{x^2+3x-1}{x-1}=\frac{(\fillinmath{XXXXX})(\fillinmath{XXXXX})}{x-1} \end{equation*}
In order for this factoring to be useful, we want to be able to “cancel” out the \(x-1\) factor in the denominator. We’re really only interested in what linear factor will multiply by \((x-1)\) to get \((x^2+3x-1)\text{.}\)
\begin{equation*} \frac{x^2+3x-1}{x-1}=\frac{(x-1)(\fillinmath{XXXXX})}{x-1} \end{equation*}
First, explain why there is no linear function factor that accomplishes this.
(e)
What if we’re able to “almost” factor this?
If there was a linear factor that multiplied by \((x-1)\) to get \((x^2+3x-1)\text{,}\) then the linear portions would multiply together to get \(x^2\text{.}\) What does this mean about the first linear term of our factor?
Solution.
We need \((x-1)(x+\fillinmath{XX})=(x^2+3x-1)\) since \(x(x)=x^2\text{.}\)
(f)
What does the constant term of our missing factor need to be? We are hoping that whatever it is can multiply by \(x\) (from \(x-1\)) and combine with the \(-x\) (from the constant \(-1\) multiplied by \(x\) in our missing factor) to match the \(3x\) in \(x^2+3x-1\text{.}\)
What is it?
Solution.
We need to find \(a\) where when we multiply \((x-1)(x+a)\) we end up with \(ax-x=3x\text{.}\) It should be clear that \(a=4\text{.}\)
Our missing factor is \((x-4)\text{.}\)
(g)
Note that we have not factored \((x^2+3x-1)\text{!}\) We almost did: we found two factors:
\begin{equation*} (x-1)(\fillinmath{XXXXX}) = x^2+3x+\fillinmath{XX}\text{.} \end{equation*}
How far off is the actual polynomial that we are working with, \(x^2+3x-1\text{?}\)
Write \(x^2+3x-1\) as your two factors, plus or minus some remainder.
Hint.
Find the constant term where:
\begin{equation*} x^2+3x-1=(x-1)(x+4)+\fillinmath{XX}\text{.} \end{equation*}
Solution.
Since \((x-1)(x+4)=x^2+3x-4\text{,}\) we need to add \(3\) to get \(x^2+3x-1\text{.}\)
\begin{equation*} x^2+3x-1 = \overbrace{(x-1)(x+4)}^{x^2+3x-4}+3 \end{equation*}
(h)
You should get the same thing that we got from using long division! Great! The rest of the integral will work the same.
Before we end, though, compare this antiderivative to the one we got in Example 7.2.1. It’s different. Why? Is this a problem?
Hint.
It’s only off by a constant! Show this by expanding all of the multiplication in
\begin{equation*} \frac{(x-1)^2}{2}+5(x-1)+3\ln|x-1|\text{.} \end{equation*}
This gives us a good approach for whenever division will help us rewrite our rational function as some polynomial and a remainder.
Let’s look at two more rational functions: these ones won’t be good candidates to use long division, but we’ll try to build some intuition for why we will need to rewrite one of them to get a substitution that works.

Activity 7.3.3. Comparing Two Very Similar Integrals.

We’re going to compare these two integrals:
\begin{equation*} \int \frac{x+2}{x^2+4x+5}\;dx \end{equation*}
\begin{equation*} \int \frac{2}{x^2+4x+5}\;dx \end{equation*}
(a)
Describe why \(u=x^2+4x+5\) is such a useful choice for the first integral, but not for the second. How do the differences in these two integrals influence this substitution, even though the denominators are the same?
Hint.
If \(u=x^2+4x+5\text{,}\) then \(du=(2x+4)\;dx\) for both integrals. Why is this good for one integral but not the other?
(b)
Why would it be useful to have a linear substitution rule (instead of the quadratic one that we picked) for the second integral? Why would that match the structure of the numerator better?
Go ahead and integrate the first integral.
Solution.
\begin{align*} u = x^2+4x+5\;\; \amp \;\; du=(2x+4)\;dx\\ \int \frac{x+2}{x^2+4x+5}\;dx \amp \\ \amp = \frac{1}{2}\int \frac{2(x+2)}{x^2+4x+5}\;dx\\ \amp = \frac{1}{2} \int \frac{1}{u}\;du\\ \amp = \frac{1}{2} \ln|u|+C\\ \amp = \frac{1}{2}\ln|x^2+4x+5|+C \end{align*}
(c)
We’re going to write the denominator, \(x^2+4x+5\) in a different way, in order to get a linear function composed into something familiar.
Complete the square for this polynomial: that is, find some linear factor \((x+k)\) and a real number \(b\) such that \((x+h)^2+b = x^2+4x+3\text{.}\) This should feel familiar, since we already haves tried to force polynomials to factor cleverly in Activity 7.3.2.
Hint.
We want to find a constant term so that \((x+\fillinmath{XX})^2\) gives us \(x^2+4x+\fillinmath{XX}\text{.}\) Then, we can compare the quadratic to \(x^2+4x+5\) to see how far off it is!
Solution.
We can use \((x+2)^2\) since \((x+2)^2=x^2+4x+4\text{.}\) Then, we can write:
\begin{equation*} x^2+4x+5 = \overbrace{(x+2)^2}^{x^2+4x+4}+1\text{.} \end{equation*}
(d)
There is an intuitive substitution to pick, since we now have more obvious composition. Pick it. What kind of integral do we end up with and how do we antidifferentiate? Complete this problem!
Solution.
\begin{align*} \int \frac{4}{x^2+4x+5}\;dx \amp = \int \frac{4}{(x+4)^2+1}\;dx\\ u = x+4 \;\;\amp \;\;du=dx \\ \int \frac{4}{(x+4)^2+1}\;dx \amp = \int \frac{4}{u^2+1}\;du\\ \amp = 4\tan^{-1}(u)+C\\ \amp =4\tan^{-1}(x+4)+C \end{align*}
Going forward, when you see a quadratic denominator in a rational function, what are some things you can think about and strategies you can use, based on what the rest of the function looks like? We want to summarize this a bit!

Integrating Rational Functions.

If \(f(x)=\dfrac{p_n(x)}{p_m(x)}\) where \(p_n(x)\) is a degree \(n\) polynomial and \(p_m(x)\) is a degree \(m\) polynomial, then we can think about how we might integrate \(\displaystyle \int f(x)\;dx\) based on degrees.
  • If \(n\geq m\) (the degree in the numerator is at least the degree in the denominator), then we can use long division to write \(f(x)\) as some polynomial with degree \(n-m\) and some remainder.
  • If \(n=m-1\) (the degree of the numerator is one less than the degree of the denominator), then we can try a \(u\)-substitution where \(u=p_m(x)\text{,}\) since the derivative of \(p_m(x)\) is a polynomial of degree \(n\text{.}\) If this substitution works, we can antidifferentiate to get some sort of logarithm.
    This is not guaranteed to work, but for now (without other strategies), this is something we can think about.
  • If we can reduce \(f(x)\) (through some transformation or substitution) to a rational function that is a constant term divided by quadratic function (or if it already is), then we can complete the square in the denominator to get to a form that can be antidifferentiated to an inverse tangent function.
In the last point, we are referencing the strategy we found in Activity 7.3.3. We have a bit more of a general version of this strategy.

Proof.

This is really just based on a clever substitution. Once we see this specific constant over a sum of squares, we can factor out a convenient coefficient to force the denominator to look like a sum of something squared and 1.
\begin{align*} \int \frac{1}{u^2+a^2}\;du \amp= \frac{1}{a^2}\int \frac{1}{\frac{u^2}{a^2}+1} \;du\\ \amp = \frac{1}{a^2}\int \frac{1}{\left(\frac{u}{a}\right)^2+1}\;du \end{align*}
Now we can let \(w=\frac{u}{a}\) and \(dw=\frac{1}{a}\;du\text{.}\)
\begin{align*} \frac{1}{a^2}\int \frac{1}{\left(\frac{u}{a}\right)^2+1}\;du \amp = \frac{1}{a}\int \frac{1}{\left(\frac{u}{a}\right)^2+1}\left(\frac{1}{a}\right)\;du\\ \amp =\frac{1}{a}\int \frac{1}{w^2+1}\;dw\\ \amp = \frac{1}{a}\tan^{-1}(w)+C\\ \amp = \frac{1}{a}\tan^{-1}\left(\frac{u}{a}\right)+C \end{align*}
This strategy also can be used for other inverse trigonometric derivatives. But we will use the inverse tangent form most of all, and thus we want to outline it fully.
We have much more to talk about with integration. From here, we can move on to more systematic strategies — ones that have some goals based on familiar things like operations that we might notice or specific variable substitutions that can be useful.

Practice Problems Practice Problems

1.

Use polynomial division or some clever factoring to rewrite and find the following indefinite integrals or evaluate the following definite integrals.
(a)
\(\dint \left(\dfrac{x+4}{x-3}\right)\;dx\)
(b)
\(\dint \left(\dfrac{x^2+4}{x-4}\right)\;dx\)
(c)
\(\dint \left(\dfrac{t^2+t+6}{t^2+1}\right)\;dt\)
(d)
\(\dint_{x=2}^{x=4}\left(\dfrac{x^3+1}{x-1}\right)\;dx\)
(e)
\(\dint_{x=0}^{x=1} \left(\dfrac{x^4+1}{x^2+1}\right)\;dx\)

2.

Complete the square in order to find the following indefinite integrals.
(a)
\(\dint\left( \dfrac{1}{x^2-2x+10} \right)\;dx\)
(b)
\(\dint\left( \dfrac{x}{x^2+4x+8} \right)\;dx\)
(c)
\(\dint \left( \dfrac{2x}{x^4+6x^2+10} \right)\;dx\)

3.

Find the following indefinite integrals.
(a)
\(\dint\left(\dfrac{1}{x^{-1}+1}\right)\;dx\)
(b)
\(\dint\left(\dfrac{\sin(\theta)+\tan(\theta)}{\cos^2(\theta)}\right)\;d\theta\)
(c)
\(\dint\left(\dfrac{1-x}{1-\sqrt{x}}\right)\;dx\)
(d)
\(\dint\left(\dfrac{1}{1-\sin^2(\theta)}\right)\;d\theta\)
(e)
\(\dint\left( \dfrac{x^{2/3}-x^3}{x^{1/4}} \right)\;dx\)
(f)
\(\dint\left(\dfrac{4+x}{\sqrt{1-x^2}}\right)\;dx\)