Experiment 2A,2B.pdf - REGISTER NUMBER 20MIS0437 NAME...

This preview shows page 1 - 4 out of 8 pages.

REGISTER NUMBER 20MIS0437 NAME YUVRAJ SAINI NAME : YUVRAJ SAINI REG.NO : 20MIS0437 SUBJECT CODE : MAT1011 SUBJECT TITLE : CALCULUS FOR ENGINEERS LAB SLOT : L47+L48 GUIDED BY : VIJAYAKUMAR V
REGISTER NUMBER 20MIS0437 NAME YUVRAJ SAINI EXPERIMENT-1(A) AIM: To find area under the curves and volume of solid of revolution FORMULAE: , , . Example-1 Write a MATLAB code to find the area bounded by the curves 2 y 2 x and the line y x, from x 1 to 2. MATLAB Code syms x f(x)=2-x^2; g(x)=-x; I=[-1,2]; a=I(1); b=I(2); A=int(f(x)-g(x),a,b); disp( 'Area bounded by the curves f(x) and g(x) is:' ); disp(A); fplot(f(x), [a,b]); grid on ; hold on ; fplot(g(x), [a,b]);hold off ; xlabel( 'x-axis' ); ylabel( 'y-axis' ); legend( 'y=f(x)' , 'y=g(x)' ); OUTPUT Area bounded by the curves f(x) and g(x) is: 9/2 GRAPHS
REGISTER NUMBER 20MIS0437 NAME YUVRAJ SAINI Example-2 Write a MATLAB code to find the volume of the solid generated by the revolving the curve y x^1/2 about the line y 1 from x 1 to x 4. MATLAB Code syms x f(x)=sqrt(x); yr=1; I=[0,4]; a=I(1); b=I(2); vol=pi*int((f(x)-yr)^2,a,b); disp('Volume of solid of revolution:');

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture