Farmer John is building a pen to keep his pig in. John has 40m of fencing. He will only need to make 3 sides to the pen because the 4th side will be along a barn. If John wants the maximum area what should the side lengths of the pen be?

1 answer

L + 2w = 40
so
L = 40 - 2w

A = L * w
A =(40-2 w)(w) = 40 w - 2 w^2

2 w^2 - 40 w = -A
w^2 - 20 w = -A/2

w^2 - 20 W + 100 = -A/2 + 100
(w-10)^2 = -(1/2)(A-200)
vertex at w = 10, A = 200
so L = 20