From: Alan B. <ala...@gm...> - 2018-02-28 04:43:09
|
Hi Rudolf, Yes, you may use either TPS or TAYLOR packages to expand an expression as a power series. Either, I think, will do equally well for your problem. The main difference for the user is that tps (which I developed) calculates an extendible power series using simulated lazy evaluation. By default terms up to sixth order are calculated and displayed although this limit can be altered by the function PSEXPLIM with an integer argument. You can also truncate a power sereis expansion to produce a polynomial (or a rational function if the order of the series is negative) using the function PSTRUNCATE. The main advantage of the lazy evaluation scheme is that if you decide you want (say) the 20th term of the power series just calculated with (say) ps(some-exp,x,0); You issue a call psterm(ws, 20); The series will be extended automatically up to the 20th term and the required term output. With the taylor package one would need to do taylor(some-exp, x, 0, 6); To see the 20th term you would need to recalculate the whole series from the start with a call such as taylor(some-exp, x, 0, 20); Admittedly with modern machines being so fast, this is not a big penalty unless, of course, some-exp is very complicated. The extendible nature of the series is also very useful in examples such as s1 := ps(cos x-cosh x, x, 0); s2:=ps(sin x -sinh x, x,0); s1/s2; % power quotient calculated automatically and displayed correctly to SIXTH order Getting the same effect with TAYLOR is a little more complicated. However, TAYLOR is usually faster and uses less store than TPS on many problems. Actually the name TPS is misleading, it originally stood for truncated power series. The PS package was developed from an earlier TPS package written by Julian Padget which did use truncated series, but the algorithms and data structures were extendd to allow the automatic extension of the series. Somehow Julian and I never got around to changing the name of the package! Regards Alan Barnes On 20/02/2018 14:43, Rudolf Sykora wrote: > Dear Arthur, > > On 20 February 2018 at 14:39, Arthur Norman <ac...@ca...> wrote: >> Apologies if my previous message was too brief. The weight/wtlevel stuff >> rather expects to be applying to polynomials and you can see that it it >> looks as sqrt(-delta^2+epsilion^2) it is liable to map that onto >> sqrt(epsilon^2) before considering much more. > thanks for more information. > So, in my case, I should have used the 'tps' package, > not the weight/wtlevel. I thought the weight would do the > expansion, which it does not. > > Thanks once more, > > Ruda > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus |