\documentclass[12pt]{article}

\setlength{\parindent}{0pt}
\everymath={\displaystyle}
\setlength{\textwidth}{6.5in}
\setlength{\hoffset}{-0.75in}
\setlength{\textheight}{9in}
\setlength{\voffset}{-0.75in}

\newcommand{\problemspace}{\bigskip\hrule\bigskip}

\begin{document}

\centerline{\textbf{Math 126: Calculus II, Exam II Solutions}}

\bigskip

1 a) Using integration by parts with $u = x$, $dv = e^{2x}dx$, $du = dx$,
$v = (1/2)e^{2x}$, gives
$\int x e^{2x}\,dx = \frac{x}{2} e^{2x} - \frac{1}{2} \int e^{2x}\,dx
= \frac{x}{2} e^{2x} - \frac{1}{4} e^{2x} + C$ 

\bigskip

b) Using the trig substitution $x = \tan(\theta)$, $dx =
\sec^2(\theta)d\theta$, $\sqrt{x^2+1} = \sec(\theta)$, gives\newline
$\int \frac{\sqrt{x^2+1}}{x^4}\,dx
=\int \frac{\sec^3(\theta)}{\tan^4(\theta)}\,d\theta
= \int \frac{\cos(\theta)}{\sin^4(\theta)}\,d\theta$. Substituting $u =
\sin(\theta)$, $du = \cos(\theta)d\theta$ gives $\int u^{-4} du =
-\frac{1}{3\sin^{3}(\theta)} + C = -\frac{(x^2+1)^{3/2}}{3x^3} + C$.

\problemspace

2. The partial fraction decomposition of $\frac{x+2}{x^2(x^2 + 1)}$
looks like $\frac{x+2}{x^2(x^2 + 1)} = \frac{A}{x} + \frac{B}{x^2} +
\frac{Cx+D}{x^2+1}$.  Multiplying by $x^2(x^2+1)$ gives $x+2 = Ax(x^2+1)
+ B(x^2+1) + (Cx+D)x^2 = (A + C)x^3 + (B + D)x^2 + Ax + B$.  Therefore,
$A = 1$, $B = 2$, $A + C = 0$, and $B + D = 0$, so $C = -1$, $D = -2$.

\problemspace

3. $\sum_{n=1}^{\infty} \frac{3^n + 2(-1)^{n+1}}{4^n}
= \sum_{n=1}^{\infty} \Big(\frac{3}{4}\Big)^n
- 2\sum_{n=1}^\infty\Big(\frac{-1}{4}\Big)^n
= \frac{3/4}{1 - 3/4} - 2\frac{-1/4}{1-(-1/4)}
= 3 + 2\frac{1}{5} = \frac{17}{5}$


\problemspace

4. a) $a_n = \frac{(-1)^n n}{n+1}$ diverges because one subsequence
converges to 1, $a_{2k} = \frac{2k}{2k+1} \to 1$, and another subsequence
converges to $-1$, $a_{2k+1} = \frac{-(2k+1)}{2k+2} \to -1$.

\bigskip

b) $a_n = n\,\sin(1/n) = \frac{\sin(1/n)}{1/n}$, so applying
L'Hopital's Rule gives\newline $\lim_{n\to\infty}\frac{\sin(1/n)}{1/n}
= \lim_{n\to\infty}\frac{\cos(1/n) (-1/n^2)}{-1/n^2} = \cos(0) = 1$.

\problemspace

5. Consider $\sum_{n=1}^{\infty} \ln\Big(\frac{n}{n+1}\Big)$.

a) The $4^{th}$ partial sum is $s_4 = \ln\Big(\frac{1}{2}\Big)
+ \ln\Big(\frac{2}{3}\Big) + \ln\Big(\frac{3}{4}\Big) +
\ln\Big(\frac{4}{5}\Big) = \ln(1) - \ln(2) + \ln(2) - \ln(3) + \ln(3)
- \ln(4) + \ln(4) - \ln(5) = -\ln(5)$

\bigskip

