forked from APEXCalculus/APEXCalculus_Source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path06_Trig_Sub.tex
364 lines (335 loc) · 20.8 KB
/
06_Trig_Sub.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
% the following was taken from u-substitution
%\subsection{Substitution and Inverse Trigonometric Functions}
%
%%In \autoref{sec:deriv_inverse_function}
%When studying derivatives of inverse functions, we learned that
%\[\frac{\dd}{\dd x}\bigl(\tan^{-1}x\bigr) = \frac{1}{1+x^2}.\]
%Applying the Chain Rule to this is not difficult; for instance,
%\[\frac{\dd}{\dd x}\bigl(\tan^{-1}5x\bigr) = \frac{5}{1+25x^2}.\]
%We now explore how Substitution can be used to ``undo'' certain derivatives that are the result of the Chain Rule applied to Inverse Trigonometric functions. We begin with an example.
%
%\begin{example}[Integrating by substitution: inverse trigonometric functions]\label{ex_subst14}
%Evaluate $\ds \int \frac{1}{25+x^2}\dd x$.
%\solution
%The integrand looks similar to the derivative of the arctangent function. Note:
%\begin{align*}
%\frac{1}{25+x^2} &= \frac{1}{25(1+\frac{x^2}{25})}\\
% &= \frac{1}{25(1+\left(\frac{x}{5}\right)^2)} \\
% &= \frac{1}{25}\frac{1}{1+\left(\frac{x}{5}\right)^2}\ .
%\end{align*}
%Thus
%\[\int\frac{1}{25+x^2}\dd x = \frac{1}{25}\int \frac{1}{1+\left(\frac{x}{5}\right)^2}\dd x.\]
%This can be integrated using Substitution. Set $u = x/5$, hence $du = \dd x/5$ or $\dd x=5du$. Thus
%\begin{align*}
% \int\frac{1}{25+x^2}\dd x
% &= \frac{1}{25}\int \frac{1}{1+\left(\frac{x}{5}\right)^2}\dd x \\
% &= \frac15\int \frac{1}{1+u^2}\dd u \\
% &= \frac15\tan^{-1}u + C \\
% &= \frac15\tan^{-1}\left(\frac x5\right)+C
%\end{align*}
%\end{example}
%
%\autoref{ex_subst14} demonstrates a general technique that can be applied to other integrands that result in inverse trigonometric functions. The results are summarized here.
%
%% moved to 7.2
%
%Let's practice using \autoref{thm:int_inverse_trig}.\bigskip
%
%\begin{example}[Integrating by substitution: inverse trigonometric functions]\label{ex_subst15}
%Evaluate the given indefinite integrals.
%\[\int \frac{1}{9+x^2}\dd x,\quad \int \frac{1}{x\sqrt{x^2-\frac{1}{100}}}\dd x\quad \text{ and }\quad \int \frac{1}{\sqrt{5-x^2}}\dd x.\]
%\solution
%Each can be answered using a straightforward application of \autoref{thm:int_inverse_trig}.
%\begin{gather*}
%\int \frac{1}{9+x^2}\dd x = \frac13\tan^{-1} \frac x3 + C,\text{ as }a=3.
%\int\frac1{x\sqrt{x^2-\frac1{100}}}\dd x=10\sec^{-1}10x+C,\text{ as }a=\frac1{10}.
%\int \frac{1}{\sqrt{5-x^2}} = \sin^{-1}\frac{x}{\sqrt{5}}+C,\text{ as }a = \sqrt{5}.
%\end{example}
%
%Most applications of \autoref{thm:int_inverse_trig} are not as straightforward. The next examples show some common integrals that can still be approached with this theorem.
%
%\begin{example}[Integrating by substitution: completing the square]\label{ex_subst16}
%Evaluate $\ds \int\frac{1}{x^2-4x+13}\dd x$.
%\solution
%Initially, this integral seems to have nothing in common with the integrals in \autoref{thm:int_inverse_trig}. As it lacks a square root, it almost certainly is not related to arcsine or arcsecant. It is, however, related to the arctangent function.
%
%We see this by \emph{completing the square} in the denominator. We give a brief reminder of the process here.
%
%Start with a quadratic with a leading coefficient of 1. It will have the form of $x^2 + bx + c$. Take 1/2 of $b$, square it, and add/subtract it back into the expression. I.e.,
%\begin{align*}
% x^2+bx+ c
% &= \underbrace{x^2 + bx + \frac{b^2}4}_{(x+b/2)^2} - \frac{b^2}4 + c\\
% &= \left(x+\frac b2\right)^2 + c-\frac{b^2}4
%\end{align*}
%In our example, we take half of $-4$ and square it, getting $4$. We add/subtract it into the denominator as follows:
%
%\begin{align*}
% \frac{1}{x^2-4x+13}
% &= \frac{1}{\underbrace{x^2-4x+4}_{(x-2)^2}-4+13}\\
% &=\frac{1}{(x-2)^2 + 9}
%\end{align*}
%We can now integrate this using the arctangent rule. Technically, we need to substitute first with $u=x-2$, but by now we can do this easily. Thus we have
%\[
%\int \frac{1}{x^2-4x+13}\dd x
%= \int \frac{1}{(x-2)^2+9}\dd x
%= \frac13\tan^{-1}\frac{x-2}{3}+C.
%\]
%\end{example}
%
%\begin{example}[Integrals requiring multiple methods]\label{ex_subst17}
%Evaluate $\ds \int \frac{4-x}{\sqrt{16-x^2}}\dd x$.
%\solution
%This integral requires two different methods to evaluate it. We get to those methods by splitting up the integral:
%\[
%\int \frac{4-x}{\sqrt{16-x^2}}\dd x
%= \int \frac{4}{\sqrt{16-x^2}}\dd x - \int \frac{x}{\sqrt{16-x^2}}\dd x.
%\]
%The first integral is handled using a straightforward application of \autoref{thm:int_inverse_trig}; the second integral is handled by substitution, with $u = 16-x^2$. We handle each separately.
%\[\int \frac{4}{\sqrt{16-x^2}}\dd x = 4\sin^{-1}\frac{x}{4} + C.\]
%For $\ds \int\frac{x}{\sqrt{16-x^2}}\dd x$, we set $u = 16-x^2$, so $du = -2x\dd x$ and $x\dd x = -du/2$. We have
%\begin{align*}
% \int\frac{x}{\sqrt{16-x^2}}\dd x
% &= \int\frac{-du/2}{\sqrt{u}}\\
% &= -\frac12\int \frac{1}{\sqrt{u}}\dd u \\
% &= - \sqrt{u} + C\\
% &= -\sqrt{16-x^2} + C.
%\end{align*}
%Combining these together, we have
%\[\int \frac{4-x}{\sqrt{16-x^2}}\dd x = 4\sin^{-1}\frac x4 + \sqrt{16-x^2}+C.\]
%\end{example}
\section{Trigonometric Substitution}\label{sec:trig_sub}
In \autoref{sec:def_int} we defined the definite integral as the ``signed area under the curve.'' In that section we had not yet learned the Fundamental Theorem of Calculus, so we evaluated special definite integrals which described nice, geometric shapes. For instance, we were able to evaluate
\begin{equation}
\int_{-3}^3\sqrt{9-x^2}\dd x = \frac{9\pi}{2}\label{eq:trigsub1}
\end{equation}
as we recognized that $f(x) = \sqrt{9-x^2}$ described the upper half of a circle with radius 3.
We have since learned a number of integration techniques, including Substitution and Integration by Parts, yet we are still unable to evaluate the above integral without resorting to a geometric interpretation. This section introduces Trigonometric Substitution, a method of integration that fills this gap in our integration skill. This technique works on the same principle as Substitution as found in \autoref{sec:substitution}, though it can feel ``backward.'' In \autoref{sec:substitution}, we set $u=f(x)$, for some function $f$, and replaced $f(x)$ with $u$. In this section, we will set $x=f(\theta)$, where $f$ is a trigonometric function, then replace $x$ with $f(\theta)$.
\youtubeVideo{yW6Odu0YHL0}{Trigonometric Substitution --- Example 3 / Part 1}
We start by demonstrating this method in evaluating the integral in \autoeqref{eq:trigsub1}. After the example, we will generalize the method and give more examples.
\begin{example}[Using Trigonometric Substitution]\label{ex_trigsub1}
Evaluate $\ds \int_{-3}^3\sqrt{9-x^2}\dd x$.
\solution
We begin by noting that $9\sin^2\theta + 9\cos^2\theta = 9$, and hence $9\cos^2\theta = 9-9\sin^2\theta$. If we let $x=3\sin\theta$, then $9-x^2 = 9-9\sin^2\theta = 9\cos^2\theta$.
Setting $x=3\sin \theta$ gives $\dd x = 3\cos\theta\dd\theta$. We are almost ready to substitute. We also change our bounds of integration. The bound $x=-3$ corresponds to $\theta = -\pi/2$ (for when $\theta = -\pi/2$, $x=3\sin \theta = -3$). Likewise, the bound of $x=3$ is replaced by the bound $\theta = \pi/2$. Thus
\begin{align*}
\int_{-3}^3\sqrt{9-x^2}\dd x
&= \int_{-\pi/2}^{\pi/2} \sqrt{9-9\sin^2\theta} (3\cos\theta)\dd\theta \\
&= \int_{-\pi/2}^{\pi/2} 3\sqrt{9\cos^2\theta} \cos\theta\dd\theta \\
&=\int_{-\pi/2}^{\pi/2} 3\abs{3\cos \theta} \cos\theta\dd\theta.
\intertext{On $[-\pi/2,\pi/2]$, $\cos \theta$ is always positive, so we can drop the absolute value bars, then employ a half-angle formula:}
&= \int_{-\pi/2}^{\pi/2} 9\cos^2 \theta\dd\theta\\
&= \int_{-\pi/2}^{\pi/2} \frac{9}{2}\bigl(1+\cos(2\theta)\bigr)\dd\theta\\
& = \frac92 \left.\left(\theta +\frac12\sin(2\theta)\right)\right|_{-\pi/2}^{\pi/2}= \frac92\pi.
\end{align*}
This matches our answer from before.
\end{example}
We now describe in detail Trigonometric Substitution. This method excels when dealing with integrands that contain $\sqrt{a^2-x^2}$, $\sqrt{x^2-a^2}$ and $\sqrt{x^2+a^2}$. The following Key Idea outlines the procedure for each case, followed by more examples.
% Each right triangle acts as a reference to help us understand the relationships between $x$ and $\theta$.
\begin{keyidea}[Trigonometric Substitution]\label{idea:trigsub}
\mbox{}\\[-2\baselineskip]\index{integration!trig. subst.}\begin{enumerate}[label=(\alph*)]
\item\label{trigsubsin} For integrands containing $\sqrt{a^2-x^2}$:\smallskip\\
Let $x=a\sin\theta$, \quad for $-\pi/2\leq \theta\leq \pi/2$ and $a>0$. \smallskip\\
On this interval, $\cos\theta\geq 0$, so $\sqrt{a^2-x^2} = a\cos\theta$
\item\label{trigsubtan} For integrands containing $\sqrt{x^2+a^2}$:\smallskip\\
Let $x=a\tan\theta$, \quad for $-\pi/2 < \theta < \pi/2$ and $a>0$. \smallskip\\
On this interval, $\sec\theta> 0$, so $\sqrt{x^2+a^2} = a\sec\theta$
\item\label{trigsubsec} For integrands containing $\sqrt{x^2-a^2}$:\smallskip\\
Let $x=a\sec\theta$, \quad restricting our work to where $x\geq a>0$,\\
so $x/a\geq 1$, and $0\leq\theta<\pi/2$. \smallskip\\
On this interval, $\tan\theta\geq 0$, so $\sqrt{x^2-a^2} = a\tan\theta$
\end{enumerate}
\end{keyidea}
\begin{example}[Using Trigonometric Substitution]\label{ex_trigsub3}
Evaluate $\ds \int \frac{1}{\sqrt{5+x^2}}\dd x$.
\solution
Using \autoref{idea:trigsub}\ref*{trigsubtan}, we recognize $a=\sqrt{5}$ and set $x= \sqrt{5}\tan \theta$. This makes $\dd x = \sqrt{5}\sec^2\theta\dd\theta$. We will use the fact that $\sqrt{5+x^2} = \sqrt{5+5\tan^2\theta} = \sqrt{5\sec^2\theta} = \sqrt{5}\sec\theta.$ Substituting, we have:
\begin{align*}
\int \frac{1}{\sqrt{5+x^2}}\dd x &= \int \frac{1}{\sqrt{5+5\tan^2\theta}}\sqrt{5}\sec^2\theta\dd\theta \\
&= \int \frac{\sqrt{5}\sec^2\theta}{\sqrt{5}\sec\theta} \dd\theta\\
&= \int \sec\theta\dd\theta\\
&= \ln\abs{\sec\theta+\tan\theta}+C.
\end{align*}
While the integration steps are over, we are not yet done. The original problem was stated in terms of $x$, whereas our answer is given in terms of $\theta$. We must convert back to $x$.
\mtable{A reference triangle for \autoref{ex_trigsub3}}{fig:tan_tri}{\begin{tikzpicture}
\draw [very thick] (0,0) -- node[below,pos=.5] {$\sqrt5$} (3,0)
-- node [right,pos=.5] {$x$} (3,2)
-- node [pos=.5,above,sloped] {$\sqrt{x^2+5}$} cycle;
\draw [thick] (2.7,0) -- (2.7,.3) -- (3,.3);
\draw (.75,.25) node {$\theta$};
\end{tikzpicture}}
The lengths of the sides of the reference triangle in \autoref{fig:tan_tri} are determined by the Pythagorean Theorem. With $x=\sqrt{5}\tan\theta$, we have
\[\tan \theta = \frac x{\sqrt{5}}\quad \text{and}\quad \sec\theta = \frac{\sqrt{x^2+5}}{\sqrt{5}}.\]
This gives\vspace{-.3\baselineskip}
\begin{align*}
\int\frac1{\sqrt{5+x^2}}\dd x
&= \ln\abs{\sec\theta+\tan\theta}+C \\
&= \ln\abs{\frac{\sqrt{x^2+5}}{\sqrt5}+ \frac x{\sqrt5}}+C.
\end{align*}
We can leave this answer as is, or we can use a logarithmic identity to simplify it. Note:\vspace{-.3\baselineskip}
\begin{align*}
\ln\abs{\frac{\sqrt{x^2+5}}{\sqrt5}+ \frac x{\sqrt5}}+C
&= \ln\abs{\frac1{\sqrt5}\left(\sqrt{x^2+5}+ x\right)}+C \\
&= \ln\abs{\frac1{\sqrt5}} + \ln\abs{\sqrt{x^2+5}+ x}+C\\
&= \ln\abs{\sqrt{x^2+5}+ x}+C,
\end{align*}
where the $\ln\bigl(1/\sqrt5\bigr)$ term is absorbed into the constant $C$. (In \autoref{sec:hyperbolic} we learned another way of approaching this problem.)
\end{example}
\begin{example}[Using Trigonometric Substitution]\label{ex_trigsub2}
Evaluate $\ds \int \sqrt{4x^2-1}\dd x$.
\solution
We start by rewriting the integrand so that it has the form $\sqrt{x^2-a^2}$ for some value of $a$:
\begin{align*}
\sqrt{4x^2-1} &= \sqrt{4\left(x^2-\frac14\right)}\\
&= 2\sqrt{x^2-\left(\frac12\right)^2}.
\end{align*}
So we have $a=1/2$, and following \autoref{idea:trigsub}\ref*{trigsubsec}, we set $x= \frac12\sec\theta$, and hence $\dd x = \frac12\sec\theta\tan\theta\dd\theta$. %The Key Idea also shows that $\sqrt{x^2-1/2^2} = \frac12\tan\theta$.
We now rewrite the integral with these substitutions:\vspace{-.3\baselineskip}
\begin{align*}
\int \sqrt{4x^2-1}\dd x &= \int 2\sqrt{x^2-\left(\frac12\right)^2}\dd x\\
&= \int 2\sqrt{\frac14\sec^2\theta - \frac14}
\left(\frac12\sec\theta\tan\theta\right)\dd\theta\\
&=\int \sqrt{\frac14(\sec^2\theta-1)}\Bigl(\sec\theta\tan\theta\Bigr)\dd\theta\\
&=\int\sqrt{\frac14\tan^2\theta}\Bigl(\sec\theta\tan\theta\Bigr)\dd\theta\\
&=\int \frac12\tan^2\theta\sec\theta\dd\theta\\
&=\frac12\int \Bigl(\sec^2\theta-1\Bigr)\sec\theta\dd\theta\\
&=\frac12\int \bigl(\sec^3\theta - \sec\theta\bigr)\dd\theta.
\end{align*}
We integrated $\sec^3\theta$ in \autoref{ex_trigint6}, finding its antiderivatives to be
\[
\int\sec^3\theta\dd\theta
=\frac12\Bigl(\sec\theta\tan\theta+\ln\abs{\sec\theta+\tan\theta}\Bigr)+C.
\]
Thus
\begin{align*}
\int &\sqrt{4x^2-1}\dd x\\
&=\frac12\int \bigl(\sec^3\theta-\sec\theta\bigr)\dd\theta\\
&= \frac12\left(\frac12\Bigl(\sec\theta\tan\theta
+\ln\abs{\sec\theta+\tan \theta}\Bigr)-\ln\abs{\sec\theta+\tan\theta}\right) + C\\
%\end{align*}
%\begin{align*}
&= \frac14\left(\sec\theta\tan\theta -\ln\abs{\sec\theta+\tan\theta}\right)+C.
\end{align*}
We are not yet done. Our original integral is given in terms of $x$, whereas our final answer, as given, is in terms of $\theta$. We need to rewrite our answer in terms of $x$. With $a=1/2$, and $x=\frac12\sec\theta$, we use the Pythagorean Theorem to determine the lengths of the sides of the reference triangle in \autoref{fig:sec_tri}.
\mtable[-\baselineskip]{A reference triangle for \autoref{ex_trigsub2}}{fig:sec_tri}{\begin{tikzpicture}
\draw [very thick] (0,0) -- node[below,pos=.5] {$1/2$} (3,0)
-- node [right,pos=.5] {$\sqrt{x^2-1/4}$} (3,2)
-- node [pos=.5,above] {$x$} cycle;
\draw [thick] (2.7,0) -- (2.7,.3) -- (3,.3);
\draw (.75,.25) node {$\theta$};
\end{tikzpicture}}
\[\tan \theta = \frac{\sqrt{x^2-\frac14}}{\frac12} = 2\sqrt{x^2-\frac14}\qquad \text{and}\qquad\sec\theta = 2x.\]
Therefore,
\begin{align*}
\int \sqrt{4x^2-1}\dd x
& =\frac14\Bigl(\sec\theta\tan\theta -\ln\abs{\sec\theta+\tan\theta}\Bigr)+C \\
&=\frac14\Bigl(2x\cdot 2\sqrt{x^2-\frac14} - \ln\abs{2x + 2\sqrt{x^2-\frac14}}\Bigr)+C\\
&= \frac14\Bigl(4x\sqrt{x^2-\frac14}-\ln\abs{2x + 2\sqrt{x^2-\frac14}}\Bigr)+C \\
& = \frac14\Bigl(2x\sqrt{4x^2-1} - \ln\abs{2x + \sqrt{4x^2-1}}\Bigr)+C.
\end{align*}
\end{example}
\begin{example}[Using Trigonometric Substitution]\label{ex_trigsub4}
Evaluate $\ds \int \frac{\sqrt{4-x^2}}{x^2}\dd x$.
\solution
We use \autoref{idea:trigsub}\ref*{trigsubsin} with $a=2$, $x=2\sin \theta$, $\dd x = 2\cos \theta d\theta$ and hence $\sqrt{4-x^2} = 2\cos\theta$. This gives
\begin{align*}
\int \frac{\sqrt{4-x^2}}{x^2}\dd x &= \int \frac{2\cos\theta}{4\sin^2\theta}(2\cos\theta)\dd\theta\\
&= \int \cot^2\theta\dd\theta\\
&= \int (\csc^2\theta -1)\dd\theta\\
&= -\cot\theta -\theta + C.
\end{align*}
%
\mtable{A reference triangle for \autoref{ex_trigsub4}}{fig:sin_tri}{\begin{tikzpicture}
\draw [very thick] (0,0) -- node[below,pos=.5] {$\sqrt{4-x^2}$} (3,0)
-- node [right,pos=.5] {$x$} (3,2) -- node [pos=.5,above] {$2$} cycle;
\draw [thick] (2.7,0) -- (2.7,.3) -- (3,.3);
\draw (.75,.25) node {$\theta$};
\end{tikzpicture}}%
%
We need to rewrite our answer in terms of $x$. Using the Pythagorean Theorem we determine the lengths of the sides of the reference triangle in \autoref{fig:sin_tri}. We have $\cot\theta = \sqrt{4-x^2}/x$ and $\theta = \sin^{-1}(x/2)$. Thus
\[\int \frac{\sqrt{4-x^2}}{x^2}\dd x = -\frac{\sqrt{4-x^2}}x-\sin^{-1}\left(\frac x2\right) + C.\]
\end{example}
Trigonometric Substitution can be applied in many situations, even those not of the form $\sqrt{a^2-x^2}$, $\sqrt{x^2-a^2}$ or $\sqrt{x^2+a^2}$. In the following example, we apply it to an integral we already know how to handle.
\begin{example}[Using Trigonometric Substitution]\label{ex_trigsub5}
Evaluate $\ds \int\frac1{x^2+1}\dd x$.
\solution
We know the answer already as $\tan^{-1}x+C$. We apply Trigonometric Substitution here to show that we get the same answer without inherently relying on knowledge of the derivative of the arctangent function.
Using \autoref{idea:trigsub}\ref*{trigsubtan}, let $x=\tan\theta$, $\dd x=\sec^2\theta\dd\theta$ and note that $x^2+1 = \tan^2\theta+1 = \sec^2\theta$. Thus
\begin{align*}
\int \frac1{x^2+1}\dd x &= \int \frac{1}{\sec^2\theta}\sec^2\theta\dd\theta \\
&= \int 1\dd\theta\\
&= \theta + C.
\end{align*}
Since $x=\tan \theta$, $\theta = \tan^{-1}x$, and we conclude that $\ds \int\frac1{x^2+1}\dd x = \tan^{-1}x+C.$
\end{example}
The next example is similar to the previous one in that it does not involve a square-root. It shows how several techniques and identities can be combined to obtain a solution.
\begin{example}[Using Trigonometric Substitution]\label{ex_trigsub7}
Evaluate $\ds\int\frac1{(x^2+6x+10)^2}\dd x$.
\solution
We start by completing the square, then make the substitution $u=x+3$, followed by the trigonometric substitution of $u=\tan\theta$:
\mnote{\textbf{Note:} Remember the sine and cosine double angle identities:
\begin{align*}
\sin2\theta &= 2\sin\theta\cos\theta\\
\cos2\theta &= \cos^2\theta-\sin^2\theta \\
&= 2\cos^2\theta-1 \\
&= 1-2\sin^2\theta
\end{align*}
They are often needed for writing your final answer in terms of $x$.}
\begin{align}
\int \frac1{(x^2+6x+10)^2}\dd x &=\int \frac1{\bigl((x+3)^2+1\bigr)^2}\dd x = \int \frac1{(u^2+1)^2}\dd u. \notag
\intertext{Now make the substitution $u=\tan\theta$, $\dd u=\sec^2\theta\dd\theta$:}
&= \int \frac1{(\tan^2\theta+1)^2}\sec^2\theta\dd\theta\notag\\
&= \int\frac 1{(\sec^2\theta)^2}\sec^2\theta\dd\theta\notag\\
&= \int \cos^2\theta\dd\theta.\notag
\intertext{Applying a half-angle formula, we have}
&= \int \left(\frac12 +\frac12\cos(2\theta)\right)\dd\theta \notag\\
&= \frac12\theta + \frac14\sin(2\theta) + C.\label{eq:extrigsub7}
\end{align}
We need to return to the variable $x$. As $u=\tan\theta$, $\theta = \tan^{-1}u$. Using the identity $\sin(2\theta) = 2\sin\theta\cos\theta$ and using a reference triangle, %found in \autoref{idea:trigsub}(b),
we have
\[\frac14\sin(2\theta) = \frac12\frac u{\sqrt{u^2+1}}\cdot\frac 1{\sqrt{u^2+1}} = \frac12\frac u{u^2+1}.\]
Finally, we return to $x$ with the substitution $u=x+3$. We start with the expression in \autoeqref{eq:extrigsub7}:
\begin{align*}
\frac12\theta + \frac14\sin(2\theta) + C
&= \frac12\tan^{-1}u + \frac12\frac{u}{u^2+1}+C\\
&= \frac12\tan^{-1}(x+3) + \frac{x+3}{2(x^2+6x+10)}+C.
\end{align*}
Stating our final result in one line,
\[
\int\frac1{(x^2+6x+10)^2}\dd x=\frac12\tan^{-1}(x+3)+\frac{x+3}{2(x^2+6x+10)}+C.
\]
\end{example}
Our last example returns us to definite integrals, as seen in our first example. Given a definite integral that can be evaluated using Trigonometric Substitution, we could first evaluate the corresponding indefinite integral (by changing from an integral in terms of $x$ to one in terms of $\theta$, then converting back to $x$) and then evaluate using the original bounds. It is much more straightforward, though, to change the bounds as we substitute.
\begin{example}[Definite integration and Trigonometric Substitution]\label{ex_trigsub6}
Evaluate $\ds\int_0^5\frac{x^2}{\sqrt{x^2+25}}\dd x$.
\solution
Using \autoref{idea:trigsub}\ref*{trigsubtan}, we set $x=5\tan\theta$, $\dd x = 5\sec^2\theta\dd\theta$, and note that $\sqrt{x^2+25} = 5\sec\theta$. As we substitute, we change the bounds of integration.
The lower bound of the original integral is $x=0$. As $x=5\tan\theta$, we solve for $\theta$ and find $\theta = \tan^{-1}(x/5)$. Thus the new lower bound is $\theta = \tan^{-1}(0) = 0$. The original upper bound is $x=5$, thus the new upper bound is $\theta = \tan^{-1}(5/5) = \pi/4$.
Thus we have
\begin{align*}
\int_0^5\frac{x^2}{\sqrt{x^2+25}}\dd x &= \int_0^{\pi/4} \frac{25\tan^2\theta}{5\sec\theta}5\sec^2\theta\dd\theta\\
&= 25\int_0^{\pi/4} \tan^2\theta\sec\theta\dd\theta.
\end{align*}
We encountered this indefinite integral in \autoref{ex_trigsub2} where we found
\[\int \tan^2\theta\sec\theta \dd\theta = \frac12\bigl(\sec\theta\tan\theta-\ln\abs{\sec\theta+\tan\theta}\bigr).\]
So
\begin{align*}
25\int_0^{\pi/4} \tan^2\theta\sec\theta\dd\theta
&= \left.\frac{25}2\left(\sec\theta\tan\theta-\ln\abs{\sec\theta+\tan\theta}\right)\right|_0^{\pi/4}\\
&= \frac{25}2\bigl(\sqrt2-\ln(\sqrt2+1)\bigr)
% \\
% &\approx 6.661
.
\end{align*}
\end{example}
%The following equalities are very useful when evaluating integrals using Trigonometric Substitution.
%
%\begin{keyidea}[Useful Equalities with Trigonometric Substitution]\label{idea:useful_trigsub}
%\begin{enumerate}
% \item $\sin(2\theta) = 2\sin\theta\cos\theta$
% \item $\cos(2\theta) = \cos^2\theta - \sin^2\theta = 2\cos^2\theta-1 = 1-2\sin^2\theta$
% \item $\ds \int \sec^3\theta\dd\theta = \frac12\Bigl(\sec \theta\tan \theta + \ln\abs{\sec \theta+\tan \theta}\Bigr)+C$
% \item $\ds \int \cos^2\theta\dd\theta = \int \frac12\bigl(1+\cos(2\theta)\bigr)\dd\theta = \frac12\bigl(\theta+\sin\theta\cos\theta\bigr)+C.$
%\end{enumerate}
%\end{keyidea}
The next section introduces Partial Fraction Decomposition, which is an algebraic technique that turns ``complicated'' fractions into sums of ``simpler'' fractions, making integration easier.
\printexercises{exercises/06-08-exercises}