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 :
> assume(x,real);assume(m,real); > eq:=x^2-m*x+1=0; # quadratic equation with reals coefs. 2 eq := x~ - m~ x~ + 1 = 0 > ineqdiscr:=discrim(lhs(eq),x)>0; # for 2 real roots 2 ineqdiscr := 0 < -4 + m~ > solve(ineqdiscr,m); RealRange(-infinity, Open(-2)), RealRange(Open(2), infinity) > additionally(m,RealRange(Open(-2),Open(2))): #discrim < 0 => roots are complex, but it was assume(x,real) ... > solve(eq,x); 2 1/2 2 1/2 1/2 m~ + 1/2 (-4 + m~ ) , 1/2 m~ - 1/2 (-4 + m~ )
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?
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).
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)
Yes.
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.
Willard, Daniel (DUSA) <WillaD@hqda.army.mil> wrote:
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.