Solve $a_n = a_{n-1} + n$, $a_0 = 0$, using generative function

62 Views Asked by At

I need to solve, per $n\geq 1$: $$\begin{cases} a_n = a_{n-1} + n\\ a_0 = 0 \end{cases}$$

I have found this:

$$ f(x) - xf(x) = \frac{x}{(1-x)^2} $$

So:

$$ f(x) = \frac{x}{(1-x)^3} = \frac{A}{1-x} + \frac{B}{(1-x)^2} + \frac{C}{(1-x)^3} $$

And:

\begin{cases} A=0\\ -2A -B = 1\\ A+B+C = 0 \end{cases}

The error is here, I get $A=0$ so is not possibile, where is my error?

2

There are 2 best solutions below

5
On BEST ANSWER

$A=0$ is correct. $$ \frac{x}{(1-x)^3} = \frac{-1}{(1-x)^2}+\frac{1}{(1-x)^3} $$ So that \begin{align} \frac{-1}{(1-x)^2} &= - \sum_{n=0}^\infty \binom{-2}{n} (-x)^n \\&= - \sum_{n=0}^\infty (-1)^n(n+1) (-x)^n\\ &= -\sum_{n=0}^\infty (n+1) x^n \\ \frac{1}{(1-x)^3} &= \sum_{n=0}^\infty \binom{-3}{n} (-x)^n \\&= \sum_{n=0}^\infty (-1)^n\frac{(n+2)(n+1)}{2} (-x)^n\\ &= \sum_{n=0}^\infty \frac{(n+2)(n+1)}{2} x^n \end{align} and add \begin{align} f(x) &= \sum_{n=0}^\infty\left[-(n+1)+\frac{(n+2)(n+1)}{2}\right] x^n \\ &= \sum_{n=0}^\infty \frac{n(n+1)}{2} x^n \end{align}

And therefore $a_n = \frac{n(n+1)}{2}$.

0
On

Anyway, $a_n$ is simply the sum of the first $n$ positive integers, so it is $\frac{n(n+1)}{2}= n+ \frac{1}{2}n(n-1)$, whose generating function is $x\cdot (\frac{1}{1-x})' + \frac{1}{2}x^2\cdot (\frac{1}{1-x})''$.