Summations: Essential Formulas, Properties, and Bounding Techniques Explained

Summations Formulas, Properties, and Bounding Techniques

I use summation notation whenever I need to express the addition of a sequence of terms compactly, especially when the number of terms is large or variable. I rely on summations constantly when analyzing algorithm running times, proving mathematical identities, and working with series in calculus and discrete mathematics. I consider summation both a notational convenience and a computational tool, since manipulating a sum symbolically often reveals closed-form results I could never obtain by brute-force addition.

History and Background

I trace the sigma notation ($\sum$) for summation to Leonhard Euler, who introduced it in the 18th century as a compact way to represent sums of series, building on earlier ad hoc notations used by mathematicians studying series convergence. I note that the underlying concept of summing sequences is far older — Archimedes used summation-like reasoning (the method of exhaustion) around 250 BCE to compute areas and volumes, and Indian mathematicians such as Aryabhata derived formulas for sums of squares and cubes around the 5th century CE. I see the formal theory of infinite series developed extensively during the 17th and 18th centuries by Newton, Leibniz, and later Cauchy, who introduced rigorous convergence criteria in the 19th century.

Problem Statement

I use summation to solve the recurring problem of expressing and simplifying the total of many terms, especially when I want a closed-form expression rather than a term-by-term computation. This becomes essential in algorithm analysis, where I need to compute the total work done across all iterations of a loop, and in combinatorics and probability, where sums naturally arise when totaling over cases.

Core Concepts

I define a summation as:

$$ \sum_{i=m}^{n} a_i = a_m + a_{m+1} + \cdots + a_n $$

I rely on key properties:

I also work extensively with closed-form formulas for arithmetic series, geometric series, and power sums, along with asymptotic bounding techniques that approximate sums using integrals.

How It Works

When I evaluate or bound a summation, I follow these steps:

  1. I identify the general term $a_i$ and the bounds of summation.
  2. I check whether a known closed-form formula applies (arithmetic, geometric, or power sum).
  3. If no direct formula applies, I look for a telescoping pattern or attempt to manipulate the sum algebraically (splitting, reindexing, substitution).
  4. If an exact closed form is unavailable or unnecessary, I bound the sum using integral approximation or comparison with a known series.
  5. I verify my result, often using induction or a small test case.

Working Principle

I understand summation manipulation as fundamentally an exercise in reorganizing addition using the associative and commutative properties of arithmetic. Techniques like telescoping work because consecutive terms are constructed to cancel algebraically, leaving only a fixed number of boundary terms regardless of how many terms exist in between. Bounding techniques work because a monotonic function’s sum can be sandwiched between two integrals, since I can interpret each term as the area of a rectangle that either overestimates or underestimates the corresponding sliver of area under the curve.

Mathematical Foundation

I state the arithmetic series formula:

$$ \sum_{i=1}^{n} i = \frac{n(n+1)}{2} $$

I state the sum of squares:

$$ \sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6} $$

I state the sum of cubes:

$$ \sum_{i=1}^{n} i^3 = \left(\frac{n(n+1)}{2}\right)^2 $$

I state the geometric series formula for $r \neq 1$:

$$ \sum_{i=0}^{n} r^i = \frac{r^{n+1} – 1}{r – 1} $$

and for the infinite case with $|r| < 1$:

$$ \sum_{i=0}^{\infty} r^i = \frac{1}{1 – r} $$

I prove the arithmetic series formula using the classic pairing technique (attributed to a young Gauss): I write the sum forwards and backwards,

$$ S = 1 + 2 + \cdots + n, \qquad S = n + (n-1) + \cdots + 1 $$

and add them term by term:

$$ 2S = \underbrace{(n+1) + (n+1) + \cdots + (n+1)}_{n \text{ times}} = n(n+1) $$

giving $S = \frac{n(n+1)}{2}$.

I use the integral bounding technique for a monotonically increasing function $f$:

