BRAGA

02 Writing02-02 Notes02-02-179

Cylinder

Published 16 Apr 20269 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
  3. 03Real-world use
  4. 04The formula, piece by piece
  5. 05The formula in words
  6. 06Critical Concepts
  7. 07Step-by-step calculation (tiny example)
  8. 08Code examples
V=πr2hV = \pi r^2 h
(1)

, S=2πr(r+h)S = 2\pi r(r + h)

Deep Breakdown

What it tells me (Situation Awareness): A cylinder with base radius rr and height hh has volume V=πr2hV = \pi r^2 h and total surface area S=2πr(r+h)S = 2\pi r(r + h), where 2πr22\pi r^2 covers the two circular caps and 2πrh2\pi r h is the lateral surface. The volume formula is simply the base area (πr2\pi r^2) multiplied by the height — a principle that generalizes to any prism. In DA/DS, the cylinder appears in logistics/operations analytics (tank capacity, container optimization), in 3D spatial queries (cylindrical geofences around road corridors), and as a conceptual shape for understanding how volume scales in models with one "width" parameter and one "depth" parameter (analogous to feature width vs number of layers in a neural network height analogy).

Flowchart

Fixed volume, minimizesurfaceFixed surface, maximizevolumeLogisticsGeospatialPackagingCylinder: radiusr, height hVolume V = pi *r^2 * hSurface area S= 2*pi*r*(r + h)V = base_area *height (generalprism principle)S = 2 caps(2*pi*r^2) +lateral band(2*pi*r*h)OptimizationquestionsOptimal when h= 2r (cube-likeproportion)Same: h = 2r isthe optimal ratioDA/DSapplicationsTank or silocapacity: V =pi*r^2*hCylindricalcorridorgeofencearound a roadaxisSurfaceminimizationreduces materialcost

Real-world use

Where it is used

Used in supply chain and logistics (capacity of cylindrical tanks, silos, drums), in geospatial analytics (cylindrical buffer zones around linear features like roads or pipelines), in packaging optimization (minimize material surface for a given volume), and as a concrete example of how volume scales with r2hr^2 h when teaching quadratic vs linear relationships in feature interactions.

Problem it solves

Given a target storage volume, what radius and height minimize material cost (surface area)? This is the "optimal cylinder" problem: for fixed V=πr2hV = \pi r^2 h, the surface S=2πr2+2πrhS = 2\pi r^2 + 2\pi r h is minimized when h=2rh = 2r (cube-like proportion, height equals diameter). This is a classic constrained optimization problem that appears in both engineering and operations analytics.

How it solves the problem

V=πr2hV = \pi r^2 h: the base is a circle of area πr2\pi r^2, and the cylinder is formed by stacking hh units of that base. S=2πr2+2πrhS = 2\pi r^2 + 2\pi r h: two caps of area πr2\pi r^2 each, plus a rectangular lateral band that when unrolled has dimensions 2πr2\pi r (circumference) by hh (height). The optimization uses calculus: substitute h=V/(πr2)h = V/(\pi r^2) into SS, differentiate with respect to rr, set equal to zero, and solve to get r∗=(V/(2π))1/3r^* = (V/(2\pi))^{1/3} and h∗=2r∗h^* = 2r^*.

Example in a business

A supply chain analyst needs to specify a cylindrical storage tank for 10,000 litres (=10 m3= 10\ \text{m}^3) of liquid fertiliser. The cost is proportional to the steel surface area (≈EUR 80/m2\approx \text{EUR}\ 80/\text{m}^2). By solving the optimal cylinder problem, the analyst finds r∗≈1.08 mr^* \approx 1.08\ \text{m}, h∗≈2.17 mh^* \approx 2.17\ \text{m}, with surface area ≈22.1 m2\approx 22.1\ \text{m}^2 and cost ≈EUR 1770\approx \text{EUR}\ 1770 — compared to a tall thin cylinder (r=0.5,h=12.7r=0.5, h=12.7) with surface ≈42 m2\approx 42\ \text{m}^2 and cost ≈EUR 3360\approx \text{EUR}\ 3360.

