I'm trying to find the multivariable Taylor series expansion of
$$ f(x,y) = \left( \frac{\sin(x)/x}{\sin(y)/y} \right)^2 $$
I tried to do this in Matlab (2020b), using the symbolic toolbox
taylor(f,[x y],[0 0],'order',6)
However I get an error saying it can't compute the Taylor expansion. I believe this is due to a divide by zero issue, but I'm not sure.
I can expand the numerator and denominator independently (EDIT: as pointed out, this is not the proper multi variable expansion...it was just to check if $\sin(x)/x$ was causing problems)
$$ \frac{1 - x^2/3 + 2x^4/45}{1 - y^2/3 + 2y^4/45} $$
so I'm not sure why the function expansion in Matlab doesn't work. What am I missing?
EDIT: I should note the above is an example. I'd like to have a general idea how to apply a Taylor series under these circumstances (rational function).
EDIT: The error output is
Error using symengine
Unable to compute a Taylor expansion.
Error in sym/taylor (line 128)
tSym = mupadmex('symobj::taylor',f.s,x.s,a.s,options);
enter preformatted text here
Update: A better way is to consider the Taylor expansion of $g(t) := f(xt, yt)$ around $t = 0$ and then let $t=1$ in the Taylor expansion.
By the way, if you use Maple, just use