I've attached an image to this post. It essentially shows the equation for the first partial derivative using chain rule, which makes sense. What I'm confused with is how the second partial derivative was formulated. It seems they've simply squared the first partial derivative to find the second partial derivative. It seems a little odd but is this a valid operation? Would I cube it to find the 3rd partial derivative? Could anyone possibly explain the intuition behind why this is allowed (possibly directing me to a proof to also explain, if possible)? Thank you!