Powers of a root in terms of basis of field extension I'm wondering if my solution correct for these types of problems
Problem: given irreducible $$f(x)=x^3-2x-2 \in \mathbb{Q}[x]$$
Let $\theta$ be a root of $f$, and $K=\mathbb{Q}(\theta)$ extension over $\mathbb{Q}$. $K$ has $\{1,\theta,\theta^2\}$ as a $\mathbb{Q}$ basis. Express $\theta^5$ in the given basis.
Solution: take powers of $\theta$ in terms of $\theta,\theta^2$, and $\theta^3 = 2\theta + 2$, as $0=\theta^3-2\theta-2$. Therefore
$$\theta^0 =1$$
$$\theta^1 =\theta$$
$$\theta^2 =\theta^2$$
$$\theta^3 =2\theta+2$$
$$\theta^4 =(2\theta+2)\theta = 2\theta^2+2\theta$$
$$\theta^5 = (2\theta^2+2\theta)\theta = 2(2\theta+2)+2\theta^2 = 2\theta^2+4\theta+4$$
Forgive redundant computations, I've merely added it for clarity. edited s.t. $2\cdot 2 = 4$ and not 5

Divide the polynomial $P=X^5$ by $T=X^3-2X-2$. 
First step : $P=X^5=\color{red}{X^2}\,T+2X^3+2X^2$.
Second step : $P=\color{red}{X^2}T+\color{blue}{2}T+2X^2+4X+4$.
Conclusion 
$$P=\underbrace{(X^2+2)}_QT+\underbrace{2X^2+4X+4}_{R}.$$
This is the Euclidian division of polynomials, the remainder $R$ is what you want because
$$P(\theta)=Q(\theta)\underbrace{T(\theta)}_{0}+R(\theta).$$
Therefore, in $\mathbb Q(\theta)$ we have $\theta^5=2\theta^2+4\theta+4$.
