maths DA-3.pdf - EXPERIMENT-3 Name:M.Deepshika Registration...

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

EXPERIMENT-3 Name: M.Deepshika Registration no.: 18MIS0241 Faculty Name: Selva Kumar Exercise-3A: 1.Find the area of the region bounded by the curve y=x2-2x and the line y=x. x ; ;
2.Find the area of the region bounded by the curves x=y 3and x=y2. Program: clear all clc syms 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 onplot(x2,y2);hold offxlabel('x-axis');ylabel('y-axis'); legend('f(y)','g(y)');grid onInput: y ; ; ;

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture