# Sunday Times Teaser 3143 – Pipe Fittings

*by Peter Good*

#### Published Sunday December 18 2022 (link)

A plumber had three thin metal pipes with square, rectangular and elliptical cross-sections. In order to fit them into his van, he slid the rectangular pipe inside the elliptical pipe and the elliptical pipe inside the square pipe, before placing the pipe assembly in the van. There are four points where the pipes all touch, as shown in the diagram. The maximum and minimum widths of the elliptical and rectangular pipes and the diagonal width of the square pipe were all even numbers of mm less than 1,000, of which one was a perfect square.

What were the five widths (in increasing order)?

One Comment
Leave one →

If the centre of the diagram is placed at the origin (0, 0) of an \((x, y)\) graph and we consider its upper right quadrant, we can put the meeting point of three three pipes at \(r\) and \(s\). Let the semi-major and semi-minor axes of the ellipse be \(a\) and \(b\) respectively, and let the semi-diagonal of the square (which is equal to \(x+y\)) be \(c\). The ellipse is then given by the function:

\[\frac{x^2}{a^2}+\frac{y^2}{b^2}=1\tag{1}\label{1}\]

The slope of the ellipse and the side of the square at the common point are both \(-1\). Differentiating the equation above gives:\[\frac{2x}{a^2}dx+\frac{2y}{b^2}dy=0\tag{2}\label{eq2}\]\[\frac{dy}{dx}=-\frac{xb^2}{ya^2}=-1\tag{3}\label{3}\]and hence \(xb^2=ya^2\). Using this and the equation of the ellipse at (\(r, s\)) to eliminate \(s\) now gives:\[r=\frac{a^2}{\sqrt{a^2+b^2}}\tag{4}\label{4}\]and the equivalent equation for \(s\) follows in the same way:\[s=\frac{b^2}{\sqrt{a^2+b^2}}\tag{5}\label{5}\]Since \(c=x+y=\sqrt{a^2+b^2}\), the five values required are now \((2a, 2b, 2a^2/c, 2b^2/c, c)\).

Noting that the triple \((a, b, c)\) is a Pythagorean triple, if we restrict ourselves to primitive triples, neither \(a\) nor \(b\) are divisible by \(c\), which means we have to multiply the five values by \(c\) in order to ensure that they are all integers as required. So the values now become\[(2ac, 2bc, 2a^2, 2b^2, 2c^2)\]

These values have to be further scaled up to find a set with exactly one perfect square.

Faster (requires my number theory library).