Mr Davis 97 said:
I know that a function is typically defined as a mapping such as ##f: x\rightarrow f(x)##, but I am confused about how we really "define" functions. In many common texts, we define functions as ##f(x)##, such as ##f(x) = 2x##. And we say that we take the derivative of a function ##f(x) = 2x## by ##\frac{\mathrm{df(x)} }{\mathrm{d} x} = 2##. My question is, why do we define functions based on the output, ##f(x)##, rather than the actual function ##f##?
A function ##f## is, loosely speaking*, a "rule" that associates exactly one element of a set Y (the codomain) to each element of a set X (the domain). So to define a function ##f## with domain ##X## and codomain ##Y##, you have to specify, for each ##x## in ##X##, the ##y## in ##Y## that ##f## associates with ##x##. This ##y## is called the value of ##f## at ##x## and is denoted by ##f(x)##. (This is typically a number, not a function).
For example, the function that takes every real number to its square is the ##f## defined by ##f(x)=x^2## for all real numbers ##x##. Note the "for all" statement at the end. It's an essential part of the definition that's often omitted out of laziness. The "for all" part is what ensures that we have specified the output for every possible input.
Mr Davis 97 said:
And why do we call ##f(x)## the function when really ##f## is the function?
Good question. I find it annoying when people do. It doesn't make sense and causes a lot of confusion in many types of problems. But I must admit that I'm sometimes tempted to abuse the terminology in that way too. For example, if I'm asked for an example of a bounded function that doesn't have a limit at 0, I'm inclined to say ##\sin\frac{1}{x}##. The proper ways to say it include "the ##f## defined by ##f(x)=\sin\frac{1}{x}## for all real numbers ##x##" and "the function ##x\mapsto\sin\frac{1}{x}## with domain ##\mathbb R##".
Mr Davis 97 said:
Also, why do we say that a derivative is an operator that maps functions to functions, when the input to the operator is the output of the function ##f##, ##f(x)##, and not the actual function?
You got this one wrong. The derivative of a function is a function. In particular, the derivative of the function ##f## defined by ##f(x)=x^2## for all real numbers ##x##, is the function ##g## defined by ##g(x)=2x## for all real numbers ##x##. A number like ##f'(1)## isn't determined by ##f(1)##. This is just the number ##1##. ##f'(1)## is determined by the behavior of ##f## on an open interval (
any open interval actually) that includes ##1##.
A notation that reflects the fact that the derivative of a function is a function is ##f'=Df##. The operator ##D## takes a differentiable function as input, and produces a function as output. To define ##D##, we must specify the output ##Df## for every differentiable ##f##. So let ##f## be an arbitrary differentiable function (with domain ##\mathbb R##). We define the function ##Df## by
$$(Df)(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ for all real numbers ##x##.*) So what
exactly is a function? It's perfectly reasonable (even though it may not seem that way) to leave the term undefined, and just view what I said as a good way to
think about functions. Such an explanation of a term that's deliberately left undefined is called an
elucidation.
However, there's a branch of mathematics called ZFC set theory that's rich enough to include all the math you've ever heard of, and probably all the math you ever
will hear about. In this branch of mathematics, all definitions of terms associate a class of
sets with the term to be defined. So in this branch of mathematics, the definition of "function" must specify what
sets to call "functions". This is a good way to do it: (Unfortunately you must know a bit of set theory to understand this).
A triple ##(X,Y,f)## such that ##f\subseteq X\times Y## is said to be a
function if
(a) For all ##x\in X##, there's a ##y\in Y## such that ##(x,y)\in f##.
(b) For all ##x\in X## and all ##y,z\in Y##, if ##(x,y)\in f## and ##(x,z)\in f##, then ##y=z##.