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!