Constant Function
Elementary
Think of a function as a machine that takes an input and gives an output. The function is constant if it gives the same output for every input.
High school
Consider a function $f$. The function is constant if $f(x) = c$ for every $x$ in its domain, for some fixed $c$.
Examples
Examples
-
$x \mapsto 5$ is a constant function, because it gives the same output, $5$, for every input.
Non-examplesThings that may be mistaken for examples of this term.
-
$x \mapsto \abs{x}$ is not constant.
-
$x \mapsto x$ is not a constant function, because different inputs give different outputs: $1 \mapsto 1$ and $2 \mapsto 2$.
-
✗ Energy $H = \frac{1}{2}(p^2 + q^2)$, for the oscillator $\dot{q} = p$, $\dot{p} = -q$ UndergraduateThe energy $H$ is not a constant function, because different solutions have different energies.
All definitions · All distinctions · All examples · Notation