Bài 2:
a)Với a > 0;a ≠ 1;a ≠ 2 ta có
\(P=\left(\dfrac{\sqrt{a}^3-1}{\sqrt{a}\left(\sqrt{a}-1\right)}-\dfrac{\sqrt{a}^3+1}{\sqrt{a}\left(\sqrt{a}+1\right)}\right)\cdot\dfrac{a-2}{a+2}\)
\(=\left(\dfrac{a+\sqrt{a}+1}{\sqrt{a}}-\dfrac{a-\sqrt{a}+1}{\sqrt{a}}\right)\cdot\dfrac{a-2}{a+2}\)
\(=\dfrac{a+\sqrt{a}+1-a+\sqrt{a}-1}{\sqrt{a}}\cdot\dfrac{a-2}{a+2}\)
\(=\dfrac{2\sqrt{a}}{\sqrt{a}}\cdot\dfrac{a-2}{a+2}=\dfrac{2\left(a-2\right)}{a+2}\)
b)Ta có:
\(P=\dfrac{2\left(a-2\right)}{a+2}=\dfrac{2a-4}{a+2}=\dfrac{2\left(a+2\right)-8}{a+2}=2-\dfrac{8}{a+2}\)
P nguyên khi \(2-\dfrac{8}{a+2}\) nguyên⇒\(\dfrac{8}{a+2}\) nguyên⇒\(a+2\inƯ\left(8\right)=\left\{\pm1;\pm2;\pm4;\pm8\right\}\)
\(TH1:a+2=1\Rightarrow a=-1\left(loai\right)\)
\(TH2:a+2=-1\Rightarrow a=-3\left(loai\right)\)
\(TH3:a+2=2\Rightarrow a=0\left(loai\right)\)
\(TH4:a+2=-2\Rightarrow a=-4\left(loai\right)\)
\(TH5:a+2=4\Rightarrow a=2\left(loai\right)\)
\(TH6:a+2=-4\Rightarrow a=-6\left(loai\right)\)
\(TH7:a+2=8\Rightarrow a=6\left(tm\right)\)
\(TH8:a+2=-8\Rightarrow a=-10\left(loai\right)\)
Vậy a = 6