# Calculus/Sequences and Series/Exercises

The following exercises test your understanding of infinite sequences and series. You may want to review that material before trying these problems.
Each question is followed by a "Hint" (usually a quick indication of the most efficient way to work the problem), the "Answer only" (what it sounds like), and finally a "Full solution" (showing all the steps required to get to the right answer). These should show up as "collapsed" or "hidden" sections (click on the title to display the contents), but some older web browsers might not be able to display them correctly (i.e., showing the content when it should be hidden). If this is true for your browser (or if you're looking at a printed version), you should take care not to "see too much" before you start thinking of how to work each problem.

## Sequences

Consider the infinite sequence
    $a_{n}=n/2^{n},\ n=1,\ldots ,\infty .$
* Is the sequence monotonically increasing or decreasing?
$a_{n+1}$
$a_{n}$
$a_{n}$
$n$
Algebraically, since
    $a_{n+1}-a_{n}={\frac {n+1}{2^{n+1}}}-{\frac {n}{2^{n}}}={\frac {n+1}{2^{n+1}}}-{\frac {2n}{2^{n+1}}}={\frac {1-n}{2^{n+1}}},$
we see that $a_{n+1}<a_{n}$ for $n>1$. That is, starting from the second term, the sequence is strictly decreasing. It is easy to check how the first two terms compare by just plugging in $n=1$ and $n=2$:
    $a_{1}=1/2$
    $a_{2}=2/4=1/2$
The first two terms are equal and thereafter the terms are strictly decreasing. Therefore, the sequence is monotonically decreasing.
Using calculus,
    ${\frac {d}{dn}}\,{\frac {n}{2^{n}}}={\frac {2^{n}\cdot 1-n\cdot 2^{n}\ln 2}{(2^{n})^{2}}}={\frac {2^{n}(1-n\ln 2)}{2^{2n}}}={\frac {1-n\ln 2}{2^{n}}},$
$n>1/\ln 2\approx 1.44>1$
$a_{n+1}$
$a_{n}$
$a_{n}$
$n$
Algebraically, since
    $a_{n+1}-a_{n}={\frac {n+1}{2^{n+1}}}-{\frac {n}{2^{n}}}={\frac {n+1}{2^{n+1}}}-{\frac {2n}{2^{n+1}}}={\frac {1-n}{2^{n+1}}},$
we see that $a_{n+1}<a_{n}$ for $n>1$. That is, starting from the second term, the sequence is strictly decreasing. It is easy to check how the first two terms compare by just plugging in $n=1$ and $n=2$:
    $a_{1}=1/2$
    $a_{2}=2/4=1/2$
The first two terms are equal and thereafter the terms are strictly decreasing. Therefore, the sequence is monotonically decreasing.
Using calculus,
    ${\frac {d}{dn}}\,{\frac {n}{2^{n}}}={\frac {2^{n}\cdot 1-n\cdot 2^{n}\ln 2}{(2^{n})^{2}}}={\frac {2^{n}(1-n\ln 2)}{2^{2n}}}={\frac {1-n\ln 2}{2^{n}}},$
$n>1/\ln 2\approx 1.44>1$
* Is the sequence bounded from below, from above, both, or neither?
$n$
$n$
* Does the sequence converge or diverge?
To show this directly, consider the limit
    $\lim _{n\to \infty }{\frac {n}{2^{n}}}=\lim _{n\to \infty }{\frac {1}{2^{n}\ln 2}}=0.$
The two limits are equal by L'Hôpital's Rule, since the numerator and denominator of the expression in the first limit both grow to infinity.
To show this directly, consider the limit
    $\lim _{n\to \infty }{\frac {n}{2^{n}}}=\lim _{n\to \infty }{\frac {1}{2^{n}\ln 2}}=0.$
The two limits are equal by L'Hôpital's Rule, since the numerator and denominator of the expression in the first limit both grow to infinity.

## Partial sums

Assume that the nth partial sum of a series is given by $s_{n}=2-{\frac {1}{3^{n}}}.$
* Does the series converge? If so, to what value?
    $s=\lim _{n\to \infty }s_{n}=\lim _{n\to \infty }\left(2-{\frac {1}{3^{n}}}\right)=2.$
    $s=\lim _{n\to \infty }s_{n}=\lim _{n\to \infty }\left(2-{\frac {1}{3^{n}}}\right)=2.$
* What is the formula for the nth term of the series?
$s_{n}=a_{1}+\cdots +a_{n-1}+a_{n}=s_{n-1}+a_{n}$
$s_{n}=a_{1}+\cdots +a_{n-1}+a_{n}=s_{n-1}+a_{n}$
$a_{n}={\frac {2}{3^{n}}}$
$a_{n}={\frac {2}{3^{n}}}$
$a_{n}=s_{n}-s_{n-1}=\left(2-{\frac {1}{3^{n}}}\right)-\left(2-{\frac {1}{3^{n-1}}}\right)={\frac {1}{3^{n-1}}}-{\frac {1}{3^{n}}}={\frac {3}{3^{n}}}-{\frac {1}{3^{n}}}={\frac {2}{3^{n}}}$
Note that the series turns out to be geometric, since
    $a_{n}=2\,(1/3)^{n}=a\,r^{n}.$
$a_{n}=s_{n}-s_{n-1}=\left(2-{\frac {1}{3^{n}}}\right)-\left(2-{\frac {1}{3^{n-1}}}\right)={\frac {1}{3^{n-1}}}-{\frac {1}{3^{n}}}={\frac {3}{3^{n}}}-{\frac {1}{3^{n}}}={\frac {2}{3^{n}}}$
Note that the series turns out to be geometric, since
    $a_{n}=2\,(1/3)^{n}=a\,r^{n}.$

## Sums of infinite series

Find the value to which each of the following series converges.
* $\sum _{n=0}^{\infty }{\frac {3}{4^{n}}}$
    $\sum _{n=0}^{\infty }3\left({\frac {1}{4}}\right)^{n}$
and so is geometric with first term $a=3$ and common ratio $r=1/4$. So
    $s={\frac {a}{1-r}}={\frac {3}{1-1/4}}=4.$
    $\sum _{n=0}^{\infty }3\left({\frac {1}{4}}\right)^{n}$
and so is geometric with first term $a=3$ and common ratio $r=1/4$. So
    $s={\frac {a}{1-r}}={\frac {3}{1-1/4}}=4.$
* $\sum _{n=1}^{\infty }\left({\frac {2}{e}}\right)^{n}$
${\frac {2}{e-2}}$
${\frac {2}{e-2}}$
$s={\frac {2/e}{1-2/e}}={\frac {2}{e-2}}$
$s={\frac {2/e}{1-2/e}}={\frac {2}{e-2}}$
* $\sum _{n=2}^{\infty }{\frac {1}{n^{2}-n}}$
    $\sum _{n=2}^{\infty }{\frac {1}{n^{2}-n}}=\sum _{n=2}^{\infty }{\frac {1}{n(n-1)}}=\sum _{n=2}^{\infty }\left({\frac {1}{n-1}}-{\frac {1}{n}}\right)$
by partial fractions. So
    $s=\lim _{N\to \infty }s_{N}=\lim _{N\to \infty }\left(1-{\frac {1}{2}}\right)+\left({\frac {1}{2}}-{\frac {1}{3}}\right)+\left({\frac {1}{3}}-{\frac {1}{4}}\right)+\ldots +\left({\frac {1}{N-1}}-{\frac {1}{N}}\right).$
All but the first and last terms cancel out, so
    $s=\lim _{N\to \infty }\left(1-{\frac {1}{N}}\right)=1.$
    $\sum _{n=2}^{\infty }{\frac {1}{n^{2}-n}}=\sum _{n=2}^{\infty }{\frac {1}{n(n-1)}}=\sum _{n=2}^{\infty }\left({\frac {1}{n-1}}-{\frac {1}{n}}\right)$
by partial fractions. So
    $s=\lim _{N\to \infty }s_{N}=\lim _{N\to \infty }\left(1-{\frac {1}{2}}\right)+\left({\frac {1}{2}}-{\frac {1}{3}}\right)+\left({\frac {1}{3}}-{\frac {1}{4}}\right)+\ldots +\left({\frac {1}{N-1}}-{\frac {1}{N}}\right).$
All but the first and last terms cancel out, so
    $s=\lim _{N\to \infty }\left(1-{\frac {1}{N}}\right)=1.$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}2^{n-1}}{3^{n}}}$
    $\sum _{n=1}^{\infty }{\frac {(-1)^{n}2^{n}}{3^{n}\cdot 2}}=\sum _{n=1}^{\infty }{\frac {1}{2}}\left({\frac {-2}{3}}\right)^{n}$
