https://www.primo-engineering.com/2017/11/3-3-partial-derivative-and-chain-rule.html