## assume and simplify ...

Hi All,

I have o problem with simplify. A variable cp1r has been assumed to be positive. Why simplify still has csgn(cp1r) for it? Here is my code:

tmp := subs(cp1t(t)=cp1r, cp2t(t)=cp2r, Ca[2]);
1 / 2 2
----------- |-cp2r sin(x[1]) sin(x[7]) cp1r
2 2 |
cp1r cp2r |
\

2
+ 2 cp2r sin(x[1]) cos(x[1]) cos(x[7]) sin(x[7]) cp1r +

1 / 2 2 /
-------------- \cp2r cos(x[1]) cos(x[7]) sin(x[7]) \
(1/2)
/ 2\
2 \cp1r /
2 \\\
-2 cos(x[1]) cos(x[7]) sin(x[1]) + 2 sin(x[1]) cos(x[1])//|
|
|
/
assume(cp1r > 0, cp2r > 0);
simplify(tmp);
1 / / 3 3
---------- \sin(x[1]) sin(x[7]) \-cos(x[1]) cos(x[7])
2
cp1r cp1r

+ 2 cos(x[1]) cos(x[7]) cp1r csgn(cp1r) cp1r

2 3 \ \

- cp1r csgn(cp1r) cp1r + cos(x[1]) cos(x[7])/ csgn(cp1r)/

should csgn(cp1r) be simplified to 1 already? What is wrong with my script?

Thanks

Everett

## how to get the supplementary set ...

assume x,y is a real number and {x>4,y>4}, how can i get the supplementary set ({x<=4,y<=4}) of x,y in the real domain by maple?

## Set the variable of equation to be a Boolean compo...

Hi all,

I have some "boolean variable" constraint equation like this:

a1*x1+a2*x2+...+an*xn>=b1*y1+b2*y2+...+bn*yn

where a1,a2,...,an and b1, b2, ..., bn are 1 or -1

These equations will be used in LPSolve or the other command to find a group of parameters which can fit them.

Now I used for-loop to deal with this kind of question, for example:

But there are more than 10 boolean variables in my case and It's very inefficient. On the other hand, using for-loop to determine the equation we solve in the command will lead to great confusion.

I think there should be some ways able to solve this kind of "boolean variables" question in Maple, such as, through assume command to define the type of "boolean variable".

But I have no idea how to do it.