# Integral of exp(-x)*P(x)/Q(x) in terms of exponential integral in symbolic tooblox

1 view (last 30 days)
Saeid on 3 Feb 2021
Commented: Saeid on 14 Feb 2021
I am trying to find an analytical soltuion to the integral
I= int(exp(-x)*P(x)/Q(x),x,0,inf)
where P and Q are both polynnomials and P/Q is bounded at infinity. An example is:
syms a x
int(x*exp(-a*x)/(x^2+1),x,[0 inf])
This gives:
piecewise(angle(a) in Dom::Interval([-pi/2], [pi/2]) & a ~= 0, (2*meijerG([-1/2, 0, 0], [], 0, [], 4/a^2))/(a^2*pi^(1/2)), ~angle(a) in Dom::Interval([-pi/2], [pi/2]) | a == 0, int((x*exp(-x*a))/(x^2 + 1), x, 0, Inf))
This is just one example but am I doing something wrong here or is the Symbolic Toolbox limited in this respect?
darova on 4 Feb 2021
Maybe analytical solution doesn't exist

Paul on 14 Feb 2021
What is the concern with the result that was returned? It looks like the SMT came back with the best answer it could with the information it was given. The form of the result would be a bit simpler by putting assumptions on 'a' if sensible to do so:
>> syms a positive
>> int(x*exp(-a*x)/(x^2+1),x,[0 inf])
ans =
(2*meijerG(1, [], [1, 1, 3/2], [], a^2/4))/(a^2*pi^(1/2))
But until a value is assigned to 'a' what shold the expected result be? Of course, the integral can be evaluated at a value of interest:
>> f(a)=int(x*exp(-a*x)/(x^2+1),x,[0 inf])
f(a) =
(2*meijerG(1, [], [1, 1, 3/2], [], a^2/4))/(a^2*pi^(1/2))
>> vpa(f(5))
ans =
0.033896
Saeid on 14 Feb 2021
Hi Paul, thanks for the comment. I might have overseen the interval of a, and it looks like your suggestion (with a positive, which in fact IS the case in the real problem) will work out for me.