<s>[INST] Proving $\sum\limits_{i=1}^{n}{\frac{i}{2^i}}=2-\frac{n+2}{2^n}$ by induction. 
Theorem (Principle of mathematical induction):


Let $G\subseteq \mathbb{N}$, suppose that 

a. $1\in G$
    
b. if $n\in \mathbb{N}$ and $\{1,...,n\}\subseteq G$, then $n+1\in G$


Then $G=\mathbb{N}$



Proof by Induction


Prove that
    $$\sum_{i=1}^{n}{\frac{i}{2^i}}=2-\frac{n+2}{2^n},\quad \quad \forall n\in \mathbb{N} \tag{1}$$


$\color{darkred}{\mbox{Proof:}}$
 let $P(n)$ be the statement $\sum_{i=1}^{n}{\frac{i}{2^i}}=2-\frac{n+2}{2^n}$
$$\sum_{i=1}^{1}{\frac{i}{2^i}}=\frac{1}{2}=2-\frac{1+2}{2^1}\tag{Basis step $P(1)$}$$
Thus $P(1)$ is true 
We assume that $P(n)$ is true and prove that $P(n+1)$ is true
$$\sum_{i=1}^{n+1}{\frac{i}{2^i}}\stackrel{?}{=}2-\frac{(n+1)+2}{2^{n+1}} $$
We know that
$$
\begin{align*}
\sum_{i=1}^{n+1}{\frac{i}{2^i}}&=\color{darkred}{\underbrace{\sum_{i=1}^{n}{\frac{i}{2^i}}}_\text{P(n) is true}}+\frac{n+1}{2^{n+1}} \tag{LHS} \\
&=\color{darkred}{2-\frac{n+2}{2^n}} + \frac{n+1}{2^{n+1}}\\
&=\frac{2^{n+1}-n-2}{2^n} + \frac{n+1}{2^{n+1}}\\
&=\frac{2\cdot 2^{n+1}-2n-4+n+1}{2^{n+1}}\\
&=\frac{2\cdot 2^{n+1}-n-3}{2^{n+1}}\tag{2}\\
\end{align*}
$$
And
$$
\begin{align*}
2-\frac{(n+1)+2}{2^{n+1}}&=\frac{2\cdot 2^{n+1}-n-3}{2^{n+1}} \tag{RHS}
\end{align*}
$$
So
$$\sum_{i=1}^{n+1}{\frac{i}{2^i}}\stackrel{}{=}2-\frac{(n+1)+2}{2^{n+1}} \tag{3}$$
Hence, if $P(n)$ is true, then $P(n+1)$ is true. 
Therefore $\sum\limits_{i=1}^{n}{\frac{i}{2^i}}=2-\frac{n+2}{2^n},\quad \quad \forall n\in \mathbb{N} $ 
$\hspace{8cm}$ ${\Large ▫}$


My Question


$(i)$ does my solution make sense (is it correct?) 
    $(ii)$ If so, is this an correct approach to proving formulas by induction?


Can someone give me some hints/tips?
 [/INST] You can also notice that $$\sum\limits_{i=1}^n \frac{i}{2^i} = \sum\limits_{i=1}^n \frac{1}{2^i}+ \sum\limits_{i=2}^{n} \frac{1}{2^i} + \dots + \sum\limits_{i=n}^n \frac{1}{2^i}= \sum\limits_{j=1}^n \sum\limits_{i=j}^n \frac{1}{2^i}$$ So you can find the result without knowing it in advance; this is only a geometric series.
</s>