and so is geometric with common ratio $r=-2/3$ and first term $-1/3$. Thus
    $s={\frac {-1/3}{1-(-2/3)}}=-1/5.$
    $\sum _{n=1}^{\infty }{\frac {(-1)^{n}2^{n}}{3^{n}\cdot 2}}=\sum _{n=1}^{\infty }{\frac {1}{2}}\left({\frac {-2}{3}}\right)^{n}$
and so is geometric with common ratio $r=-2/3$ and first term $-1/3$. Thus
    $s={\frac {-1/3}{1-(-2/3)}}=-1/5.$

## Convergence and divergence of infinite series

Determine whether each of the following series converges or diverges. (Note: Each "Hint" gives the convergence/divergence test required to draw a conclusion.)
* $\sum _{n=1}^{\infty }{\frac {1}{n^{2}}}$
$p=2$
$p>1$
$p=2$
$p>1$
* $\sum _{n=0}^{\infty }{\frac {1}{2^{n}}}$
$r=1/2$
$|r|<1$
$r=1/2$
$|r|<1$
* $\sum _{n=1}^{\infty }{\frac {n}{n^{2}+1}}$
    $\sum _{n=1}^{\infty }{\frac {n}{n^{2}+1}}\sim \sum _{n=1}^{\infty }{\frac {n}{n^{2}}}=\sum _{n=1}^{\infty }{\frac {1}{n}}$
