ĐKXĐ: \(a\ne\pm1;2;4\)
\(P=\frac{a^3-5a^2+4a+a^2-5a+4}{a^3-5a^2+4a-2a^2+10a-8}=\frac{a\left(a^2-5a+4\right)+\left(a^2-5a+4\right)}{a\left(a^2-5a+4\right)-2\left(a^2-5a+4\right)}\)
\(P=\frac{\left(a+1\right)\left(a^2-5a+4\right)}{\left(a-2\right)\left(a^2-5a+4\right)}=\frac{a+1}{a-2}\)
b/ \(P=\frac{a+1}{a-2}=1+\frac{3}{a-2}\)
\(P\) nguyên khi \(a-2=Ư\left(3\right)=\left\{-3;-1;1;3\right\}\)
\(a-2=-3\Rightarrow a=-1\left(l\right)\)
\(a-2=-1\Rightarrow a=1\left(l\right)\)
\(a-2=1\Rightarrow a=3\)
\(a-2=3\Rightarrow a=5\)
Vậy \(\left[{}\begin{matrix}a=3\\a=5\end{matrix}\right.\) thì P nguyên
\(P=\frac{a^3-4a^2-a+4}{a^3-7a^2+14a-8}=\frac{\left(a-4\right)\left(a+1\right)\left(a-1\right)}{\left(a-1\right)\left(a-2\right)\left(a-4\right)}=\frac{a+1}{a-2}\)
b \(P=\frac{a-2+3}{a-2}=1+\frac{3}{a-2}\)
Để P nhận giá trị nguyên \(\left(a-2\right)\inƯ\left(3\right)=\left\{1;-1;-3;3\right\}\)
\(\Leftrightarrow\left[{}\begin{matrix}a-2=1\\a-2=-1\\a-2=3\\a-2=-3\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}a=3\\a=1\\a=5\\a=-1\end{matrix}\right.\)