Chain rule
From Maths
Definition
1 dimensional case
Here f(x) and g(t) are functions:
ddt[f∘g]=dfdx|g(t)dgdt
Then:
d2dt2[f∘g]=ddt[dfdx|g(t)dgdt] =dfdx|g(t)⋅ddt[dgdt]+dgdt⋅ddt[dfdx|g(t)] =dfdx|g(t)⋅d2gdt2+dgdt⋅ddt[dfdx|g(t)]
That is:
d2dt2[f∘g]=dfdx|g(t)⋅d2gdt2+dgdt⋅ddt[dfdx|g(t)]
Little can be done about ddt[dfdx|g(t)] at this point. It is "the change in the rate of change of f with respect to x taken at g(t) with respect to t" which has little to do with d2fdx2 computationally.