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

조회 수: 4 (최근 30일)
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?

채택된 답변

Paul
Paul 2021년 2월 14일
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
Saeid
Saeid 2021년 2월 14일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by