Solution (source code)

= Solution

A <hydrometer> is a sealed floating instrument with a weighted bulb and a narrow graduated stem. The ballast keeps the stem upright. By <Archimedes' principle>, its <gravitational weight> equals the <buoyancy>:
$$
mg=\rho gV_{\rm displaced},\qquad \boxed{\rho=\frac{m}{V_{\rm displaced}}.}
$$
It therefore sinks farther into a less dense <liquid>, displacing more volume, and floats higher in a denser one. The stem makes a small volume change readily visible as a change in immersion. If its cross-sectional area is $A$, then $V_{\rm displaced}=V_0+A z$ over a uniform part of the stem. A <density> scale is consequently not generally uniform in $z$.

Float the clean instrument freely in a sufficiently deep sample, without its touching the wall or bottom. Remove adhering bubbles, allow the <temperature> and motion to settle, and read the liquid surface at eye level using the meniscus convention specified for that instrument. A calibration for a particular <temperature> or reference <density> cannot be transferred without correction: both the sample and the instrument expand. An ordinary <hydrometer> measures <density> or <specific gravity>; a special scale for a particular <chemical solution> does not make it chemically selective. In particular, dissolved substances other than <glucose> can affect the <density> of <urine>.