ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 20 Jan 2021 02:58:40 +0100Possible inconsistency in symbolic limitshttps://ask.sagemath.org/question/55370/possible-inconsistency-in-symbolic-limits/I was trying to manipulate some symbolic expressions and got an unexpected error.
Here is a minimal example,
u=integrate(x**3/(exp(x)-1),(x,0,oo))
The expression is quite messy, but the result is known. When I try to use any simplification routine, like
u.simplify()
sage displays the error message
RuntimeError: ECL says: Error executing code in Maxima: limit: direction must be either 'plus' or 'minus'; found: _SAGE_VAR_minus
As far I understood, the expression is defining lateral limits by symbolic variables, while maxima handle such limits as strings. If it is the case there is an internal conflict here. Is it the case?cav_rtWed, 20 Jan 2021 02:58:40 +0100https://ask.sagemath.org/question/55370/sage cannot get the simplest form on the limit expression with binomial and exponential operationshttps://ask.sagemath.org/question/25267/sage-cannot-get-the-simplest-form-on-the-limit-expression-with-binomial-and-exponential-operations/considering the flowing code:
————————————————————————
from sage.symbolic.assumptions import GenericDeclaration;
var('lamda,n,k,p');
decl1 = GenericDeclaration(k, 'integer');
decl1.assume();
assume(k>0,k>1,n>k,lamda>0,lamda<n);
ep=binomial(n,k)*p^k*(1-p)^(n-k);
ep=ep.subs_expr(p==lamda/n);
ep=ep.subs_expr(binomial(n,k)==factorial(n)/factorial(k)/factorial(n-k));
ep=limit(ep,n=oo);
ep.simplify_full();
————————————————————————
the result is:
lamda^k*limit((-(lamda - n)/n)^n*factorial(n)/((-lamda + n)^k*factorial(-k + n)), n, +Infinity)/factorial(k)
————————————————————————
it is not the simplest form. In fact , sage will give me the simplest form as below when I paste the result above to sage again.
————————————————————————
lamda^k*e^(-lamda)/factorial(k)
————————————————————————
the question is how can i get the simplest form directly?
Mr.GanChengSun, 14 Dec 2014 12:52:34 +0100https://ask.sagemath.org/question/25267/Why is Sage calling 1 a variable?https://ask.sagemath.org/question/37660/why-is-sage-calling-1-a-variable/Consider
x = var('x')
f = 1/(x-3)
limit(f,x=3,dir='below')
UnboundLocalError: local variable 'l' referenced before assignmentcybervigilanteMon, 22 May 2017 07:24:03 +0200https://ask.sagemath.org/question/37660/Is this a bug or what am I missing, simple limit computationhttps://ask.sagemath.org/question/25970/is-this-a-bug-or-what-am-i-missing-simple-limit-computation/
f=(e^(-x))/(2+ sin(x));
limit(f,x=infinity)
this yields "undefined", but the limits is clearly zero, thus I gather there's a bug or I am missing something basic . All help is appreciated. userXSat, 28 Feb 2015 18:02:17 +0100https://ask.sagemath.org/question/25970/cannot calculate limithttps://ask.sagemath.org/question/25647/cannot-calculate-limit/No answer from Sage-6.4.1 for this limit :
var('n');
u = (1+sqrt(n))^(-n);
limit(u(n=n+1)/u,n=infinity)
Sage 4.7 gives 0 (correct). Why ?marguinFri, 30 Jan 2015 11:20:28 +0100https://ask.sagemath.org/question/25647/Plotting an integral with a variable as a limithttps://ask.sagemath.org/question/8820/plotting-an-integral-with-a-variable-as-a-limit/I want to plot a function with a variable as a limit, e.g. look at \int_0^x f(y) d y, but this seems to throw an error when Sage can't analytically integrate the function.
x,y=var('x y')
f(y)=integrate(x^x,x,1,y)
plot(f,2,10)
Returns
Traceback (click to the left of this block for traceback)
...
ValueError: free variable: x
Can anybody help with this, please? Many thanks.tom12519Wed, 28 Mar 2012 17:52:02 +0200https://ask.sagemath.org/question/8820/Limit computation causes Sage to crashhttps://ask.sagemath.org/question/10182/limit-computation-causes-sage-to-crash/The following code :
f(x)=(x^x-sin(x)^sin(x))/(x^3*log(x))
show(f)
f(x).limit(x=0)
causes Sage to crash [the expected output is 1/6].
My desktop Sage installation gives the following error message :
;;;
;;; Detected access to protected memory, also kwown as 'bus or segmentation fault'.
;;; Jumping to the outermost toplevel prompt
;;;
The online Sage notebook tells me :
;;;
;;; Binding stack overflow.
;;; Jumping to the outermost top
What is wrong ?
Pascal OrtizMon, 03 Jun 2013 06:42:57 +0200https://ask.sagemath.org/question/10182/