以上式为例,其中上述是以圆锥面与z=1所围成的闭区域:
1.三维图像:
syms x y z
z = sqrt(x^2+y^2);
ezsurf(z,[-1.5,1.5])
hold on
[x1,y1] = meshgrid(-1.5:0.25:1.5);
z1 = ones(size(x1));
surf(x1,y1,z1)
2.三重积分:
clear all
syms x y z
f = z;
f1 = int(f,z,sqrt(x^2+y^2),1);
f2 = int(f1,x,-sqrt(1-y^2),sqrt(1-y^2));
int(f2,y,-1,1)
结果:
ans =
pi/4