\newcommand{\ig}[1]{}

\documentclass[12pt,letterpaper]{article}

\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{fullpage}

\usepackage{hyperref}

\title{Week 15 Recitation}
\author{Robert Woodward}

\begin{document}
\maketitle

\begin{itemize}
\item Questions about lecture / homework so far?


\item
Show how to do summation in Maple
\begin{enumerate}
\item
SSH into cse.unl.edu

\item
Type in ``maple'' to launch Maple

\item
Type in ``sum(\emph{What to Sum}, \emph{Over what range});''. For
example, to sum $\sum_{k = 1}^{10} k^2$, you would type ``sum(k\^{}2, k
= 1..10);''. Another example, to sum $\sum_{k=1}^{n} k^2$, you would type
``sum(k\^{}2,k = 1..n);''.
\end{enumerate}

\item
(Similar to Rosen 2.4, problem 5a)
Write the general summation expression of:
\begin{quote}
the sum of the first $n$ numbers that begins with 2 and in which each
successive term is 3 more than the preceding term
\end{quote}

First, recall that:
$\sum_{i=m}^n i = {(n-m+1)(n+m) \over 2}$, and
$\sum_{i=m}^n 1 = n -m + 1$.

First we can write out the sequence to get an idea of what it will
look like: \[\{2, 5, 8, 11, 14, 17, 20,\ldots\}.\] This sequence is an
\emph{arithmetic progression} and is of the form $a + nd$, where $a$
is the initial term and $d$ is the common difference.  Therefore, the
\emph{closed form} of the summation, or series, is:
\begin{eqnarray}
\sum_{i = 0}^{n-1} (2 + i\times 3) &=& \sum_{i = 0}^{n-1} (2 + 3i)
= 2\sum_{i = 0}^{n-1} 1 + 3\sum_{i= 0}^{n-1}i \nonumber\\
&=& 2 ((n-1)-0+1) + 3 \frac{(n-1)((n-1)+1)}{2} \nonumber\\
&=& 2 n + \frac{3}{2}n(n-1) \nonumber\\
&=& \frac{n(3n+1)}{2} \nonumber
\end{eqnarray}


\item
(Rosen 2.4.19) Show that $\sum_{j=1}^n (a_j - a_{j-1}) = a_n - a_0$, where
$a_0, a_1, \ldots, a_n$ is a sequence of real numbers.  This type of sum is called telescoping.

We can write out this summation as: $$(a_1 - a_{0}) + (a_2 - a_{1}) + (a_3 - a_{2}) + \ldots + (a_{n-1} - a_{n-2}) + (a_{n} - a_{n-1})$$

Notice what we can cancel out $a_1$ and $- a_1$, $a_2$ and $- {a_2}$ all the way up to $a_{n-1}$ and $- a_{n-1}$.
This leaves us with $-{a_0}$ and $a_n$, which is $a_n - a_0$.

\item
(Similar to Rosen 2.4, Problem 17(a), Page 162): Compute $\sum_{i=1}^n \sum_{j=i}^m (i+j)$

Recall that $\sum_{k=m}^n k^2 = -\frac{1}{6}(m-n-1)(2m^2+2mn - m + 2n^2 + n)$, alternatively,
$\sum_{k=1}^{m} k^2 = {n(n+1)(2n+1) \over 6}$.

\begin{eqnarray}
\sum_{i=1}^n \sum_{j=i}^m (i+j) 
& = & \sum_{i=1}^n (\sum_{j=i}^m i + \sum_{j=i}^m j)\label{ln:split}\\
& = & \sum_{i=1}^n (i \sum_{j=i}^m 1 + \sum_{j=i}^m j)\label{ln:movei}\\
& = & \sum_{i=1}^n (i \times (m-i+1) + {(m-i+1)(m+i) \over 2})\label{ln:inner}\\
& = & \sum_{i=1}^n (m \times i - i^2 + i + {m^2 + m \times i - m \times i - i^2 + m + i \over 2})\\
& = & \sum_{i=1}^n (m \times i - i^2 + i + {m^2 \over 2} - {i^2 \over 2} + {m \over 2} + {i \over 2})\\
& = & \sum_{i=1}^n (-\frac{3}{2}i^2 + (m + \frac{3}{2})i + ({m^2 \over 2} + {m \over 2}))\label{ln:outer}\\
& = & -\frac{3}{2} \sum_{i=1}^n i^2 + (m + \frac{3}{2})\sum_{i=1}^n i + ({m^2 \over 2} + {m \over 2}) \sum_{i=1}^n 1\\
& = & -\frac{3}{2} {n(n+1)(2n+1) \over 6} + (m + \frac{3}{2}){(n-1+1)(n+1) \over 2} \nonumber\\
&    & + ({m^2 \over 2} + {m \over 2}) (n - 1 + 1) \\
& = & -\frac{3}{2} {n(n+1)(2n+1) \over 6} + (m + \frac{3}{2}){n(n+1) \over 2} + ({m^2 \over 2} + {m \over 2})n
\end{eqnarray}
\begin{itemize}
\item
In~(\ref{ln:split}), we split the terms in the inner summation.

\item
In~(\ref{ln:movei}), we move $i$ outside the second summation because the index of
the summation does not depend on $i$.  It is as if $i$ was a constant.
\item
In~(\ref{ln:inner}), we compute the two inner summations.
\item
In~(\ref{ln:outer}), we split the terms in the unique summation left.
\item
The rest should be straightforward.
\end{itemize}

\item
(Rosen 2.4, Problem 17(a), Page 162): Compute $\sum_{i=1}^2 \sum_{j=1}^3 (i+j)$

\begin{eqnarray}
\sum_{i=1}^2 \sum_{j=1}^3 (i+j) 
& = & \sum_{i=1}^2 (\sum_{j=1}^3 i + \sum_{j=1}^3 j)\label{17a:split}\\
& = & \sum_{i=1}^2 (i \sum_{j=1}^3 1 + \sum_{j=1}^3 j)\label{17a:movei}\\
& = & \sum_{i=1}^2 (i \times (3-1+1) + {3(3+1) \over 2})\label{17a:inner}\\
& = & \sum_{i=1}^2 (3i + 6)\\
& = & \sum_{i=1}^2 i + 6 \sum_{i=1}^2 1\label{17a:outer}\\
& = & 3 \times {2(2+1) \over 2} + 6 (2+1-1)\\
& = & 3 \times 3 + 6 \times 2\\
& = & 21
\end{eqnarray}
\begin{itemize}
\item
In~(\ref{17a:split}), we split the terms in the inner summation.

\item
In~(\ref{17a:movei}), we move $i$ outside the second summation because the index of
the summation does not depend on $i$.  It is as if $i$ was a constant.
\item
In~(\ref{17a:inner}), we compute the two inner summations.
\item
In~(\ref{17a:outer}), we split the terms in the unique summation left.
\item
The rest should be straightforward.
\end{itemize}

\item (Last 10 minutes) Quiz

\end{itemize}

\end{document}