With some math in J

x : length barn side
-->the other rectangle side is then
  -: 100 - x

i.o.w. we have
  A =  x (50 - x/2)

with J

   0 1 +//.@(*/) 50 _0.5
0 50 _0.5

first derivative

   0 50 _0.5&p. d. 1
50 _1&p.

second derivative

   0 50 _0.5&p. d. 2
_1"0

--> a maximum for

   1{:: p. 50 _1
50

--> maximum (rectangular) area

   0 50 _0.5&p. 50
1250





On 23-02-13 15:42, km wrote:
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

--
Met vriendelijke groet,
@@i = Arie Groeneveld

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to