Algebraic identities

(A+B)^2=A^2+2AB+B^2
(A-B)^2=A^2-2AB+B^2
A^2-B^2=(A-B)(A+B)
(A^n-B^n)/(A-B)=A^{n-1}+A^{n-2}B+A^{n-3}B^2+...+AB^{n-2}+B^{n-1}
If n is even: (A^n-B^n)/(A+B)=A^{n-1}-A^{n-2}B+A^{n-3}B^2-...+AB^{n-2}-B^{n-1}
If n is odd: (A^n+B^n)/(A+B)= A^{n-1}-A^{n-2}B+A^{n-3}B^2+...-AB^{n-2}+B^{n-1}
A^3+B^3=(A+B)(A^2-AB+B^2)
A^3-B^3=(A-B)(A^2+AB+B^2)
(A+B)^3=(A+B)(A^2+2AB+B^2)=A^3+3A^2B+3AB^2+B^3
(A-B)^3=(A-B)(A^2-2AB+B^2)=A^3-3A^2B+3AB^2-B^3
(A+B+C)^2=A^2+B^2+C^2+2AB+2AC+2BC