The $\sim$ symbol means the two series are "asymptotically equivalent"—that is, they either both converge or both diverge because their terms behave so similarly when summed as n gets very large. This can be shown by the limit comparison test:
    $\lim _{n\to \infty }\left({\frac {n}{n^{2}+1}}\div {\frac {1}{n}}\right)=\lim _{n\to \infty }\left({\frac {n}{n^{2}+1}}\cdot {\frac {n}{1}}\right)=\lim _{n\to \infty }{\frac {n^{2}}{n^{2}+1}}=1$
$p=1$
    $\sum _{n=1}^{\infty }{\frac {n}{n^{2}+1}}\sim \sum _{n=1}^{\infty }{\frac {n}{n^{2}}}=\sum _{n=1}^{\infty }{\frac {1}{n}}$
The $\sim$ symbol means the two series are "asymptotically equivalent"—that is, they either both converge or both diverge because their terms behave so similarly when summed as n gets very large. This can be shown by the limit comparison test:
    $\lim _{n\to \infty }\left({\frac {n}{n^{2}+1}}\div {\frac {1}{n}}\right)=\lim _{n\to \infty }\left({\frac {n}{n^{2}+1}}\cdot {\frac {n}{1}}\right)=\lim _{n\to \infty }{\frac {n^{2}}{n^{2}+1}}=1$
$p=1$
* $\sum _{n=2}^{\infty }{\frac {1}{\ln n}}$
    $\sum _{n=2}^{\infty }{\frac {1}{\ln n}}\geq \sum _{n=2}^{\infty }{\frac {1}{n}}$
$p=1$
    $\sum _{n=2}^{\infty }{\frac {1}{\ln n}}\geq \sum _{n=2}^{\infty }{\frac {1}{n}}$
$p=1$
* $\sum _{n=0}^{\infty }{\frac {n!}{2^{n}}}$
$n>1$
    ${\frac {n!}{2^{n}}}={\frac {n}{2}}\cdot \left[{\frac {n-1}{2}}\cdot {\frac {n-2}{2}}\dots {\frac {2}{2}}\right]\cdot {\frac {1}{2}}\geq {\frac {n}{2}}\cdot (1)\cdot {\frac {1}{2}}={\frac {n}{4}}$
To see why the inequality holds, consider that when $n=2$ none of the fractions in the square brackets above are actually there; when $n=3$ only 2/2 (which is the same as $[n-1]/2$) is in the brackets; when $n=4$ only 3/2 (equal to $[n-1]/2$) and 2/2 (equal to $[n-2]/2$) are there; when $n=5$, only 4/2, 3/2, and 2/2 are there; and so forth. Clearly none of these fractions are less than 1 and they never will be, no matter what $n>1$ is used.
The fact that
    $\lim _{n\to \infty }{\frac {n}{4}}=\infty$
then implies that
    $\lim _{n\to \infty }{\frac {n!}{2^{n}}}=\infty$
$n>1$
    ${\frac {n!}{2^{n}}}={\frac {n}{2}}\cdot \left[{\frac {n-1}{2}}\cdot {\frac {n-2}{2}}\dots {\frac {2}{2}}\right]\cdot {\frac {1}{2}}\geq {\frac {n}{2}}\cdot (1)\cdot {\frac {1}{2}}={\frac {n}{4}}$
To see why the inequality holds, consider that when $n=2$ none of the fractions in the square brackets above are actually there; when $n=3$ only 2/2 (which is the same as $[n-1]/2$) is in the brackets; when $n=4$ only 3/2 (equal to $[n-1]/2$) and 2/2 (equal to $[n-2]/2$) are there; when $n=5$, only 4/2, 3/2, and 2/2 are there; and so forth. Clearly none of these fractions are less than 1 and they never will be, no matter what $n>1$ is used.
The fact that
    $\lim _{n\to \infty }{\frac {n}{4}}=\infty$
then implies that
    $\lim _{n\to \infty }{\frac {n!}{2^{n}}}=\infty$
* $\sum _{n=1}^{\infty }{\frac {\cos \pi n}{n}}$
    $\sum _{n=1}^{\infty }{\frac {\cos \pi n}{n}}=\sum _{n=1}^{\infty }{\frac {(-1)^{n}}{n}}$
Since the sequence
    $|a_{n}|={\frac {1}{n}}$
    $\sum _{n=1}^{\infty }{\frac {\cos \pi n}{n}}=\sum _{n=1}^{\infty }{\frac {(-1)^{n}}{n}}$
