Title: Math 2260 Chapter 8 (Methods of Integration)

Q: [latex] The integration by parts formula is
$$ \int u \, dv = $$
[/latex]
A: [latex]$$\int u \, dv = uv - \int v \, du$$[/latex]

Q: [latex] The integration by parts formula for definite integrals is
$$ \int_a^b u \, dv = $$ [/latex]
A: [latex]$$ \int_a^b  u \, dv = uv \bigg|_{x=a}^b - \int_a^b v \, du.$$[/latex]

Q: [latex] How to integrate
$$ \int \sin^{m} \! x \cos^n \! x \, dx $$
if $m$ is \textbf{odd}
[/latex]
A: [latex] If $m$ is odd, then $m = 2k+1$. Use
$$ \sin^{2k} x = (\sin^2 x)^k = (1 - \cos^2 x)^{k} $$
to rewrite the integral as
$$ \int (1 - \cos^2 x)^k \cos^n \! x \sin x\, dx  $$
and do the $u$-substitution $u = \cos x$.
You'll need to use Pascal's triangle to expand
$(1 - u^2)^k$ after the $u$ substitution.
[/latex]

Q: [latex] How to integrate
$$\int \sin mx \sin nx dx$$
[/latex]
A: [latex] Use the trig identity:
$$\sin mx \sin nx = \frac{1}{2} \left[ \cos(m-n) x - \cos(m+n) x \right]$$
[/latex]

Q: [latex] How to integrate
$$\int \sin mx \cos nx$$
[/latex]
A: [latex]Use the trig identity:
$$ \sin mx \cos nx = \frac{1}{2} \left[ \sin(m-n) x + \sin(m+n) x \right] $$
[/latex]

Q: [latex] How to integrate
$$\int \cos mx \cos nx \, dx$$
[/latex]
A: [latex]Use the trig identity:
$$\cos mx \cos nx = \frac{1}{2} \left[ \cos(m-n) x + \cos(m+n) x \right] $$
[/latex]

Q: [latex] How to integrate
$$ \int \tan^m \! x \, \sec^n \! x \, dx$$
when $n \geq 2$
[/latex]
A: [latex]
Use $ \sec^2 x = \tan^2 x + 1 $ to write
$$ \int \tan^m \!x \, \sec^{n} \! x \, dx = \int \tan^m \! x \, (\tan^2 \! x + 1)^{\frac{n-2}{2}} \sec^2 x \, dx.$$
and substitute $u = \tan x$, \\
$du = \sec^2 \! x \, dx$. \\
You'll need to use Pascal's triangle to expand $(u^2 + 1)^{\frac{n-2}{2}}$ after the $u$ substitution, and the integral will still be hard if $n$ is \textbf{odd}.
[/latex]

[latex]The trig substitution for integrals involving $$\sqrt{a^2 + x^2}$$ [/latex]

[latex]The trig substitution for integrals involving $$\sqrt{a^2 - x^2}$$[/latex]

[latex]The trig substitution for integrals involving
$$\sqrt{x^2 - a^2}$$
[/latex]

Q: [latex]
If $f(x)$ is a polynomial of degree $< m$, the partial fraction decomposition of
$$
\frac{f(x)}{(x - r)^m} = \dots
$$
[/latex]
A: [latex]
$$\frac{f(x)}{(x - r)^m} =  \frac{c_1}{x - r} + \cdots + \frac{c_m}{(x-r)^m}$$
where $c_1, \dots, c_{m}$ are real numbers. \\
We find these numbers by putting the right hand side over the common denominator $(x - r)^m$ and setting the each term in the numerator (a polynomial whose coefficients are combinations of the $c_i$) equal to the term with the corresponding power of $x$ in $f(x)$, giving us a set of $m$ equations in $m$ unknowns.
[/latex]

