[Jprogramming] Derivatives
Henry Rich
henryhrich at gmail.com
Sun Feb 9 15:10:59 UTC 2020
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 the derivative
> is so messy that a cut and try approach seems easier.
>
> When you do to get 0^x and get _ _ _ 1 0 0 0 what you should get is
>
> _ _ _ 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
>
> 0^ - 1e1000
>
> _
>
> 0^ 1e1000
>
> 0
>
> 0^ 10^6
>
> 0 NB: the N^0 rule doesn't apply for N=0 but J isn't recognizing this
>
> Now if you use (10^6)^0 the result is 1 as N^0 rule has a non zero
> value.**Don
>
>
> On 2020-02-06 6:23 p.m., 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 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
>>
>>
>> On Thu, Feb 6, 2020 at 5:38 PM Don Kelly <dhky at shaw.ca> wrote:
>>
>>> 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 is clearly not, as 0^0 = 1
>>>>
>>>>
>>>> Skip Cave
>>>>
>>>>
>>>>
>>>> On Wed, Feb 5, 2020 at 2:37 PM 'Bo Jacoby' via Programming <
>>>> programming at 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 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 <
>>>>> henryhrich at gmail.com>:
>>>>>
>>>>> 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 precision
>>>>>> C-c C-c|break NB. After waiting a while...
>>>>>> | _2 0 1&p.Newton 1
>>>>>> NB. Failure to terminate...
>>>>>>
>>>>>>
>>>>>> On Wed, Feb 5, 2020 at 7:34 AM Henry Rich <henryhrich at gmail.com>
>>> wrote:
>>>>>>> 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 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
>>>>>>>>
>>>>>>>> Skip Cave
>>>>>>>> Cave Consulting LLC
>>>>>>>>
>>> ----------------------------------------------------------------------
>>>>>>>> For information about J forums see
>>> http://www.jsoftware.com/forums.htm
>>>>>>> ----------------------------------------------------------------------
>>>>>>>
>>>>>>> For information about J forums see
>>> http://www.jsoftware.com/forums.htm
>>>>> ----------------------------------------------------------------------
>>>>>
>>>>> For information about J forums see
>>>>> http://www.jsoftware.com/forums.htm
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>>
>>>>> For information about J forums see
>>>>> http://www.jsoftware.com/forums.htm
>>>>>
>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list