# Finding the irreducible polynomial from an element of a simple algebraic extension $K(\alpha)$

I am trying to solve the following problem:

Let be $E=K(\alpha)$ a simple algebraic extension. Tell how to calculate the irreducible polynomial of an element $\beta \in E$ considering the coefficients of the irreducible polynomial of $\alpha$ and the expression of $\beta$ in the base of powers of $\alpha$.

The idea I tried to use is considering

$f(x)=a_0+a_1x+\dots+a_{n-1}x^{n-1}+x^n ~|~ f(\alpha)=0 ~ |~f$ irreducible $g(x)=b_0+b_1x+\dots+b_{m-1}x^{m-1}+x^m ~|~ g(\alpha)=\beta$

and tried to equal the coefficients of the equality $h(\beta)=0 \rightarrow h(g(\alpha))=f(\alpha)$ where $h(x)$ is the polynomial I am searching.

This equality result to be very complicated, so I thought it has to be an easier way.

Theoretically simple, but practically somewhat laborious: Given $g$ with $g(\alpha)=\beta$, you can compute all $(g(X))^k\bmod f(X)$, $k=0,1,\ldots, n$. These are $n+1$ polynomials of degree $<n$, hence $K$-linearly dependent. The coefficients occuring in th elinear dependency are the coefficients of $h(X)$ with $h(\beta)=0$.