# Second order partial derivative of an unknown function

Given that $U=U\left(\frac{S_1}{S_2},t\right)$ and I find the derivative wrt $S_1$ of $U$ to obtain: $\frac{1}{S_2} \frac{\partial U}{\partial S_1}$, when I now want a second derivative wrt $S_1$, do I have $\frac{1}{S_2^2}\frac{\partial^2 U}{\partial S_1^2}$ or $\frac{1}{S_2}\frac{\partial^2 U}{\partial S_1^2}$ and why.

Just take the partial derivative $$\frac{\partial}{\partial S_1}\bigg(\frac{1}{S_2}\frac{\partial U}{\partial S_1}\bigg)=\frac{1}{S_2}\frac{\partial}{\partial S_1}\bigg(\frac{\partial U}{\partial S_1}\bigg)=\frac{1}{S_2}\frac{\partial^2 U}{\partial S_1^2}\frac{\partial}{\partial S_1}\bigg(\frac{S_1}{S_2}\bigg)=\frac{1}{S_2}\frac{\partial^2 U}{\partial S_1^2}\frac{1}{S_2}=\frac{1}{S_2^2}\frac{\partial^2 U}{\partial S_1^2}$$