Numerical integration of double integral with two variables
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
David Hill
am 2 Sep. 2020
Bearbeitet: David Hill
am 2 Sep. 2020
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 Kommentare
David Hill
am 3 Sep. 2020
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);
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
