Precalc Optimization? I need help with an optimization problem. I have a rectangle space being fenced. Three sides are fenced with a material costing 4 dollars and the last side costs 16 dollars. I was given that the area is 250 and asked to minimize the cost.
I got what I think is the correct formula  for the cost where $$C(y)=\frac{5000}{y}+8y.$$ This is where I got stuck. In my class, we're allowed to use demos to get the optimized value but when I plug the number into my formula I end up with negative values for the dimensions. Any help would be nice. 
 A: Because the addends have a constant product of $8*5000=40000$, this is an AM-GM inequality problem, so the minimal cost is going to be where $\frac{5000}y=8y$. In general, if you want to minimize a sum of addends with a constant product, you should make them as close to equal as possible.
A: Optimal values occur where the curve is tangent to some horizontal line :$$l(y)=m$$
SInce the curve is tangent to the line there will be exactly one solution to the equation for the points of intersection between the curve and the horizontal line.
$$c(y) = l(y) \implies \frac{5000}{y}+8y=m$$
$$ \implies 8y^2-my+5000=0$$
This is a quadratic equation with $a=8, b=-m,c=5000$
The solution is given in the quadratic formula
$$y=\frac{-(-m)\pm \sqrt{(-m)^2-4(8)(5000)}}{2(8)} \tag1$$
there will only be one point of intersection if the discriminant is zero
$$m^2=4(8)(5000)=160000$$
$$m=\pm 400$$
These are the optimal values of $c(y)$
for these values of $m$, equation  (1)  becomes
$$y=\frac m{16}$$
So the optimal point with $C(y)=+400$ will occur where $y=+25$.
