# How do I map an operator over a list of functions?

Long-time programmer, but new to Mathematica (and for that matter, math). I'm trying to do something that feels pretty basic to me, but that for the life of me, I can't make work:

I want to, having input an array of functions, map them through a higher-order function, resulting in a different array of functions. Something like, very vaguely, this:

D /@ {Sin, Cos, Tan}  (*→ {Cos[x], -Sin[x], Sec[x]^2} *)


(I already understand that I'm using the wrong words to ask this question — but I'm not yet too familiar with Mathematica's terms for things I'd have considered “basic programming things”, as evidenced by the fact that I seem unable to drag a straight answer to this question out of Google and/or Mathematica's documentation. 🤣)

Pursuant to avoiding an X/Y question, here's my current little goal (although doing this in such an over-complicated way is obv. just a learning-Mathematica-programming exercise):

Create a table of the first and second derivatives for each of the trigonometric, inverse-trigonometric, and hyperbolic functions: Sin[x]Cos[x]-Sin[x], so on, so forth, to then copy into a LaTeX document.

I know I can complete the last bit of that with // TableForm, but the first part is stumping me, short of manually typing out {{Sin[x], Cos[x], Tan[x], ...}, {D[Sin[x], x], D[Cos[x], x], D[Tan[x], x], ...}, {...}, {...}}

• You want Derivative[] for this: Derivative[1] /@ {Sin, Cos, Tan}. If pure functions still make you uncomfortable: Through[(Derivative[1] /@ {Sin, Cos, Tan})[x]]. Sep 11, 2017 at 2:25
• Actually D can do it too. See my answer below. Sep 11, 2017 at 4:39
• For copying to a LaTex document, you can use TeXForm[Table[...]] which will simplify the process a little. Also, if you want to evaluate the functions in the table, one easy way is to define the table as a function: funderivs[x_] = Table[D[...]]. Another way would be to use @J.M.'s pure functions. It would depend on how you want to use them. Sep 11, 2017 at 4:47

funcs = {Sin, ArcSin, Cos, ArcCos, Tan, ArcTan};

• Actually, just the D[ #[x], x] & is precisely what I was looking for — even though I didn't know. Thank you! Sep 11, 2017 at 15:57