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

54 次查看(过去 30 天)
Find the volume of solid generated by revolving the region bounded by the curve 𝑦 = √𝑥, 𝑦 = 0, 𝑥 = 2 about the line 𝑦 = 5.
  2 个评论
Nithish
Nithish 2023-1-17
%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');

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2022-1-2
编辑:Image Analyst 2022-1-2
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 个评论
vidya g
vidya g 2022-1-5
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 :)

请先登录,再进行评论。

更多回答(1 个)

John D'Errico
John D'Errico 2022-1-2
编辑:John D'Errico 2022-1-2
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 个评论
vidya g
vidya g 2022-1-5
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by