Quick question:
Is it possible to differentiate a function with respect to another function, or is it limited to a particular variable?
I tried thinking around how to make this question make sense, but I can't figure it out!
I mean, $\frac{\mathrm{d}}{\mathrm{d}x}$ is a function which accepts a function, and returns a function (the derivative of the original function). However, $\frac{\mathrm{d}}{\mathrm{d}x}$ is not equal to $\frac{\mathrm{d}}{\mathrm{d}y}$, and not equal to $\frac{\mathrm{d}}{\mathrm{d}z}$, so it appears that the function for differentiation would be:
derivative :: (real -> real) -> variable with respect to which you are differentiating -> (real -> real)
so, why can't I do: $$ \begin{align} \text{let }f(x) &= \sin(x)\\ \text{let }g(x) &= \cos(x)\\ \frac{\mathrm{d}}{\mathrm{d}g} f(x) &=\ ??? \end{align} $$ and if I can, what is this called and where can I read more about this?
Sorry for badly formulating the question, but I am really curious on how to understand this idea, as I feel like I huge gap in understanding...
I would formulate this better, but the books on Calculus are so focused on applications and proofs, rather than explaining what it is, and when they try to explain what it is, they still do not explain it in terms that are useful to me. I am trying to understand how Calculus can be visualized under Category Theory, so that I can model it better in Haskell other programming languages.
Thanks! ~Dmitry