(self, logs, dummy=True)
return new_extension
Try to build a logarithmic extension.

        Returns True if there was a new extension and False if there was no new
        extension but it was able to rewrite the given logarithms in terms
        of the existing extension.  Unlike with exponential extensions, there
        is no way that a logarithm is not transcendental over and cannot be
        rewritten in terms of an already existing extension in a non-algebraic
        way, so this function does not ever return None or raise
        NotImplementedError.
Try to build a logarithmic extension.
Try to build a logarithmic extension .
def _log_part(self, logs, dummy=True):
        """
        Try to build a logarithmic extension.

        Returns True if there was a new extension and False if there was no new
        extension but it was able to rewrite the given logarithms in terms
        of the existing extension.  Unlike with exponential extensions, there
        is no way that a logarithm is not transcendental over and cannot be
        rewritten in terms of an already existing extension in a non-algebraic
        way, so this function does not ever return None or raise
        NotImplementedError.
        """
        from sympy.integrals.prde import is_deriv_k

        new_extension = False
        logargs = [i.args[0] for i in logs]
        for arg in ordered(logargs):
            # The log case is easier, because whenever a logarithm is algebraic
            # over the base field, it is of the form a1*t1 + ... an*tn + c,
            # which is a polynomial, so we can just replace it with that.
            # In other words, we don't have to worry about radicals.
            arga, argd = frac_in(arg, self.t)
            A = is_deriv_k(arga, argd, self)
            if A is not None:
                ans, u, const = A
                newterm = log(const) + u
                self.newf = self.newf.xreplace({log(arg): newterm})
                continue

            else:
                arga, argd = frac_in(arg, self.t)
                darga = (argd*derivation(Poly(arga, self.t), self) -
                    arga*derivation(Poly(argd, self.t), self))
                dargd = argd**2
                darg = darga.as_expr()/dargd.as_expr()
                self.t = next(self.ts)
                self.T.append(self.t)
                self.L_args.append(arg)
                self.L_K.append(len(self.T) - 1)
                self.D.append(cancel(darg.as_expr()/arg).as_poly(self.t,
                    expand=False))
                if dummy:
                    i = Dummy("i")
                else:
                    i = Symbol('i')
                self.Tfuncs = self.Tfuncs + [Lambda(i, log(arg.subs(self.x, i)))]
                self.newf = self.newf.xreplace({log(arg): self.t})
                new_extension = True

        return new_extension
def _log_part ( self , logs , dummy = True ) : from sympy . integrals . prde import is_deriv_k new_extension = False logargs = [ i . args [ 0 ] for i in logs ] for arg in ordered ( logargs ) : # The log case is easier, because whenever a logarithm is algebraic # over the base field, it is of the form a1*t1 + ... an*tn + c, # which is a polynomial, so we can just replace it with that. # In other words, we don't have to worry about radicals. arga , argd = frac_in ( arg , self . t ) A = is_deriv_k ( arga , argd , self ) if A is not None : ans , u , const = A newterm = log ( const ) + u self . newf = self . newf . xreplace ( { log ( arg ) : newterm } ) continue else : arga , argd = frac_in ( arg , self . t ) darga = ( argd * derivation ( Poly ( arga , self . t ) , self ) - arga * derivation ( Poly ( argd , self . t ) , self ) ) dargd = argd ** 2 darg = darga . as_expr ( ) / dargd . as_expr ( ) self . t = next ( self . ts ) self . T . append ( self . t ) self . L_args . append ( arg ) self . L_K . append ( len ( self . T ) - 1 ) self . D . append ( cancel ( darg . as_expr ( ) / arg ) . as_poly ( self . t , expand = False ) ) if dummy : i = Dummy ( "i" ) else : i = Symbol ( 'i' ) self . Tfuncs = self . Tfuncs + [ Lambda ( i , log ( arg . subs ( self . x , i ) ) ) ] self . newf = self . newf . xreplace ( { log ( arg ) : self . t } ) new_extension = True return new_extension