On 25.11.2012 17:33, Jaime Villate wrote:
> On 11/25/2012 03:57 PM, Norman Werner wrote:
>> Hello,
>>
>> I am using maxima as a common-lisp library for a pet-project of mine.
>> However I stumbled upon a problem when using solve.
>>
>> I try to solve an equation or a set of equation and I do introduce
>> known variables by
>> adding an appropriate equation to the set. Eg:
>>
>> solve([1=a*x,a=1],[a,x]);
>> -> [[a = 1, x = 1]]
>>
>> Which works fine! If the equation however contains functions like
>> exp, log, or sin solve won't find any solutions:
>>
>> solve([1=a*sin(x),a=1],[a,x]);
>> -> []
>> solve([1=a*log(x),a=1],[a,x]);
>> -> []
>> (%i125) solve([1=a*exp(x),a=1],[a,x]);
>> -> []
>>
>> Obviously the solutions to those problems are not as obvious as they
>> seem. Could someone clarify this behaviour? What's the correct way to
>> solve such problems with maxima?
> (%i3) load(to_poly_solver)$
> (%i4) %solve([1=a*sin(x),a=1],[a,x]);
>
> (%o4) %union([a = 1,x = 2*%pi*%z7+%pi/2])
> (%i5) %solve([1=a*log(x),a=1],[a,x]);
>
> (%o5) %union([a = 1,x = %e])
> (%i6) %solve([1=a*exp(x),a=1],[a,x]);
>
> (%o6) %union([a = 1,x = 2*%i*%pi*%z23])
>
> %z7 and %z23 mean any integer.
>
> Regards,
> Jaime
>
>
Thanks a lot. I was not aware of the to_poly_solver package.
During the next days I will test it on more - less trivial - examples -
however a first look was very promising.
Regards Norman