COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Bug in Mathematica 8 vs Mathematica 7: SeriesData

• Email
• Follow

```Dear All!

A long time ago I asked about the right way of using SeriesData for
multiple expansions.

For example, if you want a multiple expansion of a metric in general
relativity, it is quite simple to input:
SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]
In Mathematica 7 this line is accepted as is, without any error
messages or problems.

Yet, try this in Mathematica 8. You will get the following error
message:
SeriesData::sdatv: "First argument 1/r is not a valid variable."

Does anyone know what has changed in version 8? Why should such a
simple expression be invalid in version 8 but be OK in version 7? I
find it quite strange.

Would appreciate any help!

Cheerio,

Gideon

```
 0
Reply gidienator (13) 3/1/2011 10:24:00 AM

See related articles to this posting

```On 1 mrt, 11:24, GidiL <gidiena...@gmail.com> wrote:
> Dear All!
>
> A long time ago I asked about the right way of using SeriesData for
> multiple expansions.
>
> For example, if you want a multiple expansion of a metric in general
> relativity, it is quite simple to input:
> SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]
> In Mathematica 7 this line is accepted as is, without any error
> messages or problems.
>
> Yet, try this in Mathematica 8. You will get the following error
> message:
> SeriesData::sdatv: "First argument 1/r is not a valid variable."
>
> Does anyone know what has changed in version 8? Why should such a
> simple expression be invalid in version 8 but be OK in version 7? I
> find it quite strange.
>
> Would appreciate any help!
>
> Cheerio,
>
> Gideon

I'm Getting in mm8:
In[1]:= SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]

-1-2/r-3/r^2+O[1/r]^3

so no problem!

Are you sure you're not using your variable r somewhere else?
Kind regards,
Lou

```
 0
Reply lvveen32 (4) 3/2/2011 9:33:16 AM

```No such error in v8 at this machine:

SeriesData[r,Infinity,{-1,-2,-3},0,3,1]

-1-2/r-3/r^2+O[1/r]^3

\$Version

"8.0 for Mac OS X x86 (64-bit) (November 6, 2010)"

HOWEVER, SeriesData objects are supposed to be generated by Series.
Generating them by hand is undocumented, so on your head be it.

Bobby

On Tue, 01 Mar 2011 04:23:24 -0600, GidiL <gidienator@gmail.com> wrote:

> Dear All!
>
> A long time ago I asked about the right way of using SeriesData for
> multiple expansions.
>
> For example, if you want a multiple expansion of a metric in general
> relativity, it is quite simple to input:
> SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]
> In Mathematica 7 this line is accepted as is, without any error
> messages or problems.
>
> Yet, try this in Mathematica 8. You will get the following error
> message:
> SeriesData::sdatv: "First argument 1/r is not a valid variable."
>
> Does anyone know what has changed in version 8? Why should such a
> simple expression be invalid in version 8 but be OK in version 7? I
> find it quite strange.
>
> Would appreciate any help!
>
> Cheerio,
>
> Gideon
>

--
DrMajorBob@yahoo.com

```
 0
Reply btreat1 (1277) 3/2/2011 9:35:06 AM

```Hello Gideon,

> For example, if you want a multiple expansion of a metric in general
> relativity, it is quite simple to input:
> SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]
> In Mathematica 7 this line is accepted as is, without any error
> messages or problems.
>
> Yet, try this in Mathematica 8. You will get the following error
> message:
> SeriesData::sdatv: "First argument 1/r is not a valid variable."

The line works well for me with Mathematica 8 on a Linux system:

In[2]:= SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]

Out[2]= -1-2/r-3/r^2+O[1/r]^3

Fabian

```
 0

```GidiL wrote:
> Dear All!
>
> A long time ago I asked about the right way of using SeriesData for
> multiple expansions.
>
> For example, if you want a multiple expansion of a metric in general
> relativity, it is quite simple to input:
> SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]
> In Mathematica 7 this line is accepted as is, without any error
> messages or problems.
>
> Yet, try this in Mathematica 8. You will get the following error
> message:
> SeriesData::sdatv: "First argument 1/r is not a valid variable."
>
> Does anyone know what has changed in version 8? Why should such a
> simple expression be invalid in version 8 but be OK in version 7? I
> find it quite strange.
>
> Would appreciate any help!
>
> Cheerio,
>
> Gideon
>

It works fine for me.

In[411]:= SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]

Out[411]= SeriesData[r,
DirectedInfinity[1], {-1, -2, -3}, 0, 3, 1]

But direct input of a XXXData object is generally a bad idea. Especially
as these can change form over releases. Why not just use the Series that
spawns it?

In[420]:= Series[-1/(1 - 1/r)^2, {r, Infinity, 2}]

Out[420]= SeriesData[r,
DirectedInfinity[1], {-1, -2, -3}, 0, 3, 1]

Daniel Lichtblau
Wolfram Research

```
 0

```An infinite number of functions could have spawned that SeriesData object.

But that's one.

Bobby

On Wed, 02 Mar 2011 03:32:19 -0600, Daniel Lichtblau <danl@wolfram.com>
wrote:

> GidiL wrote:
>> Dear All!
>>
>> A long time ago I asked about the right way of using SeriesData for
>> multiple expansions.
>>
>> For example, if you want a multiple expansion of a metric in general
>> relativity, it is quite simple to input:
>> SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]
>> In Mathematica 7 this line is accepted as is, without any error
>> messages or problems.
>>
>> Yet, try this in Mathematica 8. You will get the following error
>> message:
>> SeriesData::sdatv: "First argument 1/r is not a valid variable."
>>
>> Does anyone know what has changed in version 8? Why should such a
>> simple expression be invalid in version 8 but be OK in version 7? I
>> find it quite strange.
>>
>> Would appreciate any help!
>>
>> Cheerio,
>>
>> Gideon
>>
>
> It works fine for me.
>
> In[411]:= SeriesData[r, Infinity, {-1, -2, -3}, 0, 3, 1]
>
> Out[411]= SeriesData[r,
> DirectedInfinity[1], {-1, -2, -3}, 0, 3, 1]
>
> But direct input of a XXXData object is generally a bad idea. Especially
> as these can change form over releases. Why not just use the Series that
> spawns it?
>
> In[420]:= Series[-1/(1 - 1/r)^2, {r, Infinity, 2}]
>
> Out[420]= SeriesData[r,
> DirectedInfinity[1], {-1, -2, -3}, 0, 3, 1]
>
> Daniel Lichtblau
> Wolfram Research
>

--
DrMajorBob@yahoo.com

```
 0
Reply btreat1 (1277) 3/3/2011 10:55:46 AM

5 Replies
37 Views

Similar Articles

12/5/2013 3:05:09 AM
[PageSpeed]