# chain rule - second derivative

I am reading this paper where it is given

where $x = g(s,\alpha)$ and $u$ is a function of $x$.

The above expression is for a given $\alpha$.

The first equation is straight forward from chain rule. However, I am not able to obtain the second equation.

When I apply chain rule, this is what I get

$$\frac{d^2u}{ds^2} = \frac{d}{ds}\Big(\frac{du}{ds}\Big) = \frac{d}{dx}\Big(\frac{du}{dx}\ g'\Big)\frac{dx}{ds}$$ $$\frac{d^2u}{ds^2} = \bigg[g' \frac{d}{dx}\Big(\frac{du}{dx}\Big) + \frac{d}{dx}\Big(\frac{dx}{ds}\Big) \frac{du}{dx}\bigg]g'$$

where $g' = \frac{dx}{ds}$

How do I go further to arrive at the above expression?

First notice that by chain rule we have $$\dfrac d{dx} = \frac 1{g'(s,\alpha)}\dfrac d{ds}$$ and thus we have