int_rules_1_1_1_6 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 1.1.1.6*P(x)*(a+b*x)^m*(c+d*x)^n*(e+f*x)^p =#
    @apply_utils Antiderivative(~Px * (~(a') + ~(b') * ~x) ^ ~(m') * (~(c') + ~(d') * ~x) ^ ~(n') * (~(e') + ~(f') * ~x) ^ ~(p'), ~x) => Antiderivative(~Px * (~a * ~c + ~b * ~d * (~x) ^ 2) ^ ~m * (~e + ~f * ~x) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~p], ~x) && (PolyQ(~Px, ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ(~m, ~n) && (IntegerQ(~m) || GtQ(~a, 0) && GtQ(~c, 0)))))
    @apply_utils Antiderivative(~Px * (~(a') + ~(b') * ~x) ^ ~m * (~(c') + ~(d') * ~x) ^ ~n * (~(e') + ~(f') * ~x) ^ ~(p'), ~x) => (((~a + ~b * ~x) ^ FracPart(~m) * (~c + ~d * ~x) ^ FracPart(~m)) / (~a * ~c + ~b * ~d * (~x) ^ 2) ^ FracPart(~m)) * Antiderivative(~Px * (~a * ~c + ~b * ~d * (~x) ^ 2) ^ ~m * (~e + ~f * ~x) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~p], ~x) && (PolyQ(~Px, ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ(~m, ~n) && Not(IntegerQ(~m)))))
    @apply_utils Antiderivative(~Px * (~(a') + ~(b') * ~x) ^ ~(m') * (~(c') + ~(d') * ~x) ^ ~(n') * (~(e') + ~(f') * ~x) ^ ~(p'), ~x) => Antiderivative(PolynomialQuotient(~Px, ~a + ~b * ~x, ~x) * (~a + ~b * ~x) ^ (~m + 1) * (~c + ~d * ~x) ^ ~n * (~e + ~f * ~x) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~p], ~x) && (PolyQ(~Px, ~x) && EqQ(PolynomialRemainder(~Px, ~a + ~b * ~x, ~x), 0))
    @apply_utils Antiderivative(~Px * (~(a') + ~(b') * ~x) ^ ~(m') * (~(c') + ~(d') * ~x) ^ ~(n') * (~(e') + ~(f') * ~x) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand(~Px * (~a + ~b * ~x) ^ ~m * (~c + ~d * ~x) ^ ~n * (~e + ~f * ~x) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~p], ~x) && (PolyQ(~Px, ~x) && IntegersQ(~m, ~n))
    @apply_utils Antiderivative(~Px * (~(a') + ~(b') * ~x) ^ ~m * (~(c') + ~(d') * ~x) ^ ~(n') * (~(e') + ~(f') * ~x) ^ ~(p'), ~x) => With([Qx = PolynomialQuotient(~Px, ~a + ~b * ~x, ~x), R = PolynomialRemainder(~Px, ~a + ~b * ~x, ~x)], (~b * R * (~a + ~b * ~x) ^ (~m + 1) * (~c + ~d * ~x) ^ (~n + 1) * (~e + ~f * ~x) ^ (~p + 1)) / ((~m + 1) * (~b * ~c - ~a * ~d) * (~b * ~e - ~a * ~f)) + (1 / ((~m + 1) * (~b * ~c - ~a * ~d) * (~b * ~e - ~a * ~f))) * Antiderivative((~a + ~b * ~x) ^ (~m + 1) * (~c + ~d * ~x) ^ ~n * (~e + ~f * ~x) ^ ~p * ExpandToSum((((~m + 1) * (~b * ~c - ~a * ~d) * (~b * ~e - ~a * ~f) * Qx + ~a * ~d * ~f * R * (~m + 1)) - ~b * R * (~d * ~e * (~m + ~n + 2) + ~c * ~f * (~m + ~p + 2))) - ~b * ~d * ~f * R * (~m + ~n + ~p + 3) * ~x, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n, ~p], ~x) && (PolyQ(~Px, ~x) && ILtQ(~m, -1))
    @apply_utils Antiderivative(~Px * (~(a') + ~(b') * ~x) ^ ~m * (~(c') + ~(d') * ~x) ^ ~(n') * (~(e') + ~(f') * ~x) ^ ~(p'), ~x) => With([Qx = PolynomialQuotient(~Px, ~a + ~b * ~x, ~x), R = PolynomialRemainder(~Px, ~a + ~b * ~x, ~x)], (~b * R * (~a + ~b * ~x) ^ (~m + 1) * (~c + ~d * ~x) ^ (~n + 1) * (~e + ~f * ~x) ^ (~p + 1)) / ((~m + 1) * (~b * ~c - ~a * ~d) * (~b * ~e - ~a * ~f)) + (1 / ((~m + 1) * (~b * ~c - ~a * ~d) * (~b * ~e - ~a * ~f))) * Antiderivative((~a + ~b * ~x) ^ (~m + 1) * (~c + ~d * ~x) ^ ~n * (~e + ~f * ~x) ^ ~p * ExpandToSum((((~m + 1) * (~b * ~c - ~a * ~d) * (~b * ~e - ~a * ~f) * Qx + ~a * ~d * ~f * R * (~m + 1)) - ~b * R * (~d * ~e * (~m + ~n + 2) + ~c * ~f * (~m + ~p + 2))) - ~b * ~d * ~f * R * (~m + ~n + ~p + 3) * ~x, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n, ~p], ~x) && (PolyQ(~Px, ~x) && (LtQ(~m, -1) && IntegersQ(2 * ~m, 2 * ~n, 2 * ~p)))
    @apply_utils Antiderivative(~Px * (~(a') + ~(b') * ~x) ^ ~(m') * (~(c') + ~(d') * ~x) ^ ~(n') * (~(e') + ~(f') * ~x) ^ ~(p'), ~x) => With([q = Expon(~Px, ~x), k = Coeff(~Px, ~x, Expon(~Px, ~x))], (k * (~a + ~b * ~x) ^ ((~m + q) - 1) * (~c + ~d * ~x) ^ (~n + 1) * (~e + ~f * ~x) ^ (~p + 1)) / (~d * ~f * (~b) ^ (q - 1) * (~m + ~n + ~p + q + 1)) + (1 / (~d * ~f * (~b) ^ q * (~m + ~n + ~p + q + 1))) * Antiderivative((~a + ~b * ~x) ^ ~m * (~c + ~d * ~x) ^ ~n * (~e + ~f * ~x) ^ ~p * ExpandToSum((~d * ~f * (~b) ^ q * (~m + ~n + ~p + q + 1) * ~Px - ~d * ~f * k * (~m + ~n + ~p + q + 1) * (~a + ~b * ~x) ^ q) + k * (~a + ~b * ~x) ^ (q - 2) * (((~a) ^ 2 * ~d * ~f * (~m + ~n + ~p + q + 1) - ~b * (~b * ~c * ~e * ((~m + q) - 1) + ~a * (~d * ~e * (~n + 1) + ~c * ~f * (~p + 1)))) + ~b * (~a * ~d * ~f * (2 * (~m + q) + ~n + ~p) - ~b * (~d * ~e * (~m + q + ~n) + ~c * ~f * (~m + q + ~p))) * ~x), ~x), ~x) <-- NeQ(~m + ~n + ~p + q + 1, 0)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~p], ~x) && PolyQ(~Px, ~x)
end
