a: \(M=\dfrac{\left(x-1\right)\left(x^2+x+1\right)}{x\left(x-1\right)}-\dfrac{\left(x+1\right)\left(x^2-x+1\right)}{x\left(x+1\right)}+\dfrac{x^2+1}{x}\)
\(=\dfrac{x^2+x+1-x^2+x-1+x^2+1}{x}\)
\(=\dfrac{x^2+2x+1}{x}=\dfrac{\left(x+1\right)^2}{x}\)
b:Để M=9/2 thì \(\dfrac{\left(x+1\right)^2}{x}=\dfrac{9}{2}\)
\(\Leftrightarrow2\left(x^2+2x+1\right)=9x\)
\(\Leftrightarrow2x^2-5x+2=0\)
\(\Leftrightarrow\left(x-2\right)\left(2x-1\right)=0\)
=>x=2 hoặc x=1/2