Expanding logarithms

### 10.3.3 Expanding logarithms

The logarithm applied to a product can be converted into a sum of logarithms; namely,

log(x y)=log(x)+log(y).

The lnexpand command does this expansion.

- lnexpand takes expr, an expression.
- lnexpand(expr) returns the expression expr with logarithms of products rewritten as sums of logarithms.

#### Example

lnexpand(ln(3*x^2)+ln(2*x+2))

ln | ⎛ ⎝ | 3 | ⎞ ⎠ | +2 ln | ⎪ ⎪ | x | ⎪ ⎪ | +ln | ⎛ ⎝ | 2 | ⎞ ⎠ | +ln | ⎛ ⎝ | x+1 | ⎞ ⎠