Computing sum of lengths of legs of a right triangle
See diagram:
$$ {r\over\cos\alpha}+r\tan\alpha+r+r+r\cot\alpha+{r\over\sin\alpha}= r\left(2+{1+\sin\alpha+\cos\alpha\over\sin\alpha\cos\alpha}\right) $$
See diagram:
$$ {r\over\cos\alpha}+r\tan\alpha+r+r+r\cot\alpha+{r\over\sin\alpha}= r\left(2+{1+\sin\alpha+\cos\alpha\over\sin\alpha\cos\alpha}\right) $$