$$\dfrac{\partial}{\partial x}\bigg(\frac{d}{dt} f(x(t)g(t))\bigg)$$
I begin substituting $y=xg$ and get
$$\dfrac{\partial}{\partial x}\bigg(\frac{df}{dy} (y(t))\cdot (x'(t)g(t)+x(t)g'(t))\bigg)$$
$$\dfrac{\partial}{\partial x\partial y}(y)\cdot (x'(t)g(t)+x(t)g'(t))+\dfrac{df}{dy}(y)\cdot(x''(t)g(t)+g'(t))$$
How could I improve this?
Thank you!
Let $x=x(t)$ and assume that $x$ is invertible. Then, from the chain rule
$$\begin{align} \frac{d}{dx}\frac{dx}{dt}&=\frac{d x'(t)}{dx}\\\\ &=\frac{dx'(t)}{dt}\frac{dt}{dx}\\\\ &=\frac{x''(t)}{x'(t)} \end{align}$$
Now, with $x(t)$ invertible, we can write
$$\begin{align} \frac{d }{d x}\frac{df(x(t)g(t))}{dt}&=\frac{d}{dt}\frac{df(x(t)g(t))}{dt}\times\frac{dt}{dx}\\\\ &=\frac1{x'(t)}\frac{d^2f(x(t)g(t))}{dt^2}\end{align}$$
And the rest is left to the reader.