calling multivariate Taylor with arbitrary number of variables

asked 2022-06-06 14:55:35 +0100

MCW gravatar image

If we have, say, variables x and y, then we can use

f = x^2*y^3 - x - y

f.taylor((x,0), (y,1), 3)

If we want to deal with an arbitrary number of variables, we should presumably write code to first create a tuple of the right form (I omit that here since it is easy), and then pass it to taylor, but I can't get it to work. The following fails ("wrong arguments passed to taylor"). Presumably I don't know how to call a function with a tuple of arguments in the right way.

a = (x,0), (y, 1), 3


edit retag flag offensive close merge delete