Numerical double integral with singularities
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Dear MATLAB users,
This is a mathematical question which I could not solve it properly. So I come for your help and any suggestions would be welcomed.
My problem has be simplified to this point that I have to finish the following double integral using numerical methods for given parameter ξ (and
).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/944109/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/944114/image.png)
I tried three functions to finish this integral but I fail to make it. I received many warnings.
Here are my codes. What I want to do is plot the function
vs ξ. The problem is that I don't know how to deal with the singularities of the integrand.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/944119/image.png)
xi = -3:0.1:3;
n = numel(xi);
fvals = zeros(1, n);
for i = 1:n
xi0 = xi(i);
fun = @(x, y) 1./(sqrt(1-x.^2).*sqrt(1-y.^2).*sqrt(1-(xi0-x-y).^2));
fvals(i) = quad2d(fun, -1, +1, -1, +1);
%fvals(i) = integral2(fun, -1, +1, -1, +1);
%fvals(i) = dblquad(fun,-1,+1,-1,+1);
end
figure; plot(xi, fvals, '.-')
Here are the warnings.
...
> In quad2d (line 244)
警告: 已达到函数计算的最大数目(2000)。结果将使全局误差测试失败。
> In quad2d (line 244)
警告: 已达到函数计算的最大数目(2000)。结果将使全局误差测试失败。
> In quad2d (line 244)
警告: 已达到函数计算的最大数目(2000)。结果将使全局误差测试失败。
> In quad2d (line 244)
警告: 已达到函数计算的最大数目(2000)。结果将使全局误差测试失败。
> In quad2d (line 244)
警告: 复数 X 和/或 Y 参数的虚部已忽略
...
And here are the resutls.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/944124/image.png)
Best regards
Qilin.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre 数值积分和微分 en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!