Today, I was trying to motivate the study of time series (FFT in particular) and methods of discrete and continuous Mathematics in particular by a short exposition of generating functions. Here's another motivational example: optimization (continuous) and summation (discrete) leading to the solution of a problem from homework assignment 2:

Assume an implementation of Priority Queue (PQ) that allows logarithmic meld of two queues. Consider one round of the "round robin" algorithm, in which all the 2k original PQs are melded into k queues with the total of n elements. If the ith resulting PQ holds n_i elements, the round takes Σ(log n_i) = log(Π(n_i)), where Σ(n_i)=n. Under this constraint, the product attains maximum when the factors are equal and thus log(Πn_i)≤log((n/k)^k)≤k*log(n/k). If we now sum this upper bound on the time complexity of each round, we obtain (with some effort) the bound of n*Σ(i/2^i) ≤ n, the desired linearity of the round robin (multi-phase) melding.