<s>[INST] finding minimum of function Can you please give me some hints finding minimum of this function:
$ (r-1)^2 + (\frac{s}{r} -1)^2 + (\frac{t}{s}-1)^2 + (\frac{4}{t}-1)^2$  
where $ 1 \le r \le s \le t \le 4 $,
$r,s,t \in \Bbb R $
 [/INST] Let us write $a = \frac{r}{1}$, $b = \frac{s}{r}$, $c = \frac{t}{s}$, and $d = \frac{4}{t}$. Then the function you want to minimise is
$$f(a,b,c,d) = (a-1)^2 + (b-1)^2 + (c-1)^2 + (d-1)^2,$$
subject to the constraints $a,b,c,d \geqslant 1$ and $p(a,b,c,d) = a\cdot b\cdot c\cdot d = 4$.
That looks like using the method of Lagrange multipliers may help a lot. So considering $\dfrac{\partial f}{\partial a}(a,b,c,d) = 2(a-1)$ and similar for $b,c,d$, and $\dfrac{\partial p}{\partial a}(a,b,c,d) = bcd = \dfrac{p(a,b,c,d)}{a} = \frac{4}{a}$ on the surface $abcd = 4$, again similar for $b,c,d$. So to have $\nabla f = \lambda\cdot \nabla p$, we must have
$$\lambda = \frac{\partial f/\partial a}{\partial p/\partial a} = \frac{a(a-1)}{2} = \frac{b(b-1)}{2} = \frac{c(c-1)}{2} = \frac{d(d-1)}{2}.$$
Thus the only critical point of $f$ on $\{abcd = 4\}$ (with positive $a,b,c,d$) is $a=b=c=d=\sqrt{2}$. It is readily checked that that point is a local minimum, and then one verifies that it is the global minimum under the constraints.
Thus the function is minimised for $r = \sqrt{2}, s = 2, t = 2\sqrt{2}$, with the minimal value $4(3-2\sqrt{2})$.
</s>