|
From: Richard F. <fa...@be...> - 2014-02-13 05:10:11
|
On 2/12/2014 4:04 PM, Name Name wrote:
> I don't seem to understand the equation solvers 'solve' / 'to_poly_solve', because I can't get solutions to absolutely trivial equations.
> Needing a CAS for such eqns. is surely 'debatable', but that is not my question.
>
> 1) --------------------------
> (%i3) solve(sin(x)=0,x);
> solve: using arc-trig functions to get a solution.
> Some solutions will be lost.
> (%o3) [x = 0]
>
> so far so good.
>
> 2) ------------------------
> (%i4) solve([sin(x)=0,sin(y)=0],[x,y]);
> (%o4) []
>
> Oops. Why is 'solve' unable to find any solution??
According to the documentation, for systems...
`solve ([<eqn_1>, ..., <eqn_n>], [<x_1>, ..., <x_n>])' solves a
system of simultaneous (linear or non-linear) polynomial equations
You have not provided a system of polynomial equations.
> 3) -------------------------
> Out of despair the next thing I tried was:
>
> (%i5) load(to_poly_solve)$
> (%i6) to_poly_solve([sin(x)=0,sin(y)=0],[x,y]);
> (%o6) %union([x = %pi*%z1,y = %pi*%z3])
>
> Ok., so polynomializing seemed to help.
>
> 4) -----------------------
> Now I want to get just a little bit more adventurous
>
> (%i9) to_poly_solve([sin(x-y)-sin(y)=0,sin(y)=0],[x,y]);
> Unable to solve
> Unable to solve
> Unable to solve
> (%o9) %solve([sin(y) = 0,-sin(y-x)-sin(y) = 0],[x,y])
>
> :-( Needless to say that 'solve' doesn't work here either.
> ---------------------------
> I am fully aware, that the eqns. 4) can be rewritten (even with Maxima) such as to get sensible solutions.
> But that is not my question, rather, I'd like to know, given eqns. 4) 'as is', if Maxima can find a solution or not?
> (I.e. if my usage 'solve' or 'to_poly_solve' is proper?)
I don't know about to_poly_solve. You can read the documentation.
In general, it is possible to pose various questions as calls to
"solve" or even tests like
if f(x)>g(x) then ....
in which the computation involved can be arbitrarily hard. Even
theoretically undecidable.
So any program which has commands like solve or if ... must make some
arbitrary
choices as to how much work to do "automatically".
You seem to want more effort to be put into the "automatic" category.
You are free to
write a new program, say SuperSolve( ....) that does more work, and of
course can
call any of the existing programs for simplification, solving, etc.
I encourage you to look into this prospect.
RJF
|