By Claude:
integrate() and risch() accept sums, products, powers, constants, declared integers and strings as the variable of integration, and give noun forms or wrong results for them. diff(), defint() and the quad_* functions reject them as variables:
(%i1) risch(x^2, -x);
(%o1) x^3/3
(%i2) risch(x, sqrt(x));
(%o2) x^(3/2)
(%i3) integrate(%pi^2, %pi);
(%o3) %pi^3/3
(%i4) diff(%pi^2, %pi);
diff: second argument must be a variable; found %pi
With u = -x, the integral of u^2 is u^3/3 = -x^3/3, and with u = sqrt(x) it is x^(3/2)/3. quad_qawf() does not check its variable at all and returns a result for a constant:
(%i5) quad_qawf(exp(-%pi), %pi, 0, 1, cos);
(%o5) [5.399627156113274e-16,3.176109658179733e-14,150,0]
On the other hand, defint(), ldefint() and the quad_* functions reject function calls like f(t), which integrate(), risch() and diff() take as variables:
(%i6) integrate(f(t)^2, f(t));
(%o6) f(t)^3/3
(%i7) integrate(f(t)^2, f(t), 0, 1);
defint: variable of integration must be a simple or subscripted variable.
defint: found f(t)