Consider the function $f$ defined by
$$ f(x) = \begin{cases} x, & 0 \leq x < 1 \\ x^2, & 1 \leq x < 2 \\ \vdots \\ x^n, & n-1 \leq x < n. \end{cases} $$
I'm trying to compute the average value of $f$ on the interval $[0, n]$. Be definition, we have that
$$ \overline{f}_{[0, n]} = \frac{1}{n} \left[ \int_0^1 x \, dx + \int_1^2 x^2 \, dx + \cdots + \int_{n-1}^n x^n \, dx\right]. $$
Any suggestions on how to simplify this expression? Working out the first few integrals doesn't seem to present a general pattern.
Your function isn't even continuous.
You do get a pattern, it's just that the sum is not something you can easily evaluate, because it involves the functions in the form of ~$x^x$:
$$\frac{1^2-0^2}{2}+\frac{2^3-1^3}{3}+\cdots+\frac{n^{n+1}-(n-1)^{n+1}}{n+1}$$ $$=\sum_{k=1}^n\frac{k^{k+1}-(k-1)^{k+1}}{k+1}$$ $$=\sum_{k=1}^n\frac{k^{k+1}-\sum_{l=0}^{k+1}{k+1 \choose l}k^l(-1)^{k+1-l}}{k+1}$$ $$=\sum_{k=1}^n\sum_{l=0}^{k}{k+1 \choose l}\frac{k^l(-1)^{k-l}}{k+1}$$
If anyone here knows how to proceed, be my guest :)