Numerical integration of double integral with two variables
7 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am trying to numerically integrate the following double integral in MATLAB:

where Im is the imaginary part of expression, i is the imaginary number, x and y are variables while a, b, and c are constants.
Here is my attempt to solve this.
a = 3;
b = 4;
c = 5;
innerintegral = @(x) integral(@(y) (1i.*x.*y)./(y.^a-1i.*x),0,6);
outerintegral = integral(@(x) imag(exp(-1i.*x.*c+b.*innerintegral(x))),0,inf, 'ArrayValued', 1);
Is this the correct way of applying numerical integration with more than one variable? Also I am getting a warning when I run this expression which reads as "Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on error is 6.7e+00. The integral may not exist, or it may be difficult to approximate numerically to the requested accuracy."
Can anyone please validate if the above implementation is a correct way of implementing the expressions state above.
0 件のコメント
回答 (1 件)
David Hill
2020 年 9 月 2 日
編集済み: David Hill
2020 年 9 月 2 日
a = 3;
b = 4;
c = 5;
syms x y;
fun = @(x,y)(1i.*x.*y)./(y.^a-1i.*x);
I=vpaintegral(@(x)imag(exp(-1i.*x.*c+b.*vpaintegral(fun,y,0,6))),x,0,inf);
I get:
I= -0.0125514
3 件のコメント
David Hill
2020 年 9 月 3 日
Runs fine with the following a,b,c constants. Not sure why the other constants are causing problems.
a = 3;
b = 4;
c = 5;
syms x y;
fun = @(x,y)(1i.*x.*y)./(y.^a-1i.*x);
I=vpaintegral(@(x)imag(exp(-1i.*x.*c+b.*vpaintegral(fun,y,0,6))./x),x,0,inf);
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!