Log - Maple Help

Ordinals

 Log
 left logarithm of ordinals
 log
 left logarithm of ordinals

 Calling Sequence Log(a, b) log[b](a) log(a)

Parameters

 a, b - ordinals, nonnegative integers, or polynomials with positive integer coefficients

Returns

 • All calling sequences return an expression sequence l, q, r such that $a={b}^{l}\cdot q+r$, where l, q and r are ordinals, nonnegative integers, or polynomials with positive integer coefficients, and q and r are as small as possible.

Description

 • The Log(a,b) calling sequence computes the unique ordinal numbers $l$, $q$, and $r$ such that $a={b}^{l}\cdot q+r$, $0\prec q\prec b$ and $r\prec {b}^{l}$, where $\prec$ is the strict ordering of ordinals.
 • If $b=0$ or $b=1$, a division by zero error is raised.
 • The log[b](a) and Log(a,b) calling sequences are equivalent. The log(a) calling sequence is equivalent to Log(a,$\mathrm{\omega }$).
 • If one of a and b is a parametric ordinal and the logarithm cannot be taken, an error is raised.
 • The log command overloads the corresponding top-level routine log. The top-level command is still accessible via the :- qualifier, that is, as :-log.

Examples

 > $\mathrm{with}\left(\mathrm{Ordinals}\right)$
 $\left[{\mathrm{+}}{,}{\mathrm{.}}{,}{\mathrm{<}}{,}{\mathrm{<=}}{,}{\mathrm{Add}}{,}{\mathrm{Base}}{,}{\mathrm{Dec}}{,}{\mathrm{Decompose}}{,}{\mathrm{Div}}{,}{\mathrm{Eval}}{,}{\mathrm{Factor}}{,}{\mathrm{Gcd}}{,}{\mathrm{Lcm}}{,}{\mathrm{LessThan}}{,}{\mathrm{Log}}{,}{\mathrm{Max}}{,}{\mathrm{Min}}{,}{\mathrm{Mult}}{,}{\mathrm{Ordinal}}{,}{\mathrm{Power}}{,}{\mathrm{Split}}{,}{\mathrm{Sub}}{,}{\mathrm{^}}{,}{\mathrm{degree}}{,}{\mathrm{lcoeff}}{,}{\mathrm{log}}{,}{\mathrm{lterm}}{,}{\mathrm{\omega }}{,}{\mathrm{quo}}{,}{\mathrm{rem}}{,}{\mathrm{tcoeff}}{,}{\mathrm{tdegree}}{,}{\mathrm{tterm}}\right]$ (1)
 > $a≔\mathrm{Ordinal}\left(\left[\left[4,1\right],\left[2,2\right],\left[1,3\right],\left[0,5\right]\right]\right)$
 ${a}{≔}{{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (2)
 > $b≔\mathrm{Ordinal}\left(\left[\left[2,1\right],\left[0,2\right]\right]\right)$
 ${b}{≔}{{\mathbf{\omega }}}^{{2}}{+}{2}$ (3)
 > $l,q,r≔\mathrm{Log}\left(a,b\right)$
 ${l}{,}{q}{,}{r}{≔}{2}{,}{1}{,}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (4)
 > $\mathrm{log}\left[b\right]\left(a\right)$
 ${2}{,}{1}{,}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (5)
 > ${b}^{l}$
 ${{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{2}$ (6)
 > $a=·q+r$
 ${{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}{=}{{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (7)
 > $\mathrm{LessThan}\left(q,b\right),\mathrm{LessThan}\left(r,\right)$
 ${\mathrm{true}}{,}{\mathrm{true}}$ (8)
 > $l,q,r≔\mathrm{Log}\left(a,b+1\right)$
 ${l}{,}{q}{,}{r}{≔}{1}{,}{{\mathbf{\omega }}}^{{2}}{+}{2}{,}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (9)
 > $a={\left(b+1\right)}^{l}·q+r$
 ${{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}{=}{{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (10)
 > $\mathrm{LessThan}\left(q,b+1\right),\mathrm{LessThan}\left(r,{\left(b+1\right)}^{l}\right)$
 ${\mathrm{true}}{,}{\mathrm{true}}$ (11)
 > $\mathrm{log}\left(a\right)$
 ${4}{,}{1}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (12)
 > $\mathrm{Split}\left(a,\mathrm{degree}=\mathrm{degree}\left(a\right)\right)$
 ${{\mathbf{\omega }}}^{{4}}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (13)

Parametric examples:

 > $\mathrm{Log}\left(a,{\mathrm{\omega }}^{2}+2+x\right)$
 > $\mathrm{Log}\left(a,{\mathrm{\omega }}^{2}+3+x\right)$
 ${1}{,}{{\mathbf{\omega }}}^{{2}}{+}{2}{,}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (14)
 > $\mathrm{Log}\left(a,{\mathrm{\omega }}^{2}+2\right)$
 ${2}{,}{1}{,}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (15)
 > $\mathrm{Log}\left(a,{\mathrm{\omega }}^{2}+1\right)$
 ${2}{,}{1}{,}{{\mathbf{\omega }}}^{{2}}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (16)
 > $\mathrm{Log}\left(a,{\mathrm{\omega }}^{2}\right)$
 ${2}{,}{1}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (17)
 > $\mathrm{Log}\left(a,\mathrm{\omega }+1+x\right)$
 ${3}{,}{\mathbf{\omega }}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (18)
 > $\mathrm{Log}\left(a,\mathrm{\omega }\right)$
 ${4}{,}{1}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (19)

When the base is constant:

 > $l,q,r≔\mathrm{Log}\left(a,x+2\right)$
 ${l}{,}{q}{,}{r}{≔}{\mathbf{\omega }}{\cdot }{4}{,}{1}{,}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (20)
 > ${\left(x+2\right)}^{l}$
 ${{\mathbf{\omega }}}^{{4}}$ (21)
 > $a=·q+r$
 ${{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}{=}{{\mathbf{\omega }}}^{{4}}{+}{{\mathbf{\omega }}}^{{2}}{\cdot }{2}{+}{\mathbf{\omega }}{\cdot }{3}{+}{5}$ (22)

When both arguments are integers, the first return value is the integer part of the logarithm over the real numbers:

 > $l,q,r≔\mathrm{Log}\left(100,3\right)$
 ${l}{,}{q}{,}{r}{≔}{4}{,}{1}{,}{19}$ (23)
 > $\mathrm{evalf}\left(\frac{\mathrm{ln}\left(100\right)}{\mathrm{ln}\left(3\right)}\right)$
 ${4.191806548}$ (24)
 > ${3}^{l}q+r$
 ${100}$ (25)

Example with a nonconstant logarithm:

 > $b≔\mathrm{\omega }·2+3$
 ${b}{≔}{\mathbf{\omega }}{\cdot }{2}{+}{3}$ (26)
 > ${b}^{b}$
 ${{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{3}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{2}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{1}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}}{\cdot }{3}$ (27)
 > $a≔\mathrm{Dec}\left(\right)+x$
 ${a}{≔}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{3}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{2}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{1}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{+}{1}}{+}{x}$ (28)
 > $\mathrm{Log}\left(a,b\right)$
 ${\mathbf{\omega }}{\cdot }{2}{+}{2}{,}{\mathbf{\omega }}{\cdot }{2}{+}{2}{,}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{2}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}{+}{1}}{\cdot }{6}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{\cdot }{2}}{\cdot }{2}{+}{{\mathbf{\omega }}}^{{\mathbf{\omega }}{+}{1}}{+}{x}$ (29)

Compatibility

 • The Ordinals[Log] and Ordinals[log] commands were introduced in Maple 2015.