Validity of constant functions Is a constant function, like $y = 3$, defined for all inputs?
A function is defined at some arbitrary point if it has a value at that point, yes?
And constant functions have values for all inputs, namely the constant.
So they should be defined for all inputs, right?
I'm learning about Maclaurin's series, and it states that the function and its nth derivatives must be defined at $x = 0$.
Would it work with a constant function?
Thank you.
 A: Yes. For all inputs, it is defined as simply the constant.
With regards to Maclaurin series, note that $\frac{d^ny}{dx^n}{(3)}=0 $ $\forall n\in\Bbb Z, n\ge1$, thus $f(x)=f(0)=3$
A: Most of the time, yes. But it can depend on how you define the function. Generally when we write $y = 3$ we mean the function $y : \mathbb{R} \to \{3\}$. In this case, it is defined for all real input.
However, if we defined something like $y : [0,1] \to \{3\}$, then it is not well-defined for all real input.
A: The short (and imprecise) answer to your question is yes. But to answer this question precisely we should recall the definition of a function:
Definition: A function $f: X \to Y$ from a set $X$ to a set $Y$ is a set $G$ of ordered pairs $\{(x,y)~|~x \in X\}$ where there is exactly one pair $(x,y)$ for each $x$ in $X$. The set $X$ is called the domain of $f$; the set $Y$ is the codomain. The range of $f$ is the subset of $Y$ consisting of all $y$ such that $(x,y)$ is in $G$.
The key fact here is that the domain and codomain are part of the definition of a function: once a function (any function) is defined it is defined for all inputs.
In light of this key fact, the expression $y = 3$ does not define a function because the domain and codomain are not specified. For different choices of domain and codomain we obtain different functions. Here are some examples:


*

*Let $X = Y = \mathbb{R}$ and $~f_1:X \to Y$ be given by $~f_1(x)=3$.

*Let $X = \mathbb{R}$, $Y=\mathbb{Z}$ and $~f_2:X \to Y$ be given by $~f_2(x)=3$.

*Let $X = \mathbb{R}$, $Y=\{3,4\}$ and $~f_3:X \to Y$ be given by $~f_3(x)=3$.

*Let $X = \{3,4\}$, $Y=\{3,4\}$ and $~f_4:X \to Y$ be given by $~f_4(x)=3$.


So the precise answer to your question is that the expression $y=3$ is not a function. Once we specify a domain $X$ and codomain $Y$ (where $3 \in Y$) we can define a function by the set $\{(x,3)~|~x \in X\}$ and this is defined for all input values $x \in X$.