The formula, piece by piece

  • V=πr2hV = \pi r^2 h: volume; πr2\pi r^2 is the base circle area, hh is the height; same structure as base × height for any prism
  • rr: radius of the circular base
  • hh: height of the cylinder (distance between the two caps)
  • S=2πr(r+h)S = 2\pi r(r + h): total surface area, factored form; r+hr + h encodes both caps (contributes rr) and lateral surface (contributes hh)
  • 2πr22\pi r^2: area of two circular caps
  • 2πrh2\pi r h: lateral surface area (unrolled rectangle of width 2πr2\pi r and height hh) Full formulas: V=πr2hV = \pi r^2 h, S=2πr(r+h)S = 2\pi r(r + h)

The formula in words

"The cylinder's volume is how many circular slices fit in the height: area of one circle times how tall you stack it. The surface is the two circular lids plus the curved band that wraps around the side (unroll it and it becomes a rectangle)." Tiny numeric example: r=2r = 2, h=5h = 5. V=π(4)(5)=20π≈62.83V = \pi(4)(5) = 20\pi \approx 62.83. S=2π(2)(2+5)=4π(7)=28π≈87.96S = 2\pi(2)(2 + 5) = 4\pi(7) = 28\pi \approx 87.96.

Critical Concepts

  • Optimal proportion: for a fixed volume, surface area is minimized when h=2rh = 2r (height equals diameter). This minimizes packaging/material cost. Solve by substituting h=V/(πr2)h = V/(\pi r^2) and minimizing S(r)S(r).
  • Lateral vs total: Slateral=2πrhS_{\text{lateral}} = 2\pi r h is the curved side only; Stotal=2πrh+2πr2=2πr(r+h)S_{\text{total}} = 2\pi r h + 2\pi r^2 = 2\pi r(r + h) includes the caps. Know which you need: a pipe is open-ended (lateral only), a sealed tank needs total.
  • Units: VV has units of length3^3; SS has units of length2^2. If rr is in metres, VV is in m3^3 and SS is in m2^2.
  • Relation to sphere: at the optimal h=2rh = 2r, Vcyl=2πr3V_{\text{cyl}} = 2\pi r^3 vs Vsphere=43πr3V_{\text{sphere}} = \frac{4}{3}\pi r^3; the cylinder (same height as diameter) holds about 1.5 times the volume of the inscribed sphere.
  • Truncated cylinder (oblique): if the top is cut at an angle, volume is still πr2havg\pi r^2 h_{\text{avg}} where havgh_{\text{avg}} is the average height.

Step-by-step calculation (tiny example)

Step 1: Compute volume and surface area for given r and h r=3r = 3, h=8h = 8. V=π(9)(8)=72π≈226.19V = \pi(9)(8) = 72\pi \approx 226.19. S=2π(3)(3+8)=6π(11)=66π≈207.35S = 2\pi(3)(3 + 8) = 6\pi(11) = 66\pi \approx 207.35.

Step 2: Find the optimal radius for the same volume Target: V=72πV = 72\pi. Optimal: r∗=(V/(2π))1/3=(36)1/3≈3.302r^* = (V/(2\pi))^{1/3} = (36)^{1/3} \approx 3.302. h∗=2r∗≈6.604h^* = 2r^* \approx 6.604.

Step 3: Compute optimal surface and compare S∗=2π(3.302)(3.302+6.604)=2π(3.302)(9.906)≈205.9S^* = 2\pi(3.302)(3.302 + 6.604) = 2\pi(3.302)(9.906) \approx 205.9. The optimal is only slightly smaller here because r=3r=3 was already close to the optimum.

Code examples

Beginner example (Python)

python
import numpy as np

# -- Cylinder: volume, surface area, and optimal proportion ----------


def cylinder_volume(r: float, h: float) -> float:
    """Volume of a right circular cylinder."""
    return np.pi * r**2 * h


def cylinder_surface(r: float, h: float) -> float:
    """Total surface area of a closed cylinder."""
    return 2 * np.pi * r * (r + h)


print("Cylinder V and S for various (r, h):")
for r, h in [(2, 5), (3, 8), (5, 1), (3, 6)]:
    v = cylinder_volume(r, h)
    s = cylinder_surface(r, h)
    print(f" r={r}, h={h}: V={v:.2f}, S={s:.2f}, h/r={h/r:.2f}")


