problem with solving integral
Show older comments
Dear all,
I am trying to solve a symbolic integral via matlab.
But I just got the modifed form of my integral as the answer.
What is the problem?
The integral is getting from a popular paper and should not be any problem in it.
I want to reproduce the results of the paper.
T=10.;
mu=0.;
mustar = 400.;
Lambda = 602.3;
GsLambda2 = 2.319;
Gs = 0.00000639;
m0 = 5.5;
m = 100.;
Gv = 0.5 * Gs;
Gd = 0.75 * Gs;
syms p d
int(p.^2.*(((1.-2.*((exp (( sqrt (( sqrt (p.^2.+m.^2.) - mustar ).^2 + ...
d.^2))/T) +1).^(-1)))/(sqrt (( sqrt (p.^2.+m.^2.) - mustar).^2 + d.^2))) + ...
((1. - 2.*((exp (( sqrt (( sqrt (p.^2 + m.^2) + mustar).^2 + d.^2))/T)...
+ 1).^(-1)))/(sqrt (( sqrt (p.^2+m.^2) + mustar).^2 + d.^2)))), p, 0, 602.3)
ans =
int(-p^2*((2/(exp((((p^2 + 10000)^(1/2) - 400)^2 + d^2)^(1/2)/10) + 1) - 1)/(((p^2 + 10000)^(1/2) - 400)^2 + d^2)^(1/2) + (2/(exp((((p^2 + 10000)^(1/2) + 400)^2 + d^2)^(1/2)/10) + 1) - 1)/(((p^2 + 10000)^(1/2) + 400)^2 + d^2)^(1/2)), p, 0, 6023/10)
I would really appreciate it if some one could help me.
Answers (1)
Star Strider
on 21 Dec 2020
I suspect that the paper did not have an analytical expression for the integral, or you would be evaluating it.
Integrate it numerically instead:
T=10.;
mu=0.;
mustar = 400.;
Lambda = 602.3;
GsLambda2 = 2.319;
Gs = 0.00000639;
m0 = 5.5;
m = 100.;
Gv = 0.5 * Gs;
Gd = 0.75 * Gs;
% syms p d
dfcn = @(d) integral(@(p) p.^2.*(((1.-2.*((exp (( sqrt (( sqrt (p.^2.+m.^2.) - mustar ).^2 + ...
d.^2))/T) +1).^(-1)))./(sqrt (( sqrt (p.^2.+m.^2.) - mustar).^2 + d.^2))) + ...
((1. - 2.*((exp (( sqrt (( sqrt (p.^2 + m.^2) + mustar).^2 + d.^2))/T)...
+ 1).^(-1)))./(sqrt (( sqrt (p.^2+m.^2) + mustar).^2 + d.^2)))), 0, 602.3, 'ArrayValued',1);
d = 0:1000; % Create Values For ‘d’
Result = dfcn(d);
figure
plot(d, Result)
grid
.
5 Comments
Mahboubeh Shahrbaf
on 22 Dec 2020
Star Strider
on 22 Dec 2020
Well, I did not see this in time and Walter posted an Answer using your updated information (not available in your original post), so I will stop here.
My only Answer is the one I already supplied. I would evaluate ‘d’ and then plug it in, however you choose to solve this.
Walter Roberson
on 22 Dec 2020
I did not use updated information; I just converted the floating point numbers to symbolic numbers and then played around to see what I could get. I posted the result temporarily because the new Run facility would not let me copy out a result line from the previous; had to Submit to be able to copy it.
Walter Roberson
on 22 Dec 2020
I would have to look more closely... but the new equations you posted do not look to me to be the same as the code.
With the code that was posted, I think there is no realistic hope of coming up with a symbolic integral in d.
Mahboubeh Shahrbaf
on 22 Dec 2020
Categories
Find more on Common Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!