1: Ta có: \(A=\left(\dfrac{x^2-16}{x-4}-1\right):\left(\dfrac{x-2}{x-3}+\dfrac{x+3}{x+1}+\dfrac{x+2-x^2}{x^2-2x-3}\right)\)
\(=\left(x+4-1\right):\left(\dfrac{\left(x-2\right)\left(x+1\right)}{\left(x-3\right)\left(x+1\right)}+\dfrac{\left(x+3\right)\left(x-3\right)}{\left(x+1\right)\left(x-3\right)}+\dfrac{-x^2+x+2}{\left(x-3\right)\left(x+1\right)}\right)\)
\(=\left(x+3\right):\dfrac{x^2+x-2x-2+x^2-9-x^2+x+2}{\left(x-3\right)\left(x+1\right)}\)
\(=\left(x+3\right):\dfrac{x^2-9}{\left(x-3\right)\left(x+1\right)}\)
\(=\dfrac{\left(x+3\right)\left(x-3\right)\left(x+1\right)}{x^2-9}\)
\(=x+1\)
ĐKXĐ: \(x\notin\left\{4;3;-1\right\}\)
2: Để \(\dfrac{A}{x^2+x+1}\) nhận giá trị nguyên thì \(x+1⋮x^2+x+1\)
\(\Leftrightarrow x^2+x⋮x^2+x+1\)
\(\Leftrightarrow x^2+x+1-1⋮x^2+x+1\)
mà \(x^2+x+1⋮x^2+x+1\)
nên \(-1⋮x^2+x+1\)
\(\Leftrightarrow x^2+x+1\inƯ\left(-1\right)\)
\(\Leftrightarrow x^2+x+1\in\left\{1;-1\right\}\)
\(\Leftrightarrow x^2+x\in\left\{0;-2\right\}\)
\(\Leftrightarrow x^2+x=0\)(Vì \(x^2+x>-2\forall x\))
\(\Leftrightarrow x\left(x+1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x=0\\x+1=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=0\left(nhận\right)\\x=-1\left(loại\right)\end{matrix}\right.\)
Vậy: Để \(\dfrac{A}{x^2+x+1}\) nhận giá trị nguyên thì x=0