This is a question from a test that I wrote and I'm wondering how do you solve it.
Prove by induction that
$$ \sum^n_{i=1}(i-1/2) = \frac{n^2}{2} $$
*Provide a Base Case, Inductive Hypothesis, and an Inductive Step
This is a question from a test that I wrote and I'm wondering how do you solve it.
Prove by induction that
$$ \sum^n_{i=1}(i-1/2) = \frac{n^2}{2} $$
*Provide a Base Case, Inductive Hypothesis, and an Inductive Step
Your base case will be the case $n=1$, which says that
$$\sum_{i=1}^1\left(i-\frac12\right)=\frac{1^2}2\tag{1}\;;$$
since both sides of $(1)$ simplify to $\frac12$, the base case is established. Your induction hypothesis will be that
$$\sum_{i=1}^m\left(i-\frac12\right)=\frac{m^2}2$$
for some particular $m\ge 1$, and from it you want to show that
$$\sum_{i=1}^{m+1}\left(i-\frac12\right)=\frac{(m+1)^2}2\;.\tag{2}$$
There’s a pretty standard trick for carrying out this kind of induction step: split the sum on the lefthand side of $(2)$ into the ‘old’ part — the sum from $1$ to $m$ — and the new term, and apply the induction hypothesis to the old part:
$$\begin{align*} \sum_{i=1}^{m+1}\left(i-\frac12\right)&=(m+1)-\frac12+\sum_{i=1}^m\left(i-\frac12\right)\\\\ &=m-\frac12+\frac{m^2}2&&\text{by the induction hypothesis}\\\\ &=\frac{m^2+2m+1}2\\\\ &=\frac{(m+1)^2}2\;, \end{align*}$$
which is exactly what we wanted. Since we’ve checked the base case and proved the induction step, we can now conclude that
$$\sum_{i=1}^n\left(i-\frac12\right)=\frac{n^2}2$$
for all integers $n\ge 1$.