derive()

Derives this function and returns the resulting function (df/dx) f. In fact it applies the differential operator on this function.

For a set A ⊆ Rn(or a banach space(?)) we define

the differential operator
D=∂/∂x:(A→Rm)→(A→Hom(Rn,Rm)) ⊂ (A→(RnRm)); f ↦ Df
where

Df:A→Hom(Rn,Rm); x ↦ (Df)(x),
(Df)(x):RnRm; h ↦ (Df)(x)(h) = f'(x)·h with f'(x)∈Rm×n (which is the functional matrix)

If f is derivable at x∈Rn it is
(f(x+h) - f(x) - (Df)(x)(h)) / ||h|| → 0 (h→0)
the total derivative
df/dx = f' = ∂f/∂x = (∂fi/∂xj)i,j = ( ∇f1 ) = [ ∂f1/∂x1, ∂f1/∂x2, , …, ∂f1/∂xn ]
∇f2 ∂f2/∂x1, ∂f2/∂x2, …, ∂f2/∂xn
∇fm ∂fm/∂x1, ∂fm/∂x2, …, ∂fm/∂xn
The total derivative df/dx:A→Rm×n can be identified with the matrix of Df. Note that we identify a matrix of real-valued unary functions with a matrix-valued function, here. If it exists it is identical to the functional matrix or Jacobi matrix of the partial derivatives ∂fi/∂xj. Note that if we identify Hom(Rn,Rm) = Rm×n it is true that f' = Df.
the total differential
(Df)(x)(dx) = f'(x)·dx = ∂f/∂x(x)·dx = ∂f/∂x1(x)dx1 + ∂f/∂x2(x)dx2 + … + ∂f/∂xn(x)dxn for h:=dx∈Rn.