Triple Integral
NOTE:
clear
clc
syms x y z
f = matlabFunction(input("Enter the integrand f(x,y,z) : "));
disp('f(x,y,z)
:');
disp(f);
xL=input("Enter
lower limit of x: ");
xU=input("Enter
Upper limit of x: ");
yL=input("Enter
lower limit of y: ");
yU=input("Enter
Upper limit of y: ");
zL=input("Enter
lower limit of z: ");
zU=input("Enter
Upper limit of z: ");
d = integral3(f,xL,xU,yL,yU,zL,zU);
disp("Triple
Integral of f(x,y,z) :");
disp(d);
Write a program to evaluate Triple integral.
$$\int_0^1 \int_0^2 \int_1^2 (xyz^2) dxdydz$$ OUTPUT: Enter the integrand f(x,y,z): f(x,y,z)
: @(x,y,z)x.*y.*z.^2 Enter
lower limit of x: 0 Enter
Upper limit of x: 1 Enter
lower limit of y: 0 Enter
Upper limit of y: 2 Enter
lower limit of z: 1 Enter
Upper limit of z: 2 Triple
Integral of f(x,y,z) : 2.3333
|
OUTPUT: Enter
the integrand f(x,y,z): f(x,y,z)
: @(x,y,z)exp(x+y+z) Enter
lower limit of x: 0 Enter
Upper limit of x: 1 Enter
lower limit of y: 0 Enter
Upper limit of y: @(x) x Enter
lower limit of z: 0 Enter
Upper limit of z: @(x,y) x+y Triple
Integral of f(x,y,z) : 3.6263
|
No comments:
Post a Comment