As you know, given f in k[t] with n roots, its splitting field is isomorphic to k[x1,...,x_n]/I for some ideal I. I'm having trouble finding this ideal. Here's an example from a book:

Let a_i be the roots of x^3+3x+1 in Q[x], where a1 is the real root. Calculate the minimal polynomial a1 over Q in x1 => obvious. Then calculate the minimal polynomial of a2 over Q(a1) in x2 => x_2^2 + a_1 x_2 + a_1^2 + 3, and the minimal polynomial of a3 over Q(a1,a2) in x3 => x_3 + (-4/3)a_1^2 a_2^2 + (-2/3)a_1^2 + (-2/3)a_2^2 + (10/3)a_1 a_2 + (7/3)a_1 + (7/3)a_2 - 2. Then change a_i to x_i, and these three generate the desired ideal.

Well then, how can I make sure of this? And how would I find the ideal "associated to" some other polynomial, e.g. x^3-2?