>> 
<< 
Usr 
Pri 
JfC 
LJ 
Phr 
Dic 
Voc 
!: 
Help 
Dictionary
| Derivative | m D. n  u D. n  mu |  | 
| u D. n is the n-th derivative of u, 
and u`v D. n is u with an assigned n-th 
derivative v . For example: 
   (cube D.1;cube D.2; (cube=: ^&3"0) D.3)y=: 2 3 4
+--------+--------+-----+
|12 27 48|12 18 24|6 6 6|
+--------+--------+-----+
 | 
The derivative applies to constant functions, polynomials, 
the exponential ^, the integral 
powers ^&n, and those assigned by u`v D. n . 
It also applies to functions derived from these by addition, 
subtraction, multiplication, and division (u+v, etc.); 
by the composition u@v; and by the 
inverse u^:_1 . Since functions such as j. 
and - (negation) and %: (square root) and 1&o. 
(sin) and 6&o. (cosh) may all be so derived, 
they are also in the domain of the derivative.  
Others are treated by approximation. 
The derivative of an arbitrary function may also be treated by 
a polynomial approximation, (provided by the matrix divide), 
or by approximations using the secant slope D: .
If the argument rank of u is a and the result 
rank is r, then the argument rank of u D.1 
is also a, but its result rank is r+a : 
the result of u D.1 is the derivative of each atom of the 
result of u with respect to each element of its argument, 
giving what is commonly referred to as the partial derivatives.  
For example:
   volume=: */"1 
   VOLUMES=: */\"1
   (volume;volume D.1;VOLUMES;VOLUMES D.1) y
+--+------+------+------+
|24|12 8 6|2 6 24|1 3 12|
|  |      |      |0 2  8|
|  |      |      |0 0  6|
+--+------+------+------+
   determinant=: -/ . * 
   permanent=: +/ . * 
   (];(determinant D.1);(permanent D.1))m=:*:i.3 3
+--------+--------------+--------------+
| 0  1  4|_201  324 _135|2249 1476 1017|
| 9 16 25| 132 _144   36| 260  144   36|
|36 49 64| _39   36   _9|  89   36    9|
+--------+--------------+--------------+
The adverbs D=: 1 : 'u"0 D.1' 
and VD=: 1 : 'u"1 D.1' assign ranks to their arguments, 
then take the first derivative; they are convenient for use 
in scalar and vector calculus:
   sin=: 1&o. 
   x=: 0.5p1 _0.25p1
   (*/\ VD y);(sin x);(sin D x);(sin D D x)
+------+-----------+----------+-----------+
|1 3 12|1 _0.707107|0 0.707107|_1 0.707107|
|0 2  8|           |          |           |
|0 0  6|           |          |           |
+------+-----------+----------+-----------+
>> 
<< 
Usr 
Pri 
JfC 
LJ 
Phr 
Dic 
Voc 
!: 
Help 
Dictionary