\(P=\dfrac{x^3-5x^2+4x+x^2-5x+4}{x^3-5x^2+4x-2x^2+10x-8}=\dfrac{x\left(x^2-5x+4\right)+\left(x^2-5x+4\right)}{x\left(x^2-5x+4\right)-2\left(x^2-5x+4\right)}\)
\(=\dfrac{\left(x+1\right)\left(x^2-5x+4\right)}{\left(x-2\right)\left(x^2-5x+4\right)}\)
ĐKXĐ: \(\left\{{}\begin{matrix}x-2\ne0\\x^2-5x+4\ne0\end{matrix}\right.\) \(\Rightarrow x\ne\left\{1;2;4\right\}\)
\(\Rightarrow P=\dfrac{x+1}{x-2}=1+\dfrac{3}{x-2}\)
Để P nguyên \(\Rightarrow3⋮\left(x-2\right)\Rightarrow x-2=Ư\left(3\right)=\left\{-3;-1;1;3\right\}\)
\(x-2=-3\Rightarrow x=-1\)
\(x-2=-1\Rightarrow x=1\left(l\right)\)
\(x-2=1\Rightarrow x=3\)
\(x-2=3\Rightarrow x=5\)
Vậy \(x=\left\{-1;3;5\right\}\) thì P nguyên