find the volume of the surface of revolution created by revolving the region bounded by the equations f(x)=2*tan(x) and g(x)=sec(x)-1 between x=0 and x= 4 about the x-axis. in matlab

To find the volume of the surface of revolution between x=0 and x=4, we need to use the formula

main.m
V = 2 * pi * integral(f(x)^2 - g(x)^2) dx from a to b
54 chars
2 lines

where a is the starting value of x (which is 0 in this case) and b is the ending value of x (which is 4 in this case).

Before we can use this formula, we need to rewrite f(x) and g(x) in terms of y and then solve for x.

Given:

  • f(x) = 2 * tan(x)
  • g(x) = sec(x) - 1

We can rewrite f(x) and g(x) in terms of y:

  • y = 2 * tan(x) => x = atan(y/2)
  • y = sec(x) - 1 => sec(x) = y + 1 => cos(x) = 1/(y+1) => x = acos(1/(y+1))

Using these new expressions of x, we can rewrite the formula for the volume:

main.m
V = 2 * pi * integral(f(y)^2 - g(y)^2) dy from c to d 
where
f(y) = 2 * tan(atan(y/2)) = y / cos(atan(y/2))
g(y) = sec(acos(1/(y+1))) - 1 = ((y+1)/sqrt(y^2+2y)) - 1
c = f(0) = 0
d = f(4) = 8 / sqrt(15)
202 chars
7 lines

Finally, we can compute the volume in Matlab using the following script:

main.m
f = @(y) y ./ cos(atan(y/2));
g = @(y) ((y+1)./sqrt(y.^2+2*y)) - 1;
V = 2*pi*integral(@(y) (f(y).^2 - g(y).^2), 0, 8/sqrt(15));
128 chars
4 lines

We get V = 80.8535 as the volume of surface of revolution.

related categories

gistlibby LogSnag