Distributes products over sums and expands powers of sums, like SymPy's
expand(). Hints switch individual rules: mul (distribute), multinomial
(powers of sums), power_exp (x^(a+b) = x^a*x^b), power_base
((x*y)^a = x^a*y^a when valid), log (log(x*y) = log(x) + log(y) when
valid), trig (angle addition), complex (split into real and imaginary
parts) and func (special function identities). force = TRUE ignores
the validity assumptions of power_base and log.
Usage
expand(
e,
deep = TRUE,
mul = TRUE,
multinomial = TRUE,
power_exp = TRUE,
power_base = TRUE,
log = TRUE,
trig = FALSE,
complex = FALSE,
func = FALSE,
force = FALSE,
basic = TRUE,
factor = FALSE,
...
)
expand_mul(e, deep = TRUE, force = FALSE)
expand_multinomial(e, deep = TRUE, force = FALSE)
expand_log(e, deep = TRUE, force = FALSE, factor = FALSE)
expand_power_exp(e, deep = TRUE, force = FALSE)
expand_power_base(e, deep = TRUE, force = FALSE)
expand_trig(e, deep = TRUE, force = FALSE)
expand_complex(e, deep = TRUE, force = FALSE)
expand_func(e, deep = TRUE, force = FALSE)Arguments
- e
A
symexpression, matrix or list.- deep
Expand inside function arguments too.
- mul, multinomial, power_exp, power_base, log, trig, complex, func
Hints.
- force
Apply
logandpower_baseregardless of assumptions.- basic
The
basichint, as in SymPy.- factor
For the
loghint: factor integer arguments of logarithms.- ...
Further hints, such as
diracdelta = TRUEwithwrt(the variable for theDiracDeltaexpansion).