0

I have the following curve:

enter image description here

The curve is defined by a set of data points.

How can I calculate the volume that will be enclosed by this curve if it is rotated by 360 degrees about the horizontal axis?

I can calculate the area underneath the curve using numerical integration, with eg np.trapz, but am unsure of what to do next.

Alex Riley
  • 169,130
  • 45
  • 262
  • 238
Jonny
  • 1,270
  • 5
  • 19
  • 31

1 Answers1

6

For your function f(x), you want to calculate the volume of revolution about the x-axis.

This is given by integrating f(x)*f(x), i.e. the function f(x)-squared, using np.trapz or any other integration method, and then multiplying by the constant pi (which is built in to NumPy as np.pi).


The intuition for this lies in the formula for calculating the area of a circle from its radius: pi * r**2.

The solid formed by rotating the curve 360 degrees about the x-axis is composed of infinitesimally thin disks at each point along the x-axis. Each disk has radius f(x). The area of the face of each disk is therefore pi * f(x)**2.

Integrating along the x-axis sums the volumes of the infinitesimally thin disks and calculates the volume of the solid.

Alex Riley
  • 169,130
  • 45
  • 262
  • 238
  • What would be the approach to calculate the surface area of the revolution? – Jonny Nov 11 '14 at 16:49
  • @Jonny - Calculating the [surface area of revolution](http://mathworld.wolfram.com/SurfaceofRevolution.html) is a little more involved: differentiate `f(x)`, square it, add one, take the square root of that, multiply by `f(x)*2*pi` and integrate. I don't know if there's any built in function in the NumPy/SciPy stack, but the link should explain the steps in more detail. – Alex Riley Nov 11 '14 at 20:57