Roger Hui <[email protected]> wrote:
> If you can suggest the desired derivates/integrals,
> it would greatly aid in filling the gaps. e.g.
> derivative integral
> 0&o.
> 4&0.
> etc.
>
> Since f@g d. 1 exists if f and g are, the effects
> are magnified.
Here are a few more missing functions:
Taylor expansions:
3&o.t: => (2&|*[:{:(+/\@|.@(,&0))^:(]`(1+0&*)))"0%!
7&o.t. => ({&0 1 0 _1@(4&|)*[:{:(+/\@|.@(,&0))^:(]`(1+0&*)))"0%!
_2&o.t. => 0.5p1"_`(-@(2&|*(%~(*/@(>:%2&+)@(i.@<.&.-:)))))@.(0&<)"0
_6&o.t. => j.@(0.5p1"_`(-@(2&|*(%~(*/@(>:%2&+)@(i.@<.&.-:)))))@.(0&<))"0
_9&o.t. => {&0 1 0@(2&<.)
_11&o.t. => {&0 0j1 0@(2&<.)
_12&o.t. => {&(1 0j1 _1 0j_1)@(4&|)%!
Weighted Taylor expansions:
3&o.t: => (2&|*[:{:(+/\@|.@(,&0))^:(]`(1+0&*)))"0
7&o.t: => ({&0 1 0 _1@(4&|)*[:{:(+/\@|.@(,&0))^:(]`(1+0&*)))"0
_2&o.t: => 0.5p1"_`(-@(2&|**:@(*/)@(>:@(i.@<.&.-:))))@.(0&<)"0
_6&o.t: => j.@(0.5p1"_`(-@(2&|**:@(*/)@(>:@(i.@<.&.-:))))@.(0&<))"0
_9&o.t: => {&0 1 0@(2&<.)
_11&o.t: => {&0 0j1 0@(2&<.)
_12&o.t: => {&(1 0j1 _1 0j_1)@(4&|)
Derivatives valid for real y:
*d.1 => 0"0
|d.1 => * NB. Technically, *@+
9&o.d.1 => 1"0
10&o.d.1 => * NB. Technically, *@+
11&o.d.1 => 0"0
12&o.d.1 => 0"0
_10&o.d.1 => 1"0
Integrals valid for real y:
*d._1 => | NB. Technically, |@+
|.d._1 => -:@:*:%*
9&o.d._1 => -:@:*:
10&o.d._1 => -:@:*:%*
11&o.d._1 => 0"0
12&o.d._1 => *1p1*0&>
_10&o.d._1 => -:@:*:
Also, hooks work with t. and t: but not d.
(u v)d.n could be treated as ([u v)d.n or ([u v@])d.n:
(]+*:)t.
{&0 1 1 0x@(3x&<.)
(+*:)t.
{&0 1 1 0x@(3x&<.)
(]+*:) d.1
1 2x&p.
(+*:) d.1
|domain error
| (+*:)d.1
While typing the above, I did notice this strange anomaly:
(+*:)t.
{&0 1 1 0x@(3x&<.)
(+*:@])t.
{&0 1 1 0 0 0x@(5x&<.)
-- Mark D. Niemiec <[email protected]>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm