1
$\begingroup$

What is wrong here?

fExp = f0 + f1 Sqrt[s] + f2 s + O[s]^(3/2);
{s fExp + O[s]^(3/2),s f + O[s]^(3/2)/.f->fExp}

Returns

{SeriesData[s, 0, {f0}, 2, 3, 2], SeriesData[s, 0, {}, 3, 3, 2]}

or f0 s+O(s^(3/2)) and O(s^(3/2))} in a traditional form. The latter result is incorrect.

$\endgroup$
7
  • 2
    $\begingroup$ In version 12.1 the second result is SeriesData[s, 0, {f0, f1}, 2, 4, 2]. $\endgroup$ – Daniel Lichtblau Sep 15 '20 at 0:15
  • $\begingroup$ @DanielLichtblau your result is better but still not the answer I would expect. I'm on version 11.0 currently. So this could be a bug in that older version? $\endgroup$ – Weather Report Sep 15 '20 at 7:17
  • $\begingroup$ (1) 11.0 shows the empty series. 11.1 has three terms, and that persists until version 12.1. $\endgroup$ – Daniel Lichtblau Sep 15 '20 at 14:34
  • $\begingroup$ (2) Placing a SeriesData inside another that has the same variable is a recipe for trouble. Internal operations to unwind this may raise an order term to the nearest larger integer, for example. $\endgroup$ – Daniel Lichtblau Sep 15 '20 at 14:36
  • 1
    $\begingroup$ I do not recommend composing by substituting a SeriesData object into a coefficient of a different SeriesData object. ComposeSeries might be more along the lines of what you need, maybe. $\endgroup$ – Daniel Lichtblau Sep 15 '20 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.