====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gibson:teaching:fall-2014:math445:lecture10-diary [2014/10/17 10:22] gibson |
gibson:teaching:fall-2014:math445:lecture10-diary [2014/10/17 10:23] (current) gibson |
||
---|---|---|---|
Line 14: | Line 14: | ||
We can also do the sum with a ''for'' loop. To see how to build the ''for'' loop, it's helpful to think of the series as a sequence of //partial sums// | We can also do the sum with a ''for'' loop. To see how to build the ''for'' loop, it's helpful to think of the series as a sequence of //partial sums// | ||
- | \begin{eqnarray*} | ||
- | P_N = \sum_{n=1}^{N} \frac{1}{n^2} | ||
- | \end{eqnarray*} | ||
\begin{eqnarray*} | \begin{eqnarray*} | ||
P_1 = 1 | P_1 = 1 | ||
Line 26: | Line 23: | ||
P_3 = 1 + \frac{1}{2^2} + \frac{1}{3^2} | P_3 = 1 + \frac{1}{2^2} + \frac{1}{3^2} | ||
\end{eqnarray*} | \end{eqnarray*} | ||
- | The Nth partial sum $P_N$ is | + | etc. Note that the difference between successive partial sums is a single term. |
- | \begin{eqnarray*} | + | |
- | P_N = \sum_{n=1}^{N} \frac{1}{n^2} | + | |
- | \end{eqnarray*} | + | |
- | Note that the difference between successive partial sums is a single term. | + | |
\begin{eqnarray*} | \begin{eqnarray*} | ||
P_n = P_{n-1} + \frac{1}{n^2} | P_n = P_{n-1} + \frac{1}{n^2} |