Assume problem (15.4.97)

Jaroslav Hajtmar

I am a beginner to Maple V rel. 4 and a novice on Maple User Group. I have two ”assume” questions.

1) I think, that "assume(...)" command has no influence on solving equations. Is it true?

for example :


Why does Maple compute real roots? Assume(x,real) has no effect ? Or where is the mistake?

2) I want to use ”assume” command for variable x from RealRange(-infinity, Open(-2)) or from RealRange(Open(2), infinity) (union intervals)

Is it possible?

Robert Israel(21.4.97)

| 1) I think, that "assume(...)" command has no influence on ...

It doesn’t restrict the values that ”solve” will find. I wouldn’t quite say it ”has no influence”, because it may in fact influence transformations of the equations that occur in the process of solving them. For example:


This is because sqrt(x^2) is simplified to x while sqrt(y^2) is simplified to -y (actually, before ”solve” even starts).

| Why does Maple compute real roots? Assume(x,real) has no effect ?

It doesn’t cause Maple to check whether the results satisfy the assumptions.

Actually, Maple doesn’t even know whether or not sqrt(-4+m^2) is real.


although it does know that -4+m^2 < 0:


But even if it did know, it wouldn’t restrict the values obtained for x.

You can sometimes restrict the output of ”solve” by including inequalities. For example:


However, this usually doesn’t work if there are symbolic parameters.


(No result is returned)

And, strangely enough (still with the same assumption on m):


(Note to Maple developers: this is a bug)

(No result in Maple V Release 5, U. Klein)

| 2) I want to use "assume" command for variable x from ...

Yes.


Willard, Daniel (DUSA) (23.4.97)

Be aware that ”assume” carries no weight with ”type”. In BesselI(x,y), for example, the Maple routine requires y to be of type integer, and preceding its use with the command "assume(y,integer)" does not get past the typing check early in the program.

Stupid!. I have complained to Maple about it without any observable improvement.

Robert Israel (24.4.97)

Willard, Daniel (DUSA) <WillaD@hqda.army.mil> wrote:

| Be aware that "assume" carries no weight with "type". ...

Please clarify your complaint. I would insist that ”assume” should _not_ carry any weight with ”type”: ”type” must distinguish between, for example, variables and numbers. A variable is still a variable, not a number, even when you assume its values are integers. If you want to know whether the value of a quantity is an integer, you can use ”is”, not ”type”.

As for BesselI, I presume you’re talking about the first argument, not the second, where integers are not particularly special. AFAIK it does not ”insist” that the first argument is an integer either: Maple is perfectly happy to calculate, e.g.,


I guess your complaint may be with some of the automatic simplifications, e.g.


In that case, you do have a point.