Q: [latex] How to integrate
$$ \int \sin^{m} \! x \, \cos^{n} \! x \, dx $$
if $n$ is \textbf{odd}:
[/latex]
A: [latex] If $n$ is odd, then $n = 2k+1$ for some $k$. Use
$$\cos^{2k} x = (\cos^2 x)^k = (1 - \sin^2 x)^{k}$$
to rewrite the integral as
$$\int \sin^m x \, (1 - \sin^2 x)^k \cos x\, dx$$
and do the $u$-substitution $u = \sin x$. \\
You'll need to use Pascal's triangle to expand $(1 - u^2)^k$ after the $u$ substitution.
[/latex]

Q: [latex] How to integrate
$$\int \tan^m \! x \, dx$$
[/latex]
A: [latex]
Use $\tan^2 x = \sec^2 x - 1$ to write
$$
\int \tan^m \!x \, dx =
\int \tan^{m-2} \! x \, \sec^2 \! x \, dx - \int \tan^{m-2} \! x \, dx.
$$
Substitute $u = \tan x$, \\
$du = \sec^2 \! x \, dx$ in the first integral and repeat this procedure on second until you get to the integral
$$\int 1 \, dx = x.$$
if $m$ was even or
$$\int \tan x \, dx = -\ln |\cos x|$$
if $m$ was odd.
[/latex]

Q: [latex] How to integrate
$$\int \sec^m x \, dx$$
[/latex]
A: [latex]Integrate by parts with
$$u = \sec^{m-2}\!x \quad dv = \sec^2 \! x \quad (v = \tan x)$$
to get a better integral in powers of $\sec x$ and $\tan x$.
[/latex]

Q: [latex]
If $f(x)$ is a polynomial of degree $< 2m$, and $x^2 + px + q$ has no real roots, the partial fraction decomposition of
$$
\frac{f(x)}{(x^2 +p x + q)^m} =
$$
[/latex]
A: [latex]
$$
\frac{f(x)}{(x^2 +p x + q)^m} = \frac{c_1 x + c_2}{x^2 +p x + q} + \frac{c_2 x + c_3}{(x^2 +p x + q)^2} + \cdots + \frac{c_{2m-1} x + c_{2m}}{(x^2 +p x + q)^m}
$$
where $c_1, \dots, c_{2m}$ are real numbers. \\
We find these numbers by putting the right hand side over the common denominator $(x^2 +p x + q)^m$ and setting each term in the numerator (a polynomial whose coefficients are combinations of the $c_i$) equal to the term with the corresponding power of $x$ in $f(x)$, giving us a set of $2m$ equations in $2m$ unknowns.
[/latex]

Q: [latex]
If $f(x)$ is a polynomial of degree $< m$, and if $r_1, \dots, r_m$ are distinct real numbers,
the partial fraction decomposition of
$$
\frac{f(x)}{(x - r_1) \cdots (x - r_m)} = \dots
$$
[/latex]
A: [latex]
$$\frac{f(x)}{(x-r_1) \cdots (x-r_m)} = \frac{c_1}{x - r_1} + \cdots + \frac{c_m}{x - r_m}$$
where $c_1, \dots, c_m$ are real numbers. \\
We find these numbers by putting the right hand side over the common denominator $(x-r_1) \cdots (x-r_m)$ and setting the each term in the numerator (a polynomial whose coefficients are combinations of the $c_i$) equal to the term with the corresponding power of $x$ in $f(x)$, giving us a set of $m$ equations in $m$ unknowns.
[/latex]

Q: [latex] Given
$$x_0 = a, \, x_1 = a + h, \dots, x_n = a + nh = b, $$
and
$$f_0 = f(x_0), f_1 = f(x_1), \dots, f_n = f(x_n).$$
the trapezoid rule says
$$\int_a^b f(x) \, dx \simeq \operatorname{Trap}(f,a,b,n) = $$
[/latex]
A: [$$]
\int_a^b f(x) \, dx \simeq \operatorname{Trap}(f,a,b,n) =
  \frac{h}{2} (f_0 + 2 f_1 + 2 f_2 + \cdots + 2 f_{n-1} + f_n).
[/$$]

