# What is the opposite of log_expand

log_expand does converts log(x*y) to log(x)+log(y). Is there a function which explicitly reverts this?

What is the opposite of log_expand

add a comment

2

Yes, `log_simplify`

:

```
sage: e = log(x*y) ; e
log(x*y)
sage: f = e.log_expand() ; f
log(x) + log(y)
sage: f.log_simplify()
log(x*y)
```

Note that given an sage object `e`

, you can see all methods that can be applied to it, by typing `e.<TAB_BUTTON>`

, and the methods that start with `blah`

by typing `e.blah<TAB_BUTTON>`

, in particular, you could discover both methods by typing:

```
sage: e.log<TAB_BUTTON>
```

Asked: **
2018-01-28 06:13:58 -0500
**

Seen: **37 times**

Last updated: **Jan 28 '18**

How to simplify expression with fractional exponents?

Bug with absolute value of a complex variable?

Symbolic simplificaction without commutativity

solving sqrt(-1) to a real number

How to convert "cos(th)+i*sin(th)" to "e^(i*th)"?

How to simplify complicated expressions

Automatic expression.maxima_methods().rootscontract() ?

sage cannot get the simplest form on the limit expression with binomial and exponential operations

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.