find the volume of the surface of revolution created by revolving the region bounded by the functions f(x)=8-x.^2 and g(x)=x.^2 about the line y=10. in matlab

To find the volume of the surface of revolution created by revolving the region bounded by two functions f(x) and g(x) about a horizontal line y=h, where h is the height of the axis of revolution, we can use the following formula:

<img src="https://latex.codecogs.com/svg.latex?\large&space;V&space;=&space;2\pi\int_a^b&space;(h-f(x))(f(x)-g(x))dx" title="\large V = 2\pi\int_a^b (h-f(x))(f(x)-g(x))dx" />

In our case, f(x) = 8 - x^2, g(x) = x^2, and h = 10. We need to find the integral limits a and b such that the two functions bound the region of revolution. From the functions f(x) and g(x) we can see that they intersect at x = -2 and x = 2. Therefore, the integral limits are -2 and 2. We can now write the MATLAB code to evaluate the volume using this formula:

main.m
% Define the functions
f = @(x) 8 - x.^2;
g = @(x) x.^2;
h = 10;  % Height of the axis of revolution

% Define the integral limits
a = -2;
b = 2;

% Evaluate the integral
V = 2*pi*integral(@(x) (h-f(x)).*(f(x)-g(x)), a, b);

% Display the result
fprintf('Volume of the surface of revolution: %f\n', V);
303 chars
15 lines

This code will output the value of the volume of the surface of revolution.

related categories

gistlibby LogSnag