From: Alan B. <ala...@gm...> - 2022-09-11 16:10:38
|
Arthur has already replied regarding accessing coefficients of a power series built with the Taylor package. For series built with the TPS package, there is a slightly more direct way, for example: load tps; s := ps(sin x, x, 0); psterm(s,9); One may also use pstruncate to truncate a power series after a specified number of terms and then usecoeff orcoeffn to extract the coefficient(s) of the the desired term(s) as Arthur indicated. Sections 16.1 & 16.2 of the manual give more info about the facilities of the two packages and give a brief discussion of the relative advantages/disadvantages of the two systems. Alan Barnes On 10/09/2022 18:36, Thomas Baruchel wrote: > Hi, > > what is the most reliable way of accessing coefficients of a power > series (built with the taylor() function)? > > I initially had some success with "part", but as soon as some > coefficnets are zero, the "part" function returns wrong terms. > > Also, I am only interested in the coefficient, not the variable; for > insance, for 1 + 2*x - 3*x^2 + O(x^3), I would like to get the -3 > coefficient for degree 2 rather than the whole -3*x^2 term. > > Thank you by advance, > > best regards, > > -- > Thomas Baruchel > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers |