# Trying to find the dimensions of a rectangle that would result in the max area

Bob has $120m$ of fencing. He is planning on building a rectangular enclosure for his cows. He will build the enclosure alongside his barn and will fence in the remaining three sides. Determine the dimensions that will result in the maximum area.

Answer: Max area of $1800m^2$ when the dimensions are $60m$ x $30m$

I started with $$2x+y=120$$ And changed it to $$y=120-2x$$ Which I substituted into the equation for area ($A=xy$) $$A=x(120-2x)$$ I expanded this then completed the square and got $$-2(x-60)^2 +1800$$

Now I'm confused, I thought the vertex would be the two sides, but I got 60, which is one of the answers. I thought maybe I would plug 60 back into the original equation to get the other side but $120-2*60=0$ and zero can't be the other side. Any help is greatly appreciated.

• "I expanded this then completed the square and got..." Check all of your work for that step. Note: $x(120-2x)=-2x^2+120x=-2(x^2-60x)=-2(x^2-60x+\square-\square)$. Focus solely on what is inside of the parenthesis for now. I expect you just confused yourself with the $120x$ forgetting that inside of the parenthesis it is a $-60x$ instead. – JMoravitz Jun 14 '18 at 4:51
• As an aside, if you were allowed to use calculus instead of just memorized formula for quadratics and their vertices., you would look at $\frac{d}{dx}[A]=\frac{d}{dx}[-2x^2+120x]=-4x+120$ and set that equal to zero and solve for $x$. It requires much less algebraic manipulation and arithmetic than the method you used and with enough practice can even be accomplished entirely with mental calculations. – JMoravitz Jun 14 '18 at 4:56

From here

$$A=x(120-2x)$$

completing the square we obtain

$$A=-2x^2+120x=-2(x-30)^2+1800$$

from which we obtain $x=30$.

$A$ has zeros at $0$ and $60$. Being a quadratic polynomial its maximum occurs at $30$.

I started with $2x+y=120$

Alt. hint:   by AM-GM $\;\displaystyle\sqrt{2x \cdot y} \le \frac{2x+y}{2}=60 \iff x y \le 1800\,$ with equality iff $\,2x =y\,$.

It goes much easier if use of calculus is allowed... derivative

$$dA/dx= d(120 x -2 x^2)=0 \rightarrow x= 30, y= 60.$$