Among the many answers in this thread the standard method is not seen, so here 
it comes.


Let the sides of the rectangular chicken yard be  x  and  y
The area is  x*yDifferentiating the area gives  0=(y*dx)+(x*dy)  which is zero 
because the area is maximum.
The length of fence is  100= (2*x)+y
Differentiating the length gives  0=(2*dx)+(dy)  which is zero because the 
lenght is constant. 

Multiplying   0=(2*dx)+(dy)  by  x  (called a Lagrange multiplyer) gives  
0=(2*x*dx)+(x*dy)

Subtracting   0=(2*x*dx)+(x*dy)   from   0=(y*dx)+(x*dy)  gives   0=(y-2*x)*dx
As  dx  need not be zero we must have  0=y-2*x .  

The rest is easy.

So  y=2*x . 

Substitute  y=2*x   into 100=(2*x)+y  and get  100=4*x. 

Divide by  4  and get   x=25 

Substitute  x=25  into  100=(2*x)+y  and  get  y=50. 


No computer power is required.
- Bo


>________________________________
> Fra: km <[email protected]>
>Til: [email protected] 
>Sendt: 15:42 lørdag den 23. februar 2013
>Emne: [Jprogramming] The farmer's fence
> 
>Use J to solve the farmer's fence problem:
>
>A farmer with 100 meters of wire fence wants to make a rectangular chicken 
>yard using an existing barn wall for one of the north-south sides.  What is 
>the largest area he can enclose if he uses the 100 meters of fence for the 
>other three sides, and what are the dimensions of the largest-area chicken 
>yard?
>
>Kip Murray
>
>Sent from my iPad
>
>----------------------------------------------------------------------
>For information about J forums see http://www.jsoftware.com/forums.htm
>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to