Integral of exp(-x)*P(x)/Q(x) in terms of exponential integral in symbolic tooblox
조회 수: 5 (최근 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
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Assumptions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!