5

I am more of a programmer than a mathematician, so in my mind a functions can take any type of input and can produce any kind of output. For example I see the derivative operator $\frac{d}{dx}$ as a function that takes a function as its argument and returns a function. Is this wrong in math?

CrabMan
  • 1,123
  • 7
  • 16
  • A function is by definition a type of relation with the condition that each input has one output. – Future Jan 22 '16 at 01:23
  • No it's not wrong, all those things are functions. We have different names for various sorts of functions to make things easier to follow - if I read something about an "operator" that tells me something different from if I read something about a functional". – David C. Ullrich Jan 22 '16 at 01:25
  • You may find this relevant. – goblin GONE Jan 22 '16 at 01:29

3 Answers3

2

The only 2 things you need to be certain about is that for each input there is only one possible output. You can't have "$f(x) = y$ such that $y^2 = x$" because both $\sqrt(x)$ and $-\sqrt(x)$ are acceptable output.

and that the output for a give input is consistent: $f(x) = $ a random number: is not a function.

and, I should mention, a function must be well defined. No matter how the input is expressed, its method of processing is clear and consistent. $f(a/b) = a + b$ is not a well defined function as $f(1/2) = 3 \ne f(2/4) = 6$ and $f(\pi) = ??????$.

But to say $d/dx$ is a function that maps $f$ to $f'$ is absolutely correct. In fact we consider the set of all real functions to be a topological space and we do study functions that map functions to functions. That isn't considered strange or weird or incorrect at all.

===

The technical definitions is $f:S \rightarrow T$ is a function that maps elements of a set S to elements of a set T if it is a collection of ordered pairs $F = ${$(a, b) | a \in S, b \in T$} so that the "a" terms are unique; that is to say. If (a, b) and (c, d) $\in F$ and $b \ne d$ then $a \ne c$.

There is no limitation whatsoever what the sets $S$ and $T$ are. They can be anything including sets of functions, sets of sets, sets rules or processes, programming points, whatever.

fleablood
  • 124,253
  • You're saying that function's method of processing must be clear and consistent. What about the busy beaver function? It's uncomputable. I dont think its method of processing is clear. – CrabMan Jan 22 '16 at 09:40
  • I didn't say the processing itself was clear and consistent. I'm saying it's definition and interpretation must be consistent. The busy beaver function, is clear and consistent. the function on 5 will be different if we interpret 5 as 2 + 3. What do you think is unclear about its method of processing? – fleablood Jan 22 '16 at 17:18
1

This is a perfectly reasonable view to adopt, especially when one is only working with the derivative of functions $\mathbb R\rightarrow\mathbb R$. For whatever reason, one more often sees the letter $D$ refer to the differentiation operator (which is basically another word for function), which is exactly the function you describe - it takes in a differentiable function and outputs the derivative. One can certainly express differentiation rules with this notation: $$D(f+g)=Df+Dg$$ $$D(f\cdot g)=(Df)\cdot g + f\cdot (Dg)$$ $$D(f\circ g)=(Df)\circ g \cdot Dg$$ and really, most any elementary notion about differential calculus can be expressed perfectly well - which tells us that we won't run into trouble just by treating the derivative as an a function operating on functions. This idea actually asserts itself as being very important in certain branches of analysis, where treating $D$ as a linear map lets us use linear algebra to address the theory of differential equations. It's worth noting that it would not be incorrect to call this simply a "function" rather than an "operator", but the latter is a more specific term (referring to functions between modules or vector spaces).

In elementary contexts, one might avoid various errors by considering your notion - for instance, it forces us to distinguish equality of functions and equality of values, so we won't look at an equation like $x^2=1$ and differentiate both sides to get $2x=0$. This sort of ambiguity presents itself pretty frequently, since we're using letters like $x$ both to denote the argument of a function and to denote variables, but thinking of things like the derivative as operating on functions largely saves us from this.

It is worth noting that there are alternate ways of viewing the notation $\frac{d}{dx}$. For instance, one may use differential forms, where we treat $d$ itself as an operator to write statements like: $$df(x)=f'(x)\,dx$$ which looks a lot like the notation $$\frac{d}{dx}f(x)=f'(x).$$ This view tends to cover differential calculus just as well, but extend more neatly to integral calculus. For instance, they make it easy to express substitution rules - like, one can note that $$\int_{x=0}^{x=1}dx=1$$ but substituting $2u=x$, we can differentiate to get $2du =dx$ in this notation and then actually substitute in for $dx$ $$\int_{x=0}^{x=1}2\,du=\int_{u=0}^{u=1/2}2\,du=1$$ whereas the analogous statement where we only have an integral operator acting on functions is harder to work with.

Milo Brandt
  • 60,888
0

In my opinion, this is perfectly correct, and even mathematicians use this perspective sometimes: for example, in some contexts we will view $\frac{d}{dx}$ as being a function of type

$$\mathbb{R}[x] \leftarrow \mathbb{R}[x],$$

where $\mathbb{R}[x]$ consists of all formal polynomials in the variable $x$ with coefficients in $\mathbb{R}$.

goblin GONE
  • 67,744
  • Why use an algebraic structure like $\mathbb R[x]$? Wouldn't a map $C^1(\mathbb R)\rightarrow C^0(\mathbb R)$ be more natural? Or, to loosen it, just from differentiable functions to Darboux functions? Or we could make domain and image equal as $C^{\infty}(\mathbb R)\rightarrow C^{\infty}(\mathbb R)$? – Milo Brandt Jan 22 '16 at 01:44
  • @MiloBrandt: Any of those, and more, can be used, depending on context. – Robert Israel Jan 22 '16 at 01:53
  • @MiloBrandt, I just used $\mathbb{R}[x]$ because it makes explicit that the dependent variable is called $x$. To do this with $C^1(\mathbb{R}),$ I'd have to invent my own notation. Which is probably worth doing, but not in the context of a short math.stackexchange answer. – goblin GONE Jan 22 '16 at 01:54
  • Thus you might say "derivative" is really a concept rather than a specific function (which would need a specific domain and codomain). In computer-science parlance you might call this an example of overloading. – Robert Israel Jan 22 '16 at 01:55
  • @RobertIsrael, yep, exactly. I think an algebraist would probably characterize partial differentiation as follows: $\frac{\partial}{\partial x} : \mathbb{R}[x,y,z] \leftarrow \mathbb{R}[x,y,z]$ is $\mathbb{R}$-linear, satisfies the product rule $$\frac{\partial}{\partial x}(pq) = p\frac{\partial}{\partial x}(q)+\frac{\partial}{\partial x}(p) q, $$ and satisfies $$\frac{\partial}{\partial x}x = 1, \frac{\partial}{\partial x}y = 0, \frac{\partial}{\partial x}z = 0.$$ So the concept of partial differentiation with respect to $x$ is really described by a list of axioms. – goblin GONE Jan 22 '16 at 02:00