1 | initial version |
Are you thinking of something like this?
def fracintegral(func,xsub,n,a=0):
t = var('t')
assume(x>a)
assume(t>a)
return integrate((x-t)^(n-1)*func.subs({xsub:t}),t,a,x)
which gives a deprecation-free
sage: var("x y")
(x, y)
sage: f1 = function("f", x)
sage: fracintegral(f1, x, 4)
-integrate((t - x)^3*f(t), t, 0, x)
sage: f2 = function("f", x, y)
sage: fracintegral(f2, y, 4)
-integrate((t - x)^3*f(x, t), t, 0, x)
2 | No.2 Revision |
Are you thinking of something like this?
def fracintegral(func,xsub,n,a=0):
t = var('t')
assume(x>a)
assume(t>a)
return integrate((x-t)^(n-1)*func.subs({xsub:t}),t,a,x)
which gives a deprecation-free
sage: var("x y")
(x, y)
sage: f1 = function("f", x)
sage: fracintegral(f1, x, 4)
-integrate((t - x)^3*f(t), t, 0, x)
sage: f2 = function("f", x, y)
sage: fracintegral(f2, y, 4)
-integrate((t - x)^3*f(x, t), t, 0, x)
sage: f3(x,y) = x^2+sin(y)
sage: fracintegral(f3, y, 4)
(x, y) |--> 1/4*x^6 + x^3 - 6*x + 6*sin(x)