|
From: Barton W. <wi...@un...> - 2025-10-18 22:05:34
|
Hi Shivamma,
Did you have a question about your calculation? Maybe you would like to write a function that does what you have shown for one example? If so, I think that should be possible.
Two things you might like to know: First Maxima sometimes returns ind (bounded & indefinite) or und (undefined) for a limit; here are examples:
(%i2) limit(sin(x),x,inf);
(%o2) ind
(%i3) limit(x*sin(x),x,inf);
(%o3) und
Maybe you can find more information in the manual.
Second, Maxima's limit function doesn't have support for telling limit that the limit variable is an integer--it assumes the limit variable is continuous even when it is declared integer. That gives undesirable results such as
(%i13) declare(n,integer)$
(%i14) limit(sin(n*%pi+1/n),n,inf);
(%o14) ind
But notice that
(%i15) limit(sin(n*%pi),n,inf);
(%o15) 0
Appears to understand that n is an integer, but actually, Maxima simplifies sin(n * %pi) to zero before limit is called limit.
If limit understood that the limit varible was an integer, the limit would be zero. But to Maxima, the limit is of the function n ∈ Reals -> sin(n * %pi + 1/n) even when n is declared an integer.
Please let us know if you all have questions.
--Barton
________________________________
From: SHIVAMMA K <shi...@gm...>
Sent: Tuesday, October 14, 2025 11:26 AM
To: max...@li... <max...@li...>
Subject: [Maxima-discuss] Maths
Caution: Non-NU Email
kill(all)$
expression: (log(n+1)-log(n))/sin(1/n);
variable: n$
print("The given sequence is: ", expression)$
sequence: limit(expression, variable, inf)$
print("Limit of the sequence as n tends to infinity is: ", sequence)$
if abs(sequence) = inf then
print("By the definition, the sequence is divergent")
else if abs(sequence) # inf then
print("By the definition, the sequence is convergent")
else
print("By the definition, the sequence is oscillatory")$
|