Find the centroid of the part of the ball x²+y²+z²≤ R²
Find the centroid of the part of the ball $x^2+y^2+z^2\le R^2$ cut out by the planes $x=a$ and $y=b$, i.e. the part with $0\le x\le a,\,0\le y\le b$ (with $a^2+b^2\le R^2$).
Explanation of Method
Since $a^2+b^2\le R^2$, every point of the rectangle $[0,a]\times[0,b]$ automatically satisfies $x^2+y^2\le R^2$, so the base of the solid is simply that rectangle; the height at each base point is $2\sqrt{R^2-x^2-y^2}$ by symmetry in $z$, giving $\bar z=0$. The volume and the moment $M_{yz}$ reduce, after standard antiderivatives and one integration by parts, to arcsine, arctangent, and square-root terms.
- Use symmetry in $z$ to get $\bar z=0$.
- Set up the volume as a double integral over $[0,a]\times[0,b]$.
- Reduce the volume integral to elementary pieces via an $x$-integration followed by a $y$-integration by parts.
- Compute the static moment $M_{yz}$, and $M_{xz}$ by symmetry.
- Assemble the centroid.
Step 1 · Setup and symmetry
For $(x,y)\in D=[0,a]\times[0,b]$, $z$ ranges over $\left[-\sqrt{R^2-x^2-y^2},\sqrt{R^2-x^2-y^2}\right]$, symmetric about $z=0$, so $\bar z=0$. The volume is $V=\iint_D2\sqrt{R^2-x^2-y^2}\,dA$.
Step 2 · Reduce the $x$-integral
With $c=\sqrt{R^2-y^2}$: $\displaystyle\int_0^a\sqrt{c^2-x^2}\,dx=\frac{a\sqrt{R^2-a^2-y^2}}2+\frac{R^2-y^2}2\arcsin\frac a{\sqrt{R^2-y^2}}$, so:
$$ V = a\int_0^b\sqrt{R^2-a^2-y^2}\,dy + \int_0^b(R^2-y^2)\arcsin\frac{a}{\sqrt{R^2-y^2}}\,dy = I_1+I_2. $$
With $\rho^2=R^2-a^2$: $I_1=\dfrac{ab\sqrt{R^2-a^2-b^2}}2+\dfrac{a(R^2-a^2)}2\arcsin\dfrac{b}{\sqrt{R^2-a^2}}$.
Step 3 · Reduce $I_2$ by parts
With $u=\arcsin\dfrac a{\sqrt{R^2-y^2}}$, $dv=(R^2-y^2)\,dy$, and the polynomial reduction $\dfrac{y^2(R^2-y^2/3)}{R^2-y^2}=\dfrac{y^2}3-\dfrac{2R^2}3+\dfrac{2R^4/3}{R^2-y^2}$, together with the antiderivative $\displaystyle\int\frac{dy}{(R^2-y^2)\sqrt{R^2-a^2-y^2}}=\frac1{Ra}\arctan\frac{ay}{R\sqrt{R^2-a^2-y^2}}$:
$$ I_2 = \left(R^2b-\frac{b^3}3\right)\arcsin\frac{a}{\sqrt{R^2-b^2}} + \frac{a(3R^2+a^2)}6\arcsin\frac b{\sqrt{R^2-a^2}} + \frac{ab}6\sqrt{R^2-a^2-b^2} - \frac{2R^3}3\arctan\frac{ab}{R\sqrt{R^2-a^2-b^2}}. $$
Step 4 · Volume
Adding $I_1+I_2$ and collecting like terms:
$$ V = \frac{2ab}3\sqrt{R^2-a^2-b^2} + \frac{a(3R^2-a^2)}3\arcsin\frac{b}{\sqrt{R^2-a^2}} + \frac{b(3R^2-b^2)}3\arcsin\frac{a}{\sqrt{R^2-b^2}} - \frac{2R^3}3\arctan\frac{ab}{R\sqrt{R^2-a^2-b^2}}. $$
Step 5 · Static moments and centroid
Following the same $x$-integration-then-parts strategy on $M_{yz}=\iint_D2x\sqrt{R^2-x^2-y^2}\,dA$:
$$ M_{yz} = \frac1{12}\Big[b(5R^2-2b^2)\sqrt{R^2-b^2} - b(5R^2-5a^2-2b^2)\sqrt{R^2-a^2-b^2} +3R^4\arcsin\frac{b}{R} - 3(R^2-a^2)^2\arcsin\frac{b}{\sqrt{R^2-a^2}}\Big], $$
and by the symmetry $x\leftrightarrow y,\,a\leftrightarrow b$ of the solid, $M_{xz}$ is obtained from $M_{yz}$ by swapping $a$ and $b$ throughout. The centroid is then $\bar x=M_{yz}/V,\,\bar y=M_{xz}/V,\,\bar z=0$.
Additional Notes
- A note on the source computation: the source correctly derived the boxed formulas for $M_{yz}$ (and, by symmetry, $M_{xz}$), which are reproduced above and verified numerically. However, its derivation of the volume $V$ itself was abandoned mid-computation: after a lengthy attempted polynomial division it gives up ("Rather than pursuing the general form further…") and the final displayed expression for $V$ trails off into an unresolved term marked with a literal superscript "$?$" and an ellipsis, never producing a working formula. It then closes by suggesting $V$ be obtained from "$\frac23\frac{dM_{yz}}{da}\big|_{\ldots}$" — a relation that is not actually developed or justified. I completed the volume derivation independently in Steps 3–4 above, using the same integration-by-parts strategy the source started (the polynomial division that it abandoned is carried through explicitly, and the resulting integral is evaluated via a substitution $y=\rho\sin t$, $\rho=\sqrt{R^2-a^2}$, giving the closed-form arctangent term), and verified the resulting closed form against direct numerical double integration.
- Verified numerically (e.g. $R=3.0,\,a=1.0,\,b=1.5$): $V\approx8.43161$, $M_{yz}\approx4.17105$, matching the closed forms above exactly; the same match holds for several other $(a,b,R)$ triples.
Result
With $\bar z=0$ and $V$ as derived in Step 4:
where $V$, $M_{yz}$, $M_{xz}$ are the closed-form expressions given in Steps 4–5.