I recently solved the following integral:
$$ \int _1^{\sqrt{3}}\frac{\sqrt{1+x^2}}{x^2}dx $$
After integrating, I obtained the result:
$$ \frac{1}{2}\ln\frac{2-\sqrt2}{2-\sqrt3}+\frac{1}{2}\ln\frac{2+\sqrt3}{2+\sqrt2}+\sqrt2-\frac{2}{\sqrt3} $$
However, the answer provided in my textbook differs slightly:
$$ \sqrt{2}-\frac{2}{\sqrt{3}}+\log\left(\frac{2+\sqrt{3}}{1+\sqrt{2}}\right) $$
The provided answer in the book clearly looks better and more concise.
I'm particularly interested in understanding how
$$ \sqrt{\frac{(2-\sqrt{2})(2+\sqrt{3})}{(2-\sqrt{3})(2+\sqrt{2})}} $$
is exactly equal to
$$ \frac{2+\sqrt{3}}{1+\sqrt{2}} $$
Could someone kindly provide an explanation for this simplification as it is not obvious to me? Thank you!
Note that$$\frac{2+\sqrt3}{2-\sqrt3}=\frac{\left(2+\sqrt3\right)^2}{\left(2-\sqrt3\right)\left(2+\sqrt3\right)}=\left(2+\sqrt3\right)^2$$and that\begin{align}\frac{2-\sqrt2}{2+\sqrt2}&=\frac{\left(2-\sqrt2\right)\left(2+\sqrt2\right)}{\left(2+\sqrt2\right)^2}\\&=\frac2{\left(2+\sqrt2\right)^2}\\&=\frac{\sqrt2^2}{\left(2+\sqrt2\right)^2}\\&=\frac1{\left(\sqrt2+1\right)^2}.\end{align}