Contents
Deep Breakdown
What it tells me (Situation Awareness): This formula computes the volume of the solid formed when a curve 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 , the cross-section is a disk of radius and area . The companion to the x-axis formula, this version is used when the function is more naturally expressed as in terms of , 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
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 , validating 3D surface generation in scientific visualization pipelines, understanding the geometry of probability distributions when thinking of the CDF graphed as (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 than as . Rotating around the y-axis is the natural choice when the bounding limits are horizontal lines ( and ) rather than vertical lines. For example, the right half of an ellipse is easy to integrate over 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 and thickness has volume . Summing all disks from to 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 (the inverse CDF, expressing the threshold as a function of probability ) and generate a 3D solid by revolving it around the y-axis. The volume is computed numerically using scipy.integrate.quad.
The formula, piece by piece
Each symbol:
- : volume in cubic units (always positive)
- : integrate along the y-axis from to
- : from disk area ; constant, pulls outside the integral
- : the squared radius of the disk at height
- : infinitesimal thickness of each horizontal disk Companion formula (x-axis revolution): Shell method (alternative for y-axis revolution, integrating over ):
(Often easier when the curve is given as and the limits are on .)
The formula in words
"Imagine the curve as the radius of a coin at each height . Stack horizontal coins of radius and thickness along the y-axis. Each coin has volume . Add all coins from to to get the total volume."
Critical Concepts
- Disk vs. washer: if there is a hole of inner radius and outer radius , use the washer method: .
- Sphere via y-axis: revolving the right semicircle from to gives (same result as x-axis revolution, by symmetry of the sphere).
- Cone via y-axis: if the curve is (a line through the origin), revolving from to gives
- Shell method alternative: if is given, the shell method integrating over is . This avoids inverting to get .
- Quantile function connection: for a continuous distribution, is the quantile at probability .
The y-axis revolution of this curve is , related to (second moment) when is uniform.
Step-by-step calculation (tiny example)
Compute the volume of the solid formed by revolving from to around the y-axis.
Step 1: Identify and set up the integral , so .
Step 2: Antiderivative
Step 3: Apply FTC
Note: this is the same curve and the same answer as the x-axis example with from to . That is because and 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)
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)
# 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)
"""
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