1:(x+y)^2=x^2+2xy+y^2=(x-y)+4xy
2:(x-y)^2=x^2-2xy+y^2=(x+y)-4xy
3:(x+y)^3=x^3+3x^2(y)+3xy^2+y^3=x^3+y^3+3xy(x+y)
4:(x-y)^3=x^3-3x^2(y)+3xy^2-y^3=a^3-b^3-3xy(a-b)
5:x^3+y^3=(x+y)(x^2-xy+y^2)=(x+y)^3-3xy(x+y)
6:x^3-y^3=(x-y)(x^2-xy-y^2)
7:x^2+y^2=(x+y)^2-2xy
8:(x+y)^4=x^4+4x^3y+6x^2y^2+4xy^3+7^4
9:a^2-b^2=(a-b)(a+b)
why do this
pascal triangle code can be solver easy (x+y)^n The binomial coefficient appearing in this expansion corresponds to the third row of Pascal's triangle. The coefficients have higher powers of
In general, for the expansion of (x + y)n on the right side in the nth row (numbered so that the top row is the 0th row):
the exponents of x in the terms are n, n − 1, ..., 2, 1, 0 (the last term implicitly contains x^0 = 1);
the exponents of y in the terms are 0, 1, 2, ..., n − 1, n (the first term implicitly contains y^0 = 1);
the coefficients form the nth row of Pascal's triangle;
before combining like terms, there are 2n terms xiyj in the expansion (not shown); after combining like terms, there are n + 1 terms, and their coefficients sum to 2n.
2a:example
factor : x^2-2xy+y^2-4
the solver
x^2-2xy+y^2-4
=(x-y)^2-2^2
=(x-y+2)(x-y+2)
x^4-4x^3y+6x^2y^2+4xy^3+y^4-x^2-2xy+y^2-4+x^2+2xy+y^2-4+x^3+3x^2y+3xy^2+y^2
=(x^4-4x^3y+6x^2y^2+4xy^3+y^4)-(x^2-2xy+y^2)-4+(x^2+2xy+y^2)-4+(x^3+3x^2y+3xy^2+y^2)
=(x-y)(x-y)(x-y)(x-y)-(x-y)^2-2^2+(x+y)^2-2^2+(x+3)(x+3)(x+3)
=(x-y)(x-y)(x-y)(x-y)-(x-y+2)(x-y-2)+(x+y+2)(x+y-2)+(x+3)(x+3)(x+3)
Comments