\documentclass{article}
\usepackage[affil-it]{authblk}
\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\usepackage{natbib}
\usepackage{url}
\usepackage{hyperref}
\hypersetup{colorlinks=false,pdfborder={0 0 0}}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
\errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}%
\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[polish,ngerman,english]{babel}
\begin{document}
\title{Where is the centroid of a half-\(n\)-ball?}
\author{Vedran Čačić (Veky)}
\affil{Affiliation not available}
\date{\today}
\maketitle
At\selectlanguage{ngerman} \href{http://datagenetics.com/blog/january52017/index.html}{Centroids of semicircles and hemispheres}, Nick Berry deduces the formulas for coordinates of a centroid of a unit half-circle and a half-ball (in 3D) centered at origin. In fact, he does it for general $r$, but since only the ratio with $r$ is important at the end, we can without loss of generality assume $r=1$. Of course, only one coordinate is nontrivial (the one in which the ball is sliced in half), the rest are zeros. He expresses his surprise at the fact that the half-circle has an irrational coordinate for the centroid, while the half-ball has a rational one. Since deducing general patterns from just 2 samples is very error-prone, we'll explore the situation in higher dimensions, to see whether irrational or rational centroid coordinate is a surprising\selectlanguage{english}---or perhaps none of them are.
The formula for the centroid coordinates is well-known: every coordinate is the average value of that coordinate accross all the points in the body, usually computed via an integral. Also, the integral can be calculated with respect to the coordinate itself, giving the \href{https://en.wikipedia.org/wiki/Centroid#By_integral_formula}{formula}
\begin{equation}
C_i = \frac{\int x_iS_i(x_i)\,dx_i}{\int S_i(x_i)\,dx_i}
\end{equation}
\selectlanguage{english}
\FloatBarrier
\end{document}