$\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\ldots+\frac{1}{2^{n}}=1-\frac{1}{2^{n}}$
Let P(n) be the given statement.
Now,
$P(n): \frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\ldots+\frac{1}{2^{n}}=1-\frac{1}{2^{n}}$
Step 1;
$P(1)=\frac{1}{2}=1-\frac{1}{2^{1}}$
Thus, $P(1)$ is true.
Step 2 :
Suppose $P(m)$ is true.
Then,
$\frac{1}{2}+\frac{1}{4}+\ldots+\frac{1}{2^{m}}=1-\frac{1}{2^{m}}$
To show: $P(m+1)$ is true whenever $P(m)$ is true.
That is,
$\frac{1}{2}+\frac{1}{4}+\ldots+\frac{1}{2^{m+1}}=1-\frac{1}{2^{m+1}}$
Now, $P(m)$ is true.
Thus, we have:
$\frac{1}{2}+\frac{1}{4}+\ldots+\frac{1}{2^{m}}=1-\frac{1}{2^{m}}$
$\Rightarrow \frac{1}{2}+\frac{1}{4}+\ldots+\frac{1}{2^{m}}+\frac{1}{2^{m+1}}=1-\frac{1}{2^{m}}+\frac{1}{2^{m+1}} \quad$ Adding $\frac{1}{2^{m+1}}$ to both sides
$\Rightarrow P(m+1)=1-\frac{1}{2^{m}}+\frac{1}{2^{m} \cdot 2}=1-\frac{1}{2^{m}}\left(1-\frac{1}{2}\right)=1-\frac{1}{2^{m+1}}$
Thus, $P(m+1)$ is true.
By the $p$ rinciple of $m$ athematical $i$ nduction, $P(n)$ is true for all $n \in N$.