I am investigating changing from Reduce computer algebra to Julia symbolics. My main first need is efficient manipulation of power series (aiming for multiple small variables, and coefficients being complicated algebra and/or vector coefficients). How can it be done?
A simple example. In Reduce I simply do the following
1: on div,revpri;
2: let a^5=>0;
3: (1+a/2)^9;
1 + 9/2a + 9a2 + 21/2*a3 + 63/8a**4
4: ws(1-a/2);
1 + 4a + 27/4a2 + 6*a3 + 21/8*a**4
to indicate how all subsequent algebraic steps are automatically and seamlessly computed to truncations in āaā to error O(a^5).
In Julia, all I can see to do is
julia> using Symbolics
julia> @variables a
julia> taylor((1+a/2)^9,a,0:4)
(1//1) + (9//2)a + (9//1)(a^2) + (21//2)(a^3) + (63//8)(a^4)
julia> taylor(ans*(1-a/2),a,0:4)
(1//1) + (4//1)a + (27//4)(a^2) + (6//1)(a^3) + (21//8)(a^4)
Unfortunately, this code seems slow computationally because the taylor() functions seems slow (correct me if I am wrong). And also, it is slow for human coding because one has to repeatedly explicitly invoke the taylor() function (and also explicitly invoke expand() function for anything that does not need immediate truncation).
Please advise what could be efficient and fast in Julia.
Tony Roberts