Subsection 1.4.1 Substitution
In the previous section we explored the fundamental theorem of calculus and the link it provides between definite integrals and antiderivatives. Indeed, integrals with simple integrands are usually evaluated via this link. In this section we start to explore methods for integrating more complicated integrals. We have already seen — via Theorem
1.2.1 — that integrals interact very nicely with addition, subtraction and multiplication by constants:
\begin{align*}
\int_a^b \left( Af(x) + B g(x) \right) \dee{x} &= A\int_a^b f(x)\dee{x} + B\int_a^b g(x)\dee{x}
\end{align*}
for
\(A,B\) constants. By combining this with the list of indefinite integrals in Theorem
1.3.17, we can compute integrals of linear combinations of simple functions. For example
\begin{align*}
\int_1^4\left(e^x - 2\sin x + 3x^2 \right)\dee{x} &= \int_1^4e^x\dee{x} -2\int_1^4 \sin x \dee{x} +3 \int_1^4x^2 \dee{x}\\
&= \left(e^x + (-2)\cdot(-\cos x) + 3\frac{x^3}{3} \right)\bigg|_1^4 &\text{and so on}
\end{align*}
Of course there are a great many functions that can be approached in this way, however there are some very simple examples that cannot.
\begin{align*}
\int \sin(\pi x) \dee{x} && \int x e^x \dee{x} && \int \frac{x}{x^2-5x+6}\dee{x}
\end{align*}
In each case the integrands are not linear combinations of simpler functions; in order to compute them we need to understand how integrals (and antiderivatives) interact with compositions, products and quotients. We reached a very similar point in our differential calculus course where we understood the linearity of the derivative,
\begin{align*}
\diff{}{x}\left(Af(x)+ Bg(x)\right) &= A\diff{f}{x} + B\diff{g}{x},
\end{align*}
but had not yet seen the chain, product and quotient rules . While we will develop tools to find the second and third integrals in later sections, we should really start with how to integrate compositions of functions.
It is important to state up front, that in general one cannot write down the integral of the composition of two functions — even if those functions are simple. This is not because the integral does not exist. Rather it is because the integral cannot be written down as a finite combination of the standard functions we know. A very good example of this, which we encountered in Example
1.3.4, is the composition of
\(e^x\) and
\(-x^2\text{.}\) Even though we know
\begin{align*}
\int e^x \dee{x} &= e^x+C & \text{and}&& \int -x^2 \dee{x} &= -\frac13 x^3 +C
\end{align*}
there is no simple function that is equal to the indefinite integral
\begin{gather*}
\int e^{-x^2}\dee{x}.
\end{gather*}
even though the indefinite integral exists. In this way integration is very different from differentiation.
With that caveat out of the way, we can introduce the substitution rule. The substitution rule is obtained by antidifferentiating the chain rule. In some sense it is the chain rule in reverse. For completeness, let us restate the chain rule:
Theorem 1.4.1. The chain rule.
Let \(F(u)\) and \(u(x)\) be differentiable functions and form their composition \(F(u(x))\text{.}\) Then
\begin{align*}
\diff{}{x} F\big( u( x) \big) &= F'\big(u(x)\big) \cdot u'(x)
\end{align*}
Equivalently, if \(y(x)=F(u(x))\text{,}\) then
\begin{align*}
\diff{y}{x} &= \diff{F}{u} \cdot \diff{u}{x}.
\end{align*}
Consider a function \(f(u)\text{,}\) which has antiderivative \(F(u)\text{.}\) Then we know that
\begin{align*}
\int f(u) \dee{u} &= \int F'(u) \dee{u} = F(u) +C
\end{align*}
Now take the above equation and substitute into it \(u=u(x)\) — i.e. replace the variable \(u\) with any (differentiable) function of \(x\) to get
\begin{align*}
\int f(u) \dee{u}\bigg|_{u=u(x)} &= F(u(x)) +C
\end{align*}
But now the right-hand side is a function of \(x\text{,}\) so we can differentiate it with respect to \(x\) to get
\begin{align*}
\diff{}{x} F(u(x)) &= F'(u(x)) \cdot u'(x)
\end{align*}
This tells us that \(F(u(x))\) is an antiderivative of the function \(F'(u(x))\cdot u'(x) = f(u(x))u'(x)\text{.}\) Thus we know
\begin{align*}
\int f\big(u(x)\big) \cdot u'(x)\,\dee{x} &= F\big(u(x)\big) +C = \int f(u)\,\dee{u}\bigg|_{u=u(x)}
\end{align*}
This is the substitution rule for indefinite integrals.
Theorem 1.4.2. The substitution rule — indefinite integral version.
For any differentiable function \(u(x)\text{:}\)
\begin{align*}
\int f(u(x)) u'(x) \dee{x} &= \int f(u)\dee{u}\bigg|_{u=u(x)}
\end{align*}
In order to apply the substitution rule successfully we will have to write the integrand in the form \(f(u(x))\cdot u'(x)\text{.}\) To do this we need to make a good choice of the function \(u(x)\text{;}\) after that it is not hard to then find \(f(u)\) and \(u'(x)\text{.}\) Unfortunately there is no one strategy for choosing \(u(x)\text{.}\) This can make applying the substitution rule more art than science . Here we suggest two possible strategies for picking \(u(x)\text{:}\)
Factor the integrand and choose one of the factors to be \(u'(x)\text{.}\) For this to work, you must be able to easily find the antiderivative of the chosen factor. The antiderivative will be \(u(x)\text{.}\)
Look for a factor in the integrand that is a function with an argument that is more complicated than just “\(x\)”. That factor will play the role of \(f\big(u(x)\big)\) Choose \(u(x)\) to be the complicated argument.
Here are two examples which illustrate each of those strategies in turn.
Example 1.4.3. \(\int 9\sin^8(x) \cos(x) \dee{x}\).
Consider the integral
\begin{gather*}
\int 9\sin^8(x) \cos(x) \dee{x}
\end{gather*}
We want to massage this into the form of the integrand in the substitution rule — namely \(f(u(x))\cdot u'(x)\text{.}\) Our integrand can be written as the product of the two factors
\begin{gather*}
\underbrace{9 \sin^8(x)}_\text{first factor} \cdot \underbrace{\cos(x)}_\text{second factor}
\end{gather*}
and we start by determining (or guessing) which factor plays the role of \(u'(x)\text{.}\) We can choose \(u'(x)=9\sin^8(x)\) or \(u'(x)=\cos(x)\text{.}\)
So we go with the second choice. Set \(u'(x)=\cos(x), u(x)=\sin(x)\text{,}\) then
\begin{align*}
\int 9\sin^8(x) \cos(x) \dee{x}
&= \int 9u(x)^8 \cdot u'(x) \dee{x}\\
&= \int 9u^8 \dee{u} \bigg|_{u=\sin(x)} & \text{by the substitution rule}\\
\end{align*}
We are now left with the problem of antidifferentiating a monomial; this we can do with Theorem 1.3.17.
\begin{align*}
&= \left( u^9 +C \right)\bigg|_{u=\sin(x)}\\
&= \sin^9(x) +C
\end{align*}
Note that \(9\sin^8(x) \cos(x)\) is a function of \(x\text{.}\) So our answer, which is the indefinite integral of \(9\sin^8(x) \cos(x)\text{,}\) must also be a function of \(x\text{.}\) This is why we have substituted \(u=\sin(x)\) in the last step of our solution — it makes our solution a function of \(x\text{.}\)
Example 1.4.4. \(\int 3x^2 \cos(x^3) \dee{x}\).
Evaluate the integral
\begin{gather*}
\int 3x^2 \cos(x^3) \dee{x}
\end{gather*}
Solution: Again we are going to use the substitution rule and helpfully our integrand is a product of two factors
\begin{gather*}
\underbrace{3x^2}_\text{first factor} \cdot \underbrace{\cos(x^3)}_\text{second factor}
\end{gather*}
The second factor, \(\cos\big(x^3\big)\) is a function, namely \(\cos\text{,}\) with a complicated argument, namely \(x^3\text{.}\) So we try \(u(x)= x^3\text{.}\) Then \(u'(x) = 3x^2\text{,}\) which is the other factor in the integrand. So the integral becomes
\begin{align*}
\int 3x^2 \cos(x^3) \dee{x} &= \int u'(x) \cos\big(u(x)\big) \dee{x} &\text{just swap order of factors}\\
&= \int \cos\big(u(x)\big) u'(x) \dee{x} & \text{by the substitution rule}\\
&= \int \cos(u) \dee{u}\bigg|_{u=x^3}\\
&= \left( \sin(u) + C\right)\bigg|_{u=x^3} & \text{using Theorem }\knowl{./knowl/xref/thm_imp_indef_int.html}{\text{1.3.17}})\\
&= \sin(x^3)+C
\end{align*}
One more — we’ll use this to show how to use the substitution rule with definite integrals.
Example 1.4.5. \(\int_0^1 e^x\sin(e^x)\dee{x}\).
Compute
\begin{gather*}
\int_0^1 e^x\sin\big(e^x\big)\dee{x}.
\end{gather*}
Solution: Again we use the substitution rule.
The integrand is again the product of two factors and we can choose \(u'(x)=e^x\) or \(u'(x)=\sin(e^x)\text{.}\)
If we choose \(u'(x)=e^x\) then \(u(x)=e^x\) and the other factor becomes \(\sin(u)\) — this looks promising. Notice that if we applied the other strategy of looking for a complicated argument then we would arrive at the same choice.
So we try
\(u'(x)=e^x\) and
\(u(x)=e^x\text{.}\) This gives (if we ignore the limits of integration for a moment)
\begin{align*}
\int e^x \sin\big(e^x\big)\dee{x}
&= \int \sin\big(u(x)\big) u'(x) \dee{x} &\text{apply the substitution rule}\\
&= \int \sin(u)\dee{u} \bigg|_{u=e^x}\\
&= \left(-\cos(u)+C \right)\bigg|_{u=e^x}\\
&= -\cos\big(e^x\big) +C
\end{align*}
But what happened to the limits of integration? We can incorporate them now. We have just shown that the indefinite integral is
\(-\cos(e^x)\text{,}\) so by the fundamental theorem of calculus
\begin{align*}
\int_0^1 e^x\sin\big(e^x\big)\dee{x}
&= \big[-\cos\big(e^x\big)\big]_0^1\\
&= -\cos(e^1)-(-\cos(e^0))\\
&= -\cos(e)+\cos(1)
\end{align*}
Theorem
1.4.2, the substitution rule for indefinite integrals, tells us that if
\(F(u)\) is any antiderivative for
\(f(u)\text{,}\) then
\(F\big(u(x)\big)\) is an antiderivative for
\(f\big(u(x)\big) u'(x)\text{.}\) So the fundamental theorem of calculus gives us
\begin{align*}
\int_a^b f\big(u(x)\big) u'(x)\,\dee{x} &= F\big(u(x)\big)\bigg|_{x=a}^{x=b}\\
&= F\big(u(b)\big) - F\big(u(a)\big)\\
&= \int_{u(a)}^{u(b)} f(u)\,\dee{u} & \text{since $F(u)$ is an antiderivative for $f(u)$}
\end{align*}
and we have just found
Theorem 1.4.6. The substitution rule — definite integral version.
For any differentiable function \(u(x)\text{:}\)
\begin{align*}
\int_a^b f(u(x)) u'(x) \dee{x} &= \int_{u(a)}^{u(b)} f(u)\dee{u}
\end{align*}
Notice that to get from the integral on the left hand side to the integral on the right hand side you
substitute \(u(x)\rightarrow u\) and \(u'(x)\dee{x}\rightarrow \dee{u}\text{,}\)
set the lower limit for the \(u\) integral to the value of \(u\) (namely \(u(a)\)) that corresponds to the lower limit of the \(x\) integral (namely \(x=a\)), and
set the upper limit for the \(u\) integral to the value of \(u\) (namely \(u(b)\)) that corresponds to the upper limit of the \(x\) integral (namely \(x=b\)).
Also note that we now have two ways to evaluate definite integrals of the form \(\int_a^b f\big(u(x)\big)u'(x)\,\dee{x}\text{.}\)
We can find the indefinite integral
\(\int f\big(u(x)\big) u'(x)\,\dee{x}\text{,}\) using Theorem
1.4.2, and then evaluate the result between
\(x=a\) and
\(x=b\text{.}\) This is what was done in Example
1.4.5.
Or we can apply Theorem
1.4.2. This entails finding the indefinite integral
\(\int f(u)\,\dee{u}\) and evaluating the result between
\(u=u(a)\) and
\(u=u(b)\text{.}\) This is what we will do in the following example.
Example 1.4.7. \(\int_0^1 x^2\sin(x^3+1)\dee{x}\).
Compute
\begin{gather*}
\int_0^1 x^2\sin\big(x^3+1\big)\dee{x}
\end{gather*}
Solution:
In this example the integrand is already neatly factored into two pieces. While we could deploy either of our two strategies, it is perhaps easier in this case to choose \(u(x)\) by looking for a complicated argument.
The second factor of the integrand is \(\sin\big(x^3+1\big)\text{,}\) which is the function \(\sin\) evaluated at \(x^3+1\text{.}\) So set \(u(x)=x^3+1\text{,}\) giving \(u'(x)=3x^2\) and \(f(u)=\sin(u)\)
The first factor of the integrand is
\(x^2\) which is not quite
\(u'(x)\text{,}\) however we can easily massage the integrand into the required form by multiplying and dividing by
\(3\text{:}\)
\begin{align*}
x^2\sin\big(x^3+1\big) &= \frac{1}{3} \cdot 3x^2\cdot \sin\big(x^3+1\big).
\end{align*}
We want this in the form of the substitution rule, so we do a little massaging:
\begin{align*}
\int_0^1 x^2\sin\big(x^3+1\big)\dee{x}
&= \int_0^1 \frac{1}{3}\cdot 3x^2 \cdot \sin\big(x^3+1\big)\dee{x}\\
&= \frac{1}{3}\int_0^1 \sin\big(x^3+1\big)\cdot 3x^2 \dee{x}\\
&\hskip1.5in\text{by Theorem }\knowl{./knowl/xref/thm_Intarith.html}{\text{1.2.1}}\text{(c)}
\end{align*}
Now we are ready for the substitution rule:
\begin{align*}
\frac{1}{3}\int_0^1 \sin\big(x^3+1\big)\cdot 3x^2 \dee{x}
&=\frac{1}{3}\int_0^1 \underbrace{\sin\big(x^3+1\big)}_{=f(u(x))}\cdot
\underbrace{3x^2}_{=u'(x)} \dee{x}\\
\end{align*}
Now set \(u(x)=x^3+1\) and \(f(u)=\sin(u)\)
\begin{align*}
&= \frac{1}{3}\int_0^1 f(u(x)) u'(x) \dee{x}\\
&= \frac{1}{3} \int_{u(0)}^{u(1)} f(u) \dee{u} & \text{by the substitution rule}\\
&= \frac{1}{3} \int_{1}^{2} \sin(u) \dee{u} & \text{since $u(0)=1$ and
$u(1)=2$}\\
&= \frac{1}{3} \big[-\cos(u)\big]_1^2\\
&= \frac{1}{3}\big( -\cos(2) -(-\cos(1)) \big)\\
&= \frac{\cos(1)-\cos(2)}{3}.
\end{align*}
There is another, and perhaps easier, way to view the manipulations in the previous example. Once you have chosen \(u(x)\) you
make the substitution \(u(x) \rightarrow u\text{,}\)
replace \(\dee{x} \rightarrow \dfrac{1}{u'(x)} \dee{u}\text{.}\)
In so doing, we take the integral
\begin{align*}
\int_a^b f(u(x)) \cdot u'(x) \dee{x}
&= \int_{u(a)}^{u(b)} f(u) \cdot u'(x) \cdot \frac{1}{u'(x)} \dee{u}\\
&= \int_{u(a)}^{u(b)} f(u) \dee{u} & \text{exactly the substitution rule}
\end{align*}
but we do not have to manipulate the integrand so as to make \(u'(x)\) explicit. Let us redo the previous example by this approach.
Example 1.4.8. Example 1.4.7 revisited.
Compute the integral
\begin{gather*}
\int_0^1 x^2\sin\big(x^3+1\big)\dee{x}
\end{gather*}
Example 1.4.9. Some more substitutions.
Compute the indefinite integrals
\begin{align*}
\int \sqrt{2x+1}\dee{x} && \text{and} && \int e^{3x-2}\dee{x}
\end{align*}
This last example illustrates that substitution can be used to easily deal with arguments of the form \(ax+b\) (with \(a,b\) constants and \(a\ne 0\)), i.e. that are linear functions of \(x\text{,}\) and suggests the following theorem.
Theorem 1.4.10.
Let \(F(u)\) be an antiderivative of \(f(u)\) and let \(a,b\) be constants with \(a\ne 0\text{.}\) Then
\begin{align*}
\int f(ax+b)\dee{x} &= \frac{1}{a} F(ax+b) +C
\end{align*}
Proof.
We can show this using the substitution rule. Let \(u(x)=ax+b\) so \(u'(x)=a\text{,}\) then
\begin{align*}
\int f(ax+b) \dee{x}
&= \int f(u) \cdot \frac{1}{u'(x)}\dee{u}\\
&= \int \frac{1}{a} f(u) \dee{u}\\
&= \frac{1}{a} \int f(u) \dee{u} & \text{since $a$ is a constant}\\
&= \frac{1}{a} F(u)\bigg|_{u=ax+b} +C & \text{since $F(u)$ is an antiderivative of
$f(u)$}\\
&= \frac{1}{a} F(ax+b) +C.
\end{align*}
Now we can do the following example using the substitution rule or the above theorem:
Example 1.4.11. \(\int_0^{\frac{\pi}{2}}\cos(3x)\dee{x}\).
Compute \(\int_0^{\frac{\pi}{2}}\cos(3x)\dee{x}\text{.}\)
In this example we should set
\(u=3x\text{,}\) and substitute
\(\dee{x} \rightarrow \frac{1}{u'(x)}\dee{u} = \frac{1}{3}\dee{u}.\) When we do this we also have to convert the limits of the integral:
\(u(0)=0\) and
\(u(\pi/2)=3\pi/2\text{.}\) This gives
\begin{align*}
\int_0^{\frac{\pi}{2}}\cos(3x)\dee{x}
&= \int_0^{\frac{3\pi}{2}} \cos(u) \frac{1}{3}\dee{u}\\
&= \left[\frac{1}{3} \sin(u) \right]_0^{\frac{3\pi}{2}}\\
&= \frac{\sin(3\pi/2)-\sin(0)}{3}\\
&= \frac{-1-0}{3} = - \frac{1}{3}.
\end{align*}
We can also do this example more directly using the above theorem. Since
\(\sin(x)\) is an antiderivative of
\(\cos(x)\text{,}\) Theorem
1.4.10 tells us that
\(\frac{\sin(3x)}{3}\) is an antiderivative of
\(\cos(3x)\text{.}\) Hence
\begin{align*}
\int_0^{\frac{\pi}{2}}\cos(3x)\dee{x}
&= \left[ \frac{\sin(3x)}{3} \right]_0^{\frac{\pi}{2}}\\
&= \frac{\sin(3\pi/2)-\sin(0)}{3}\\
&= -\frac{1}{3}.
\end{align*}
The rest of this section is just more examples of the substitution rule. We recommend that you after reading these that you practice many examples by yourself under exam conditions.
Example 1.4.12. \(\int_0^1 x^2\sin(1-x^3)\dee{x}\).
This integral looks a lot like that of Example
1.4.7. It makes sense to try
\(u(x)=1-x^3\) since it is the argument of
\(\sin(1-x^3)\text{.}\) We
substitute \(u=1-x^3\) and
replace \(\dee{x}\) with \(\frac{1}{u'(x)}\dee{u} = \frac{1}{-3x^2}\dee{u}\text{,}\)
when \(x=0\text{,}\) we have \(u=1-0^3=1\) and
when \(x=1\text{,}\) we have \(u=1-1^3=0\text{.}\)
So
\begin{align*}
\int_0^1 x^2 \sin\big(1-x^3\big)\cdot \dee{x} &=\int_1^0 x^2 \sin(u) \cdot \frac{1}{-3x^2}\dee{u}\\
&= \int_1^0 -\frac{1}{3}\sin(u)\dee{u}.\\
\end{align*}
Note that the lower limit of the \(u\)-integral, namely \(1\text{,}\) is larger than the upper limit, which is \(0\text{.}\) There is absolutely nothing wrong with that. We can simply evaluate the \(u\)-integral in the normal way. Since \(-\cos(u)\) is an antiderivative of \(\sin(u)\text{:}\)
\begin{align*}
&= \left[\frac{\cos(u)}{3} \right]_1^0\\
&= \frac{\cos(0)-\cos(1)}{3}\\
&= \frac{1-\cos(1)}{3}.
\end{align*}
Example 1.4.13. \(\int_0^1\frac{1}{(2x+1)^3}\dee{x}\).
Compute \(\int_0^1\frac{1}{(2x+1)^3}\dee{x}\text{.}\)
We could do this one using Theorem
1.4.10, but its not too hard to do without. We can think of the integrand as the function “one over a cube” with the argument
\(2x+1\text{.}\) So it makes sense to substitute
\(u=2x+1\text{.}\) That is
set \(u=2x+1\) and
replace \(\dee{x} \rightarrow \frac{1}{u'(x)}\dee{u} = \frac{1}{2}\dee{u}\text{.}\)
When \(x=0\text{,}\) we have \(u=2\times 0+1=1\) and
when \(x=1\text{,}\) we have \(u=2\times 1+1=3\text{.}\)
So
\begin{align*}
\int_0^1\frac{1}{(2x+1)^3}\dee{x} &=\int_1^{3} \frac{1}{u^3} \cdot \frac{1}{2}\dee{u}\\
&=\frac{1}{2}\int_1^{3}u^{-3}\dee{u}\\
&=\frac{1}{2}\left[\frac{u^{-2}}{-2}\right]_1^{3}\\
&=\frac{1}{2}\left( \frac{1}{-2}\cdot \frac{1}{9} - \frac{1}{-2}\cdot\frac{1}{1} \right)\\
&=\frac{1}{2}\left( \frac{1}{2} - \frac{1}{18}\right) = \frac{1}{2}\cdot \frac{8}{18}\\
&=\frac{2}{9}
\end{align*}
Example 1.4.14. \(\int_0^1\frac{x}{1+x^2}\dee{x}\).
Evaluate \(\int_0^1\frac{x}{1+x^2}\dee{x}\text{.}\)
Solution:
Remember that we are using the notation “\(\log\)” for the natural logarithm, i.e. the logarithm with base \(e\text{.}\) You might also see it written as “\(\ln x\)”, or with the base made explicit as “\(\log_e x\)”.
Example 1.4.15. \(\int x^3\cos\big(x^4+2\big)\dee{x}\).
Compute the integral \(\int x^3\cos\big(x^4+2\big)\dee{x}\text{.}\)
Solution:
The integrand is the product of \(\cos\) evaluated at the argument \(x^4+2\) times \(x^3\text{,}\) which aside from a factor of \(4\text{,}\) is the derivative of the argument \(x^4+2\text{.}\)
Hence we set \(u=x^4+2\) and then substitute \(\dee{x} \rightarrow \frac{1}{u'(x)}\dee{u} = \frac{1}{4x^3}\dee{u}\text{.}\)
Before proceeding further, we should note that this is an indefinite integral so we don’t have to worry about the limits of integration. However we do need to make sure our answer is a function of \(x\) — we cannot leave it as a function of \(u\text{.}\)
With this choice of
\(u\text{,}\) the integral then becomes
\begin{align*}
\int x^3\cos\big(x^4+2\big)\dee{x} &= \int x^3 \cos(u) \frac{1}{4x^3}\dee{u} \bigg|_{u=x^4+2}\\
&= \int\frac{1}{4} \cos(u) \dee{u} \bigg|_{u=x^4+2}\\
&= \left(\frac{1}{4}\sin(u)+C\right)\bigg|_{u=x^4+2}\\
&= \frac{1}{4}\sin(x^4+2) +C.
\end{align*}
The next two examples are more involved and require more careful thinking.
Example 1.4.16. \(\int \sqrt{1+x^2}\,x^3\dee{x}\).
Compute \(\int \sqrt{1+x^2}\,x^3\dee{x}\text{.}\)
Example 1.4.17. \(\int \tan x\dee{x}\).
Evaluate the indefinite integral \(\int \tan(x) \dee{x}\text{.}\)
Solution:
At first glance there is nothing to manipulate here and so very little to go on. However we can rewrite \(\tan x\) as \(\frac{\sin x}{\cos x}\text{,}\) making the integral \(\int \frac{\sin x}{\cos x}\dee{x}\text{.}\) This gives us more to work with.
Now think of the integrand as being the product \(\frac{1}{\cos x}\cdot \sin x\text{.}\) This suggests that we set \(u=\cos x\) and that we interpret the first factor as the function “one over” evaluated at \(u=\cos x\text{.}\)
Substitute
\(u = \cos x\) and
\(\dee{x} \rightarrow \frac{1}{-\sin x}\dee{u}\) to give:
\begin{align*}
\int \frac{\sin x}{\cos x}\dee{x}
&=\int \frac{\sin x}{u} \frac{1}{-\sin x} \dee{u} \bigg|_{u=\cos x}\\
&= \int -\frac{1}{u}\dee{u} \bigg|_{u=\cos x}\\
&= -\log|\cos x| +C & \text{and if we want to go further}\\
&= \log\left|\frac{1}{\cos x} \right|+C\\
&= \log|\sec x| +C.
\end{align*}
In all of the above substitution examples we expressed the new integration variable,
\(u\text{,}\) as a function,
\(u(x)\text{,}\) of the old integration variable
\(x\text{.}\) It is also possible to express the old integration variable,
\(x\text{,}\) as a function,
\(x(u)\text{,}\) of the new integration variable
\(u\text{.}\) We shall see examples of this in Section
1.9.