I understand application of chain rule in the differentiation of a random function $(x^2+3)^3$.
But, why do you need to use chain-rule when differentiating something like $\ln(2x-1)$; why won't it just be $\displaystyle\frac 1{2x-1}$? Please help.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityI understand application of chain rule in the differentiation of a random function $(x^2+3)^3$.
But, why do you need to use chain-rule when differentiating something like $\ln(2x-1)$; why won't it just be $\displaystyle\frac 1{2x-1}$? Please help.
It can be a bit strange to say that you need to use a specific formula or rule. I think it is more a question of you can use the formula.
So when can you use the chain rule? You can use the chain rule when you take the derivative of a composition of two functions. If $F(x) = f(g(x))$, then $F'(x) = f'(g(x))g'(x)$.
And if $F(x) = \ln(2x -1)$, then $F(x) = f(g(x))$ where $f(x) = \ln(x)$ and $g(x) = 2x-1$. And since $f'(x) = \frac{1}{x}$ and $g'(x) = 2$ you get $$ F'(x) = f'(g(x))g'(x) = \frac{1}{g(x)}g'(x) = \frac{1}{2x-1}2. $$
The theorem you are trying to use says
The derivative of $\ln x$ with respect to $x$ is $\frac{1}{x}$
So what about taking the derivative of $\ln(2x+1)$? Well, $\ln(2x+1)$ is not $\ln x$, so the theorem doesn't tell us anything about the derivative of $\ln(2x+1)$ with respect to $x$.
We invoke the chain rule so that we can rewrite the problem in a way involves finding the derivative of $\ln x$ along with some other stuff we know how to do.
Incidentally, some texts never write theorems like the one above, and always prefer to write theorems like
The derivative of $\ln f(x)$ with respect to $x$ is $f'(x) / f(x)$.
You need to use chain rule because it is a composition of functions: $f(x) = \ln(x)$ and $g(x) = 2x-1$, so we see $\ln(2x-1)$ as $f(g(x))$.
Just to add on to the other answers:
You ask why you need to use the chain rule. The answer is because we always use the chain rule. When we do $\frac d{dx}f(x)$, we actually use the chain rule.
$f(x)$ is always the composition of two functions: itself and the identity function ($I(x)=x$).
So when we write
$$\frac d{dx}f(x) = f'(x)$$
we actually end up doing
$$\frac d{dx}f(x)=f'(x)I'(x)I'(x)I'(x)\cdots$$
But that is just
$$\qquad\quad\,\,\,=f'(x)\times1\times1\times1\times\cdots$$ $$=f'(x)\qquad\qquad$$
But since it's obvious that those are unnecessary steps, when we apply the chain rule to the point that we'd be creating $I'(x)$, we stop.
TLDR: When you differentiate, you always need to apply the chain rule (at least mentally check if it is necessary) because, whether you like it or not, the chain rule always applies.
Additionally, if we could do as you describe, then taking derivatives becomes trivial:
$$\frac d{dx}f(x) = \frac d{dx}\left(\ln\left(e^{f(x)}\right)\right)$$
$$=e^{-f(x)}\,\,$$
But this is clearly not true. If you expand it properly with the chain rule, the last step changes to
$$=e^{-f(x)}\frac d{dx}e^{f(x)}$$
$$\quad\,=e^{-f(x)}(e^{f(x)})f'(x)$$
$$=f'(x)\qquad\quad\,\,$$
Which is correct.
Although the question literally states "...why do you need to use chain-rule...", since the poster thought the answer should be $\frac{1}{2x-1}$, I think it's clear that the poster is struggling with "Why is there an additional factor of the derivative of the inside piece?", not whether or not you need to "use" the chain rule.
With respect to some of the other excellent answers here, running this example through the limit definition, while it does show that an additional factor appears and it is indeed the derivative of the "inside piece", I find that this explanation rarely helps students understand (or maybe the right word is believe) that this is the general rule. And frankly, running through bunch of examples or more generic limit proofs never seemed to stick with my average students either. IMHO, the shortfall here comes from us as a community being sloppy in our notation, and confusing students with generalizations and short-hand.
The poster clearly believes that the derivative of $ln(x)$ is $\frac{1}{x}$. This is a partial truth.
In fact, this is the derivative of $ln(x)$ with respect to $x$! It capitalizes on the fact that the derivative of $x$ with respect to $x$ is 1, which simplifies the rule in this case.
However, the actual rule is that the general derivative of $ln(u)$, with respect to $x$, is $\frac{1}{u}du$, where $du$ is the derivative of $u$ with respect to $x$.
If you always think of the rule as $d(ln(x)) = \frac{1}{x}dx$, your chain rule element is right there embedded in your base formulas. In fact it was there all along, we just disguised it as "wrt $x$", and then got lazy and stopped being explicit about it because "we all knew what we meant".
(I'll avoid digressing into the social commentary on why ignoring respect gets us in trouble. ;-)
This is a bit too long to be a comment, I think, but I wanted to give a different take on "Why won't it just be $\frac1{2x-1}$?"
At the time of this writing, it looks like Quincunx explained why differentiation wouldn't work out if you applied that reasoning more generally, and Thomas explained why the chain rule doesn't give that answer, but that's if you trust that the chain rule works and is applicable here (as Thomas, Cameron Williams, and Quincunx all say).
We can check the answer using the definition of the derivative. \begin{alignat*}{2} \frac{\mathrm d}{\mathrm dx}\ln(2x-1) &=\lim_{h\to0}\frac{\ln\left(2(x+h)-1\right)-\ln(2x-1)}h &&\quad \text{by definition} \\ &=\lim_{h\to0}\ln\left(\left(\frac{2(x+h)-1}{2x-1}\right)^{1/h}\right) &&\quad \text{by log rules} \\ &=\ln\left(\lim_{h\to0}\left(\frac{2(x+h)-1}{2x-1}\right)^{1/h}\right) &&\quad \text{by continuity of }\ln \\ &=\ln\left(\lim_{h\to0}\left(1+\frac{2}{2x-1}\div\frac1h\right)^{1/h}\right) &&\quad \text{by algebra }(\star) \\ &=\ln\left(\lim_{\tilde{h}\to\pm\infty}\left(1+\frac{2}{2x-1}\div \tilde{h}\right)^{\tilde{h}}\right) &&\quad \text{by }\tilde{h}=\frac1h \\ &=\ln\left(\lim_{n\to\pm\infty}\left(1+\frac1n\right)^{n*2/(2x-1)}\right) &&\quad \text{by }n=\frac{2x-1}2\tilde{h} \\ &=\ln\left(\lim_{n\to\pm\infty}\left(\left(1+\frac1n\right)^n\right)^{2/(2x-1)}\right) &&\quad \text{by algebra} \\ &=\ln\left(\left(\lim_{n\to\pm\infty}\left(1+\frac1n\right)^n\right)^{2/(2x-1)}\right) &&\quad \text{by continuity of }f(y)=y^{2/(2x-1)} \\ &=\ln\left(e^{2/(2x-1)}\right) &&\quad \text{by the limit definition of }e \\ &=\frac2{2x-1} &&\quad \text{by the definition of }\ln \end{alignat*}
The factor of $2$ from $\frac{\mathrm d}{\mathrm dx}2x-1$ that the chain rule gives you can be seen in the line $(\star)$, where the irrelevant $-1$ has been absorbed into the "$1$" term, but the $2$'s effect can still be seen.
align*
or alignat*
environments. They really clean up long chains of computation like the one in your post.
$\endgroup$
To take yet another angle at your question:
In the end differentiation is the calculation of the following (or a similar) limit $$\lim_{h\rightarrow 0} \frac{f(x+h)-f(x)}{h}.$$ This is how the derivative is defined and, as shown in Mark S.’s answer, you can actually calculate your derivative this way – if you want to.
Now, calculating every derivative this way is very tedious and that’s why general differentiation rules were deduced from the above definition and why you learn them: So you can differentiate functions without resorting to the above limit.
This starts with simple functions like $f(x)=\sin(x)+\cos(x)$. If you did not have any differentiation rules, you only could could only apply the above limit. But if you know that the derivative of a sum of functions is the sum of the individual derivatives ($(f+g)' = f' + g'$) and you know the derivatives of sine and cosine, you can calculate this derivative much more easily.
In the same way, in your original problem, the chain rule is something you can apply and that eases the task of differentiation. Without it, you probably would have to resort to calculating the above limit. In particular, there plainly is no reason to assume (or rule) that the derivative of $\ln(f(x))$ would be $\frac{1}{f(x)}$.
More general, the building of mathematical rules does not work in the way that you start with everything being allowed and then rules instruct you what to do in certain situations or forbid you to do some things. In fact, you start with everything being forbidden and rules allow you to actually do things.
When the function of $ln$ is a composite function, like $ln (2x^2+1)$, $ln(x^2+3)$,$ln(3x^2+x)....,$ then we need the chain rule to differentiate it.
Suppose, we need to find the derivative of $ln (2x^2+1)$
Composite Function $f (g(x)) or (fog) (x)$:
When $f$ is a function of another function $g(x)$, it is called composite function. That means $ln (2x^2+1)$ is a composite function because $ln$ is a function of another function $2x^2+1$
$f(g(x)) = ln (2x^2+1)$
Let $t(x) = 2x^2+1$ then $f(t) = ln (t)$
Reason for, Why we do not stop the differentiation of $ln (g(x))$ at just $\dfrac {1}{g(x)}$:
$\dfrac {d}{dx} \ell n(2x^2+1)$ should be equal to $\dfrac {1}{2x^2+1}$.
But $2x^2+1$ is also a function of $x$, so we can't stop it at $\dfrac {1}{2x^2+1}$
It can further be differentiated.
So, using chain rule formula, i.e., $\dfrac {d}{dx} f (g(x)) = f' (g(x) × g'(x)$ $\dfrac {d}{dx} \ell n (2x^2+1)=\dfrac {1}{2x^2+1}×\dfrac {d}{dx}(2x^2+1)$
$=\dfrac {1}{2x^2+1}×4x$
Thus, derivative of $\ell n (2x^2+1)$ is $\dfrac {4x}{2x^2+1}$
Chain Rule Formula:
We use the chain rule formula to differentiate the composite functions $f(g(x)),$
$\dfrac {d}{dx} f(g(x)) = f' (g(x)) × g'(x)$ ... (i)
Example: Find the derivative of $e^{(x^2+1)}$
So, $f(g(x)) = e^{(x^2+1)}$
$\therefore f'(g(x))=e^{(x^2+1)}$
and $g(x) = x^2+1$
$\therefore g' (x) = 2x $
Put all these values in equation (i)
$\dfrac {d}{dx}e^{(x^2+1)}=e^{(x^2+1)}×2x$
Thus, $ \dfrac {d}{dx} e^{(x^2+1)}= 2x \cdot e^{(x^2+1)}$
Let us first call
$$y = \ln(2x + 1)$$
Physicists and engineers use the simpler Leibniz calculus to calculate the differential quotient $\frac{dy}{dx}$ instead of using those pesky Newtonian fluxion dots ($\dot{y}$) or French apostrophes ($y'$) .. :-)
We substitute
$$u = 2x + 1$$
and get
$$y = \ln(u)$$
and
$$\frac{dy}{dx} = \frac{d\ln(u)}{dx} = \frac{d\ln(u)}{du}\frac{du}{dx}$$.
With
$$\frac{d\ln(u)}{du} = \frac{1}{u}$$
and
$$\frac{du}{dx} = \frac{d(2x + 1)}{dx} = 2$$
we get
$$\frac{dy}{dx} = \frac{1}{2x + 1} \cdot 2$$
Here we used the chain rule in its guise as substition rule (or coordinate transformation $u \to x$), canceling differentials in a fraction. The important bit is the factor 2 when transforming from $u$ to $x$ coordinates.
The substituion technique is even more helpful when solving integrals.
$$y = \int dy + C = \int \frac{dy}{dx} dx + C = \int \frac{2}{2x+1} dx + C = \int \frac{du}{u} + C = \ln u = \ln(2x + 1)$$
for some constant $C$.