int_rules_1_1_3_7 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 1.1.3.7*P(x)*(a+b*x^n)^p =#
    #= Antiderivative((~Pq)*((~a)+(~b')*(~x))^(~p),~x) := With([n=Denominator(p)], n/b*Subst(Antiderivative(x^(n*p+n-1)*ReplaceAll(Pq,x->-a/b+x^n/b),x),x,(a+b*x)^( 1/n))) <-- FreeQ([a,b],x) && PolyQ(Pq,x) && FractionQ(p) =#
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~(n')) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand(~Pq * (~a + ~b * (~x) ^ ~n) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~n], ~x) && (PolyQ(~Pq, ~x) && (IGtQ(~p, 0) || EqQ(~n, 1)))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~(n')) ^ ~p, ~x) => Antiderivative(~x * PolynomialQuotient(~Pq, ~x, ~x) * (~a + ~b * (~x) ^ ~n) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~n, ~p], ~x) && (PolyQ(~Pq, ~x) && (EqQ(Coeff(~Pq, ~x, 0), 0) && Not(MatchQ(~Pq, (~x) ^ ~(m') * ~(u') <-- IntegerQ(m)))))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~(n')) ^ ~(p'), ~x) => Antiderivative(PolynomialQuotient(~Pq, ~a + ~b * (~x) ^ ~n, ~x) * (~a + ~b * (~x) ^ ~n) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~p], ~x) && (PolyQ(~Pq, ~x) && (IGtQ(~n, 0) && (GeQ(Expon(~Pq, ~x), ~n) && EqQ(PolynomialRemainder(~Pq, ~a + ~b * (~x) ^ ~n, ~x), 0))))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~(n')) ^ ~p, ~x) => Module([q = Expon(~Pq, ~x), i], (~a + ~b * (~x) ^ ~n) ^ ~p * Sum((Coeff(~Pq, ~x, i) * (~x) ^ (i + 1)) / (~n * ~p + i + 1), [i, 0, q]) + ~a * ~n * ~p * Antiderivative((~a + ~b * (~x) ^ ~n) ^ (~p - 1) * Sum((Coeff(~Pq, ~x, i) * (~x) ^ i) / (~n * ~p + i + 1), [i, 0, q]), ~x)) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~Pq, ~x) && (IGtQ((~n - 1) / 2, 0) && GtQ(~p, 0)))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~n) ^ ~p, ~x) => Module([q = Expon(~Pq, ~x), i], ((~a * Coeff(~Pq, ~x, q) - ~b * ~x * ExpandToSum(~Pq - Coeff(~Pq, ~x, q) * (~x) ^ q, ~x)) * (~a + ~b * (~x) ^ ~n) ^ (~p + 1)) / (~a * ~b * ~n * (~p + 1)) + (1 / (~a * ~n * (~p + 1))) * Antiderivative(Sum((~n * (~p + 1) + i + 1) * Coeff(~Pq, ~x, i) * (~x) ^ i, [i, 0, q - 1]) * (~a + ~b * (~x) ^ ~n) ^ (~p + 1), ~x) <-- q == ~n - 1) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~Pq, ~x) && (IGtQ(~n, 0) && LtQ(~p, -1)))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~(n')) ^ ~p, ~x) => (-(~x) * ~Pq * (~a + ~b * (~x) ^ ~n) ^ (~p + 1)) / (~a * ~n * (~p + 1)) + (1 / (~a * ~n * (~p + 1))) * Antiderivative(ExpandToSum(~n * (~p + 1) * ~Pq + D(~x * ~Pq, ~x), ~x) * (~a + ~b * (~x) ^ ~n) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~Pq, ~x) && (IGtQ(~n, 0) && (LtQ(~p, -1) && LtQ(Expon(~Pq, ~x), ~n - 1))))
    @apply_utils Antiderivative(~P4 / (~a + ~(b') * (~x) ^ 4) ^ (3 / 2), ~x) => With([d = Coeff(~P4, ~x, 0), e = Coeff(~P4, ~x, 1), f = Coeff(~P4, ~x, 3), g = Coeff(~P4, ~x, 4)], -(((~a * f + 2 * ~a * g * ~x) - ~b * e * (~x) ^ 2)) / (2 * ~a * ~b * sqrt(~a + ~b * (~x) ^ 4)) <-- EqQ(~b * d + ~a * g, 0)) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~P4, ~x, 4) && EqQ(Coeff(~P4, ~x, 2), 0))
    @apply_utils Antiderivative(~P6 / (~a + ~(b') * (~x) ^ 4) ^ (3 / 2), ~x) => With([d = Coeff(~P6, ~x, 0), e = Coeff(~P6, ~x, 2), f = Coeff(~P6, ~x, 3), g = Coeff(~P6, ~x, 4), h = Coeff(~P6, ~x, 6)], -(((~a * f - 2 * ~b * d * ~x) - 2 * ~a * h * (~x) ^ 3)) / (2 * ~a * ~b * sqrt(~a + ~b * (~x) ^ 4)) <-- EqQ(~b * e - 3 * ~a * h, 0) && EqQ(~b * d + ~a * g, 0)) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~P6, ~x, 6) && (EqQ(Coeff(~P6, ~x, 1), 0) && EqQ(Coeff(~P6, ~x, 5), 0)))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~(n')) ^ ~p, ~x) => With([q = Expon(~Pq, ~x)], Module([Q = PolynomialQuotient((~b) ^ (Floor((q - 1) / ~n) + 1) * ~Pq, ~a + ~b * (~x) ^ ~n, ~x), R = PolynomialRemainder((~b) ^ (Floor((q - 1) / ~n) + 1) * ~Pq, ~a + ~b * (~x) ^ ~n, ~x)], (-(~x) * R * (~a + ~b * (~x) ^ ~n) ^ (~p + 1)) / (~a * ~n * (~p + 1) * (~b) ^ (Floor((q - 1) / ~n) + 1)) + (1 / (~a * ~n * (~p + 1) * (~b) ^ (Floor((q - 1) / ~n) + 1))) * Antiderivative((~a + ~b * (~x) ^ ~n) ^ (~p + 1) * ExpandToSum(~a * ~n * (~p + 1) * Q + ~n * (~p + 1) * R + D(~x * R, ~x), ~x), ~x)) <-- GeQ(q, ~n)) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~Pq, ~x) && (IGtQ(~n, 0) && LtQ(~p, -1)))
    @apply_utils Antiderivative((~A + ~(B') * ~x) / (~a + ~(b') * (~x) ^ 3), ~x) => ((~B) ^ 3 / ~b) * Antiderivative(1 / (((~A) ^ 2 - ~A * ~B * ~x) + (~B) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~A, ~B], ~x) && EqQ(~a * (~B) ^ 3 - ~b * (~A) ^ 3, 0)
    @apply_utils Antiderivative((~A + ~(B') * ~x) / (~a + ~(b') * (~x) ^ 3), ~x) => With([r = Numerator(Rt(~a / ~b, 3)), s = Denominator(Rt(~a / ~b, 3))], ((-r * (~B * r - ~A * s)) / (3 * ~a * s)) * Antiderivative(1 / (r + s * ~x), ~x) + (r / (3 * ~a * s)) * Antiderivative((r * (~B * r + 2 * ~A * s) + s * (~B * r - ~A * s) * ~x) / ((r ^ 2 - r * s * ~x) + s ^ 2 * (~x) ^ 2), ~x)) <-- FreeQ([~a, ~b, ~A, ~B], ~x) && (NeQ(~a * (~B) ^ 3 - ~b * (~A) ^ 3, 0) && PosQ(~a / ~b))
    @apply_utils Antiderivative((~A + ~(B') * ~x) / (~a + ~(b') * (~x) ^ 3), ~x) => With([r = Numerator(Rt(-(~a) / ~b, 3)), s = Denominator(Rt(-(~a) / ~b, 3))], ((r * (~B * r + ~A * s)) / (3 * ~a * s)) * Antiderivative(1 / (r - s * ~x), ~x) - (r / (3 * ~a * s)) * Antiderivative((r * (~B * r - 2 * ~A * s) - s * (~B * r + ~A * s) * ~x) / (r ^ 2 + r * s * ~x + s ^ 2 * (~x) ^ 2), ~x)) <-- FreeQ([~a, ~b, ~A, ~B], ~x) && (NeQ(~a * (~B) ^ 3 - ~b * (~A) ^ 3, 0) && NegQ(~a / ~b))
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], (-(C ^ 2) / ~b) * Antiderivative(1 / (B - C * ~x), ~x) <-- EqQ(B ^ 2 - A * C, 0) && EqQ(~b * B ^ 3 + ~a * C ^ 3, 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = (~a) ^ (1 / 3) / (~b) ^ (1 / 3)], (C / ~b) * Antiderivative(1 / (q + ~x), ~x) + ((B + C * q) / ~b) * Antiderivative(1 / ((q ^ 2 - q * ~x) + (~x) ^ 2), ~x)) <-- EqQ((A * (~b) ^ (2 / 3) - (~a) ^ (1 / 3) * (~b) ^ (1 / 3) * B) - 2 * (~a) ^ (2 / 3) * C, 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = (-(~a)) ^ (1 / 3) / (-(~b)) ^ (1 / 3)], (C / ~b) * Antiderivative(1 / (q + ~x), ~x) + ((B + C * q) / ~b) * Antiderivative(1 / ((q ^ 2 - q * ~x) + (~x) ^ 2), ~x)) <-- EqQ((A * (-(~b)) ^ (2 / 3) - (-(~a)) ^ (1 / 3) * (-(~b)) ^ (1 / 3) * B) - 2 * (-(~a)) ^ (2 / 3) * C, 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = (-(~a)) ^ (1 / 3) / (~b) ^ (1 / 3)], (-C / ~b) * Antiderivative(1 / (q - ~x), ~x) + ((B - C * q) / ~b) * Antiderivative(1 / (q ^ 2 + q * ~x + (~x) ^ 2), ~x)) <-- EqQ((A * (~b) ^ (2 / 3) + (-(~a)) ^ (1 / 3) * (~b) ^ (1 / 3) * B) - 2 * (-(~a)) ^ (2 / 3) * C, 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = (~a) ^ (1 / 3) / (-(~b)) ^ (1 / 3)], (-C / ~b) * Antiderivative(1 / (q - ~x), ~x) + ((B - C * q) / ~b) * Antiderivative(1 / (q ^ 2 + q * ~x + (~x) ^ 2), ~x)) <-- EqQ((A * (-(~b)) ^ (2 / 3) + (~a) ^ (1 / 3) * (-(~b)) ^ (1 / 3) * B) - 2 * (~a) ^ (2 / 3) * C, 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = (~a / ~b) ^ (1 / 3)], (C / ~b) * Antiderivative(1 / (q + ~x), ~x) + ((B + C * q) / ~b) * Antiderivative(1 / ((q ^ 2 - q * ~x) + (~x) ^ 2), ~x)) <-- EqQ((A - (~a / ~b) ^ (1 / 3) * B) - 2 * (~a / ~b) ^ (2 / 3) * C, 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = Rt(~a / ~b, 3)], (C / ~b) * Antiderivative(1 / (q + ~x), ~x) + ((B + C * q) / ~b) * Antiderivative(1 / ((q ^ 2 - q * ~x) + (~x) ^ 2), ~x)) <-- EqQ((A - Rt(~a / ~b, 3) * B) - 2 * Rt(~a / ~b, 3) ^ 2 * C, 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = (-(~a) / ~b) ^ (1 / 3)], (-C / ~b) * Antiderivative(1 / (q - ~x), ~x) + ((B - C * q) / ~b) * Antiderivative(1 / (q ^ 2 + q * ~x + (~x) ^ 2), ~x)) <-- EqQ((A + (-(~a) / ~b) ^ (1 / 3) * B) - 2 * (-(~a) / ~b) ^ (2 / 3) * C, 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = Rt(-(~a) / ~b, 3)], (-C / ~b) * Antiderivative(1 / (q - ~x), ~x) + ((B - C * q) / ~b) * Antiderivative(1 / (q ^ 2 + q * ~x + (~x) ^ 2), ~x)) <-- EqQ((A + Rt(-(~a) / ~b, 3) * B) - 2 * Rt(-(~a) / ~b, 3) ^ 2 * C, 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], Antiderivative((A + B * ~x) / (~a + ~b * (~x) ^ 3), ~x) + C * Antiderivative((~x) ^ 2 / (~a + ~b * (~x) ^ 3), ~x) <-- EqQ(~a * B ^ 3 - ~b * A ^ 3, 0) || Not(RationalQ(~a / ~b))) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = (~a / ~b) ^ (1 / 3)], (q ^ 2 / ~a) * Antiderivative((A + C * q * ~x) / ((q ^ 2 - q * ~x) + (~x) ^ 2), ~x)) <-- EqQ((A - B * (~a / ~b) ^ (1 / 3)) + C * (~a / ~b) ^ (2 / 3), 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2)], With([q = (-(~a) / ~b) ^ (1 / 3)], (q / ~a) * Antiderivative((A * q + (A + B * q) * ~x) / (q ^ 2 + q * ~x + (~x) ^ 2), ~x)) <-- EqQ(A + B * (-(~a) / ~b) ^ (1 / 3) + C * (-(~a) / ~b) ^ (2 / 3), 0)) <-- FreeQ([~a, ~b], ~x) && PolyQ(~P2, ~x, 2)
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2), q = (~a / ~b) ^ (1 / 3)], ((q * ((A - B * q) + C * q ^ 2)) / (3 * ~a)) * Antiderivative(1 / (q + ~x), ~x) + (q / (3 * ~a)) * Antiderivative((q * ((2A + B * q) - C * q ^ 2) - ((A - B * q) - 2 * C * q ^ 2) * ~x) / ((q ^ 2 - q * ~x) + (~x) ^ 2), ~x) <-- NeQ(~a * B ^ 3 - ~b * A ^ 3, 0) && NeQ((A - B * q) + C * q ^ 2, 0)) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~P2, ~x, 2) && GtQ(~a / ~b, 0))
    @apply_utils Antiderivative(~P2 / (~a + ~(b') * (~x) ^ 3), ~x) => With([A = Coeff(~P2, ~x, 0), B = Coeff(~P2, ~x, 1), C = Coeff(~P2, ~x, 2), q = (-(~a) / ~b) ^ (1 / 3)], ((q * (A + B * q + C * q ^ 2)) / (3 * ~a)) * Antiderivative(1 / (q - ~x), ~x) + (q / (3 * ~a)) * Antiderivative((q * ((2A - B * q) - C * q ^ 2) + ((A + B * q) - 2 * C * q ^ 2) * ~x) / (q ^ 2 + q * ~x + (~x) ^ 2), ~x) <-- NeQ(~a * B ^ 3 - ~b * A ^ 3, 0) && NeQ(A + B * q + C * q ^ 2, 0)) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~P2, ~x, 2) && LtQ(~a / ~b, 0))
    @apply_utils Antiderivative(~Pq / (~a + ~(b') * (~x) ^ ~n), ~x) => With([v = Sum(((~x) ^ ii * (Coeff(~Pq, ~x, ii) + Coeff(~Pq, ~x, ~n / 2 + ii) * (~x) ^ (~n / 2))) / (~a + ~b * (~x) ^ ~n), [ii, 0, ~n / 2 - 1])], Antiderivative(v, ~x) <-- SumQ(v)) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~Pq, ~x) && (IGtQ(~n / 2, 0) && Expon(~Pq, ~x) < ~n))
    @apply_utils Antiderivative((~c + ~(d') * ~x) / sqrt(~a + ~(b') * (~x) ^ 3), ~x) => With([r = Numer(Simplify(((1 - sqrt(3)) * ~d) / ~c)), s = Denom(Simplify(((1 - sqrt(3)) * ~d) / ~c))], (2 * ~d * s ^ 3 * sqrt(~a + ~b * (~x) ^ 3)) / (~a * r ^ 2 * ((1 + sqrt(3)) * s + r * ~x)) - ((3 ^ (1 / 4) * sqrt(2 - sqrt(3)) * ~d * s * (s + r * ~x) * sqrt(((s ^ 2 - r * s * ~x) + r ^ 2 * (~x) ^ 2) / ((1 + sqrt(3)) * s + r * ~x) ^ 2)) / (r ^ 2 * sqrt(~a + ~b * (~x) ^ 3) * sqrt((s * (s + r * ~x)) / ((1 + sqrt(3)) * s + r * ~x) ^ 2))) * Elliptic.E(asin(((1 - sqrt(3)) * s + r * ~x) / ((1 + sqrt(3)) * s + r * ~x)), -7 - 4 * sqrt(3))) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && (PosQ(~a) && EqQ(~b * (~c) ^ 3 - 2 * (5 - 3 * sqrt(3)) * ~a * (~d) ^ 3, 0))
    @apply_utils Antiderivative((~c + ~(d') * ~x) / sqrt(~a + ~(b') * (~x) ^ 3), ~x) => With([r = Numer(Rt(~b / ~a, 3)), s = Denom(Rt(~b / ~a, 3))], ((~c * r - (1 - sqrt(3)) * ~d * s) / r) * Antiderivative(1 / sqrt(~a + ~b * (~x) ^ 3), ~x) + (~d / r) * Antiderivative(((1 - sqrt(3)) * s + r * ~x) / sqrt(~a + ~b * (~x) ^ 3), ~x)) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && (PosQ(~a) && NeQ(~b * (~c) ^ 3 - 2 * (5 - 3 * sqrt(3)) * ~a * (~d) ^ 3, 0))
    @apply_utils Antiderivative((~c + ~(d') * ~x) / sqrt(~a + ~(b') * (~x) ^ 3), ~x) => With([r = Numer(Simplify(((1 + sqrt(3)) * ~d) / ~c)), s = Denom(Simplify(((1 + sqrt(3)) * ~d) / ~c))], (2 * ~d * s ^ 3 * sqrt(~a + ~b * (~x) ^ 3)) / (~a * r ^ 2 * ((1 - sqrt(3)) * s + r * ~x)) + ((3 ^ (1 / 4) * sqrt(2 + sqrt(3)) * ~d * s * (s + r * ~x) * sqrt(((s ^ 2 - r * s * ~x) + r ^ 2 * (~x) ^ 2) / ((1 - sqrt(3)) * s + r * ~x) ^ 2)) / (r ^ 2 * sqrt(~a + ~b * (~x) ^ 3) * sqrt((-s * (s + r * ~x)) / ((1 - sqrt(3)) * s + r * ~x) ^ 2))) * Elliptic.E(asin(((1 + sqrt(3)) * s + r * ~x) / ((1 - sqrt(3)) * s + r * ~x)), -7 + 4 * sqrt(3))) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && (NegQ(~a) && EqQ(~b * (~c) ^ 3 - 2 * (5 + 3 * sqrt(3)) * ~a * (~d) ^ 3, 0))
    @apply_utils Antiderivative((~c + ~(d') * ~x) / sqrt(~a + ~(b') * (~x) ^ 3), ~x) => With([r = Numer(Rt(~b / ~a, 3)), s = Denom(Rt(~b / ~a, 3))], ((~c * r - (1 + sqrt(3)) * ~d * s) / r) * Antiderivative(1 / sqrt(~a + ~b * (~x) ^ 3), ~x) + (~d / r) * Antiderivative(((1 + sqrt(3)) * s + r * ~x) / sqrt(~a + ~b * (~x) ^ 3), ~x)) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && (NegQ(~a) && NeQ(~b * (~c) ^ 3 - 2 * (5 + 3 * sqrt(3)) * ~a * (~d) ^ 3, 0))
    @apply_utils Antiderivative((~c + ~(d') * (~x) ^ 4) / sqrt(~a + ~(b') * (~x) ^ 6), ~x) => With([r = Numer(Rt(~b / ~a, 3)), s = Denom(Rt(~b / ~a, 3))], ((1 + sqrt(3)) * ~d * s ^ 3 * ~x * sqrt(~a + ~b * (~x) ^ 6)) / (2 * ~a * r ^ 2 * (s + (1 + sqrt(3)) * r * (~x) ^ 2)) - ((3 ^ (1 / 4) * ~d * s * ~x * (s + r * (~x) ^ 2) * sqrt(((s ^ 2 - r * s * (~x) ^ 2) + r ^ 2 * (~x) ^ 4) / (s + (1 + sqrt(3)) * r * (~x) ^ 2) ^ 2)) / (2 * r ^ 2 * sqrt((r * (~x) ^ 2 * (s + r * (~x) ^ 2)) / (s + (1 + sqrt(3)) * r * (~x) ^ 2) ^ 2) * sqrt(~a + ~b * (~x) ^ 6))) * Elliptic.E(acos((s + (1 - sqrt(3)) * r * (~x) ^ 2) / (s + (1 + sqrt(3)) * r * (~x) ^ 2)), (2 + sqrt(3)) / 4)) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && EqQ(2 * Rt(~b / ~a, 3) ^ 2 * ~c - (1 - sqrt(3)) * ~d, 0)
    @apply_utils Antiderivative((~c + ~(d') * (~x) ^ 4) / sqrt(~a + ~(b') * (~x) ^ 6), ~x) => With([q = Rt(~b / ~a, 3)], ((2 * ~c * q ^ 2 - (1 - sqrt(3)) * ~d) / (2 * q ^ 2)) * Antiderivative(1 / sqrt(~a + ~b * (~x) ^ 6), ~x) + (~d / (2 * q ^ 2)) * Antiderivative(((1 - sqrt(3)) + 2 * q ^ 2 * (~x) ^ 4) / sqrt(~a + ~b * (~x) ^ 6), ~x)) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && NeQ(2 * Rt(~b / ~a, 3) ^ 2 * ~c - (1 - sqrt(3)) * ~d, 0)
    @apply_utils Antiderivative((~c + ~(d') * (~x) ^ 2) / sqrt(~a + ~(b') * (~x) ^ 8), ~x) => ((-(~c) * ~d * (~x) ^ 3 * sqrt(-((~c - ~d * (~x) ^ 2) ^ 2) / (~c * ~d * (~x) ^ 2)) * sqrt((-((~d) ^ 2) * (~a + ~b * (~x) ^ 8)) / (~b * (~c) ^ 2 * (~x) ^ 4))) / (sqrt(2 + sqrt(2)) * (~c - ~d * (~x) ^ 2) * sqrt(~a + ~b * (~x) ^ 8))) * Elliptic.F(asin((1 / 2) * sqrt((sqrt(2) * (~c) ^ 2 + 2 * ~c * ~d * (~x) ^ 2 + sqrt(2) * (~d) ^ 2 * (~x) ^ 4) / (~c * ~d * (~x) ^ 2))), -2 * (1 - sqrt(2))) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && EqQ(~b * (~c) ^ 4 - ~a * (~d) ^ 4, 0)
    @apply_utils Antiderivative((~c + ~(d') * (~x) ^ 2) / sqrt(~a + ~(b') * (~x) ^ 8), ~x) => ((~d + Rt(~b / ~a, 4) * ~c) / (2 * Rt(~b / ~a, 4))) * Antiderivative((1 + Rt(~b / ~a, 4) * (~x) ^ 2) / sqrt(~a + ~b * (~x) ^ 8), ~x) - ((~d - Rt(~b / ~a, 4) * ~c) / (2 * Rt(~b / ~a, 4))) * Antiderivative((1 - Rt(~b / ~a, 4) * (~x) ^ 2) / sqrt(~a + ~b * (~x) ^ 8), ~x) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && NeQ(~b * (~c) ^ 4 - ~a * (~d) ^ 4, 0)
    @apply_utils Antiderivative(~Pq / (~x * sqrt(~a + ~(b') * (~x) ^ ~n)), ~x) => Coeff(~Pq, ~x, 0) * Antiderivative(1 / (~x * sqrt(~a + ~b * (~x) ^ ~n)), ~x) + Antiderivative(ExpandToSum((~Pq - Coeff(~Pq, ~x, 0)) / ~x, ~x) / sqrt(~a + ~b * (~x) ^ ~n), ~x) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~Pq, ~x) && (IGtQ(~n, 0) && NeQ(Coeff(~Pq, ~x, 0), 0)))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~n) ^ ~p, ~x) => Module([q = Expon(~Pq, ~x), j, k], Antiderivative(Sum((~x) ^ j * Sum(Coeff(~Pq, ~x, j + (k * ~n) / 2) * (~x) ^ ((k * ~n) / 2), [k, 0, (2 * (q - j)) / ~n + 1]) * (~a + ~b * (~x) ^ ~n) ^ ~p, [j, 0, ~n / 2 - 1]), ~x)) <-- FreeQ([~a, ~b, ~p], ~x) && (PolyQ(~Pq, ~x) && (IGtQ(~n / 2, 0) && Not(PolyQ(~Pq, (~x) ^ (~n / 2)))))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~n) ^ ~p, ~x) => Coeff(~Pq, ~x, ~n - 1) * Antiderivative((~x) ^ (~n - 1) * (~a + ~b * (~x) ^ ~n) ^ ~p, ~x) + Antiderivative(ExpandToSum(~Pq - Coeff(~Pq, ~x, ~n - 1) * (~x) ^ (~n - 1), ~x) * (~a + ~b * (~x) ^ ~n) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~p], ~x) && (PolyQ(~Pq, ~x) && (IGtQ(~n, 0) && Expon(~Pq, ~x) == ~n - 1))
    @apply_utils Antiderivative(~Pq / (~a + ~(b') * (~x) ^ ~n), ~x) => Antiderivative(ExpandIntegrand(~Pq / (~a + ~b * (~x) ^ ~n), ~x), ~x) <-- FreeQ([~a, ~b], ~x) && (PolyQ(~Pq, ~x) && IntegerQ(~n))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~n) ^ ~p, ~x) => With([q = Expon(~Pq, ~x)], With([Pqq = Coeff(~Pq, ~x, q)], (Pqq * (~x) ^ ((q - ~n) + 1) * (~a + ~b * (~x) ^ ~n) ^ (~p + 1)) / (~b * (q + ~n * ~p + 1)) + (1 / (~b * (q + ~n * ~p + 1))) * Antiderivative(ExpandToSum(~b * (q + ~n * ~p + 1) * (~Pq - Pqq * (~x) ^ q) - ~a * Pqq * ((q - ~n) + 1) * (~x) ^ (q - ~n), ~x) * (~a + ~b * (~x) ^ ~n) ^ ~p, ~x)) <-- NeQ(q + ~n * ~p + 1, 0) && (q - ~n >= 0 && (IntegerQ(2 * ~p) || IntegerQ(~p + (q + 1) / (2 * ~n))))) <-- FreeQ([~a, ~b, ~p], ~x) && (PolyQ(~Pq, ~x) && IGtQ(~n, 0))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~n) ^ ~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)) ^ ~p) / (~x) ^ (q + 2), ~x), ~x, 1 / ~x))) <-- FreeQ([~a, ~b, ~p], ~x) && (PolyQ(~Pq, ~x) && ILtQ(~n, 0))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~n) ^ ~p, ~x) => With([g = Denominator(~n)], g * Subst(Antiderivative((~x) ^ (g - 1) * ReplaceAll(~Pq, (~x->begin
                                            #= none:1 =#
                                            #= none:3 =#
                                            (~x) ^ g
                                        end)) * (~a + ~b * (~x) ^ (g * ~n)) ^ ~p, ~x), ~x, (~x) ^ (1 / g))) <-- FreeQ([~a, ~b, ~p], ~x) && (PolyQ(~Pq, ~x) && FractionQ(~n))
    @apply_utils Antiderivative((~A + ~(B') * (~x) ^ ~(m')) * (~a + ~(b') * (~x) ^ ~n) ^ ~(p'), ~x) => ~A * Antiderivative((~a + ~b * (~x) ^ ~n) ^ ~p, ~x) + ~B * Antiderivative((~x) ^ ~m * (~a + ~b * (~x) ^ ~n) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~A, ~B, ~m, ~n, ~p], ~x) && EqQ((~m - ~n) + 1, 0)
    @apply_utils Antiderivative(~P3 * (~a + ~(b') * (~x) ^ ~n) ^ ~p, ~x) => With([A = Coeff(~P3, (~x) ^ (~n / 2), 0), B = Coeff(~P3, (~x) ^ (~n / 2), 1), C = Coeff(~P3, (~x) ^ (~n / 2), 2), D = Coeff(~P3, (~x) ^ (~n / 2), 3)], -(~x * ((~b * A - ~a * C) + (~b * B - ~a * D) * (~x) ^ (~n / 2)) * (~a + ~b * (~x) ^ ~n) ^ (~p + 1)) / (~a * ~b * ~n * (~p + 1)) - (1 / (2 * ~a * ~b * ~n * (~p + 1))) * Antiderivative((~a + ~b * (~x) ^ ~n) ^ (~p + 1) * Simp((2 * ~a * C - 2 * ~b * A * (~n * (~p + 1) + 1)) + (~a * D * (~n + 2) - ~b * B * (~n * (2 * ~p + 3) + 2)) * (~x) ^ (~n / 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~n], ~x) && (PolyQ(~P3, (~x) ^ (~n / 2), 3) && ILtQ(~p, -1))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~x) ^ ~n) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand(~Pq * (~a + ~b * (~x) ^ ~n) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~n, ~p], ~x) && (PolyQ(~Pq, ~x) || PolyQ(~Pq, (~x) ^ ~n))
    @apply_utils Antiderivative(~Pq * (~a + ~(b') * (~v) ^ ~(n')) ^ ~p, ~x) => (1 / Coeff(~v, ~x, 1)) * Subst(Antiderivative(SubstFor(~v, ~Pq, ~x) * (~a + ~b * (~x) ^ ~n) ^ ~p, ~x), ~x, ~v) <-- FreeQ([~a, ~b, ~n, ~p], ~x) && (LinearQ(~v, ~x) && PolyQ(~Pq, (~v) ^ ~n))
    @apply_utils Antiderivative(~Pq * (~a1 + ~(b1') * (~x) ^ ~(n')) ^ ~(p') * (~a2 + ~(b2') * (~x) ^ ~(n')) ^ ~(p'), ~x) => Antiderivative(~Pq * (~a1 * ~a2 + ~b1 * ~b2 * (~x) ^ (2 * ~n)) ^ ~p, ~x) <-- FreeQ([~a1, ~b1, ~a2, ~b2, ~n, ~p], ~x) && (PolyQ(~Pq, ~x) && (EqQ(~a2 * ~b1 + ~a1 * ~b2, 0) && (IntegerQ(~p) || GtQ(~a1, 0) && GtQ(~a2, 0))))
    @apply_utils Antiderivative(~Pq * (~a1 + ~(b1') * (~x) ^ ~(n')) ^ ~(p') * (~a2 + ~(b2') * (~x) ^ ~(n')) ^ ~(p'), ~x) => (((~a1 + ~b1 * (~x) ^ ~n) ^ FracPart(~p) * (~a2 + ~b2 * (~x) ^ ~n) ^ FracPart(~p)) / (~a1 * ~a2 + ~b1 * ~b2 * (~x) ^ (2 * ~n)) ^ FracPart(~p)) * Antiderivative(~Pq * (~a1 * ~a2 + ~b1 * ~b2 * (~x) ^ (2 * ~n)) ^ ~p, ~x) <-- FreeQ([~a1, ~b1, ~a2, ~b2, ~n, ~p], ~x) && (PolyQ(~Pq, ~x) && (EqQ(~a2 * ~b1 + ~a1 * ~b2, 0) && Not(EqQ(~n, 1) && LinearQ(~Pq, ~x))))
    @apply_utils Antiderivative((~e + ~(f') * (~x) ^ ~(n') + ~(g') * (~x) ^ ~(n2')) * (~a + ~(b') * (~x) ^ ~(n')) ^ ~(p') * (~c + ~(d') * (~x) ^ ~(n')) ^ ~(p'), ~x) => (~e * ~x * (~a + ~b * (~x) ^ ~n) ^ (~p + 1) * (~c + ~d * (~x) ^ ~n) ^ (~p + 1)) / (~a * ~c) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (EqQ(~a * ~c * ~f - ~e * (~b * ~c + ~a * ~d) * (~n * (~p + 1) + 1), 0) && EqQ(~a * ~c * ~g - ~b * ~d * ~e * (2 * ~n * (~p + 1) + 1), 0)))
    @apply_utils Antiderivative((~e + ~(g') * (~x) ^ ~(n2')) * (~a + ~(b') * (~x) ^ ~(n')) ^ ~(p') * (~c + ~(d') * (~x) ^ ~(n')) ^ ~(p'), ~x) => (~e * ~x * (~a + ~b * (~x) ^ ~n) ^ (~p + 1) * (~c + ~d * (~x) ^ ~n) ^ (~p + 1)) / (~a * ~c) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~g, ~n, ~p], ~x) && (EqQ(~n2, 2 * ~n) && (EqQ(~n * (~p + 1) + 1, 0) && EqQ(~a * ~c * ~g - ~b * ~d * ~e * (2 * ~n * (~p + 1) + 1), 0)))
    @apply_utils Antiderivative((~A + ~(B') * (~x) ^ ~(m')) * (~(a') + ~(b') * (~x) ^ ~n) ^ ~(p') * (~c + ~(d') * (~x) ^ ~n) ^ ~(q'), ~x) => ~A * Antiderivative((~a + ~b * (~x) ^ ~n) ^ ~p * (~c + ~d * (~x) ^ ~n) ^ ~q, ~x) + ~B * Antiderivative((~x) ^ ~m * (~a + ~b * (~x) ^ ~n) ^ ~p * (~c + ~d * (~x) ^ ~n) ^ ~q, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~A, ~B, ~m, ~n, ~p, ~q], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ((~m - ~n) + 1, 0))
    @apply_utils Antiderivative((~Px) ^ ~(q') * (~(a') + ~(b') * (~c + ~(d') * ~x) ^ ~n) ^ ~p, ~x) => With([k = Denominator(~n)], (k / ~d) * Subst(Antiderivative(SimplifyIntegrand((~x) ^ (k - 1) * ReplaceAll(~Px, (~x->begin
                                                    #= none:1 =#
                                                    #= none:3 =#
                                                    (~x) ^ k / ~d - ~c / ~d
                                                end)) ^ ~q * (~a + ~b * (~x) ^ (k * ~n)) ^ ~p, ~x), ~x), ~x, (~c + ~d * ~x) ^ (1 / k))) <-- FreeQ([~a, ~b, ~c, ~d, ~p], ~x) && (PolynomialQ(~Px, ~x) && (IntegerQ(~q) && FractionQ(~n)))
end
