Why is it that a rectangular prism with known sum of all side lengths that is a cube has the greatest surface area while a square based prism with known volume is a cube that has the least surface area?
[Math] Minimizing the surface area of a rectangular prism
geometry
Related Solutions
If we are assuming a fully rectangular prism---right angles all around---then there actually are only two candidates: $(h,w,l)=(20,5,2)$ and $(h,w,l)=(12,9,2)$. The former has a volume of 200, the latter has a volume of 216. So $(12,9,2)$ it is.
I solved this by exhaustive search. Here's my very dumb MATLAB code. Certainly it's not the most efficient but sometimes life calls for quick and dirty solutions. At least I limit the loops to 75, since the largest single dimension to achieve a surface area of 300 has to be less than that: $(75,1,1)$ gives us a surface area of 302:
for h = 1 : 75,
for w = 1 : h,
for l = 1 : w,
if 2*(h*w+h*l+w*l) == 300,
[h,w,l,h*w*l]
end
end
end
end
So how would you do this without code? Well, I'd probably begin an exhaustive search, frankly, but with some efficiency. Let's rewrite the surface area formula as follows: $$2(hw+hl+wl)=300 \quad\Longrightarrow\quad hw+l(w+h)=150 \quad\Longrightarrow\quad (h+l)(w+l)=150+l^2$$ So for a fixed value of $l$, $150+l^2$ must admit an integral factorization $pq$ with $p,q>l$.
- Consider $l=1$: we have $pq=151$. Since 151 is prime, so there are no solutions. Continuing:
- $l=2$, $pq=154$, prime factors 2, 7, and 11. Since $p,q>2$, our choices are $(p,q)\in\{(22,7),(14,11)\}$ or $(h,w,l)\in\{(20,5,2),(12,9,2)\}$. These are the two answers we found above.
- $l=3$: $pq=159$, prime factors 3 and 53; since $p,q>3$, there are no solutions.
- $l=4$: $pq=166$, prime factors 2 and 83; no solutions with $p,q>4$.
- $l=5$: $pq=175$, factors 5, 5, and 7. The only solution with $p,q>5$ is $(p,q)=(25,7)$, which gives us $(h,w,l)=(20,2,5)$, a permutation of our previous solution (and not even the optimal one, at that!).
- $l=6$: $pq=186$, factors 2, 3, 31; no solutions with $p,q>6$.
- $l=7$: $pq=199$, prime, no solutions.
I could continue, but since this is a contest problem I probably would have taken a chance on $(12,9,2)$ pretty much as soon as I acquired it. Even if I had time I doubt I would have bothered to proceed past $l=4$ or $l=5$.
As the other answer suggests, if we don't place any restriction on what values the sides of a cuboid can take, there are way too many possibilities. We will assume the sides of the cuboid are all integers.
Given a cuboid of dimension $a \times b \times c$ where $a,b,c$ are integers, we have
$$\begin{align} \verb/Area/ &= 2(ab+bc+ca)\\ \verb/Vol/ &= abc\\ \end{align}$$ WOLOG, we will assume $a \le b \le c$ and rewrite the formula for area as $$(a+b)(a+c) = (ab+bc+ca)+a^2 = \frac12\verb/Area/+a^2 = 120+a^2$$ Since $$\verb/Area/ = 240 \implies 120 = (ab+bc+ca) \ge 3a^2 \implies 1 \le a \le 6$$
We have only $6$ cases to analysis. $$\begin{array}{clll} a = 1 &\implies 120+a^2 = 121 = 11\times 11 &\leadsto& (a,b,c,\verb/Vol/) = (1,10,10,100)\\ a = 2 &\implies 120+a^2 = 124 = 4 \times 31 &\leadsto& (a,b,c,\verb/Vol/) = (2,2, 29,116)\\ a = 3 &\implies 120+a^2 = 129 = 3 \times 43 &\leadsto& \verb/nothing/\\ a = 4 &\implies 120+a^2 = 136 = 2^3 \times 17 &\leadsto& (a,b,c,\verb/Vol/) = (4,4,13,208)\\ a = 5 &\implies 120+a^2 = 145 = 5 \times 29 &\leadsto& \verb/nothing/\\ a = 6 &\implies 120+a^2 = 156 = 2^2 \times 3 \times 13 &\leadsto& (a,b,c,\verb/Vol/) = (6,6,7,252) \end{array}$$
To summarize, if the sides of the cuboids are all integers, there are 4 possible volumes $100, 116, 208, 252$.
Best Answer
Let the side-lengths of a rectangular prism be $a, b, c$. Suppose that $a+b+c = P$. Now we have $$(a-b)^2+(b-c)^2+(c-a)^2 \geq 0.$$ Expanding yields $$2a^2+2b^2+2c^2-2ab-2bc-2ca \geq 0 \Rightarrow a^2+b^2+c^2 \geq ab+bc+ca.$$ Now if we add $2ab+2bc+2ca$ to both sides we get $$a^2+b^2+c^2+2ab+2bc+2ca \geq 3ab+3bc+3ca,$$ which gives you $$P^2 = (a+b+c)^2 \geq 3(ab+bc+ca) \Rightarrow 2(ab+bc+ca) \leq \dfrac{2P^2}{3}.$$
The inequality is equality when $a=b=c$, or when the prism is a cube. This is when the surface area, $2(ab+bc+ca)$ is minimized.
If the volume $V=abc$ is fixed, then by the Arithmetic Mean Geometric Mean Inequality: $$\dfrac{ab+bc+ca}{3} \geq \sqrt[3]{a^2b^2c^2} = \sqrt[3]{V^2},$$ so $$2(ab+bc+ca) \geq 6\sqrt[3]{V^2}.$$ The equality case of AM-GM is $ab=bc=ca$ which implies $a=b=c$, so again a cube minimizes the surface area.