# Simplify expression with root

The result of some integral, computed using integrate(), is:

```
2*(2378*sqrt(2) - 3363)/(408*sqrt(2) - 577)
```

However, when I do the integral "by hand" I get

```
2*(3-2*sqrt(2))
```

Numerically both results are the same, but the first result is a lot more complicated.

Multiplying separately the numerator and denominator of the first expression by (408*sqrt(2) + 577) brings the correct result.

What can I do to simplify the first expression and get something really simple, as the second one?

Thanks in advance!

Welcome to Ask Sage! Thank you for your question!