Since the sequence
    $|a_{n}|={\frac {1}{n}}$
* $\sum _{n=2}^{\infty }{\frac {(-1)^{n}}{n\ln n-1}}$
    $|a_{n}|={\frac {1}{n\ln n-1}}$
$\ln n$
$n\geq 2$
    $|a_{n}|={\frac {1}{n\ln n-1}}$
$\ln n$
$n\geq 2$

## Absolute and conditional convergence

Determine whether each of the following series converges conditionally, converges absolutely, or diverges. (Note: Each "Hint" gives the test or tests that most easily lead to the final conclusion.)
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}}{\sqrt {n}}}$
    $|a_{n}|={\frac {1}{\sqrt {n}}}$
Since this sequence is clearly decreasing to zero, the original series is convergent by the alternating series test. Now, consider the series formed by taking the absolute value of the terms of the original series:
    $\sum |a_{n}|=\sum _{n=1}^{\infty }{\frac {1}{\sqrt {n}}}$
This new series can be compared to a p-series:
    $\sum _{n=1}^{\infty }{\frac {1}{\sqrt {n}}}\geq \sum _{n=1}^{\infty }{\frac {1}{n}}$
    $|a_{n}|={\frac {1}{\sqrt {n}}}$
Since this sequence is clearly decreasing to zero, the original series is convergent by the alternating series test. Now, consider the series formed by taking the absolute value of the terms of the original series:
    $\sum |a_{n}|=\sum _{n=1}^{\infty }{\frac {1}{\sqrt {n}}}$
This new series can be compared to a p-series:
    $\sum _{n=1}^{\infty }{\frac {1}{\sqrt {n}}}\geq \sum _{n=1}^{\infty }{\frac {1}{n}}$
* $\sum _{n=2}^{\infty }{\frac {(-1)^{n}\ln n}{n}}$
    $|a_{n}|={\frac {\ln n}{n}}$
This sequence has a limit of zero by, for example, L'Hospital's Rule.
    $\lim _{n\to \infty }{\frac {\ln n}{n}}=\lim _{n\to \infty }{\frac {1/n}{1}}=0$
That the sequence is decreasing can be verified by, for example, showing that as a continuous function of x, its derivative is negative.
    ${\frac {d}{dx}}\,{\frac {\ln x}{x}}={\frac {1-\ln x}{x^{2}}}<0{\mbox{ if }}x>e$
This means that the terms definitely decrease starting with the second term ($n=3$). Thus, the series starting at $n=3$ is convergent by the alternating series test; clearly, then, the series starting at $n=2$ also converges (since the two series only differ by one term). Now, consider the series formed by taking the absolute value of the terms of the original series:
    $\sum |a_{n}|=\sum _{n=2}^{\infty }{\frac {\ln n}{n}}$
This new series of positive terms only can be compared to a p-series:
    $\sum _{n=2}^{\infty }{\frac {\ln n}{n}}\geq \sum _{n=2}^{\infty }{\frac {1}{n}}$
Since the smaller series diverges, the larger one diverges. Alternatively, the integral test can be used to test the convergence of the series of positive terms, since $f(x)={\frac {\ln x}{x}}$ is clearly a continuous, positive function on $[2,\infty )$ and, as we have just verified, is also decreasing:
    $\int _{2}^{\infty }{\frac {\ln x}{x}}\,dx=\lim _{t\to \infty }\int _{2}^{t}{\frac {\ln x}{x}}\,dx=\lim _{t\to \infty }\int _{\ln 2}^{\ln t}u\,du$
by the substitution $u=\ln x$; and this last expression becomes
    $\lim _{t\to \infty }{\Bigl{\frac {1}{2}}u^{2}{\bigr |}_{\ln 2}^{\ln t}{\Bigr )}=\lim _{t\to \infty }{\frac {1}{2}}(\ln t)^{2}-{\frac {1}{2}}(\ln 2)^{2}=\infty$
Since the improper integral diverges, the series of positive terms diverges.
    $|a_{n}|={\frac {\ln n}{n}}$
This sequence has a limit of zero by, for example, L'Hospital's Rule.
    $\lim _{n\to \infty }{\frac {\ln n}{n}}=\lim _{n\to \infty }{\frac {1/n}{1}}=0$
That the sequence is decreasing can be verified by, for example, showing that as a continuous function of x, its derivative is negative.
    ${\frac {d}{dx}}\,{\frac {\ln x}{x}}={\frac {1-\ln x}{x^{2}}}<0{\mbox{ if }}x>e$
This means that the terms definitely decrease starting with the second term ($n=3$). Thus, the series starting at $n=3$ is convergent by the alternating series test; clearly, then, the series starting at $n=2$ also converges (since the two series only differ by one term). Now, consider the series formed by taking the absolute value of the terms of the original series:
    $\sum |a_{n}|=\sum _{n=2}^{\infty }{\frac {\ln n}{n}}$
