Summing this series $\sum_{n=1}^{\infty}\dfrac{2n-1}{2^n}$ I wish to sum the series $\sum_{n=1}^{\infty}\dfrac{2n-1}{2^n}$.
I notice that by writing $\displaystyle\sum_{n=1}^{\infty}(2n-1)\dfrac{1}{2^n}$, $\dfrac{1}{2^n}$ is a geometric series and can be summed easily. But the next step I think I did wrong is
$$2n-1\displaystyle\sum_{n=1}^{\infty}\dfrac{1}{2^n}$$
I don't think I can pull out $2n-1$ like a constant because that will affect the sum. What should I have done. The series converges to $3$ according Wolfram Alpha.
 A: Here is one way:
$$
\sum_{n=1}^\infty \frac{2n-1}{2^n}=\sum_{n=1}^\infty \frac{2n}{2^n}-\sum_{n=1}^\infty\frac{1}{2^n}.
$$
The second sum is geometric and converges to $1$. We just need to deal with the first. To do this, use the relation
$$
\sum_{n=0}^\infty z^n=\frac{1}{1-z}
$$
valid for $\lvert z\rvert <1$ and differentiate to get
$$
\sum_{n=1}^\infty nz^{n-1}=\frac{1}{(1-z)^2}.
$$
Next, evaluate at $z=\frac{1}{2}$ to get
$$
\sum_{n=1}^\infty \frac{2n}{2^n}=\frac{1}{(1/2)^2}=4.
$$
So, the result is $3$.
A: Write $$\sum_{n=1}^\infty \frac {2n-1}{2^n} = \frac12\sum_{n=1}^\infty(2n-1)\left(\frac 1{\sqrt 2}\right)^{2n-2}$$
Notice that
$$\sum_{n=1}^\infty (2n-1)x^{2n-2} = \frac d{dx}\sum_{n=1}^\infty x^{2n-1} = \frac d{dx}\left(\frac {x}{1-x^2}\right) = \frac {1+x^2}{(1-x^2)^2}$$ for $|x|<1$. Hence:
$$\frac12\sum_{n=1}^\infty(2n-1)\left(\frac 1{\sqrt 2}\right)^{2n-2} = \frac12\left(\frac {1+1/2}{(1-1/2)^2}\right) = 3$$
A: Here is an alternative way to solve this question without calculus--
As you have mentioned, $\frac{1}{2^n}$ is indeed a geometric series.
We know that $2n-1$ is an arithmatic series.
Proof--   $2n-1-(2(n-1)-1)=2$, which is a constant. hence we get first term $t_1=1$ and common difference $d=2$
As we have A.P. in the numerator and G.P in the denominator (r<1), it is an infinite convergent Arithmetic-(o)-geometric series, A.G.P, which (according to the question) converges.
The formula for sum of  infinite AGP  where r is less than unity ($r=\frac{1}{2}$)--
$t_0+(t_1)r+(t_2)r^2+...$ is
$S_{\infty}=\frac{t_0}{1-r}+\frac{\left(r\cdot d\right)}{\left(1-r\right)^2}$
but as we do not want $t_0$ in our required sum, can calculate $t_0=-1$, calculate the entire sum using the formula and add 1 to get the desired answer as 3
