No plot in double integral
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi! I try to solve the double integral, but there is an empty plot. Could you please tell me, what is wrong? In MathCad this integral is solved well.
n=1;
t=1;
r=1;
s=0:0.1:5;
fun = @(x,z,k) (x.*exp(2*n*t.*x.^2)./sqrt(1-x.^2)).*(exp(-2*t.*z.^2).*besselj(0,z.*k.*x).*(1+(sqrt(-pi)./(z*r)).*(1+((z*r).^2)/2).*(erfi(z*r/2)).*(exp(-((z*r).^2)/4))));
f3 = arrayfun(@(k)integral2(@(x,z)fun(x,z,k),0,Inf,0,1),s)
Cor = ((-2*r*sqrt(2*n*t)*exp(-2*n*t))/(pi*erf(sqrt(2*n*t))*(atan(r/(2*sqrt(2*t)))-sqrt(2*t)/(2*r*(1/4+2*t/(r^2))))))*f3;
plot(s,Cor,'g-');
6 Commenti
Walter Roberson
il 29 Gen 2023
I did not notice that. I wonder what it would look like if you used sqrt(pi) instead?
n=1;
t=1;
r=1;
syms x z k s real
Pi = sym(pi);
fun = (x.*exp(2*n*t.*x.^2)./sqrt(1-x.^2)).*(exp(-2*t.*z.^2).*besselj(0,z.*k.*x).*(1+(sqrt(Pi)./(z*r)).*(1+((z*r).^2)/2).*(erfi(z*r/2)).*(exp(-((z*r).^2)/4))));
f3 = subs(int(int(fun,x,0,inf), z, 0, 1), k, s)
fun_zhalf = limit(subs(fun, k, 1), z, 1/2)
xlimited = limit(fun_zhalf, x, 1)
case_to_plot = children(children(xlimited, 3),1)
fplot(case_to_plot, [0 2])
xlimited = limit(fun_zhalf, x, 2)
vpa(xlimited)
You get rid of the real-valued portion of the function (at least at some values), but the complex portion remains.
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!













