Find the volume of solid generated by revolving the region bounded by the curve 𝑦 = √𝑥, 𝑦 = 0, 𝑥 = 2 about the line 𝑦 = 5.

40 views (last 30 days)
Find the volume of solid generated by revolving the region bounded by the curve 𝑦 = √𝑥, 𝑦 = 0, 𝑥 = 2 about the line 𝑦 = 5.
  2 Comments
Nithish
Nithish on 17 Jan 2023
%Evaluation of Volume of solid of revolution
clear
clc
syms x
f(x)=sqrt(x); % Given function
yr=5; % Axis of revolution y=yr
I=[0,2]; % Interval of integration
a=I(1);b=I(2);
vol=pi*int((yr-f(x))^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');

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 2 Jan 2022
Edited: Image Analyst on 2 Jan 2022
x = linspace(0, 30, 1000);
y = sqrt(x);
plot(x, y, 'b-');
grid on;
yline(0, 'Color', 'g', 'LineWidth', 2);
yline(5, 'Color', 'g', 'LineWidth', 2);
xline(2, 'Color', 'g', 'LineWidth', 2);
text(5, 4, 'Not this region', 'Color', 'r', 'FontSize', 15)
text(11, 2.5, 'Spin this region', 'Color', 'r', 'FontSize', 15)
You need to actually specify both ends of x.
Is x1=0 and x2=2, or is x1=2 and x2 = 25?
  1 Comment
vidya g
vidya g on 5 Jan 2022
thanks for solving this question .i have already got the solution at that day itself since i cant delete questions it was like that.through this i came to know the new method to answer the question.thanks for solving this :)

Sign in to comment.

More Answers (1)

John D'Errico
John D'Errico on 2 Jan 2022
Edited: John D'Errico on 2 Jan 2022
Ok. I did it. Not too hard. Oh. Wait. Was this YOUR homework assignment, given to you? Is there a reason why we should do it for you?
Please stop posting your homework assignment questions. They were assigned to you, not to us. Unless, of course, you are willing to give us the name and address of your teacher. Then we can send in the solution directly to them, and get credit for ourselves.
Homework is given to teach you. In this case, it would teach you both MATLAB and mathematics, but only if you make an effort. Your brain is a muscle. Exercise it, and it will get stronger.
Note: Had you made an effort, I would have offered help, to a degree proportional to the effort you made. Having shown no effort, I'll tell you only that it took about 20 seconds to write the very few lines of code I used to solve this. (If you count the line syms x y, 3 lines in total.) So in a sense, I did give you help, since I gave you the very first line of code I used.
  1 Comment
vidya g
vidya g on 5 Jan 2022
this is not part of homework i was practicing matlab sums for exam.In this question i had a doubt and when i tried in matlab it showed error .So i posted whole question here (since matlab doesnt allow to post the code.if it allows i dont know how to do ) so that my doubt gets clarified and thanks for the first line of code

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!