Sometimes, mathematicians like to do geometry in modular arithmetic. That is, doing geometry, but instead of using real numbers as your coordinates, using "numbers modulo 5" (for example) as your coordinates. Calculus is one of the most useful tools in geometry, so it's natural to ask if we can use it in modular arithmetic geometry.
As an example of the kind of calculus I mean, let's stick to doing mod 5 arithmetic throughout this post. We can take a polynomial like x\^3 + 3x\^2 - 2x, and differentiate it the same symbolic way we would if were we doing calculus normally, to get 3x\^2 + 6x - 2. However, because we're doing mod 5 arithmetic, that "6x" can be rewritten as just x, so our derivative is 3x\^2 + x - 2.
Why on Earth would you want to do this? There is a slightly more concrete motivation at the end of this post, but let me say a theoretical reason you might try this. At the beginning of modern algebraic geometry, Grothendieck and his school were incredibly motivated by the Weil conjectures. Roughly, French mathematician Andre Weil made the great observation that if you take a shape defined by a polynomial equation (like the parabola y = x\^2 or like an 'elliptic curve' y\^2 = x\^3 + x + 1), then
the geometry of its graph over the complex numbers
and
the number of solutions it has over 'finite fields' (a certain generalization of modular arithmetic)
are related. Phrased differently, if you graph an equation over the complex numbers, you get a genuine geometric object with interesting geometry; if you graph an equation in modular arithmetic, you get some finite set of points (because there are only 5 possible values of x and y when you're doing mod 5 arithmetic, say). At first you might imagine the rich geometry over the complex numbers is completely unrelated to the finite sets of points you get in modular arithmetic, but by computing tons of examples, Weil observed that there's a strange connection between the sizes of these finite sets and the geometry over the complex numbers!
Grothendieck and his students were trying with all of their might to understand why Weil's observations were true, and prove them rigorously. Weil himself realized that the path towards understanding this connection was to build what we now call a "Weil cohomology theory" -- that is, find some way to take a shape in modular arithmetic, and access the 'cohomology' (a certain very important geometric invariant) of its complex numbers counterpart.
Georges de Rham, in his famous de Rham theorem, noticed that calculus actually gives you a spectacularly simple way to access the geometry of a shape (or more precisely, its cohomology) through the study of certain differential equations on that shape. Thus Grothendieck and others set about developing a theory of calculus in modular arithmetic, so that they could ultimately understand differential equations in modular arithmetic, and therefore understand cohomology of graphs of functions in modular arithmetic.
Unfortunately, this vision encounters a large difficulty at the very start. In normal calculus, the only functions whose derivative is zero are the constant functions. But in "mod 5" calculus, it turns out that non-constant functions can have derivative zero! For instance, x\^5 is certainly a nonzero function... but its derivative, 5x\^4, is zero modulo 5.
This means that, in modular arithmetic, simple differential equations have many more solutions than their usual counterparts. For example, the differential equation
df/dx = 2f/x,
when solved in normal calculus, has solution f(x) = Cx\^2, for a constant C. But in mod 5 calculus, this differential equation has many solutions: x\^2 is one such solution (just like in normal calculus), but x\^7, x\^12, x\^17, ... are all solutions as well!
This means that, if you apply de Rham's original procedure to go from differential equations to cohomology, you end up getting much much bigger cohomology in modular arithmetic than you do in usual geometry. Grothendieck ended up solving this with the theory of "crystalline cohomology", but it was a big obstacle to overcome!
---
There's an earlier post I wrote on r/math about homotopical reasoning (see https://www.reddit.com/r/math/comments/1qv9t7c/what_is_homotopical_reasoning_and_how_do_you_use/ ). These two posts might seem unrelated at first, but surprisingly they are not: to do calculus in positive characteristic, it turns out you really need homotopical math! As an algebraic geometer, this was actually my original motivation for learning homotopical thinking.
For a more down to earth explanation of "why do calculus in modular arithmetic?" , you can check out this article about Hensel's lemma: https://hidden-phenomena.com/articles/hensels . Hensel's lemma is a situation where you use Newton's method, a great idea from calculus, to understand Diophantine equations!