<s>[INST] Angle bisector in a right angled triangle In a right angled triangle, the legs adjacent to the right angle are equal to $a$ and $b$. Prove that the length of the bisector (of the right angle) is equal to $$\frac{a\cdot b\cdot \sqrt{2}}{a+b}.$$
While approaching this question, I was very puzzled as to how I would end up with this expression. 
Additionally, I couldn't figure out where the $\sqrt{2}$ would come from, other than the sine or cosine of $45$ degrees (from the bisector). 
 [/INST] In a General Triangle
Using the Law of Sines, we get that side $c$ is broken up as follows by the angle bisector:

Using the Law of Cosines we get
$$
\left(\frac{ac}{a+b}\right)^2+d^2-\frac{2acd}{a+b}\cos(D)=a^2\tag{1}
$$
and
$$
\left(\frac{bc}{a+b}\right)^2+d^2+\frac{2bcd}{a+b}\cos(D)=b^2\tag{2}
$$
Multiply $(1)$ by $b$ and $(2)$ by $a$ and add to get
$$
(a+b)ab\left(\frac{c}{a+b}\right)^2+(a+b)d^2=(a+b)ab\tag{3}
$$
Solving $(3)$ for $d^2$ yields
$$
\bbox[5px,border:2px solid #C0A000]{d^2=ab\frac{(a+b)^2-c^2}{(a+b)^2}}\tag{4}
$$

In a Right Triangle
Since, in a right triangle, $a^2+b^2=c^2$, $(4)$ becomes
$$
\bbox[5px,border:2px solid #C0A000]{d^2=\frac{2a^2b^2}{(a+b)^2}}\tag{5}
$$
</s>