Chain Rule - In order to differentiate a function of a function, say #y, =f(g(x))#, where we have to find #(dy)/(dx)#, we need to do (a) substitute #u=g(x)#, which gives us #y=f(u)#. Then we need to use a formula called Chain Rule, which states that #(dy)/(dx)=(dy)/(du)xx(du)/(dx)#. In fact if we have something like #y=f(g(h(x)))#, we can have #(dy)/(dx)=(dy)/(df)xx(df)/(dg)xx(dg)/(dh)#
For example for #y=ln(sin^2(x^2+1))#, we can have
#y=ln(f(x))#, #f(x)=(g(x))^2#, #g(x)=sin(h(x))# and #h(x)=x^2+1#
then #(dy)/(dx)=(dy)/(df)(df)/(dg)(dg)/(dh)(dh)/(dx)#
= #1/(f(x))xx2g(x)xxcos(h(x))xx2x#
= #1/sin^2(x^2+1)xxsin(x^2+1)xxcos(x^2+1)xx2x#
= #(2sin(x^2+1)cos(x^2+1)x)/sin^2(x^2+1)#
= #(xsin(2x^2+2))/sin^2(x^2+1)#