My friend and I have come across this problem in Apostol's Calculus Vol. 1, ed.2 (exercises 4.21 if anyone is looking). We are studying calculus independently and have become stumped by this one. 1. The problem statement, all variables and given/known data The problem as written in Apostol: "A farmer wishes to enclose a rectangular pasture of area A adjacent to a long stone wall. What dimensions require the least amount of fencing?" 2. Relevant equations From the problem setup, we have deduced two elementary equations: P = 2x + y A = xy where P is the perimeter (or length of fence, minus the stone wall part) and A is area (a constant). 3. The attempt at a solution There are two equations here and two variables. That seemed like a good thing. We found y = A/x and then substituted into the perimeter equation: P(x) = 2x + A/x. In order to optimize, we differentiated P(x): P`(x) = 2 - (A/x^2) Then set the equation to 0 find the extrema and to solve for the variable x. 0 = 2 - (A/x^2) 2 = A/(x^2) x^2 = A/2 x = (A/2)^1/2 And then substituted x into the area equation to find y: y((A/2)^1/2) = A y = (A/(A/2)^1/2)) According to the answer key this is wrong and we've been unable to find our error. It seems like something in the setup is wrong but we've reached a block. Does anyone have any insight into this? Thank you in advance!