Integrate a function f(x) dx between limits a and +∞,
\newcommand{\Bold}[1]{\mathbf{#1}}\left( x, a, b \right) \ {\mapsto} \ \frac{{\left(a^{2} \beta^{2} + 2 \, a \beta + 2\right)} e^{\left(-a \beta + \alpha \beta\right)}}{\beta^{3}}
\newcommand{\Bold}[1]{\mathbf{#1}}\left( x, a, b \right) \ {\mapsto} \ \frac{{\left(a^{2} \beta^{2} + 2 \, a \beta + 2\right)} e^{\left(-a \beta + \alpha \beta\right)}}{\beta^{3}}
|
Integrate the function f(x) dx between two arbituary limits a and b and then set the upper limit to ∞,
Traceback (click to the left of this block for traceback) ... RuntimeError: indeterminate expression: 0*infinity encountered. Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_10.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("RihhLCBiKSA9IGludGVncmF0ZSggZiwgKHgsIGEsIGIpKQpGKGEsIG9vKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpaNo6yr/___code___.py", line 3, in <module>
exec compile(u'F(a, oo)
File "", line 1, in <module>
File "expression.pyx", line 3653, in sage.symbolic.expression.Expression.__call__ (sage/symbolic/expression.cpp:16197)
File "/sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/sage/symbolic/callable.py", line 478, in _call_element_
return SR(_the_element.substitute(**d))
File "expression.pyx", line 3504, in sage.symbolic.expression.Expression.substitute (sage/symbolic/expression.cpp:15561)
RuntimeError: indeterminate expression: 0*infinity encountered.
|
The correct answer can be found by taking the limit of the the function F(a,b),
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{{\left(a^{2} \beta^{2} + 2 \, a \beta + 2\right)} e^{\left(-a \beta + \alpha \beta\right)}}{\beta^{3}}
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{{\left(a^{2} \beta^{2} + 2 \, a \beta + 2\right)} e^{\left(-a \beta + \alpha \beta\right)}}{\beta^{3}}
|
Do you think that default behavior should be try/catch the error involving the infinity and attempt to take the limit?
|
|