Asymptotic series

In your courses on algorithm analysis, you will be interested in the asymptotic behavior of the run-time and memory-use of various algorithms, so you will be interested in how the function behaves as a variable goes to infinity. This can be done using the series(...) function, but the series expansion is around infinity.

For example, Maple does not have a closed form of this solution:

[> sum( k*ln(k), k = 1..n );

$\sum_{k = 1}^n k \ln(k)$

We can, never-the-less, ask what the behavior is as $n \rightarrow \infty$:

[> series( %, n = infinity );

$\left(\frac{1}{2} \ln(n) - \frac{1}{4}\right)n^2 + \frac{1}{2} \ln(n) n - \zeta(1, -1) + \frac{1}{12} + \frac{1}{12} \ln(n) + \frac{1}{720 n^2} + \textrm{O}\left( \frac{1}{n^4} \right)$

Now, there is this interesting $\zeta$ function in the solution, which is the Reimann zeta function (implemented as Zeta(...)), but you'll notice that it is in the lower-order terms, so there is no need to investigate this further. The asymptotic behavior is in the first term: $\textrm{O}( n^2 \ln(n) )$.