Q: [latex]
If $n$ is \textbf{even} and
$$
x_0 = a, \, x_1 = a + h, \dots, x_n = a + nh = b,
$$
and
$$
f_0 = f(x_0), f_1 = f(x_1), \dots, f_n = f(x_n).
$$
then Simpson's rule says
$$\int_a^b f(x) \, dx \simeq \operatorname{Simp}(f,a,b,n) = $$
[/latex]
A: [latex]
$$\operatorname{Simp}(f,a,b,n) = \frac{h}{3} (f_0 + 4 f_1 + 2 f_2 + \cdots + 2 f_{n-2} + 4 f_{n-1} + f_n).$$
Note that $n$ (the number of intervals) must be even. There are an odd number ($n+1$) of points since they are numbered $0$ to $n$.
[/latex]

Q: [latex]
The error estimate for the \emph{trapezoid rule} is
$$
\left|\operatorname{Trap}(f,a,b,n) - \int_a^b f(x) \, dx \right| \leq
$$
[/latex]
A: [latex]
If $M \geq |f''(x)|$ on $[a,b]$,
$$\left| \operatorname{Trap}(f,a,b,n) - \int_a^b f(x) \, dx \right| \leq \frac{M(b-a)^3}{12 n^2}$$
[/latex]

Q: [latex]
The error estimate for Simpson's rule
$$\left| \operatorname{Simp}(f,a,b,n) - \int_a^b f(x) \, dx \right| \leq$$
[/latex]
A: [latex]
If $M \geq |f^{(4)}(x)|$ on $[a,b]$,
$$\left| \operatorname{Simp}(f,a,b,n) - \int_a^b f(x) \, dx \right| \leq \frac{M(b-a)^5}{180 n^4}$$
Note: You probably expected the error formula to be in terms of the third derivative (since Simpson's rule works by approximating by quadratic polynomials), but there's an ``unexpected" cancellation in the proof of the error formula which means that the error is actually bounded by the fourth derivative. \\
The extra accuracy in this version of the formula is useful enough that we learn it anyway, even though we can't prove it yet.
[/latex]

Q: [latex]
(Improper Integral of Type I)
$$\int_a^\infty f(x) \, dx$$
is defined by
[/latex]
A: [latex]
$$ \int_a^\infty f(x) \, dx = \lim_{b \rightarrow \infty} \int_a^b f(x) \, dx.$$
If the limit exists, we say the integral converges and the value of the integral is equal to the limit. If the limit doesn't exist, we say the integral diverges.
[/latex]

Q: [latex] (Improper Integral of Type I)
The improper integral
$$\int_{-\infty}^b f(x) \, dx$$
is defined to be
[/latex]
A: [latex]
$$\int_{-\infty}^b f(x) \, dx = \lim_{a \rightarrow -\infty} \int_a^b f(x) \, dx.$$
If the limit exists, we say the integral \emph{converges} and the value of the integral is equal to the limit. If the limit doesn't exist, we say the integral \emph{diverges}.
[/latex]

Q: [latex]
(Improper Integral of Type I)
$$\int_{-\infty}^\infty f(x) \, dx$$
is defined to be
[/latex]
A: [latex]
$$\int_{-\infty}^\infty f(x) \, dx = \int_{-\infty}^c f(x)\, dx + \int_c^\infty f(x) \, dx$$
where $c$ is any real number. It converges if both the integrals on the right converge and diverges if one or both of the integrals on the right diverge.
[/latex]

Q: [latex]
Direct comparison test (improper integrals).\\
If $0 \leq f(x) \leq g(x)$ on $[a,\infty)$ and
$$\int_a^\infty g(x) \, dx$$
converges then
[/latex]
A: [latex]
$$\int_a^\infty f(x) \, dx$$
converges.
[/latex]

Q: [latex]
Direct comparison test (improper integrals). \\
If $0 \leq f(x) \leq g(x)$ on $[a,\infty)$ and
$$\int_a^\infty f(x) \, dx$$
diverges then
[/latex]
A: [latex]
$$\int_a^\infty g(x) \, dx$$
diverges.
[/latex]

Q: [latex] Limit comparison test (improper integrals).\\
If $0 < f(x)$ and $0<g(x)$ on $[a,\infty)$ and
$$\lim_{x \rightarrow \infty} \frac{f(x)}{g(x)} = L, \quad \text{ and } 0 < L < \infty$$
then
[/latex]
A: [latex]
The improper integrals
$$\int_a^\infty f(x) \, dx \text{ and }
\int_a^\infty g(x) \, dx$$
both converge or both diverge.
[/latex]

Q: [latex]
Any polynomial
$$x^n + a_{n-1} x^{n-1} + \cdots + a_0 $$
whose coefficients $a_{n-1}, \dots, a_0$ are real numbers
can be written as
[/latex]
A: [latex]
$$x^n + a_{n-1} x^{n-1} + \cdots + a_0 = (x-r_1) \cdots (x-r_n)$$
where the $r_i$ are the roots of the polynomial. \\
The roots are either real numbers which may occur one or more times (repeated roots) or pairs of complex numbers $a + bi$ and $a - bi$ where $i^2 = -1$. \\
Complex roots may be repeated, but the pair is repeated together so $a + bi$ and $a - bi$ occur the same number of times as roots.
[/latex]

Q: [latex]
(Completing square, real form.)\\
Any quadratic polynomial
$$
f(x) = x^2 + p x + q
$$
can be written in the form
[/latex]
A: [latex]
$$x^2 + p x + q = \left(x + \frac{p}{2}\right)^2 + \left(q - \frac{p^2}{4}\right).$$
[/latex]

Q: [latex]
(Completing square, complex form.)\\
If the roots of
$$f(x) = x^2 + p x + q$$
are $a + bi$ and $a - bi$, we may write the polynomial $f(x)$ as
[/latex]
A: [latex]
$$
x^2 + p x + q = (x - (a + b i)) (x - (a - b i)) = (x-a)^2 - (bi)^2 = (x-a)^2 + b^2.
$$
[/latex]

Q: [latex] Complex numbers.
$$i = $$
[/latex]
A: [latex]
$$i = \sqrt{-1}, \quad \text{so} \quad i^2 = -1.$$
[/latex]

Q: [latex]
The ``mother of all trig identities"
$$e^{i\theta} = $$
[/latex]
A: [latex]
$$e^{i\theta} = \cos \theta + i \sin \theta$$
This can be used to rederive essentially every other trig identity if you forget one.
[/latex]

Q: [latex] How to expand
$$(a+b)^n =$$
[/latex]
A: [latex]
$$(a+b)^n = a^n + n a^{n-1} b + \binom{n}{2} a^{n-2} b^2 + \cdots + \binom{n}{k} a^{n-k} b^k + \cdots + n a b^{n-1} + b^n.$$
The $\binom{n}{k}$ can be computed by
$$ \binom{n}{k} = \frac{n!}{k! (n-k)!}$$
but it's easier to get them from reading the $n$th line of Pascal's triangle.
$$
\binom{n}{0} \quad \binom{n}{2} \quad \cdots \quad \binom{n}{n}
$$
For instance, the third line of Pascal's triangle is
$$\binom{3}{0} \quad \binom{3}{1} \quad \binom{3}{2} \quad \binom{3}{3} = 1 \quad 3 \quad 3 \quad 1$$
so
$$(a + b)^3 = 1 a^3 + 3 a^2 b + 3 a b^2 + 1 b^3.$$
[/latex]

Q: [latex] What is \emph{Pascal's triangle}? [/latex]
A: [latex]
\begin{tabular}{rccccccccc}
$n=0$:& & & & & 1\\
\noalign{\smallskip\smallskip}
$n=1$:& & & & 1 & & 1\\
\noalign{\smallskip\smallskip}
$n=2$:& & & 1 & & 2 & & 1\\
\noalign{\smallskip\smallskip}
$n=3$:& & 1 & & 3 & & 3 & & 1\\
\noalign{\smallskip\smallskip}
$n=4$:& 1 & & 4 & & 6 & & 4 & & 1\\
\noalign{\smallskip\smallskip} \end{tabular}
We get each new row by starting with a 1 and getting every other number by adding the two numbers above it to the left and right. These numbers are the binomial coefficients in the expansion of $(a+b)^n$ which match powers of $a$ and $b$ such as $a^k b^{n-k}$. \\
For instance, from the $n=3$ line:
$$
(a+b)^3 = \mathbf{1} a^3 + \mathbf{3} a^2 b + \mathbf{3} a b^2 + \mathbf{1} b^3
$$ [/latex]

Q: [latex]
When (for what values of $p$) does
$$\int_1^\infty \frac{1}{x^p} \, dx$$
converge and diverge?
[/latex]
A: [latex]
The integral converges for $p > 1$ and diverges if $p \leq 1$.
[/latex]

Q: [latex] How to integrate
$$ \int \sec x \, dx = $$
[/latex]
A: [latex]
$$ \int \sec x \, dx = \ln |\sec x + \tan x| + C $$
[/latex]

Q: [latex] How to integrate
$$ \int \tan x \, dx = $$
[/latex]
A: [latex]
$$ \int \tan x \, dx = -\ln | \cos x | + C = \ln | \sec x| + C. $$
[/latex]

Q: [latex] How to integrate
$$ \int \frac{1}{a^2 + x^2} \, dx = $$
[/latex]
A: [latex]
$$ \int \frac{1}{a^2 + x^2} \, dx = \frac{1}{a} \operatorname{arctan} \frac{x}{a} + C.$$
[/latex]

Q: [latex]
How to integrate:
$$\int \frac{1}{a x^2 + b x + c} \, dx $$
[/latex]
A: [latex]
Factor out an $a$ from the denominator
$$\int \frac{1}{a x^2 + b x + c} \, dx = \frac{1}{a} \int \frac{1}{x^2 + px + q} \, dx $$
Complete square in denominator:
$$\int \frac{1}{x^2 + px + q} \, dx = \int \frac{1}{(x + p/2)^2 + (q - \frac{p^2}{4})} \, dx$$
Sub $u = x + p/2$ to rewrite as:
$$\int \frac{1}{u^2 + v^2} \, du \quad \text{if } q - \frac{p^2}{4} > 0.$$
(an $\operatorname{arctan}$ integral), or as
$$\int \frac{1}{u^2 - v^2}  = \int \frac{1}{(u + v)(u-v)}  \, du \quad \text{if } q - \frac{p^2}{4} < 0.$$
(partial fractions).
[/latex]

Q: [latex] How to integrate
$$ \int \sec x \tan x \, dx = $$
[/latex]
A: [latex]
$$ \int \sec x \tan x \, dx = \sec x $$
[/latex]

Q: [latex] How to integrate
$$\int \sec^2 \! x \, dx=$$
[/latex]
A: [latex]
$$\int \sec^2 \! x \, dx= \tan x $$
[/latex]

Q: [latex]How to integrate
$$\int \frac{1}{\sqrt{a^2 + x^2}} \, dx = $$
[/latex]
A: [latex]
$$\int \frac{1}{\sqrt{a^2 + x^2}} \, dx = \ln |x + \sqrt{a^2 + x^2}|  $$
Note: This is a trig substitution.
[/latex]

Q: [latex] How to integrate
$$\int \frac{1}{\sqrt{x^2 - a^2}} \, dx =$$
[/latex]
A: [latex]
$$\int \frac{1}{\sqrt{x^2 - a^2}} \, dx = \ln |x + \sqrt{x^2 - a^2}| +C $$
Note: This is also a trig substitution.
[/latex]

Q: [latex] How to integrate
$$ \int \sin^{m} \! x \cos^n \! x \, dx $$
if $n$ and $m$ are \textbf{both even}
[/latex]
A: [latex]
Use the trig identities
$$
\sin^2 x = \frac{1 - \cos 2x}{2}
$$
and
$$
\cos^2 x = \frac{1 + \cos 2x}{2}
$$
to write the integral as one in lower powers of $\cos 2x$. Expand, to get some new integrals in the form
$$
\int \sin^m x \cos^m x \, dx
$$
with lower powers $m$ and $n$. You might have to do this more than once if the new integrals also have both $m$ and $n$ even to get an integral in terms of $\cos 4x$.[/latex]

Q: [latex]
How to integrate
$$\int \sqrt{1 + \cos k x} \, dx =$$
[/latex]
A: [latex]
Use the trig identity
$$\frac{1 + \cos k x}{2} = \cos^2 \left(\frac{k}{2} x\right)$$
to eliminate the square root.
[/latex]

Q: [latex]
How to integrate
$$\int \sqrt{1 - \cos k x} \, dx =$$
[/latex]
A: [latex]
Use the trig identity
$$\frac{1 - \cos k x}{2} = \sin^2 \left(\frac{k}{2} x\right)$$
to eliminate the square root.
[/latex]

Q: [latex]
How to get the partial fraction decomposition of
$$
\frac{f(x)}{g(x)} = \dots
$$
where $f(x)$ and $g(x)$ are polynomials in $x$:
[/latex]
A: [latex]
If the degree of $f(x)$ is larger than the degree of $g(x)$, do long division of polynomials to write
$$
f(x) = q(x) g(x) + r(x)
$$
where the degree of the remainder $r(x)$ is $<$ the degree of $g(x)$. \\
Now factor
$$g(x) = (x-r_1)^{k1} \cdots (x-r^n)^{kn}$$
and generate a fraction in the form
$$
r(x) = \left( \frac{a_{11}}{(x-r_1)} + \cdots \frac{a_{1,k1}}{(x-r_1)^{k1}} \right) + \cdots
+  \left( \frac{a_{n1}}{(x-r_n)} + \cdots \frac{a_{n,kn}}{(x-r_n)^{kn}} \right).
$$
keeping in mind that some of the $r_i$ might be \emph{complex roots}.
[/latex]

Q: [latex]
(Improper Integral of Type II)
If $f(x)$ is continuous on $(a,b]$ and discontinuous at $a$,
$$\int_a^b f(x) \, dx$$
is defined to be
[/latex]
A: [latex]
$$\int_{a}^b f(x) \, dx = \lim_{c \rightarrow a^+} \int_c^b f(x)\, dx$$
It converges if the one-sided limit exists, and diverges if it does not exist.
[/latex]

Q: [latex]
(Improper Integral of Type II)
If $f(x)$ is continuous on $[a,b)$ and discontinuous at $b$,
$$\int_a^b f(x) \, dx$$
is defined to be
[/latex]
A: [latex]
$$\int_{a}^b f(x) \, dx = \lim_{c \rightarrow b^-} \int_a^c f(x)\, dx$$
It converges if the one-sided limit exists, and diverges if it does not exist.
[/latex]

Q: [latex]
(Improper Integral of Type II)
If $f(x)$ is continuous on $[a,c) \cup (c,b]$ and discontinuous at $c$,
$$\int_a^b f(x) \, dx$$
is defined to be
[/latex]
A: [latex]
$$\int_{a}^b f(x) \, dx = \lim_{d \rightarrow c^-} \int_a^d f(x)\, dx +  \lim_{d \rightarrow c^+} \int_d^b f(x)\, dx $$
It converges if both one-sided limits exist, and diverges if either does not exist.
[/latex]

Q: [latex] How to integrate
$$\int \cos mx \cos nx \, dx$$
[/latex]
A: [latex]
Use the trig identity
$$\cos mx \cos nx = \frac{1}{2} \left( \cos (m-n) x + \cos (m+n)x \right)$$
[/latex]

Q: [latex]
How to integrate
$$\int \sin mx \sin nx \, dx =$$
[/latex]
A: [latex]
Use the trig identity
$$\sin mx \sin nx = \frac{1}{2}\left( \cos (m-n)x - \cos(m+n)x \right)$$
[/latex]

Q: [latex]
How to integrate
$$\int \sin mx \cos nx \, dx = $$
[/latex]
A: [latex]
Use the trig identity
$$\sin mx \cos nx = \frac{1}{2}\left( \sin (m+n)x - \sin(m-n)x \right )$$
[/latex]