I have the following very simple code. A power series in a-parameter, function f[x]
, is integrated with respect to x
, and the result is expanded as a power series around a=0
.
The result that "Mathematica" gives is wrong (it gives only the first term ignoring the other terms).
Why?
f[x_] := f0[x] + a f1[x] + a^2 f2[x] + a^3 f3[x]
Integrate[ f[x], x]
Series[%, {a, 0, 2}]
Out[1]= \[Integral](f0[x] + a f1[x] + a^2 f2[x] + a^3 f3[x]) \[DifferentialD]x Out[2]= \[Integral]f0[x] \[DifferentialD]x
Series[Distribute[Integrate[f[x], x]], {a, 0, 2}]
. I disagree with @Nasser, what it should do is well defined, and should be the same as inSeries[Sum[Subscript[c, i] a^i, {i, 0, 3}], {a, 0, 2}]
. Or am I thinking this wrong? Bug? $\endgroup$