(self, x)
return p1
integrate ``p`` with respect to ``x``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_integrate
    >>> R, x, y = ring('x, y', QQ)
    >>> p = x + x**2*y**3
    >>> rs_integrate(p, x)
    1/3*x**3*y**3 + 1/2*x**2
integrate ``p`` with respect to ``x``
integrate p with respect to x
def rs_integrate(self, x):
    """
    integrate ``p`` with respect to ``x``

    Examples
    ========

    >>> from sympy.polys.domains import QQ
    >>> from sympy.polys.rings import ring
    >>> from sympy.polys.ring_series import rs_integrate
    >>> R, x, y = ring('x, y', QQ)
    >>> p = x + x**2*y**3
    >>> rs_integrate(p, x)
    1/3*x**3*y**3 + 1/2*x**2
    """
    ring = self.ring
    p1 = ring.zero
    n = ring.gens.index(x)
    mn = [0]*ring.ngens
    mn[n] = 1
    mn = tuple(mn)

    for expv in self:
        e = monomial_mul(expv, mn)
        p1[e] = self[expv]/(expv[n] + 1)
    return p1
def rs_integrate ( self , x ) : ring = self . ring p1 = ring . zero n = ring . gens . index ( x ) mn = [ 0 ] * ring . ngens mn [ n ] = 1 mn = tuple ( mn ) for expv in self : e = monomial_mul ( expv , mn ) p1 [ e ] = self [ expv ] / ( expv [ n ] + 1 ) return p1