\(\left(1+x^2\right)^2-4x\left(1-x^2\right)=1+2x^{ }+x^4-4x+4x^3\)\(=\left(x^4+2x^3-x^2\right)+\left(2x^3+4x^2-2x\right)-x^2-2x+1=x^2\left(x^2+2x-1\right)+2x\left(x^2+x-1\right)-\left(x^2+2x-1\right)\)\(\left(x^2+2x-1\right)\left(x^2+2x-1\right)=\left(x^2+2x-1\right)^2\)