9

One of the popular proofs of the derivative of ln(x) is by implicit differentiation.

$$ \begin{align*} y &= \ln x \\ e^y &= x \tag{2} \\ e^y dy &= dx \\ \frac{dy}{dx} &= \frac{1}{e^y} \tag{4} \\ \frac{dy}{dx} &= \frac{1}{x} \tag{5} \end{align*} $$

From (4) to (5), the $e^y$ has been substituted by $x$. I am confused to why we can make this substitution. The first time I saw this proof it made sense to me... and as more time passes it is making less sense now.

What exactly is x? On an intuition built from graphs (aka mine) x is just the x-axis, and y changes as the value of x changes on the x-axis, a function of x. But if x is just the x-axis then why can we make the substitution? On eq. (2) the subject had been changed, which becomes more confusing. Now, as I look at it, x is a function of y, and y is also a function of x simultaneously, which means now I don't know what exactly y is either.

I don't think it's a stretch to say that something went wrong in my reasoning here... I guess the main problem is that I don't understand implicit functions well. What is the explanation to this, and is there a better intuition for implicit functions?

J. W. Tanner
  • 64,851
  • 5
  • 45
  • 89
  • $x$ is just a variable that stores the value that $e^y$ spits out. $x$ does not mean the x-axis; plotting something against $x$ means just finding out the value of the function ($y$) for some input ($x$). I am not posting this as an answer because I am not sure you would find this helpful and there may be better explanations out there. – Random Math Enthusiast Mar 12 '25 at 09:13
  • 1
    Also, I find the proof of the derivative of $\ln x$ via the first principle better. – Random Math Enthusiast Mar 12 '25 at 09:21
  • This is where I get confused. as $x$ is just what $e^y$ spits out, now I don't know what the meaning of $y$ is. If $y$ varies and $x$ is the result of that, then the meaning of $dy/dx$ becomes meaningless to me, because $y$ is the thing being changed instead of $x$, despite it being on the top of the "fraction". – user19646426 Mar 12 '25 at 09:29
  • That is why I said I prefer using the first principle. This method may cause you to overthink things. – Random Math Enthusiast Mar 12 '25 at 09:31
  • I do not particularly think your steps from (2) to (4) are intuitively obvious. Instead you could use $\frac {d}{dx} \left(e^y\right) = \frac {d}{dx} \left(x\right)$ taking the derivative of both sides with respect to $x$ using the chain rule to get $e^y \frac {dy}{dx} =1$. Division of both sides by $e^y$ and then substitution do not seem contentious by comparison, though you need to remember $x>0$ at the start. – Henry Mar 12 '25 at 19:47
  • If you really want to use the graph as your intuition, you should think of $(x,y)$ as a varying point on the curve $y=\ln x$ and you don't need to care about whether $x$ is changing because of $y$ or the other way around. $\mathrm dy/\mathrm dx$ is just the slope of the tangential line at a particular point, which can be uniquely specified either by $x$ or by $y$. – Weijun Zhou Mar 13 '25 at 07:15
  • @One way to read this is to treat both sides of the equality as implicitly denoting functions, each side technically being a distinct thing. That is, don't think of $y$ as of an output value; $y$ denotes a function of $x$ that happens to be equal to some "other" function denoted by $\ln x$. Then you do the same operation to both sides of the equation (exponentiate), to get the function $e^y$ (meaning $exp(y(x))$ on one side, equal to the function $x$ - the identity function mapping each input to itself - on the other side. The equality means these two are interchangeable in expressions. – Filip Milovanović Mar 14 '25 at 11:28
  • Then you can read $dy/dx$ as $\frac{d}{dx}(y)$, and $dx/dx$ as $\frac{d}{dx}(x)$, $y$ and $x$ both being functions here, and you're finding their derivative with respect to a change to an input also (somewhat confusingly) denoted by $x$. – Filip Milovanović Mar 14 '25 at 11:37
  • If you don't believe that $x = e^y$ (which is the second line) then none of the rest of it makes sense. – David K Mar 14 '25 at 20:00

