[Math] How to find the surface area of a open top rectangular container when you know the diameter and height

arearectangles

I'm a computer science major, and I was asked to write a program with the following question.

A manufacturer wishes to compare the cost of producing an open-top cylindrical container and an open-top rectangular container.

For the cylindrical container:

  • The area of the base is the area of a circle = $\pi r^{2}$.
  • To calculate the area of the container's side, imagine unwrapping the side into a rectangle so the area of the side is the circle circumference times the container height.
  • The circumference of a circle = $2\pi r$

For the rectangular container:

  • The base is square, and each side is equal to the given diameter.
  • To calculate the area of the container's side, you have four rectangles with length and diameter with specified height.

Write and test a program that asks for the following inputs, in order:

  • the diameter of the base (cm)
  • the height of the container (cm)
  • the cost of the material ($ per square cm)
  • number of containers to produce

I would just like to know what equations I would need to find the surface area of the open top rectangular container.

Best Answer

The following is the process to find the surface area of rectangular box with its top side missing.

Let's call the side of the square base $s$ and let's call the height of the prism $h$.

Normally you have 6 sides. However, now you only have 5.

You have 4 sides of area $hs$ and one base of area $s^{2}$.

Therefore, $SA = hs + s^{2}$.

Feel free to plug in the given values.

The following is the process to find the surface area of cylinder with its top side missing.

Let's call the diameter of the circle base $D$ and let's call the height of the prism $h$.

The lateral surface area is $\frac{D}{2} h \pi$. The area of the base is the area of a circle: $\pi r^{2}$. Adding these two expressions, the surface area is $\frac{D}{2} h \pi + \pi r^{2}$.