To find polynomial roots, p. is the primitive of choice.  Given the
coefficients, p. finds the roots; given the roots and a multiplier, p.
finds the coefficients.

   p. <1+i.20      NB. coefficients from roots and multiplier (here 1)
2432902008176640000 _8752948036761600000 13803759753640704000
_12870931245150988800 8037811822645051776 _3599979517947607200
1206647803780373360 _311333643161390640 63030812099294896
_10142299865511450 1307535010540395 _135585182899530 11310276995381 _7561...

   p. p. <1+i.20   NB. roots and multiplier from coefficients
┌─┬──────────────────────────────────────────────────┐
│1│20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1│
└─┴──────────────────────────────────────────────────┘

The polynomial above is Wilkinson's polynomial
<https://en.wikipedia.org/wiki/Wilkinson%27s_polynomial>.


On Wed, Feb 5, 2020 at 1:57 PM Lippu Esa <esa.li...@varma.fi> wrote:

> If I remember correctly you should deflate the original equation by
> dividing it by x-x1 where x1 is the first root found in order to find x2
> the second root.
>
> Esa
>
>
>
>
>
> Sent from my Samsung Galaxy smartphone.
>
>
> -------- Original message --------
> From: Skip Cave <s...@caveconsulting.com>
> Date: 2/5/20 21:49 (GMT+02:00)
> To: "programm...@jsoftware.com" <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 <henryhr...@gmail.com> 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 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 <henryhr...@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
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=01%7C01%7C%7Cf73805d19a944a8ea1e608d7aa747a61%7C5090e269dbea4e98a9aa3e70be5890f7%7C0&amp;sdata=LCHRYwGvI5EXRoKUQbKA%2BWG8v1vyKu9MDopz6xEBcSE%3D&amp;reserved=0
> > >> ----------------------------------------------------------------------
> > >> For information about J forums see
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=01%7C01%7C%7Cf73805d19a944a8ea1e608d7aa747a61%7C5090e269dbea4e98a9aa3e70be5890f7%7C0&amp;sdata=LCHRYwGvI5EXRoKUQbKA%2BWG8v1vyKu9MDopz6xEBcSE%3D&amp;reserved=0
> > >>
> > >
> >
> > ----------------------------------------------------------------------
> > For information about J forums see
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=01%7C01%7C%7Cf73805d19a944a8ea1e608d7aa747a61%7C5090e269dbea4e98a9aa3e70be5890f7%7C0&amp;sdata=LCHRYwGvI5EXRoKUQbKA%2BWG8v1vyKu9MDopz6xEBcSE%3D&amp;reserved=0
> >
> ----------------------------------------------------------------------
> For information about J forums see
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=01%7C01%7C%7Cf73805d19a944a8ea1e608d7aa747a61%7C5090e269dbea4e98a9aa3e70be5890f7%7C0&amp;sdata=LCHRYwGvI5EXRoKUQbKA%2BWG8v1vyKu9MDopz6xEBcSE%3D&amp;reserved=0
>
>
> T?m?n viestin sis?lt? liitteineen on luottamuksellinen ja tarkoitettu vain
> sen vastaanottajalle. Jos et ole viestin tarkoitettu vastaanottaja,
> pyyd?mme sinua poistamaan viestin liitteineen ja sen j?lkeen ilmoittamaan
> asiasta v?litt?m?sti viestin l?hett?j?lle. Viestin sis?ll?n paljastaminen,
> kopioiminen tai muu k?ytt? on kielletty.
>
> The contents of this message and any attachments are confidential and
> meant solely for the intended recipient. If you are not the intended
> recipient, we kindly ask that you delete the message and its attachments,
> and immediately notify the sender of the email. Disclosing, copying or
> using the contents of the message is strictly prohibited.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to