4 Answers4

25

It is essentially chain rule in disguise. You are supposed to be aware of derivative of exponential function and use that information for getting derivative of logarithm function.

Thus using chain rule we have $$\frac{d} {dx} \exp(\log x) =\exp(\log x) \frac{d} {dx} \log x$$ and then using the identity $\exp(\log x) =x, x>0$ we get $$1=x\frac{d}{dx}\log x$$ or $$\frac{d} {dx} \log x=\frac{1}{x}$$ Your working uses symbol $y=\log x$.

16

Implicit differentiation is usually taught in a kind of arcane way, as a form of magic that "Just Works™". This seems to cause a lot of confusion for students, who don't understand that implicit differentiation is "just" the chain rule in a mask. The differentials $\mathrm{d}x$ and $\mathrm{d}y$ are thrown around in a way that is never really fully justified (there is a nice way of justifying this notation, but it is not usually done in intro calculus classes, where there just isn't time to do everything), and it ends up being an exercise in rote memorization.

Rather than just blindly doing computations, it might help to hide less notation. The problem starts by defining a function $y : (0,\infty) \to \mathbb{R} : x \mapsto \log(x)$. This is shorthanded by writing $$ y = \log(x), $$ but there is an implicit understanding that $y$ is a function of a variable $x$ (this is why we call it "implicit differentiation"; $y$ is directly called a function of $x$, but the definition implicitly treats $y$ as a function). This won't matter much for the next step, but it is something worth keeping track of.

Then exponentiate both sides to get $$ y = \log(x) \iff \exp(y) = x. \tag{$\ast$}\label{eq1}$$ There are a couple of ways of looking at this, but I think the most productive in the current context is to understand that the expression on the left-hand side of the second equation is a composition of functions, i.e. it is actually $\exp(y(x))$. This function has the same domain as $y$, i.e. the nonnegative reals.

Next, differentiate on both sides, with respect to $x$, using the chain rule to get $$ \frac{\mathrm{d}}{\mathrm{d}x} \exp(y(x)) = \frac{\mathrm{d}}{\mathrm{d}x} x \iff \exp(y(x)) y'(x) = 1. $$ Rearrange this to get $$ y'(x) = \frac{1}{\exp(y(x))}. $$ Finally, go back to (\ref{eq1}): $\exp(y(x))$ is a function which satisfies $\exp(y(x)) = x$ (in other language, this function is the identity function). So the result is $$ \frac{\mathrm{d}}{\mathrm{d}x} \log(x) = y'(x) = \frac{1}{\exp(y(x))} = \frac{1}{x}. $$ The way to read or understand this is that this process demonstrates that the derivative of the logarithm function (defined on the interval $(0,\infty)$) is the one-over-$x$ function (defined on that same domain).

Xander Henderson
  • 33,139
  • 25
  • 74
  • 123
7

Starting with:

$$y=\ln(x)$$

We first note that the above is not an equation where we try to solve for one specific value of an "unknown" variable $x$, but it's a functional equality that (by definition) must hold for all values of x in the function domain: every value of $x$ in the domain (the positive real axis) will give rise to some value of $y=f(x)$ via the relationship $f(x)=\ln(x)$.

We can then manipulate this functional equality and it will still be valid. Taking an exponent on both sides is one such admissible operation and gives rise to:

$$e^y=x$$

Flipping this might be intuitively easier:

$$x=e^y$$

This again must hold for all values of $y$ and it's clear that $x$ can only ever be positive (for all values of $y\in\mathbb{R}$, we have that $e^y>0$), so the relationship from the original equality still holds.

