6
$\begingroup$

Run this:

ClearAll["Global`*"];
b[x_] := (a + e)^c[x];
v1 = Normal[Series[Integrate[b[x], x], {e, 0, 1}]]
v2 = Integrate[Normal[Series[b[x], {e, 0, 1}]], x]

to get this:

enter image description here

The first one is clearly wrong but the second one seems correct.

What am I missing or this is a bug in Mathematica?

I would not ask here but I need to perform some complicated transformations of integrals and this seems killing what I need to do. I am running 11.1.0.0 version of Mathematica. Does this work correctly in the most recent version?

$\endgroup$
4
  • $\begingroup$ I can't follow what you are trying to do. For a start, what would you expect the Integrate[b[x], x] expression to return? $\endgroup$
    – MarcoB
    Jan 20 at 3:02
  • 1
    $\begingroup$ Obviously, I expect Integrate[b[x], x] to return, well, Integrate[b[x], x]. The transformations above are "trivial" for a human. Mathematica seems to fail in a Taylor expansion there. $\endgroup$ Jan 20 at 3:23
  • $\begingroup$ I think you should report this case to Wolfram $\endgroup$ Jan 20 at 12:21
  • $\begingroup$ @AlexeiBoulbitch I did. See my comment below in the accepted answer. $\endgroup$ Jan 20 at 12:42

1 Answer 1

7
$\begingroup$

I get the same in V13. It looks like a bug to me. However, if I request order 11, I get order 1:

ClearAll[a, b, c, e, x];
b[x_] := (a + e)^c[x];
v1 = Normal[Series[Integrate[b[x], x], {e, 0, 11}]]
v2 = Integrate[Normal[Series[b[x], {e, 0, 1}]], x]

I do not understand why.

$\endgroup$
3
  • 3
    $\begingroup$ Yeah, it does look like a bug. Apparently 11 is a new 1 when doing a Taylor expansion over Integrate. Anything less than 11 results in not doing any Taylor expansion at all. 11 result in the first term, 12 in two terms and so on. Using 11 is a very unobvious workaround. I filed this as a bug with Wolfram. $\endgroup$ Jan 20 at 11:42
  • $\begingroup$ @KonstantinKonstantinov Unsurprisingly, Asymptotic[Integrate[b[x], x], {e, 0, 1}] and Asymptotic[Integrate[b[x], x], {e, 0, 11}] behave like Series. $\endgroup$
    – Michael E2
    Jan 21 at 17:13
  • $\begingroup$ That's even more weird. Anyway, I went ahead with writing my own versions of integrate, derivative (instead of D), simplify and series. I need to do a mix of Taylor and variational calculus expansion at the same time and there seems to be nothing in Mathematica that can handle that nicely (not to mention the bug with Integrate). $\endgroup$ Jan 21 at 20:43

Your Answer

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

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