$$ \int_{m-1}^{n} f(x),dx \le \sum_{i=m}^{n} f(i) \le \int_{m}^{n+1} f(x),dx $$

which I apply, for example, to bound $\sum_{i=1}^{n} \ln i$ and derive Stirling’s approximation:

$$ \ln(n!) = \sum_{i=1}^{n} \ln i \approx n \ln n – n $$

Diagrams

flowchart TD
    A[Given a summation] --> B{Known closed-form pattern?}
    B -->|Arithmetic/Geometric/Power sum| C[Apply direct formula]
    B -->|Telescoping pattern visible| D[Cancel intermediate terms]
    B -->|No direct formula| E[Split or reindex the sum]
    E --> F{Still no closed form?}
    F -->|Yes| G[Approximate using integral bounds]
    F -->|No| C
    C --> H[Return simplified result]
    D --> H
    G --> H

Pseudocode

I write pseudocode for computing a summation directly (useful when no closed form is known or when verifying a derived formula):

function SUM(f, m, n):
    total = 0
    for i from m to n:
        total = total + f(i)
    return total

I also provide pseudocode applying a closed-form arithmetic sum formula for comparison:

function ARITHMETIC_SUM_CLOSED_FORM(n):
    return (n * (n + 1)) / 2

Step-by-Step Example

I evaluate $\sum_{i=1}^{5} i^2$ two ways.

Direct computation:

$$ 1^2 + 2^2 + 3^2 + 4^2 + 5^2 = 1 + 4 + 9 + 16 + 25 = 55 $$

Closed-form formula:

$$ \sum_{i=1}^{5} i^2 = \frac{5 \cdot 6 \cdot 11}{6} = \frac{330}{6} = 55 $$

I confirm both approaches agree, giving me confidence in the closed-form identity.

Time Complexity

I compute a summation via direct iteration in $O(n)$ time, since I perform one addition per term across $n$ terms, regardless of best, average, or worst case — the number of terms is fixed by the bounds, not by the input’s values. Using a closed-form formula instead, I reduce this to $O(1)$ time, since I perform a fixed number of arithmetic operations regardless of $n$. This distinction — $O(n)$ direct summation vs $O(1)$ closed-form evaluation — is precisely why I prioritize finding closed forms when analyzing algorithms with large or symbolic bounds.

Space Complexity

I require only $O(1)$ auxiliary space to compute a summation iteratively, since I maintain a single running total variable. If I instead store every intermediate partial sum (useful for later reference, such as building a prefix-sum array), I require $O(n)$ space to hold all $n$ partial sums.

Correctness Analysis

I justify the direct iterative summation algorithm by simple loop invariant reasoning: before each iteration, my running total correctly holds the sum of all terms processed so far, and this invariant is maintained by adding exactly one new term per iteration, so after the loop completes, the total correctly reflects the sum of all terms in the range. I justify closed-form formulas through the proof techniques shown above (pairing, telescoping, or mathematical induction), each of which independently establishes that the formula produces the same value as direct summation for all valid $n$.

Advantages

Disadvantages

Applications

I apply summation heavily in:

Implementation in C

I implement both a direct summation function and a closed-form version for comparison, with comments:

#include <stdio.h>

// I compute the sum of squares directly, term by term
long directSumOfSquares(int n) {
    long total = 0;
    for (int i = 1; i <= n; i++) {
        total += (long)i * i;
    }
    return total;
}

// I compute the sum of squares using the closed-form formula
long closedFormSumOfSquares(int n) {
    return ((long)n * (n + 1) * (2 * n + 1)) / 6;
}

int main() {
    int n = 5;

    long direct = directSumOfSquares(n);
    long closedForm = closedFormSumOfSquares(n);

    printf("Direct computation: %ld\n", direct);
    printf("Closed-form computation: %ld\n", closedForm);

    return 0;
}

Sample Input and Output

I run the program with n = 5, and I expect:

Direct computation: 55
Closed-form computation: 55

Optimization Techniques

Common Mistakes

Further Reading

Exit mobile version