Special Function Derivative Network
The Wolfram Language contains more than 300 built-in mathematical functions. Consider the operation of differentiation applied to each of these functions. In most cases, one or more new functions appear in the resulting derivatives. Quantifying the connections gives an interesting study on the relationship between symbols and operations on them. In particular, the following example derives the network that arises from low‐order differentiation.
As learned in elementary calculus, differentiating the natural logarithm gives the reciprocal function.
D[Log[x], x]
On the other hand, for certain functions, a derivative can be expressed directly through the original function.
D[ProductLog[x], x]
The "LowOrderDerivatives" property of MathematicalFunctionData provides quick and convenient access to all derivatives.
Entity["MathematicalFunction", "EllipticF"][
EntityProperty["MathematicalFunction",
"LowOrderDerivatives"]] // TraditionalForm
Collect all functions and their argument patterns in order to identify the function after differentiation. (To avoid common occurrences of powers, do not look for the power and square root function.) For example, based on the identity , the function Sec involves the functions Tan as well as itself, resulting in two connections.
makeConnection[Entity["MathematicalFunction", "Sec"] ,
Function[{x}, Inactivate[D[Sec[x], x] == Sec[x] Tan[x]]]]
Analyze all derivatives, eliminate all trivial self-loops in the resulting graphs, and visualize the resulting graph structure.
Count the number of connections.
Flatten[allConnections, 1] // Length
Find self-loops.
selfLoops =
Select[ConnectedComponents[
Graph[Flatten[allConnections /. DirectedEdge -> UndirectedEdge,
1][[All, 1]]]], Length[#] == 1 &]
Find the groups of functions that are closed under differentiation and visualize as labeled graphs.
Most functions are part of the giant component of the graph. Mouse over the vertices to see the functions and over the edges to see the derivatives that connect the functions.
allConnectionsRest =
Select[Flatten[allConnections, 1],
FreeQ[#,
Alternatives @@
Flatten[{selfLoops, smallLoops}], \[Infinity]] &];
grf = Graph[allConnectionsRest[[All, 1]],
VertexLabels -> Placed["Name", Tooltip],
EdgeLabels -> ((#1 -> Tooltip[" ", Column[#2]]) & @@@
allConnectionsRest),
PerformanceGoal -> "Quality",
ImageSize -> Full]
Splitting the graph into communities shows elliptic functions, hypergeometric functions, window functions, zeta functions, and a few more groups of functions.
CommunityGraphPlot[grf,
FindGraphCommunities[grf, Method -> "Modularity"]]