\(P=\left(\dfrac{x^2+1}{x+1}-1+\dfrac{2}{2+x}+\dfrac{1}{x+2}\right)\left(x+2\right)\)
\(P=\left(\dfrac{x^2+1}{x+1}-\dfrac{x+1}{x+1}+\dfrac{2}{2+x}+\dfrac{1}{x+2}\right)\left(x+2\right)\)
\(P=\left(\dfrac{x^2+1-x-1}{x+1}+\dfrac{3}{2+x}\right)\left(x+2\right)\)
\(P=\dfrac{x.\left(x-1\right)\left(x+2\right)+3\left(x+1\right)}{\left(x+1\right)\left(x+2\right)}.\left(x+2\right)\)
\(P=\dfrac{x.\left(x-1\right)\left(x+2\right)+3\left(x+1\right)}{\left(x+1\right)}\)
Thay \(x=-\dfrac{1}{2}\)vào P ta có:
\(P=\dfrac{-\dfrac{1}{2}.\left(-\dfrac{1}{2}-1\right)\left(-\dfrac{1}{2}+2\right)+3.\left(-\dfrac{1}{2}+1\right)}{\left(-\dfrac{1}{2}+1\right)}\)
\(P=\dfrac{-\dfrac{1}{2}.\left(-\dfrac{3}{2}\right)\left(\dfrac{3}{2}\right)+3.\left(\dfrac{1}{2}\right)}{\dfrac{1}{2}}\)
\(P=\left(\dfrac{9}{6}+\dfrac{3}{2}\right).2\)
\(P=\left(\dfrac{9}{8}+\dfrac{12}{8}\right).2\)
\(P=\dfrac{21}{8}.2\)
\(P=\dfrac{21}{4}\)
Vậy \(P=\dfrac{21}{4}\) tại \(x=-\dfrac{1}{2}\)