Ask Your Question

Revision history [back]

Unable to Integrate function

I have a function and am able to integrate it just fine in Mathematica, but get the below error when trying to perform the integral in sagemath.

TypeError: Substitution using function-call syntax and unnamed arguments has been removed. You can use named arguments instead, like EXPR(x=..., y=...)

I will try and comment my Mathematica code and output because I don't have enough karma to post a link.

My sagemath code is below. I tried printing out a few different ways to integrate but never got a way that didn't give a depreciation error.

```

from sage.symbolic.integration.integral import indefinite_integral

a = var('a')

z = var('z')

q = var('q')

r = var('r')

R = var('R')

s = var('s')

f = (4/(a^3)((zq^2)/r-(zq^2)/rexp(-s(r-R)))r^2exp(-2r/a))

print(indefinite_integral(f,r,R,+Infinity))

print(integrate(f,(r,R,+Infinity)))

print(numerical_integral(f, 0, +Infinity))

print(f.integrate(r))

```