1 | initial version |

The answer of slelievre is already the best one can do in such situations, without taking a piece of paper and writing down the explicit amplification with the conjugate of the denominator $$ \frac{2(2378\sqrt 2-3363)}{408\sqrt 2-557}= \frac{2(2378\sqrt 2-3363)(-408\sqrt 2-557)}{(408\sqrt 2-557)(-408\sqrt 2-557)} $$ and computing the numerator and the denominator explicitly (by hand or using sage).

Alternatively:

- Ask for the minimal polynomial of the given expression.
- Use the conversion to the number field $\Bbb Q(\sqrt 2)$. (With care for other number fields, i.e. in this example check that $\sqrt 2>0$ is correctly taken as the "value" of the generator...)

In code:

```
sage: u = 2*(2378*sqrt(2) - 3363)/(408*sqrt(2) - 577)
sage: var('x');
sage: solve(u.minpoly()(x) == 0, x)
[x == -4*sqrt(2) + 6, x == 4*sqrt(2) + 6]
sage: u.n()
0.343145749747913
sage: K.<a> = QuadraticField(2)
sage: K
Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
sage: K(u)
-4*a + 6
```

Please consider accepting slelievre's answer, this makes order in the list of the many posts, so that there is no need for potential helpers to look inside of questions with already good answers.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.