matlab计算二重积分
http://hi.baidu.com/princeofdan/album 展开
syms x y;
f_1=0.2*exp(-0.5*((x-16)^2)+((y-10)^2)/0.64-((x-16)*(y-10))/2);
xup=y/4+sqrt(6-1.5*y^2);
xlow=y/4-sqrt(6-1.5*y^2);
fs1=int(f_1,'x',xlow,xup);
fs2=int(fs1,'y',-2,2);
fs2 =
int((exp(-(135*y)/4)*exp(675/4)*exp((27*y^2)/16)*(erf((21*2^(1/2))/2 - (3*2^(1/2)*y)/8 + (12 - 3*y^2)^(1/2)/2) + erf((3*2^(1/2)*y)/8 - (21*2^(1/2))/2 + (12 - 3*y^2)^(1/2)/2))*(2*pi)^(1/2))/10, y, -2, 2)
syms x y;
f1=x*y;
f2=int(f1,'y',1,x);
f3=int(f2,'x',1,2);
扩展资料:
运用的符号积分命令int用法:
int(fun):求函数fun的不定积分;
int(fun,var):求函数fun关于变量var的不定积分;
int(fun, var, a,b,):求函数fun的在[a,b]间的定积分或广义积分;
示例
>> clear;syms x y z;
>> int(sin(x*y+z),z)
ans = -cos(x*y+z)
参考资料来源:百度百科—INT函数
a=int(int(x^y,x,0,1),y,1,2) %积分
b=simple(a) %化简
c=vpa(b,4) %得到4位近似解,也可以任意N位解
int(int(((wa-x).^2+(6-y).^2+36).^-1.5,x,-30,30),y,-40,40)
warning: explicit integral could not be found.
warning: explicit integral could not be found.
ans =
int(int(1/((y - 6)^2 + (wa - x)^2 + 36)^(3/2), x = -30..30), y = -40..40)
mathematics可以算出结果
syms
x
y;
%定义两个符号变量
a=int(int(x^y,x,0,1),y,1,2)
%积分x,0,1
,y,1,2
b=simple(a)
%化简
c=vpa(b,4)
%得到4位近似解,也可以任意N位解
数值计算
%%二重积分f=
@(x,y)exp(sin(x))*ln(y),y从5*x积分到x^2,x从10积分到20
1
(7.X后版本才有此函数quad2d)
y1=quad2d(@(x,y)
exp(sin(x)).*log(y),10,20,@(x)5*x,@(x)x.^2)
2
y2
=quadl(@(x)
arrayfun(@(x)
quadl(@(y)exp(sin(x)).*log(y),5*x,x.^2),x),10,20)
3
y3
=
dblquad(@(x,y)exp(sin(x)).*log(y).*(y>=5*x
&
y<=x.^2),10,20,50,400)