Find the Present Value of an annuity payable with $n^2$ at $t=n$ , $t\in [0,n]$
What I have is: PV=present value
$PV=1u+2^2u^2+3^2u^3+\cdots+n^2u^n$
I don't seem to know how to simplify it to:
$$\frac{2I_n-a_n-n^2un^{2+1}}{1-u}$$
Where $u=1/(1+i)$ and $i$ is the interest rate $I_n=\frac{a_n/u-nu^n}{i}$
Let be $$S=u+2^2u^2+3^2u^3+\cdots+n^2u^n=\sum_{k=1}^n k^2u^k.$$
Then $$S = u + 4u^2 + 9u^3 +\cdots +n^2u^n \tag{1}$$ Now multiplying (1) by $u$, we have
$$u S = u^2 + 4u^3 + 9u^4 +\cdots +n^2u^{n+1} \tag{2}$$
and substracting $(1)-(2)$,
$$ \begin{align*} (1-u) S &= u+3u^2+5u^3+7u^4+\cdots+(2n-1)u^n - n^2u^{n+1}\\ &= (2u-u)+(4u^2-u^2)+(6u^3-u^3)+\cdots+(2nu^n-u^n) - n^2u^{n+1}\\ & = 2(\underbrace{u+2u^2+3u^3+\cdots+nu^n}_{\text{increasing annuity with $P = 1$ and $D = 1$}})-(\underbrace{u+u^2+u^3+\cdots+u^n}_{\text{immediate annuity}})-n^2u^{n+1} \end{align*} $$ Thus rearranging the terms, we get
$$(1-u) S = 2(Ia)_{\overline{n^{\phantom{_i}}}\!|} - a_{\overline{n^{\phantom{_i}}}\!|}-n^2u^{n+1}$$ that is
where $$ (Ia)_{\overline{n^{\phantom{_i}}}\!|}=\frac{\ddot a_{\overline{n^{\phantom{_i}}}\!|}-nu^n}{i},\quad \ddot a_{\overline{n^{\phantom{_i}}}\!|}=(1+i)a_{\overline{n^{\phantom{_i}}}\!|},\quad a_{\overline{n^{\phantom{_i}}}\!|}=\frac{1-u^n}{i},\quad u=\frac{1}{1+i}. $$