I have:

4&o.    -:@((* 4&o.) - 5&o.)
8&o.    -:@((* - 7&o.@%) 8&o.)
_8&o.   -:@((* -~ 7&o.@%) 8&o.)

using Mathematica. I haven't checked these in J, so there's a chance I
mistranslated. _4&o. comes out the same. Or, yours could be rewritten as:

4&o.    -:@((* + ^.@+) 4&o.)
8&o.    j.@-:@((* + ^.@+) 4&o.)
_4&o.   -:@((* - ^.@+) _4&o.)
_8&o.   -@j.@-:@((* + ^.@+) 4&o.)

if that computes faster--these only require one computation of 4&o. or _4&o.
.

Marshall

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of John Randall
Sent: Sunday, February 20, 2011 11:24 AM
To: Programming forum
Subject: Re: [Jprogramming] Derivatives of o. family

Here are my suggestions for the result of f d. _1 where f is in the o.
family.

All of these have been tested by differentiation and comparison with the
original function on suitable arguments.  For example

   >./|(((* _1&o.) + 0&o.) D. 1 - _1&o.)"0 ]_1+2*50 ?@$ 0
1.5497e_7

is pretty good evidence that (* _1&o.) + 0&o. is an antiderivative of _1&o.

"OK" means that J already knows the integral: "no integral" means that there
isn't one.

  f    f d. _1
  0&o. -:@((* 0&o.) + _1&o.)
  1&o. OK
  2&o. OK
  3&o. OK
  4&o. -:@((* 4&o.)+^.@(+ 4&o.))
  5&o. OK
  6&o. OK
  7&o. OK
  8&o. j.@-:@((* 4&o.)+^.@(+ 4&o.))
  9&o. no integral
 10&o. no integral
 11&o. no integral
 12&o. no integral
 _1&o. (* _1&o.) + 0&o.
 _2&o. (* _2&o.) - 0&o.
 _3&o. (* _3&o.) - -:@^.@(1+*:)
 _4&o. -:@((* _4&o.) - ^.@(+ _4&o.))
 _5&o. (* _5&o.) - 4&o.
 _6&o. (* _6&o.) - _4&o.
 _7&o. (* _7&o.) + ^.@(0&o.)
 _8&o. -@j.@-:@((* 4&o.)+^.@(+ 4&o.))
 _9&o. -:@*:
_10&o. no integral
_11&o. j.@-:@*:
_12&o. -@j.@(_12&o.)

Obviously these can be expressed in several ways.  Any improvements would be
welcomed.  In particular, if anyone can shed light on the intended use of
8&o. and _8&o. I would appreciate it.

Best wishes,

John


----------------------------------------------------------------------
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