Q:

Solving $\sum_{i=0} ^{\log n} i2^i$

Solve (or simplify): $$\sum_{i=0} ^{\log n} i2^i$$ (without integrals)

Trying to change the parameter: $j=i2^i$, so since $ 0\le i \le \log n$, then the maximum value for $j$ is when $j=n\log n$. So we get $ \displaystyle \sum_{i=0} ^{\log n} i2^i = \sum_{j=0} ^{n\log n} j$ 
Now I can use the formula to get $ \displaystyle \sum_{j=0} ^{nlog n} j = \Theta ((n \log n)^2)$ but it doesn't seem right when I compare it with a series calculator. 
Maybe did I get the upper bound wrong? 
PS: Here: $\log n = \log _2 n$

A:

Note that
\begin{align}
\sum_{i=1}^{n}i \cdot 2^{i} &= 2+(4+4)+(8+8+8)+\ldots+(\underbrace{ 2^{n}+2^{n}+\ldots+2^{n}}_{n\text{ times}})\\
&=(2+4+8+\ldots+2^{n-1}+2^{n})+(4+8+\ldots+2^{n-1}+2^{n})+(8+\ldots\\
&\quad+2^{n-1}+2^{n})+\ldots+(2^{n-2}+2^{n-1}+2^{n})+(2^{n-1}+2^{n})+2^{n}\\
&=2(1+2+4+\ldots+2^{n-2}+2^{n-1})+4(1+2+4+\ldots+2^{n-3}+2^{n-2})+8(1+\ldots\\
& \quad+2^{n-3})+\ldots+2^{n-2}(1+2+4)+2^{n-1}(1+2)+2^{n}\\
&=2(2^{n}-1)+4(2^{n-1}-1)+8(2^{n-2}-1)+\ldots+2^{n-2}(2^{3}-1)+2^{n-1}(2^{2}-1)+2^{n}\\
&= (n-1)2^{n+1}+2^{n}-2-4-\ldots-2^{n-1}=(n-1)2^{n+1}+2^{n}-2(2^{n-1}-1)\\
&= (n-1)2^{n+1}+2\\
&= 2(2^n(n-1) + 1)
\end{align}
thus, assuming that $\log n = \log_2 n$, you get
$$\sum_{i=0} ^{\log n} i2^i = 2(1+2^{\log n}(\log n-1)) = 2(1+n(\log n-1))$$

