You are designing a rectangular dog pen off the back of your house. The house will form one side of the dog pen. The pen is to have an area of 800 square feet, but you want to minimize the amount of fencing that you need for the three sides of the pen not against the house. This will include an opening that is 4 feet wide where a gate will be placed. How many feet of fencing do you need to build the pen?

L = 2 x + y - 4

800 = x y so y= 800 / x
L = 2 x + 800/x - 4
look for dL/dx = 0
0 = 2 - 800 / x^2
2 x^2 = 800
x = 20
y = 800/20 = 40
L = 40 + 40 - 4 = 66

To determine the amount of fencing needed to build the pen, you first need to calculate the dimensions of the rectangular area.

Let's assume the width of the rectangular area is "x" feet, and the length of the rectangular area will be "y" feet.

Since the house forms one side of the pen, one side of the rectangle is already covered. Therefore, we only need to calculate the fencing needed for the remaining three sides.

The area of a rectangle is calculated by multiplying its length by its width. In this case, the area of the rectangular pen is given as 800 square feet. So, we have the equation:

x * y = 800

To minimize the amount of fencing needed, we will try to minimize the perimeter of the pen. The perimeter of a rectangle is given by the formula:

P = 2x + y

However, we need to account for the gate opening of 4 feet. So, the perimeter will be:

P = 2x + y + 4

Now, we want to minimize this perimeter equation while still satisfying the condition of the pen area being 800 square feet. To do this, we can solve for the value of "y" in the area equation and substitute it in the perimeter equation.

From the area equation, we have:

y = 800 / x

Substituting this value of "y" into the perimeter equation, we get:

P = 2x + (800 / x) + 4

To minimize the perimeter, we can take the derivative of "P" with respect to "x" and set it equal to zero:

dP/dx = 2 - (800 / x^2) = 0

Simplifying further:

2x^2 - 800 = 0

Dividing by 2:

x^2 - 400 = 0

Solving for "x", we take the positive square root:

x = √400 = 20 feet

Substituting this value of "x" back into the area equation:

y = 800 / x = 800 / 20 = 40 feet

So, the dimensions of the rectangular pen will be 20 feet by 40 feet.

To calculate the total fencing needed, we add up the lengths of the three sides:

Fencing = 2x + y + 4 = 2(20) + 40 + 4 = 40 + 40 + 4 = 84 feet

Therefore, you would need 84 feet of fencing to build the rectangular dog pen.