Wikipedia
Essais de Théodicée sur la bonté de Dieu, la liberté de l'homme et l'origine du mal ("Essays of Theodicy on the Goodness of God, the Freedom of Man and the Origin of Evil"), more simply known as Théodicée, is a book of philosophy by the German polymath Gottfried Leibniz. The book, published in 1710, introduced the term theodicy, and its optimistic approach to the problem of evil is thought to have inspired Voltaire's Candide (albeit satirically). Much of the work consists of a response to the ideas of the French philosopher Pierre Bayle, with whom Leibniz carried on a debate for many years.
Théodicée was the only book Leibniz published during his lifetime; his other book, New Essays on Human Understanding, was published only after his death, in 1765.