Rational

William Fish's picture

Why doesn't Maple do what I want in the following:

View 4937_Rational.mw on MapleNet or Download 4937_Rational.mw
View file details

Comments

Robert Israel's picture

rational

Because type is (usually) syntactic rather than semantic, i.e. it looks at what the Maple structure of an object is, rather than the mathematical nature of what it represents.  In this case, your expression is not literally an  integer or  a quotient of two integers, so it is not of type rational.  You can, however, use simplify to transform this expression into 2.

 

simplify

Not sure what you want it to do, but the type function only checks the surface type.  Use simplify:

x := sqrt(2):       
y := (x^x)^x:
simplify(y);                      2

William Fish's picture

Simplify

Thank you both.  That makes it very clear.

I'll try harder next time.  Some day, I hope to be able to think more like you.  Thanks again.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}