Continuous function (source code)

= Continuous function
{title2=$\lim_{x\to a}f(x)=f(a)$}
{wiki}

= Continuous
{synonym}

= Continuity
{synonym}

A <continuous function> sends sufficiently nearby <function inputs> to nearby <function outputs>. For a <real-valued function> $f:D\to\mathbb R$ and a point $a\in D$ that is an <accumulation point> of $D$, this means
$$
\lim_{\substack{x\to a\\x\in D}}f(x)=f(a).
$$
The approached value and the assigned value must agree. <Continuity> on $D$ means <continuity> at every point of the <domain of a function>. At an endpoint of an <interval>, only approaches inside that <domain of a function> count. The <epsilon-delta definition of continuity> below also applies at an isolated point, where <continuity> holds automatically.<Calculus Volume 1 by Gilbert Strang and others/Calculus Volume 1, §2.4 Continuity>[§2.4, Continuity at a Point: definition; Continuity over an Interval: one-sided endpoint conditions]{ref}

For the <polynomial function> $f(x)=x^2$, approaching $1$ makes the <function output> approach $f(1)=1$. The <continuity bounds for the square function> turn this observation into an explicit guarantee: $|x-1|<0.2$ implies $|x^2-1|<0.6$. This is useful whenever a small error in an <function input> must produce a controlled error in an <function output>. The required input tolerance can depend on the point and on the chosen output tolerance.

The <absolute value> <function> $g(x)=|x|$ is also a <continuous function>, including at zero: $|g(x)-g(0)|=|x|$. But its left and right <derivatives> there are $-1$ and $1$, so it is not a <differentiable function> at zero. <Continuity> controls values without requiring a <tangent line>. Conversely, a <differentiable function> is <continuous> wherever it is <differentiable>: if $f(a+h)-f(a)=h(f'(a)+o(1))$, the difference tends to zero with $h$.

Several useful consequences reuse this one local idea. <Addition>, <multiplication> and <function composition> preserve <continuity>; a <quotient of functions> is <continuous> where its denominator is nonzero. On an <interval>, the <intermediate value theorem> turns <continuity> into a guarantee that no intermediate <function output> is skipped. On a <compact set>, the <extreme value theorem> guarantees attained maximum and minimum values. Those extra hypotheses matter: <continuity> alone on an unbounded <domain of a function> does not provide a global bound or an attained <global maximum>.

A <rational function> such as $x\mapsto1/x$ is <continuous> on its <domain of a function> $\mathbb R\setminus\{0\}$. Zero is excluded from that <domain of a function>; the missing point prevents a <continuous> extension there, but it does not make the existing map <discontinuous> at one of its actual inputs. Always state the <domain of a function> before judging <continuity>.