# Compute derivative of a composed function leaving indicated some derivatives [closed]

Is there a way to define in Mathematica a generic differentiable function $g:\mathbb{R}^2\rightarrow \mathbb{R}$ in such a way that when it computes the derivatives of a composed function involving $g$ it leaves indicated the derivatives of $g$ instead of actually computing them?

I'll explain myself better with an example:

Suppose we have defined this "generic" $g:\mathbb{R}^2\rightarrow \mathbb{R}$ and we have defined $F:\mathbb{R}\rightarrow \mathbb{R}$, $F(x)=7Log[x]$. When given the command $D(F(g(x,y)),x)$ I would like to have the output $7\partial_x(g)/g$. Is it possible?

• Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
– user9660
Oct 25, 2016 at 15:11

It is not only possible, it is actually quite straightforward. Define f in the usual way:

f[x_] := 7 Log[x]


Then take the derivative of the composition with g[x,y] (being an "undefined" generic function). The answer is as you expect:

D[f[g[x, y]], x] So there is no need to specially define the function g[x,y].