We can think of it simply as LHS and RHS and we can just substitute one for the other: because they are equivalent for all values of $x$, respectively $y$. (that's how the functional equality $y=f(x)$ is defined).

Then starting from (2), we just keep applying the same operation to both sides of the equality:

$$\frac{d}{dx}(e^y)=\frac{d}{dx}(x)$$

$$\frac{dy}{dx}\frac{d}{dy}(e^y)=1$$

$$\frac{dy}{dx}e^y=1$$

$$\frac{dy}{dx}=\frac{1}{e^y}$$

$$\frac{dy}{dx}=\frac{1}{x}$$

In every step of the way above, we apply the same identical operation to the LHS and RHS and so the equality still holds. In the final step, replacing $e^y$ with $x$ was discussed already: it's just replacing the LHS of the initial definition of the functional equality with the RHS: they are equivalent since they must hold for all values of $x$ (in the domain) and all corresponding values of $y$.

Jan Stuller
  • 1,279
6

Essentially, the rigorous justification uses the chain rule on multivariable functions with a function $f(x,y)$ where you would define $$f(x,y) = e^y - x$$ and then you could try taking the derivative of this function with respect to $x$ under the assumption that $$f(x,y) = e^{y} - x = 0$$ and do some algebra on the remaining expression to figure out what the derivative of $y$ would be with respect to $x$.

The idea is you can "implicitly define" a function by an equation $$y - ln(x) = 0$$ which we can note is equivalent to the equation $$e^y - x = 0$$ so the two equations must express the same implicit definition of $y$ as a function with respect to $x$.So if we had a way to take a derivative of this whole relationship between $x$ and $y$ with respect to $x$, then we might be left with a relationship between the derivatives that can help us figure out how $y$ has to change whenever $x$ changes.

We can treat $y = y(x)$ as a function of $x$. To take this "derivative of a relationship", we can apply the chain rule from multivariable calculus (https://en.wikipedia.org/wiki/Chain_rule#Multivariable_case) to take the derivative of $$f(x,y) = e^y - x = 0$$ with respect to $x$ and obtain the expression $$ \frac{df}{dx} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y} \cdot \frac{dy}{dx} = 0$$ If you're unfamiliar, the notation $\frac{\partial f}{\partial x}$ means the "partial derivative of $f$ with respect to $x$. It essentially means we differentiate the function, but we treat variables that depend on $x$ as if they're constant with respect to $x$. So in this case $$\frac{\partial f}{\partial x} = \frac{\partial}{\partial x}(e^y - x) = \frac{\partial}{\partial x}(e^y) - \frac{\partial}{\partial x}(x) = -1$$ $$ \frac{\partial f}{\partial y} = \frac{\partial}{\partial y}(e^y - x) = \frac{\partial}{\partial y}(e^y) - \frac{\partial}{\partial y}(x) = e^y $$ So plugging these back into our equation, we get the equation $$ \frac{df}{dx} = -1 + e^y\frac{dy}{dx} = 0 $$ We can then do some algebra on this relationship between $x$ and $y$ to obtain $$ \frac{dy}{dx} = \frac{1}{e^y}$$ which as we note from the equation $$e^y - x = 0$$ must be $$ \frac{dy}{dx} = \frac{1}{x}$$

The equation $$\frac{df}{dx} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y} \cdot \frac{dy}{dx} = 0$$ which can be used to derive the general equation $$ \frac{dy}{dx} = -\frac{(\frac{\partial f}{\partial x})}{(\frac{\partial f}{\partial y})} $$ is essentially the fundamental equation that allows you to do implicit differentiation, so long as you can guarantee $\frac{\partial f}{\partial y} \neq 0$ for any choice of $x$ and $y$ for the function $f$.

One reading of this general equation lets us do implicit differentiation because if $f(x,y) = 0$, then moving along the $x$-axis will require $f(x,y)$ to change to preserve the equality. If we already fixed how much we change $x$, then we can only modify this function $f(x,y)$ by changes in $y$ to correct any violation of the equality. So $\frac{df}{dx}$ tells us how much the equality got violated when we changed $x$, and as we'd hoped, it also tell us how we'd need to change $y$ to preserve the relation if we set the derivative equal to $0$ (and if $\frac{\partial f}{\partial y} = 0$, then changing $y$ does nothing and we can't correct)