John was given a task to make a rectangular box during his innovation competition. He was given with
the A cm of wire and B cm2 of special paper. He had to use all the wire (for the 12 edges) and paper (for the 6 sides) to make the box. So what will be the maximum volume of that box?
1
Expert's answer
2018-08-30T03:54:08-0400
Assume a box has x,y,z dimensions, so in the task we have xyz -> max 4x + 4y + 4z = A 2xy + 2xz + 2yz = B As it is a C question and task limitations allow you to bruteforce one of the values, you can simply code it by solving 2 equations with 2 unknown variables for each case and pulling the maximum. If not, there is the math behind: Nonlinear programming and solving helper: Lagrange multiplier https://en.wikipedia.org/wiki/Nonlinear_programming https://en.wikipedia.org/wiki/Lagrange_multiplier
Also there is a stackoverflow thread with another method of solving this particular task https://stackoverflow.com/a/13737409 describing how to solve it by geometry with the answer in our denotation A^3/1728 - A(A^2/24-B)/24 + Sqrt(A^2/24-B)^3 Sqrt(6)/18
Comments
Leave a comment