int_rules_3_1_3 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 3.1.3*(d+e*x^r)^q*(a+b*log(c*x^n))^p =#
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => With([u = IntHide((~d + ~e * (~x) ^ ~r) ^ ~q, ~x)], u * (~a + ~b * log(~c * (~x) ^ ~n)) - ~b * ~n * Antiderivative(SimplifyIntegrand(u / ~x, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~r], ~x) && IGtQ(~q, 0)
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => With([u = IntHide((~d + ~e * (~x) ^ ~r) ^ ~q, ~x)], Dist(~a + ~b * log(~c * (~x) ^ ~n), u) - ~b * ~n * Antiderivative(SimplifyIntegrand(u / ~x, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~r], ~x) && IGtQ(~q, 0)
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ ~(r')) ^ ~q * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => (~x * (~d + ~e * (~x) ^ ~r) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n))) / ~d - ((~b * ~n) / ~d) * Antiderivative((~d + ~e * (~x) ^ ~r) ^ (~q + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~q, ~r], ~x) && EqQ(~r * (~q + 1) + 1, 0)
    #= Antiderivative(((~a')+(~b')*log((~c')*(~x)^(~n')))^(~p')/((~d)+(~e')*(~x)^(~r')),~x) :=  1/e*Antiderivative((a+b*log(c*x^n))^p/x^r,x) - d/e*Antiderivative((a+b*log(c*x^n))^p/(x^r*(d+e*x^r)),x) <--  FreeQ([a,b,c,d,e,n,r],x) && IGtQ(p,0) && IGtQ(r,0) =#
    @apply_utils Antiderivative(log(~(c') * ~x) / (~d + ~(e') * ~x), ~x) => (-1 / ~e) * PolyLog(2, 1 - ~c * ~x) <-- FreeQ([~c, ~d, ~e], ~x) && EqQ(~e + ~c * ~d, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * ~x)) / (~d + ~(e') * ~x), ~x) => ((~a + ~b * log((-(~c) * ~d) / ~e)) * log(~d + ~e * ~x)) / ~e + ~b * Antiderivative(log((-(~e) * ~x) / ~d) / (~d + ~e * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && GtQ((-(~c) * ~d) / ~e, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') / (~d + ~(e') * ~x), ~x) => (log(1 + (~e * ~x) / ~d) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / ~e - ((~b * ~n * ~p) / ~e) * Antiderivative((log(1 + (~e * ~x) / ~d) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && IGtQ(~p, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') / (~d + ~(e') * ~x) ^ 2, ~x) => (~x * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / (~d * (~d + ~e * ~x)) - ((~b * ~n * ~p) / ~d) * Antiderivative((~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1) / (~d + ~e * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~p], ~x) && GtQ(~p, 0)
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => ((~d + ~e * ~x) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / (~e * (~q + 1)) - ((~b * ~n * ~p) / (~e * (~q + 1))) * Antiderivative(((~d + ~e * ~x) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~p, ~q], ~x) && (GtQ(~p, 0) && (NeQ(~q, -1) && (EqQ(~p, 1) || (IntegersQ(2 * ~p, 2 * ~q) && Not(IGtQ(~q, 0)) || EqQ(~p, 2) && NeQ(~q, 1)))))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~p, ~x) => ((~x * (~d + ~e * ~x) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p + 1)) / (~b * ~n * (~p + 1)) + ((~d * ~q) / (~b * ~n * (~p + 1))) * Antiderivative((~d + ~e * ~x) ^ (~q - 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p + 1), ~x)) - ((~q + 1) / (~b * ~n * (~p + 1))) * Antiderivative((~d + ~e * ~x) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && (LtQ(~p, -1) && GtQ(~q, 0))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => ((~x * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n))) / (2 * ~q + 1) - ((~b * ~n) / (2 * ~q + 1)) * Antiderivative((~d + ~e * (~x) ^ 2) ^ ~q, ~x)) + ((2 * ~d * ~q) / (2 * ~q + 1)) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * log(~c * (~x) ^ ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && GtQ(~q, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) / (~d + ~(e') * (~x) ^ 2) ^ (3 / 2), ~x) => (~x * (~a + ~b * log(~c * (~x) ^ ~n))) / (~d * sqrt(~d + ~e * (~x) ^ 2)) - ((~b * ~n) / ~d) * Antiderivative(1 / sqrt(~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x)
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => (-(~x) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n))) / (2 * ~d * (~q + 1)) + ((~b * ~n) / (2 * ~d * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1), ~x) + ((2 * ~q + 3) / (2 * ~d * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && LtQ(~q, -1)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) / (~d + ~(e') * (~x) ^ 2), ~x) => With([u = IntHide(1 / (~d + ~e * (~x) ^ 2), ~x)], u * (~a + ~b * log(~c * (~x) ^ ~n)) - ~b * ~n * Antiderivative(u / ~x, ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (asinh((Rt(~e, 2) * ~x) / sqrt(~d)) * (~a + ~b * log(~c * (~x) ^ ~n))) / Rt(~e, 2) - ((~b * ~n) / Rt(~e, 2)) * Antiderivative(asinh((Rt(~e, 2) * ~x) / sqrt(~d)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && (GtQ(~d, 0) && PosQ(~e))
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (asin((Rt(-(~e), 2) * ~x) / sqrt(~d)) * (~a + ~b * log(~c * (~x) ^ ~n))) / Rt(-(~e), 2) - ((~b * ~n) / Rt(-(~e), 2)) * Antiderivative(asin((Rt(-(~e), 2) * ~x) / sqrt(~d)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && (GtQ(~d, 0) && NegQ(~e))
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (sqrt(1 + (~e / ~d) * (~x) ^ 2) / sqrt(~d + ~e * (~x) ^ 2)) * Antiderivative((~a + ~b * log(~c * (~x) ^ ~n)) / sqrt(1 + (~e / ~d) * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && Not(GtQ(~d, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) / (sqrt(~d1 + ~(e1') * ~x) * sqrt(~d2 + ~(e2') * ~x)), ~x) => (sqrt(1 + ((~e1 * ~e2) / (~d1 * ~d2)) * (~x) ^ 2) / (sqrt(~d1 + ~e1 * ~x) * sqrt(~d2 + ~e2 * ~x))) * Antiderivative((~a + ~b * log(~c * (~x) ^ ~n)) / sqrt(1 + ((~e1 * ~e2) / (~d1 * ~d2)) * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d1, ~e1, ~d2, ~e2, ~n], ~x) && EqQ(~d2 * ~e1 + ~d1 * ~e2, 0)
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => With([u = IntHide((~d + ~e * (~x) ^ ~r) ^ ~q, ~x)], Dist(~a + ~b * log(~c * (~x) ^ ~n), u, ~x) - ~b * ~n * Antiderivative(SimplifyIntegrand(u / ~x, ~x), ~x) <-- EqQ(~r, 1) && IntegerQ(~q - 1 / 2) || (EqQ(~r, 2) && EqQ(~q, -1) || InverseFunctionFreeQ(u, ~x))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~q, ~r], ~x) && (IntegerQ(2 * ~q) && IntegerQ(~r))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => With([u = ExpandIntegrand((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, (~d + ~e * (~x) ^ ~r) ^ ~q, ~x)], Antiderivative(u, ~x) <-- SumQ(u)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~p, ~q, ~r], ~x) && (IntegerQ(~q) && (GtQ(~q, 0) || IGtQ(~p, 0) && IntegerQ(~r)))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Unintegrable((~d + ~e * (~x) ^ ~r) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~p, ~q, ~r], ~x)
    @apply_utils Antiderivative((~u) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Antiderivative(ExpandToSum(~u, ~x) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~n, ~p, ~q], ~x) && (BinomialQ(~u, ~x) && Not(BinomialMatchQ(~u, ~x)))
end
