# convert to integral format; # toint(a_*b_):= If(not(isfunction(a)), a*toint(b), If(not(isfunction(b)), b*toint(a) )); # toint(a_+b_):=If(isfree(a,x), a+toint(b), toint(a)+toint(b)); # toint(a_-b_):=If(isfree(a,x), a-toint(b), toint(a)-toint(b)); # toint(-b_):= -toint(b); toint(d(f_,x_,n_)):= 1/gamma(ceil(n)-n)*integrates(replace(d(f,x,ceil(n)),x,z)*(x-z)^(ceil(n)-n-1),z,0,x); toint(ds(f_,x_,n_)):= 1/gamma(ceil(n)-n)*integrates(replace(d(f,x,ceil(n)),x,z)*(x-z)^(ceil(n)-n-1),z,0,x); toint(E(a_,x_)) := 1/(2pi*i)*oint(t^(a-1)*exp(t)/(t^a-x)); toint(E(a_,b_,x_)) := 1/(2pi*i)*oint(t^(a-b)*exp(t)/(t^a-x)); toint(Ei(x_)) := integrates(exp(t)/t,t,-inf,x); toint(En(n_,x_)) := integrates(exp(-t)/t^n,t,x,inf)*x^(n-1); toint(erfi(x_)) := 2/sqrt(pi)*integrates(e^(t^2),t,0,x); toint(erf(x_)) := 2/sqrt(pi)*integrates(e^(-t^2),t,0,x); toint(erf(n_,x_)) := n!/sqrt(pi)*integrates(e^(-t^n),t,0,x); toint(x_!) := infints(t^x*e^(-t),t); toint(gamma(x_)) := infints(t^(x-1)*e^(-t),t); toint(Gamma(n_,x_)) := integrates(t^(n-1)*e^(-t),t,x,inf); toint(eta(x_)) := 1/gamma(x)*infints(t^(x-1)/(e^(t)+1),t); toint(eta(x_,c_)) := 1/gamma(x)*infints(e^((1-c)*y)*y^(x-1)/(e^(y)+1),y); toint(zeta(x_)) := 1/gamma(x)*infints(t^(x-1)/(e^(t)-1),t); toint(zeta(x_,c_)) := 1/gamma(x)*infints(e^((1-c)*y)*y^(x-1)/(e^(y)-1),y); toint(psi(n_,x_)) := -(-1)^n*infints(e^((1-x)*y)*y^n/(e^(y)-1),y); toint(psi(x_)) := -infints(e^((1-x)*y)/(e^(y)-1),y); toint(polylog(a_,x_)) := x/gamma(a)*infints(t^(a-1)/(e^t-x),t); toint(polylog(a_)) := 1/gamma(a)*infints(t^(a-1)/(e^t-1),t); toint(L(x_,s_,a_)):= infints(y^(s-1)*exp((1-a)*y)/(exp(y)-x),y)/gamma(s); toint(beta(x_)) := infints(t^(x-1)/(e^(-t)+e^t),t)/Gamma(x); toint(Beta(a_,b_)) := infints(t^(a-1)*(1-t)^(b-1),t); toint(log(x_)):=integrates(1/t,t,1,x); toint(e^x_) := integrates(exp(t),t,-inf,x); toint(exp(x_)) := integrates(exp(t),t,-inf,x); toint(gaussi(x_)):=integrates(gauss(t),t,-inf,x); toint(harmonic(x_)):=integrates((1-t^x)/(1-t),t,0,1);