(%i1) eq:log(x) + log(x+9) = 2log(6)$
(%i2) logcontract(eq);
(%o2) log(x(x+9))=log(36)
(%i3) map(exp,%);
(%o3) x*(x+9)=36
(%i4) solve([%], [x]);
(%o4) [x=-12,x=3]
Happy Christmas
Aleksas
When exp is given an equation, it gives a strange result:
exp(A=B) --> e^(A=B)
It would be more convenient to adopt the same behavior as that used by log:
log(A=B) --> log(A) = log(B)
The latter helps in manipulating exponential equations, as in the following:
(%i2) solve(3^(2*x) = 3^(x^2));
(%o2) [3^x^2 = 3^(2*x)]
(%i3) log(%);
(%o3) [log(3)x^2 = 2log(3)*x]
(%i4) solve(%);
(%o4) [x = 0,x = 2]
Unfortunately, the present behavior does not allow a similar manipulation for logarithmic equations:
(%i5) solve(log(x) + log(x+9) = 2*log(6));
(%o5) [log(x) = 2*log(6)-log(x+9)]
(%i6) exp(%);
(%o6) [%e^(log(x) = 2*log(6)-log(x+9))]
(%i7) solve(%);
(%o7) []
If, for the sake of consistency, the behavior for exp was changed to:
exp(A=B) --> e^A = e^B
then we could solve the equation above as follows:
(%i5) solve(log(x) + log(x+9) = 2*log(6));
(%o5) [log(x) = 2*log(6)-log(x+9)]
(%i6) exp(%);
(%o6) [x = 36/(x+9)]
(%i7) solve(%);
(%o7) [x=-12,x=3]
(%i1) eq:log(x) + log(x+9) = 2log(6)$
(%i2) logcontract(eq);
(%o2) log(x(x+9))=log(36)
(%i3) map(exp,%);
(%o3) x*(x+9)=36
(%i4) solve([%], [x]);
(%o4) [x=-12,x=3]
Happy Christmas
Aleksas
Ticket moved from /p/maxima/bugs/2522/
Log in to post a comment.