<s>[INST] Find the min value of $\frac{1}{x+\frac{1}{y+\frac{1}{z}}}$, if $x\ne y \ne z$ and $x,y,z\in {1,2,3,4,5}$ My answer is $\frac{5}{29}$, I just use logic to substitute numbers in the expression, but I can't prove my answer If this expression be minimum then the denominator should be the greatest, so I just let  x=5 and I need to let $\frac{1}{y+\frac{1}{z}}$ be the greatest so just need this denominator be smallest so y=1 and z=4, this is what I thought. 
 [/INST] $$
f(x,y,z) = \frac{1}{x+\frac{1}{y+\frac{1}{z}}}
$$
is decreasing in $x$ and $z$, and increasing in $y$. Since $x,z$ are distinct integers we have either
$$
 x < z \implies x \le 4, y \ge 1, z \le 5  \implies f(x, y, z) \ge f(4, 1, 5) = \frac{6}{29}
$$
or
$$
 z < x \implies x \le 5, y \ge 1, z \le 4  \implies f(x, y, z) \ge f(5, 1, 4) = \frac{5}{29}
$$
so that the minimal value is the smaller of these two, which is $f(5, 1, 4) = \frac{5}{29}$.
</s>