I have discovered a very inconvenient behaviour of SeriesData in a new version of Mathematica v12.3.0: it automatically expands brackets in the series coefficients!
Example: For the input
SeriesData[z,0, {l^2 ((2 a + b) x + (a + 2 b) y) + 1/2 l^2 Log[z], 0}, 0, 2, 1]
Mathematica, for the unknown reason, returns the following answer:
1/2 (4 a l^2 x + 2 b l^2 x + 2 a l^2 y + 4 b l^2 y + l^2 Log[z]) + O(z^2)
This is very annoying since I had written quite a lot of commands that took the coefficients apart, simplified according to some rules, and then constructed the SeriesData object back.
Is it possible to turn this automatic expansion off?
P.S. An even better example is the following:
ClearAll[a,b,z];
SeriesData[z,0, {(a+b)^50+Log[z], 0}, 0, 2, 1]
The output will have this $(a+b)^{50}$ bracket expanded. Neither Simplify
nor FullSimplify
applied to the series will factorize the result.
P.P.S. The SeriesData
works correctly with fractional powers.
P.P.P.S. I received a confirmation from Wolfram that this is a bug:
"Hello Sergei, Thank you for contacting Wolfram Technical Support. I understand that SeriesData automatically expands brackets in the series coefficients if logarithms are present. I have passed it to the relevant people in our development team so this can be considered for future versions of Mathematica. We are always interested in improving Wolfram products, and I want to thank you once again for bringing this issue to our attention. If you run into any other problems with any of our products, please do not hesitate to contact us.
Regards, Wolfram Technical Support
Wolfram Research Inc. https://support.wolfram.com"
SeriesData
formats, see the second bullet point in the Details section of the SeriesData doc page. Try runningInputForm[%]
after evaluating yourSeriesData[...]
input. $\endgroup$l^2 ((2 a + b) x + (a + 2 b) y) + 1/2 l^2 Log[z] + O(z^2)
instead of the mess it gives me. Furthermore, imagine that instead of one of the brackets $(a+2b)$ in the input we had something like $(a+2b)^{70}$. The Mathematica will literally expand this huge bracket! $\endgroup$Simplify
norFullSimplify
commands will simplify these expressions $\endgroup$Symbol
to represent it? That's the easy, standard way to handle this thing. You can't always expect to avoid expansion when working with a CAS $\endgroup$