calc dimensions help?

A book designer has decided that the pages of a book should have 1-in. margins at the top and bottom and 1/2-in. margins on the sides. She further stipulated that each page should have an area of 32 in^2 (see the figure below). Determine the page dimensions that will result in the maximum printed area on the page.

Sqdancefan2016-10-14T11:55:52Z

If h represents the height of the page, the printed area (p) can be described by
.. p = (h -2)*(32/h -1)
.. dp/dh = (32/h -1) + (h -2)*(-32/h^2)
We want to find the value of h that makes this zero.
.. 32h -h^2 -32h +64 = 0 ... multiply by h^2
.. 64 = h^2 ... collect terms, add h^2
.. 8 = h ... we are interested only in the positive solution

The page dimensions that maximize printed area are 8 inches high by 4 inches wide.
_____
In general, you will find that the product of page height and side+side margin width is equal to the product of page width and top+bottom margin width. If margins are even all around, the optimum page is square.