# Find the volume of the solid generated by revolving about the x-axis the region bounded by the curve y= 4/x^2+4,the axis, and the lines x=0 x=2

361 views (last 30 days)
Priyadarshini Nair on 12 Jan 2022
Answered: John D'Errico on 21 Sep 2023
%Evaluation of Volume of solid of revolution clear clc syms x f(x)=sqrt(x); % Given function yr=1; % Axis of revolution y=yr I=[0,4]; % Interval of integration a=I(1);b=I(2); vol=pi*int((f(x)-yr)^2,a,b); disp('Volume of solid of revolution is: '); disp(vol); % Visualization if solid of revolution fx=matlabFunction(f); xv = linspace(a,b,101); % Creates 101 points from a to b [X,Y,Z] = cylinder(fx(xv)-yr); Z = a+Z.*(b-a); % Extending the default unit height of the %cylinder profile to the interval of integration.
Mukesh on 23 Nov 2022
%Evaluation of Volume of solid of revolution
clear
clc
syms x
f(x)=4/(x^2+4); % Given function
yr=0; % Axis of revolution y=yr
I=[0,2]; % Interval of integration
a=I(1);b=I(2);
vol=pi*int((f(x)-yr)^2,a,b);
disp('Volume of solid of revolution is: ');
disp(vol); % Visualization if solid of revolution
fx=matlabFunction(f);
xv = linspace(a,b,101); % Creates 101 points from a to b
[X,Y,Z] = cylinder(fx(xv)-yr);
Z = a+Z.*(b-a); % Extending the default unit height of the
%cylinder profile to the interval of integration.
surf(Z,Y+yr,X) % Plotting the solid of revolution about y=yr
hold on;
plot([a b],[yr yr],'-r','LineWidth',2); % Plotting the line y=yr
view(22,11); % 3-D graph viewpoint specification
xlabel('X-axis');ylabel('Y-axis');zlabel('Z-axis');

John D'Errico on 21 Sep 2023
The question is now a year old, so I'll show how to solve it. @Mukesh chose to work with a different domain than the question asks in the title. While that seems surprising, the problem as posed in the subject title does not have a finite solution.
A surface of revolution of the function y(x), bounded by x==0 and x==2, revolving around the x axis.
syms x
y(x) = 4/x^2 + 4
y(x) = fplot(y,[0,2])
ylim([0,100]) I've chopped it off at y==100 there. The first question is to know if it is integrable at all. We can get a clue by this computation, merely finding the area under that curve. As you can see, the tail as x--> 0 is too heavy, so we would expect the volume to also be unbounded.
int(y,[0,2])
ans =
How would we compute the volume inside that surface of revolution? Thw simple way is to view this as a set of infinitessimally thin circles, with center at y==0, and with radius y(x). The area of each circle is just pi*y(x)^2. Then just integrate from x==0 to x==2.
int(pi*y^2,x,[0,2])
ans =
And, as expected, we get an infinite volume. That suggests, that @Mukesh was possibly correct in the comment where the function y(x)=4/(x^2+4) was assumed, even though that is NOT mathematically what was written. (SIGH.) If we do that, the region of interest is now:
y2(x) = 4/(x^2+4)
y2(x) = fplot(y2,[0,2])
ylim([0,1]) Clearly the surface generated by revolving that curve around the x axis will be finite.
int(pi*y2^2,x,[0,2])
ans = ### Categories

Find more on Programming in Help Center and File Exchange

R2021a

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!