Professional Documents
Culture Documents
Integrales Triples: Define The Anonymous Function
Integrales Triples: Define The Anonymous Function
E.1.-
@(x,y,z)y.*sin(x)+z.*cos(x)
q = integral3(fun,0,pi,0,1,-1,1)
q =
2.0000
E.2.-
@(x,y,z)x.*cos(y)+x.^2.*cos(z)
xmin = -1;
xmax = 1;
ymin = @(x)-sqrt(1 - x.^2);
ymax = @(x) sqrt(1 - x.^2);
zmin = @(x,y)-sqrt(1 - x.^2 - y.^2);
zmax = @(x,y) sqrt(1 - x.^2 - y.^2);
q = integral3(fun,xmin,xmax,ymin,ymax,zmin,zmax,'Method','tiled')
q =
0.7796
E.3.-
a = 2;
f = @(x,y,z) 10./(x.^2 + y.^2 + z.^2 + a);
format long
q1 = integral3(f,-Inf,0,-100,0,-100,0)
q1 =
2.734244598320928e+03
Evaluate the integral again and specify accuracy to approximately 9 significant digits.
q2 = integral3(f,-Inf,0,-100,0,-100,0,'AbsTol', 0,'RelTol',1e-9)
q2 =
2.734244599944285e+03