definite double integration-dblquad-int
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Common Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!