để \(\frac{7}{x^2-x+1}\in Z\Leftrightarrow x^2-x+1\inƯ_7=\left\{\pm1;\pm7\right\}\)
nếu \(x^2-x+1=-7\Leftrightarrow x^2-x+8=0\left(vo nghiem\right)\)
nếu \(x^2-x+1=-1\Leftrightarrow x^2-x +2=0\left(vo nghiem\right)\)
nếu \(x^2-x+1=1\Leftrightarrow x^2-x=0\Leftrightarrow\orbr{\begin{cases}x=1\\x=0\end{cases} }\)
nếu \(x^2-x+1=7\Leftrightarrow x^2-x-6=0\Leftrightarrow\hept{\begin{cases}x=3\\x=-2\end{cases} }\)
vậy \(x\in\left\{-2,0,1,3\right\}\)
Để \(\frac{7}{x^2-x+1}\)ta có : \(x^2-x+1=x^2-x+\frac{1}{4}+\frac{3}{4}=\left(x-\frac{1}{2}\right)^2+\frac{3}{4}\)
hay \(7⋮\left(x-\frac{1}{2}\right)^2+\frac{3}{4}\Leftrightarrow\left(x-\frac{1}{2}\right)^2+\frac{3}{4}\inƯ\left(7\right)=\left\{\pm1;\pm7\right\}\)
Xét từng trường hợp :
TH1 : \(\left(x-\frac{1}{2}\right)^2+\frac{3}{4}=1\Leftrightarrow\left(x-\frac{1}{2}\right)^2=\frac{1}{4}\Leftrightarrow x-\frac{1}{2}=\pm\frac{1}{2}\)
\(\Leftrightarrow x_1=\frac{1}{2}+\frac{1}{2}=1;x_2=-\frac{1}{2}+\frac{1}{2}=0\)( chọn )
TH2 : \(\left(x-\frac{1}{2}\right)^2+\frac{3}{4}=-1\Leftrightarrow\left(x-\frac{1}{2}\right)^2=-\frac{7}{4}\)ko thỏa mãn
tương tự 2 trường hợp còn lại