# 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(ints(y_,z_,n_,a_,x_)):=n*ints((x-z)^(n-1)*y,z,a,x); toint(ints(y_,z_,n_)):=n*ints((x-z)^(n-1)*y,z,0,x); toint(E(a_,x_)) := 1/(2pi*i)*oint(x^(a-1)*exp(x)/(x^a-x)); toint(E(a_,b_,x_)) := 1/(2pi*i)*oint(x^(a-b)*exp(x)/(x^a-x)); toint(Ei(x_)) := integrates(exp(x)/x,x,-inf,x); toint(En(n_,x_)) := integrates(exp(-x)/x^n,x,x,inf)*x^(n-1); toint(erfi(x_)) := 2/sqrt(pi)*integrates(e^(x^2),x,0,x); toint(erf(x_)) := 2/sqrt(pi)*integrates(e^(-x^2),x,0,x); toint(erf(n_,x_)) := n!/sqrt(pi)*integrates(e^(-x^n),x,0,x); toint(x_!) := infints(x^x*e^(-x),x); toint(gamma(x_)) := infints(x^(x-1)*e^(-x),x); toint(Gamma(n_,x_)) := integrates(x^(n-1)*e^(-x),x,x,inf); toint(Gamma(n_,a_,b_)) := integrates(x^(n-1)*e^(-x),x,a,b); toint(eta(x_)) := 1/gamma(x)*infints(x^(x-1)/(e^(x)+1),x); 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(x^(x-1)/(e^(x)-1),x); 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(x^(a-1)/(e^x-x),x); toint(polylog(a_)) := 1/gamma(a)*infints(x^(a-1)/(e^x-1),x); toint(L(x_,s_,a_)):= infints(y^(s-1)*exp((1-a)*y)/(exp(y)-x),y)/gamma(s); toint(beta(x_)) := infints(x^(x-1)/(e^(-x)+e^x),x)/Gamma(x); toint(Beta(a_,b_)) := infints(x^(a-1)*(1-x)^(b-1),x); toint(log(x_)):=integrates(1/x,x,1,x); #toint(e^x_) := integrates(exp(x),x,-inf,x); #toint(exp(x_)) := integrates(exp(x),x,-inf,x); toint(gaussi(x_)):=integrates(gauss(x),x,-inf,x); toint(harmonic(x_)):=integrates((1-x^x)/(1-x),x,0,1);