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!