A good way to remember this is to imagine a burrito wrapped in foil. You have to unwrap the foil around the burrito to eat the burrito inside. The same goes for Chain Rule. You have to take the derivative of the outside (the outer function) and then derive the inside (the inner function).
Ex: f(x) = sin(x^2)
f'(x) = (derivative of outside) . (derivative of inside)
= cos(x^2) . (2x)
Ex: f(x) = cos(sin(x))
f'(x) = (derivative of outside) . (derivative of inside)
We can directly apply the formula F'(x) = f'(g(x)).g'(x) = cos(ax+b) . a
## For a function composite of more than two function :
Let _F_ be a real valued function which is a composite of four functions _r s t u_ i.e. `F(x)=r(s(t(u(x))))` and all the functions _r(x) s(x) t(x) u(x)_ are differentiable.