Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Problem statement

To motivate first definitions, let us consider the following practical shape optimization problem.

A can producer wants to optimize his consumption of raw material.

They formulate one explicit constraint: the volume of the can must be V0=1V_0 = 1 L.

We assume objects of constant thickness ee. Therefore, the quantity of raw material is simply given by

quantity of raw material = area of cylinder ×e\text{quantity of raw material } = \text{ area of cylinder } \times e

Since the goal is to optimize (i.e., in this case, minimize) the consumption of raw material, the optimization problems can be formulated in layman’s terms as follows:

Mathematical formulation

Expression of the area AA (objective function or criterion)

A(r,h)=Acylinder(r,h)+Alids(r,h)=2πrh+2πr2A(r, h) = A_{\text{cylinder}}(r, h) + A_{\text{lids}}(r, h) = 2\pi r h + 2 \pi r^2

The dimensions rr and hh are the variables of the optimization problem.

Constraints We have explicit and implicit constraints:

The constrained optimization problem is finally written as

Find (r⋆,h⋆) such that A(r⋆,h⋆) is minimal and {r≥0 and h≥0πr2h=V0\text{Find } (r^\star, h^\star) \text{ such that } A(r^\star, h^\star) \text{ is minimal and } \begin{cases}r\geq 0 \text{ and } h\geq 0\\ \pi r^2 h = V_0\end{cases}

Simplification

Notice that hh and rr are related by the constraint V0=πr2hV_0 = \pi r^2 h. Therefore, the area A(r,h)A(r, h) can be rewritten as a function of rr only. Using

h(r)=V0πr2(h≥0OK!)h(r) = \frac{V_0}{\pi r^2} \quad (h\geq 0 \quad \text{OK!})

and substituting this into the expression for A(r,h)A(r, h), one obtains

A(r,h)=2πrh+2πr2=2πrV0πr2+2πr2=2V0r+2πr2:=A~(r)\begin{align*} A(r, h) &= 2\pi r h + 2\pi r^2\\ & = 2 \pi r \frac{V_0}{\pi r^2} + 2 \pi r^2\\ &= \frac{2V_0}{r} + 2\pi r^2\\ &:= \tilde{A}(r) \end{align*}

The volume constraint is directly taken into account in the new objective function A~(r)\tilde{A}(r). We consider the constraint r>0r > 0 when searching for the minimum of A~(r)\tilde{A}(r) over R+∗\mathbb{R}_+^*;

Visualization using Python

Let us plot the objective function using basic Python commands.

<Figure size 640x480 with 1 Axes>

The plot suggests a minimizer exists, somewhere between r=4r=4 cm and r=6r = 6 cm. Quite naturally, the minimum area value is obtained when the derivative of A~(r)\tilde{A}(r) vanishes. Let us do the explicit computation.

Explicit solutions

The derivative of the objective function vanishes at its minimum.

dA~(r)dr=4πr−2V0r2\frac{\mathrm{d}\tilde{A}(r)}{\mathrm{d}r} = 4\pi r - \frac{2 V_0}{r^2}

We solve

dA~(r)dr∣r=r⋆=0  ⟺  4πr⋆=2V0(r⋆)2  ⟺  r⋆=[V02π]1/3\left.\frac{\mathrm{d}\tilde{A}(r)}{\mathrm{d}r}\right|_{r = r^\star} = 0 \iff 4\pi r^\star = \frac{2V_0}{(r^\star)^2} \iff r^\star = \left[\frac{V_0}{2\pi}\right]^{1/3}

Since A~′′(r)=4V0r3+4π>0\tilde{A}''(r) = \frac{4V_0}{r^3} + 4\pi > 0 for all r>0r > 0, A~\tilde{A} is strictly convex on R+∗\mathbb{R}_+^*, so this stationary point is the unique global minimizer.

In summary, the solutions to the optimization problem are

r⋆=[V02π]1/3h^=V0π(r⋆)2=2r⋆r^\star = \left[\frac{V_0}{2\pi}\right]^{1/3} \qquad \hat{h} = \frac{V_0}{\pi (r^\star)^2}= 2r^\star

We can also check that our computations are correct using Python, by modifying the previous code.

<Figure size 640x480 with 1 Axes>
Optimal value of r minimizing A(r): r_opt = 5.42 cm
Minimal area A(r_opt): A_min = 553.58 cm^2
Associated optimal height value h(r_opt): h_opt = 10.84 cm

You can play around with this code snippets and see how the solution changes as we modify the value of V0V_0.