Re: Bug in Limit

• To: mathgroup at smc.vnet.net
• Subject: [mg96468] Re: [mg96426] Bug in Limit
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Sat, 14 Feb 2009 03:09:27 -0500 (EST)

```You can confuse it into giving the right answer but the behavior is inconsistent.

expr1 = ((-1)^n*n)/((-1)^n*n + 1);

expr2 = expr1 // Apart

1 - 1/((-1)^n*n + 1)

expr3 = (Cos[n*Pi]*n)/(Cos[n*Pi]*n + 1);

Simplify[expr1 == expr3, Element[n, Integers]]

True

expr4 = expr3 // Apart

1 - 1/(n*Cos[Pi*n] + 1)

Limit[#, n -> Infinity] & /@ {expr1, expr2, expr3, expr4}

{0,0,1,1}

Limit[#, n -> Infinity] & /@ expr2

1

Limit[#, n -> Infinity] & /@ expr4

Limit[-(1/(n*Cos[Pi*n] + 1)),
n -> Infinity] + 1

(1 + Limit[# - 1, n -> Infinity]) & /@ {expr1, expr2, expr3, expr4}

{1, 1, Limit[(n*Cos[Pi*n])/
(n*Cos[Pi*n] + 1) - 1,
n -> Infinity] + 1,
Limit[-(1/(n*Cos[Pi*n] + 1)),
n -> Infinity] + 1}

Bob Hanlon

---- azzteke <klaus.giesselmann at web.de> wrote:

=============
In both V6 and V7 Limit[((-1)^n*n)/((-1)^n*n + 1), n -> Infinity]
Any idea?

Thanks
Klaus

```

• Prev by Date: Dynamic Module
• Next by Date: Re: What's up with missing contour labels in Mathematica 7.0.0 (OS X/Intel)?
• Previous by thread: Re: Bug in Limit
• Next by thread: Laplace Transform Exponential Shift