# 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)*integral(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)*integral(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*integral((x-z)^(n-1)*y,z,a,x); toint(ints(y_,z_,n_)):=n*integral((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_)) := integral(exp(t)/t,t,-inf,x); toint(En(n_,x_)) := integral(exp(-t)/t^n,t,x,inf)*x^(n-1); toint(erfi(x_)) := 2/sqrt(pi)*integral(exp(t^2),t,0,x); toint(erf(x_)) := 2/sqrt(pi)*integral(exp(-t^2),t,0,x); toint(erf(n_,x_)) := n!/sqrt(pi)*integral(exp(-t^n),t,0,x); toint(x_!) := integral(t^x*exp(-t),t,0,oo); toint(gamma(x_)) := integral(t^(x-1)*exp(-t),t,0,oo); toint(Gamma(n_,x_)) := integral(t^(n-1)*exp(-t),t,x,inf); toint(Gamma(n_,a_,b_)) := integral(x^(n-1)*exp(-x),x,a,b); toint(eta(x_)) := 1/gamma(x)*integral(t^(x-1)/(exp(t)+1),t,0,oo); toint(eta(x_,c_)) := 1/gamma(x)*integral(exp((1-c)*y)*y^(x-1)/(exp(y)+1),y,0,oo); toint(zeta(x_)) := 1/gamma(x)*integral(t^(x-1)/(exp(t)-1),t,0,oo); toint(zeta(x_,c_)) := 1/gamma(x)*integral(exp((1-c)*y)*y^(x-1)/(exp(y)-1),y,0,oo); toint(psi(n_,x_)) := -(-1)^n*integral(exp((1-x)*y)*y^n/(exp(y)-1),y,0,oo); toint(psi(x_)) := -integral(exp((1-x)*y)/(exp(y)-1),y,0,oo); toint(polylog(a_,b_,z_)) := z/gamma(a)*integral(t^(a-1)/(e^t-z),t,b,oo); toint(polylog(a_,z_)) := z/gamma(a)*integral(t^(a-1)/(e^t-z),t,0,oo); toint(polylog(a_)) := 1/gamma(a)*integral(t^(a-1)/(e^t-1),t,0,oo); toint(L(x_,s_,a_)):= integral(y^(s-1)*exp((1-a)*y)/(exp(y)-x),y,0,oo)/Gamma(s); toint(beta(x_)) := integral(t^(x-1)/(exp(-t)+exp(t)),t,0,oo)/Gamma(x); toint(beta(a_,b_)) := integral(t^(a-1)*(1-t)^(b-1),t,0,1); toint(beta(x_,a_,b_)) := integral(t^(a-1)*(1-t)^(b-1),t,0,x); toint(log(x_)):=integral(1/t,t,1,x); #toint(e^x_) := integral(exp(t),t,-inf,x); #toint(exp(x_)) := integral(exp(t),t,-inf,x); toint(gaussi(x_)):=integral(gauss(t),t,-inf,x); toint(harmonic(x_)):=integral((1-t^x)/(1-t),t,0,1);