For example, take a function $\sin x$. The derivative of this function is $\cos x$.

The chain rule states that $\frac{d}{dx} (f(g(x)))$ is $\frac{d}{dx} g(x) \frac{d}{dx} (f(g(x)))$. Again going back to the example above, now instead of $\sin x$ lets take $\sin 2x$.

Differentiating it without chain rule, we get $\cos 2x$. However, using chain rule, we get $2\cos 2x$.

So now the problem is that I don't see the purpose behind the chain rule. Why should $\sin 2x$ be $2\cos 2x$?

Is there any proof behind this chain rule? I really need to know as I getting many questions wromg without using the chain rule.

  • 2
    $\begingroup$ " Why should $\sin 2x\;$ be $\;2\cos 2x$?" No, it isn't: its derivative is. Why? Because that's what we get from theorems or from the definition of derivative as limit. That's all. And yes: of course there is proof of the chain rule: any decent calculus book includes it. $\endgroup$ – DonAntonio Mar 17 '19 at 0:24
  • $\begingroup$ In your post, when you are 'differentiating without chain rule', you are differentiating $\sin 2x$ with respect to $2x$, rather than with respect to $x$. $\endgroup$ – Minus One-Twelfth Mar 17 '19 at 0:24
  • $\begingroup$ @DonAntonio what i meant was derivative. I was just writing that in short. U shoukd be able to understand that as this whole post is about derivative $\endgroup$ – rash Mar 17 '19 at 0:28
  • $\begingroup$ @MinusOne-Twelfth whether i am taking with respect to 2x or x, the derivative value isnt the same and thats my confusion. For example derivative of $\sin 2x$ where $\pi\over 2$. Differentiating with respect to 2x is -1 & with respect to x is -2. Why? $\endgroup$ – rash Mar 17 '19 at 0:32
  • 1
    $\begingroup$ @littleO I didnt say it was correct. It is just my confusion of why should it not be like that and should be $2\cos x$ $\endgroup$ – rash Mar 17 '19 at 0:33

This is a good question in my opinion. WHY is the chain rule right? My quick answer is that you are using the chain rule already without knowing it in the product rule, power rule, ect: $$ \frac{d}{dx}x^n = nx^{n-1}\cdot \frac{d}{dx}x = nx^{n-1} $$ So when you differentiate $\sin x$ you are actually doing $\cos x \cdot x' = \cos x$. For a more detailed answer, lets look at the definition of the derivative.

$$ F'(x) = \lim_{y\rightarrow x}\frac{F(x)-F(y)}{x-y} $$ so let $F(x) = f(g(x))$ and what do we get? $$ F'(x) = \lim_{y\rightarrow x}\frac{f(g(x)) - f(g(y))}{x-y} $$ which we can't evaluate. Let us assume that $g(x) \ne g(y)$ when $x$ is 'close' to $y$, then we can multiply the whole thing by 1 to get the product of two derivatives: $$ F'(x) = \lim_{y\rightarrow x}\frac{f(g(x)) - f(g(y))}{g(x)-g(y)}\cdot \lim_{y\rightarrow x} \frac{g(x)-g(y)}{x-y} = f'(g(x))g'(x) $$ where if we want to be picky we can consider $g(x)=g(y)$ too.

(What follows is quite informal) The chain rule actually says something fundamental about composition. We can think of the function $g(x)$ as 'stretching' or 'shrinking' the domain of $f$. When we differentiate we are differentiating with respect to $f$ under an 'unstretched' domain and must correct for our error by multiplying by the derivative of $g$ which is a measure of how severely the domain was stretched. This is why the power rule ect. do not seem to use the chain rule, the domain is unstretched, so our derivative doesn't need to be corrected at all!

For your example of $\sin 2x$ lets think about what is going on, we are essentially squeezing $\sin x$ in the $x$ direction. But this will make the slope of the sine function increase in a predictable way, in fact the slope at every point of this squeezed graph is twice as big as the original sine graph, exactly as predicted by the chain rule!

For more complicated $g(x)$ the chain rule measures the rate at which the domain is changing from $x$ at every point to make the derivative correct.


