Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Computing series where the free variable is not just a symbol is broken #10290
In : sin(x).series(x) Out: x - x**3/6 + x**5/120 + O(x**6) In : sin(sin(x)).series(sin(x)) Out: sin(x) - sin(x)**3/6 + sin(x)**5/120 + O(x**6) #Correct, but odd notation In : sin(exp(x)).series(exp(x)) Out: exp(5*x)/120 - exp(3*x)/6 + exp(x) #Wrong, and also missing big O In : sin(cos(x)).series(cos(x)) TypeError: zip argument #2 must support iteration
Arguably series should just complain and quit if it's not given an symbol for the free variable.
This odd behaviour is related to what
In : Order(x).subs(x, exp(x)) Out: 0 In : Order(x).subs(x, cos(x)) TypeError: zip argument #2 must support iteration
The error is occurring because