What is the difference between the three types of logarithms?

  • ln is always a natural logarithm (of base $e$).

  • log if it has a base like $\log_5x$ then the base is the specified one, otherwise it is either base $e$ or base $10$. It depends on people. Some people (mostly high school people) use logarithms without a base as base $10$ and other people as base $e$. It is most often used as a natural logarithm though but you have to watch out. If you see a ln button on a calculator, then log without base is guaranteed to be base 10 on the same calculator.

(Edit: As @ClementC. pointed out, in computer science, $log$ without a base most often means a binary logarithm.)

  • Log stands for complex logarithm in its principal branch. The principal branch has its imaginary part in the interval $(−π,π]$. (Basically it's the inverse of the complex exponential function with its imaginary part in that interval.)

These are notations, sometimes ambiguous, to denote potentially different types of logarithms, which depend on the language of origin (Russian, German, French), see for instance where $\lg$ is used, including number theory, since sometimes $\log_2 x $ denotes the iterated logarithm: $\log{\log{ x }}$.

Notation $\ln x$ (almost) unambiguously denotes the natural logarithm $\log_e x$ (latin: logarithmus naturalis), or logarithm in base $e$. In French, I used to believe the "n" stood for "népérien", from Neper or Napier.

The notation $\log x$ should be the adopted notation for the natural logarithm, and it is so in mathematics. However, it often represents the "most natural" depending on the field: I learned it as the base-$10$ logarithm ($\log_{10} x$) at school, and it is often used this way in engineering (for instance in the definition of decibels): enter image description here And it may also represent a base-$2$ logarithm (binary logarithm) in binary calculus. The latter is sometimes denoted lg, ld (logarithmus dualis), or lb.

$\operatorname{Log} x$ normally is the principal value for a complex number, with imaginary part in the interval $(-\pi,\pi]$. But, while I learned at school $\log x$ for $\log_{10} x$, $\operatorname{Log} x$ was used (wrongly) to denote the natural logarithm. Such notations can be found for instance in Calcul differentiel et integral. Tome 1, 1998, N. Piskounov, page 58 sq.

The History of logarithms wikipedia page is worth reading, if only to learn the origin of the name (a number indicating a ratio: logos, proportion, and arithmos, number), and John Napier's book: Mirifici Logarithmorum Canonis Descriptio (Description of the Wonderful Rule of Logarithms).