This new series of positive terms only can be compared to a p-series:
    $\sum _{n=2}^{\infty }{\frac {\ln n}{n}}\geq \sum _{n=2}^{\infty }{\frac {1}{n}}$
Since the smaller series diverges, the larger one diverges. Alternatively, the integral test can be used to test the convergence of the series of positive terms, since $f(x)={\frac {\ln x}{x}}$ is clearly a continuous, positive function on $[2,\infty )$ and, as we have just verified, is also decreasing:
    $\int _{2}^{\infty }{\frac {\ln x}{x}}\,dx=\lim _{t\to \infty }\int _{2}^{t}{\frac {\ln x}{x}}\,dx=\lim _{t\to \infty }\int _{\ln 2}^{\ln t}u\,du$
by the substitution $u=\ln x$; and this last expression becomes
    $\lim _{t\to \infty }{\Bigl{\frac {1}{2}}u^{2}{\bigr |}_{\ln 2}^{\ln t}{\Bigr )}=\lim _{t\to \infty }{\frac {1}{2}}(\ln t)^{2}-{\frac {1}{2}}(\ln 2)^{2}=\infty$
Since the improper integral diverges, the series of positive terms diverges.
* $\sum _{n=2}^{\infty }{\frac {(-1)^{n}n}{(\ln n)^{2}}}$
    $\lim _{n\to \infty }{\frac {n}{(\ln n)^{2}}}=\lim _{n\to \infty }{\frac {1}{2(\ln n)(1/n)}}=\lim _{n\to \infty }{\frac {n}{2\ln n}}$
    ${\mbox{ }}=\lim _{n\to \infty }{\frac {1}{2/n}}=\lim _{n\to \infty }{\frac {n}{2}}=\infty$
Which implies that
    $\lim _{n\to \infty }{\frac {(-1)^{n}n}{(\ln n)^{2}}}$
    $\lim _{n\to \infty }{\frac {n}{(\ln n)^{2}}}=\lim _{n\to \infty }{\frac {1}{2(\ln n)(1/n)}}=\lim _{n\to \infty }{\frac {n}{2\ln n}}$
    ${\mbox{ }}=\lim _{n\to \infty }{\frac {1}{2/n}}=\lim _{n\to \infty }{\frac {n}{2}}=\infty$
Which implies that
    $\lim _{n\to \infty }{\frac {(-1)^{n}n}{(\ln n)^{2}}}$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}2^{n}}{e^{n}-1}}$
    $\sum _{n=1}^{\infty }|a_{n}|=\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}$
This series of positive terms is asymptotically geometric with $r=2/e$:
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\sim \sum _{n=1}^{\infty }(2/e)^{n}$
The equivalence of these series is shown by using a limit comparison test:
    $\lim _{n\to \infty }\left[{\frac {2^{n}}{e^{n}-1}}\div (2/e)^{n}\right]=\lim _{n\to \infty }\left({\frac {2^{n}}{2^{n}}}\cdot {\frac {e^{n}}{e^{n}-1}}\right)=\lim _{n\to \infty }{\frac {1}{1-1/e^{n}}}=1$
Since the limit is positive and finite, and since the simpler series converges because it geometric with $r=2/e$ (the absolute value of which is less than 1), then the series of positive terms converges by the limit comparison test. Thus the original alternating series is absolutely convergent.
Note, by the way, that a direct comparison test in this case is more difficult (although still possible to do), since
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\geq \sum _{n=1}^{\infty }(2/e)^{n}$
and we need the inequality to go the other way to get a conclusion, since the geometric series converges.
This can be fixed by choosing the new series more carefully:
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\leq \sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-.5e^{n}}}=\sum _{n=1}^{\infty }{\frac {2^{n}}{.5e^{n}}}=\sum _{n=1}^{\infty }2(2/e)^{n}$
    $\sum _{n=1}^{\infty }|a_{n}|=\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}$
This series of positive terms is asymptotically geometric with $r=2/e$:
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\sim \sum _{n=1}^{\infty }(2/e)^{n}$
The equivalence of these series is shown by using a limit comparison test:
    $\lim _{n\to \infty }\left[{\frac {2^{n}}{e^{n}-1}}\div (2/e)^{n}\right]=\lim _{n\to \infty }\left({\frac {2^{n}}{2^{n}}}\cdot {\frac {e^{n}}{e^{n}-1}}\right)=\lim _{n\to \infty }{\frac {1}{1-1/e^{n}}}=1$
