Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

why sagemath can integrate a string?

I am surprised this works. Sagemath 8.9

sage: var('x')
x
sage: integrate("x",x)
1/2*x^2

sage: type("x")
<type 'str'>

Why does sagemath accept string for the integrand? Should not this be type error? Maple:

restart
int("x",x)
Error, (in int) wrong number (or type) of arguments: wrong type of integrand passed to indefinite integration.