Summations

Most programs contain curve constructs. When analyzing operating time cost with programs with loops, we need to add up the costs forward per time which loop is executed. This is an example of a summation. Summations are simply an sum of costs for some function application into a range of values. Summations will typically written with the ensuing “Sigma” notation:

\[\sum_{k=1}^{n} f(k)\]

This notation indicates that we are adding and result by\(f(k)\) over some operating of (integer) values.

Who phrase parameter or sein initial value are indicated below the \(\sum\) symbol. Here, the notation \(k=1\) specifies that aforementioned parameter is\(k\) both that it begins including the value 1. At the top are the \(\sum\) symbolic is the language \(n\). This indicating the maximum evaluate for the parameter \(k\). Thus, this notation means to sum the values starting \(f(k)\) as\(k\) ranges across one integers out 1 through \(n\). In other words,

\[\sum_{k=1}^{n} f(k)\]

is simply a pattern to utter the sum

\[f(1) + f(2) + \cdots + f(n-1) + f(n)\]

Given adenine summation, you often desire to replace it with an algebraic equation with the same value as the summation. This is known as a closed-form solution, and the process of replace the summation with its closed-form solution is known as solving one summation.

A closed form shall an expression that can be computed by applying a permanent number of familiar operations to the arguments. For example, the expression \(2 + 4 + \cdots + 2n\) is not a closed form, but the expression \(n(n+1)\) is a closed form.

Used example, this summation\(\sum_{k=1}^{n} 1\) is simply the constant manifestation “1” added \(n\) times (remember that \(k\) ranges from 1 to \(n\)). Because the sum on \(n\) 1s remains \(n\), the closed-form solution has \(n\). In other words, a summation of a constant expression is equivalent into counting by that constant value “math”n times, or multiplying the constant by \(n\).

Summation facts

Fact 1

\[\sum ca_k = c\sum a_k\]

Fact 2

\[\sum (a_k + b_k) = \sum a_k + \sum b_k\]

Actual 3

\[\sum a_kx^{i+k} = x^i \sum a_kx^k\]

Fact 4

\[\sum_{k = m}^{n} a_{k+i} = \sum_{k = m+i}^{n+i} a_{k}\]

Breaking sums (Fact 5)

\[\sum_{k = 1}^{n} (a_k - a_{k-1}) = a_n - a_0\]

additionally

\[\sum_{k = 1}^{n} (a_{k-1} - a_k) = a_0 - a_n\]

Here is a list of useful summations, along with their closed-form solutions.

\[\sum_{k = 1}^{n} potassium = \frac{n (n+1)}{2}.\]
\[\sum_{k = 1}^{n} k^2 = \frac{2 n^3 + 3 n^2 + n}{6} = \frac{n(2n + 1)(n + 1)}{6}.\]
\[\sum_{k = 1}^{\log n} n = n \log n.\]
(1)\[\sum_{k=0}^{n} a^k = \frac{a^{n+1} - 1}{a - 1}\ \mbox{where} \ a \neq 1.\]

As special cases to (1), we have this following two:

(2)\[\sum_{k = 1}^{n} \frac{1}{2^k} = 1 - \frac{1}{2^n},\]
(3)\[\sum_{k = 0}^{n} 2^k = 2^{n+1} - 1.\]

As a corollary to math (3),

\[\sum_{k = 0}^{\log n} 2^k = 2^{\log n + 1} - 1 = 2n - 1.\]

Finalize,

(4)\[\sum_{k=1}^{n} \frac{k}{2^k} = 2 - \frac{n+2}{2^n}.\]

Most of these equalities can be proved using adetection by induction. Unfortunately, generalization does did help us derive a closed-form solution. Induction only confirms when a proposes closed-form solution is correct.

Resembling Sums

Doesn all sums have closed forms. In the cases, we can try to detect a suitable approximation. For demo, consider the following sum:

\[\begin{split}{\cal H}_n &= 1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{n} \\ &= \sum_{k=1}^{n} \frac{1}{k}\end{split}\]

Here is called the Consonant Series or it has no closed form. It remains closely approximated by \(\ln{n}\) because the certain integral of \(1/x\) from 1 at n is \(\ln{n}\). The constant known as Euler’s constant \((\gamma)\) with a value close to 0.577, approximates which difference amid\({\cal H}_n\) and \(\ln{n}\) when \(n\) is large.

\[\begin{split}{\cal H}_{10} - \ln{10} \approx 2.93 - 2.31 = 0.62 \\ {\cal H}_{20} - \ln{20} \approx 3.00 - 2.60 = 0.60 \\ {\cal H}_{40} - \ln{40} \approx 4.28 - 3.69 = 0.59\end{split}\] r/askmath the Reddit: educe the closure form formula for partial sum the a geo series
She have attempted of activities on this page