b) The series is telescoping, since $\ln\Big(\frac{n}{n+1}\Big) = \ln(n) -
\ln(n+1)$, so the $n^{th}$ partial sum is $s_n = \ln(1) - \ln(n+1)$ (as in
part a). Therefore, the limit of $s_n$ is $\lim_{n\to\infty}s_n =
\lim_{n\to\infty} -\ln(n)= -\infty$ and the series diverges.

\problemspace

6. a) $\sum_{n=2}^{\infty} \Big(1 - \frac{1}{n}\Big)^{n}$ diverges
because the $n^{th}$ term does not approach~0:\newline
$\lim_{n\to\infty}\Big(1 - \frac{1}{n}\Big)^{n} = e^{-1} \ne 0$.

\bigskip

b) $\sum_{n=2}^\infty \frac{\sqrt{n}}{n^2-1}$ converges by the Limit
Comparison Test: We compare the series to $\sum_{n=2}^\infty \frac
{1}{n^{3/2}}$ which converges because it is a $p$-series with $p =
3/2 > 1$. Taking the limit of the quotient of the terms of these
series gives $\lim_{n\to\infty}\frac{\sqrt{n}/(n^2-1)}{1/n^{3/2}} =
\lim_{n\to\infty}\frac{n^2}{n^2-1} = \lim_{n\to\infty}\frac{1}{1-1/n^2}
= 1$.

\bigskip

c) $\sum_{n=2}^\infty \frac{1}{n(\ln(n))^3}$ converges by the Integral
Test: Using the substitution $u = \ln(u)$, $du = \frac{1}{u}du$, gives
$\int_{2}^\infty \frac{1}{x(\ln(x))^3}\,dx = \int_{\ln(2)}^\infty
\frac{1}{u^3}\,du = \lim_{b\to\infty} -\frac{1}{2u^2}\Big|_{\ln(2)}^b
= \lim_{b\to\infty} -\frac{1}{2b^2} + \frac{1}{2(\ln(2))^2}\newline
= \frac{1}{2(\ln(2))^2} < \infty$.

\bigskip

d) $\sum_{n=1}^\infty \frac {5^n}{n^3}$ diverges by the Ratio Test:\newline
$\lim_{n\to\infty} \frac{a_{n+1}}{a_n}
= \lim_{n\to\infty} \frac{5^{n+1}}{(n+1)^3}\frac{n^3}{5^n}
= \lim_{n\to\infty} 5\Big(\frac{n}{n+1}\Big)^3 = 5 > 1$.

\problemspace

7. a) The series $\sum_{n=1}^\infty (-1)^{n+1}\frac{n!}{(2n-1)!}$
converges because it is alternating, $\sum_{n=1}^\infty
(-1)^{n+1}u_n$, with $u_n$ positive and decreasing to~0:
$\frac{u_{n+1}}{u_n} = \frac{(n+1)!}{(2(n+1)-1)!} \frac{(2n-1)!}{n!}
= \frac{n+1}{(2n+1)(2n)} < 1$ and $\lim_{n\to\infty} u_n =
\lim_{n\to\infty} \frac{n!}{(2n-1)!} = \lim_{n\to\infty}
\frac{1}{(2n-1)(2n-2)\cdots(n+1)} = 0$.

\bigskip

b) Since the error of approximating an alternating series by  the $n^{th}$
partial sum $s_n$ is less than $u_{n+1}$, we can guarantee an error less
than $10^{-2}$ by choosing $n$ such that $u_{n+1}<10^{-2}$.  Note that
$n=2$ is not good enough: $u_3 = \frac{3!}{5!} = \frac{1}{20} = .05 >
10^{-2}$; but $n=3$ works: $u_4 = \frac{4!}{7!} = \frac{1}{7\cdot6\cdot5}
=\frac{1}{210} = .00476 < 10^{-2}$. Therefore, $s_3 = 1 - \frac{2!}{3!}
+ \frac{3!}{5!} = 1 - \frac{1}{3} + \frac{1}{20} = \frac{43}{60} = .716$
approximates the series with an error less than~$10^{-2}$.

\problemspace

\end{document}
