# Problem with series expansion and integrate

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

• Hi, welcome to Mathematica.SE, please consider taking the tour so you learn the basics of the site. Once you gain enough reputation by making good questions you will be able to vote up and down both questions and answers. When you see good ones, please vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. As you receive help, try to give it too, by answering questions in your area of expertise. – rhermans Oct 23 '14 at 8:26
• The integration does not even do anything. Why even worry about what Series does? What is Series supposed to be when given an un-evaluated integral anyway? Is this even defined somewhere? Series work on functions. – Nasser Oct 23 '14 at 8:37
• Strange, it works if you force Distributivity 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 in Series[Sum[Subscript[c, i] a^i, {i, 0, 3}], {a, 0, 2}] . Or am I thinking this wrong? Bug? – rhermans Oct 23 '14 at 8:56
• @rhermans I only studies Series expansion for functions at school. Teacher never mentioned series expansion for integrals. So I do not know. You could be right. I'll ask the teacher tomorrow when I go to school. – Nasser Oct 23 '14 at 9:41
• @KDH, It seems that no one answers, the link explains what to do. – rhermans Oct 24 '14 at 9:26