def compute_separable_model(self):
        r"""
        Compute a separable model of the curve (if necessary).

        OUTPUT: ``None``

        This function only has to be called only once. It then decides whether
        or not the function field of the curve is given as a separable extension
        of the base field or not. If it is not separable then we compute a
        separable model, which is a tripel `(Y_1,\phi, q)` where

        - `Y_1` is a smooth projective curve over the same constant base field
          `k` as the curve `Y` itself, and which is given by a separable extension,
        - `\phi` is a field homomorphism from the function field of `Y_1` into
          the function field of `Y` corresponding to a purely inseparable extension,
        - `q` is the degree of the extension given by `\phi`, i.e. the degree of
          inseparability of the map `Y\to Y_1` given by `\phi`.
          Note that `q` is a power of the characteristic of `k`.

        """
        F = self.function_field()
        p = F.characteristic()
        if p == 0:
            self._is_separable = True
            return
        F0 = F.base_field()
        if F is F0:
            self._is_separable = True
            return
        G = F.polynomial()
        q = ZZ(1)
        while q < G.degree():
            if all([G[i].is_zero() for i in range(G.degree()+1) if not (p*q).divides(i)]):
                q = q*p
            else:
                break
        # now q is the degree of inseparability
        if q.is_one():
            self._is_separable = True
            return
        # now q>1 and hence F/F_0 is inseparable
        self._is_separable = False
        self._degree_of_inseparability = q
        R1 = PolynomialRing(F0, F.variable_name()+'_s')
        G1 = R1([G[q*i] for i in range((G.degree()/q).floor()+1)])
        F1 = F0.extension(G1, R1.variable_name())
        self._separable_model = SmoothProjectiveCurve(F1)
        self._phi = F1.hom([F.gen()**q])
        self._degree_of_inseparability = q