<s>[INST] If $ \bigtriangleup ABC$: $\angle CAB = \frac{\pi}{2}$, with height $AD$ and median $AK$. Prove $\angle BAD = \angle BCA = \angle KAC.$ 
If $\triangle ABC$ is a triangle and $\angle CAB = \frac{\pi}{2}$, with height $AD$ and median $AK$; suppose that $D$ is between $B$ and $K$.

*

*Prove that $\angle BAD = \angle BCA = \angle KAC$.

*Then, prove that $\angle BCA= \frac\pi 8$ if $|AD|=|DK|$.

*Conclude that
$$\sin\frac \pi 8=\frac{\sqrt{2-\sqrt 2}}{2};\quad \cos\frac \pi 8=\frac{\sqrt{2+\sqrt 2}}{2};\quad \operatorname{tg}\frac \pi 8= \sqrt 2 - 1$$


I already achieved the draw, but I don't really know how to start.
I know that $\bigtriangleup DBA \sim \bigtriangleup DAC$
 [/INST] 
Consider the circumcircle of $\triangle ABC$. Since $\angle A=\frac{\pi}{2}$, it subtends the diameter, thus $K$ is the circumcenter and $$KA=KB=KC\tag{1}$$

*

*Since $\triangle KCA$ is isosceles, $\angle KCA=\angle KAC$.
In $\triangle ABD$ $\ \ \angle D=\frac{\pi}{2}$, thus $\angle BAD=\frac{\pi}{2}-\angle ABD$, but $\frac{\pi}{2}-\angle ABC=\angle ACB$, thus $\angle BAD=\angle ACB=\angle KAC$, QED.

*In $\triangle ADK$ $\ \ \angle D=\frac{\pi}{2}$, thus $|AD|=|DK|$ $\Rightarrow$ $\angle A=\angle K=\frac{\pi-\angle D}{2}=\frac{\pi}{4}$.
Since $\frac{\pi}{4}=\angle AKD=\angle KAC+\angle KCA$ and $\angle KAC=\angle KCA$, thus $\angle ACK=\frac{\pi}{8}$, QED.

*In $\triangle ADC$ $\ \ \angle D=\frac{\pi}{2}$ and $AK=KC=AD\sqrt{2}$ thus $$\tan \frac{\pi}{8}=\frac{AD}{DK+KC}=\frac{AD}{AD+AD\sqrt{2}}=
\frac{1}{1+\sqrt{2}}=\sqrt{2}-1,$$
the other functions of $\frac{\pi}{8}$ are done by using
$$\frac{1}{\cos^2\theta}=1+\operatorname{tg}^2\theta,\quad
\frac{1}{\sin^2\theta}=1+\operatorname{ctg}^2\theta.$$
</s>