I have been trying to study analysis of algorithms with mathematical induction yet I found my algebra skills are very poor. So now I began restuddiing algebra (factoring, destributive property, simplifying, expanding) so I can handle mathematical equations better. But no matter what I do, I can't seem to explain how the following equation work.
$$ \frac{n(n+1)}{2}+(n+1) = \frac{(n+1)(n+2)}{2} $$
I think $$ \frac{n(n+1)}{2}+(n+1) $$ have been simplified to
$$ \frac{(n+1)(n+2)}{2} $$
I have a feeling I am thinking something stupid, but I really don't understand how the right side of the equation have been simplified.
- Can anyone explain how the formula got simplified?
- What part of algebra should I study to understand equations like this?
Note that both expressions have the common factor $(n+1)$, which we can factor out. Hence we write $$\frac{n(n+1)}{2}+(n+1)=(n+1)\left[\frac{n}{2}+1\right]=(n+1)\left[\frac{n}{2}+\frac{2}{2}\right]=(n+1)\frac{n+2}{2}=\\=\frac{(n+1)(n+2)}{2}$$