This question is a follow up to an answer I gave here: What is the correct integral of $\frac{1}{x}$? After the algebra I said that 'This step of course gives the argument of $\log(x)$ the value $e$... and note that so far we have not specified a base for $\log(x)$ - the proof is true using any logarithm. For convenience we therefore give $\log(x)$ the base $e$ and denote it $\ln(x)$; consequently $\ln′(x)=1/x$ but given another base the numerator would be different.' And then quoted wikipedia which said the same thing in a different way. However WolframAlpha says '$\log(x)$ is the natural logarithm' when they give the answer in the title. So who is wrong? And why?

EDIT - I did some tests using the following python3 script:

from math import log    #log is ln by default in python

#[c/(xp+ep) - c/xp]/ep = -c/(xp**2+ep*xp): finite derivative of 1/x
def numerint(a, b, c, eps):
    ep = (b - a)/eps    #one epsilon
    intg = 0            #the numerical integral
    xp = a              #the current x point
    for x in range(eps):
        intg += c/xp*ep - 1/2*ep**2*c/(xp**2 + ep*xp)
        xp += ep
    print('Numerical integral of 1/x:', intg)
    intgcalc = log(b) - log(a)
    print('ln(b) - ln(a):', intgcalc, intg/intgcalc)

numerint(0.5, 2.5, 3, 10000)
#The derivative is log(e)/x to any base, what base can be raised by c to yield e?

The objective is to see what happens when we change the third numerint argument, set at 3 above. The third print statement in this case gives 3; in general it gives c. This means that even though the base of the logarithm is undetermined we can write it as a natural logarithm and just multiply it by $c$ instead of writing it in a different base. Wikipedia: 'Logarithms can be defined to any positive base other than 1, not only e. However, logarithms in other bases differ only by a constant multiplier from the natural logarithm, and are usually defined in terms of the latter.'

  • $\begingroup$ The link to wolfram's answer does say that $\log x$ is the natural logarithm. I think natural log is always assumed in most cases. $\endgroup$ – John_dydx Apr 27 '16 at 23:10
  • $\begingroup$ Then why am I wrong? Surely it's only definitely the natural logarithm if $c=1$. $\endgroup$ – user301988 Apr 27 '16 at 23:11
  • $\begingroup$ $\frac {d}{dx}\log_a(x)=\frac 1{x\ln(a)}$ . $\endgroup$ – lulu Apr 27 '16 at 23:14
  • $\begingroup$ Many more advanced math texts/articles always use $\log x$ to refer to the log base $e.$ On many calculators the "log" button is for log base 10 and "ln" button for log base e. It's all a matter of convention. $\endgroup$ – coffeemath Apr 27 '16 at 23:14
  • $\begingroup$ math.stackexchange.com/questions/1161248/… $\endgroup$ – user301988 Apr 28 '16 at 3:19

The base is the one that satisfies

$$\begin{align*} \frac1x &= \frac{d}{dx}\log_a x\\ &=\lim_{h\to0}\frac{\log_a(x+h)-\log_a x}{h}\\ &= \lim_{h\to0}\log_a\left(1+\frac hx\right)^{1/h}\\ &= \lim_{h\to0}\log_a\left(1+\frac hx\right)^{x/hx}\\ &= \frac1x\log_a\left[\lim_{h\to0}\left(1+\frac hx\right)^{x/h}\right]\\ \end{align*}$$

It happens that the limit is special enough to have a name $e$. If $a\ne e$, then there is an ugly scaling constant $\log_a e$ on the right hand side; otherwise, that constant $\log_e e = 1$.

So, $a$ is the base chosen to make $\frac{d}{dx}\log_a x$ free of scaling constants other than $1$.

  • $\begingroup$ I think you mean that if $a$ has a value other than $e$ it will take a value other than one to raise $a$ to $e$. That value would be $c$! $\endgroup$ – user301988 Apr 27 '16 at 23:47
  • $\begingroup$ So you are talking about the constant $c$ in $\int \frac{c\ dx}{x}$? If I do not specify the base of the antiderivative, then $$\int\frac{c\ dx}x = \frac c{ \log_ae}\int\frac{dx\ \log_a e}x = \frac{c\log_a x}{\log_a e} + C$$ If $a\ne e$, then the antiderivative will not be free of scaling constants. $\endgroup$ – peterwhy Apr 27 '16 at 23:56
  • $\begingroup$ If by $c$, you mean the constant of integration then, no. Remember that the RHS is differentiating, not integrating. If we integrate the final RHS, we will get the original function, $\log_a x$ $\endgroup$ – KR136 Apr 28 '16 at 0:00
  • $\begingroup$ It's a lower case $c$ meaning any number, not the the constant of integration, that would be upper case. $\endgroup$ – user301988 Apr 28 '16 at 0:01
  • $\begingroup$ @selfawareuser I am referring to your question title $$\int\frac{c\ dx}{x} = c\log_a x + C$$ In this case, $a = e$. If instead, the right hand side is $\log_a x + C$ without the little $c$, then yes, you can simplify by picking $a$ such that $$c = \log_ae$$ $\endgroup$ – peterwhy Apr 28 '16 at 0:13

It is the natural log! Think about it this way.

Let $y=\ln(x)$. It follows that $e^y=x$. From there, we can differentiate implicity; $y'*e^y=1$. Now, $e^y=x$, so $x*y'=1$, and $y'=1/x$.

  • $\begingroup$ Seems like there are gaps in that reasoning. The last line in the linked answer is $ln'(x)=\frac{1}{x}ln(1+u)^\frac{1}{u}$ and the base for $ln()$ was never specified, so it could be any $c$. $\endgroup$ – user301988 Apr 27 '16 at 23:24
  • $\begingroup$ @selfawareuser $\ln$ is the symbol for the log with base $e$. $\endgroup$ – YoTengoUnLCD Apr 27 '16 at 23:28
  • $\begingroup$ I know, but I could replace $ln$ with $log$ in the proof (from wikipedia) and it remains valid. $\endgroup$ – user301988 Apr 27 '16 at 23:29
  • $\begingroup$ @Neil The problem is with the statement $y'\ast e^y=1$. Differentiating $y$ and differentiating $e^y$ are not the same thing. $\endgroup$ – user301988 Apr 27 '16 at 23:53
  • 2
    $\begingroup$ @selfawareuser you use the chain rule $\endgroup$ – Neil Apr 28 '16 at 0:08

Your Answer

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