18BCE0419_VL2018191000733_AST04.pdf - NAME V.V.SAI DILEEP...

This preview shows page 1 - 7 out of 7 pages.

NAME: V.V.SAI DILEEP REG NO: 18BCE0419 SLOT: L39+L40 QUESTION NO:4 A. 1.Write the matcode to find the area of region bounded by the curve y=x^2-2*x and the line y=x clear all
Output :-Area bounded by curves f(x) & g(x):9/2 2. Write the matcode to find the area of region bounded by the curve x=y^3 and the line y^2=x clear all clc syms y f=input('Enter the right curve f(y): '); g=input('Enter the left curve g(y): '); L=input('Enter the limits of integration for y [c,d]:'); c=L(1); d=L(2); Area=int(f-g,y,c,d); disp(['Area bounded by the curves f(y) and g(y) is: ',char(Area)]); y1=linspace(c,d,20);x1=subs(f,y,y1); y2=y1;x2=subs(g,y,y1); plot(x1,y1);hold on; plot(x2,y2);hold off; xlabel('x-axis');ylabel('y-axis');

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture