I've tried several times but I don't know how to get the correct result. Can anyone please tell me what should I do with this sum? Thank you :)
$$\sum_{n=1}^\infty\frac{(-1)^{n-1}(2n-1)}{2^{n-1}}$$
It is equivalent to $$ \sum_{n=1}^\infty \frac{(-1)^{n-1} (2n-1)}{2^{n-1}} = \left. \sum_{n=0}^\infty (2n+1) x^n \right|_{-1/2} $$ The above is the series for (can be shown using power series for rational functions) $$ \frac{x+1}{(x-1)^2} = \sum_{n=0}^\infty (2n+1) x^n $$
Note that $$\sum_{n=1}^\infty\frac{(-1)^{n-1}(2n-1)}{2^{n-1}}=2\sum_{n=1}^\infty\frac{(-1)^{n-1}n}{2^{n-1}}-\sum_{n=1}^\infty\frac{(-1)^{n-1}}{2^{n-1}}$$
So, the question is, what is $\sum_{n=1}^\infty\frac{(-1)^{n-1}n}{2^{n-1}}$?
Well, note that in general, if $-1<x<1$, then $$\sum_{n=0}^{\infty}nx^{n-1}=1+2x+3x^2+4x^3+\dots=1+x+x^2+x^3+\dots +x(1+x+x^2+ \dots)+x^2(1+x+x^2+ \dots)+\dots=(1+x+x^2+\dots x^n)^2$$