# Optimal cylinder: minimize S for fixed V
def optimal_cylinder(target_volume: float):
    """Find optimal r and h minimizing surface area for a given volume."""
    r_opt = (target_volume / (2 * np.pi)) ** (1/3)
    h_opt = 2 * r_opt
    return r_opt, h_opt, cylinder_surface(r_opt, h_opt)


target_v = 100.0
r_opt, h_opt, s_opt = optimal_cylinder(target_v)
print(f"\nOptimal cylinder for V={target_v:.0f}:")
print(f" r_opt={r_opt:.4f}, h_opt={h_opt:.4f} (h=2r), S_min={s_opt:.4f}")
print(f" Verify V: {cylinder_volume(r_opt, h_opt):.4f} (should be {target_v:.0f})")

Beginner example (R)

r
# -- Cylinder: volume, surface area, and optimal proportion ----------
cylinder_volume <- function(r, h) pi * r^2 * h
cylinder_surface <- function(r, h) 2 * pi * r * (r + h)
cat("Cylinder V and S for various (r, h):\n")
params <- list(c(2,5), c(3,8), c(5,1), c(3,6))
for (p in params) {
  r <- p[1]; h <- p[2]
  cat(sprintf(" r=%g, h=%g: V=%.2f, S=%.2f, h/r=%.2f\n", r, h, cylinder_volume(r,h), cylinder_surface(r,h), h/r))
}

# Optimal cylinder
target_v <- 100.0
r_opt <- (target_v / (2 * pi))^(1/3)
h_opt <- 2 * r_opt
s_opt <- cylinder_surface(r_opt, h_opt)
cat(sprintf("\nOptimal cylinder for V=%.0f: r=%.4f, h=%.4f, S_min=%.4f\n", target_v, r_opt, h_opt, s_opt))
cat(sprintf("Verify V: %.4f\n", cylinder_volume(r_opt, h_opt)))

Professional example (Python)

python
import numpy as np
import pandas as pd

# -- Business scenario: minimize tank material cost for a set of storage volumes
# A logistics firm needs cylindrical tanks for 5 products with different volume targets.
# Steel costs EUR 80 / m^2. Find optimal dimensions and compare to a "tall thin" design.
STEEL_COST_PER_M2 = 80.0                        # EUR per m^2
VOLUME_TARGETS_M3 = [2.0, 5.0, 10.0, 20.0, 50.0]  # m^3
PRODUCT_NAMES = ["Lubricant A", "Solvent B", "Fertiliser C", "Acid D", "Water E"]


def optimal_cylinder(v: float):
    r = (v / (2 * np.pi)) ** (1/3)
    h = 2 * r
    return r, h


def tall_thin_cylinder(v: float):
    r = 0.3  # fixed narrow radius (0.3 m)
    h = v / (np.pi * r**2)
    return r, h


rows = []
for name, v in zip(PRODUCT_NAMES, VOLUME_TARGETS_M3):
    r_opt, h_opt = optimal_cylinder(v)
    r_thin, h_thin = tall_thin_cylinder(v)
    s_opt = 2 * np.pi * r_opt * (r_opt + h_opt)
    s_thin = 2 * np.pi * r_thin * (r_thin + h_thin)
    rows.append({
        "product": name,
        "volume_m3": v,
        "opt_r_m": round(r_opt, 3),
        "opt_h_m": round(h_opt, 3),
        "opt_surface_m2": round(s_opt, 2),
        "opt_cost_eur": round(s_opt * STEEL_COST_PER_M2, 0),
        "thin_surface_m2": round(s_thin, 2),
        "thin_cost_eur": round(s_thin * STEEL_COST_PER_M2, 0),
        "savings_eur": round((s_thin - s_opt) * STEEL_COST_PER_M2, 0),
    })
df = pd.DataFrame(rows)
print("Optimal vs tall-thin cylinder: material cost comparison")
print(df.to_string(index=False))
total_savings = float(df["savings_eur"].sum())
print(f"\nTotal savings from optimal proportioning: EUR {total_savings:,.0f}")
print("Interpretation: V = pi*r^2*h; optimal cylinder uses h=2r (height=diameter). Tall thin designs waste material on excess lateral surface.")

Source: domain knowledge

#linear-algebra#spatial-distance-norms-and-analytic-geometry#analytic-geometry-shapes-perimeter-area-volume

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close