In a course on Galois theory which I'm taking, the following example problem has come up.
Let $\frac{\mathbb{Q}[x]}{\mathbb{Q}[x]f} = \mathbb{Q}(t)$ be a field where $f = t^3 -2 = 0$. Find the inverse of $t^2 + 1$ in $\mathbb{Q}(t)$.
The solution given to this example problem starts by saying:
"The Euclidean algorithm gives $5 = (x^2+1)(-x^2+2x+1)+(x^3-2)(x-2)$"
I understand the structure of the field, and I understand the problem. I thought I had an understanding of how the Euclidean algorithm works, but I don't understand how we have arrived at this answer.
I can see that if $g = t^2 + 1 \in \mathbb{Q}(t)$, then $g$ and $f$ are coprime, so we have $1 = rg + sf$ for some $r,s$. That's about as far as I got.
EDIT:
To be clear, I'm not asking why this is the answer. I'm asking how we got there in the first place, via the Euclidean algorithm. How does the Euclidean algorithm give the above?
If $$rg+sf=1$$ in $\mathbb{Q}\left(x\right)$, then $$\overline{r}\cdot\overline{g}+\overline{s}\cdot\overline{f}=\overline{1}$$ in $\mathbb{Q}\left(x\right)/f\mathbb{Q}\left(x\right)$, where $\overline{h}=h+f\mathbb{Q}\left(x\right)$. Since $\overline{f}=\overline{0}$, we have $$\overline{r}\cdot\overline{g}=\overline{1}$$ which means that $\overline{r}$ is the inverse of $\overline{g}$, as required.