# 18MIS0179_VL2018191000682_AST03.pdf - ASSESMENT 3 QUESTION...

• 3

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

ASSESMENT 3:QUESTION 1:i )clear allclcsyms xf=input('Enter the upper curve f(x): ');g=input('Enter the lower curve g(x): ');L=input('Enter the limits of integration for x [a,b]:');a=L(1); b=L(2);Area=int(f-g,x,a,b);disp(['Area bounded by the curves f(x)and g(x) is:',char(Area)]);x1=linspace(a,b,20);y1=subs(f,x,x1);x2=x1;y2=subs(g,x,x1);plot(x1,y1);hold on; plot(x2,y2);hold of;xlabel('x-axis');ylabel('y-axis');legend('f(x)','g(x)');grid on;Area bounded by the curves f(x)and g(x) is:9/2ii )output: Area bounded by the curves f(x)and g(x) is:-9/2
QUESTION 2:i )clear allclcsyms tf=input('Enter the function of t: ');F=laplace(f);disp(['L{',char(f),'}=',char(F)]);output:L{3/t^(1/2) + 2*t^(1/2) + 1}=1/s + (3*pi^(1/2))/s^(1/2) + pi^(1/2)/s^(3/2)ii)clear allclcsyms tf=input('Enter the function of t: ');F=laplace(f);F=simplify(F);disp(['L{f(t)}=',char(F)]);output:L{f(t)}=(exp(-s*pi)*(exp(s*pi) + 1))/(s^2 + 1)iii )clear allclcsyms