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)
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)
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)
def replacement34(p, Pm, b, n2, c, a, n, Qm, x): m = Expon(Pm, x) rubi.append(34) return Dist( Coeff(Qm, x, m + S(-1)) / (m * Coeff(Pm, x, m)), Subst(Int((a + b * x**n + c * x**(S(2) * n))**p, x), x, Pm), x)
def replacement33(p, Pm, b, a, n, Qm, x): m = Expon(Pm, x) rubi.append(33) return Dist( Coeff(Qm, x, m + S(-1)) / (m * Coeff(Pm, x, m)), Subst(Int((a + b * x**n)**p, x), x, Pm), x)
def replacement22(B, v, C, u, m, b, a, x, A): rubi.append(22) return Dist( b**(S(-2)), Int( u * (a + b * v)**(m + S(1)) * Simp(B * b - C * a + C * b * v, x), x), x)
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)
def replacement1896(m, n, u, v, x): a = D(u, x) b = D(v, x) 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)
def replacement24(A, B, C, a, b, m, u, v, x): return Dist( b**(S(-2)), Int(u * (a + b * v)**(m + S(1)) * Simp(B * b - C * a + C * b * v, x), x), x, )
def replacement19(a, b, m, n, u, v, x): return Dist( a**(-IntPart(n)) * b**IntPart(n) * (a * v)**(-FracPart(n)) * (b * v)**FracPart(n), Int(u * (a * v)**(m + n), x), x, )
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)
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)
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)
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)
def replacement1898(m, n, u, v, x): a = D(u, x) b = D(v, x) 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)
def replacement36(Pm, Qm, a, b, c, n, n2, p, x): m = Expon(Pm, x) return Dist( Coeff(Qm, x, m + S(-1)) / (m * Coeff(Pm, x, m)), Subst(Int((a + b * x**n + c * x**(S(2) * n))**p, x), x, Pm), x, )
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)
def replacement35(Pm, Qm, a, b, n, p, x): m = Expon(Pm, x) return Dist( Coeff(Qm, x, m + S(-1)) / (m * Coeff(Pm, x, m)), Subst(Int((a + b * x**n)**p, x), x, Pm), x, )
def replacement1900(m, n, u, v, x): a = D(u, x) b = D(v, x) 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)
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)
def replacement29(a, b, c, d, e, p, x): return Dist(d / b, Subst(Int(x**p, x), x, a + b * x + c * x**S(2)), x)
def replacement28(a, b, c, n, n2, p, u, x): return Dist(c**(-p), Int(u * (b / S(2) + c * x**n)**(S(2) * p), x), x)
def replacement26(a, b, c, d, j, m, n, p, u, x): return Dist((-(b**S(2)) / d)**m, Int(u * (a - b * x**n)**(-m), x), x)
def replacement25(a, b, c, d, m, n, p, q, u, x): return Dist((d / a)**p, Int(u * x**(-n * p) * (a + b * x**n)**(m + p), x), x)
def replacement23(a, b, c, m, u, v, x): return Dist(S(1) / a, Int(u * (a * v)**(m + S(1)) * (b + c * v), x), x)
def replacement22(a, b, c, d, m, n, u, v, x): return Dist((a + b * v)**m * (c + d * v)**(-m), Int(u * (c + d * v)**(m + n), x), x)
def replacement21(a, b, c, d, m, n, u, v, x): return Dist((b / d)**m, Int(u * (c + d * v)**(m + n), x), x)
def replacement18(a, b, m, n, u, v, x): return Dist(a**(m + n) * (a * v)**(-n) * (b * v)**n, Int(u * v**(m + n), x), x)
def replacement17(a, b, m, n, u, v, x): return Dist( a**(m + S(-1) / 2) * b**(n + S(1) / 2) * sqrt(a * v) / sqrt(b * v), Int(u * v**(m + n), x), x, )
def replacement15(b, m, n, u, v, x): return Dist(b**(-m), Int(u * (b * v)**(m + n), x), x)