# Thread:

1. ## Maximizing the cuboid volume with fixed perimeter

First, the 2D case is easy...

Q0: In a rectangle, we know that the sum of the dimensions (lenght and width) is a fixed $C$. Which are the dimensions values that maximize the area?

A: One dimension is $x$, and thus the other is $C-x$. Therefore, the area is $x \cdot (C-x) = xC - x^2$. Then, setting the derivative equal to zero would provide us the answer ( $C/2$ on both dimensions)

Okay... now I want to generalize this to the 3D case. More precisely:

Q1: In a cuboid (see en.wikipedia.org/wiki/Cuboid), we know that the sum of the dimensions (lenght, width and depth) is a fixed $C$. Which are the dimensions values that maximize the volume?

Finally, is there a generalization of the answer to Q1 for higher dimensions?

2. ## Re: Maximizing the cuboid volume with fixed perimeter

Originally Posted by andre.vignatti
First, the 2D case is easy...

Q0: In a rectangle, we know that the sum of the dimensions (lenght and width) is a fixed $C$. Which are the dimensions values that maximize the area?

A: One dimension is $x$, and thus the other is $C-x$. Therefore, the area is $x \cdot (C-x) = xC - x^2$. Then, setting the derivative equal to zero would provide us the answer ( $C/2$ on both dimensions)

Okay... now I want to generalize this to the 3D case. More precisely:

Q1: In a cuboid (see en.wikipedia.org/wiki/Cuboid), we know that the sum of the dimensions (lenght, width and depth) is a fixed $C$. Which are the dimensions values that maximize the volume?

Finally, is there a generalization of the answer to Q1 for higher dimensions?
The easiest way is to use Lagrange Multipliers. So the problem would be we want to maximize the volume

$V(x,y,z)=xyz$

subject to the constraint that

$x+y+z=C \iff x+y+z-C=0 \implies F(x,y,z)=x+y+z-C$

Now we use the Lagrange multipliers to get

$\nabla V(x,y,z)=\lambda \nabla F(x,y,z)$

This gives

$yz \vec{i}+xz\vec{j}+xy\vec{k}=\lambda\vec{i}+\lambda \vec{j}+\lambda\vec{k}$

This gives a system of three equations with four unknowns. Using the original contraint gives the non linear system of equations

$yz=\lambda \\ xz=\lambda \\ xy=\lambda \\ x+y+z=C$

This gives that

$xyz=\lambda x =\lambda y =\lambda z$

or

$x=y=z= \frac{C}{3}$

You can use Lagrange multipliers in any dimention to solve this problem

3. ## Re: Maximizing the cuboid volume with fixed perimeter

Hummm, thank you TheEmptySet! Now I need to learn about the Lagrange multipliers :-)
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 19, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8644922375679016, "perplexity_flag": "head"}