Ejemplo n.º 1
0
 def With1899(u, b, a, n, x):
     c = D(u, x)
     rubi.append(1899)
     return -Dist(c * n / b,
                  Int(u**(n + S(-1)) *
                      (a + b * x) * log(a + b * x), x), x) - Int(
                          u**n, x) + Simp(
                              u**n * (a + b * x) * log(a + b * x) / b, x)
Ejemplo n.º 2
0
def With1903(a, b, m, n, u, x):
    c = D(u, x)
    return -Dist(
        c * n / (b * (m + S(1))),
        Int(u**(n + S(-1)) *
            (a + b * x)**(m + S(1)) * log(a + b * x), x), x) - Dist(
                S(1) / (m + S(1)), Int(u**n * (a + b * x)**m, x), x) + Simp(
                    u**n * (a + b * x)**(m + S(1)) * log(a + b * x) /
                    (b * (m + S(1))), x)
Ejemplo n.º 3
0
 def With1900(u, m, b, a, n, x):
     c = D(u, x)
     rubi.append(1900)
     return -Dist(
         c * n / (b * (m + S(1))),
         Int(u**(n + S(-1)) *
             (a + b * x)**(m + S(1)) * log(a + b * x), x), x) - Dist(
                 S(1) /
                 (m + S(1)), Int(u**n * (a + b * x)**m, x), x) + Simp(
                     u**n * (a + b * x)**(m + S(1)) * log(a + b * x) /
                     (b * (m + S(1))), x)
Ejemplo n.º 4
0
 def replacement30(m, b, a, n, x):
     rubi.append(30)
     return Simp(log(RemoveContent(a + b*x**n, x))/(b*n), x)
Ejemplo n.º 5
0
def replacement32(a, b, m, n, x):
    return Simp(log(RemoveContent(a + b * x**n, x)) / (b * n), x)
