The definition of the logarithm

Ivan Cnop
icnop@vub.ac.be

Classical defintion of the natural logarithm

Definition

myln[x_] := (∫_1^x) (1/t) \[DifferentialD]t

We were careful enough not to use any built-in names

Animating values

<< Graphics`FilledPlot`

Do[FilledPlot[{0, 1/x, myln[x]},{x, 1, b}
,AspectRatio -> Automatic
	,PlotRange -> {{0, 12}, {0, 3}}
	,Fills  ->  {{{1, 2}, Hue[0]}}
	,Curves  ->  Front]
,{b, 1.5, 10,  .5}]

For  x  < 1 ,  its value is negative since the area is lying over a wrongly oriented  from  1  to   x   interval :

Do[FilledPlot[{0, 1/x, myln[x]},{x, a, 1}
,AspectRatio -> Automatic
	,PlotRange -> {{0, 2}, {-3, 3}}
	,Fills  ->  {{{1, 2}, Hue[0]}}
	,Curves  ->  Front,Ticks -> {{0, 1, 2}, Automatic}]
,{a,  .95,  .1, - .05}]

Numeric values

myln[11.2]

myln[ .65]

In Mathematica notation:

Log[ .65]

Exact values in Mathematica are kept symbolic and surprisingly the built-in definition takes over:

Log[4]

myln[4]

myln[4. ]

Rules

Obvious rules are not applied since the software cannot guess the intentions of the user

myln[4 c]

Log[x/y]

But the user can decide whatever rules are to be applied

rules = {Log[x_ y_] -> Log[x] + Log[y], 
        Log[x_ /y_] -> Log[x] - Log[y], Log[1/y_] -> -Log[y]}

With    //.rules    these rules are applied several times until a stable form is obtained:

Log[x 4/y] //. rules

This is the basis of rule-based programming

Many developments in artificial intelligence use this programming style.

Proofs in Mathematica use rules

Let us check if

(({{k + m}, {k}})) (({{r}, {k + m}}))==(({{r}, {m}})) (({{r - m}, {k}}))

FullSimplify[
      Binomial[m + k, k] Binomial[r, m + k] ==  
        Binomial[r, m] Binomial[r - m, k]]

The problem is that this is not convincing since we do not know what rules were applied

Conflicting names and version dependence

The derivative will be computed according to the internal defintion

It covers all cases

myln'[x]

D[myln[x], x]

((∂myln(x))/(∂x))