Maxima knows that
(%i1) 'diff(expintegral_ci (x),x)=diff(expintegral_ci (x),x);
(%o1) 'diff(expintegral_ci(x),x,1)=cos(x)/x
(%i2) 'diff(expintegral_si (x),x)=diff(expintegral_si (x),x);
(%o2) 'diff(expintegral_si(x),x,1)=sin(x)/x
We need implement to to Maxima that
integrate(sin(x)/x,x)=expintegral_si(x)
integrate(cos(x)/x,x)=expintegral_ci(x)
integrate(sin(x)/x,x,a,b)=expintegral_si(b)-expintegral_si(a)
integrate(cos(x)/x,x,a,b)=expintegral_ci(b)-expintegral_ci(a)
Solving of problem: integrate(sin(x)/x^2,x,1,inf)
(%i3) S:'integrate(sin(x)/x^2,x,1,inf);
(%o3) integrate(sin(x)/x^2,x,1,inf)
We integrate by parts. For integrate by parts I write command "intparts" .
Will this command be included in the next Maxima release?
(%i4) intparts(S,u):=block([f,var,v,a,b],
f:part(S,1),var:part(S,2),v:integrate(f/u,var),
if last(S)#var then
(a:part(S,3),b:part(S,4),
limit(u*v,var,b,minus)-limit(u*v,var,a,plus)
-'integrate(v*diff(u,var),var,a,b))
else u*v-'integrate(v*diff(u,var),var)
)$
(%i5) intparts(S,sin(x));
(%o5) integrate(cos(x)/x,x,1,inf)+sin(1)
(%i6) subst(cos(x)/x='diff(expintegral_ci(x),x),%);
(%o6) integrate('diff(expintegral_ci(x),x,1),x,1,inf)+sin(1)
(%i7) ev(%, integrate);
Principal Value
(%o7) sin(1)-expintegral_ci(1)
(%i8) float(%), numer;
(%o8) 0.50406706190693
Aleksas D