Integral inside integral is taking too much time
Ältere Kommentare anzeigen
Hi,
I am trying to evaluate integral inside integral using the following script but it is taking too much time, is there anyway I can reduce the time of evaluation:
f =@(x,y) x+y; % "x+y is just a simple example, the actual function is way more complicated"
integral(@(y) exp(-integral(@(x) f(x,y),a,b,'RelTol',1e-8,'AbsTol',1e-13),aa,bb,'RelTol',1e-8,'AbsTol',1e-13,'ArrayValued',true)
5 Kommentare
Waseem Akhtar
am 20 Jul. 2021
Torsten
am 20 Jul. 2021
Bearbeitet: Walter Roberson
am 20 Jul. 2021
syms x y a b aa bb
f = x + y;
Fx = int(f,x,a,b);
Fxy = int(exp(-Fx),y,aa,bb)
integrates your function from above symbolically.
Walter Roberson
am 20 Jul. 2021
Sometimes it helps to reverse the order of integration.
Waseem Akhtar
am 23 Jul. 2021
Bearbeitet: Waseem Akhtar
am 23 Jul. 2021
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


