How can i find a inverse of a polynomial in a quotient ring? I am asked to find the inverse of $\widehat {x^3+1} $ in Q/[x]/I where I = $x^2-2$. 
I am used to find the inverse by keep doing the division until a find a irreducible elements but the degree of the polynomial i asked to find the inverse is larger than the degree of polynomial in I.
In previous question, we have calculated the inverse of $\widehat {X} $ which is $1/2$(X). And i am trying to breaking down $X^3 - 1 $ into $X(X^2-2)$ + $(2X+1)$. Is this bit some hints to approach this question or is it a new idea to find the inverse with a polynomial of a larger degree?
Thanks a lot!!
 A: Hint $\ \ \color{#c00}{x^2 = 2}\ \Rightarrow\  \dfrac{1}{1+\color{#c00}{x^2} x} \,=\, \dfrac{1}{1+\color{#c00}2x} = \dfrac{1}{1+2\color{#c00}x}\, \dfrac{1-2x}{1-2\color{#c00}x} = \dfrac{1\,-\,2x\ }{1-4(\color{#c00}2)}$
i.e. $ $ rationalize the denom  of $\, \dfrac{1}{1+2\sqrt{2}}.\,$ More generally, use the Extended Euclidean Algorithm.
For much further discussion see here and its links.
A: Applying the generalized Euclidean algorithm to $x^3+1$ and to $x^2-2$, you get that$$-\frac74=\left(\frac{x^2}2-\frac x4+1\right)(x^2-2)-\left(\frac x2-\frac14\right)(x^3+1).$$Therefore,$$\left(-\frac{2x^2}7+\frac x7-\frac47\right)(x^2-2)+\left(\frac{2x}7-\frac17\right)(x^3+1)=1$$and so the inverse of $x^3+1$ in $\mathbb{Q}[x]/\langle x^2-2\rangle$ is $\dfrac{2x}7-\dfrac17$.
A: extended Euc:
$$  \left(   x^{3}  + 1 \right)  $$ 
$$  \left(   x^{2}  - 2 \right)  $$ 
$$  \left(   x^{3}  + 1 \right)  =  \left(   x^{2}  - 2 \right)  \cdot \color{magenta}{  \left(   x  \right) } +  \left(  2 x  + 1 \right)  $$
$$  \left(   x^{2}  - 2 \right)  =  \left(  2 x  + 1 \right)  \cdot \color{magenta}{  \left(   \frac{ 2 x  - 1 }{ 4 }  \right) } +  \left( \frac{ -7}{4 } \right)  $$
$$  \left(  2 x  + 1 \right)  =  \left( \frac{ -7}{4 } \right)  \cdot \color{magenta}{  \left(   \frac{  - 8 x  - 4 }{ 7 }  \right) } +  \left( 0 \right)  $$
$$ \frac{ 0}{1} $$
$$ \frac{ 1}{0} $$
$$ \color{magenta}{  \left(   x  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   x  \right) }{ \left( 1  \right) } $$
$$ \color{magenta}{  \left(   \frac{ 2 x  - 1 }{ 4 }  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   \frac{ 2 x^{2}  -  x  + 4 }{ 4 }  \right) }{ \left(   \frac{ 2 x  - 1 }{ 4 }  \right) } $$
$$ \color{magenta}{  \left(   \frac{  - 8 x  - 4 }{ 7 }  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   \frac{  - 4 x^{3}  - 4 }{ 7 }  \right) }{ \left(   \frac{  - 4 x^{2}  + 8 }{ 7 }  \right) } $$
$$  \left(   x^{3}  + 1 \right)  \left(   \frac{ 2 x  - 1 }{ 7 }  \right)  -  \left(   x^{2}  - 2 \right)  \left(   \frac{ 2 x^{2}  -  x  + 4 }{ 7 }  \right)  =  \left( 1  \right)  $$ 
