\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage{circuitikz}
\usepackage{mathrsfs}

\begin{document}
\flushleft\underline{Homework 4 --- MATH 1586 Spring 2018} \\
Recall the geometric series: for $|r|<1$, we have $\displaystyle\sum_{k=0}^{\infty} r^k = \dfrac{1}{1-r}$. If $|r|>1$, then $\displaystyle\sum_{k=0}^{\infty} r^k$ diverges.

The ratio test: to see if $\displaystyle\sum_{k=0}^{\infty} a_k$ converges or not, compute $\displaystyle\lim_{k \rightarrow \infty} \left| \dfrac{a_{k+1}}{a_k} \right|$. If that limit is $>1$, the series diverges. If that limit is $<1$, then the series converges. If that limit equals $1$, then the ratio test offers no conclusion. 

The Taylor series (centered at $0$) of a function $f(x)$ is given by
\[f(x) = \displaystyle\sum_{k=0}^{\infty} \dfrac{f^{(k)}(0)}{k!} x^k,\] where $f^{(k)}$ denotes the $k$th derivative of $f$ (with $k=0$ meaning take no derivative).
\begin{enumerate}
\item Calculate $\displaystyle\sum_{k=1}^4 \dfrac{1}{k^2+2k+1}$ \\
\textit{Solution}: Calculate
\[\begin{array}{ll}
\displaystyle\sum_{k=1}^4 \dfrac{1}{k^2+2k+1} &= \dfrac{1}{1^2+2(1)+1} + \dfrac{1}{2^2+2(2)+1} + \dfrac{1}{3^2+2(3)+1} + \dfrac{1}{4^2+2(4)+1} \\
&= \dfrac{1}{4} + \dfrac{1}{9} + \dfrac{1}{16}+\dfrac{1}{25}  
\end{array} \]
\item Does $\displaystyle\sum_{k=0}^{\infty} 2^k$ converge? If so, find its value. If it does not, why not? \\
\textit{Solution}: It does not converge. This is because it is a geometric series with $r=2$ and therefore $|r|>1$. 
\item Does $\displaystyle\sum_{k=0}^{\infty} \dfrac{1}{(-3)^k}$ converge? If so, find its value. If it does not, why not? \\
\textit{Solution}: It does converge. This is because it is a geometric series with $r=-\dfrac{1}{3}$ and therefore $|r|= \left| -\dfrac{1}{3} \right| = \dfrac{1}{3} < 1$. Thus the value of the series is
\[\displaystyle\sum_{k=0}^{\infty} \dfrac{1}{(-3)^k} = \dfrac{1}{1-(-\frac{1}{3})} = \dfrac{1}{1+\frac{1}{3}} = \dfrac{1}{\frac{4}{3}} = \dfrac{3}{4}.\]
\item The sine function  $\sin$ is defined by the series
\[\sin(t) = \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k t^{2k+1}}{(2k+1)!}.\]
The so-called ``sine integral function" $\mathrm{Si}$ (used in, e.g. signal processing) is defined by the formula
\[\mathrm{Si}(x)=\displaystyle\int_0^x \dfrac{\sin(t)}{t} \mathrm{d}t.\]
Use the Taylor series for $\sin(x)$ and integration term-by-term to find the Taylor series for $\mathrm{Si}(x)$. \\
\textit{Solution}: First calculate
\[ \dfrac{\sin(t)}{t} = \dfrac{1}{t} \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k t^{2k+1}}{(2k+1)!} = \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k}{(2k+1)!} \dfrac{t^{2k+1}}{t}=\displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k t^{2k}}{(2k+1)!}.\]
Thus, we integrate, remembering that the integral of the sum is the sum of the integrals: \\
\[\begin{array}{ll}
\displaystyle\int_0^x \dfrac{\sin(t)}{t} \mathrm{d}t &= \displaystyle\int_0^x \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k t^{2k}}{(2k+1)!} \mathrm{d}t \\
&= \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k}{(2k+1)!} \underbrace{\displaystyle\int_0^x t^{2k} \mathrm{d}t}_{=\frac{t^{2k+1}}{2k+1} \Big|_0^x} \\
&= \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k x^{2k+1}}{(2k+1)! (2k+1)}.
\end{array}\]
\item Use the ratio test to try to conclude whether or not the series $\displaystyle\sum_{k=0}^{\infty} \dfrac{1}{k+1}$ converges.  \\
\textit{Solution}: Here, we are taking $a_k=\dfrac{1}{k+1}$, so 
\[\dfrac{a_{k+1}}{a_k} = \dfrac{\frac{1}{k+2}}{\frac{1}{k+1}} = \dfrac{k+1}{k+2}.\]
Now compute
\[\begin{array}{ll}
\displaystyle\lim_{k \rightarrow \infty} \left| \dfrac{a_{k+1}}{a_k} \right| &= \displaystyle\lim_{k \rightarrow \infty} \left| \dfrac{k+1}{k+2} \right| \\
&= 1.
\end{array}\]
The ratio test only reports that the convergence of the series is inconclusive here (it actually diverges!).
\item Use the ratio test to try to conclude whether or not the series $\displaystyle\sum_{k=0}^{\infty} \dfrac{1}{k 2^k}$ converges. \\
\textit{Solution}: Here, we are taking $a_k=\dfrac{1}{k2^k}$, so
\[\dfrac{a_{k+1}}{a_k} = \dfrac{\frac{1}{(k+1)2^{k+1}}}{\frac{1}{k2^k}}= \dfrac{k2^k}{(k+1)2^{k+1}} = \dfrac{k}{2(k+1)},\]
so we may compute
\[\displaystyle\lim_{k \rightarrow \infty} \left| \dfrac{a_{k+1}}{a_k} \right| = \displaystyle\lim_{k \rightarrow\infty} \left| \dfrac{k}{2(k+1)} \right| = \dfrac{1}{2},\]
and we see that the ratio test tells us that the series converges.
\item Use the ratio test to try to conclude whether or not the series $\displaystyle\sum_{k=0}^{\infty} \dfrac{k!}{2^k}$ converges. \\
\textit{Solution}: Here, we are taking $a_k = \dfrac{k!}{2^k}$, so 
\[\dfrac{a_{k+1}}{a_k} = \dfrac{\frac{(k+1)!}{2^{k+1}}}{\frac{k!}{2^{k}}} = \dfrac{(k+1)! 2^{k}}{k! 2^{k+1}} = \dfrac{k+1}{2}.
\]
Now compute
\[ \displaystyle\lim_{k \rightarrow \infty} \left| \dfrac{a_{k+1}}{a_k} \right| = \displaystyle\lim_{k \rightarrow \infty} \left| \dfrac{k+1}{2} \right| = \infty.\]
The ratio test shows us that the series diverges.
\item Use the definition of Taylor series to compute the first three nonzero terms of the Taylor series for $f(x)=e^x \ln(x^2+1)$. \\
\textit{Solution}: First we comptue some derivatives of $f$ (yes this is tedious -- no, it won't be as nearly as bad on the exam): 
\[f'(x)= e^x \ln(x^2+1) + \dfrac{2x e^x}{x^2+1},\]
\[ f''(x) = \dfrac{e^x \Big(4x^3-2x^2+(x^2+1)^2 \ln(x^2+1) + 4x+2 \Big)}{(x^2+1)^2}\]
\[ f'''(x) = \dfrac{e^x \Big( 6x^5 - 6x^4 +16x^3 + (x^2+1)^3 \ln(x^2+1) - 6x + 6 \Big)}{(x^2+1)^3}, \]
\[ f^{(4)}(x) = e^x \left( \ln(x^2+1) + \dfrac{4x(2x^6-3x^5+10x^4-6x^3-2x^2+21x-10)}{(x^2+1)^4} \right),\]
and
\[ f^{(5)}(x) = e^x \left( \ln(x^2+1) + \dfrac{2(5x^9 - 10x^8 +40x^7 -50x^6 +34x^5 +150x^4-320x^3+170x^2+65x-20)}{(x^2+1)^5} \right).\]
From these we observe that $f(0)=0$, $f'(0)=0$, $f''(0)=2$, $f'''(0)=6$, and $f^{(4)}(0)=0$, and $f^{(5)}(0)=-40$. Therefore the Taylor series for $f(x)=e^x \ln(x^2+1)$ begins
\[ \begin{array}{ll}
f(x) &= \displaystyle\sum_{k=0}^{\infty} \dfrac{f^{(k)}(0)}{k!} x^k \\
&= \dfrac{f^{(0)}(0)}{0!} x^0 + \dfrac{f^{(1)}(0)}{1!} x^1 + \dfrac{f^{(2)}(0)}{2!} x^2 + \dfrac{f^{(3)}(0)}{3!} x^3 + \dfrac{f^{(4)}(0)}{4!} x^4 + \dfrac{f^{(5)}(0)}{5!} x^5 + \ldots \\
&=0 + 0 + \dfrac{2}{2!} x^2 + \dfrac{6}{3!} x^3 + 0 + \dfrac{-40}{5!} x^5 + \ldots \\
&= x^2 + x^3 - \dfrac{x^5}{3} + \ldots 
\end{array} \]
\end{enumerate}

\end{document}