In mathematics, nonstandard calculus is the name for the modern application of infinitesimals, in the sense of nonstandard analysis, to differential and integral calculus. It provides a rigorous justification of what were previously believed to be purely formal calculations of infinitesimal calculus. Calculations with infinitesimals were widely used before the theory of limits replaced them in the 19th century. See history of calculus. To quote H. Jerome Keisler:
After the introduction of limits and prior to Robinson, mathematicians thought of infinitesimals in terms of "naive befogging" and "vague mystical ideas". Thus, Richard Courant wrote on page 81 of Differential and Integral Calculus, Vol I as follows:
and again on page 101:
To calculate the derivative of the function f(t)=t^{2} at the value x, both approaches agree on the algebraic manipulations:
This calculation becomes an example of a computation in nonstandard calculus, once we interpret Δx as an infinitesimal, and as the relation of being infinitely close. In more detail, note that the final term Δx must be discarded to define the derivative. In the standard approach, this is done by taking the limit as Δx tends to zero. In the nonstandard approach, the quantity Δx is considered an infinitesimal number, namely a nonzero number which is closer to 0 than any nonzero standard real.
The derivative of f at x is then 2x, because it only differs from 2x by an infinitesimal quantity. Stripping away the error term, accomplished by an application of the standard part function, was historically considered paradoxical by some writers, most notably George Berkeley. In his famous criticism of calculus, he named the discarded error terms, the ghosts of departed quantities.
The hyperreals are constructed in the framework of ZFC, the standard axiomatisation of set theory used elsewhere in mathematics. To give an intuitive idea for the hyperreal approach, note that, naively speaking, nonstandard analysis postulates the existence of positive numbers ε which are infinitely small, meaning that ε is smaller than any standard positive real, yet greater than zero. Every real number is surrounded by an infinitesimal "cloud" of hyperreal numbers infinitely close to it. To define the derivative of f in this approach, one no longer needs an infinite limiting process as in standard calculus. Instead, one sets
where st is the standard part function, yielding the standard real number infinitely close to the hyperreal argument of st. The addition of st to the formula resolves the centuriesold paradox already severely criticized by George Berkeley (see Ghosts of departed quantities), and provides a rigorous basis to the approach of Newton, Leibniz, and Bonaventura Cavalieri.
A real function f is continuous at x if for every hyperreal x' infinitely close to x, the value f(x') is also infinitely close to f(x).
Here to be precise, f would have to be replaced by its natural hyperreal extension usually denoted f^{*} (see discussion of extension principle in main article at nonstandard analysis).
Using the notation for the relation of being infinitely close as above, the definition can be rewritten in an even shorter form as follows:
A function f is continuous at x if whenever , one has .
The above requires fewer quantifiers than the (ε, δ)definition familiar from standard elementary calculus:
f is continuous at x if for every ε>0, there exists a δ>0 such that whenever xx'  < δ, one has ƒ(x) − ƒ(x' ) < ε.
A function f on an interval I is uniformly continuous if its natural extension f* in I* has the following property (see Keisler, Foundations of Infinitesimal Calculus ('07), p. 45) depending only on the pointwise cluster:
for every pair of hyperreals x and y in I*, if then .
This definition has a reduced quantifier complexity when compared with the standard (ε, δ)definition. It has the same quantifier complexity as the definition of uniform continuity in terms of sequences in standard calculus, which however is not expressible in the firstorder language of the real numbers.
Furthermore, the hyperreal definition as stated above is local in the sense that it only depends on the monad of each point in I*. Meanwhile, the standard (ε,δ)definition is global in the sense that it is formulated in terms of pairs of points.
The localness of the hyperreal definition can be illustrated by the following three examples.
Example 1: a function f is uniformly continuous on the semiopen interval (0,1], if and only if its natural extension f* is continuous (in the sense of the formula above) at a positive infinitesimal, in addition to continuity at the standard points of the interval.
Example 2: a function f is uniformly continuous on the semiopen interval [0,∞) if and only if it is continuous at the standard points of the interval, and in addition, the natural extension f* is continuous at every positive infinite hyperreal point.
Example 3: similarly, the failure of uniform continuity for the squaring function
is due to the absence of continuity at a single infinite hyperreal point, see below.
Concerning quantifier complexity, the following remarks were made by Kevin Houston:^{[1]}
“  The number of
quantifiers in a mathematical statement gives a rough measure of
the statement’s complexity. Statements involving three or more
quantifiers can be difficult to understand. This is the main reason
why it is hard to understand the rigorous definitions of limit,
convergence, continuity and differentiability in analysis as they
have many quantifiers.
In fact, it is the alternation of the and that causes the complexity. 
” 
The fact that a continuous function on a compact interval I is necessarily uniformly continuous (the Heine–Cantor theorem) admits a succinct nonstandard proof. Let x, y be hyperreals in (the natural extension of) I. Since I is bounded, both x and y admit standard parts. Since I is closed, st(x) and st(y) belong to I. If x and y are infinitely close, then by the triangle inequality, they have the same standard part
Since the function is assumed continuous at c, we have
and therefore f(x) and f(y) are infinitely close.
Let f(x) = x^{2} defined on . Let be an infinite hyperreal. The hyperreal number is infinitely close to N. Meanwhile, the difference
is not infinitesimal. Therefore the squaring function is not uniformly continuous, according to the definition in uniform continuity above.
A similar proof may be given in the standard setting (Fitzpatrick 2006, Example 3.15).
Consider the Dirichlet function
It is wellknown that the function is discontinuous at every point. Let us check this in terms of the nonstandard definition of continuity above, for instance let us show that the Dirichlet function is not continuous at π. Consider the continued fraction approximation a_{n} of π. Now let the index n be an infinite hyperinteger. By the transfer principle, the natural extension of the Dirichlet function takes the value 1 at a_{n}. Note that the hyperrational point a_{n} is infinitely close to π. Thus the natural extension of the Dirichlet function takes different values at these two infinitely close points, and therefore the Dirichlet function is not continuous at π.
While the thrust of Robinson's approach is that one can dispense with the limittheoretic approach using multiple quantifiers, the notion of limit can be easily recaptured in terms of the standard part function st, namely
if and only if whenever the difference x − a is infinitesimal, the difference ƒ(x) − L is infinitesimal, as well, or in formulas:
cf. (ε, δ)definition of limit.
Given a sequence of real numbers , if we say L is the limit of the sequence and write
if for every nonstandard hyperinteger n, we have st(x_{n})=L (here the extension principle is used to define x_{n} for every hyperinteger n).
This definition has no quantifier alternations.The standard (ε, δ)style definition on the other hand does have quantifier alternations:
As another illustration of the power of Robinson's approach, we present a short proof of the intermediate value theorem (Bolzano's theorem) using infinitesimals.
Let f be a continuous function on [a,b] such that f(a)<0 while f(b)>0. Then there exists a point c in [a,b] such that f(c)=0.
The proof proceeds as follows. Let N be an infinite hyperinteger. Consider a partition of [a,b] into N intervals of equal length, with partition points x_{i} as i runs from 0 to N. Consider the collection I of indices such that f(x_{i})>0. Let i_{0} be the least element in I (such an element exists by the transfer principle, as I is an internal set; see nonstandard analysis). Then the real number
is the desired zero of f. Such a proof reduces the quantifier complexity of a standard proof of the IVT.
In an axiomatic formal treatment of numbers, there are symbols for numbers such as 1,2,3,4, rational numbers like 4/5, 7/17, and certain irrational quantities which have a precise definition: for example can be defined as the smallest positive value where sin(x) is zero. But there are infinitely many numbers which cannot be given an explicit name, because the set of all names is countable, while the real numbers are not.
To any formal axiomatic description of the real numbers it is possible to add axioms that describe numbers which otherwise would be inaccessible. For Robinson's argument, the new axioms are of the form:
and so on, making an infinite list of axioms. Any finite number of these axioms is consistent, meaning that it cannot lead to a logical contradiction, because there actually is an explicitly nameable which is smaller than 1/N for any N. But when the list is allowed to be infinite, the symbol ε becomes a quantity which cannot be named since it is positive, but smaller than the reciprocal of any rational number. It has become infinitesimal.
In logic, deductions are not allowed to use infinitely many statements the deductions must end after finitely many steps. So any deduction from this infinite list of axioms can never reach a contradiction. The reason is that such a deduction only uses finitely many of the axioms, and would therefore also be valid if only finitely many of the axioms are kept. But any finite truncation of this list of axioms is consistent.
So the theory of the real numbers including infinitesimals is equally consistent with the theory of real numbers without them, although it requires an infinite list of new axioms to make sure that the infinitesimals are there.
Along with the infinitesimal quantity come all the quantities which can be formed by multiplication and addition. These are the polynomials in positive and negative powers of , the nonstandard numbers. A nonstandard real number is finite if it involves no negative powers of , and it is infinitesimal if it additionally doesn't have a constant term. Since ε is a quantity in a theory of the real numbers, any function which is defined for all positive real numbers sufficiently close to zero is consistently defined for ε too, although its value is just as impossible to name explicitly as itself.
The standard part A of a nonstandard number B is the unique standard number such that AB is infinitesimal.
If f is a real valued function defined on an interval [a, b], then the transfer operator applied to f, denoted by *f, is an internal, hyperrealvalued function defined on the hyperreal interval [*a, *b].
Theorem. Let f be a realvalued function defined on an interval [a, b]. Then f is differentiable at a < x < b if and only if for every nonzero infinitesimal h, the value
is independent of h. In that case, the common value is the derivative of f at x.
This fact follows from the transfer principle of nonstandard analysis and overspill.
Note that a similar result holds for differentiability at the endpoints a, b provided the sign of the infinitesimal h is suitably restricted.
For the second theorem, we consider the Riemann integral. This integral is defined as the limit, if it exists, of a directed family of Riemann sums; these are sums of the form
where
We will call such a sequence of values a partition or mesh and
the width of the mesh. In the definition of the Riemann integral, the limit of the Riemann sums is taken as the width of the mesh goes to 0.
Theorem. Let f be a realvalued function defined on an interval [a, b]. Then f is Riemannintegrable on [a, b] if and only if for every internal mesh of infinitesimal width
is independent of the mesh. In this case, the common value is the Riemann integral of f over [a, b].
One immediate application is an extension of the standard definitions of differentiation and integration to internal functions on intervals of hyperreal numbers.
An internal hyperrealvalued function f on [a, b] is Sdifferentiable at x, provided
exists and is independent of the infinitesimal h. The value is the S derivative at x.
Theorem. Suppose f is Sdifferentiable at every point of [a, b] where b − a is a bounded hyperreal. Suppose furthermore that
Then for some infinitesimal ε
To prove this, let N be a nonstandard natural number. Divide the interval [a, b] into N subintervals by placing N − 1 equally spaced intermediate points:
Then
Now the maximum of any internal set of infinitesimals is infinitesimal. Thus all the ε_{k}'s are dominated by an infinitesimal ε. Therefore,
from which the result follows.
