Re: [Jprogramming] Derivatives

2020-02-12 Thread Don Kelly
I think that indeterminate is slightly better and seems to be the word generally used for mathematics. Don On 2020-02-11 4:53 a.m., Raul Miller wrote: On Mon, Feb 10, 2020 at 10:12 PM Don Kelly wrote: I also should have written "indeterminate" This seems to be another example where one choi

Re: [Jprogramming] Derivatives

2020-02-11 Thread 'Jim Russell' via Programming
Many thanks to both Raul and Roger for Falkoff's paper. Fascinating! > On Feb 11, 2020, at 11:49 AM, Roger Hui wrote: > > I am skeptical of this particular use of "indeterminant" in Falkoff's > *APL\360 > History*. I typed in the web page > http://www.jsoftware.com/papers/apl360history.htm co

Re: [Jprogramming] Derivatives

2020-02-11 Thread Roger Hui
I am skeptical of this particular use of "indeterminant" in Falkoff's *APL\360 History*. I typed in the web page http://www.jsoftware.com/papers/apl360history.htm contents from a printed Proceedings, and as noted in the web page, The Proceedings state that “Mr. Falkoff’s [address] … has been tran

Re: [Jprogramming] Derivatives

2020-02-11 Thread Raul Miller
On Mon, Feb 10, 2020 at 10:12 PM Don Kelly wrote: > I also should have written "indeterminate" This seems to be another example where one choice being valid does not mean that a different choice is invalid. (A common issue when using the english language -- or, more generally, any human language.

Re: [Jprogramming] Derivatives

2020-02-10 Thread 'Jim Russell' via Programming
> On Feb 10, 2020, at 10:31 PM, Don Kelly wrote: > > Thank you and good night?? Jeeze, even the shortest message in this thread goes over my head! -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Derivatives

2020-02-10 Thread Don Kelly
Thank you and On 2020-02-09 7:10 a.m., Henry Rich wrote: See https://arxiv.org/pdf/math/9205211.pdf esp. p. 6 Henry Rich On 2/9/2020 12:29 AM, Don Kelly wrote: Reading again, I apologize for mistaking x^x for x*x- and getting an easy to get polynomial with 2 roots . Your original x^x =2*x is

Re: [Jprogramming] Derivatives

2020-02-10 Thread Don Kelly
Thank you for this.  I agree and my point is that n^0 is 1 if n is not 0 but 0^n is another kettle of fish. However, in applying the mat to the real world, I cannot think of anything where such discontinuity actually exists-so it is a nice philosophical matter. I've looked at Knuth and am not s

Re: [Jprogramming] Derivatives

2020-02-09 Thread Raul Miller
On Sun, Feb 9, 2020 at 12:29 AM Don Kelly wrote: > _ _ _ HUH? 0 0 0 where i am using HUH? to indicate that for x=0 the > result is indeterminant. Creep up on 0 and no matter how close to 0 > you get -the results are the same. Crossing 0 is a discontinuous jump > directly from infinity to 0

Re: [Jprogramming] Derivatives

2020-02-09 Thread Henry Rich
See https://arxiv.org/pdf/math/9205211.pdf esp. p. 6 Henry Rich On 2/9/2020 12:29 AM, Don Kelly wrote: Reading again, I apologize for mistaking x^x for x*x- and getting an easy to get polynomial with 2 roots . Your original x^x =2*x is not actually a normal polynomial.Newton could be used but 

Re: [Jprogramming] Derivatives

2020-02-08 Thread Don Kelly
Reading again, I apologize for mistaking x^x for x*x- and getting an easy to get polynomial with 2 roots . Your original x^x =2*x is not actually a normal polynomial.Newton could be used but  the derivative is  so messy that a cut and try approach seems easier. When you do to get 0^x and get _

Re: [Jprogramming] Derivatives

2020-02-08 Thread 'Bo Jacoby' via Programming
f=.(^ ]) - +: newton=.- f % f"0 D.1 (newton^:_) 0 3 0.346323 2 NB. these are the two solutions Den fredag den 7. februar 2020 17.46.50 CET skrev Henry Rich : t. has been removed from J9.01. Henry Rich On 2/7/2020 11:45 AM, Brian Schott wrote: > I am still havin

