Minimizing costs to make a cylinder A cylinder must have a volume $V=4000$ and its made from just one rectangle sheet, so its top and bottom must be cut from this sheet.
I have to find the dimensions of this sheet such that the parts I lost (when I cutoff the top and the bottom) are the lowest.
I thought about minimize the difference between the area of the original sheet and the parts I'll use to make my cylinder:

(I imagine this is the best way to don't waste sheet - the original problem doesn't have any image).
So the area of the original sheet is
$$(h+2R)\cdot4R=4hR+8R^2$$
and the area I'll use to make the cylinder is
$$4hR+2\cdot\pi R^2$$
so the difference between them is
$$8R^2-2\pi R^2=0$$
and derivating it:
$$16R-4\pi R$$
which the only root is $R=0$. What is wrong?
 A: Assume that you are free to use any or all the sheets stocked in hardware supply store whose total area is $S$.
From the wasted area  we have the useful area.
$$ A_{usable} = S-A_{wasted}= A $$
$$ V= \pi R^2 h, A= 2 \pi R h + 2 \pi R^2 $$
Eliminate one variable, of relation derivate and find its value. Using other relation find the second variable ( details not included... for the usual exercise).
We end end up with result of relative proportion
$$ h=2 R$$
$$ V= 4000 = \pi R^2 \cdot 2 R\to R_{opt}=\left(\frac{2000}{\pi}\right)^\frac13, h_{opt}=R_{opt}/2$$
Point is, there is no need to a priori optimize the area that is anyway later on going to enter into mathematical optimization. The remainder area is negative. Multiplying  by $-1,$ the minimization and optimal solution cannot be affected, the constants play no role here.
From Variational calculus we can see the irrelevance of sign,
$$ \frac{\partial V_{R}}{\partial V_{h}}=\frac{\partial A_{R}}{\partial A_{h}}=\quad \frac{\partial A_{uR}}{\partial A_{uh}}=\frac{\partial A_{wR}}{\partial A_{wh}}.$$
A: This is an equality constrained optimization problem, i.e.
\begin{equation}
\text{minimize} \quad 4hR + 8R^2 \quad \text{subject to} \quad \pi R^2 h = 4000, 
\end{equation}
which in turn can be turned in to
\begin{equation}
\text{minimize} \quad f(R) = 4 \frac{4000}{\pi R^2} R + 8R^2 =  \frac{16000}{\pi R} + 8R^2 . 
\end{equation}
This problem can be solved by setting $f'(R) = 0$ and solve for $R$, which yields $R^* = \left(\frac{1000}{\pi}\right)^{1/3}$. You can verify that it is indeed a minimum with $f''(R^*) > 0$.
