Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integrate[Log[a]+...+O[a]^n,x]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76325] Re: Integrate[Log[a]+...+O[a]^n,x]
  • From: dimitris <dimmechan at yahoo.com>
  • Date: Sat, 19 May 2007 04:52:59 -0400 (EDT)
  • References: <f2jvri$dov$1@smc.vnet.net>

I think it is a wierd bug.
Well down for discovering it!

Try something like the following

In[9]:=
(Integrate[Normal[Log[a] + 2*q*a*x^2 + 3*w*a^2*x + O[a]^4 + x], #1]
& ) /@ {x, a}
(Integrate[O[a]^4, #1] & ) /@ {x, a}
Thread[%% + %]
{D[%[[1]], x], D[%[[2]], a]}

Out[9]=
{x^2/2 + (3/2)*a^2*w*x^2 + (2/3)*a*q*x^3 + x*Log[a], -a + a*x +
a^3*w*x + a^2*q*x^2 + a*Log[a]}

Out[10]=
{SeriesData[a, 0, {}, 4, 4, 1], SeriesData[a, 0, {}, 5, 5, 1]}

Out[11]=
{SeriesData[a, 0, {x^2/2 + x*Log[a], (2*q*x^3)/3, (3*w*x^2)/2}, 0, 4,
1], SeriesData[a, 0, {-1 + x + Log[a], q*x^2, w*x}, 1, 5, 1]}

Out[12]=
{SeriesData[a, 0, {x + Log[a], 2*q*x^2, 3*w*x}, 0, 4, 1],
SeriesData[a, 0, {x + Log[a], 2*q*x^2, 3*w*x}, 0, 4, 1]}

Dimitris

 /  Lev Bishop       :
> I just spent some time tracking down a strange problem in my code. I
> wonder if anyone has seen something like this. It seems that
> Integrate[] gets  confused about which variable it is integrating
> over, when you give it a series to integrate:
>
> In[827]:= Integrate[Log[a]+2q a x^2+3w a^2x+O[a]^4+x,x]
> Integrate[Log[a]+2q a x^2+3w a^2x+O[a]^4+x,a]
> Out[827]= (-1+x+Log[a]) a+q x^2 a^2+w x a^3+O[a]^5
> Out[828]= (-1+x+Log[a]) a+q x^2 a^2+w x a^3+O[a]^5
>
> It seems that in both cases Integrate actually used a as the variable,
> even though I asked for x in the first case. I see this with version
> 5.2 and 6.0.
>
> Without the Log[a] term it all works as expected:
> In[829]:= Integrate[2q a x^2+3w a^2x+O[a]^4+x,x]
> Integrate[2q a x^2+3w a^2x+O[a]^4+x,a]
> Out[829]= x^2/2+2/3 q x^3 a+3/2 w x^2 a^2+O[a]^4
> Out[830]= x a+q x^2 a^2+w x a^3+O[a]^5
>
> Or am I misunderstanding the use of O[] in mathematica, or is this a
> bug? After all, the strict mathematical interpretation of O[] as big-O
> notation has that "O(x^4)  is f(x) + O(x^5) as x->inf"
> from which point of view, mathematica is strictly correct there, just
> not giving the tightest bound it could, and throwing some misleading
> terms in as well.
>
> On the other hand, I don't get the idea that the O[n] is supposed to
> be interpreted as mathematical 'big-O' O(n), but rather as the lowest
> order missing term in a truncated Taylor/Laurent/Puiseux/etc series
> expansion.
>
> Lev



  • Prev by Date: Re: A harmless and amusing bug
  • Next by Date: Re: Re: Mouse movement speeds up and CityData
  • Previous by thread: Integrate[Log[a]+...+O[a]^n,x]
  • Next by thread: Palettes install