7.2 Natural Logarithms

This page introduces logarithmic functions in each of our CASs.

Octave / MATLAB

Mathematica

Sage


Octave / MATLAB

Computing logarithms

In MATLAB (and Octave) log() computes natural logarithms.

>> e = exp(1) e = 2.7183 >> log(e) ans = 1 >> syms x t >> int(1/t, 1, x) ans = log(x) >> diff( log(x) ) ans = 1/x

If you need to compute a common (base 10) log use log10().

>> log10( 100 ) ans = 2


Mathematica

Computing logarithms

The natural log function in Mathematica is Log[]. Common (base 10) logs may be computed with Log10[].


Sage

Computing logarithms