Since the limit is positive and finite, and since the simpler series converges because it geometric with $r=2/e$ (the absolute value of which is less than 1), then the series of positive terms converges by the limit comparison test. Thus the original alternating series is absolutely convergent.
Note, by the way, that a direct comparison test in this case is more difficult (although still possible to do), since
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\geq \sum _{n=1}^{\infty }(2/e)^{n}$
and we need the inequality to go the other way to get a conclusion, since the geometric series converges.
This can be fixed by choosing the new series more carefully:
    $\sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-1}}\leq \sum _{n=1}^{\infty }{\frac {2^{n}}{e^{n}-.5e^{n}}}=\sum _{n=1}^{\infty }{\frac {2^{n}}{.5e^{n}}}=\sum _{n=1}^{\infty }2(2/e)^{n}$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}}{\sin ^{2}n}}$
    $|a_{n}|={\frac {1}{\sin ^{2}n}}$
Because
    $\lim _{n\to \infty }\sin ^{2}n$
does not exist (since it continually oscillates within the interval $[0,1]$ as n gets larger)
    $\lim _{n\to \infty }{\frac {1}{\sin ^{2}n}}$
doesn't exist either. Thus the alternating series test fails (it is inconclusive).
However, in such a situation we can use the divergence test instead. Since
    $\lim _{n\to \infty }{\frac {(-1)^{n}}{\sin ^{2}n}}$
    $|a_{n}|={\frac {1}{\sin ^{2}n}}$
Because
    $\lim _{n\to \infty }\sin ^{2}n$
does not exist (since it continually oscillates within the interval $[0,1]$ as n gets larger)
    $\lim _{n\to \infty }{\frac {1}{\sin ^{2}n}}$
doesn't exist either. Thus the alternating series test fails (it is inconclusive).
However, in such a situation we can use the divergence test instead. Since
    $\lim _{n\to \infty }{\frac {(-1)^{n}}{\sin ^{2}n}}$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}n!}{(2n)!}}$
    $\lim _{n\to \infty }\left|{\frac {(-1)^{n+1}(n+1)!}{[2(n+1)]!}}\div {\frac {(-1)^{n}n!}{(2n)!}}\right|=\lim _{n\to \infty }{\frac {(n+1)!}{n!}}\cdot {\frac {(2n)!}{(2n+2)!}}=\lim _{n\to \infty }{\frac {(n+1)}{(2n+2)(2n+1)}}=\lim _{n\to \infty }{\frac {1}{2(2n+1)}}=0$
    $\lim _{n\to \infty }\left|{\frac {(-1)^{n+1}(n+1)!}{[2(n+1)]!}}\div {\frac {(-1)^{n}n!}{(2n)!}}\right|=\lim _{n\to \infty }{\frac {(n+1)!}{n!}}\cdot {\frac {(2n)!}{(2n+2)!}}=\lim _{n\to \infty }{\frac {(n+1)}{(2n+2)(2n+1)}}=\lim _{n\to \infty }{\frac {1}{2(2n+1)}}=0$
* $\sum _{n=1}^{\infty }{\frac {(-1)^{n}e^{1/n}}{\arctan n}}$
Note that
    $\lim _{n\to \infty }{\frac {e^{1/n}}{\arctan n}}={\frac {e^{0}}{\pi /2}}={\frac {2}{\pi }}\neq 0$
Thus
    $\lim _{n\to \infty }{\frac {(-1)^{n}e^{1/n}}{\arctan n}}\neq 0$
Note that
    $\lim _{n\to \infty }{\frac {e^{1/n}}{\arctan n}}={\frac {e^{0}}{\pi /2}}={\frac {2}{\pi }}\neq 0$
Thus
    $\lim _{n\to \infty }{\frac {(-1)^{n}e^{1/n}}{\arctan n}}\neq 0$

## Taylor series

Find the Taylor series for the following functions centered at the given values.
* $f(x)=(1+3x)^{2},\ a=1$
$f(x)=16+24(x-1)+9(x-1)^{2}$
$f(x)=16+24(x-1)+9(x-1)^{2}$
    $f(a)=16$
    $f'(x)=2(1+3x)(3)=6(1+3x)\longrightarrow f'(a)=24$
    $f''(x)=6(3)=18\longrightarrow f''(a)=18$
    $f'''(x)=0\longrightarrow f'''(a)=0$
All higher derivatives are also zero, so the Taylor expansion of the function:
    $f(x)=f(a)+f'(a)(x-a)+{\frac {f''(a)}{2!}}(x-a)^{2}+{\frac {f'''(a)}{3!}}(x-a)^{3}+\dots$
becomes simply:
    $f(x)=16+24(x-1)+{\frac {18}{2}}(x-1)^{2}$
    $=16+24(x-1)+9(x-1)^{2}$
    $f(a)=16$
    $f'(x)=2(1+3x)(3)=6(1+3x)\longrightarrow f'(a)=24$
    $f''(x)=6(3)=18\longrightarrow f''(a)=18$
    $f'''(x)=0\longrightarrow f'''(a)=0$