Visually, the derivative is the slope of the tangent line, and the derivative allows us to take a nonlinear function $f$ and approximate it locally with a linear function (that is, a function whose graph is a straight line). In other words, if we know the value of $f(x)$, we can approximate the value of $f$ at a nearby point $x + \Delta x$ as follows: $$ \tag{1} f(x + \Delta x) \approx f(x) + f'(x) \Delta x. $$

Now suppose that $f(x) = g(h(x))$. Then we can approximate $f(x + \Delta x)$ by using the above approximation twice, first with $h$ and then with $g$, as follows: \begin{align} f(x + \Delta x) &= g(h(x + \Delta x)) \\ &\approx g(h(x) + h'(x) \Delta x) \\ &\approx g(h(x)) + g'(h(x)) h'(x) \Delta x. \end{align} Comparing this result with equation (1), we see that $$ f'(x) = g'(h(x)) h'(x). $$

This is not yet a rigorous proof, but it shows how easy it is to discover the chain rule, and this derivation can be made into a rigorous proof without too much additional effort.


When you said that the differentiation of $\sin2x$ is $\cos2x$, you didn't actually differentiate $\sin 2x$ with respect to $x$, you differentiated it with respect to $2x$. Because the differentiation rule is that $$ \frac{d}{dx}\sin x = \cos x$$

so, only by replacing ALL $x$ in the formula above can you follow the same rule without breaking it, which is $$ \frac{d}{d(2x)}\sin 2x = \cos 2x$$

However, the question isn't asking you to find $\frac{d}{d(2x)} \sin 2x$, it is asking you to find $\frac{d}{dx} \sin 2x$. See the difference here?

Since you differentiated the outer function,$f$, with respect to $2x$, you differentiated it with respect to the inner function because $g(x)=2x$. So you actually got $\frac{df}{dg}=\cos 2x$. To get from $\frac{df}{dg}$ to $\frac{df}{dx}$, you just need to multiply by $\frac{dg}{dx}$ because: $$\frac{df}{dg}\times\frac{dg}{dx} = \frac{df}{dx} $$ after cancelling out the $dg$. In this problem, $\frac{dg}{dx} = \frac{d}{dx}2x = 2$. That is why you have to mulitply a $2$ to your $\cos 2x$.

  • $\begingroup$ Great explanation, but I have to mention that "derive" does not mean "differentiate". The words are not interchangable. $\endgroup$ – dbx Mar 17 '19 at 0:55
  • $\begingroup$ @dbx thanks for the catch! I've updated it. $\endgroup$ – Carina Chen Mar 17 '19 at 0:57

The purpose of the chain rule is to get the correct value for the derivative. The proof of the chain rule may be found in many places. In case you find the general proof hard to understand, here is a proof of the special case $\frac d{dx}\sin2x=2\cos2x$.

Let $f(x)=\sin2x$. Then $$\frac d{dx}\sin2x=f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}h=\lim_{h\to0}\frac{\sin2(x+h)-\sin2x}h=\lim_{h\to0}\frac{\sin(2x+2h)-\sin2x}h$$$$=\lim_{h\to0}\frac{\sin2x\cos2h+\cos2x\sin2h-\sin2x}h=\left(\lim_{h\to0}\frac{\cos2h-1}h\right)\sin2x+\left(\lim_{h\to0}\frac{\sin2h}h\right)\cos2x.$$ Since $$\lim_{h\to0}\frac{\cos2h-1}h=\lim_{h\to0}\frac{\cos2h-1}{2h}\cdot\frac{2h}h=0\cdot2=0$$ while $$\lim_{h\to0}\frac{\sin2h}h=\lim_{h\to0}\frac{\sin2h}{2h}\cdot\frac{2h}h=1\cdot2=2,$$ this simplifies to $$\frac d{dx}\sin2x=0\cdot\sin2x+2\cdot\cos2x=\boxed{2\cos2x}.$$ Note that, if we let $g(x)=2x$, then $$\frac{2h}h=\frac{g(x+h)-g(x)}h.$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.