Solution (source code)

= Solution

Parametrize the <surface of revolution> by
$$
\mathbf r(x,\theta)=(x,y(x)\cos\theta,y(x)\sin\theta),\qquad0\le\theta\le2\pi.
$$
The magnitude of the <cross product> $\mathbf r_x\times\mathbf r_\theta$ is $y\sqrt{1+y'^2}$. Integrating the <surface area element> over $\theta$ gives
$$
\boxed{J[y]=2\pi\int_{x_1}^{x_2}y(x)\sqrt{1+y'(x)^2}\,dx.}
$$
Positivity of $y$ removes an otherwise necessary absolute value in the area element.