# Mathematica should have built-in support for multivariate Taylor series

Posted 21 days ago
268 Views
|
|
6 Total Likes
|
 This the highest voted question for tag "series-expansion" -- https://mathematica.stackexchange.com/questions/15023/multivariable-taylor-expansion-does-not-work-as-expectedI just got tripped by this after not reading the docs carefully, a bit unexpected to have a built-in Series functionality for sequential differentiation but not for multivariate differentiation.Perhaps multivariate Taylor could be specified as nested list: Series[f[a,b], {{a, b}, {a0, b0}, 1}] Example Clear[A, B]; multiTaylor[f_, {vars_?VectorQ, pt_?VectorQ, n_Integer?NonNegative}] := Sum[Nest[(vars - pt) . # &, (D[f, {vars, \[FormalK]}] /. Thread[vars -> pt]), \[FormalK]]/\[FormalK]!, {\[FormalK], 0, n}, Method -> "Procedural"]; multiTaylor[a/b, {{a, b}, {a0, b0}, 1}] // FullSimplify (* expected result *) Series[a/b, {a, a0, 1}, {b, b0, 1}] // Normal // FullSimplify (* unexpected result *) 
 This raises many questions, a few of which I will pose here.What would the O[...] term be?Would it always be homogeneous or should it allow different variables to attain different degrees e.g. using a weight vector other than {1,1,...1}?What would the internal representation be in terms of the degree, order and denominator fields?One thing I can say right away is that any implementation of multivariate Taylor would have to be in a function other than Series. The entire functionality around Series, involving Limit, Integrate and more, is built around it being a univariate function with fields that encode information used by a univariate function. Changing this would be a large-scale project (which we do undertake) and would introduce bugs that would percolate for years to come (which we try to avoid).My suggestion is to consider the questions and design and implement something suitable for the Wolfram Function Repository. We do review those functions with the thought of promoting some to regular Mathematica functions.