Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## #2624 Erroneous limit result

None
closed
Dan Gildea
None
5
2013-09-15
2013-08-25
Travis Cross
No

Greetings,

Given the function:

```(%i1) f(x,n) := x-x*(1-1/x)^n;
1 n
(%o1)                      f(x, n) := x - x (1 - -)
x
x
```

And some assumptions:

```(%i2) declare(n,integer);
(%o2)                                done
(%i3) assume(n>2);
(%o3)                               [n > 2]
```

Maxima calculates the following limits correctly:

```(%i4) limit(f(x,n-1),x,inf);
(%o4)                                n - 1
(%i5) limit(f(x,n+1),x,inf);
(%o5)                                n + 1
```

However, strangely, Maxima gives an incorrect result for:

```(%i6) limit(f(x,n),x,inf);
(%o6)                                 inf
```

We can choose a large value of x as a sanity test:

```(%i7) float(f(2^64,42));
(%o7)                               42.0
```

This was tested on a relatively recent build:

```(%i8) build_info();
(%o8)
Maxima version: "5.30.0"
Maxima build date: "2013-08-07 17:48:50"
Host type: "i686-pc-linux-gnu"
Lisp implementation type: "GNU Common Lisp (GCL)"
Lisp implementation version: "GCL 2.6.7"
```

Thanks!

## Discussion

• Travis Cross
2013-08-25

The first part above should say:

```(%i1) f(x,n) := x-x*(1-1/x)^n;
1 n
(%o1)                      f(x, n) := x - x (1 - -)
x
```

(An extra x ended up in the output above somehow.)

• Dan Gildea
2013-09-15

• status: open --> closed
• assigned_to: Dan Gildea