Schopenhauer unkindly wrote that the only merit of Leibniz’s Théodicée was that it gave rise to ‘the immortal Candide’. The Théodicée does seem at least to have given rise to the subtitle of Candide, albeit indirectly. In 1737, a review of a new edition of Leibniz’s book in the Jesuit Mémoires de Trévoux dubbed its central doctrine ‘l’optimisme’, thus apparently coining the term. Although it could easily have been elsewhere that Voltaire first came across Leibniz’s idea that this is the best of all possible words, and picked up the smattering of Leibnizian terminology that is found in Candide, we know that he dipped into the Théodicée at the very least, since an edition of the work exists to this day in his personal library, and contains several paper markers in both volumes. So he may well have noticed a key passage in its final pages about a man opting for a quiet life and cultivating his jardin. This striking parallel with the end of Candide seems to have been overlooked.
The climax of Leibniz’s Théodicée is a fable that Borges would have enjoyed, and probably did. Pallas Athena appears in a dream to Theodorus, the high priest of Jupiter, and shows him a palace with an infinite number of halls, each of which represents a possible way for things to be, but only one of which shows things as they actually are. The structure is a pyramid with an infinitely large base, and the single hall at its apex is the actual – and best possible – world. In that world, Sextus Tarquinius rapes Lucretia, which, as Pallas Athena puts it, “serves for great things”: it leads to the overthrow of the Roman monarchy and the founding of the Roman Republic. She also shows Theodorus one of the many other halls in which Sextus does not go to Rome and commit his crime. Such a world, we and Theodorus are supposed to agree, is not as good as the actual one, because in it the Roman Republic does not come to be. And what exactly does Sextus do instead in the possible but non-actual world which Pallas Athena shows to Theodorus?
…Il y achète un petit jardin; en le cultivant il trouve un trésor; il devient un homme riche, aimé, considéré; il meurt dans un grande vieillesse, chéri de toute la ville…
In other words, Sextus ends up as Candide would have liked to and Voltaire at Ferney more or less did. If Voltaire knew this passage – though there are surely possible worlds in which he skipped it and others in which he forgot it – we should perhaps see a wink at Leibniz in Candide’s much-discussed closing words.
– Anthony Gottlieb
 Die Welt als Wille und Vorstellung, ch.46.
 February 1737, p.207.
 Corpus des notes marginales, vol.5, p.298-99.
 Théodicée, section 416.
 Théodicée, section 415.