How to get from $a\sqrt{1 + \frac{b^2}{a^2}}$ to $\sqrt{a^2 + b^2}$ I have the following expression: $a\sqrt{1 + \frac{b^2}{a^2}}$.  If I plug this into Wolfram Alpha, it tells me that, if $a, b$ are positive, this equals $\sqrt{a^2 + b^2}$.
How do I get that result?  I can't see how that could be done.  Thanks

If $a\ge0$,
$$\begin{align}
a\sqrt{1 + \frac{b^2}{a^2}}
&=\sqrt{a^2}\sqrt{1 + \frac{b^2}{a^2}}
\\
&=\sqrt{a^2\left(1 + \frac{b^2}{a^2}\right)}
\\
&=\sqrt{a^2 + b^2}.
\end{align}$$
($\sqrt{a^2}=|a|$ for all $a\in\mathbb{R}$ and $|a|=a$ when $a\ge0$.)