Re: [Jprogramming] Derivatives

2020-02-07 Thread Henry Rich
t. has been removed from J9.01. Henry Rich On 2/7/2020 11:45 AM, Brian Schott wrote: I am still having trouble with j9 relative to j8 as shown by the two results below. ^ t. i.6 |spelling error | ^ t. i.6 | ^ JVERSION Engine: j901/j64avx/darwin Release-c: commercial/2020-01-11T12

Re: [Jprogramming] Derivatives

2020-02-07 Thread Brian Schott
I am still having trouble with j9 relative to j8 as shown by the two results below. ^ t. i.6 |spelling error | ^ t. i.6 | ^ JVERSION Engine: j901/j64avx/darwin Release-c: commercial/2020-01-11T12:22:31 Library: 9.01.20 Platform: Darwin 64 Installer: J901 install InstallPath: /users/bri

Re: [Jprogramming] Derivatives

2020-02-07 Thread Roger Hui
For polynomial roots, see https://www.jsoftware.com/help/dictionary/samp27.htm for an alternative, Kerner's Method. It finds all the roots (approximations thereof, of course) all at once. Also described in Section 3.2 of Iverson's Turing Lecture https://www.jsoftware.com/papers/tot.htm. -

Re: [Jprogramming] Derivatives

2020-02-07 Thread Lippu Esa
Also it is a good thing if you can plot the function for visual inspection. t. Esa -Original Message- From: Programming On Behalf Of Henry Rich Sent: Friday, February 7, 2020 12:18 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Derivatives Newton's method is goo

Re: [Jprogramming] Derivatives

2020-02-07 Thread Henry Rich
Newton's method is good for final polishing of a root when you are very close.  It can do weird things when you are not close. Like here.  Study this case and see what happened. Henry Rich On 2/6/2020 9:23 PM, Skip Cave wrote: ]x=.i:3 _3 _2 _1 0 1 2 3 0^x _ _ _ 1 0 0 0 x=.0 (x^x)=2*x 0

Re: [Jprogramming] Derivatives

2020-02-06 Thread Lippu Esa
on 1 2 -Original Message- From: Programming On Behalf Of Brian Schott Sent: Thursday, February 6, 2020 5:37 PM To: Programming forum Subject: Re: [Jprogramming] Derivatives Henry et al, I have 2 questions. How would the second root at 2 be found with Skip's problem? Why do

Re: [Jprogramming] Derivatives

2020-02-06 Thread Skip Cave
]x=.i:3 _3 _2 _1 0 1 2 3 0^x _ _ _ 1 0 0 0 x=.0 (x^x)=2*x 0 NB. Zero is not a root (x^x)=2*x 0 x^x 1 2*x 0 So why does Newton Raphson show a zero root for (x^x)=2*x? (^~ - +:) Newton 2 2 (^~ - +:) Newton 1 0 NB. Something wrong here! (x^x)=2*x ? Skip Cave Cave Consulting LLC

Re: [Jprogramming] Derivatives

2020-02-06 Thread Don Kelly
Bo is correct There is a "zero rule"  so n^0 =1 if n is not equal to 0. Bo is correct the only possible 0^0 is the same as 0*0 Possibly the coding for ^ should take this into account. On 2020-02-05 10:14 p.m., Skip Cave wrote: Bo, The original equation is: (x^x)=2*x 2 is clearly a root. 0 i

Re: [Jprogramming] Derivatives

2020-02-06 Thread Skip Cave
solve: (x^x)=2*x JVERSION Engine: j901/j64avx2/windows Release-e: commercial/2020-01-29T11:17:19 Library: 9.01.18 Qt IDE: 1.8.5/5.12.6 Platform: Win 64 Installer: J901 install InstallPath: c:/users/skip/j901 Contact: www.jsoftware.com load 'math/calculus' Newton =: adverb : ']-u%(u der

Re: [Jprogramming] Derivatives

2020-02-06 Thread Henry Rich
1. Choose a different starting guess 2. Update the addon Henry Rich On 2/6/2020 10:36 AM, Brian Schott wrote: Henry et al, I have 2 questions. How would the second root at 2 be found with Skip's problem? Why do I get the following error? server:~ brian$ /Users/brian/j901/bin/jconsole ; exit

