Re: [Jprogramming] Differentiation problem

2022-11-24 Thread 'Michael Day' via Programming
This does the trick in J904 - perhaps there's a better way of emulating D.(i.3) ...    load'plot'    load'~addons/math/calculus/calculus.ijs'    u =. ^@-@-:@*:"0    u1=. (u deriv_jcalculus_ 1)    u2=. (u1 deriv_jcalculus_ 1)    $>(u;u1;u2)10%~50-~i.101 3 101    plot >(u;u1;u2)10%~50-~i.101 Mik

Re: [Jprogramming] Differentiation problem

2022-11-24 Thread 'Michael Day' via Programming
But... as I've just discovered,  the equivalent function expressed as    ^@-@-:@*: does yield a "smooth" curve for the 2nd differential,  so presumably there's a different need to do or level of approximation with ^&2 compared to *: There is a remark    Generating higher-order partial derivative

Re: [Jprogramming] Differentiation problem

2022-11-24 Thread 'Michael Day' via Programming
Well,  I've discovered that this works ok in J807:     plot|:^@-@-:@*:"0 D.(i.3)10%~50-~i.101 NB. replace ^&2 by *:   (!) I wasn't sure that you needed "0 so tried     plot|:^@-@-:@*: D.(i.3)10%~50-~i.101 but that suffers the same problem with the 2nd derivative! We're supposed to use d

Re: [Jprogramming] Differentiation problem

2022-11-24 Thread 'Skip Cave' via Programming
What is the equivalent of the program: * plot|:^@-@-:@^&2"0 D.(i.3)10%~50-~i.101* for users of J version 9.04g, where the D. primitive has been removed? Where is the doc on the new calculus functions? Skip Skip Cave Cave Consulting LLC On Thu, Nov 24, 2022 at 12:01 PM 'Bo Jacoby' via Programmi

Re: [Jprogramming] Differentiation problem

2022-11-24 Thread Raul Miller
Presumably you're working with an older version of J, like J807. (J9 tossed the D. conjunction and requires we use the math/calculus library manually.) Anyways, if you increase the size of the plot, you'll see that the display artifact you're looking at is a consequence of discretization -- the pl