# Optimization Question.

I'm working through some optimization questions and I got stuck, and ended up with the wrong answer. The question is:

There's a garden that needs to be enclosed, you have $60$m of fencing, one side is against a house so you need to enclose only three sides, maximize the area.

So what I did was,

Constraint: $2x+y=60$

Maximize area = $xy$

$$y = 60 - 2x$$ $$f(x) = x(60-2x)$$ $$= 60x-2x^2$$

$$f'(x) = 60-4x$$ $$= 4(15-x)$$

Now this is the part where I'm confused, I know that $y = 60-2x$, but how do I solve for $x$? I used $x = 15$, which gave me the wrong answer.

• Why do you think that x=15 is the wrong answer? – DJohnM Apr 4 '13 at 3:21
• The shape is restricted to rectangles, I assume. Another way to verify is to consider that $(2x)y$ is being maximised, while $(2x)+y$ is fixed. This means $(2x)=y$ at maximum. Again gives $x=15$. – Macavity Apr 4 '13 at 3:37

The function for area starts at $0$, for $x=0$, and is positive for $x>0$. Until $x>30$, where the area becomes negative.
Setting the derivative, $60-4x=0$, gives one point, $x=15$, where the area must be a maximum. Substituting, the area is $15\times30=450m^2$