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). 
 A: An elemenraty solution: In the following figure $|BC|=a,|CA|=b,|AB|=c$ and $[CD]$ angle bisector. Let's draw square $CEDF$ and $|CE|=x$. So, $|BE|=a-x$ and  $|CD|=x\sqrt2$. Now $\triangle ABC \sim \triangle DBE$ and $$\dfrac{b}{a}=\dfrac{x}{a-x} $$
Therefore $x=\dfrac{ab}{a+b}$ and $|CD|=\dfrac{ab\sqrt2}{a+b}.$

A: 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}
$$
A: Alternative solution: Refer to the diagram below:

The Sine Theorem for $\Delta ACD:$
$$\frac{l_c}{\sin{CAD}}=\frac{b}{\sin{CDA}} \Rightarrow l_c=\frac{b \sin{CAD}}{\sin{(180^\circ}-(CAD+45^\circ))}=\frac{b\cdot\frac{a}{c}}{\sin{(CAD+45^\circ)}}=$$
$$\frac{ab}{c(\sin{CAD} \cdot \cos{45^\circ}+\cos{CAD}\cdot\sin{45^\circ})}=\frac{ab}{c(\frac{a}{c} \cdot \frac{1}{\sqrt{2}}+\frac{b}{c}\cdot\frac{1}{\sqrt{2}})}=\frac{\sqrt{2}ab}{a+b}.$$
A: Just use the fact that area of a triangle PQR is PQsinx, where x is the included angle by P and Q . And here, sum of the areas of the two triangles (which are made by the angle bisector) is equal to 1/2*AB*BC(i.e. Area of ABC). sin45 will give 1/root2
