BRAGA

02 Writing02-02 Notes02-02-286

Volume of solid of revolution (y-axis)

Published 16 Apr 202610 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
  3. 03Real-world use
  4. 04The formula, piece by piece
  5. 05The formula in words
  6. 06Critical Concepts
  7. 07Step-by-step calculation (tiny example)
  8. 08Code examples
V=∫abπx2 dyV = \int_a^b \pi x^2\,dy
(1)

Deep Breakdown

What it tells me (Situation Awareness): This formula computes the volume of the solid formed when a curve x=g(y)≥0x = g(y) \geq 0 is rotated 360° around the y-axis. Instead of stacking disks perpendicular to the x-axis (as in the x-axis revolution formula), you stack disks perpendicular to the y-axis. At each height yy, the cross-section is a disk of radius x=g(y)x = g(y) and area πx2\pi x^2. The companion to the x-axis formula, this version is used when the function is more naturally expressed as xx in terms of yy, or when the integration limits are defined along the y-axis. In DA/DS, this formula appears in the same contexts as the x-axis version: volumes of solids of revolution in 3D scientific visualization, understanding the geometric structure of probability distributions (e.g., the solid formed by rotating a CDF profile around the y-axis), and as a conceptual building block for spherical integration in multivariate statistics. The choice between x-axis and y-axis formulas is a matter of which parametrization makes the antiderivative easier to compute.

Flowchart

Yes: invert to get x = g(y)firstNo: x = g(y) directlyCurve x = g(y)from y=a to y=bRotate 360degrees aroundthe y-axisAt each y:cross-section isa disk of radiusx = g(y)Disk area = pi *x^2 = pi *[g(y)]^2Disk volume = pi* [g(y)]^2 * dySum all disks: V= integral_a^b pi* [g(y)]^2 dyAntiderivativeG(y): V = pi *[G(b) - G(a)]Was the originalcurve y = f(x)?Then apply theformulaApply formulaimmediately

Real-world use

Where it is used

Same geometric and statistical contexts as the x-axis revolution but with y-axis symmetry: computing volumes of solids defined by a curve expressed as x=g(y)x = g(y), validating 3D surface generation in scientific visualization pipelines, understanding the geometry of probability distributions when thinking of the CDF graphed as x=F−1(y)x = F^{-1}(y) (the quantile function) revolved around the y-axis, and as pedagogical intuition for why multivariate Gaussians have spherically symmetric probability mass in the standardized space.

Problem it solves

Some curves are much easier to integrate as x=g(y)x = g(y) than as y=f(x)y = f(x). Rotating around the y-axis is the natural choice when the bounding limits are horizontal lines (y=ay = a and y=by = b) rather than vertical lines. For example, the right half of an ellipse x=abb2−y2x = \frac{a}{b}\sqrt{b^2 - y^2} is easy to integrate over y∈[−b,b]y \in [-b, b] to get an ellipsoid of revolution.

How it solves the problem

The same disk-stacking idea as the x-axis version, but rotated: at each y-value, a thin horizontal disk of radius x=g(y)x = g(y) and thickness dydy has volume π[g(y)]2 dy\pi [g(y)]^2\,dy. Summing all disks from y=ay = a to y=by = b via integration gives the exact volume.

Example in a business

A data science team builds a 3D visualization of a quantile function for executive presentations: they plot the quantile function of a log-normal distribution x=F−1(y)x = F^{-1}(y) (the inverse CDF, expressing the threshold as a function of probability y∈[0,1]y \in [0,1]) and generate a 3D solid by revolving it around the y-axis. The volume V=π∫01[F−1(y)]2 dyV = \pi\int_0^1 [F^{-1}(y)]^2\,dy is computed numerically using scipy.integrate.quad.

The formula, piece by piece

V=∫abπx2 dy=π∫ab[g(y)]2 dyV = \int_a^b \pi x^2\,dy = \pi\int_a^b [g(y)]^2\,dy
(2)

Each symbol:

  • VV: volume in cubic units (always positive)
  • ∫ab\int_a^b: integrate along the y-axis from y=ay = a to y=by = b
  • π\pi: from disk area A=πr2A = \pi r^2; constant, pulls outside the integral
  • x2=[g(y)]2x^2 = [g(y)]^2: the squared radius of the disk at height yy
  • dydy: infinitesimal thickness of each horizontal disk Companion formula (x-axis revolution): V=π∫ab[f(x)]2 dxV = \pi\int_a^b [f(x)]^2\,dx Shell method (alternative for y-axis revolution, integrating over xx):
V=2π∫abx f(x) dxV = 2\pi\int_a^b x\,f(x)\,dx
(3)

(Often easier when the curve is given as y=f(x)y = f(x) and the limits are on xx.)

