# Maximizing the volume of a cylinder

CrosisBH
Homework Statement:
Find the ratio of R (radius) to H(height) that will maximize the volume of a right circular cylinder for a fixed total surface area.
Relevant Equations:
$$\frac{\partial f}{\partial q_k} - \frac{d}{dx} \frac{\partial f}{\partial q_k '} + \sum \lambda_k (x) \frac{\partial g_k}{\partial q_k} = 0$$

$$S = 2\pi RH + 2\pi R^2$$
$$V = \pi R^2 H$$
Note this is in our Lagrangian Mechanics section of Classical Mechanics, so I assume he wants us to use Calculus of Variations to solve it.
The surface area is fixed, so that'll be the constraint. Maximizing volume, we need a functional to represent Volume. This was tricky, but my best guess for it is

$$V = \int dV = \int_{0}^{H} \pi R^2 dH$$

That way it can be represented by a single integral.
$$f = R^2$$
Plugging the stuff into the Euler-Lagrange equation and simplifying I get (I can show my work here if it's needed)

$$(2\lambda + 1)R + \lambda H = 0$$

I'm just stuck here. I don't know how to proceed. Calculus of Variations is still very new to me. Thank you!

Homework Helper
I can show my work here if it's needed
Yes it's needed ... I'd like to see what you use as Lagrangian and what you use as ##q_k## and ##g_k##

 You seem to think that ##{\mathcal L} = f = R^2 ## but that is not correct
Furthermore, the number of constraints is not equal to the number of variables, so ##g_k## and ##\lambda_k## looks strange: The sum is not over ##k## but over the constraints :##\displaystyle{
\sum_i \lambda_i \frac{\partial g_i}{\partial q_k}}##

The ##\lambda_i## are numbers, not functions.

- - - - - - - - - - - - - - -

[edit2] looked at your profile and want to step back somewhat:

##f## is the function you want to maximize, so here ## f(r,h) = V = 2\pi r^2 h ##, a function of 2 variables. At an extreme you expect ##{\partial f\over \partial h}= {\partial f\over \partial r} = 0##.
Two equations in two unknowns that are not independent.

Instead of eliminating one of the variables, you use the method of Lagrange multipliers and solve
##{\partial {\mathcal L} \over \partial h}= {\partial {\mathcal L} \over \partial r} = 0## with ##{\mathcal L} = f - \lambda g##.

##g(r,h) = 0## is the constraint ##S = 2\pi r^2 + 2\pi rh \quad \Rightarrow \quad g(r,h) = 2\pi r^2 + 2\pi rh - S##.

Now we have three equations (the third one is ##g=0##) with three unknowns (##r,h,\lambda##) and we can treat ##r## and ##h## as if they were independent.

--

Last edited: