Ask Your Question
0

The method lim() does not return a simple integer

asked 2023-11-28 23:33:03 +0100

PatB gravatar image

updated 2023-11-29 04:06:49 +0100

Hi,

I have two cases where I would expect the answer to be a simple integer when I take the limit using lim(..)

lim(i/(i+1),i=infinity)

This answer should be 1. Instead I get: 1/2*I + 1/2

lim(1/((2i+3)(2*i+2)),i=+oo)

Similarly, the answer should be 0

Instead I get this form:

-5/52*I + 1/52

Question: Am I using the right method, od do I need to add more constraints ?

thanks Pat

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-11-29 00:26:14 +0100

updated 2023-11-29 06:15:41 +0100

i is predefined in Sage to be the square root of $-1$, so it doesn't really make sense to take a limit as it varies. If you instead do either

lim(x/(x+1),x=infinity)

or

var('i')  # make "i" a variable
lim(i/(i+1),i=infinity)

then you'll get the answer you expect.

edit flag offensive delete link more

Comments

Thanks very much John - good catch!

PatB gravatar imagePatB ( 2023-11-30 05:58:52 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-11-28 23:33:03 +0100

Seen: 108 times

Last updated: Nov 30 '23