# 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)((z*q^2)/r-(z*q^2)/r*exp(-s(r-R)))*r^2*exp(-2*r/a))

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

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

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

print(f.integrate(r))

```

Here is the Mathematica code.

Could you rewrite your f by putting * where multiplication is needed? (z*q instead of zq, etc.)

Following @tolga hint, can you confirm that

`f`

is $$-\frac{4 \, {\left(\frac{q^{2} z e^{\left({\left(R - r\right)} s\right)}}{r} - \frac{q^{2} z}{r}\right)} r^{2} e^{\left(-\frac{2 \, r}{a}\right)}}{a^{3}}$$ , as suggested by your typing ?