how would you solve this particular optimization problem (which seems harmless):

A tank with a square base is more taller than it is wider. To build it, the sum of the perimeter of the base with the height must be more than $108 \ m$. What is the maximum volume of the tank?

I say that it is a hard problem because the constrain (the volume of the tank) is not really fixed. If it was, the base and the height would be the same ($36 \ m$) and the total volume $46656 \ m^3$.

What can be done in this case?

Please let me know if my translation was poor.

Thank you.

  • 1
    $\begingroup$ Under this "constraint" there is no maximum. Take base $5000$ metres, height $10000$. Do we want the sum to be no more than $108$? $\endgroup$ Sep 12, 2015 at 12:41
  • $\begingroup$ @satishramanathan: I have not been able to locate the problem or solution. $\endgroup$ Sep 12, 2015 at 13:35
  • $\begingroup$ @satishramanathan: Thank you, I will look at it. I am not confident about my ability to analyze. $\endgroup$ Sep 12, 2015 at 13:42
  • $\begingroup$ @AndréNicolas the constraint doesn't seem to help, for me there are infinite solutions and the maximum volume would be an infinite one. Even considering the constraint, it makes no sense, right? What are your thoughts? $\endgroup$
    – bru1987
    Sep 12, 2015 at 16:28
  • 1
    $\begingroup$ There are boxes of arbitrarily large volume satisfying the constraints. When I look at the problem, it is clear that it was translated to English from some other language, by a person who has incomplete command of the language. Possibly something was mistranslated. $\endgroup$ Sep 12, 2015 at 17:19

2 Answers 2


Let a be the length of the side of the square base of the tank. Let h be the height of the tank.

$$ h+4a > 108$$


$$V = a^2h$$

$$V = a^2(108-4a)$$ $$\frac{dV}{da} = 216a -12a^2 = 0 \rightarrow a = 18$$

$$V_{Max} = 36\times 18^2 = 11664$$

Computer Code Option Explicit Dim a As Integer

Dim h As Integer

Dim count As Integer

Dim MaxV As Integer

Dim V(1 To 100000) As Integer

Public Sub Find_Max()

MaxV = 0

count = 1

For a = 1 To 27

For h = 1 To (108 - 4 * a)

V(count) = a ^ 2 * h

Worksheets("Sheet1").Cells(3 + count, 12) = a

Worksheets("Sheet1").Cells(3 + count, 13) = h

Worksheets("Sheet1").Cells(3 + count, 14) = V(count)

If MaxV >= V(count) Then

MaxV = MaxV


MaxV = V(count)

End If

count = count + 1



Worksheets("Sheet1").Cells(3, 6) = MaxV

End Sub

  • $\begingroup$ Ummm.... How exactly did you just substitute the value of $h$? $\endgroup$ Sep 12, 2015 at 12:35
  • $\begingroup$ I know it is an inequality. please refer to the argument that I made to the other responder. By that, I can substitute the value of h as an equality $\endgroup$ Sep 12, 2015 at 12:37
  • 1
    $\begingroup$ Consider when $a = 1000$ and $h = 1000$. It satisfies the inequality... The volume will be much greater than the maximum volume you calculated. There's an issue with the question. $\endgroup$ Sep 12, 2015 at 12:38
  • 1
    $\begingroup$ when a = 1000, the inequality makes h > 108-4000 ( which is negative). theoretically it is only possible that h > 0. I understand that the question has an issue. It should have been that h+4a < 108, I suppose $\endgroup$ Sep 12, 2015 at 12:43
  • 1
    $\begingroup$ Yes, and as $h$ is greater than that value, it can obviously be any positive value. I think it's better to wait for the OP to clarify $\endgroup$ Sep 12, 2015 at 12:45

I think that one constrain is wrong because if the perimeter (I don´t understand exactly if you refer to the five faces or only to the base plus the height) is greater than 108 then the it coould be an infinite volume.

  • $\begingroup$ I mean 4 times the measure of the base plus one time the height. Even considering the constraint, it makes no sense, right? What are your thoughts? Thank you. $\endgroup$
    – bru1987
    Sep 12, 2015 at 16:26
  • $\begingroup$ I think that your perimeter has to be smaller or equal to 108 instead greater. Then you have that $V=a^2*h$ and $P = 4*a + h<=108$ and have the solution of satish ramanathan. $\endgroup$
    – Zero point
    Sep 12, 2015 at 18:49
  • $\begingroup$ ah I see, thank you. Best Regards. $\endgroup$
    – bru1987
    Sep 13, 2015 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.