streamholder

15 Reputation

One Badge

9 years, 254 days

MaplePrimes Activity


These are questions asked by streamholder

Hello,

Why does the following work as expected...

f__c := proc (x__0, y__0) options operator, arrow; piecewise(x__0^2+y__0^2 <= 1 and (x__0-1)^2+y__0^2 <= 1 and x__0^2+(y__0-1)^2 <= 1 and (x__0-1)^2+(y__0-1)^2 <= 1, 1, not (x__0^2+y__0^2 <= 1 and (x__0-1)^2+y__0^2 <= 1 and x__0^2+(y__0-1)^2 <= 1 and (x__0-1)^2+(y__0-1)^2 <= 1), 0) end proc

But the following does not?

cnd := x__0^2+y__0^2 <= 1 and (x__0-1)^2+y__0^2 <= 1 and x__0^2+(y__0-1)^2 <= 1 and (x__0-1)^2+(y__0-1)^2 <= 1
f__c := proc (x__0, y__0) options operator, arrow; piecewise(cnd, 1, not cnd, 0) end proc

(Sorry about the lack of formatting, the forum insists my Maple syntax is invalid)

The first one produces the expected result, x__0 and y__0 are treated as variables in the condition (i.e. f__c(a, b) returns the same piecewise function with x__0 replaced with a and y__0 replaced with b); the second one does not (i.e. f__c(a, b) returns the piecewise function, still with x__0 and y__0 in the condition, and never gets evaluated).

Hello.

When I input an expression such as 3*(2*x-1)(x+1) > 0 into a Maple worksheet, Maple outputs this:

0 < 6*x(x+1)-3

(sorry, the formatter doesn't work for some reason).

I was wondering by which rules Maple determines to output that instead of, for example,

0 < 3(2*x^2+x-1)

or

0 < 6*x^2+3x-3

 

Also, Maple can't seem to be able to solve the inequality. It gives the following error to the command:

solve( { 3*(2*x-1)(1+x) > 0 } );

Error, (in solve) cannot solve for an unknown function with other operations in its arguments

 

So, I was wondering, is there a way to force Maple to output either in the most factorized form (which should be what I gave it as input) or in the least factorized form (that is, multiply it all)?

And, of course, why can't I solve the inequality with Maple?

Page 1 of 1