# power_expand function

Expand powers and logarithms of products and powers.

## How to write it

### power_expand(expr)

**expr**

Any expression: a number, a formula, a list or a matrix. Takes an expression.

## Examples

- $\displaystyle \ln(x^{2}) = 2 \ln(x)$

  `power_expand(log(x^2))`

  In the solver, `power_expand(log(x^2))` gives `2ln(x)`.

  [Open in the solver](https://hilberon.com/?q=power_expand%28log%28x%5E2%29%29)

## Functions its examples use

- [log](https://hilberon.com/library/log)

  Logarithm: natural with ln, or to any base with log.

## Related functions

- [function_expand](https://hilberon.com/library/function_expand)

  Rewrite special functions of shifted arguments in terms of simpler ones.
- [complex_expand](https://hilberon.com/library/complex_expand)

  Expand an expression assuming its variables are real.
- [expand](https://hilberon.com/library/expand)

  Multiply out products and powers into a sum.
- [resultant](https://hilberon.com/library/resultant)

  Resultant of two polynomials in a variable.
- [polynomial_remainder](https://hilberon.com/library/polynomial_remainder)

  Remainder of a polynomial division.
- [simplify](https://hilberon.com/library/simplify)

  Simplify an expression, optionally under assumptions.

---
Source: https://hilberon.com/library/power_expand
