Solving Newton’s Problem of Least Resistance for a Body of Revolution
Every nose cone, submarine hull, and high-speed capsule shares the same underlying question: given a fixed length and a fixed base radius, what shape minimizes the drag force acting on it? This is one of the oldest problems in the calculus of variations — first posed by Isaac Newton himself in the Principia — and it remains a foundational exercise in aerodynamic shape optimization today.
In this article we set up the problem rigorously, discretize it, solve it numerically with constrained optimization in Python, and visualize the resulting shape as a full 3D solid.
Problem Setup
We consider an axisymmetric body of revolution traveling through a fluid at velocity $V$. The body’s surface is described by a profile function $x(r)$, giving the axial position $x$ at radius $r$, where $r$ ranges from the centerline ($r=0$, the nose apex) out to the base radius $r=R$. The body has fixed length $L$, so the boundary conditions are:
$$x(0) = 0, \qquad x(R) = L$$
Using Newton’s sine-squared pressure law — a classical approximation valid for blunt bodies in a rarefied or hypersonic flow regime, where the local pressure coefficient depends only on the local surface slope — the total drag force is given by the functional:
$$D[x(r)] = 4\pi \rho V^{2} \int_{0}^{R} \frac{r}{1+\left(\dfrac{dx}{dr}\right)^{2}},dr$$
Our task is to find the function $x(r)$, subject to the boundary conditions above and the physical requirement that the surface never curves backward ($dx/dr \geq 0$ everywhere), that minimizes $D$.
Applying the Euler–Lagrange equation to this functional (the integrand has no explicit dependence on $x$, only on $x’$) yields a first integral of the motion:
$$\frac{r,x’(r)}{\left(1+x’(r)^{2}\right)^{2}} = C \quad \text{(constant along the optimal profile)}$$
This single relation is the classical signature of Newton’s minimum-drag solution, and it gives us a way to sanity-check any numerical result we obtain: if we found the true optimum, this quantity should come out constant across the profile.
Numerical Approach
Rather than trying to solve the differential equation in closed form, we discretize the profile into $N$ radial segments and treat the axial coordinate at each interior point as a free variable. The drag integral becomes a Riemann sum, and the problem becomes a finite-dimensional constrained optimization:
- Objective: the discretized drag sum
- Variables: the interior axial coordinates $x_1, \dots, x_{N-1}$
- Constraints: monotonicity ($x_{i+1} - x_i \geq 0$) and the fixed endpoints
- Solver: Sequential Least Squares Programming (SLSQP), via
scipy.optimize.minimize
We compare the resulting optimal shape against two reference bodies of the same length and base radius: a straight cone and a blunt, quarter-ellipse nose.
Source Code
1 | # ============================================================ |
Code Walkthrough
Section 1 — Discretization. The radius axis $r \in [0, R]$ is split into $N=60$ segments. We work with r_mid, the midpoint of each segment, because the drag integrand $r/(1+x’^2)$ is most naturally evaluated where the slope $x’$ (a finite difference between adjacent points) is also defined — this is a standard midpoint (rectangle) quadrature rule.
build_profile. Only the interior points of the profile are free optimization variables. The nose ($x=0$ at $r=0$) and the base ($x=L$ at $r=R$) are fixed boundary conditions, so this helper stitches them back onto the array of free variables before every evaluation.
drag_objective. This directly implements the discretized version of the drag functional shown earlier: compute the local slope of each segment, plug it into $r/(1+x’^2)$, and sum with the segment width dr.
monotonicity_constraint. Physically, the surface of the body cannot fold back on itself — moving from the nose to the base, the axial coordinate must be non-decreasing. We enforce this as an inequality constraint on every successive difference of the profile, handed to SLSQP as {'type': 'ineq', ...} (SciPy’s convention: the returned array must be $\geq 0$).
Section 3 — Optimization. We start from the cone shape as an initial guess and let scipy.optimize.minimize (method SLSQP, which supports both bounds and nonlinear constraints) search for the profile that minimizes drag. A callback records the objective value at every iteration so we can later plot the convergence history. ftol=1e-12 and a generous maxiter=300 ensure the solver fully converges rather than stopping early.
Sections 4–7 — Visualization. Figure 1 overlays the optimized profile with the two reference shapes in the $(x, r)$ plane. Figure 2 revolves the optimized profile through a full $2\pi$ turn around the x-axis using plot_surface, reconstructing the actual 3D solid. Figure 3 shows how the drag value evolves as SLSQP iterates. Figure 4 gives a direct side-by-side numerical comparison as a bar chart.
A Nice Confirmation of the Theory
If you evaluate the first-integral quantity $\dfrac{r,x’(r)}{(1+x’(r)^2)^2}$ along the numerically optimized profile, something satisfying happens: it comes out as exactly zero for the first several points near the nose, then jumps to a single constant value for the remainder of the profile. This is precisely the classical, textbook feature of Newton’s minimum-drag body — for a body this short and blunt relative to its base radius, the true optimal shape begins with a flat frontal disk (zero slope, hence zero drag contribution from that patch) before transitioning into a smoothly curved profile that satisfies the constant first-integral condition. The optimizer rediscovers this structure purely numerically, without being told about it in advance.




Optimization converged: True Drag [optimized shape] : 1.510189 Drag [cone reference] : 1.933288 Drag [blunt reference] : 4.652084 Reduction vs. cone : 21.88 % Reduction vs. blunt : 67.54 %
Interpreting the Results
The bar chart makes the practical payoff immediately visible: the optimized shape achieves noticeably lower drag than the straight cone, and dramatically lower drag than the blunt reference shape. The 2D profile plot shows why — the optimal shape starts wider than a cone near the nose (spreading the frontal pressure load over a larger initial patch instead of concentrating it at a sharp point) but curves inward more gently than the blunt shape as it approaches the base, avoiding the steep slopes that make the blunt shape so much draggier.
The convergence plot is worth a second look too. SLSQP does not descend monotonically — it initially pushes the profile toward more extreme, higher-drag configurations while exploring the constraint boundary, then settles into a steady descent toward the optimum. This is normal behavior for sequential quadratic programming methods on constrained problems and is not a sign of a bug.
The 3D surface, finally, turns the abstract profile curve into something you can look at as an actual object — a smoothly blended, slightly bulged nose cone shape that would look immediately familiar to anyone who has looked at a reentry capsule or a supersonic projectile.
Where This Goes Next
The version here fixes the length and base radius and searches only over the profile shape. Natural extensions include adding a fixed enclosed-volume constraint (trading a small drag increase for more internal payload space), solving the problem for a slender-body approximation instead of the blunt-body Newtonian law, or extending the same optimization machinery to full airfoil sections evaluated with a vortex-panel method for genuine subsonic lift-to-drag optimization.





















