Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

INTEGRALES TRIPLES

E.1.-

Define the anonymous function .

fun = @(x,y,z) y.*sin(x)+z.*cos(x)


fun =

function_handle with value:

@(x,y,z)y.*sin(x)+z.*cos(x)

Integrate over the region , , and .

q = integral3(fun,0,pi,0,1,-1,1)
q =

2.0000
E.2.-

Define the anonymous function .

fun = @(x,y,z) x.*cos(y) + x.^2.*cos(z)


fun =

function_handle with value:

@(x,y,z)x.*cos(y)+x.^2.*cos(z)

Define the limits of integration.

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);

Evaluate the definite integral with the 'tiled' method.

q = integral3(fun,xmin,xmax,ymin,ymax,zmin,zmax,'Method','tiled')
q =

0.7796
E.3.-

Define the anonymous parameterized function .

a = 2;
f = @(x,y,z) 10./(x.^2 + y.^2 + z.^2 + a);

Evaluate the triple integral over the region , , and


.

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

You might also like