Re: O in Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg95977] Re: O in Mathematica*From*: Sebastian Meznaric <meznaric at gmail.com>*Date*: Sat, 31 Jan 2009 01:14:27 -0500 (EST)*References*: <gls1vl$hl1$1@smc.vnet.net>

On Jan 29, 10:55 am, Francois Fayard <fayard.p... at gmail.com> 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?