Lesson 2 of 18

Surface Area of Revolution

Surface Area of Revolution

Rotating y=f(x)y = f(x) around the x-axis creates a surface. Its area is:

SA=2piintabf(x)cdotsqrt1+[f(x)]2,dxSA = 2pi int_a^b f(x) cdot sqrt{1 + [f'(x)]^2} , dx

Why It Works

Each strip of width dxdx wraps into a ribbon of radius f(x)f(x) and slant height sqrt1+f2,dxsqrt{1+f'^2},dx. The ribbon's area is 2picdotf(x)cdotsqrt1+f2,dx2pi cdot f(x) cdot sqrt{1+f'^2},dx.

Classic Examples

Cylinder f(x)=rf(x) = r on [0,L][0, L]: f=0f' = 0, so SA=2pirLSA = 2pi r L

Cone f(x)=xf(x) = x on [0,1][0, 1]: f=1f' = 1, so:

ight]_0^1 = pisqrt{2} approx 4.4429$$ ### Numerical Approach ```c #define PI 3.14159265358979 for each midpoint x: double fp = (f(x+h) - f(x-h)) / (2*h); sum += f(x) * my_sqrt(1.0 + fp * fp); return 2.0 * PI * sum * dx; ``` ### Your Task Implement `double surface_area(double (*f)(double), double a, double b, int n, double h)`.
TCC compiler loading...
Loading...
Click "Run" to execute your code.