Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Johnny needs to make a rectangular box for his physics class project. He has bought P cm of wire and S cm2 of special paper. He would like to use all the wire (for the 12 edges) and paper (for the 6 sides) to make the box.

What is the largest volume of the box that Johnny can make?

What I have tried:

the surface area of the rectangle is 2(wl+hl+hw)
and p = 4w + 4h +4l
how do i use 2 equations to find 3 variable !!
Posted
Updated 22-Jun-16 14:01pm
v2
Comments
Patrice T 22-Jun-16 17:35pm    
We don't do your HomeWork ! and wrong place
[no name] 22-Jun-16 22:44pm    
This is a non-trivial problem. You have left out the most important equation - the volume. Write that out and start from there. Of course we can't do it for you but this is a good example to begin with: https://math.dartmouth.edu/archive/m8f02/public_html/pauls_mws/boxeg.pdf - Instead of one constraint you have two. Google will provide you with many other leads.

It looks like no one spotted the mistake in the formulation of this problem, which makes the problem incorrectly posed.

"P cm of wire" makes perfect sense, but "S cm²" doesn't. This is because the solution depends on the shape of the piece of paper to be used. Even the shape of the piece of paper is not specified; for example, it's never said that this is a rectangle. It, for example, the input condition was a statement that there the piece of paper was a square, the problem would be correctly formulated. But nothing like that is formulated.

Another way to formulate the problem correctly would be this: suppose that one could buy a piece of paper of unlimited size and shape in a paper shop. A person is supposed to first calculate the "optimal" box size, assuming that the total paper surface should be S cm² and only then order the piece of paper of the required shape in the shop. Maybe this is what was implied, but I could not be sure. The failure to formulate what a shape should be is just the bad logical mistake.

Another little problem is: it is not specified of the wire should remain in one piece or can be cut. Strictly speaking, this is also not obvious. It would just make two different problems; each can be solved separately.

(By the way, there is no such term as "rectangular box". It probably should assume that this is "cuboid", but only because it's hard to interpret it in any different way. This is a minor problem though.)

The only correct solution would be to dismiss the problem as incorrectly formulated.

Finally, I would like to note that the proof of that some solution is the extremum is not mentioned. Without such proof, such problems have little value. By the way, the problem has nothing to do with programming at all. Some mathematical problems could be considered also algorithmic ones and hence relevant, but not this one.

—SA
 
Share this answer
 
v2
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-Jun-16 19:17pm    
This is a nice link, but there is one problem: why no one noticed that the problem is not really formulated? I explained in in Solution 2 (risking massive down-votes from certain type of members).

As to Lagrange multiplier: this topic is much more general and, at the same time, is not fully relevant, because the box problem is about the global maximum, not the local ones.

—SA
VB
'Assuming you want to make a box that has each side 4cm long
      'and you want to know how many paper square and wire you need for.
      BOX_SIDE = 4cm
      P = ((4 * 4) * 6) = 96cm square paper
      W = (4*12) = 48 cm Long wire

      'Assuming you want to know how long has to be each side of the box by a 150 cm square paper
      P = 150 cm square
      SIDE = √((P / 6)) 'square root of (P/6)

      'Assuming you want to know how long has to be each side of the box by a 80 cm wire available
      W = 80 cm Long
    SIDE = (W / 12)

      'Assuming you want to make the biggest perfect possible box either by available paper or wire
      P = 140 'cm2
      W = 70 ' cm long
      'we have to work here with conditions, either paper or wire will be left over
      'you can build a maximum large box with;
      'check what can do the paper
      side_by_paper = √(P/6) '=4.83 cm
      'check what can do the wire
      side_by_wire = (W / 12) '=5,83 cm
      'select now the smallest possible (minimum) of the two
      max_side_length = Math.Min(side_by_paper, side_by_wire) ' =4.83
      'you can build a maximum large box with;


VB
BOX_CUBIC_cm3 = (max_side_length)3
'That is a BOX with each side (4.83cm * 4.83cm * 4.83cm) = 112.67 cm3
'where each surface of the BOX has a square of 23.32 cm2
This time there was less paper than wire to build your box,
so 70- (4.83*12) = 12.04 cm wire left over...


√square root example: √144 =12, √4=2
Pcm3 = √(P/6) ^ 3 [paper in cube by paper square]
W = √(P) *12 [wire from available paper square]
P = (((W/12) * (W/12)) * 6) [paper square from available wire]
P = ((SIDE * SIDE) * 6) [paper square by specific side length]
SIDE = √(P/6) [side from available paper square]
SIDE = (W/12) [side from available wire]
 
Share this answer
 
v4
Comments
[no name] 23-Jun-16 11:54am    
Who voted this 1? Maybe he's got pissed in mouth

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900