I noticed a couple of issues in the calculus addon.

0&p. deriv 1 

gives an error. i.e. it can't handle the constant zero function. This also has 
an effect on other polynomials.

2&p. deriv 2

will fail.

Also, deriv should be able to handle f^g easily, even if not able to tidy up 
the resulting expression, when necessary.

I added an implementation of deriv for f^g, arbitrary differentiable f,g.

e.g.

cos(x)^sin(x)

((2&o.)^(1&o.)) deriv 1

will give

((2&o. * ^.@(2&o.)) + (1&o. * -@(1&o.)) % 2&o.) * 2&o. ^ 1&o.

instead of an error.

I made a Pull Request:

https://github.com/jsoftware/math_calculus/pulls

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

Reply via email to