Let x be the side of the square base and y be the height, i.e., vertical side of the water tank.
∴ Volume of the tank (V)=x2y
⇒y=Vx2
Also, surface area =x2+4xy
=x2+4x⋅Vx2=x2+4Vx−1
If k be the rate of metal sheet used per square units.
∴ Total cost of sheet (C)=k(x2+4Vx−1)
dCdx=k(2x−4Vx−2)=k(2x−4Vx2)
d2Cdx2=k(2+8Vx−3)=k(2+8Vx3)
For minimum cost, put dCdx=0
⇒k(2x−4Vx2)=0
⇒2k(x3−2V)=0
⇒x3=2V=2×x2y .....[i]
⇒x=2y
⇒y=12x
Now, d2Cdx2=k (2+8Vx3)
=k (2+8V2V) = 6k = positive from [i]
Cost is least when y=12x.
Hence, the cost of material will be least when depth of the tank is half of its width.