The formula in words

"Imagine the curve x=g(y)x = g(y) as the radius of a coin at each height yy. Stack horizontal coins of radius g(y)g(y) and thickness dydy along the y-axis. Each coin has volume π[g(y)]2 dy\pi [g(y)]^2\,dy. Add all coins from y=ay = a to y=by = b to get the total volume."

Critical Concepts

  • Disk vs. washer: if there is a hole of inner radius g1(y)g_1(y) and outer radius g2(y)g_2(y), use the washer method: V=π∫ab([g2(y)]2−[g1(y)]2) dyV = \pi\int_a^b ([g_2(y)]^2 - [g_1(y)]^2)\,dy.
  • Sphere via y-axis: revolving the right semicircle x=r2−y2x = \sqrt{r^2 - y^2} from y=−ry = -r to rr gives V=π∫−rr(r2−y2) dy=43πr3V = \pi\int_{-r}^r (r^2 - y^2)\,dy = \frac{4}{3}\pi r^3 (same result as x-axis revolution, by symmetry of the sphere).
  • Cone via y-axis: if the curve is x=rhyx = \frac{r}{h}y (a line through the origin), revolving from y=0y = 0 to hh gives V=π∫0hr2h2y2 dy=πr2h3V = \pi\int_0^h \frac{r^2}{h^2}y^2\,dy = \frac{\pi r^2 h}{3}
  • Shell method alternative: if y=f(x)y = f(x) is given, the shell method integrating over xx is V=2π∫abxf(x) dxV = 2\pi\int_a^b x f(x)\,dx. This avoids inverting ff to get x=g(y)x = g(y).
  • Quantile function connection: for a continuous distribution, x=F−1(p)x = F^{-1}(p) is the quantile at probability pp.

The y-axis revolution of this curve is V=π∫01[F−1(p)]2 dpV = \pi\int_0^1 [F^{-1}(p)]^2\,dp, related to E[X2]E[X^2] (second moment) when FF is uniform.

Step-by-step calculation (tiny example)

Compute the volume of the solid formed by revolving x=yx = \sqrt{y} from y=0y = 0 to y=4y = 4 around the y-axis.

Step 1: Identify g(y)g(y) and set up the integral g(y)=yg(y) = \sqrt{y}, so [g(y)]2=y[g(y)]^2 = y.

V=π∫04y dyV = \pi\int_0^4 y\,dy
(4)

Step 2: Antiderivative ∫y dy=y22\int y\,dy = \frac{y^2}{2}

Step 3: Apply FTC

V=π[y22]04=π⋅162=8π≈25.13V = \pi\left[\frac{y^2}{2}\right]_0^4 = \pi \cdot \frac{16}{2} = 8\pi \approx 25.13
(5)

Note: this is the same curve and the same answer as the x-axis example with y=xy = \sqrt{x} from 00 to 44. That is because x=yx = \sqrt{y} and y=xy = \sqrt{x} are inverses of each other, and the two solids (x-axis and y-axis revolution of this curve) happen to have the same volume in this symmetric case.

Code examples

Beginner example (Python)

python
import numpy as np
from scipy import integrate

def g(y: float) -> float:
    """Curve to revolve around y-axis: x = sqrt(y)."""
    return np.sqrt(y)

def disk_integrand_y(y: float) -> float:
    """Disk area at height y: pi * [g(y)]^2 = pi * y."""
    return np.pi * g(y)**2   # Numerical integration
volume_numerical, error = integrate.quad(disk_integrand_y, 0, 4)
volume_analytic = 8 * np.pi   # = pi * [y^2/2]_0^4 = pi * 8
print(f"Volume (y-axis disk method, numerical): {volume_numerical:.6f}")
print(f"Volume (y-axis disk method, analytic): {volume_analytic:.6f}")
print(f"Match: {abs(volume_numerical - volume_analytic) < 1e-8}")   # Sphere: revolve x = sqrt(r^2 - y^2) around y-axis
R = 3.0
vol_sphere_y, _ = integrate.quad( lambda y: np.pi * (R**2 - y**2), -R, R )
vol_sphere_analytic = (4.0 / 3.0) * np.pi * R**3
print(f"\nSphere (r={R}) via y-axis: numerical = {vol_sphere_y:.4f}, " f"analytic = {vol_sphere_analytic:.4f}")   # Shell method cross-check for x = sqrt(y) over y=[0,4] is equivalent to
# revolving y = x^2 (x from 0 to 2) around y-axis: V = 2*pi*int_0^2 x*x^2 dx
vol_shell, _ = integrate.quad(lambda x: 2 * np.pi * x * x**2, 0, 2)
print(f"\nShell method cross-check (y = x^2, x in [0,2]): {vol_shell:.6f}")
print(f"Same result: {abs(vol_shell - volume_numerical) < 1e-6}")