All higher derivatives are also zero, so the Taylor expansion of the function:
    $f(x)=f(a)+f'(a)(x-a)+{\frac {f''(a)}{2!}}(x-a)^{2}+{\frac {f'''(a)}{3!}}(x-a)^{3}+\dots$
becomes simply:
    $f(x)=16+24(x-1)+{\frac {18}{2}}(x-1)^{2}$
    $=16+24(x-1)+9(x-1)^{2}$
* $f(x)={\frac {1}{5-2x}},\ a=2$
$f(x)=\sum _{n=0}^{\infty }2^{n}(x-2)^{n}$
$f(x)=\sum _{n=0}^{\infty }2^{n}(x-2)^{n}$
    $f(x)=(5-2x)^{-1}$
The answer is better written in summation form because the Taylor expansion does not terminate. It is convenient to keep the numbers resulting from the power rule separate from the numbers resulting from the chain rule, so we can see the pattern:
    $f(a)=1$
    $f'(x)=(-1)(5-2x)^{-2}(-2)=(1)(5-2x)^{-2}(2)\longrightarrow f'(a)=1\cdot 2$
    $f''(x)=(-1)(-2)(5-2x)^{-3}(-2)(-2)=(1\cdot 2)(5-2x)^{-3}(2^{2})\longrightarrow f''(a)=(1\cdot 2)(2^{2})$
    $f'''(x)=(-1)(-2)(-3)(5-2x)^{-4}(-2)(-2)(-2)=(1\cdot 2\cdot 3)(5-2x)^{-4}(2^{3})\longrightarrow f'''(a)=(1\cdot 2\cdot 3)(2^{3})$
    $f^{(4)}(x)=(-1)(-2)(-3)(-4)(5-2x)^{-4}(-2)(-2)(-2)(-2)=(1\cdot 2\cdot 3\cdot 4)(5-2x)^{-4}(2^{4})\longrightarrow f^{(4)}(a)=(1\cdot 2\cdot 3\cdot 4)(2^{4})$
The pattern in the derivative values is:
    $f^{(n)}(a)=n!\,2^{n}$
So the Taylor series is:
    $f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}=\sum _{n=0}^{\infty }{\frac {n!\,2^{n}}{n!}}(x-2)^{n}$
    $=\sum _{n=0}^{\infty }2^{n}(x-2)^{n}$
    $f(x)=(5-2x)^{-1}$
The answer is better written in summation form because the Taylor expansion does not terminate. It is convenient to keep the numbers resulting from the power rule separate from the numbers resulting from the chain rule, so we can see the pattern:
    $f(a)=1$
    $f'(x)=(-1)(5-2x)^{-2}(-2)=(1)(5-2x)^{-2}(2)\longrightarrow f'(a)=1\cdot 2$
    $f''(x)=(-1)(-2)(5-2x)^{-3}(-2)(-2)=(1\cdot 2)(5-2x)^{-3}(2^{2})\longrightarrow f''(a)=(1\cdot 2)(2^{2})$
    $f'''(x)=(-1)(-2)(-3)(5-2x)^{-4}(-2)(-2)(-2)=(1\cdot 2\cdot 3)(5-2x)^{-4}(2^{3})\longrightarrow f'''(a)=(1\cdot 2\cdot 3)(2^{3})$
    $f^{(4)}(x)=(-1)(-2)(-3)(-4)(5-2x)^{-4}(-2)(-2)(-2)(-2)=(1\cdot 2\cdot 3\cdot 4)(5-2x)^{-4}(2^{4})\longrightarrow f^{(4)}(a)=(1\cdot 2\cdot 3\cdot 4)(2^{4})$
The pattern in the derivative values is:
    $f^{(n)}(a)=n!\,2^{n}$
So the Taylor series is:
    $f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}=\sum _{n=0}^{\infty }{\frac {n!\,2^{n}}{n!}}(x-2)^{n}$
    $=\sum _{n=0}^{\infty }2^{n}(x-2)^{n}$
* $f(x)=\sin ^{2}3x,\ a={\frac {\pi }{4}}$
$={\frac {1}{2}}+{\frac {1}{2}}\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}\,6^{2n+1}}{(2n+1)!}}{\Biglx-{\frac {\pi }{4}}{\Bigr )}^{2n+1}$
$={\frac {1}{2}}+{\frac {1}{2}}\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}\,6^{2n+1}}{(2n+1)!}}{\Biglx-{\frac {\pi }{4}}{\Bigr )}^{2n+1}$
    $f(x)={\frac {1}{2}}-{\frac {1}{2}}\cos 6x$
Thus:
    $f(a)=(1/2)-(1/2)\cos(3\pi /2)=1/2$
    $f'(x)=(1/2)(\sin 6x)(6)\longrightarrow f'(a)=(1/2)(-1)(6)$
    $f''(x)=(1/2)(\cos 6x)(6^{2})\longrightarrow f''(a)=0$
    $f'''(x)=(1/2)(-\sin 6x)(6^{3})\longrightarrow f'''(a)=(1/2)(1)(6^{3})$
    $f^{(4)}(x)=(1/2)(-\cos 6x)(6^{4})\longrightarrow f'''(a)=0$
    $f^{(5)}(x)=(1/2)(\sin 6x)(6^{5})\longrightarrow f'''(a)=(1/2)(-1)(6^{5})$
