\(\left(x-1\right)^2-2\left(x^2-1\right)+\left(x+1\right)\)
\(=x^2-2x+1-2x^2+2+x+1\)
\(=-x^2-x-\dfrac{1}{4}+\dfrac{17}{4}\)
\(=-\left(x^2+2.\dfrac{1}{2}x+\dfrac{1}{4}\right)+\dfrac{17}{4}\)
\(=-\left(x+\dfrac{1}{2}\right)^2+\dfrac{17}{4}\)
\(=\left(\dfrac{\sqrt{17}}{2}\right)^2-\left(x+\dfrac{1}{2}\right)^2\)
\(=\left(\dfrac{\sqrt{17}+1}{2}+x\right)\left(\dfrac{\sqrt{17}-1}{2}-x\right)\)