int_rules_1_2_1_9 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 1.2.1.9*P(x)*(d+e*x)^m*(a+b*x+c*x^2)^p =#
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => Antiderivative((~d + ~e * ~x) ^ (~m + 1) * PolynomialQuotient(~Pq, ~d + ~e * ~x, ~x) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && EqQ(PolynomialRemainder(~Pq, ~d + ~e * ~x, ~x), 0))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => Antiderivative((~d + ~e * ~x) ^ (~m + 1) * PolynomialQuotient(~Pq, ~d + ~e * ~x, ~x) * (~a + ~c * (~x) ^ 2) ^ ~p, ~x) <-- FreeQ([~a, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && EqQ(PolynomialRemainder(~Pq, ~d + ~e * ~x, ~x), 0))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~P2 * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => With([f = Coeff(~P2, ~x, 0), g = Coeff(~P2, ~x, 1), h = Coeff(~P2, ~x, 2)], (h * (~d + ~e * ~x) ^ (~m + 1) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1)) / (~c * ~e * (~m + 2 * ~p + 3)) <-- EqQ((~b * ~e * h * (~m + ~p + 2) + 2 * ~c * ~d * h * (~p + 1)) - ~c * ~e * g * (~m + 2 * ~p + 3), 0) && EqQ((~b * ~d * h * (~p + 1) + ~a * ~e * h * (~m + 1)) - ~c * ~e * f * (~m + 2 * ~p + 3), 0)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~P2, ~x, 2) && NeQ(~m + 2 * ~p + 3, 0))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~P2 * (~a + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => With([f = Coeff(~P2, ~x, 0), g = Coeff(~P2, ~x, 1), h = Coeff(~P2, ~x, 2)], (h * (~d + ~e * ~x) ^ (~m + 1) * (~a + ~c * (~x) ^ 2) ^ (~p + 1)) / (~c * ~e * (~m + 2 * ~p + 3)) <-- EqQ(2 * ~d * h * (~p + 1) - ~e * g * (~m + 2 * ~p + 3), 0) && EqQ(~a * h * (~m + 1) - ~c * f * (~m + 2 * ~p + 3), 0)) <-- FreeQ([~a, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~P2, ~x, 2) && NeQ(~m + 2 * ~p + 3, 0))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~d + ~e * ~x) ^ ~m * ~Pq * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m], ~x) && (PolyQ(~Pq, ~x) && IGtQ(~p, -2))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~d + ~e * ~x) ^ ~m * ~Pq * (~a + ~c * (~x) ^ 2) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~c, ~d, ~e, ~m], ~x) && (PolyQ(~Pq, ~x) && IGtQ(~p, -2))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => ((~a + ~b * ~x + ~c * (~x) ^ 2) ^ FracPart(~p) / ((4 * ~c) ^ IntPart(~p) * (~b + 2 * ~c * ~x) ^ (2 * FracPart(~p)))) * Antiderivative((~d + ~e * ~x) ^ ~m * ~Pq * (~b + 2 * ~c * ~x) ^ (2 * ~p), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && EqQ((~b) ^ 2 - 4 * ~a * ~c, 0))
    @apply_utils Antiderivative((~(e') * ~x) ^ ~(m') * ~Pq * (~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => ~e * Antiderivative((~e * ~x) ^ (~m - 1) * PolynomialQuotient(~Pq, ~b + ~c * ~x, ~x) * (~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1), ~x) <-- FreeQ([~b, ~c, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && EqQ(PolynomialRemainder(~Pq, ~b + ~c * ~x, ~x), 0))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => ~d * ~e * Antiderivative((~d + ~e * ~x) ^ (~m - 1) * PolynomialQuotient(~Pq, ~a * ~e + ~c * ~d * ~x, ~x) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (EqQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && EqQ(PolynomialRemainder(~Pq, ~a * ~e + ~c * ~d * ~x, ~x), 0))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => ~d * ~e * Antiderivative((~d + ~e * ~x) ^ (~m - 1) * PolynomialQuotient(~Pq, ~a * ~e + ~c * ~d * ~x, ~x) * (~a + ~c * (~x) ^ 2) ^ (~p + 1), ~x) <-- FreeQ([~a, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (EqQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && EqQ(PolynomialRemainder(~Pq, ~a * ~e + ~c * ~d * ~x, ~x), 0)))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient(~Pq, ~a * ~e + ~c * ~d * ~x, ~x), f = PolynomialRemainder(~Pq, ~a * ~e + ~c * ~d * ~x, ~x)], (f * (2 * ~c * ~d - ~b * ~e) * (~d + ~e * ~x) ^ ~m * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1)) / (~e * (~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c)) + (1 / ((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c))) * Antiderivative((~d + ~e * ~x) ^ (~m - 1) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1) * ExpandToSum(~d * ~e * (~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c) * Q - f * (2 * ~c * ~d - ~b * ~e) * (~m + 2 * ~p + 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (EqQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && (ILtQ(~p + 1 / 2, 0) && GtQ(~m, 0)))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient(~Pq, ~a * ~e + ~c * ~d * ~x, ~x), f = PolynomialRemainder(~Pq, ~a * ~e + ~c * ~d * ~x, ~x)], (-(~d) * f * (~d + ~e * ~x) ^ ~m * (~a + ~c * (~x) ^ 2) ^ (~p + 1)) / (2 * ~a * ~e * (~p + 1)) + (~d / (2 * ~a * (~p + 1))) * Antiderivative((~d + ~e * ~x) ^ (~m - 1) * (~a + ~c * (~x) ^ 2) ^ (~p + 1) * ExpandToSum(2 * ~a * ~e * (~p + 1) * Q + f * (~m + 2 * ~p + 2), ~x), ~x)) <-- FreeQ([~a, ~c, ~d, ~e], ~x) && (PolyQ(~Pq, ~x) && (EqQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && (ILtQ(~p + 1 / 2, 0) && GtQ(~m, 0))))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~m * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => Antiderivative(ExpandIntegrand((~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p, (~d + ~e * ~x) ^ ~m * ~Pq, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (EqQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && (EqQ(~m + Expon(~Pq, ~x) + 2 * ~p + 1, 0) && ILtQ(~m, 0)))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~m * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~p, ~x) => Antiderivative(ExpandIntegrand((~a + ~c * (~x) ^ 2) ^ ~p, (~d + ~e * ~x) ^ ~m * ~Pq, ~x), ~x) <-- FreeQ([~a, ~c, ~d, ~e], ~x) && (PolyQ(~Pq, ~x) && (EqQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && (EqQ(~m + Expon(~Pq, ~x) + 2 * ~p + 1, 0) && ILtQ(~m, 0))))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([q = Expon(~Pq, ~x), f = Coeff(~Pq, ~x, Expon(~Pq, ~x))], (f * (~d + ~e * ~x) ^ ((~m + q) - 1) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1)) / (~c * (~e) ^ (q - 1) * (~m + q + 2 * ~p + 1)) + (1 / (~c * (~e) ^ q * (~m + q + 2 * ~p + 1))) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p * ExpandToSum((~c * (~e) ^ q * (~m + q + 2 * ~p + 1) * ~Pq - ~c * f * (~m + q + 2 * ~p + 1) * (~d + ~e * ~x) ^ q) + ~e * f * (~m + ~p + q) * (~d + ~e * ~x) ^ (q - 2) * ((~b * ~d - 2 * ~a * ~e) + (2 * ~c * ~d - ~b * ~e) * ~x), ~x), ~x) <-- NeQ(~m + q + 2 * ~p + 1, 0)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && EqQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0)))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([q = Expon(~Pq, ~x), f = Coeff(~Pq, ~x, Expon(~Pq, ~x))], (f * (~d + ~e * ~x) ^ ((~m + q) - 1) * (~a + ~c * (~x) ^ 2) ^ (~p + 1)) / (~c * (~e) ^ (q - 1) * (~m + q + 2 * ~p + 1)) + (1 / (~c * (~e) ^ q * (~m + q + 2 * ~p + 1))) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~c * (~x) ^ 2) ^ ~p * ExpandToSum((~c * (~e) ^ q * (~m + q + 2 * ~p + 1) * ~Pq - ~c * f * (~m + q + 2 * ~p + 1) * (~d + ~e * ~x) ^ q) - 2 * ~e * f * (~m + ~p + q) * (~d + ~e * ~x) ^ (q - 2) * (~a * ~e - ~c * ~d * ~x), ~x), ~x) <-- NeQ(~m + q + 2 * ~p + 1, 0)) <-- FreeQ([~a, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (EqQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && Not(IGtQ(~m, 0))))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => Antiderivative((~d + ~e * ~x) ^ (~m + ~p) * (~a / ~d + (~c / ~e) * ~x) ^ ~p * ~Pq, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (EqQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && IntegerQ(~p))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => Antiderivative((~d + ~e * ~x) ^ (~m + ~p) * (~a / ~d + (~c / ~e) * ~x) ^ ~p * ~Pq, ~x) <-- FreeQ([~a, ~c, ~d, ~e, ~m], ~x) && (PolyQ(~Pq, ~x) && (EqQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && IntegerQ(~p)))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => ((~a + ~b * ~x + ~c * (~x) ^ 2) ^ FracPart(~p) / ((~d + ~e * ~x) ^ FracPart(~p) * (~a / ~d + (~c * ~x) / ~e) ^ FracPart(~p))) * Antiderivative((~d + ~e * ~x) ^ (~m + ~p) * (~a / ~d + (~c / ~e) * ~x) ^ ~p * ~Pq, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (EqQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && (Not(IntegerQ(~p)) && Not(IGtQ(~m, 0))))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~p, ~x) => ((~a + ~c * (~x) ^ 2) ^ FracPart(~p) / ((~d + ~e * ~x) ^ FracPart(~p) * (~a / ~d + (~c * ~x) / ~e) ^ FracPart(~p))) * Antiderivative((~d + ~e * ~x) ^ (~m + ~p) * (~a / ~d + (~c / ~e) * ~x) ^ ~p * ~Pq, ~x) <-- FreeQ([~a, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (EqQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && (Not(IntegerQ(~p)) && Not(IGtQ(~m, 0)))))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient(~Pq, ~a + ~b * ~x + ~c * (~x) ^ 2, ~x), f = Coeff(PolynomialRemainder(~Pq, ~a + ~b * ~x + ~c * (~x) ^ 2, ~x), ~x, 0), g = Coeff(PolynomialRemainder(~Pq, ~a + ~b * ~x + ~c * (~x) ^ 2, ~x), ~x, 1)], ((~d + ~e * ~x) ^ ~m * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1) * ((f * ~b - 2 * ~a * g) + (2 * ~c * f - ~b * g) * ~x)) / ((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c)) + (1 / ((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c))) * Antiderivative((~d + ~e * ~x) ^ (~m - 1) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1) * ExpandToSum((((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c) * (~d + ~e * ~x) * Q + g * (2 * ~a * ~e * ~m + ~b * ~d * (2 * ~p + 3))) - f * (~b * ~e * ~m + 2 * ~c * ~d * (2 * ~p + 3))) - ~e * (2 * ~c * f - ~b * g) * (~m + 2 * ~p + 3) * ~x, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (NeQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && (LtQ(~p, -1) && (GtQ(~m, 0) && ((IntegerQ(~p) || (Not(IntegerQ(~m)) || Not(RationalQ(~a, ~b, ~c, ~d, ~e)))) && Not(IGtQ(~m, 0) && (RationalQ(~a, ~b, ~c, ~d, ~e) && (IntegerQ(~p) || ILtQ(~p + 1 / 2, 0))))))))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient(~Pq, ~a + ~c * (~x) ^ 2, ~x), f = Coeff(PolynomialRemainder(~Pq, ~a + ~c * (~x) ^ 2, ~x), ~x, 0), g = Coeff(PolynomialRemainder(~Pq, ~a + ~c * (~x) ^ 2, ~x), ~x, 1)], ((~d + ~e * ~x) ^ ~m * (~a + ~c * (~x) ^ 2) ^ (~p + 1) * (~a * g - ~c * f * ~x)) / (2 * ~a * ~c * (~p + 1)) + (1 / (2 * ~a * ~c * (~p + 1))) * Antiderivative((~d + ~e * ~x) ^ (~m - 1) * (~a + ~c * (~x) ^ 2) ^ (~p + 1) * ExpandToSum((2 * ~a * ~c * (~p + 1) * (~d + ~e * ~x) * Q - ~a * ~e * g * ~m) + ~c * ~d * f * (2 * ~p + 3) + ~c * ~e * f * (~m + 2 * ~p + 3) * ~x, ~x), ~x)) <-- FreeQ([~a, ~c, ~d, ~e], ~x) && (PolyQ(~Pq, ~x) && (NeQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && (LtQ(~p, -1) && (GtQ(~m, 0) && Not(IGtQ(~m, 0) && (RationalQ(~a, ~c, ~d, ~e) && (IntegerQ(~p) || ILtQ(~p + 1 / 2, 0))))))))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient((~d + ~e * ~x) ^ ~m * ~Pq, ~a + ~b * ~x + ~c * (~x) ^ 2, ~x), f = Coeff(PolynomialRemainder((~d + ~e * ~x) ^ ~m * ~Pq, ~a + ~b * ~x + ~c * (~x) ^ 2, ~x), ~x, 0), g = Coeff(PolynomialRemainder((~d + ~e * ~x) ^ ~m * ~Pq, ~a + ~b * ~x + ~c * (~x) ^ 2, ~x), ~x, 1)], (((~b * f - 2 * ~a * g) + (2 * ~c * f - ~b * g) * ~x) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1)) / ((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c)) + (1 / ((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c))) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1) * ExpandToSum((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c) * (~d + ~e * ~x) ^ -(~m) * Q - (2 * ~p + 3) * (2 * ~c * f - ~b * g) * (~d + ~e * ~x) ^ -(~m), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (NeQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && (LtQ(~p, -1) && ILtQ(~m, 0)))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient((~d + ~e * ~x) ^ ~m * ~Pq, ~a + ~c * (~x) ^ 2, ~x), f = Coeff(PolynomialRemainder((~d + ~e * ~x) ^ ~m * ~Pq, ~a + ~c * (~x) ^ 2, ~x), ~x, 0), g = Coeff(PolynomialRemainder((~d + ~e * ~x) ^ ~m * ~Pq, ~a + ~c * (~x) ^ 2, ~x), ~x, 1)], ((~a * g - ~c * f * ~x) * (~a + ~c * (~x) ^ 2) ^ (~p + 1)) / (2 * ~a * ~c * (~p + 1)) + (1 / (2 * ~a * ~c * (~p + 1))) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~c * (~x) ^ 2) ^ (~p + 1) * ExpandToSum(2 * ~a * ~c * (~p + 1) * (~d + ~e * ~x) ^ -(~m) * Q + ~c * f * (2 * ~p + 3) * (~d + ~e * ~x) ^ -(~m), ~x), ~x)) <-- FreeQ([~a, ~c, ~d, ~e], ~x) && (PolyQ(~Pq, ~x) && (NeQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && (LtQ(~p, -1) && ILtQ(~m, 0))))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient(~Pq, ~a + ~b * ~x + ~c * (~x) ^ 2, ~x), f = Coeff(PolynomialRemainder(~Pq, ~a + ~b * ~x + ~c * (~x) ^ 2, ~x), ~x, 0), g = Coeff(PolynomialRemainder(~Pq, ~a + ~b * ~x + ~c * (~x) ^ 2, ~x), ~x, 1)], ((~d + ~e * ~x) ^ (~m + 1) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1) * ((f * ((~b * ~c * ~d - (~b) ^ 2 * ~e) + 2 * ~a * ~c * ~e) - ~a * g * (2 * ~c * ~d - ~b * ~e)) + ~c * (f * (2 * ~c * ~d - ~b * ~e) - g * (~b * ~d - 2 * ~a * ~e)) * ~x)) / ((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c) * ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2)) + (1 / ((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c) * ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2))) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1) * ExpandToSum((((~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c) * ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2) * Q + f * (((~b * ~c * ~d * ~e * ((2 * ~p - ~m) + 2) + (~b) ^ 2 * (~e) ^ 2 * (~p + ~m + 2)) - 2 * (~c) ^ 2 * (~d) ^ 2 * (2 * ~p + 3)) - 2 * ~a * ~c * (~e) ^ 2 * (~m + 2 * ~p + 3))) - g * (~a * ~e * ((~b * ~e - 2 * ~c * ~d * ~m) + ~b * ~e * ~m) - ~b * ~d * (((3 * ~c * ~d - ~b * ~e) + 2 * ~c * ~d * ~p) - ~b * ~e * ~p))) + ~c * ~e * (g * (~b * ~d - 2 * ~a * ~e) - f * (2 * ~c * ~d - ~b * ~e)) * (~m + 2 * ~p + 4) * ~x, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (NeQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && (LtQ(~p, -1) && Not(IGtQ(~m, 0) && (RationalQ(~a, ~b, ~c, ~d, ~e) && (IntegerQ(~p) || ILtQ(~p + 1 / 2, 0))))))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient(~Pq, ~a + ~c * (~x) ^ 2, ~x), f = Coeff(PolynomialRemainder(~Pq, ~a + ~c * (~x) ^ 2, ~x), ~x, 0), g = Coeff(PolynomialRemainder(~Pq, ~a + ~c * (~x) ^ 2, ~x), ~x, 1)], (-((~d + ~e * ~x) ^ (~m + 1)) * (~a + ~c * (~x) ^ 2) ^ (~p + 1) * (~a * (~e * f - ~d * g) + (~c * ~d * f + ~a * ~e * g) * ~x)) / (2 * ~a * (~p + 1) * (~c * (~d) ^ 2 + ~a * (~e) ^ 2)) + (1 / (2 * ~a * (~p + 1) * (~c * (~d) ^ 2 + ~a * (~e) ^ 2))) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~c * (~x) ^ 2) ^ (~p + 1) * ExpandToSum(((2 * ~a * (~p + 1) * (~c * (~d) ^ 2 + ~a * (~e) ^ 2) * Q + ~c * (~d) ^ 2 * f * (2 * ~p + 3)) - ~a * ~e * (~d * g * ~m - ~e * f * (~m + 2 * ~p + 3))) + ~e * (~c * ~d * f + ~a * ~e * g) * (~m + 2 * ~p + 4) * ~x, ~x), ~x)) <-- FreeQ([~a, ~c, ~d, ~e, ~m], ~x) && (PolyQ(~Pq, ~x) && (NeQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && (LtQ(~p, -1) && Not(IGtQ(~m, 0) && (RationalQ(~a, ~c, ~d, ~e) && (IntegerQ(~p) || ILtQ(~p + 1 / 2, 0)))))))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~m * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient(~Pq, ~d + ~e * ~x, ~x), R = PolynomialRemainder(~Pq, ~d + ~e * ~x, ~x)], (~e * R * (~d + ~e * ~x) ^ (~m + 1) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1)) / ((~m + 1) * ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2)) + (1 / ((~m + 1) * ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2))) * Antiderivative((~d + ~e * ~x) ^ (~m + 1) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p * ExpandToSum((((~m + 1) * ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2) * Q + ~c * ~d * R * (~m + 1)) - ~b * ~e * R * (~m + ~p + 2)) - ~c * ~e * R * (~m + 2 * ~p + 3) * ~x, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (NeQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && LtQ(~m, -1))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~m * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([Q = PolynomialQuotient(~Pq, ~d + ~e * ~x, ~x), R = PolynomialRemainder(~Pq, ~d + ~e * ~x, ~x)], (~e * R * (~d + ~e * ~x) ^ (~m + 1) * (~a + ~c * (~x) ^ 2) ^ (~p + 1)) / ((~m + 1) * (~c * (~d) ^ 2 + ~a * (~e) ^ 2)) + (1 / ((~m + 1) * (~c * (~d) ^ 2 + ~a * (~e) ^ 2))) * Antiderivative((~d + ~e * ~x) ^ (~m + 1) * (~a + ~c * (~x) ^ 2) ^ ~p * ExpandToSum(((~m + 1) * (~c * (~d) ^ 2 + ~a * (~e) ^ 2) * Q + ~c * ~d * R * (~m + 1)) - ~c * ~e * R * (~m + 2 * ~p + 3) * ~x, ~x), ~x)) <-- FreeQ([~a, ~c, ~d, ~e, ~p], ~x) && (PolyQ(~Pq, ~x) && (NeQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && LtQ(~m, -1)))
    @apply_utils Antiderivative((~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ 2) ^ ~p, ~x) => Module([q = Expon(~Pq, ~x), k], Antiderivative((~x) ^ ~m * Sum(Coeff(~Pq, ~x, 2k) * (~x) ^ (2k), [k, 0, q / 2]) * (~a + ~b * (~x) ^ 2) ^ ~p, ~x) + Antiderivative((~x) ^ (~m + 1) * Sum(Coeff(~Pq, ~x, 2k + 1) * (~x) ^ (2k), [k, 0, (q - 1) / 2]) * (~a + ~b * (~x) ^ 2) ^ ~p, ~x)) <-- FreeQ([~a, ~b, ~p], ~x) && (PolyQ(~Pq, ~x) && (Not(PolyQ(~Pq, (~x) ^ 2)) && (IGtQ(~m, -2) && Not(IntegerQ(2 * ~p)))))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([q = Expon(~Pq, ~x), f = Coeff(~Pq, ~x, Expon(~Pq, ~x))], (f * (~d + ~e * ~x) ^ ((~m + q) - 1) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ (~p + 1)) / (~c * (~e) ^ (q - 1) * (~m + q + 2 * ~p + 1)) + (1 / (~c * (~e) ^ q * (~m + q + 2 * ~p + 1))) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p * ExpandToSum((~c * (~e) ^ q * (~m + q + 2 * ~p + 1) * ~Pq - ~c * f * (~m + q + 2 * ~p + 1) * (~d + ~e * ~x) ^ q) - f * (~d + ~e * ~x) ^ (q - 2) * (((~b * ~d * ~e * (~p + 1) + ~a * (~e) ^ 2 * ((~m + q) - 1)) - ~c * (~d) ^ 2 * (~m + q + 2 * ~p + 1)) - ~e * (2 * ~c * ~d - ~b * ~e) * (~m + q + ~p) * ~x), ~x), ~x) <-- GtQ(q, 1) && NeQ(~m + q + 2 * ~p + 1, 0)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (NeQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && Not(IGtQ(~m, 0) && (RationalQ(~a, ~b, ~c, ~d, ~e) && (IntegerQ(~p) || ILtQ(~p + 1 / 2, 0)))))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~p, ~x) => With([q = Expon(~Pq, ~x), f = Coeff(~Pq, ~x, Expon(~Pq, ~x))], (f * (~d + ~e * ~x) ^ ((~m + q) - 1) * (~a + ~c * (~x) ^ 2) ^ (~p + 1)) / (~c * (~e) ^ (q - 1) * (~m + q + 2 * ~p + 1)) + (1 / (~c * (~e) ^ q * (~m + q + 2 * ~p + 1))) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~c * (~x) ^ 2) ^ ~p * ExpandToSum((~c * (~e) ^ q * (~m + q + 2 * ~p + 1) * ~Pq - ~c * f * (~m + q + 2 * ~p + 1) * (~d + ~e * ~x) ^ q) - f * (~d + ~e * ~x) ^ (q - 2) * ((~a * (~e) ^ 2 * ((~m + q) - 1) - ~c * (~d) ^ 2 * (~m + q + 2 * ~p + 1)) - 2 * ~c * ~d * ~e * (~m + q + ~p) * ~x), ~x), ~x) <-- GtQ(q, 1) && NeQ(~m + q + 2 * ~p + 1, 0)) <-- FreeQ([~a, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (NeQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && (Not(EqQ(~d, 0) && True) && Not(IGtQ(~m, 0) && (RationalQ(~a, ~c, ~d, ~e) && (IntegerQ(~p) || ILtQ(~p + 1 / 2, 0)))))))
    @apply_utils Antiderivative((~(d') + ~(e') * ~x) ^ ~(m') * ~Pq * (~(a') + ~(b') * ~x + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => With([q = Expon(~Pq, ~x)], (Coeff(~Pq, ~x, q) / (~e) ^ q) * Antiderivative((~d + ~e * ~x) ^ (~m + q) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p, ~x) + (1 / (~e) ^ q) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p * ExpandToSum((~e) ^ q * ~Pq - Coeff(~Pq, ~x, q) * (~d + ~e * ~x) ^ q, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (NeQ((~c * (~d) ^ 2 - ~b * ~d * ~e) + ~a * (~e) ^ 2, 0) && Not(IGtQ(~m, 0) && (RationalQ(~a, ~b, ~c, ~d, ~e) && (IntegerQ(~p) || ILtQ(~p + 1 / 2, 0)))))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(m') * ~Pq * (~a + ~(c') * (~x) ^ 2) ^ ~(p'), ~x) => With([q = Expon(~Pq, ~x)], (Coeff(~Pq, ~x, q) / (~e) ^ q) * Antiderivative((~d + ~e * ~x) ^ (~m + q) * (~a + ~c * (~x) ^ 2) ^ ~p, ~x) + (1 / (~e) ^ q) * Antiderivative((~d + ~e * ~x) ^ ~m * (~a + ~c * (~x) ^ 2) ^ ~p * ExpandToSum((~e) ^ q * ~Pq - Coeff(~Pq, ~x, q) * (~d + ~e * ~x) ^ q, ~x), ~x)) <-- FreeQ([~a, ~c, ~d, ~e, ~m, ~p], ~x) && (PolyQ(~Pq, ~x) && (NeQ(~c * (~d) ^ 2 + ~a * (~e) ^ 2, 0) && Not(IGtQ(~m, 0) && (RationalQ(~a, ~c, ~d, ~e) && (IntegerQ(~p) || ILtQ(~p + 1 / 2, 0))))))
end