The pattern in the derivative values is tricky:
    $f^{(n)}(a)={\begin{cases}1/2&{\text{if }}n=0\\(1/2)(-1)^{(n+1)/2}(6^{n})&{\text{if }}n>0{\text{ and odd}}\\0&{\text{if }}n>0{\text{ and even}}\end{cases}}$
This is quite an awkward formula for the nth derivative. Don't worry at this point about the expression (−1)$^{(n+1)/2}$ in the middle case; we're going to use a simpler version in the final series. Do, however, note the following:
* The n = 0 case [i.e., f(a)] doesn't match the rest of the pattern.
* When n is positive and even, the value is 0, so the "even-derivative" terms don't contribute anything to the series.
This means we can rewrite Taylor's formula
    $f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}$
as
    $f(x)=f(a)+\sum _{n=1}^{\infty }{\frac {f^{(2n+1)}(a)}{(2n+1)!}}(x-a)^{2n+1}$
where
    $f^{(2n+1)}(a)=(1/2)(-1)^{n+1}(6^{2n+1})$
Note that the expression 2n + 1 is always odd and starts with the value 3 when n is 1. Thus n = 1 corresponds to the third derivative, n = 2 the fifth derivative, and so on. It should be clear that (−1)$^{n+1}$ gives the correct signs for these derivative values.
Therefore the Taylor series is:
    $f(x)=1/2+\sum _{n=1}^{\infty }{\frac {(1/2)(-1)^{n+1}(6^{2n+1})}{(2n+1)!}}(x-\pi /4)^{2n+1}$
    $={\frac {1}{2}}+{\frac {1}{2}}\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}\,6^{2n+1}}{(2n+1)!}}{\Biglx-{\frac {\pi }{4}}{\Bigr )}^{2n+1}$
    $f(x)={\frac {1}{2}}-{\frac {1}{2}}\cos 6x$
Thus:
    $f(a)=(1/2)-(1/2)\cos(3\pi /2)=1/2$
    $f'(x)=(1/2)(\sin 6x)(6)\longrightarrow f'(a)=(1/2)(-1)(6)$
    $f''(x)=(1/2)(\cos 6x)(6^{2})\longrightarrow f''(a)=0$
    $f'''(x)=(1/2)(-\sin 6x)(6^{3})\longrightarrow f'''(a)=(1/2)(1)(6^{3})$
    $f^{(4)}(x)=(1/2)(-\cos 6x)(6^{4})\longrightarrow f'''(a)=0$
    $f^{(5)}(x)=(1/2)(\sin 6x)(6^{5})\longrightarrow f'''(a)=(1/2)(-1)(6^{5})$
The pattern in the derivative values is tricky:
    $f^{(n)}(a)={\begin{cases}1/2&{\text{if }}n=0\\(1/2)(-1)^{(n+1)/2}(6^{n})&{\text{if }}n>0{\text{ and odd}}\\0&{\text{if }}n>0{\text{ and even}}\end{cases}}$
This is quite an awkward formula for the nth derivative. Don't worry at this point about the expression (−1)$^{(n+1)/2}$ in the middle case; we're going to use a simpler version in the final series. Do, however, note the following:
* The n = 0 case [i.e., f(a)] doesn't match the rest of the pattern.
* When n is positive and even, the value is 0, so the "even-derivative" terms don't contribute anything to the series.
This means we can rewrite Taylor's formula
    $f(x)=\sum _{n=0}^{\infty }{\frac {f^{(n)}(a)}{n!}}(x-a)^{n}$
as
    $f(x)=f(a)+\sum _{n=1}^{\infty }{\frac {f^{(2n+1)}(a)}{(2n+1)!}}(x-a)^{2n+1}$
where
    $f^{(2n+1)}(a)=(1/2)(-1)^{n+1}(6^{2n+1})$
Note that the expression 2n + 1 is always odd and starts with the value 3 when n is 1. Thus n = 1 corresponds to the third derivative, n = 2 the fifth derivative, and so on. It should be clear that (−1)$^{n+1}$ gives the correct signs for these derivative values.
Therefore the Taylor series is:
    $f(x)=1/2+\sum _{n=1}^{\infty }{\frac {(1/2)(-1)^{n+1}(6^{2n+1})}{(2n+1)!}}(x-\pi /4)^{2n+1}$
    $={\frac {1}{2}}+{\frac {1}{2}}\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}\,6^{2n+1}}{(2n+1)!}}{\Biglx-{\frac {\pi }{4}}{\Bigr )}^{2n+1}$