Dimension of garden to minimize cost Math question: A homeowner wants to build, along her driveway, a garden surrounded by a fence. If the garden is to be $5000$ square ft, and the fence along the driveway cost $6$ dollars per foot while on the other three sides it cost only $\$2$ per foot, find the dimension that will minimize the cost. Also find the minimum cost. 
this is what I got so far: $X=6, H=2, \  V=5000ft^2, \ V=x^2h, \ C=36x^2+8xh$

Let $A=5000$, length of the side along driveway$=x$ and width $=y$. 
Then $A=xy=5000$. Total cost $\displaystyle =C=6x+2(x+2y)=8x+\frac{4\times 5000}{x}$. Now we have to find $x$ that minimizes $C$. So differentiating $C$ w.r.t. $x$ and equating it to $0$,
$\displaystyle \frac{dC}{dx}=8-\frac{20000}{x^2}=0\Rightarrow x^2=2500 \Rightarrow x=50$. When $\displaystyle x>50, \frac{dC}{dx}>0 $ and when $\displaystyle x<50, \frac{dC}{dx}<0 $. Hence, $C$ has a minimum at $x=50$. So $y=100$.
