# Optimizing Soda Can Production Costs with Calculus

Written on

## Chapter 1: Understanding Mathematical Optimization

Mathematical optimization focuses on determining the best possible value (either a maximum or minimum) of a given function within specific constraints that illustrate the relationships between various variables. In this discussion, I will outline how optimization is approached using single-variable calculus, particularly through a classic scenario of minimizing the sheet metal required to create a specific volume of liquid.

Consider a factory producing soda cans. For simplicity, let’s assume these cans are perfectly cylindrical with a height ( h ) and diameter ( d ). We need these cans to hold a volume of exactly 0.25 m³. However, we aim to minimize production costs by reducing the amount of sheet metal used, as increased material usage translates to higher costs and diminished profits. Based on sales data from the last five years, the cost of the sheet metal is $0.01/m².

This scenario presents an optimization challenge. Initially, we need to identify what we aim to minimize. While material usage is one aspect, cost is another. How can we quantify both simultaneously? We can calculate the cost of a single can, which is determined by its dimensions. The cost formula becomes ( 0.01/m² times text{surface area of the can} ). For a cylindrical can, the surface area consists of the top and bottom circular surfaces, and the curved side.

The top and bottom surfaces each present a circular area. Given the diameter ( d ), we can compute the total area contribution.

The side of the can can be modeled as a rectangular sheet wrapped circularly. The height is ( h ), while the length corresponds to the circumference of the top and bottom, leading to the area calculation as follows:

Consequently, the total surface area is represented as:

Multiplying this total by the cost per square meter of $0.01 yields:

This function involves two variables: ( h ) and ( d ). To minimize it using single-variable calculus, we need to express it in terms of a single variable. We can leverage the constraint that the total volume must equal 0.25 m³. The volume for a cylinder is given by the formula:

This allows us to substitute ( h ) back into the cost function ( C ):

We now have a function of one variable. To locate the minimum, we compute the first derivative with respect to ( d ):

Setting this derivative to zero allows us to find critical points:

To confirm that this point represents a minimum, we can evaluate the second derivative:

The result will be positive, indicating a minimum point. For additional verification, we can visualize the cost function using Python with this code snippet:

import numpy as np from matplotlib import pyplot as plt plt.style.use('seaborn-poster')

d = np.linspace(0.1, 2, 201) d_min = (1/np.pi)**(1/3) C = 0.01/d + 0.005*np.pi*d**2

plt.plot(d, C) plt.axvline(x = d_min, color = 'r') plt.xlabel(r"$d$") plt.ylabel(r"$C(d)$") plt.xlim([0.1, 2]) plt.ylim([0, 0.1])

This code produces the following plot:

Figure 1: Cost function ( C(d) ) (blue) with the minimizing diameter ( d ) indicated in red.

From the graph, it is evident that our calculated value of ( d ) is indeed correct. The next step is to determine the can dimensions that minimize costs for this specified volume. While we have established the diameter, we can calculate the corresponding height from:

Thus, the minimum cost can be derived as follows:

## Chapter 2: Optimization Techniques in Action

The first video discusses optimization strategies utilizing calculus, offering insights into practical applications of these mathematical principles.

The second video explores how to tackle a variety of optimization problems using calculus, providing a comprehensive guide for learners.