Let $\theta$ be a root of $p(x)=x^3+9x+6$, find the inverse of $1+\theta$ in $\mathbb{Q(\theta)}$.
So problems like this really annoy me but I did crappy on the last homework after making a lot of arithmetic mistakes so I want to run everything by you guys. This one isn't actually for homework it's just a suggested practice problem but okay lets go!!!
So I'm not sure if the method I used to do this was standard or not, I don't remember my professor showing me, but what I did first was used the canonical euclidean algorithm in $\mathbb{Q[x]}$ and wrote:
$x^3+9x+6$
$=(1+x)(x^2-x+10-\frac{4}{x+1})$
$=(1+x)(x^2-x+10)-4$
the reduced modulo the minimal polynomial of $\theta$ i.e. $x^3+9x+6$ and so
$4=(1+x)(x^2-x+10)$
$\rightarrow$
$1= \frac{1}{4}(1+x)(x^2-x+10)$ and sooo ah $(\theta^2-\theta+10)\frac{1}{4}$ is what I believe is the inverse of $(1+\theta)$ in the quotient field... Like i said I hate these problems but ehh is this correct? On a lighter note it's finally getting cool enough for me to go on proper runs here and so that's pretty bomb!
Correct: it takes only $1$ step (division $f\div g)\,$ in the extended Euclidean algorithm to invert a linear polynomial $\,g\,$ since $ f = q\,g + c \,\Rightarrow\, \bmod f\!:\ q\,g\equiv -c\,\Rightarrow\, 1/g \equiv -q/c,\,$ just as you calculated (the remainder $\,c\,$ is a constant since it must have degree $< 1 \!=\! \deg g\,$ by the division algorithm, and $\,c\neq 0\,$ when $\,g\nmid f).$
Generally it's easier to use said augmented-matrix form of the extended Euclidean algorithm, e.g. below we compute $\,1/g \pmod{\!f} = 1/(x^2\!+\!1) \pmod{\!x^3\!+\!2x\!+\!1}\,$ over $\,\Bbb Z_3,\,$ from this answer.
$\begin{eqnarray} [\![1]\!]&& &&f = x^3\!+2x+1 &\!\!=&\, \left<\,\color{#c00}1,\,\color{#0a0}0\,\right>\quad\ \ \, {\rm i.e.}\ \qquad\!\:\! f\, =\ \color{#c00}1\cdot f\, +\, \color{#0a0}0\cdot g\\ [\![2]\!]&& &&\qquad\ \, g =x^2\!+1 &\!\!=&\, \left<\,\color{#c00}0,\,\color{#0a0}1\,\right>\quad\ \ \,{\rm i.e.}\ \qquad g\, =\ \color{#c00}0\cdot f\, +\, \color{#0a0}1\cdot g\\ [\![3]\!]&=&[\![1]\!]-x[\![2]\!]\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! &&\qquad\qquad\ \ x+1 \,&\!\!=&\, \left<\,\color{#c00}1,\,\color{#0a0}{-x}\,\right>\ \ \ \:\!{\rm i.e.}\quad\! x\!+\!1\, =\, \color{#c00}1\cdot f\,\color{#0c0}{-\,x}\cdot g\\ [\![4]\!]&=&[\![2]\!]+(1\!-\!x)[\![3]\!]\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! &&\qquad\qquad\qquad\ 2 \,&\!\!=&\, \left<\,\color{#c00}{1\!-\!x},\,\ \color{#0a0}{1\!-\!x+x^2}\,\right>\\ \end{eqnarray}$
Hence the prior line implies: $\ \ 2\ =\ (\color{#c00}{1\!-\!x})f + (\color{#0a0}{1\!-\!x\!+\!x^2})g $
Thus in $\,\Bbb Z_3[x] \bmod f\!:\,\ {-}1\equiv 2 \equiv (\color{#0a0}{1\!-\!x\!+\!x^2})g\ \Rightarrow\ \bbox[6px,border:1px solid red]{g^{-1}\equiv\, {-}(\color{#0a0}{1\!-\!x\!+\!x^2})}$
Remark $ $ Just as for the integer case, we can omit one of the above Bezout coef's, which amounts to working with modular polynomial fractions, e.g. see here where I show how to view an algorithm of Joe Silverman as a simple special case (analogous to the binary extended Euclidean algorithm done using mediant arithmetic and cancellation of $2)$.