Farmer Jill needs a new pen for her pet billy goats. She would like the pen to be rectangular and have an area of 30 square feet. Unfortunately for Farmer Jill, as the sun rises, the billy goats have developed the habit of running full speed at the sun; knocking the East side of the pen over. So, Farmer Jill has decided to make the East side of the pen out of stronger fencing that costs $40/ft while the other three sides will be made out of fencing that costs $15/ft. Since caring for the billy goats already requires a lot of time and money, Farmer Jill wants to spend as little as possible on this new pen. So she needs you to answer the following two questions:

What dimensions will minimize the cost of the pen?
How much will it cost her to build that pen?

I have so far that xy=30
40x+15y=30, am i going in the right direction?

You didn't define your x and y, but I will assume that they represent length and width.

So your first equation of xy = 30 is correct

Your second equation makes no sense

I will let x be one of the sides costing $55/ft

From the data, I get
Cost = 40x + 15(x+2y)
= 40x + 15x + 30y
but from xy=30 ----> y = 30/x

cost = 55x + 30(30/x) = 55x + 900/x
d(cost)/dx = 55 - 900/x^2
= 0 for a min of cost
55 = 900/x^2
x^2 = 900/55
x = 30/√55 = appr 4.05 ft
y = 30/x = appr 7.42 ft

check: (4.05)(7.42) = 30.051 , close enough
cost = 50(4.05) + 900/4.05) = $424.72

take a value of x slightly larger and smaller than 4.04
let x = 4
cost = 55(4) + 900/4 = $445 , which is more than my min
let x = 4.10
cost = 55(4.1) + 900/4.1 = $ 445.01 , again more than my min

So you have a pen about 4 ft by 7 ft to hold more than one billy goats?
Looks like in an effort to make the question sound "cute", the author of this question took no time to see if the resulting answer is even reasonable.
cost =

Yes, you are on the right track. To find the dimensions that will minimize the cost of the pen, you need to set up an equation for the cost of the fencing based on the dimensions of the pen.

Let's denote the width of the pen as x and the length of the pen as y. As you correctly mentioned, the area of the pen is xy = 30 square feet.

Now, let's calculate the cost of the fencing for each side of the pen. The East side, made of stronger fencing, will have a cost of $40 per foot, so its length is y, making the cost of the East side equal to 40y dollars. The other three sides, made of regular fencing, will have a cost of $15 per foot. The length of two of these sides is x, and the length of the remaining side is y - 2x (since the East side has knocked over the entire length of x). Therefore, the cost of the three regular sides combined is 15x + 15x + 15(y - 2x) = 30x + 15y - 30x = 15y.

To minimize the cost, we need to minimize the total cost of all the sides. So, the total cost of the pen is given by: Cost = 40y + 15y.

Now, you have two equations:
xy = 30 (from the area constraint)
Cost = 40y + 15y (from the total cost equation)

To find the dimensions that minimize the cost, you can substitute the value of x from the area equation (xy = 30) into the cost equation. This will give you the cost as a function of y only, which you can then minimize.

So, let's substitute x = 30/y into the cost equation: Cost = 40y + 15y.

Now, you have the cost equation solely in terms of y. To find the value of y that minimizes the cost, you can take the derivative of the cost equation with respect to y, set it to zero, and solve for y.

Once you find the value of y, you can substitute it back into the area equation (xy = 30) to find the corresponding value of x. Finally, you can plug these values into the cost equation to calculate the minimum cost of the pen.

I hope this explanation helps you solve the problem. If you need any further assistance, feel free to ask.