There are currently no rules for simplifying additions and subtraction of logarithms. For example simplify(log(x)+log(2x)) yields log(x)+log(2x), not log(3x). Also, simplify(exp(log(x))) yields exp(log(x)) rather than x assuming x>=0.
Is there any reason not to add rules for logarithm addition, subtraction, multiplication, and simplification to the package? Or would there need to be some addition for the assumption that the argument of log is greater than 0?
The added rules would be
@acrule log(~x) + log(~y) => log((~x)*(~y))@rule log(~x) - log(~y) => log((~x)/(~y))@rule (~x)*log(~y) => log((~y)^(~x))@rule exp(log(~x)) => ~x
There are currently no rules for simplifying additions and subtraction of logarithms. For example
simplify(log(x)+log(2x))
yieldslog(x)+log(2x)
, notlog(3x)
. Also,simplify(exp(log(x)))
yieldsexp(log(x))
rather thanx
assumingx
>=0.Is there any reason not to add rules for logarithm addition, subtraction, multiplication, and simplification to the package? Or would there need to be some addition for the assumption that the argument of
log
is greater than0
?The added rules would be
@acrule log(~x) + log(~y) => log((~x)*(~y))
@rule log(~x) - log(~y) => log((~x)/(~y))
@rule (~x)*log(~y) => log((~y)^(~x))
@rule exp(log(~x)) => ~x