Let $f=f(t),g=g(t) \in \mathbb{C}[t]$ be two separable polynomials of degrees $\deg(f)=n \geq 2$ and $\deg(g)=m \geq 2$, namely, $f$ has $n$ distinct roots and $g$ has $m$ distinct roots.
Denote $d=d(t)=\gcd(f(t),g(t))$, and assume that $\deg(d)=l \geq 1$.
Assume that $d(t)=(t-\gamma_1)\cdots(t-\gamma_l)$, so we can write $f(t)=(t-\gamma_1)\cdots(t-\gamma_l)(t-\alpha_1)\cdots(t-\alpha_{n-l})$ and $g(t)=(t-\gamma_1)\cdots(t-\gamma_l)(t-\beta_1)\cdots(t-\beta_{m-l})$, where $\{\alpha_1,\ldots,\alpha_{n-l},\beta_1,\ldots,\beta_{m-l},\gamma_1,\cdots,\gamma_l\}$ are distinct.
Further assume that $\mathbb{C}(f,g)=\mathbb{C}(t)$.
Are there nice (necessary and sufficient) conditions for $\mathbb{C}[f,g]=\mathbb[t]$?
Examples:
(1) $f=t(t-1)(t+1)=t(t^2-1)=t^3-t, g=t(t-i)(t+i)=t(t^2+1)=t^3+t$ We have $f-g=t^3-t-(t^3+t)=-2t$, so $\mathbb{C}[f,g]=\mathbb{C}[t]$.
(2) $f=(t+1)t(t-1), g=(t+1)(t+2)(t-2)$. By this we get that $\mathbb{C}(f,g)=\mathbb{C}(t)$ (since $\deg(d)=1$). Here $\mathbb{C}[f,g]\neq \mathbb{C}[t]$, since the D-resultant of $f$ and $g$ is $s(s+1)$, and a necessary and sufficient condition for $\mathbb{C}[f,g]=\mathbb{C}[t]$ is that the D-resultant of $f$ and $g$ is a non-zero scalar (namely, $\in \mathbb{C}^{\times}$), see Theorem 2.1.
Several ideas:
One plausible answer is to adjust that Theorem 2.1 to our special case; however, computing the D-resultant is very complicated for higher degrees of $f$ and $g$, or maybe I am missing something and the D-resultant is nicer that I thought?
What about sub-resultants? (I think I can obtain a nice condition involving sub-resultants) but again in higher degrees the computations are complicated.
What about SAGBI bases; it seems that $\{f,g\}$ is not a SAGBI basis, but does this tell something intersting?
By Abhyankar-Moh-Suzuki theroem, $m$ must divide $n$ or vice versa.
A related question is this question, which asks: For which $f,g \in k[t]$, $k[f,g]$ is integrally closed in its field of fractions $k(f,g)=k(t)$? Notice that, in our case, if $\mathbb{C}[f,g]$ is integrally closed in $\mathbb{C}(f,g)$, then, since here $\mathbb{C}(f,g)=\mathbb{C}(t)$, we obtain that $t$, which is obviously integral over $\mathbb{C}[f,g]$, already belongs to $\mathbb{C}[f,g]$, hence $\mathbb{C}[f,g]=\mathbb{C}[t]$.
See also this question.
Special cases are also wellcome.
Plausible special cases:
(1) $\deg(d)=1$: Notice that in each of the two examples $\deg(d)=1$, but this does not help in determinig if $\mathbb{C}[f,g]=\mathbb{C}[t]$ or not, because in the first example we have $\mathbb{C}[f,g]=\mathbb{C}[t]$, while in the second example we have $\mathbb{C}[f,g]\neq\mathbb{C}[t]$. Perhaps I am missing a nice criterion that distinguishes between those two examples?
(2) Special forms of $f$ and/or $g$, for example $f(t)=t^n+at^{\tilde{n}}+b$ and $g(t)=t^m+ct^{\tilde{m}}+d$.
Any hints and comments are welcome!
As promised in the comments, I now prove the following claim:
Claim: Let $k$ be an algebraically closed field of characteristic zero and let $f=f(t),g=g(t) \in k[t]$ be such that $f'$ and $g'$ are not simultaneously zero (this, in some cases, implies that $k(f,g)=k(t)$). Then the following two conditions are equivalent:
(i) $k[f,g]=k[t]$.
(ii) For all $\lambda,\mu \in k$, we have $\deg(\gcd(f-\lambda,g-\mu)) \leq 1$.
Proof:
Lemma (it is necessary to assume that $k$ is algebraically closed): $k[f,g]=k[t]$ if and only if $f'$ and $g'$ are not simultaneously zero and $\psi: t \mapsto (f(t),g(t))$ is injective.
(i) implies (ii):
Denote $F_{\lambda}=F_{\lambda}(t):=f(t)-\lambda$ and $G_{\mu}=G_{\mu}(t):=g(t)-\mu$.
From $k[f,g]=k[t]$ follows that, for all $\lambda,\mu \in k$, $k[F_\lambda,G_\mu]=k[f-\lambda,g-\mu]=k[t]$
By the lemma we get that, for all $\lambda,\mu \in k$, $\psi_{\lambda,\mu}: t \mapsto (F_\lambda(t),G_\mu(t))$ is injective.
Assume that there exist $\lambda_0,\mu_0 \in k$ such that $\deg(\gcd(F_{\lambda_0},G_{\mu_0}))=\deg(\gcd(f-\lambda_0,g-\mu_0)) \geq 2$.
Then there exist $a,b \in k$, with $a \neq b$ (otherwise, $a$ is a common root of $f'$ and $g'$ contrary to our assumption that they are not simultaneously zero) , such that $(t-a)(t-b)$ divides both $F_{\lambda_0}$ and $G_{\mu_0}$.
Then $F_{\lambda_0}(a)=F_{\lambda_0}(b)=G_{\mu_0}(a)=G_{\mu_0}(b)=0$, so
$\psi_{\lambda_0,\mu_0}(a)=(F_{\lambda_0}(a),G_{\mu_0}(a))=(F_{\lambda_0}(b),G_{\mu_0}(b))=\psi_{\lambda_0,\mu_0}(b)$,
which contradicts the injectivity of $\psi_{\lambda_0,\mu_0}: t \mapsto (F_{\lambda_0}(t),G_{\mu_0}(t))$.
Therefore, there exist no such $\lambda_0,\mu_0 \in k$.
(ii) implies (i):
If $k[f,g] \neq k[t]$, then by the lemma we get that $\psi: t \mapsto (f(t),g(t))$ is not injective, namely, there exist $a,b$, $a \neq b$, such that $\psi(a)=\psi(b)$, so $f(a)=f(b):=\lambda_0$ and $g(a)=g(b):=\mu_0$
Take $F_{\lambda_0}:=f-\lambda_0$ and $G_{\mu_0}:=g-\mu_0$.
Then, $F_{\lambda_0}(a)=f(a)-\lambda_0=0$ and $F_{\lambda_0}(b)=f(b)-\lambda_0=0$, so $(t-a)(t-b)$ divides $F_{\lambda_0}$, and $G_{\mu_0}(a)=g(a)-\mu_0=0$ and $G_{\mu_0}(b)=g(b)-\mu_0=0$, so $(t-a)(t-b)$ divides $G_{\mu_0}$.
We obtained that $(t-a)(t-b)$ divides $\gcd(F_{\lambda_0},G_{\mu_0})=\gcd(f-\lambda_0,g-\mu_0)$, so $\deg(\gcd(f-\lambda_0,g-\lambda_0)) \geq 2$, a contradiction.