Unfortunatelly I'm not asking for this as a Reduce end user, but as a developer who is using Reduce as a library. It's quite important for us to let our user enter the equations in various forms. What we do now is that we run solve() on the original equation and if it fails (returns empty list or root_of), we compute logarithm of left side and right side and solve the equation log(lhs)=log(rhs).
I agree entirely that this should work with your equations.
All I'm saying is that it doesn't work right now. One reason is the way exponential terms are handled internally, the other that the part of the solve code that handles nonlinear equations tries to substitute 5^x by a new variable, but then terms with 13^x are still there - and therefore it stops. If there is only one exponential in the equation, the substitution gives a nice new equation that can be solved.
We need to think about this.
Rainer
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it somehow possible in Reduce to (symbolically) solve exponential equations?
13^(x+1)-2*13^x=(1/5)*5^x
7^(2x-5) 5^x = 9^(x+1)
Thanks,
Zbynek
Yes, if they are simple enough.
For example, Reduce can solve your two equations if they are rewritten as
11*(13/5)^x=1/5;
and
(245/9)^x/16807=9;
but as soon as x appears in more than one exponential, if doesn't find the solution.
This is because the equations are now of the form
f(x) = a
where f is a function with a known inverse function, whereas your original equations are not automatically transformed into this form.
Something for us to think about.
Rainer
Hi,
thanks for explanation!
Unfortunatelly I'm not asking for this as a Reduce end user, but as a developer who is using Reduce as a library. It's quite important for us to let our user enter the equations in various forms. What we do now is that we run solve() on the original equation and if it fails (returns empty list or root_of), we compute logarithm of left side and right side and solve the equation log(lhs)=log(rhs).
Relevant code is here: http://dev.geogebra.org/trac/browser/trunk/geogebra/common/src/geogebra/common/cas/mpreduce/CASmpreduce.java#L810 (procedure exptolin transforms exponential equation into linear, logofstd and logof work as helpers).
I believe there is much smarter & more correct solution though.
Cheers,
Zbynek
I agree entirely that this should work with your equations.
All I'm saying is that it doesn't work right now. One reason is the way exponential terms are handled internally, the other that the part of the solve code that handles nonlinear equations tries to substitute 5^x by a new variable, but then terms with 13^x are still there - and therefore it stops. If there is only one exponential in the equation, the substitution gives a nice new equation that can be solved.
We need to think about this.
Rainer
I've just checked in a couple of additional rules for the solution of exponential equations. Eg.:
Rainer