You are on page 1of 1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Matlab Exercises

syms x y

%2. Part a:

y=sym('x*cos(x)')
V2a = 2.*pi.*int(y, 0, pi./2); %Using Cylindrical Shells Method

%Part b:

z=sym('((pi/2)-x)*cos(x)')

V2b = 2*pi*int(z,0,pi/2); %Using Cylindrical Shells Method

%3. Part a:

a=sym('x')
b=sym('sqrt(1-y^2)')
c=sym('sqrt(1-y^2)')
d=int(a/a,-b,c)
e=sym('3*y')
f=int(d*e,'y',0,1)

%3. Part b:

X = -1:0.01:1;
Y1 = sqrt(1-X.^2);
plot (X, Y1);
grid on %Plot of the Inregration Area

%3. Part c:

V3c1= int(w, 'y', 0, sqrt(1-x.^2));

V3c2 = int ( V3c2, -1, 1); %New Double Integration

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

You might also like