Logarithm

Returns the logarithm of the given expression.

If the base is not specified, a base-10 logarithm is assumed.

Syntax

log
log(Expression)
log(Expression,Base)

Examples

Calculating logarithms

Logarithms can be entered as log(number, base) or using the logarithm template log. If the base is omitted, the logarithm is interpreted as base 10. The natural logarithm is written with ln(). The number e (Euler's number) can be typed as @e, or selected from the pi menu or symbol palette.

Simplifying logarithmic expressions

Many logarithmic expressions can be simplified simply by pressing Enter. If the expressions include variables, it is often necessary to define a domain to allow simplification. You can also try using expand and factor. These tools can be helpful, but may sometimes lead to unwanted forms, such as factorizations of base numbers.

Domain of the logarithmic function

The command domain(expression, variable) shows the values of the variable for which the expression is defined.

Graphical connection between logarithmic and exponential functions

You can plot the graph of an exponential function and explore points. Add a point using the shortcut key P or from the geometry menu. Clicking a point on the graph allows it to move along the curve. You can examine coordinates more closely by double-clicking and entering for example log(3,2).

Change of base for logarithms

Use the arrow-templatelogbase() or arrow-templateln command to convert the base of a logarithm. These can be found under 3: Algebra > A. Convert Expression. The arrow arrow-template can be typed as @>.

Solving logarithmic and exponential equations

Use the solve command to solve logarithmic and exponential equations. To define the base of the logarithm, append arrow-templatelogbase().