The chain rule is a method that allows you to differentiate a function of a function, which can be of the form y = f[g(x)]. That is, g is a function of x and f is a function of g, which in turn is a function of x. An example could be y = (5x2+1)1/2. In this case g(x) = 5x2+1 and f(x) = x1/2, so when we write f[g(x)], g(x) takes the role of the variable x. Chain rule states that if y = f[g(x)], then dy/dx = f'[g(x)]g'(x).
Applying this definition:
f'(x) = 0.5*x-1/2
g'(x) = 10x
Combine the results and replace x with g(x) in f'(x), then:
dy/dx = f'[g(x)]g'(x) = 0.5(5x2+1)-1/2(10x) = 5x(5x2+1)-1/2 which is the final result.
The way I like to think of this method is to identify the main function which I know how to differentiate without applying the chain rule (in this case y is of the form xn). Whatever is within this function (probably another function - in this case 5x2+1) replace it with x. Then differentiate like the inner function is simply the variable x (dy/dx = 0.5(5x2+1)-1/2) and finally multiply the result with the derivative of the variable x, which is now a function .((5x2+1)' = 10x -> dy/dx = 0.5(5x2+1)-1/2*(10x) = 5x(5x2+1)-1/2 ).
Here is an example of a more complex number:
f(x) = x2(3x-1)-1/2
This example requires the application of the product rule and the chain rule.
Product rule states that: (uv)' = u'v + uv'
In this example u = x2 and v = (3x-1)1/2
u' = 2x and v' = 0.5(3x-1)-1/2*3 = 1.5(3x-1)-1/2 (by applying the chain rule - think of 3x-1 simply as x and apply the above procedure)
Then,
f'(x) = (2x) (3x-1)1/2 + (x2)(1.5(3x-1)-1/2 )
which can then be simplefied to [x(15x-4)]/[2(3x-1)1/2]