# exponents problems

+1 vote

If I try to use collect_factors for an expression that contains exponents, it does not collect them into one exponent, for example:

collect_factors($\exp(-2\sigma-2\kappa) \exp(2\sigma) \exp(2\kappa)$);

these exponents can only be removed by map_sympy(ex, "simplify"), but it can't be used with zoom function, for example. same situation with product_rule.

+1 vote

Use a substitution like

 substitute(ex, $\exp(A??) \exp(B??)-> exp(A??+B??)$)

Add the , repeat=True if necessary to make it repeat the process until the expression no longer changes.

by (71.6k points)