The volume of the tank is:
The surface area of the hemisphere is given by
The surface area of the cylidrical portion, excluding the base is given by:
So, the total surface area is:
But, the cost for the hemsphere is $400 and the cylinder is $300:
Solve  for, say, h and sub into . Then differentiate, set to 0 and solve for r. h will follow.