计算:(x-y)的平方-2x(x-y)

问题描述:

计算:(x-y)的平方-2x(x-y)

y^2-x^2

原式=x^2+y^2-2xy-(2x^2-2xy)
=y^2-x^2

syms x y
>> simple((x-y)^2-2*x*(x-y))

simplify:

y^2 - x^2


radsimp:

(x - y)^2 - 2*x*(x - y)


simplify(100):

y^2 - x^2


combine(sincos):

(x - y)^2 - 2*x*(x - y)


combine(sinhcosh):

(x - y)^2 - 2*x*(x - y)


combine(ln):

(x - y)^2 - 2*x*(x - y)


factor:

-(x - y)*(x + y)


expand:

y^2 - x^2


combine:

(x - y)^2 - 2*x*(x - y)


rewrite(exp):

(x - y)^2 - 2*x*(x - y)


rewrite(sincos):

(x - y)^2 - 2*x*(x - y)


rewrite(sinhcosh):

(x - y)^2 - 2*x*(x - y)


rewrite(tan):

(x - y)^2 - 2*x*(x - y)


mwcos2sin:

(x - y)^2 - 2*x*(x - y)


collect(x):

- x^2 + y^2


ans =

y^2 - x^2

(x-y)的平方-2x(x-y)
=(x-y)(x-y-2x)
=(x-y)(-y-x)
= -(x-y)(x+y)

(x-y)的平方-2x(x-y)
=(x-y)(-x-y)