Eric C. answered 03/02/22
Engineer, Surfer Dude, Football Player, USC Alum, Math Aficionado
Hi Jenna,
Let's introduce some variables to describe the side lengths of the vegetable patch.
x = length of the north/ south side
y = length of the east/ west side
You have a total of $96 to spend. Each foot of north/ south fencing (x) contributes $2. Each foot of east/ west fencing (y) contributes $4. We can write a cost equation to describe this:
2x + 4y = 96
The area of this vegetable patch is:
A = x*y
To get this into one variable, solve the cost equation for y.
2x + 4y = 96
4y = 96 - 2x
y = 24 - 1/2x
Now you can write the area function as:
A = x*(24 - 1/2x)
A = 24x - 1/2x2
This is an upside-down parabola. Since you want the maximum area, find the vertex using the equation:
xmax = -b/2a
= -(24)/(2*(-1/2))
= 24
So the max area occurs when x = 24. We can plug this into the cost equation where we solved for y.
y = 24 - 1/2*24
y = 12
So you want your north/ south fences to be 24 feet long, and your east/ west fences to be 12 feet long.
Hope this helps!