I was studying Linear Algebra from Hoffman Kunze and in the proof of the Primary Decomposition Theorem, I found
... the polynomials $f_1,f_2,\dots ,f_k$ are relatively prime. Thus, there are polynomials $g_1,g_2,\dots ,g_k$ such that $$\sum_{i=1}^k f_ig_i = 1$$
I can understand that this is a consequence of using Euclid's Division on polynomials. But, I wanted to know whether it is possible to explicitly calculate the $g_i$'s in terms of the $f_i$'s? Is there any algorithm that we can follow to find these $g_i$'s? I tried searching for such an algorithm, but it's not easy to get hold of an algorithm whose name you don't know.
I would like to know if any such algorithm exists.
Also, I'm not sure about the tags. Feel free to edit them.