Exemple #1
0
    def get_rubi_object():
        """
        Returns rubi ManyToOneReplacer by adding all rules from different modules.

        Uncomment the lines to add integration capabilities of that module.

        Currently, there are parsing issues with special_function,
        derivative and miscellaneous_integration. Hence they are commented.
        """
        from sympy.integrals.rubi.rules.integrand_simplification import (
            integrand_simplification, )
        from sympy.integrals.rubi.rules.linear_products import linear_products
        from sympy.integrals.rubi.rules.quadratic_products import quadratic_products
        from sympy.integrals.rubi.rules.binomial_products import binomial_products
        from sympy.integrals.rubi.rules.trinomial_products import trinomial_products
        from sympy.integrals.rubi.rules.miscellaneous_algebraic import (
            miscellaneous_algebraic, )
        from sympy.integrals.rubi.rules.exponential import exponential
        from sympy.integrals.rubi.rules.logarithms import logarithms
        from sympy.integrals.rubi.rules.sine import sine
        from sympy.integrals.rubi.rules.tangent import tangent
        from sympy.integrals.rubi.rules.secant import secant
        from sympy.integrals.rubi.rules.miscellaneous_trig import miscellaneous_trig
        from sympy.integrals.rubi.rules.inverse_trig import inverse_trig
        from sympy.integrals.rubi.rules.hyperbolic import hyperbolic
        from sympy.integrals.rubi.rules.inverse_hyperbolic import inverse_hyperbolic
        from sympy.integrals.rubi.rules.special_functions import special_functions

        # from sympy.integrals.rubi.rules.derivative import derivative
        # from sympy.integrals.rubi.rules.piecewise_linear import piecewise_linear
        from sympy.integrals.rubi.rules.miscellaneous_integration import (
            miscellaneous_integration, )

        rules = []

        rules += integrand_simplification()
        rules += linear_products()
        rules += quadratic_products()
        rules += binomial_products()
        rules += trinomial_products()
        rules += miscellaneous_algebraic()
        rules += exponential()
        rules += logarithms()
        rules += special_functions()
        rules += sine()
        rules += tangent()
        rules += secant()
        rules += miscellaneous_trig()
        rules += inverse_trig()
        rules += hyperbolic()
        rules += inverse_hyperbolic()
        # rubi = piecewise_linear(rubi)
        rules += miscellaneous_integration()

        rubi = ManyToOneReplacer(*rules)
        return rubi, rules
Exemple #2
0
    def rubi_object():
        '''
        Returns rubi ManyToOneReplacer by adding all rules from different modules.

        Uncomment the lines to add integration capabilities of that module.

        Currently, there are parsing issues with special_function,
        derivative and miscellaneous_integration. Hence they are commented.
        '''
        from sympy.integrals.rubi.rules.integrand_simplification import integrand_simplification
        from sympy.integrals.rubi.rules.linear_products import linear_products
        from sympy.integrals.rubi.rules.quadratic_products import quadratic_products
        from sympy.integrals.rubi.rules.binomial_products import binomial_products
        from sympy.integrals.rubi.rules.trinomial_products import trinomial_products
        from sympy.integrals.rubi.rules.miscellaneous_algebraic import miscellaneous_algebraic
        from sympy.integrals.rubi.rules.exponential import exponential
        from sympy.integrals.rubi.rules.logarithms import logarithms
        from sympy.integrals.rubi.rules.sine import sine
        from sympy.integrals.rubi.rules.tangent import tangent
        from sympy.integrals.rubi.rules.secant import secant
        from sympy.integrals.rubi.rules.miscellaneous_trig import miscellaneous_trig
        from sympy.integrals.rubi.rules.inverse_trig import inverse_trig
        from sympy.integrals.rubi.rules.hyperbolic import hyperbolic
        from sympy.integrals.rubi.rules.inverse_hyperbolic import inverse_hyperbolic
        from sympy.integrals.rubi.rules.special_functions import special_functions
        #from sympy.integrals.rubi.rules.derivative import derivative
        #from sympy.integrals.rubi.rules.piecewise_linear import piecewise_linear
        from sympy.integrals.rubi.rules.miscellaneous_integration import miscellaneous_integration
        rules = []
        rules_applied = []
        rules += integrand_simplification(rules_applied)
        rules += linear_products(rules_applied)
        rules += quadratic_products(rules_applied)
        rules += binomial_products(rules_applied)
        rules += trinomial_products(rules_applied)
        rules += miscellaneous_algebraic(rules_applied)
        rules += exponential(rules_applied)
        rules += logarithms(rules_applied)
        rules += special_functions(rules_applied)
        rules += sine(rules_applied)
        rules += tangent(rules_applied)
        rules += secant(rules_applied)
        rules += miscellaneous_trig(rules_applied)
        rules += inverse_trig(rules_applied)
        rules += hyperbolic(rules_applied)
        rules += inverse_hyperbolic(rules_applied)
        #rubi = piecewise_linear(rubi)
        rules += miscellaneous_integration(rules_applied)
        rubi = ManyToOneReplacer(*rules)
        return rubi, rules_applied, rules
Exemple #3
0
    def rubi_object():
        '''
        Returns rubi ManyToOneReplacer by adding all rules form different modules.

        Uncomment the lines to add integration capabilities of that module.

        Currently, there are parsing issues with special_function,
        derivative nad miscellaneous_integration. Hence they are commented.
        '''
        from sympy.integrals.rubi.rules.integrand_simplification import integrand_simplification
        from sympy.integrals.rubi.rules.linear_products import linear_products
        from sympy.integrals.rubi.rules.quadratic_products import quadratic_products
        from sympy.integrals.rubi.rules.binomial_products import binomial_products
        from sympy.integrals.rubi.rules.trinomial_products import trinomial_products
        from sympy.integrals.rubi.rules.miscellaneous_algebraic import miscellaneous_algebraic
        from sympy.integrals.rubi.rules.exponential import exponential
        from sympy.integrals.rubi.rules.logarithms import logarithms
        from sympy.integrals.rubi.rules.sine import sine
        from sympy.integrals.rubi.rules.tangent import tangent
        from sympy.integrals.rubi.rules.secant import secant
        from sympy.integrals.rubi.rules.miscellaneous_trig import miscellaneous_trig
        from sympy.integrals.rubi.rules.inverse_trig import inverse_trig
        from sympy.integrals.rubi.rules.hyperbolic import hyperbolic
        from sympy.integrals.rubi.rules.inverse_hyperbolic import inverse_hyperbolic
        #from sympy.integrals.rubi.rules.special_function import special_function
        #from sympy.integrals.rubi.rules.derivative import derivative
        from sympy.integrals.rubi.rules.piecewise_linear import piecewise_linear
        #from sympy.integrals.rubi.rules.miscellaneous_integration import miscellaneous_integration

        rubi = ManyToOneReplacer()
        #rubi = integrand_simplification(rubi)
        rubi = linear_products(rubi)
        rubi = quadratic_products(rubi)
        rubi = binomial_products(rubi)
        #rubi = trinomial_products(rubi)
        #rubi = miscellaneous_algebraic(rubi)
        #rubi = exponential(rubi)
        #rubi = logarithms(rubi)
        #rubi = sine(rubi)
        #rubi = tangent(rubi)
        #rubi = secant(rubi)
        #rubi = miscellaneous_trig(rubi)
        #rubi = inverse_trig(rubi)
        #rubi = hyperbolic(rubi)
        #rubi = inverse_hyperbolic(rubi)
        #rubi = piecewise_linear(rubi)
        #rubi = miscellaneous_integration(rubi)

        return rubi