Ta có: \(a\left(x^2+1\right)-x\left(a^2+1\right)=ax^2+a-xa^2-x=ax\left(x-a\right)-\left(x-a\right)=\left(x-a\right)\left(ax-1\right)\)
\(=x^2a+a-xa^2-x=x\left(xa-1\right)+a\left(1-xa\right)=\left(x-a\right)\left(xa-1\right)\)
\(a\left(x^2+1\right)-x\left(a^2+1\right)\)
\(=ax^2+a-a^2x-x\)
\(=\left(ax^2-a^2x\right)+\left(a-x\right)\)
\(=-ax\left(a-x\right)+\left(a-x\right)\)
\(=\left(a-x\right)\left(-ax+1\right)\)
a(x2+1)-x(a2+1)
=ax2+a-xa2-x
=(ax2-x)-(xa2-a)
=x(ax-1)-a(xa-1)
=(ax-1)(x-a)