Abhinav Baid wrote: > > On 02/22/2015 06:47 PM, Waldek Hebisch wrote: > > > Hmm, it look that you are still converting Taylor series to > > polynomials and computing coefficients of polynomials. Did > > you push correct version? For applying r to elements of > > basis you will need a little routine which expands each > > coefficient of r into series and computes combination > > of coefficients of r times derivaties of basis element. > Oh, sorry. I convert the coefficients of r to Taylor Series now. [1] > > Another remark: 'zerosOf' may be quite expensive, because > > it produces _all_ zeros. Big advantage of van Hoej methods > > is that usually it is enough to work with single zero. > > So use 'zeroOf' instead of computing all zeros and discarding > > the other ones. > Yes, I was aware of the zeroOf function. But for the example mentioned > in the thesis, the zeroOf function wasn't giving a radical solution even > though 2 existed (repeated twice), but zerosOf was. So, I decided to go > with zerosOf.
I see. However, note that in algebraic case you may easily get equal but differently looking answers. > > Actually, before computing zero you should > > factor the characteristic polynomial and compute zero of > > a single factor. For various reasons factorizer should be > > passed as an extra parameter to 'find_right_factor'. > > > Okay, I now take the factorizer as an extra parameter. Surprisingly, > now, zeroOf returns a radical result, so I use that as well. Well, using 'zeroOf' and 'zerosOf' without factoring may lead to subtly wrong answers. In this case 'zerosOf' compensated for lack of factoring, but that was just an accident due to simple form of data. 'zerosOf' will produce answer in terms of radicals if polynomial is simple enough, otherwise it will produce "general" root of polynomial which displays as a new symbol and behaves in proper way in subseqent calculations. > [1] https://github.com/fandango-/spad/blob/master/task3.spad Now it looks OK. One extra remark: in other parts it is natural to use factorizer which takes SparseUnivariatePolynomial(F). -- Waldek Hebisch [email protected] -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
