\(D=\dfrac{x^2-4x+2}{x^2-4x+1}=\dfrac{x^2-4x+1+1}{x^2-4x+1}=1+\dfrac{1}{x^2-4x+1}\)
Để D nguyên thì \(1⋮\left(x^2-4x+1\right)\)
\(\Rightarrow x^2-4x+1\inƯ\left(1\right)=\left\{-1;1\right\}\)
*) \(x^2-4x+1=-1\)
\(x^2-4x+1+1=0\)
\(x^2-4x+2=0\)
\(x^2-4x+2+2=0+2\)
\(x^2-4x+4=2\)
\(\left(x-2\right)^2=2\)
\(x-2=\sqrt{2}\) hoặc \(x-2=-\sqrt{2}\)
+) \(x-2=\sqrt{2}\)
\(x=\sqrt{2}+2\)
+) \(x-2=-\sqrt{2}\)
\(x=-\sqrt{2}+2\)
*) \(x^2-4x+1=1\)
\(x^2-4x=1-1\)
\(x\left(x-4\right)=0\)
\(x=0\) hoặc \(x-4=0\)
+) \(x-4=0\)
\(x=4\)
Vậy \(x=0;x=-\sqrt{2}+2;x=\sqrt{2}+2;x=4\) thì D nguyên
\(E=\dfrac{x^3+2x^2+5x-2}{x+2}\)
\(=\dfrac{\left(x^3+2x^2\right)+\left(5x+10\right)-12}{x+2}\)
\(=\dfrac{x^2\left(x+2\right)+5\left(x+2\right)-12}{x+2}\)
\(=x^2+5-\dfrac{12}{x+2}\)
Để E nguyên thì \(x\) nguyên và \(12⋮\left(x+2\right)\)
\(\Rightarrow x+2\inƯ\left(12\right)=\left\{-12;-6;-4;-3;-2;-1;1;2;3;4;6;12\right\}\)
\(\Rightarrow x\in\left\{-14;-8;-6;-5;-4;-3;-1;0;1;2;4;10\right\}\)
Vậy \(x\in\left\{-14;-8;-6;-5;-4;-3;-1;0;1;2;4;10\right\}\) thì E nguyên