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

2 Ansichten (letzte 30 Tage)
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?

Akzeptierte Antwort

Paul
Paul am 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
  1 Kommentar
Saeid
Saeid am 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by