We use the chain rule to differentiate when we are given a function within another function (formally, this is written f(g(x)).) An example would be y=e^2x, as the function 'u=2x' is embedded in the function y=e^u. We differentiate y=e^2x with respect to x in the following way. Firstly, let the inner function be u=2x and then let y=e^u. We then differentiate these two functions separately and multiply them together. We get du/dx=2 and dy/du=e^u and hence, dy/dx=2e^2x