int_rules_1_2_3_6 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 1.2.3.6*P(x)*(d*x)^m*(a+b*x^n+c*x^(2*n))^p =#
    @apply_utils Antiderivative((~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~(p'), ~x) => (1 / ~n) * Subst(Antiderivative(SubstFor((~x) ^ ~n, ~Pq, ~x) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p, ~x), ~x, (~x) ^ ~n) <-- FreeQ([~a, ~b, ~c, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, (~x) ^ ~n) && EqQ(Simplify((~m - ~n) + 1), 0)))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~d * ~x) ^ ~m * ~Pq * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && IGtQ(~p, 0)))
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~(n') + ~(f') * (~x) ^ ~(n2')) * (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')) ^ ~(p'), ~x) => (~d * (~g * ~x) ^ (~m + 1) * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ (~p + 1)) / (~a * ~g * (~m + 1)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (EqQ(~a * ~e * (~m + 1) - ~b * ~d * (~m + ~n * (~p + 1) + 1), 0) && (EqQ(~a * ~f * (~m + 1) - ~c * ~d * (~m + 2 * ~n * (~p + 1) + 1), 0) && NeQ(~m, -1))))
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(m') * (~d + ~(f') * (~x) ^ ~(n2')) * (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')) ^ ~(p'), ~x) => (~d * (~g * ~x) ^ (~m + 1) * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ (~p + 1)) / (~a * ~g * (~m + 1)) <-- FreeQ([~a, ~b, ~c, ~d, ~f, ~g, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (EqQ(~m + ~n * (~p + 1) + 1, 0) && (EqQ(~c * ~d + ~a * ~f, 0) && NeQ(~m, -1))))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => ((~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ FracPart(~p) / ((4 * ~c) ^ IntPart(~p) * (~b + 2 * ~c * (~x) ^ ~n) ^ (2 * FracPart(~p)))) * Antiderivative((~d * ~x) ^ ~m * ~Pq * (~b + 2 * ~c * (~x) ^ ~n) ^ (2 * ~p), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (EqQ((~b) ^ 2 - 4 * ~a * ~c, 0) && Not(IntegerQ(2 * ~p)))))
    @apply_utils Antiderivative((~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => (1 / ~n) * Subst(Antiderivative((~x) ^ (Simplify((~m + 1) / ~n) - 1) * SubstFor((~x) ^ ~n, ~Pq, ~x) * (~a + ~b * ~x + ~c * (~x) ^ 2) ^ ~p, ~x), ~x, (~x) ^ ~n) <-- FreeQ([~a, ~b, ~c, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, (~x) ^ ~n) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && IntegerQ(Simplify((~m + 1) / ~n)))))
    @apply_utils Antiderivative((~d * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => ((~d * ~x) ^ ~m / (~x) ^ ~m) * Antiderivative((~x) ^ ~m * ~Pq * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, (~x) ^ ~n) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && IntegerQ(Simplify((~m + 1) / ~n)))))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => (1 / ~d) * Antiderivative((~d * ~x) ^ (~m + 1) * PolynomialQuotient(~Pq, ~x, ~x) * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && EqQ(Coeff(~Pq, ~x, 0), 0)))
    @apply_utils Antiderivative(((~x) ^ ~(m') * (~e + ~(f') * (~x) ^ ~(q') + ~(g') * (~x) ^ ~(r') + ~(h') * (~x) ^ ~(s'))) / (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')) ^ (3 / 2), ~x) => -((2 * ~c * (~b * ~f - 2 * ~a * ~g) + 2 * ~h * ((~b) ^ 2 - 4 * ~a * ~c) * (~x) ^ (~n / 2) + 2 * ~c * (2 * ~c * ~f - ~b * ~g) * (~x) ^ ~n)) / (~c * ~n * ((~b) ^ 2 - 4 * ~a * ~c) * sqrt(~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n))) <-- FreeQ([~a, ~b, ~c, ~e, ~f, ~g, ~h, ~m, ~n], ~x) && (EqQ(~n2, 2 * ~n) && (EqQ(~q, ~n / 2) && (EqQ(~r, (3 * ~n) / 2) && (EqQ(~s, 2 * ~n) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (EqQ((2 * ~m - ~n) + 2, 0) && EqQ(~c * ~e + ~a * ~h, 0)))))))
    @apply_utils Antiderivative(((~d * ~x) ^ ~(m') * (~e + ~(f') * (~x) ^ ~(q') + ~(g') * (~x) ^ ~(r') + ~(h') * (~x) ^ ~(s'))) / (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')) ^ (3 / 2), ~x) => ((~d * ~x) ^ ~m / (~x) ^ ~m) * Antiderivative(((~x) ^ ~m * (~e + ~f * (~x) ^ (~n / 2) + ~g * (~x) ^ ((3 * ~n) / 2) + ~h * (~x) ^ (2 * ~n))) / (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ (3 / 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~m, ~n], ~x) && (EqQ(~n2, 2 * ~n) && (EqQ(~q, ~n / 2) && (EqQ(~r, (3 * ~n) / 2) && (EqQ(~s, 2 * ~n) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (EqQ((2 * ~m - ~n) + 2, 0) && EqQ(~c * ~e + ~a * ~h, 0)))))))
    @apply_utils Antiderivative((~x) ^ ~m * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~n2) ^ ~p, ~x) => Module([q = Expon(~Pq, ~x)], Module([Q = PolynomialQuotient(~a * (~b * ~c) ^ (Floor((q - 1) / ~n) + 1) * (~x) ^ ~m * ~Pq, ~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n), ~x), R = PolynomialRemainder(~a * (~b * ~c) ^ (Floor((q - 1) / ~n) + 1) * (~x) ^ ~m * ~Pq, ~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n), ~x), i], ((-(~x) * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ (~p + 1)) / ((~a) ^ 2 * ~n * (~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c) * (~b * ~c) ^ (Floor((q - 1) / ~n) + 1))) * Sum((((~b) ^ 2 - 2 * ~a * ~c) * Coeff(R, ~x, i) - ~a * ~b * Coeff(R, ~x, ~n + i)) * (~x) ^ i + ~c * (~b * Coeff(R, ~x, i) - 2 * ~a * Coeff(R, ~x, ~n + i)) * (~x) ^ (~n + i), [i, 0, ~n - 1]) + (1 / (~a * ~n * (~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c) * (~b * ~c) ^ (Floor((q - 1) / ~n) + 1))) * Antiderivative((~x) ^ ~m * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ (~p + 1) * ExpandToSum(~n * (~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c) * (~x) ^ -(~m) * Q + Sum(((((~b) ^ 2 * (~n * (~p + 1) + i + 1)) / ~a - 2 * ~c * (2 * ~n * (~p + 1) + i + 1)) * Coeff(R, ~x, i) - ~b * (i + 1) * Coeff(R, ~x, ~n + i)) * (~x) ^ (i - ~m) + ~c * (~n * (2 * ~p + 3) + i + 1) * ((~b / ~a) * Coeff(R, ~x, i) - 2 * Coeff(R, ~x, ~n + i)) * (~x) ^ ((~n + i) - ~m), [i, 0, ~n - 1]), ~x), ~x)) <-- GeQ(q, 2 * ~n)) <-- FreeQ([~a, ~b, ~c], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (IGtQ(~n, 0) && (LtQ(~p, -1) && ILtQ(~m, 0))))))
    @apply_utils Antiderivative((~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~n2) ^ ~p, ~x) => With([g = GCD(~m + 1, ~n)], (1 / g) * Subst(Antiderivative((~x) ^ ((~m + 1) / g - 1) * ReplaceAll(~Pq, (~x->begin
                                                #= none:1 =#
                                                #= none:3 =#
                                                (~x) ^ (1 / g)
                                            end)) * (~a + ~b * (~x) ^ (~n / g) + ~c * (~x) ^ ((2 * ~n) / g)) ^ ~p, ~x), ~x, (~x) ^ g) <-- NeQ(g, 1)) <-- FreeQ([~a, ~b, ~c, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, (~x) ^ ~n) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (IGtQ(~n, 0) && IntegerQ(~m)))))
    @apply_utils Antiderivative(((~(d') * ~x) ^ ~(m') * ~Pq) / (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~n2), ~x) => Antiderivative(ExpandIntegrand(((~d * ~x) ^ ~m * ~Pq) / (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, (~x) ^ ~n) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (IGtQ(~n, 0) && NiceSqrtQ((~b) ^ 2 - 4 * ~a * ~c)))))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~n2) ^ ~p, ~x) => With([q = Expon(~Pq, ~x)], With([Pqq = Coeff(~Pq, ~x, q)], (Pqq * (~d * ~x) ^ (((~m + q) - 2 * ~n) + 1) * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ (~p + 1)) / (~c * (~d) ^ ((q - 2 * ~n) + 1) * (~m + q + 2 * ~n * ~p + 1)) + Antiderivative((~d * ~x) ^ ~m * ExpandToSum((~Pq - Pqq * (~x) ^ q) - (Pqq * (~a * (((~m + q) - 2 * ~n) + 1) * (~x) ^ (q - 2 * ~n) + ~b * (~m + q + ~n * (~p - 1) + 1) * (~x) ^ (q - ~n))) / (~c * (~m + q + 2 * ~n * ~p + 1)), ~x) * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x)) <-- GeQ(q, 2 * ~n) && (NeQ(~m + q + 2 * ~n * ~p + 1, 0) && (IntegerQ(2 * ~p) || (EqQ(~n, 1) && IntegerQ(4 * ~p) || IntegerQ(~p + (q + 1) / (2 * ~n)))))) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, (~x) ^ ~n) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && IGtQ(~n, 0))))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~n2) ^ ~p, ~x) => Module([q = Expon(~Pq, ~x), j, k], Antiderivative(Sum((1 / (~d) ^ j) * (~d * ~x) ^ (~m + j) * Sum(Coeff(~Pq, ~x, j + k * ~n) * (~x) ^ (k * ~n), [k, 0, (q - j) / ~n + 1]) * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, [j, 0, ~n - 1]), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (IGtQ(~n, 0) && Not(PolyQ(~Pq, (~x) ^ ~n))))))
    @apply_utils Antiderivative(((~(d') * ~x) ^ ~(m') * ~Pq) / (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')), ~x) => Antiderivative(RationalFunctionExpand(((~d * ~x) ^ ~m * ~Pq) / (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && IGtQ(~n, 0))))
    @apply_utils Antiderivative((~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => With([q = Expon(~Pq, ~x)], -(Subst(Antiderivative((ExpandToSum((~x) ^ q * ReplaceAll(~Pq, (~x->begin
                                                        #= none:1 =#
                                                        #= none:3 =#
                                                        (~x) ^ -1
                                                    end)), ~x) * (~a + ~b * (~x) ^ -(~n) + ~c * (~x) ^ (-2 * ~n)) ^ ~p) / (~x) ^ (~m + q + 2), ~x), ~x, 1 / ~x))) <-- FreeQ([~a, ~b, ~c, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (ILtQ(~n, 0) && IntegerQ(~m)))))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => With([g = Denominator(~m), q = Expon(~Pq, ~x)], (-g / ~d) * Subst(Antiderivative((ExpandToSum((~x) ^ (g * q) * ReplaceAll(~Pq, (~x->begin
                                                        #= none:1 =#
                                                        #= none:3 =#
                                                        (~d) ^ -1 * (~x) ^ -g
                                                    end)), ~x) * (~a + ~b * (~d) ^ -(~n) * (~x) ^ (-g * ~n) + ~c * (~d) ^ (-2 * ~n) * (~x) ^ (-2 * g * ~n)) ^ ~p) / (~x) ^ (g * (~m + q + 1) + 1), ~x), ~x, 1 / (~d * ~x) ^ (1 / g))) <-- FreeQ([~a, ~b, ~c, ~d, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (ILtQ(~n, 0) && FractionQ(~m)))))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~m * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => With([q = Expon(~Pq, ~x)], -((~d * ~x) ^ ~m) * ((~x) ^ -1) ^ ~m * Subst(Antiderivative((ExpandToSum((~x) ^ q * ReplaceAll(~Pq, (~x->begin
                                                        #= none:1 =#
                                                        #= none:3 =#
                                                        (~x) ^ -1
                                                    end)), ~x) * (~a + ~b * (~x) ^ -(~n) + ~c * (~x) ^ (-2 * ~n)) ^ ~p) / (~x) ^ (~m + q + 2), ~x), ~x, 1 / ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (ILtQ(~n, 0) && Not(RationalQ(~m))))))
    @apply_utils Antiderivative((~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => With([g = Denominator(~n)], g * Subst(Antiderivative((~x) ^ (g * (~m + 1) - 1) * ReplaceAll(~Pq, (~x->begin
                                            #= none:1 =#
                                            #= none:3 =#
                                            (~x) ^ g
                                        end)) * (~a + ~b * (~x) ^ (g * ~n) + ~c * (~x) ^ (2 * g * ~n)) ^ ~p, ~x), ~x, (~x) ^ (1 / g))) <-- FreeQ([~a, ~b, ~c, ~m, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && FractionQ(~n))))
    @apply_utils Antiderivative((~d * ~x) ^ ~m * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => (((~d) ^ (~m - 1 / 2) * sqrt(~d * ~x)) / sqrt(~x)) * Antiderivative((~x) ^ ~m * ~Pq * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (FractionQ(~n) && IGtQ(~m + 1 / 2, 0)))))
    @apply_utils Antiderivative((~d * ~x) ^ ~m * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => (((~d) ^ (~m + 1 / 2) * sqrt(~x)) / sqrt(~d * ~x)) * Antiderivative((~x) ^ ~m * ~Pq * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (FractionQ(~n) && ILtQ(~m - 1 / 2, 0)))))
    @apply_utils Antiderivative((~d * ~x) ^ ~m * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => ((~d * ~x) ^ ~m / (~x) ^ ~m) * Antiderivative((~x) ^ ~m * ~Pq * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && FractionQ(~n))))
    @apply_utils Antiderivative((~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => (1 / (~m + 1)) * Subst(Antiderivative(ReplaceAll(SubstFor((~x) ^ ~n, ~Pq, ~x), (~x->begin
                                        #= none:1 =#
                                        #= none:3 =#
                                        (~x) ^ Simplify(~n / (~m + 1))
                                    end)) * (~a + ~b * (~x) ^ Simplify(~n / (~m + 1)) + ~c * (~x) ^ Simplify((2 * ~n) / (~m + 1))) ^ ~p, ~x), ~x, (~x) ^ (~m + 1)) <-- FreeQ([~a, ~b, ~c, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, (~x) ^ ~n) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (IntegerQ(Simplify(~n / (~m + 1))) && Not(IntegerQ(~n))))))
    @apply_utils Antiderivative((~d * ~x) ^ ~m * ~Pq * (~a + ~(b') * (~x) ^ ~n + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => ((~d * ~x) ^ ~m / (~x) ^ ~m) * Antiderivative((~x) ^ ~m * ~Pq * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, (~x) ^ ~n) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (IntegerQ(Simplify(~n / (~m + 1))) && Not(IntegerQ(~n))))))
    @apply_utils Antiderivative(((~(d') * ~x) ^ ~(m') * ~Pq) / (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')), ~x) => With([q = Rt((~b) ^ 2 - 4 * ~a * ~c, 2)], ((2 * ~c) / q) * Antiderivative(((~d * ~x) ^ ~m * ~Pq) / ((~b - q) + 2 * ~c * (~x) ^ ~n), ~x) - ((2 * ~c) / q) * Antiderivative(((~d * ~x) ^ ~m * ~Pq) / (~b + q + 2 * ~c * (~x) ^ ~n), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && NeQ((~b) ^ 2 - 4 * ~a * ~c, 0)))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')) ^ ~p, ~x) => Antiderivative(ExpandIntegrand((~d * ~x) ^ ~m * ~Pq * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) && ILtQ(~p + 1, 0)))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * ~Pq * (~a + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(n2')) ^ ~(p'), ~x) => Unintegrable((~d * ~x) ^ ~m * ~Pq * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (PolyQ(~Pq, ~x) || PolyQ(~Pq, (~x) ^ ~n)))
    @apply_utils Antiderivative((~u) ^ ~(m') * ~Pq * (~a + ~(b') * (~v) ^ ~n + ~(c') * (~v) ^ ~(n2')) ^ ~(p'), ~x) => ((~u) ^ ~m / (Coefficient(~v, ~x, 1) * (~v) ^ ~m)) * Subst(Antiderivative((~x) ^ ~m * SubstFor(~v, ~Pq, ~x) * (~a + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n)) ^ ~p, ~x), ~x, ~v) <-- FreeQ([~a, ~b, ~c, ~m, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (LinearPairQ(~u, ~v, ~x) && PolyQ(~Pq, (~v) ^ ~n)))
end
