For comparison with other CAS choose from: Derive Macsyma Maple Mathematica Reduce
sqrt2:= rootOf(sqrt2**2-2)
sqrt2
Type: AlgebraicNumber
1/(sqrt2+1)
1
---------
sqrt2 + 1
Type: AlgebraicNumber
(x**2+2*sqrt2*x+2)/(x+sqrt2)
x + sqrt2
Type: Fraction Polynomial AlgebraicNumber
on gcd;
(x**3+(sqrt2-2)*x**2-(2*sqrt2+3)*x-3*sqrt2)/(x**2-2);
2
x - 2x - 3
---------------
- sqrt2 - 4
x + -----------
2sqrt2 + 1
Type: Fraction Polynomial AlgebraicNumber
normalize 2 2
(2x - 4x - 6)sqrt2 + x - 2x - 3
---------------------------------
(2x - 1)sqrt2 + x - 4
Type: Expression Integer
sqrt(x**2-2*sqrt2*x*y+2*y**2)
+-----------------------+
| 2 2
\|- 2x y sqrt2 + 2y + x
Type: Expression Integer
sqrt5:= rootOf(sqrt5**2-5)
sqrt5
Type: AlgebraicNumber
cbrt3:= rootOf(cbrt3**3-3)
cbrt3
Type: AlgebraicNumber
cbrt3**3
3
Type: AlgebraicNumber
sqrt5**2;
5
Type: AlgebraicNumber
cbrt3;
cbrt3
Type: AlgebraicNumber
sqrt(x**2+2*(sqrt5-cbrt3)*x+5-2*sqrt5*cbrt3+cbrt3**2)
+-------------------------------------------------+
| 2 2
\|(- 2cbrt3 + 2x)sqrt5 + cbrt3 - 2x cbrt3 + x + 5
Type: Expression Integer