A variety of maxima queries



Hi Leo, 

On Mon, Oct 29, 2012 at 08:00:44PM +0000, Leo Butler wrote:
> Daniel Dalton <daniel.dalton47 at gmail.com> writes:
> 
> > Hi all,
> >
> > I'm a final year high school student in Australia and have my final
> > exams coming up in about 2 weeks. I use maxima since I'm blind and can't
> > use the standard CAS calculator systems. 
> > I've got a couple of last minute problems that I was hoping to get some
> > advice about. 
> >
> > 1. I use the %solve command from package to_poly_solve. It works well
> > providing me with the general solutions. However, my class mates can
> > specify a domain where the solutions could be provided for and they get
> > these listed. 
> > It seems a bit tedious with maxima as I have to set up the two general
> > solutions as separate functions and sub the various integers in that
> > domain, check all the solutions are in the domain and keep track of
> > everything. Is there any possible way to automate this process somehow
> > with lisp perhaps in the maxima-init.mac file? If anyone has any
> > pointers where I can start that would be really helpful. 
> 
> Hi Daniel,
> Here is a solution using the solve command. Basically, what we need to
> do is create a function that describe a domain for us, then use this to
> winnow out the miscreant solutions.
<snip> 

This is exactly what I was after, thank you! 

I notice it does not really work with the trig equations
though. Probably because solve () only gives one real solution and
%solve gives a solution in the form of union. 

Is it best for now just to sub values into those general solutions from
%solve () by hand? 

Thank you very much for the code!

Cheers,
Dan