0
$\begingroup$

I quite like the Series function. It is handy and extremely powerful, and it does a great job at making my life easier. But there's one thing that it does that drives me up the wall, and I'd like to fix it.

When calculating the series representation of a multivariate function, Series does this one variable at a time:

Series[Sin[x + y], {x, 0, 3}, {y, 0, 3}]

But suppose, however, that what I wanted was a series expansion of $\sin(x+y)$ that went up to (and only up to) terms of collective cubic order. Then the output above fails, because it includes terms like $y^2 x^3$ which are of quintic total order.

Is there a built-in way to restrict the Series output so that it does not overshoot in terms of the total order of the series it returns?

$\endgroup$
0

1 Answer 1

2
$\begingroup$

Introduce an extra degree-counting parameter $t$:

maxpower = 6;

Normal[Series[Sin[t (x + y)], {t, 0, maxpower}]] /. t -> 1

enter image description here

Expand[%]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.