definite double integration-dblquad-int
Mostra commenti meno recenti
Dear all,
I have a long equation that I would like to have its definite double integration.
Let’s suppose this integration:
(2*sin(x)+cos(x))^2
Please pay attention that I did not expand the equation and I did not use “ .^ ” in it.
Since symbols are expensive I prefer not to use symbols like this:
syms x y;
integrand = @(x,y) (2*sin(x)+cos(x))^2;
doubleintegration=double(int(int(integrand(x,y),0,pi),0,2*pi))
Also, if I want to use “dblquad” it does not expand the equation. I should expand it then use following equation
doubleintegration= dblquad(@(x,y) (cos(x).^2 + 4.*cos(x).*sin(x) + 4.*sin(x).^2) ,0, pi, 0, 2*pi)
Is there any way that I do not use symbols (not expensive computation) in normal integration or not expand my long equation and then use “dblquad”?
Any idea is appreciated. Thanks in advance
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Common Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!