Elementary Treatise on Mechanics ch. 4 (1819). This is an instance of unintentional rhyme and meter. After the passage's poetical qualities were pointed out to him,Whewell altered it in subsequent editions of the book.
Laurence Sterne, Thomas Stothard (1867). “The Life and Opinions of Tristram Shandy, Gentleman. And A Sentimental Journey Through France and Italy ... With Life of the Author by Sir Walter Scott, Portrait, and Outline Wood Engravings After Thomas Stothard”, p.140