Professional Documents
Culture Documents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%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)')
%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:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%