I am working on a generating function for a sequence problem and I am stuck with expanding.
I have $$\frac{1}{4(1-x)^2} - \frac{1}{4(x+1)^2} $$
From my notes, the first term will be $\sum_{n=0}^{\infty}\frac{1}{4}(n+1)x^n.$
I am stuck on the second term where the denominator is $(x+1)^2$ Am I able to make it look like $(1-(-x))^2$ and do something similar to the first term and get $$\sum_{n=0}^{\infty}\frac{1}{4}(-1)^n(n+1)x^n $$
You can observe
$\frac{1}{4(1-x)^2} - \frac{1}{4(x+1)^2}=\frac{x}{(1-x^2)^2}=\frac{x}{1-x^2}\sum_{n=0}^\infty x^{2n}$
$=\sum_{n=0}^\infty \frac{x^{2n+1}}{1-x^2}$