Aimee packs ice cream into an ice cream cone. She then puts a perfect hemisphere on top of the cone that has a volume of 4 in^3. The diameter of the ice cream cone is equal to its height. What is the total volume of ice cream in and on top of the cone? Use the relationship between the formulas for the volumes of cones and spheres to help solve this problem.

Let's start by finding the volume of the cone. The volume of a cone is given by the formula V = 1/3 * π * r^2 * h, where r is the radius of the cone's base and h is the height of the cone.

Since the diameter of the cone is equal to its height, let's call the diameter d. Therefore, the radius of the cone's base is r = d/2.

The volume of the cone is then V_cone = 1/3 * π * (d/2)^2 * d.

Simplifying this equation, we get V_cone = 1/3 * π * d^3 / 4.

Next, let's find the volume of the hemisphere. The volume of a hemisphere is given by the formula V_hemisphere = 2/3 * π * r^3, where r is the radius of the hemisphere.

Since the diameter of the hemisphere is equal to the diameter of the cone's base, the radius of the hemisphere is also r = d/2.

Therefore, the volume of the hemisphere is V_hemisphere = 2/3 * π * (d/2)^3.

Simplifying this equation, we get V_hemisphere = 2/3 * π * d^3 / 8.

Finally, the total volume of ice cream in and on top of the cone is the sum of the volumes of the cone and the hemisphere: V_total = V_cone + V_hemisphere.

Substituting the values we found, we get V_total = 1/3 * π * d^3 / 4 + 2/3 * π * d^3 / 8.

Combining the fractions under a common denominator, we get V_total = (2/6 * π * d^3 + π * d^3) / 8.

Simplifying this equation, we get V_total = (2/6 + 1) / 8 * π * d^3.

Further simplifying, we get V_total = (3/6) / 8 * π * d^3.

Finally, V_total = 1/16 * π * d^3.

Therefore, the total volume of ice cream in and on top of the cone is 1/16 * π * d^3 cubic inches.