Two balls in a bowl:
We represent the cross section of the "bowl" by a circle, with centre D, radius d.
We locate balls A and B in this bowl such that they touch and denote the perpendicular to the chord in D through A and B by OD.
(1) OD = h
(2) AO + OB = a + b
A O G B
We next extend DA and DB to the circumference of D so that AA' = a, BB' =b and DAA' = DBB' = d. The physical system therefore satisfies:
(3) (d-a)^2 = OA^2 + h^2
(4) (d-b)^2 = OB^2 + h^2
Eliminating OA and OB we can obtain the following :
h = 2 Sqrt (ab d^2 - bd a^2 - ad b^2)/(a+b)^2)
for 0 < a < b < a + b < d < (ab + b^2)/(b-a).
We denote the centre of gravity G, then
(5) OG = ((OB) b^3 - (OA) a^3))/(a^3+b^3)
In equilibrium the system rotates about D so that G lies under D. By geometry we can show that the angle the chord makes with the horizontal is equal to ODG and if we let t = Tan (ODG) = OG / h then we obtain
t = -1/2 Sqrt( -a^8 + 2 a^4 b^4 - b^8 + 2 a^7 d - 4 a^6 b d +
4 a^5 b^2 d - 2 a^4 b^3 d - 2 a^3 b^4 d +
4 a^2 b^5 d - 4 a b^6 d + 2 b^7 d - a^6 d^2 +
4 a^5 b d^2 - 8 a^4 b^2 d^2 + 10 a^3 b^3 d^2 -
8 a^2 b^4 d^2 + 4 a b^5 d^2 -
b^6 d^2)/((a b((a^2 - a b + b^2))^2((a + b -
Pretty isn't it?
Three balls is no nicer.
Edits to fix typos.