The Analyst (subtitled A Discourse Addressed to an Infidel Mathematician: Wherein It Is Examined Whether the Object, Principles, and Inferences of the Modern Analysis Are More Distinctly Conceived, or More Evidently Deduced, Than Religious Mysteries and Points of Faith) is a book by George Berkeley. It was first published in 1734, first by J. Tonson (London), then by S. Fuller (Dublin). The "infidel mathematician" is believed to have been Edmond Halley, though others have speculated Sir Isaac Newton was intended.
From his earliest days as a writer, Berkeley had taken up his satirical pen to attack what were then called 'free-thinkers' (secularists, skeptics, agnostics, atheists, etc.—in short, anyone who doubted the truths of received Christian religion or called for a diminution of religion in public life). In 1732, in the latest installment in this effort, Berkeley published his Alciphron, a series of dialogues directed at different types of 'free-thinkers'. One of the archetypes Berkeley addressed was the secular scientist, who discarded Christian mysteries as unnecessary superstitions, and declared his confidence in the certainty of human reason and science. Against his arguments, Berkeley mounted a subtle defense of the validity and usefulness of these elements of the Christian faith.
Alciphron was widely read and caused a bit of a stir. But it was an offhand comment mocking Berkeley's arguments by the 'free-thinking' royal astronomer Sir Edmund Halley that prompted Berkeley to pick up his pen again and try a new tack. The result was The Analyst, conceived as a satire attacking the foundations of mathematics with the same vigor and style as 'free-thinkers' routinely attacked religious truths.
Berkeley sought to take mathematics apart, claimed to uncover numerous gaps in proof, attacked the use of infinitesimals, the diagonal of the unit square, the very existence of numbers, etc. The general point was not so much to mock mathematics or mathematicians, but rather to show that mathematicians, like Christians, relied upon incomprehensible 'mysteries' in the foundations of their reasoning.