x^2-y^2-2x+6y+m
=(x+y)(x-y)-2x+6y+m
=(x+y+a)(x-y+b)
=(x+y)(x-y)+a(x-y)+b(x+y)+ab
=(x+y)(x-y)+(a+b)x+(b-a)y+ab
所以a+b=-2
b-a=6
ab=m
所以a=-4,b=2
m=ab=-8
x^4+3x^3+2x^2+3x+1
=(x^4+2x^2+1)+(3x^3+3x)
=(x^2+1)^2+3x(x^2+1)
=(x^2+1)(x^2+3x+1)
x^2-2ax-b^2+2ab
=(x^2-b^2)-2ax+2ab
=(x+b)(x-b)-2a(x-b)
=(x-b)(x+b-2a)