I have a sequence set as:
$a_0 = 1, a_n = \frac{3}{2}a_{n-1} - \frac{n}{2}$ for $ n \ge 1$
I have started with: $$A(x) = \sum_{n=0}^\infty a_nx^n$$ $$ a_n = \frac{3}{2}a_{n-1} - \frac{n}{2} $$ $$ 2a_nx^n = 3a_{n-1}x^n - nx^n$$ $$ 2 \cdot \sum_{n=1}^\infty a_nx^n = 3 \cdot \sum_{n=1}^\infty (a_{n-1}x^n) - \sum_{n=1}^\infty nx^n$$
$$ 2 \cdot \sum_{n=1}^\infty a_nx^n = 3x \cdot A(x) - \sum_{n=1}^\infty nx^n$$
I hope these steps are correct, now I'm not sure about this relation:
$$ 2 \cdot \sum_{n=1}^\infty a_nx^n = 2x \cdot a_0 \cdot \sum_{n=1}^\infty a_{n-1}x^{n-1} = 2x A(x) $$
And I don't know that to do with the $-\sum_{n=1}^\infty nx^n$.
Could you help me with the above?
// EDIT: So now I've got:
$$A(x) = \sum_{n=1}^\infty nx^n $$
Which I'm still not sure what to do with that.
You are correct up until $$ 2 \cdot \sum_{n=1}^\infty a_nx^n = 3x \cdot A(x) - \sum_{n=1}^\infty nx^n $$ You then evaluated the first sum, $\sum_{n=1}^\infty a_nx^n$, incorrectly. You cannot "factor out" $a_0$ the way you did. Instead, since we are summing over $n\ge 1$, the only thing missing the $n=0$ term, so the entire sum is just equal to $A(x)-a_0$. That is, $$ \begin{align} 2 \cdot \sum_{n=1}^\infty a_nx^n &=2(a_1x+a_2x^2+\dots) \\&= 2(\color{blue}{-a_0} + \color{blue}{a_0}+a_1x+a_2x^2+\dots) \\&= 2(-a_0+A(x))\\&= 2(A(x)-1) \end{align} $$ For the last summation, we use the following trick, where we notice that there is a factor of $nx^{n-1}$, which is the derivative of $x^n$, allowing us to write this sum in terms of the derivative of another series. You will get used to this trick after seeing it a lot, even though it can be a bit difficult to learn.
Let $D$ denote the differentation operator. For example, $D[\sin x]=\cos x$ and $D[x^n]=nx^{n-1}$. Then $$ \begin{align} \sum_{n= 1}^\infty nx^{n} &=x\cdot \sum_{n=1}^\infty nx^{n-1} \\&=x\cdot \sum_{n=1}^\infty D[x^n] \\&\stackrel1=x\cdot D\left[\sum_{n=1}^\infty x^n\right] \\&\stackrel2=x\cdot D\left[\frac{x}{1-x}\right] \\&\stackrel3=x\cdot \frac1{(1-x)^2} \end{align} $$ Explanation:
The derivative operator is linear, and distributes over infinite sums.
Use the infinite geometric series formula to evaluate $\sum_{n=1}^\infty x^n$.
Evaluate the derivative using the quotient rule.