Anybody can explain how, summation of $1$ to $N$, can be replaced with integration and result leads to $(1/2)N^2$: $$ \sum_{i=1}^N i \sim \int_1^N x \ \mathrm{d}x \sim \frac{1}{2}N^2 $$
Note: Image is attached.
Anybody can explain how, summation of $1$ to $N$, can be replaced with integration and result leads to $(1/2)N^2$: $$ \sum_{i=1}^N i \sim \int_1^N x \ \mathrm{d}x \sim \frac{1}{2}N^2 $$
Note: Image is attached.
As $N$ gets bigger, the interval between each $i$ in the summation, which is $1$ in this example, becomes extremely small with respect to $N$. Thus, for extremely large $N$, we can approximate the sum by integrating the term, as integration is the limit of summation when the distance between each value to be summed goes to zero. Hence,
$$\sum_{i=1}^N i \sim \int_1^N x \ \mathrm{d}x$$
Evaluating the integral to the right, we get
$$\frac{1}{2}N^2 - \frac{1}{2}N. $$
Similar to how 1 becomes extremely small with in comparison to $N$ for very large $N$, $N$ becomes very small in comparison to $N^2$ for very large N. Thus, the $N^2$ term dominates in the expression, and we can basically ignore the $N$ term. Thus, $$\frac{1}{2}N^2 - \frac{1}{2}N \sim \frac{1}{2}N^2.$$