I am trying to solve $$\sum_{j=0}^{n-1}j2^j$$ but I don't know how to proceed with the $j$ in front of $2^j$. What is making it difficult for me is it is an indexing variable, so I don't think I can factor it out. How would I proceed?
Thank you
I am trying to solve $$\sum_{j=0}^{n-1}j2^j$$ but I don't know how to proceed with the $j$ in front of $2^j$. What is making it difficult for me is it is an indexing variable, so I don't think I can factor it out. How would I proceed?
Thank you
Sum of a geometric progression: $$1+x+x^2+\cdots+x^n=\frac{x^{n+1}-1}{x-1}\quad(x\ne1)$$ Differentiate with respect to $x$: $$1+2x+3x^2+\cdots+nx^{n-1}=\frac{(n+1)x^n(x-1)-(x^{n+1}-1)}{(x-1)^2}=\frac{nx^{n+1}-(n+1)x^n+1}{(x-1)^2}$$ Multiply by $x$: $$x+2x^2+3x^3+\cdots+nx^n=\frac{nx^{n+2}-(n+1)x^{n+1}+x}{(x-1)^2}$$ Set $x=2$: $$\sum_{j=0}^nj2^j=(n-1)2^{n+1}+2$$ Oops, I misread the question. OK, now substitute $n-1$ for $n$: $$\boxed{\sum_{j=0}^{n-1}j2^j=(n-2)2^{n}+2}$$ To verify the result by mathematical induction, note that $$[(n-1)2^{n+1}+2]-[(n-2)2^{n}+2]=n2^n$$
Hint: The triangular array ($n = 6$ shown) $$ \begin{array}{crcrcrcrcr} &1\cdot2^1 &+ &2\cdot2^2 &+ &3\cdot2^3 &+ &4\cdot2^4 &+ &5\cdot 2^5 \\[8pt] = &2^1 &+ &2^2 &+ &2^3 &+ &2^4 &+ &2^5 \\ & &+ &2^2 &+ &2^3 &+ &2^4 &+ &2^5 \\ & & & &+ &2^3 &+ &2^4 &+ &2^5 \\ & & & & & &+ &2^4 &+ &2^5 \\ & & & & & & & &+ &2^5 \end{array} $$ can be summed by columns first or by rows first.
$S=\sum_{k=0}^{n-1} 2^{xj}=\frac{2^{nx}-1}{2^x-1}$
$dS/dx= \sum_{k=0}^{n-1}j\cdot \ln 2 \cdot 2^{xj}=\frac{(2^x-1)(\ln 2 \cdot n\cdot 2^{nx})-\ln2 \cdot 2^x\cdot(2^{nx}-1)}{(2^x-1)^2}$
$\frac{1}{\ln 2}\frac{dS}{dx}|_{x=1}= \sum_{k=0}^{n-1} j \cdot 2^j= 2n\cdot 2^n-2\cdot(2^n-1)=2(n-1)2^{n}+2$
$0\cdot 1s+ 1 \cdot 2 +2 \cdot 4 + 3 \cdot 8+...$
$f(n)=2(n-2)2^{n-1}+2$
Nont sure why I got an off by one error, but after compensating for it, we can prove $f(n)$ works via induction.
Note $f(1)=0, f(2)=2, f(3)=10$, ..., i.e. this satisfies the sum for the first few values.
$f(n+1)=2(n-1)\cdot 2^n+2$
$f(n+1)-f(n)= n2^n$
$Q(n)=\sum_{k=0}^{n-1}k\cdot 2^k$
$Q(n+1)=\sum_{k=0}^{n} k \cdot 2^k$
$Q(n+1)-Q(n)=n\cdot 2^n$
So $f(1)=Q(1)=0$
$f(n+1)-f(n)=Q(n+1)-Q(n)=n\cdot 2^n$
So if $f(n)=Q(n)$ then $f(n+1)=Q(n+1)$
and the sum is $f(n)$ holds by induction.