Hello, Tweety!

You have a given length of fence.

Using the wall of a house as one side of a rectangular fence, how would you place

the fence around the other three sides in order to enclose the largest possible area? Code:

~ * ~ ~ ~ ~ ~ * ~
| |
x | | x
| |
* - - - - - *
y

The amount of fencing is a constant, $\displaystyle k$ feet.

. . So we have: .$\displaystyle 2x + y \:=\:k \quad\Rightarrow\quad y \:=\:k-2x$ .[1]

The area of the region is: .$\displaystyle A \:=\:xy$ .[2]

Substitute [1] into [2]: .$\displaystyle A \:=\:x(k-2x) \quad\Rightarrow\quad A \;=\;kx-2x^2$

This is a parabola that opens downward.

. . Its maximum is at its vertex.

The vertex is at: .$\displaystyle \frac{\text{-}b}{2a}$

. . So we have: .$\displaystyle x \:=\:\frac{\text{-}k}{2(\text{-}2)} \:=\:\frac{k}{4}$

We will use $\displaystyle \frac{k}{4}$ feet (a quarter of the fencing) for each of the two shorter sides

. . and the rest, $\displaystyle \frac{k}{2}$ feet, for the long side.