Re: [Jprogramming] Derivatives

2020-02-06 Thread Brian Schott
Henry et al, I have 2 questions. How would the second root at 2 be found with Skip's problem? Why do I get the following error? server:~ brian$ /Users/brian/j901/bin/jconsole ; exit; JVERSION Engine: j901/j64avx/darwin Release-c: commercial/2020-01-11T12:22:31 Library: 9.01.20 Platform: Darwi

Re: [Jprogramming] Derivatives

2020-02-06 Thread bill lam
Write down the equation on paper and then use android mathway app to take a photo of it, and it solved x=0.34632336,2 -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 --

Re: [Jprogramming] Derivatives

2020-02-05 Thread 'Bo Jacoby' via Programming
t; > > > > > > > > > Sent from my Samsung Galaxy smartphone. > > > > > > Original message > > From: Skip Cave > > Date: 2/5/20 21:49 (GMT+02:00) > > To: "programm...@jsoftware.com" > > Subject: Re: [

Re: [Jprogramming] Derivatives

2020-02-05 Thread Skip Cave
d x2 > > the second root. > > > > Esa > > > > > > > > > > > > Sent from my Samsung Galaxy smartphone. > > > > > > Original message > > From: Skip Cave > > Date: 2/5/20 21:49 (GMT+02:00) > > T

Re: [Jprogramming] Derivatives

2020-02-05 Thread Skip Cave
Bo, The original equation is: (x^x)=2*x 2 is clearly a root. 0 is clearly not, as 0^0 = 1 Skip Cave On Wed, Feb 5, 2020 at 2:37 PM 'Bo Jacoby' via Programming < programm...@jsoftware.com> wrote: > Skip. (x^x)-(2*x) = x*(x-2) is zero for x=0 and x=2. Two real roots. > Newton Raphson finds on

Re: [Jprogramming] Derivatives

2020-02-05 Thread Lippu Esa
Yes! It is quite cool to have this in the core language. Esa Sent from my Samsung Galaxy smartphone. Original message From: Roger Hui Date: 2/6/20 00:25 (GMT+02:00) To: programm...@jsoftware.com Subject: Re: [Jprogramming] Derivatives To find polynomial roots, p. is the

Re: [Jprogramming] Derivatives

2020-02-05 Thread Roger Hui
> From: Skip Cave > Date: 2/5/20 21:49 (GMT+02:00) > To: "programm...@jsoftware.com" > Subject: Re: [Jprogramming] Derivatives > > Won't (x^x)-(2*x) = 0 have two roots? A real one, and a complex one? > > Will Newton Raphson find both? > > Skip &

Re: [Jprogramming] Derivatives

2020-02-05 Thread Lippu Esa
: "programm...@jsoftware.com" Subject: Re: [Jprogramming] Derivatives Won't (x^x)-(2*x) = 0 have two roots? A real one, and a complex one? Will Newton Raphson find both? Skip On Wed, Feb 5, 2020 at 12:08 PM Henry Rich wrote: > Yeah, a rational y wouldn't ever quite

Re: [Jprogramming] Derivatives

2020-02-05 Thread 'Bo Jacoby' via Programming
Skip.  (x^x)-(2*x) = x*(x-2) is zero for x=0 and x=2. Two real roots. Newton Raphson finds one of these depending on the value of the initial guess.  Bo. Den onsdag den 5. februar 2020 19.08.23 CET skrev Henry Rich : Yeah, a rational y wouldn't ever quite satisfy 0 = _2 0 1 p. y Henry

Re: [Jprogramming] Derivatives

2020-02-05 Thread Skip Cave
Won't (x^x)-(2*x) = 0 have two roots? A real one, and a complex one? Will Newton Raphson find both? Skip On Wed, Feb 5, 2020 at 12:08 PM Henry Rich wrote: > Yeah, a rational y wouldn't ever quite satisfy 0 = _2 0 1 p. y > > Henry Rich > > On 2/5/2020 1:04 PM, Devon McCormick wrote: > > You

Re: [Jprogramming] Derivatives

2020-02-05 Thread Henry Rich
Yeah, a rational y wouldn't ever quite satisfy 0 = _2 0 1 p. y Henry Rich On 2/5/2020 1:04 PM, Devon McCormick wrote: You especially need guardrails if you try something like this: _2 0 1&p. Newton 1 NB. OK - square root of 2 1.41421 _2 0 1&p. Newton 1x NB. Try extended precisi

Re: [Jprogramming] Derivatives

2020-02-05 Thread Devon McCormick
You especially need guardrails if you try something like this: _2 0 1&p. Newton 1 NB. OK - square root of 2 1.41421 _2 0 1&p. Newton 1x NB. Try extended precision C-c C-c|breakNB. After waiting a while... | _2 0 1&p.Newton 1 NB. Failure to terminate... On Wed

Re: [Jprogramming] Derivatives

2020-02-05 Thread Henry Rich
I misread your function.    (^~ - +:) Newton 1.1 0.346323j1.2326e_32    (^~ - +:) Newton 0.5 0.346323 Still need those guardrails! Henry Rich On 2/5/2020 2:21 AM, Skip Cave wrote: In "Fifty Shades of J" chapter 23, the Newton Raphson algorithm is described thusly: Newton =: adverb : ']-u%(u

Re: [Jprogramming] Derivatives

2020-02-05 Thread Henry Rich
Given f, Newton finds where f is 0.  Your function is x^2 - 2x = 0.    load 'math/calculus'    Newton =: adverb : ']-u%(u deriv_jcalculus_ 1)'(^:_)("0)    0 _2 1&p. Newton 1.1 2 Check:    p. 0 _2 1 +-+---+ |1|2 0| +-+---+ Without guardrails, Newton may crash:    0 _2 1&p. Newton 1 |NaN error

Re: [Jprogramming] Derivatives

2020-02-04 Thread ethiejiesa via Programming
NuVoc notes what replaces D. and d. on their respective pages. In particular, from the math/calculus addon, we have * deriv_jcalculus_ to replace d. and * pderiv_jcalculus_ to replace D. Skip Cave wrote: > In "Fifty Shades of J" chapter 23, the Newton Raphson algorithm is > described thusly: >

[Jprogramming] Derivatives

2020-02-04 Thread Skip Cave
In "Fifty Shades of J" chapter 23, the Newton Raphson algorithm is described thusly: Newton =: adverb : ']-u%(u D.1)'(^:_)("0) How would that be defined using the new derivative verbs? Also, what is the replacement for d.? How would I find the roots of (x^x)=2*x using Newton Raphson? Skip Ski

Re: [Jprogramming] derivatives of a gerund

2015-11-03 Thread David Lambert
(1&o.)`0:kappa 9 NB. radius of curvature is reciprocal of curvature rc=: [: % kappa Date: Tue, 3 Nov 2015 17:05:17 -0500 From: Raul Miller To: Programming forum Subject: Re: [Jprogramming] derivatives of a gerund Message-ID: Content-Type: text/plain; charset=UTF-8 Like this? dgerund=:3 :0

Re: [Jprogramming] derivatives of a gerund

2015-11-03 Thread 'Pascal Jasmin' via Programming
cool, dgerund *:`^`(2&^) - Original Message - From: Raul Miller To: Programming forum Cc: Sent: Tuesday, November 3, 2015 5:05 PM Subject: Re: [Jprogramming] derivatives of a gerund Like this? dgerund=:3 :0"0 {.(y`:6 d.1)`'' ) r=:4 :0 dx=. dgerund x dd

Re: [Jprogramming] derivatives of a gerund

2015-11-03 Thread Raul Miller
Like this? dgerund=:3 :0"0 {.(y`:6 d.1)`'' ) r=:4 :0 dx=. dgerund x ddx=. dgerund dx NB. fill in the rest... ) Note that if you have verbs which can't be handled by d. you'll have to use a cover for d.1 which does what you need for those cases. Thanks, -- Raul On Tue, Nov 3, 2015 at

[Jprogramming] derivatives of a gerund

2015-11-03 Thread David Lambert
In algebraic notation I have a parametric curve x=u(t), y=v(t), z=v(t) and need radius_of_curvature(t) Would like the verb r taking a gerund argument, u`v`w r t but requires first and second derivatives. In LaTeX linear notation, with \times representing cross product, curvature is \[\frac{\|\