19BIT0029_VL2019201004458_AST02.docx - DIGITAL ASSIGNMENT 2...

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

DIGITAL ASSIGNMENT 2 Registration number :19BIT0029 Name :K.RISHITEJ RAO Slot :L37+L38 Course Name :Calculus for engineers Course Code :MAT1011 Faculty :Prof. BALA ANKI REDDY
1. AIM : Find the volume of a sphere formed by rotating a semicircle of radius 2 units about x-axis. Program : clc syms x f = input( 'Enter the function f(x): ' ); c = input( 'Enter the axis of rotation y=c (enter only c value): ' ); iL = input( 'Enter the integration limits: ' ); a = iL(1);b = iL(2); vol = pi*int((f- c)^2,a,b); disp([ 'Volume of solid of revolution is: ' ,char(vol)]); x1 = linspace(a,b,100); y1 = subs(f,x,x1); x2 = x1; y2 = c*ones(length(x1)); plot(x1,y1); hold on ; plot(x2,y2); hold off ; xlabel( 'x- axis' ); ylabel( 'y- axis' ); legend( 'The curve y=f(x)' , 'The axis of revolution y=c' ); grid on ; Input : Enter the function f(x): (4-x^2)^(1/2) Enter the axis of rotation y=c (enter only c value):
0 Enter the integration limits: [- 2,2] Output : Volume of solid of revolution is: (32*pi)/3
2. AIM : Find the volume of solid generated by revolving about the x-axis the region bounded by the curve y=4/(x^2+4), the x- axis and the lines x=0 and x=2.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture