MathGroup Archive 2009

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

Search the Archive

Re: O in Mathematica

On Jan 29, 10:55 am, Francois Fayard <fayard.p... at> wrote:
> Hello,
> At first, thanks for your help, but I've found what I was asking for.
> To input a O(1) in mathematica, you juste have to write
> n O[n,Infinity]
> which gives you O[1/n]^0 which is not simplified to 0.
> Now, I've got another question around O. Let's first explain what I
> call a O, or big O (in France). A O(f(x)) around zero is a function
> that can be written B(x)f(x) where B(x) is bounded around 0. I just
> want to make sure everyone speaks about the same thing.
> With that definition x = O(x) (around 0), but x Log[x] is not a O(x)
> (around 0) as x Log[x]/x=Log[x] is not bounded around 0. But when I
> write in Mathematica
> Log[x] O[x,0]^1
> It is simplified to O[x,0]^1 which is obviously wrong. I've seen that
> if you multiply O[x,0]^1 by a fonction g(x) that is negligeable
> compared to x^epislon around 0 for a epsilon>0, the result is
> simplified to O[x,0]^1 which is wrong form a mathematical point of view.
> Do I have to understand that O[x,0]^n (in Mathematica) should be
> considered as a O[x,0]^(n-epsilon)  (in mathematics) for whatever
> epsilon>0 you want ? If we consider this definition, are the results
> from Mathematica "certified" ?
> Another question should be : Why does Mathematica behave like that ?
> Thanks,
> Francois Fayard

As you mention, this simply seems to be wrong. There is another
strange thing about the O function. If you do n O[n,Infinity]  it
returns O[1/n]^0. Now if you type O[1/n]^0 into Mathematica yourself
it returns an error saying SeriesData::sdatv: First argument 1/n is
not a valid variable. But if you copy the output of n O[n,Infinity]
(which is identical to what I typed in myself) it does not return the
error. Does  anyone have an explanation for this kind of behaviour?

  • Prev by Date: Re: integration
  • Next by Date: Re: Can I Map[] this code?
  • Previous by thread: Re: Re: O in Mathematica
  • Next by thread: Re: moment generating function for gaussian and lognormal