int_rules_3_1_5 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 3.1.5*u*(a+b*log(c*x^n))^p =#
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(c') * (~(d') + ~(e') * ~x) ^ ~(n'))) / sqrt(~a + ~(b') * log(~(c') * (~(d') + ~(e') * ~x) ^ ~(n'))), ~x) => (~B * (~d + ~e * ~x) * sqrt(~a + ~b * log(~c * (~d + ~e * ~x) ^ ~n))) / (~b * ~e) + ((2 * ~A * ~b - ~B * (2 * ~a + ~b * ~n)) / (2 * ~b)) * Antiderivative(1 / sqrt(~a + ~b * log(~c * (~d + ~e * ~x) ^ ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~A, ~B, ~n], ~x)
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') / ~x) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Antiderivative((~e + ~d * ~x) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~n, ~p], ~x) && (EqQ(~m, ~q) && IntegerQ(~q))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * log(~(c') * (~x) ^ ~(n')), ~x) => With([u = IntHide((~x) ^ ~m * (~d + ~e * (~x) ^ ~r) ^ ~q, ~x)], Dist(log(~c * (~x) ^ ~n), u, ~x) - ~n * Antiderivative(SimplifyIntegrand(u / ~x, ~x), ~x)) <-- FreeQ([~c, ~d, ~e, ~n, ~r], ~x) && (IGtQ(~q, 0) && (IntegerQ(~m) && Not(EqQ(~q, 1) && EqQ(~m, -1))))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~a + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => With([u = IntHide((~x) ^ ~m * (~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) && (IntegerQ(~m) && Not(EqQ(~q, 1) && EqQ(~m, -1))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~(r')) ^ ~q * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => ((~f * ~x) ^ (~m + 1) * (~d + ~e * (~x) ^ ~r) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n))) / (~d * ~f * (~m + 1)) - ((~b * ~n) / (~d * (~m + 1))) * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ ~r) ^ (~q + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~q, ~r], ~x) && (EqQ(~m + ~r * (~q + 1) + 1, 0) && NeQ(~m, -1))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~r) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~n)) ^ ~(p'), ~x) => ((~f) ^ ~m / ~n) * Subst(Antiderivative((~d + ~e * ~x) ^ ~q * (~a + ~b * log(~c * ~x)) ^ ~p, ~x), ~x, (~x) ^ ~n) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~q, ~r], ~x) && (EqQ(~m, ~r - 1) && (IGtQ(~p, 0) && ((IntegerQ(~m) || GtQ(~f, 0)) && EqQ(~r, ~n))))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~(m') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p')) / (~d + ~(e') * (~x) ^ ~r), ~x) => ((~f) ^ ~m * log(1 + (~e * (~x) ^ ~r) / ~d) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / (~e * ~r) - ((~b * (~f) ^ ~m * ~n * ~p) / (~e * ~r)) * Antiderivative((log(1 + (~e * (~x) ^ ~r) / ~d) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~r], ~x) && (EqQ(~m, ~r - 1) && (IGtQ(~p, 0) && ((IntegerQ(~m) || GtQ(~f, 0)) && NeQ(~r, ~n))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~r) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => ((~f) ^ ~m * (~d + ~e * (~x) ^ ~r) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / (~e * ~r * (~q + 1)) - ((~b * (~f) ^ ~m * ~n * ~p) / (~e * ~r * (~q + 1))) * Antiderivative(((~d + ~e * (~x) ^ ~r) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~q, ~r], ~x) && (EqQ(~m, ~r - 1) && (IGtQ(~p, 0) && ((IntegerQ(~m) || GtQ(~f, 0)) && (NeQ(~r, ~n) && NeQ(~q, -1)))))
    @apply_utils Antiderivative((~f * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~r) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => ((~f * ~x) ^ ~m / (~x) ^ ~m) * Antiderivative((~x) ^ ~m * (~d + ~e * (~x) ^ ~r) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~q, ~r], ~x) && (EqQ(~m, ~r - 1) && (IGtQ(~p, 0) && Not(IntegerQ(~m) || GtQ(~f, 0))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => ((~f * ~x) ^ ~m * (~d + ~e * ~x) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n))) / (~e * (~q + 1)) - (~f / (~e * (~q + 1))) * Antiderivative((~f * ~x) ^ (~m - 1) * (~d + ~e * ~x) ^ (~q + 1) * (~a * ~m + ~b * ~n + ~b * ~m * log(~c * (~x) ^ ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n], ~x) && (ILtQ(~q, -1) && GtQ(~m, 0))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => (-((~f * ~x) ^ (~m + 1)) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n))) / (2 * ~d * ~f * (~q + 1)) + (1 / (2 * ~d * (~q + 1))) * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a * (~m + 2 * ~q + 3) + ~b * ~n + ~b * (~m + 2 * ~q + 3) * log(~c * (~x) ^ ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n], ~x) && (ILtQ(~q, -1) && ILtQ(~m, 0))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => (((~d) ^ IntPart(~q) * (~d + ~e * (~x) ^ 2) ^ FracPart(~q)) / (1 + (~e / ~d) * (~x) ^ 2) ^ FracPart(~q)) * Antiderivative((~x) ^ ~m * (1 + (~e / ~d) * (~x) ^ 2) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && (IntegerQ(~m / 2) && (IntegerQ(~q - 1 / 2) && Not(LtQ(~m + 2 * ~q, -2) || GtQ(~d, 0))))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d1 + ~(e1') * ~x) ^ ~q * (~d2 + ~(e2') * ~x) ^ ~q * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => (((~d1 + ~e1 * ~x) ^ ~q * (~d2 + ~e2 * ~x) ^ ~q) / (1 + ((~e1 * ~e2) / (~d1 * ~d2)) * (~x) ^ 2) ^ ~q) * Antiderivative((~x) ^ ~m * (1 + ((~e1 * ~e2) / (~d1 * ~d2)) * (~x) ^ 2) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d1, ~e1, ~d2, ~e2, ~n], ~x) && (EqQ(~d2 * ~e1 + ~d1 * ~e2, 0) && (IntegerQ(~m) && IntegerQ(~q - 1 / 2)))
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~n)) / (~x * (~d + ~(e') * (~x) ^ ~(r'))), ~x) => (1 / ~n) * Subst(Antiderivative((~a + ~b * log(~c * ~x)) / (~x * (~d + ~e * (~x) ^ (~r / ~n))), ~x), ~x, (~x) ^ ~n) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~r], ~x) && IntegerQ(~r / ~n)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') / (~x * (~d + ~(e') * ~x)), ~x) => (1 / ~d) * Antiderivative((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p / ~x, ~x) - (~e / ~d) * Antiderivative((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p / (~d + ~e * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && IGtQ(~p, 0)
    #= Antiderivative(((~a')+(~b')*log((~c')*(~x)^(~n')))^(~p')/((~x)*((~d)+(~e')*(~x)^(~r'))),~x) :=   (r*log(x)-log(1+(e*x^r)/d))*(a+b*log(c*x^n))^p/(d*r) - b*n*p/d*Antiderivative(log(x)*(a+b*log(c*x^n))^(p-1)/x,x) + b*n*p/(d*r)*Antiderivative(log(1+(e*x^r)/d)*(a+b*log(c*x^n))^(p-1)/x,x) <--  FreeQ([a,b,c,d,e,n,r],x) && IGtQ(p,0) =#
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') / (~x * (~d + ~(e') * (~x) ^ ~(r'))), ~x) => (-(log(1 + ~d / (~e * (~x) ^ ~r))) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / (~d * ~r) + ((~b * ~n * ~p) / (~d * ~r)) * Antiderivative((log(1 + ~d / (~e * (~x) ^ ~r)) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~r], ~x) && IGtQ(~p, 0)
    @apply_utils Antiderivative(((~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p')) / ~x, ~x) => ~d * Antiderivative(((~d + ~e * ~x) ^ (~q - 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / ~x, ~x) + ~e * Antiderivative((~d + ~e * ~x) ^ (~q - 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && (IGtQ(~p, 0) && (GtQ(~q, 0) && IntegerQ(2 * ~q)))
    @apply_utils Antiderivative(((~d + ~(e') * ~x) ^ ~q * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p')) / ~x, ~x) => (1 / ~d) * Antiderivative(((~d + ~e * ~x) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / ~x, ~x) - (~e / ~d) * Antiderivative((~d + ~e * ~x) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && (IGtQ(~p, 0) && (LtQ(~q, -1) && IntegerQ(2 * ~q)))
    @apply_utils Antiderivative(((~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n')))) / ~x, ~x) => With([u = IntHide((~d + ~e * (~x) ^ ~r) ^ ~q / ~x, ~x)], u * (~a + ~b * log(~c * (~x) ^ ~n)) - ~b * ~n * Antiderivative(Dist(1 / ~x, u, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~r], ~x) && IntegerQ(~q - 1 / 2)
    @apply_utils Antiderivative(((~d + ~(e') * (~x) ^ ~(r')) ^ ~q * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p')) / ~x, ~x) => (1 / ~d) * Antiderivative(((~d + ~e * (~x) ^ ~r) ^ (~q + 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / ~x, ~x) - (~e / ~d) * Antiderivative((~x) ^ (~r - 1) * (~d + ~e * (~x) ^ ~r) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~r], ~x) && (IGtQ(~p, 0) && ILtQ(~q, -1))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => With([u = IntHide((~f * ~x) ^ ~m * (~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) || EqQ(~r, 2)) && (IntegerQ(~m) && IntegerQ(~q - 1 / 2)) || InverseFunctionFreeQ(u, ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~q, ~r], ~x) && (IntegerQ(2 * ~q) && (IntegerQ(~m) && IntegerQ(~r) || IGtQ(~q, 0)))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => With([u = ExpandIntegrand(~a + ~b * log(~c * (~x) ^ ~n), (~f * ~x) ^ ~m * (~d + ~e * (~x) ^ ~r) ^ ~q, ~x)], Antiderivative(u, ~x) <-- SumQ(u)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~q, ~r], ~x) && (IntegerQ(~q) && (GtQ(~q, 0) || IntegerQ(~m) && IntegerQ(~r)))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~n)) ^ ~(p'), ~x) => (1 / ~n) * Subst(Antiderivative((~x) ^ (Simplify((~m + 1) / ~n) - 1) * (~d + ~e * (~x) ^ (~r / ~n)) ^ ~q * (~a + ~b * log(~c * ~x)) ^ ~p, ~x), ~x, (~x) ^ ~n) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~n, ~p, ~q, ~r], ~x) && (IntegerQ(~q) && (IntegerQ(~r / ~n) && (IntegerQ(Simplify((~m + 1) / ~n)) && (GtQ((~m + 1) / ~n, 0) || IGtQ(~p, 0)))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => With([u = ExpandIntegrand((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, (~f * ~x) ^ ~m * (~d + ~e * (~x) ^ ~r) ^ ~q, ~x)], Antiderivative(u, ~x) <-- SumQ(u)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~p, ~q, ~r], ~x) && (IntegerQ(~q) && (GtQ(~q, 0) || IGtQ(~p, 0) && (IntegerQ(~m) && IntegerQ(~r))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ ~(r')) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Unintegrable((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ ~r) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n, ~p, ~q, ~r], ~x)
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~u) ^ ~(q') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Antiderivative((~f * ~x) ^ ~m * ExpandToSum(~u, ~x) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~f, ~m, ~n, ~p, ~q], ~x) && (BinomialQ(~u, ~x) && Not(BinomialMatchQ(~u, ~x)))
    @apply_utils Antiderivative(~Polyx * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand(~Polyx * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~n, ~p], ~x) && PolynomialQ(~Polyx, ~x)
    @apply_utils Antiderivative(~RFx * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => With([u = ExpandIntegrand((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~RFx, ~x)], Antiderivative(u, ~x) <-- SumQ(u)) <-- FreeQ([~a, ~b, ~c, ~n], ~x) && (RationalFunctionQ(~RFx, ~x) && IGtQ(~p, 0))
    @apply_utils Antiderivative(~RFx * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => With([u = ExpandIntegrand(~RFx * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x)], Antiderivative(u, ~x) <-- SumQ(u)) <-- FreeQ([~a, ~b, ~c, ~n], ~x) && (RationalFunctionQ(~RFx, ~x) && IGtQ(~p, 0))
    @apply_utils Antiderivative(~AFx * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Unintegrable(~AFx * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~n, ~p], ~x) && AlgebraicFunctionQ(~AFx, ~x, True)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') * (~d + ~(e') * log(~(c') * (~x) ^ ~(n'))) ^ ~(q'), ~x) => Antiderivative(ExpandIntegrand((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p * (~d + ~e * log(~c * (~x) ^ ~n)) ^ ~q, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n], ~x) && (IntegerQ(~p) && IntegerQ(~q))
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') * (~(d') + ~(e') * log(~(f') * (~x) ^ ~(r'))), ~x) => With([u = IntHide((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x)], Dist(~d + ~e * log(~f * (~x) ^ ~r), u, ~x) - ~e * ~r * Antiderivative(SimplifyIntegrand(u / ~x, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n, ~p, ~r], ~x)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') * (~(d') + ~(e') * log(~(f') * (~x) ^ ~(r'))) ^ ~(q'), ~x) => (~x * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p * (~d + ~e * log(~f * (~x) ^ ~r)) ^ ~q - ~e * ~q * ~r * Antiderivative((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p * (~d + ~e * log(~f * (~x) ^ ~r)) ^ (~q - 1), ~x)) - ~b * ~n * ~p * Antiderivative((~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1) * (~d + ~e * log(~f * (~x) ^ ~r)) ^ ~q, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n, ~r], ~x) && (IGtQ(~p, 0) && IGtQ(~q, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') * (~(d') + ~(e') * log(~(f') * (~x) ^ ~(r'))) ^ ~(q'), ~x) => Unintegrable((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p * (~d + ~e * log(~f * (~x) ^ ~r)) ^ ~q, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n, ~p, ~q, ~r], ~x)
    @apply_utils Antiderivative((~(a') + ~(b') * log(~v)) ^ ~(p') * (~(c') + ~(d') * log(~v)) ^ ~(q'), ~x) => (1 / Coeff(~v, ~x, 1)) * Subst(Antiderivative((~a + ~b * log(~x)) ^ ~p * (~c + ~d * log(~x)) ^ ~q, ~x), ~x, ~v) <-- FreeQ([~a, ~b, ~c, ~d, ~p, ~q], ~x) && (LinearQ(~v, ~x) && NeQ(Coeff(~v, ~x, 0), 0))
    @apply_utils Antiderivative(((~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') * (~(d') + ~(e') * log(~(c') * (~x) ^ ~(n'))) ^ ~(q')) / ~x, ~x) => (1 / ~n) * Subst(Antiderivative((~a + ~b * ~x) ^ ~p * (~d + ~e * ~x) ^ ~q, ~x), ~x, log(~c * (~x) ^ ~n)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~n, ~p, ~q], ~x)
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(m') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') * (~(d') + ~(e') * log(~(f') * (~x) ^ ~(r'))), ~x) => With([u = IntHide((~g * ~x) ^ ~m * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x)], Dist(~d + ~e * log(~f * (~x) ^ ~r), u, ~x) - ~e * ~r * Antiderivative(SimplifyIntegrand(u / ~x, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~p, ~r], ~x) && Not(EqQ(~p, 1) && (EqQ(~a, 0) && NeQ(~d, 0)))
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(m') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') * (~(d') + ~(e') * log(~(f') * (~x) ^ ~(r'))) ^ ~(q'), ~x) => (((~g * ~x) ^ (~m + 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p * (~d + ~e * log(~f * (~x) ^ ~r)) ^ ~q) / (~g * (~m + 1)) - ((~e * ~q * ~r) / (~m + 1)) * Antiderivative((~g * ~x) ^ ~m * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p * (~d + ~e * log(~f * (~x) ^ ~r)) ^ (~q - 1), ~x)) - ((~b * ~n * ~p) / (~m + 1)) * Antiderivative((~g * ~x) ^ ~m * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1) * (~d + ~e * log(~f * (~x) ^ ~r)) ^ ~q, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~r], ~x) && (IGtQ(~p, 0) && (IGtQ(~q, 0) && NeQ(~m, -1)))
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(m') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p') * (~(d') + ~(e') * log(~(f') * (~x) ^ ~(r'))) ^ ~(q'), ~x) => Unintegrable((~g * ~x) ^ ~m * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p * (~d + ~e * log(~f * (~x) ^ ~r)) ^ ~q, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~p, ~q, ~r], ~x)
    @apply_utils Antiderivative((~u) ^ ~(m') * (~(a') + ~(b') * log(~v)) ^ ~(p') * (~(c') + ~(d') * log(~v)) ^ ~(q'), ~x) => With([e = Coeff(~u, ~x, 0), f = Coeff(~u, ~x, 1), g = Coeff(~v, ~x, 0), h = Coeff(~v, ~x, 1)], (1 / h) * Subst(Antiderivative(((f * ~x) / h) ^ ~m * (~a + ~b * log(~x)) ^ ~p * (~c + ~d * log(~x)) ^ ~q, ~x), ~x, ~v) <-- EqQ(f * g - e * h, 0) && NeQ(g, 0)) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~p, ~q], ~x) && LinearQ([~u, ~v], ~x)
    @apply_utils Antiderivative(log(~(d') * (~e + ~(f') * (~x) ^ ~(m')) ^ ~(r')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => With([u = IntHide(log(~d * (~e + ~f * (~x) ^ ~m) ^ ~r), ~x)], Dist((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, u, ~x) - ~b * ~n * ~p * Antiderivative(Dist((~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1) / ~x, u, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~r, ~m, ~n], ~x) && (IGtQ(~p, 0) && (RationalQ(~m) && (EqQ(~p, 1) || (FractionQ(~m) && IntegerQ(1 / ~m) || EqQ(~r, 1) && (EqQ(~m, 1) && EqQ(~d * ~e, 1))))))
    @apply_utils Antiderivative(log(~(d') * (~e + ~(f') * (~x) ^ ~(m')) ^ ~(r')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => With([u = IntHide((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x)], Dist(log(~d * (~e + ~f * (~x) ^ ~m) ^ ~r), u, ~x) - ~f * ~m * ~r * Antiderivative(Dist((~x) ^ (~m - 1) / (~e + ~f * (~x) ^ ~m), u, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~r, ~m, ~n], ~x) && (IGtQ(~p, 0) && IntegerQ(~m))
    @apply_utils Antiderivative(log(~(d') * (~e + ~(f') * (~x) ^ ~(m')) ^ ~(r')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Unintegrable(log(~d * (~e + ~f * (~x) ^ ~m) ^ ~r) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~r, ~m, ~n, ~p], ~x)
    @apply_utils Antiderivative(log(~(d') * (~u) ^ ~(r')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Antiderivative(log(~d * ExpandToSum(~u, ~x) ^ ~r) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~r, ~n, ~p], ~x) && (BinomialQ(~u, ~x) && Not(BinomialMatchQ(~u, ~x)))
    @apply_utils Antiderivative((log(~(d') * (~e + ~(f') * (~x) ^ ~(m'))) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p')) / ~x, ~x) => (-(PolyLog(2, -(~d) * ~f * (~x) ^ ~m)) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / ~m + ((~b * ~n * ~p) / ~m) * Antiderivative((PolyLog(2, -(~d) * ~f * (~x) ^ ~m) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n], ~x) && (IGtQ(~p, 0) && EqQ(~d * ~e, 1))
    @apply_utils Antiderivative((log(~(d') * (~e + ~(f') * (~x) ^ ~(m')) ^ ~(r')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p')) / ~x, ~x) => (log(~d * (~e + ~f * (~x) ^ ~m) ^ ~r) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p + 1)) / (~b * ~n * (~p + 1)) - ((~f * ~m * ~r) / (~b * ~n * (~p + 1))) * Antiderivative(((~x) ^ (~m - 1) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p + 1)) / (~e + ~f * (~x) ^ ~m), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~r, ~m, ~n], ~x) && (IGtQ(~p, 0) && NeQ(~d * ~e, 1))
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(q') * log(~(d') * (~e + ~(f') * (~x) ^ ~(m')) ^ ~(r')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => With([u = IntHide((~g * ~x) ^ ~q * log(~d * (~e + ~f * (~x) ^ ~m) ^ ~r), ~x)], Dist(~a + ~b * log(~c * (~x) ^ ~n), u, ~x) - ~b * ~n * Antiderivative(Dist(1 / ~x, u, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~r, ~m, ~n, ~q], ~x) && ((IntegerQ((~q + 1) / ~m) || RationalQ(~m) && RationalQ(~q)) && NeQ(~q, -1))
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(q') * log(~(d') * (~e + ~(f') * (~x) ^ ~(m'))) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => With([u = IntHide((~g * ~x) ^ ~q * log(~d * (~e + ~f * (~x) ^ ~m)), ~x)], Dist((~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, u, ~x) - ~b * ~n * ~p * Antiderivative(Dist((~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1) / ~x, u, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~q], ~x) && (IGtQ(~p, 0) && (RationalQ(~m) && (RationalQ(~q) && (NeQ(~q, -1) && (EqQ(~p, 1) || (FractionQ(~m) && IntegerQ((~q + 1) / ~m) || IGtQ(~q, 0) && (IntegerQ((~q + 1) / ~m) && EqQ(~d * ~e, 1))))))))
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(q') * log(~(d') * (~e + ~(f') * (~x) ^ ~(m')) ^ ~(r')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => With([u = IntHide((~g * ~x) ^ ~q * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x)], Dist(log(~d * (~e + ~f * (~x) ^ ~m) ^ ~r), u, ~x) - ~f * ~m * ~r * Antiderivative(Dist((~x) ^ (~m - 1) / (~e + ~f * (~x) ^ ~m), u, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~r, ~m, ~n, ~q], ~x) && (IGtQ(~p, 0) && (RationalQ(~m) && RationalQ(~q)))
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(q') * log(~(d') * (~e + ~(f') * (~x) ^ ~(m')) ^ ~(r')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Unintegrable((~g * ~x) ^ ~q * log(~d * (~e + ~f * (~x) ^ ~m) ^ ~r) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~r, ~m, ~n, ~p, ~q], ~x)
    @apply_utils Antiderivative((~(g') * ~x) ^ ~(q') * log(~(d') * (~u) ^ ~(r')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Antiderivative((~g * ~x) ^ ~q * log(~d * ExpandToSum(~u, ~x) ^ ~r) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~g, ~r, ~n, ~p, ~q], ~x) && (BinomialQ(~u, ~x) && Not(BinomialMatchQ(~u, ~x)))
    @apply_utils Antiderivative(PolyLog(~k, ~(e') * (~x) ^ ~(q')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => (-(~b) * ~n * ~x * PolyLog(~k, ~e * (~x) ^ ~q) + ~x * PolyLog(~k, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n)) + ~b * ~n * ~q * Antiderivative(PolyLog(~k - 1, ~e * (~x) ^ ~q), ~x)) - ~q * Antiderivative(PolyLog(~k - 1, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~e, ~n, ~q], ~x) && IGtQ(~k, 0)
    @apply_utils Antiderivative(PolyLog(~k, ~(e') * (~x) ^ ~(q')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Unintegrable(PolyLog(~k, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~e, ~n, ~p, ~q], ~x)
    @apply_utils Antiderivative((PolyLog(~k, ~(e') * (~x) ^ ~(q')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p')) / ~x, ~x) => (PolyLog(~k + 1, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p) / ~q - ((~b * ~n * ~p) / ~q) * Antiderivative((PolyLog(~k + 1, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p - 1)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~e, ~k, ~n, ~q], ~x) && GtQ(~p, 0)
    @apply_utils Antiderivative((PolyLog(~k, ~(e') * (~x) ^ ~(q')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p')) / ~x, ~x) => (PolyLog(~k, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p + 1)) / (~b * ~n * (~p + 1)) - (~q / (~b * ~n * (~p + 1))) * Antiderivative((PolyLog(~k - 1, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ (~p + 1)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~e, ~k, ~n, ~q], ~x) && LtQ(~p, -1)
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * PolyLog(~k, ~(e') * (~x) ^ ~(q')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => ((-(~b) * ~n * (~d * ~x) ^ (~m + 1) * PolyLog(~k, ~e * (~x) ^ ~q)) / (~d * (~m + 1) ^ 2) + ((~d * ~x) ^ (~m + 1) * PolyLog(~k, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n))) / (~d * (~m + 1)) + ((~b * ~n * ~q) / (~m + 1) ^ 2) * Antiderivative((~d * ~x) ^ ~m * PolyLog(~k - 1, ~e * (~x) ^ ~q), ~x)) - (~q / (~m + 1)) * Antiderivative((~d * ~x) ^ ~m * PolyLog(~k - 1, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~n, ~q], ~x) && IGtQ(~k, 0)
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * PolyLog(~k, ~(e') * (~x) ^ ~(q')) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))) ^ ~(p'), ~x) => Unintegrable((~d * ~x) ^ ~m * PolyLog(~k, ~e * (~x) ^ ~q) * (~a + ~b * log(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~m, ~n, ~p, ~q], ~x)
    @apply_utils Antiderivative(~(Px') * (~F)(~(d') * (~(e') + ~(f') * ~x)) ^ ~(m') * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => With([u = IntHide(~Px * (~F)(~d * (~e + ~f * ~x)) ^ ~m, ~x)], Dist(~a + ~b * log(~c * (~x) ^ ~n), u, ~x) - ~b * ~n * Antiderivative(Dist(1 / ~x, u, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n], ~x) && (PolynomialQ(~Px, ~x) && (IGtQ(~m, 0) && MemberQ([asin, acos, asinh, acosh], ~F)))
    @apply_utils Antiderivative(~(Px') * (~F)(~(d') * (~(e') + ~(f') * ~x)) * (~(a') + ~(b') * log(~(c') * (~x) ^ ~(n'))), ~x) => With([u = IntHide(~Px * (~F)(~d * (~e + ~f * ~x)), ~x)], Dist(~a + ~b * log(~c * (~x) ^ ~n), u, ~x) - ~b * ~n * Antiderivative(Dist(1 / ~x, u, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n], ~x) && (PolynomialQ(~Px, ~x) && MemberQ([atan, acot, atanh, acoth], ~F))
end
