Packages to solve domain, equations and inequalities, interval arithmetic functions.
- Subject: Packages to solve domain, equations and inequalities, interval arithmetic functions.
- From: Barton Willis
- Date: Fri, 27 Nov 2009 08:22:21 -0600
A possible start:
(%i1) load(to_poly_solver)$
(%i2) infix("//")$
(%i3) simplify_eq(e) := block([cnd : true],
e : subst("//" = lambda([a,b], (cnd : cnd %and (b # 0), a/b)),e),
e : e %and cnd,
if e = false then (1=0) else e)$
(%i4) simplify_eq((x // x) + (y // y) = a);
(%o4) (2 = a) %and (x # 0) %and (y # 0)
(%i5) simplify_eq((x // x) + (y // y) = 2);
(%o5) (x # 0) %and (y # 0)
(%i6) simplify_eq((x // x) + (y // y) = %pi);
(%o6) 1 = 0
Maybe "//" already means something to Maxima. Also, simplify_eq could do a
great deal more.
Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>To:?Barton?Willis?<willisb at unk.edu>
>From:?Richard?Fateman?<fateman at cs.berkeley.edu>
>Sent?by:?maxima-bounces at math.utexas.edu
>Date:?11/25/2009?02:39PM
>cc:?maxima at math.utexas.edu,?mihail22?mihail22?<mihail22 at nigma.ru>
>Subject:?Re:?[Maxima]?Packages?to?solve?domain,?equations?and
>inequalities,?interval? arithmetic?functions.
>
>Barton?Willis?wrote:
>>?I?glanced?at?your?code,?but?I?don't?have?the?time?to?study
>>?it?closely?right?now.?One?comment:
>>
>>?The?code?does?a?great?deal?of?switching?between?simp?:?true?and
>>?simp?:?false.
>I?see?many?places?where?you?do?simp:true,???but?not?simp:false.
>>?Like?it?or?not,?most?all?of?Maxima?will?not?function
>>?properly?with?when?simp?is?false.
>This?is?correct.
>
>>??If?your?code?sets?simp?to?false?to
>>?because?you?would?like?solve(x?/?x?=?1)?-->?(x?#?0),?a?much?better
>>?approach?would?be?to?define?your?own?division?function?that?simplifies
>>?the?way?you?want?it?to?simplify.
>
>Or?maybe?some?way?of?encoding???{x?which?might?be?zero?so?don't?divide
>by?it}.??This?would?require?some?effort.??But?it?is?certainly?necessary
>to?do?intervals,?e.g.
>[-1,1]/[-1,1]???is?not?1,??but?"division?by?an?interval?containing?zero"
>
>RJF
>
>>??Then?you'll?need?to?tell?your?solver
>>?how?to?handle?expressions?involving?your?division?function.
>>
>>?Barton
>>
>>
>>?_______________________________________________
>>?Maxima?mailing?list
>>?Maxima at math.utexas.edu
>>?http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>
>_______________________________________________
>Maxima?mailing?list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima