how to calculate the integral int (sin(a*x))^2*exp(-b*x^2)/(x^2)
10 views (last 30 days)
Show older comments
f=(sin(a*x))^2*exp(-b*x^2)/(x^2);
s=int(f,x,0,inf)
a>0,b>0
syms x;
syms a b positive;
f1=(sin(a*x))^2*exp(-b*x^2)/(x^2);
s1=int(f1,x,0,inf);
s2=simple(s1)
I have tried to caltulate with the function "int" but failed. The results were "Warning: Explicit integral could not be found. s2=inf"
Thanks!
8 Comments
Walter Roberson
on 9 Oct 2012
In Maple, it is
simplify( int((sin(a*x))^2*exp(-b*x^2)/(x^2), x=0..infinity), size) assuming positive
I do not have the MATLAB Symbolic toolkit so I do not know if MATLAB can handle this particular integral.
Accepted Answer
Andrei Bobrov
on 9 Oct 2012
Edited: Andrei Bobrov
on 9 Oct 2012
>> fun = @(a,b)quadgk(@(x)sin(a.*x).^2.*exp(-b.*x.^2)./x.^2,0,inf);
>> fun(1,1)
ans =
0.76351
4 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!