# How to derive identities [duplicate]

For example:

$(a+b)^2 = a^2 + b^2 + 2ab$

$(a+b)^3 = a^3 + b^3 + 3ab(a+b)$

So my doubt regarding these identities are why does the identity differ when the power is changed and is there any derivation for it?

• $(a+b)^2 = (a+b)(a+b) = a(a+b) + b(a+b) = a^2 + ab + ba + b^2 = a^2 + 2ab + b^2$. It is just using distribution and regrouping. The $(a+b)^3$ is derived similarly. And a more general identity can be proven for any integer power. This the Binomial Theorem. The proof can be found here: en.wikipedia.org/wiki/Binomial_theorem#Proofs Apr 13, 2016 at 14:38
• Is there any way of remembering it? I'm an 9th grader so I need to have all these identities in my mind in a jiffy. Could you help me out? Apr 13, 2016 at 14:45
• @JayanthBala just remember the triangle of Pascal. For power 3, move to line 4 with numbers 1 3 3 1 (the binomial coefficients). Then use a^3, a^2, a^1, a^0 and multiply with b^0, b^1, b^2, b^3. Eh voila Apr 13, 2016 at 14:55
• "Why does the identity differ when the power is changed"? Well... Probably because you had the wrong pattern in mind.
– user228113
Apr 14, 2016 at 0:38

\begin{align}(a+b)^2 ~=~& (a+b)~(a+b) \\ ~=~& a~(a+b)+b~(a+b) \\ ~=~& a^2+ab+ba+b^2 \\ ~=~& a^2+b^2+2ab \\[2ex] (a+b)^3 ~=~& (a+b)^2~(a+b) \\ ~=~& (a^2+b^2+2ab)~(a+b) \\ ~=~& a(a^2+b^2+2ab)+b(a^2+b^2+2ab) \\ ~=~& (a^3+ab^2+2a^2b)+(a^2b+b^3+2ab^2) \\ ~=~& a^3+ 3a^2b + 3ab^3+ b^3 \\ ~=~& a^3+b^3+3ab~(a+b) \\[3ex] (a+b)^4 ~=~& a^4+b^4 + 2ab~\big(2(a^2+b^2)+3ab\big) \end{align}
More generally, we go to the Binomial Theorem. $$(a+b)^n = \sum\limits_{k=1}^n {^{n}\mathsf C_{k}} ~a^k ~b^{n-k}$$
So $(a+b)^2 = a^2+ 2ab+b^2\\ (a+b)^3= a^3+3a^2b+3ab^2+b^3\\(a+b)^4 = a^4+4a^3b+6a^2b^2+4ab^3+b^4$