Ejemplo n.º 6
0
def piecewise_linear(rubi):
    from sympy.integrals.rubi.constraints import cons1090, cons21, cons1091, cons87, cons88, cons1092, cons89, cons23, cons72, cons66, cons4, cons1093, cons214, cons683, cons100, cons101, cons1094, cons1095, cons31, cons94, cons356, cons1096, cons18, cons1097, cons2, cons3

    def With1882(x, m, u):
        c = D(u, x)
        rubi.append(1882)
        return Dist(S(1) / c, Subst(Int(x**m, x), x, u), x)

    pattern1882 = Pattern(Integral(u_**WC('m', S(1)), x_), cons21, cons1090)
    rule1882 = ReplacementRule(pattern1882, With1882)

    def With1883(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1883 = Pattern(Integral(v_ / u_, x_), cons1091,
                          CustomConstraint(With1883))

    def replacement1883(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1883)
        return -Dist(
            (-a * v + b * u) / a, Int(S(1) / u, x), x) + Simp(b * x / a, x)

    rule1883 = ReplacementRule(pattern1883, replacement1883)

    def With1884(v, x, n, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1884 = Pattern(Integral(v_**n_ / u_, x_), cons1091, cons87, cons88,
                          cons1092, CustomConstraint(With1884))

    def replacement1884(v, x, n, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1884)
        return -Dist(
            (-a * v + b * u) / a, Int(v**(n + S(-1)) / u, x), x) + Simp(
                v**n / (a * n), x)

    rule1884 = ReplacementRule(pattern1884, replacement1884)

    def With1885(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1885 = Pattern(Integral(S(1) / (u_ * v_), x_), cons1091,
                          CustomConstraint(With1885))

    def replacement1885(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1885)
        return -Dist(a / (-a * v + b * u), Int(S(1) / u, x), x) + Dist(
            b / (-a * v + b * u), Int(S(1) / v, x), x)

    rule1885 = ReplacementRule(pattern1885, replacement1885)

    def With1886(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if And(NonzeroQ(-a * v + b * u), PosQ((-a * v + b * u) / a)):
            return True
        return False

    pattern1886 = Pattern(Integral(S(1) / (u_ * sqrt(v_)), x_), cons1091,
                          CustomConstraint(With1886))

    def replacement1886(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1886)
        return Simp(
            S(2) * ArcTan(sqrt(v) / Rt((-a * v + b * u) / a, S(2))) / (a * Rt(
                (-a * v + b * u) / a, S(2))), x)

    rule1886 = ReplacementRule(pattern1886, replacement1886)

    def With1887(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if And(NonzeroQ(-a * v + b * u), NegQ((-a * v + b * u) / a)):
            return True
        return False

    pattern1887 = Pattern(Integral(S(1) / (u_ * sqrt(v_)), x_), cons1091,
                          CustomConstraint(With1887))

    def replacement1887(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1887)
        return Simp(
            -S(2) * atanh(sqrt(v) / Rt(-(-a * v + b * u) / a, S(2))) /
            (a * Rt(-(-a * v + b * u) / a, S(2))), x)

    rule1887 = ReplacementRule(pattern1887, replacement1887)

    def With1888(v, x, n, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1888 = Pattern(Integral(v_**n_ / u_, x_), cons1091, cons87, cons89,
                          CustomConstraint(With1888))

    def replacement1888(v, x, n, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1888)
        return -Dist(a /
                     (-a * v + b * u), Int(v**(n + S(1)) / u, x), x) + Simp(
                         v**(n + S(1)) / ((n + S(1)) * (-a * v + b * u)), x)

    rule1888 = ReplacementRule(pattern1888, replacement1888)

    def With1889(v, x, n, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1889 = Pattern(Integral(v_**n_ / u_, x_), cons1091, cons23,
                          CustomConstraint(With1889))

    def replacement1889(v, x, n, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1889)
        return Simp(
            v**(n + S(1)) *
            Hypergeometric2F1(S(1), n + S(1), n + S(2), -a * v /
                              (-a * v + b * u)) / ((n + S(1)) *
                                                   (-a * v + b * u)), x)

    rule1889 = ReplacementRule(pattern1889, replacement1889)

    def With1890(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if And(NonzeroQ(-a * v + b * u), PosQ(a * b)):
            return True
        return False

    pattern1890 = Pattern(Integral(S(1) / (sqrt(u_) * sqrt(v_)), x_), cons1091,
                          CustomConstraint(With1890))

    def replacement1890(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1890)
        return Simp(
            S(2) * atanh(sqrt(u) * Rt(a * b, S(2)) / (a * sqrt(v))) /
            Rt(a * b, S(2)), x)

    rule1890 = ReplacementRule(pattern1890, replacement1890)

    def With1891(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if And(NonzeroQ(-a * v + b * u), NegQ(a * b)):
            return True
        return False

    pattern1891 = Pattern(Integral(S(1) / (sqrt(u_) * sqrt(v_)), x_), cons1091,
                          CustomConstraint(With1891))

    def replacement1891(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1891)
        return Simp(
            S(2) * ArcTan(sqrt(u) * Rt(-a * b, S(2)) / (a * sqrt(v))) /
            Rt(-a * b, S(2)), x)

    rule1891 = ReplacementRule(pattern1891, replacement1891)

    def With1892(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1892 = Pattern(Integral(u_**m_ * v_**n_, x_), cons21, cons4,
                          cons1091, cons72, cons66, CustomConstraint(With1892))

    def replacement1892(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1892)
        return -Simp(
            u**(m + S(1)) * v**(n + S(1)) / ((m + S(1)) * (-a * v + b * u)), x)

    rule1892 = ReplacementRule(pattern1892, replacement1892)

    def With1893(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1893 = Pattern(Integral(u_**m_ * v_**WC('n', S(1)), x_), cons21,
                          cons4, cons1091, cons66, cons1093,
                          CustomConstraint(With1893))

    def replacement1893(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1893)
        return -Dist(b * n /
                     (a * (m + S(1))), Int(u**(m + S(1)) * v**(n + S(-1)), x),
                     x) + Simp(u**(m + S(1)) * v**n / (a * (m + S(1))), x)

    rule1893 = ReplacementRule(pattern1893, replacement1893)

    def With1894(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1894 = Pattern(Integral(u_**m_ * v_**WC('n', S(1)), x_), cons1091,
                          cons214, cons87, cons88, cons683, cons100, cons101,
                          CustomConstraint(With1894))

    def replacement1894(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1894)
        return -Dist(n * (-a * v + b * u) /
                     (a * (m + n + S(1))), Int(u**m * v**(n + S(-1)), x),
                     x) + Simp(u**(m + S(1)) * v**n / (a * (m + n + S(1))), x)

    rule1894 = ReplacementRule(pattern1894, replacement1894)

    def With1895(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1895 = Pattern(Integral(u_**m_ * v_**n_, x_), cons1091, cons683,
                          cons1094, cons1095, CustomConstraint(With1895))

    def replacement1895(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1895)
        return -Dist(n * (-a * v + b * u) /
                     (a * (m + n + S(1))), Int(u**m * v**(n + S(-1)), x),
                     x) + Simp(u**(m + S(1)) * v**n / (a * (m + n + S(1))), x)

    rule1895 = ReplacementRule(pattern1895, replacement1895)

    def With1896(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1896 = Pattern(Integral(u_**m_ * v_**n_, x_), cons1091, cons214,
                          cons31, cons94, CustomConstraint(With1896))

    def replacement1896(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1896)
        return Dist(b * (m + n + S(2)) / (
            (m + S(1)) *
            (-a * v + b * u)), Int(u**(m + S(1)) * v**n, x), x) - Simp(
                u**(m + S(1)) * v**(n + S(1)) / ((m + S(1)) *
                                                 (-a * v + b * u)), x)

    rule1896 = ReplacementRule(pattern1896, replacement1896)

    def With1897(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1897 = Pattern(Integral(u_**m_ * v_**n_, x_), cons1091, cons356,
                          cons1096, CustomConstraint(With1897))

    def replacement1897(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1897)
        return Dist(b * (m + n + S(2)) / (
            (m + S(1)) *
            (-a * v + b * u)), Int(u**(m + S(1)) * v**n, x), x) - Simp(
                u**(m + S(1)) * v**(n + S(1)) / ((m + S(1)) *
                                                 (-a * v + b * u)), x)

    rule1897 = ReplacementRule(pattern1897, replacement1897)

    def With1898(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a * v + b * u):
            return True
        return False

    pattern1898 = Pattern(Integral(u_**m_ * v_**n_, x_), cons1091, cons18,
                          cons23, CustomConstraint(With1898))

    def replacement1898(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1898)
        return Simp(
            u**m * v**(n + S(1)) * (b * u / (-a * v + b * u))**(-m) *
            Hypergeometric2F1(-m, n + S(1), n + S(2), -a * v /
                              (-a * v + b * u)) / (b * (n + S(1))), x)

    rule1898 = ReplacementRule(pattern1898, replacement1898)

    def With1899(u, b, a, n, x):
        c = D(u, x)
        rubi.append(1899)
        return -Dist(c * n / b,
                     Int(u**(n + S(-1)) *
                         (a + b * x) * log(a + b * x), x), x) - Int(
                             u**n, x) + Simp(
                                 u**n * (a + b * x) * log(a + b * x) / b, x)

    pattern1899 = Pattern(
        Integral(u_**WC('n', S(1)) * log(x_ * WC('b', S(1)) + WC('a', S(0))),
                 x_), cons2, cons3, cons1090, cons1097, cons87, cons88)
    rule1899 = ReplacementRule(pattern1899, With1899)

    def With1900(u, m, b, a, n, x):
        c = D(u, x)
        rubi.append(1900)
        return -Dist(
            c * n / (b * (m + S(1))),
            Int(u**(n + S(-1)) *
                (a + b * x)**(m + S(1)) * log(a + b * x), x), x) - Dist(
                    S(1) /
                    (m + S(1)), Int(u**n * (a + b * x)**m, x), x) + Simp(
                        u**n * (a + b * x)**(m + S(1)) * log(a + b * x) /
                        (b * (m + S(1))), x)

    pattern1900 = Pattern(
        Integral(
            u_**WC('n', S(1)) *
            (x_ * WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)) *
            log(x_ * WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons21,
        cons1090, cons1097, cons87, cons88, cons66)
    rule1900 = ReplacementRule(pattern1900, With1900)
    return [
        rule1882,
        rule1883,
        rule1884,
        rule1885,
        rule1886,
        rule1887,
        rule1888,
        rule1889,
        rule1890,
        rule1891,
        rule1892,
        rule1893,
        rule1894,
        rule1895,
        rule1896,
        rule1897,
        rule1898,
        rule1899,
        rule1900,
    ]
 def replacement30(m, b, a, n, x):
     rubi.append(30)
     return Simp(log(RemoveContent(a + b * x**n, x)) / (b * n), x)
Ejemplo n.º 8
0
 def With1900(u, m, b, a, n, x):
     c = D(u, x)
     rubi.append(1900)
     return -Dist(c*n/(b*(m + S(1))), Int(u**(n + S(-1))*(a + b*x)**(m + S(1))*log(a + b*x), x), x) - Dist(S(1)/(m + S(1)), Int(u**n*(a + b*x)**m, x), x) + Simp(u**n*(a + b*x)**(m + S(1))*log(a + b*x)/(b*(m + S(1))), x)
Ejemplo n.º 9
0
 def With1899(u, b, a, n, x):
     c = D(u, x)
     rubi.append(1899)
     return -Dist(c*n/b, Int(u**(n + S(-1))*(a + b*x)*log(a + b*x), x), x) - Int(u**n, x) + Simp(u**n*(a + b*x)*log(a + b*x)/b, x)
Ejemplo n.º 10
0
def piecewise_linear(rubi):
    from sympy.integrals.rubi.constraints import cons1090, cons21, cons1091, cons87, cons88, cons1092, cons89, cons23, cons72, cons66, cons4, cons1093, cons214, cons683, cons100, cons101, cons1094, cons1095, cons31, cons94, cons356, cons1096, cons18, cons1097, cons2, cons3

    def With1882(x, m, u):
        c = D(u, x)
        rubi.append(1882)
        return Dist(S(1)/c, Subst(Int(x**m, x), x, u), x)
    pattern1882 = Pattern(Integral(u_**WC('m', S(1)), x_), cons21, cons1090)
    rule1882 = ReplacementRule(pattern1882, With1882)
    def With1883(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1883 = Pattern(Integral(v_/u_, x_), cons1091, CustomConstraint(With1883))
    def replacement1883(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1883)
        return -Dist((-a*v + b*u)/a, Int(S(1)/u, x), x) + Simp(b*x/a, x)
    rule1883 = ReplacementRule(pattern1883, replacement1883)
    def With1884(v, x, n, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1884 = Pattern(Integral(v_**n_/u_, x_), cons1091, cons87, cons88, cons1092, CustomConstraint(With1884))
    def replacement1884(v, x, n, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1884)
        return -Dist((-a*v + b*u)/a, Int(v**(n + S(-1))/u, x), x) + Simp(v**n/(a*n), x)
    rule1884 = ReplacementRule(pattern1884, replacement1884)
    def With1885(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1885 = Pattern(Integral(S(1)/(u_*v_), x_), cons1091, CustomConstraint(With1885))
    def replacement1885(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1885)
        return -Dist(a/(-a*v + b*u), Int(S(1)/u, x), x) + Dist(b/(-a*v + b*u), Int(S(1)/v, x), x)
    rule1885 = ReplacementRule(pattern1885, replacement1885)
    def With1886(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if And(NonzeroQ(-a*v + b*u), PosQ((-a*v + b*u)/a)):
            return True
        return False
    pattern1886 = Pattern(Integral(S(1)/(u_*sqrt(v_)), x_), cons1091, CustomConstraint(With1886))
    def replacement1886(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1886)
        return Simp(S(2)*ArcTan(sqrt(v)/Rt((-a*v + b*u)/a, S(2)))/(a*Rt((-a*v + b*u)/a, S(2))), x)
    rule1886 = ReplacementRule(pattern1886, replacement1886)
    def With1887(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if And(NonzeroQ(-a*v + b*u), NegQ((-a*v + b*u)/a)):
            return True
        return False
    pattern1887 = Pattern(Integral(S(1)/(u_*sqrt(v_)), x_), cons1091, CustomConstraint(With1887))
    def replacement1887(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1887)
        return Simp(-S(2)*atanh(sqrt(v)/Rt(-(-a*v + b*u)/a, S(2)))/(a*Rt(-(-a*v + b*u)/a, S(2))), x)
    rule1887 = ReplacementRule(pattern1887, replacement1887)
    def With1888(v, x, n, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1888 = Pattern(Integral(v_**n_/u_, x_), cons1091, cons87, cons89, CustomConstraint(With1888))
    def replacement1888(v, x, n, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1888)
        return -Dist(a/(-a*v + b*u), Int(v**(n + S(1))/u, x), x) + Simp(v**(n + S(1))/((n + S(1))*(-a*v + b*u)), x)
    rule1888 = ReplacementRule(pattern1888, replacement1888)
    def With1889(v, x, n, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1889 = Pattern(Integral(v_**n_/u_, x_), cons1091, cons23, CustomConstraint(With1889))
    def replacement1889(v, x, n, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1889)
        return Simp(v**(n + S(1))*Hypergeometric2F1(S(1), n + S(1), n + S(2), -a*v/(-a*v + b*u))/((n + S(1))*(-a*v + b*u)), x)
    rule1889 = ReplacementRule(pattern1889, replacement1889)
    def With1890(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if And(NonzeroQ(-a*v + b*u), PosQ(a*b)):
            return True
        return False
    pattern1890 = Pattern(Integral(S(1)/(sqrt(u_)*sqrt(v_)), x_), cons1091, CustomConstraint(With1890))
    def replacement1890(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1890)
        return Simp(S(2)*atanh(sqrt(u)*Rt(a*b, S(2))/(a*sqrt(v)))/Rt(a*b, S(2)), x)
    rule1890 = ReplacementRule(pattern1890, replacement1890)
    def With1891(v, x, u):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if And(NonzeroQ(-a*v + b*u), NegQ(a*b)):
            return True
        return False
    pattern1891 = Pattern(Integral(S(1)/(sqrt(u_)*sqrt(v_)), x_), cons1091, CustomConstraint(With1891))
    def replacement1891(v, x, u):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1891)
        return Simp(S(2)*ArcTan(sqrt(u)*Rt(-a*b, S(2))/(a*sqrt(v)))/Rt(-a*b, S(2)), x)
    rule1891 = ReplacementRule(pattern1891, replacement1891)
    def With1892(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1892 = Pattern(Integral(u_**m_*v_**n_, x_), cons21, cons4, cons1091, cons72, cons66, CustomConstraint(With1892))
    def replacement1892(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1892)
        return -Simp(u**(m + S(1))*v**(n + S(1))/((m + S(1))*(-a*v + b*u)), x)
    rule1892 = ReplacementRule(pattern1892, replacement1892)
    def With1893(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1893 = Pattern(Integral(u_**m_*v_**WC('n', S(1)), x_), cons21, cons4, cons1091, cons66, cons1093, CustomConstraint(With1893))
    def replacement1893(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1893)
        return -Dist(b*n/(a*(m + S(1))), Int(u**(m + S(1))*v**(n + S(-1)), x), x) + Simp(u**(m + S(1))*v**n/(a*(m + S(1))), x)
    rule1893 = ReplacementRule(pattern1893, replacement1893)
    def With1894(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1894 = Pattern(Integral(u_**m_*v_**WC('n', S(1)), x_), cons1091, cons214, cons87, cons88, cons683, cons100, cons101, CustomConstraint(With1894))
    def replacement1894(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1894)
        return -Dist(n*(-a*v + b*u)/(a*(m + n + S(1))), Int(u**m*v**(n + S(-1)), x), x) + Simp(u**(m + S(1))*v**n/(a*(m + n + S(1))), x)
    rule1894 = ReplacementRule(pattern1894, replacement1894)
    def With1895(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1895 = Pattern(Integral(u_**m_*v_**n_, x_), cons1091, cons683, cons1094, cons1095, CustomConstraint(With1895))
    def replacement1895(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1895)
        return -Dist(n*(-a*v + b*u)/(a*(m + n + S(1))), Int(u**m*v**(n + S(-1)), x), x) + Simp(u**(m + S(1))*v**n/(a*(m + n + S(1))), x)
    rule1895 = ReplacementRule(pattern1895, replacement1895)
    def With1896(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1896 = Pattern(Integral(u_**m_*v_**n_, x_), cons1091, cons214, cons31, cons94, CustomConstraint(With1896))
    def replacement1896(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1896)
        return Dist(b*(m + n + S(2))/((m + S(1))*(-a*v + b*u)), Int(u**(m + S(1))*v**n, x), x) - Simp(u**(m + S(1))*v**(n + S(1))/((m + S(1))*(-a*v + b*u)), x)
    rule1896 = ReplacementRule(pattern1896, replacement1896)
    def With1897(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1897 = Pattern(Integral(u_**m_*v_**n_, x_), cons1091, cons356, cons1096, CustomConstraint(With1897))
    def replacement1897(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1897)
        return Dist(b*(m + n + S(2))/((m + S(1))*(-a*v + b*u)), Int(u**(m + S(1))*v**n, x), x) - Simp(u**(m + S(1))*v**(n + S(1))/((m + S(1))*(-a*v + b*u)), x)
    rule1897 = ReplacementRule(pattern1897, replacement1897)
    def With1898(v, u, m, n, x):
        if isinstance(x, (int, Integer, float, Float)):
            return False
        a = D(u, x)
        b = D(v, x)
        if NonzeroQ(-a*v + b*u):
            return True
        return False
    pattern1898 = Pattern(Integral(u_**m_*v_**n_, x_), cons1091, cons18, cons23, CustomConstraint(With1898))
    def replacement1898(v, u, m, n, x):

        a = D(u, x)
        b = D(v, x)
        rubi.append(1898)
        return Simp(u**m*v**(n + S(1))*(b*u/(-a*v + b*u))**(-m)*Hypergeometric2F1(-m, n + S(1), n + S(2), -a*v/(-a*v + b*u))/(b*(n + S(1))), x)
    rule1898 = ReplacementRule(pattern1898, replacement1898)
    def With1899(u, b, a, n, x):
        c = D(u, x)
        rubi.append(1899)
        return -Dist(c*n/b, Int(u**(n + S(-1))*(a + b*x)*log(a + b*x), x), x) - Int(u**n, x) + Simp(u**n*(a + b*x)*log(a + b*x)/b, x)
    pattern1899 = Pattern(Integral(u_**WC('n', S(1))*log(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons1090, cons1097, cons87, cons88)
    rule1899 = ReplacementRule(pattern1899, With1899)
    def With1900(u, m, b, a, n, x):
        c = D(u, x)
        rubi.append(1900)
        return -Dist(c*n/(b*(m + S(1))), Int(u**(n + S(-1))*(a + b*x)**(m + S(1))*log(a + b*x), x), x) - Dist(S(1)/(m + S(1)), Int(u**n*(a + b*x)**m, x), x) + Simp(u**n*(a + b*x)**(m + S(1))*log(a + b*x)/(b*(m + S(1))), x)
    pattern1900 = Pattern(Integral(u_**WC('n', S(1))*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*log(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons21, cons1090, cons1097, cons87, cons88, cons66)
    rule1900 = ReplacementRule(pattern1900, With1900)
    return [rule1882, rule1883, rule1884, rule1885, rule1886, rule1887, rule1888, rule1889, rule1890, rule1891, rule1892, rule1893, rule1894, rule1895, rule1896, rule1897, rule1898, rule1899, rule1900, ]
Ejemplo n.º 11
0
def With1902(a, b, n, u, x):
    c = D(u, x)
    return -Dist(
        c * n / b, Int(u**(n + S(-1)) * (a + b * x) * log(a + b * x), x),
        x) - Int(u**n, x) + Simp(u**n * (a + b * x) * log(a + b * x) / b, x)
Ejemplo n.º 12
0
def piecewise_linear():
    from sympy.integrals.rubi.constraints import cons1092, cons19, cons1093, cons89, cons90, cons1094, cons91, cons25, cons74, cons68, cons4, cons1095, cons216, cons685, cons102, cons103, cons1096, cons1097, cons33, cons96, cons358, cons1098, cons21, cons1099, cons2, cons3

    pattern1885 = Pattern(Integral(u_**WC('m', S(1)), x_), cons19, cons1092)
    rule1885 = ReplacementRule(pattern1885, With1885)

    pattern1886 = Pattern(Integral(v_ / u_, x_), cons1093,
                          CustomConstraint(With1886))
    rule1886 = ReplacementRule(pattern1886, replacement1886)

    pattern1887 = Pattern(Integral(v_**n_ / u_, x_), cons1093, cons89, cons90,
                          cons1094, CustomConstraint(With1887))
    rule1887 = ReplacementRule(pattern1887, replacement1887)

    pattern1888 = Pattern(Integral(S(1) / (u_ * v_), x_), cons1093,
                          CustomConstraint(With1888))
    rule1888 = ReplacementRule(pattern1888, replacement1888)

    pattern1889 = Pattern(Integral(S(1) / (u_ * sqrt(v_)), x_), cons1093,
                          CustomConstraint(With1889))
    rule1889 = ReplacementRule(pattern1889, replacement1889)

    pattern1890 = Pattern(Integral(S(1) / (u_ * sqrt(v_)), x_), cons1093,
                          CustomConstraint(With1890))
    rule1890 = ReplacementRule(pattern1890, replacement1890)

    pattern1891 = Pattern(Integral(v_**n_ / u_, x_), cons1093, cons89, cons91,
                          CustomConstraint(With1891))
    rule1891 = ReplacementRule(pattern1891, replacement1891)

    pattern1892 = Pattern(Integral(v_**n_ / u_, x_), cons1093, cons25,
                          CustomConstraint(With1892))
    rule1892 = ReplacementRule(pattern1892, replacement1892)

    pattern1893 = Pattern(Integral(S(1) / (sqrt(u_) * sqrt(v_)), x_), cons1093,
                          CustomConstraint(With1893))
    rule1893 = ReplacementRule(pattern1893, replacement1893)

    pattern1894 = Pattern(Integral(S(1) / (sqrt(u_) * sqrt(v_)), x_), cons1093,
                          CustomConstraint(With1894))
    rule1894 = ReplacementRule(pattern1894, replacement1894)

    pattern1895 = Pattern(Integral(u_**m_ * v_**n_, x_), cons19, cons4,
                          cons1093, cons74, cons68, CustomConstraint(With1895))
    rule1895 = ReplacementRule(pattern1895, replacement1895)

    pattern1896 = Pattern(Integral(u_**m_ * v_**WC('n', S(1)), x_), cons19,
                          cons4, cons1093, cons68, cons1095,
                          CustomConstraint(With1896))
    rule1896 = ReplacementRule(pattern1896, replacement1896)

    pattern1897 = Pattern(Integral(u_**m_ * v_**WC('n', S(1)), x_), cons1093,
                          cons216, cons89, cons90, cons685, cons102, cons103,
                          CustomConstraint(With1897))
    rule1897 = ReplacementRule(pattern1897, replacement1897)

    pattern1898 = Pattern(Integral(u_**m_ * v_**n_, x_), cons1093, cons685,
                          cons1096, cons1097, CustomConstraint(With1898))
    rule1898 = ReplacementRule(pattern1898, replacement1898)

    pattern1899 = Pattern(Integral(u_**m_ * v_**n_, x_), cons1093, cons216,
                          cons33, cons96, CustomConstraint(With1899))
    rule1899 = ReplacementRule(pattern1899, replacement1899)

    pattern1900 = Pattern(Integral(u_**m_ * v_**n_, x_), cons1093, cons358,
                          cons1098, CustomConstraint(With1900))
    rule1900 = ReplacementRule(pattern1900, replacement1900)

    pattern1901 = Pattern(Integral(u_**m_ * v_**n_, x_), cons1093, cons21,
                          cons25, CustomConstraint(With1901))
    rule1901 = ReplacementRule(pattern1901, replacement1901)

    pattern1902 = Pattern(
        Integral(u_**WC('n', S(1)) * log(x_ * WC('b', S(1)) + WC('a', S(0))),
                 x_), cons2, cons3, cons1092, cons1099, cons89, cons90)
    rule1902 = ReplacementRule(pattern1902, With1902)

    pattern1903 = Pattern(
        Integral(
            u_**WC('n', S(1)) *
            (x_ * WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)) *
            log(x_ * WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19,
        cons1092, cons1099, cons89, cons90, cons68)
    rule1903 = ReplacementRule(pattern1903, With1903)
    return [
        rule1885,
        rule1886,
        rule1887,
        rule1888,
        rule1889,
        rule1890,
        rule1891,
        rule1892,
        rule1893,
        rule1894,
        rule1895,
        rule1896,
        rule1897,
        rule1898,
        rule1899,
        rule1900,
        rule1901,
        rule1902,
        rule1903,
    ]