Hello we all know that $$\sqrt {a^2}=|a|$$ so when we have $$a^2=5$$ that is $$|a|=\sqrt5$$ and $$a=\pm\sqrt5$$ but i very often see that when solving integrals only the positive value is usually considered, for eg.
Here in this example since $$a^2=5$$ that means$$a=\pm\sqrt5$$ but the book considers only the positive value why?

If we use the pre-packaged solution with $a^2=\frac54$: $$=-\frac x4\sqrt{5/4-x^2}+\frac5{16}\sin^{-1}\frac{2x}{\sqrt5}+K$$ and then use $a=-\frac{\sqrt5}2$, the arcsine term would be flipped in sign, but then differentiating $$-\frac x4\sqrt{5/4-x^2}-\frac5{16}\sin^{-1}\frac{2x}{\sqrt5}+K$$ does not give the original integrand but $-\frac14\sqrt{5 - 4 x^2}$ instead.
To be fully correct the integral should have an absolute value sign where the single $a$ appears. There is a reason only the plus sign is accounted for though – the principal square root of a positive number remains positive, so it is the more "natural" choice of sign.