axiom-developer
[Top][All Lists]

## [Axiom-developer] Re: provisos

 From: Francois Maltey Subject: [Axiom-developer] Re: provisos Date: Sun, 22 May 2005 18:01:38 +0200 User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chestnut, linux)

```Tim,

> In mupad it appears that solve returns a piecewise result
> which is impressive.

> What happens if you continue to compute with this result?
The piecewise is distributive :

>> res := solve (a^2*x+a=x+1, x)
/ { - a + 1 }                                                \
piecewise| { ------- } if not a in {-1, 1}, C_ if a = 1, {} if a = -1 |
| {   2     }                                                |
\ {  a  - 1 }                                                /
>> solve (a^2*x+a=x+1, x) + 2
/ { - a + 1     }                                                \
piecewise| { ------- + 2 } if not a in {-1, 1}, C_ if a = 1, {} if a = -1 |
| {   2         }                                                |
\ {  a  - 1     }                                                /
>> normal (solve (a^2*x+a=x+1, x) + 2)
/ { 2 a + 1 }                                                \
piecewise| { ------- } if not a in {-1, 1}, C_ if a = 1, {} if a = -1 |
\ {  a + 1  }                                                /

> If you save the piecewise result in a variable can you multiply
> it by another piecewise result? Yes

res * res ; res^2  // the previous calculus.

/ { / - a + 1     \2 }
piecewise| { | ------- + 2 |  } if a in C_ minus {-1, 1}, C_ if a = 1,
| { |   2         |  }
\ { \  a  - 1     /  }

\
{} if a = -1 |
|
/

>> res2 := (solve (b^2*x+b=x+1, x)) ;
>> res+res2
/ { - a + 1   - b + 1     }
piecewise| { ------- + ------- + 2 } if
| {   2         2         }
\ {  a  - 1    b  - 1     }

a <> -1 and a <> 1 and b <> -1 and b <> 1,

C_ if b = 1 and a in C_ minus {-1, 1},

{} if b = -1 and a in C_ minus {-1, 1},

C_ if a = 1 and b in C_ minus {-1, 1}, C_ if a = 1 and b = 1,

{} if a = 1 and b = -1, {} if a = -1 and b in C_ minus {-1, 1},

\
{} if a = -1 and b = 1, {} if a = -1 and b = -1 |
|
/
res2 := (solve (b^2*x+b=x+1, x))
res * 0 isn't quite pretty :

>> 0*res
piecewise({0} if a in C_ minus {-1, 1}, {0} if a = 1, {} if a = -1)

>> simplify (0*res)
piecewise({0} if (a = 1 or a in C_ minus {-1, 1}), {} if a = -1)

> Do they give all nine possible branches? Do they combine branches?
Almost every time, but not pretty with the union of the same result.

In mupad and maple there is a set domain in order to compute over intervals.
(C_ minus {-1, 1}) union {1} is too hard, but some others are possibles :

The linux version is free :
you can do tests before register,
and uses much more memory after free registration :
a web-script with some questions.

there is a on-line version, an xmupad version.
and I believe that texmacs can also run mupad.

The source-code is in the lib.tar file, write in mupad language
(a pretty pascal language, but it's a functional language with domains)

The windows-light and the windows-pro version have the same algorithms.
The interface is stupid for the free windows-light : the easiest way is
to use an other editor and to cut/past between the mupad-window
and the editor-window.

There are silly games with theses assume :
with numerical real values

```