edit:

Can someone please show the steps to get

when differentiating f(r) = 0.6pi*r^2 + 0.4pi*r*(500 / pi*r^2)

For a homework question i'm doing it asks for me to find the dimensions that will minimize the cost of producing a can with a volume of 500cm^3, given that the cost for the material of the top of the can is 0.4cents/cm^2, the cost for the material of the bottom of the can is 0.2cents/cm^2, and the cost for the material of the siding of the can is also 0.2cents/cm^2. This is what I tried doing so far:

total cost of material = area of top(0.4) + area of bottom(0.2) + area of siding(0.2)

= 0.4pi*r^2 + 0.2pi*r^2 + 0.2(2pi*r*h)

= 0.6pi*r^2 + 0.4pi*r*h

= 0.6pi*r^2 + 0.4pi*r*(500 / pi*r^2)

I knew to sub that in for h because the volume of a cylinder = pi*r^2*h, therefore 500=pi*r^2*h, and h = 500 / pi*r^2

I'm kind of stuck as to what to do now Also did I make any mistakes so far?