Beginner example (R)

r
# Volume of solid of revolution around y-axis: x = sqrt(y), y in [0, 4]
g <- function(y) sqrt(y)
disk_integrand_y <- function(y) pi * g(y)^2  # pi * y
result <- integrate(disk_integrand_y, lower = 0, upper = 4)
cat("Volume (y-axis, numerical):", result$value, "\n")  # ~25.1327
cat("8*pi = ", 8 * pi, "\n")

# Sphere via y-axis: x = sqrt(r^2 - y^2)
r <- 3
vol_sphere <- integrate(function(y) pi * (r^2 - y^2), -r, r)$value
cat("Sphere (r=3) volume:", vol_sphere, "\n")
cat("4/3*pi*r^3: ", (4/3)*pi*r^3, "\n")

# Shell method: V = 2*pi*int_0^2 x*f(x) dx where f(x) = x^2
vol_shell <- integrate(function(x) 2*pi*x*x^2, 0, 2)$value
cat("Shell method cross-check:", vol_shell, "\n")

Professional example (Python)

python
"""
Y-axis revolution: quantile function of exponential distribution.

For X ~ Exp(lambda), the quantile function (inverse CDF) is:
    x = F^{-1}(p) = -ln(1-p) / lambda

Revolving this curve around the y-axis (p-axis) from p=0 to p=0.99
gives a 3D solid whose volume = pi * int_0^0.99 [-ln(1-p)/lambda]^2 dp.

This relates to the second moment:
    E[X^2] = int_0^1 [F^{-1}(p)]^2 dp  (via probability integral transform)
For Exp(lambda): E[X^2] = Var[X] + (E[X])^2 = 1/lambda^2 + 1/lambda^2 = 2/lambda^2

Business use: customer lifetime follows Exp(lambda).
E[T^2] tells us the variance of lifetime:
    Var[T] = E[T^2] - (E[T])^2 = 2/lambda^2 - 1/lambda^2 = 1/lambda^2.
"""
import numpy as np
from scipy import integrate, stats

LAMBDA = 0.2   # churn rate: 20% per month -> E[T] = 5 months


# Quantile function: Q(p) = F^{-1}(p) = -ln(1-p)/lambda
def quantile_fn(p: float, lam: float = LAMBDA) -> float:
    """Inverse CDF of Exp(lambda)."""
    return -np.log(1.0 - p) / lam


# Volume of y-axis revolution of quantile curve
UPPER_P = 0.99   # avoid p=1 (Q goes to inf)
volume_quantile, err = integrate.quad(
    lambda p: np.pi * quantile_fn(p)**2, 0, UPPER_P,
)

# E[X^2] = int_0^1 [Q(p)]^2 dp
#        = int_0^1 [(-ln(1-p)/lambda)]^2 dp = 2/lambda^2
e_x2_numerical, _ = integrate.quad(
    lambda p: quantile_fn(p)**2, 0, 1 - 1e-10,   # avoid p=1
)
e_x2_analytic = 2.0 / LAMBDA**2   # = 50
e_x = 1.0 / LAMBDA                # E[T] = 5
var_x_analytic = 1.0 / LAMBDA**2   # = 25
print(f"=== Exponential(lambda={LAMBDA}) Quantile Revolution ===")
print(f" E[T] = 1/lambda = {e_x:.2f} months")
print(f" E[T^2] via int [Q(p)]^2 dp (numerical): {e_x2_numerical:.4f}")
print(f" E[T^2] analytic (2/lambda^2): {e_x2_analytic:.4f}")
print(f" Var[T] = E[T^2] - (E[T])^2 = {e_x2_analytic - e_x**2:.4f} (= 1/lambda^2 = {var_x_analytic:.4f})")
print(f"\nVolume of y-axis revolution (p in [0, {UPPER_P}]):")
print(f" V = pi * int_0^{UPPER_P} [Q(p)]^2 dp = {volume_quantile:.4f}")
print(f" [Integration error: {err:.2e}]")

# Sampling verification: var[T] from simulation
rng = np.random.default_rng(42)
samples = rng.exponential(scale=1.0 / LAMBDA, size=1_000_000)
print(f"\nMonte Carlo verification (N=1e6):")
print(f" Sample E[T]: {samples.mean():.4f} (expected: {e_x:.4f})")
print(f" Sample E[T^2]: {(samples**2).mean():.4f} (expected: {e_x2_analytic:.4f})")
print(f" Sample Var[T]: {samples.var():.4f} (expected: {var_x_analytic:.4f})")

Source: domain knowledge

#calculus#integral-calculus#improper-integrals-multiple-integrals-and-volumes

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close