int_rules_3_2_3 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 3.2.3*u*log(e*(f*(a+b*x)^p*(c+d*x)^q)^r)^s =#
    @apply_utils Antiderivative(~(u') * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ ~(s'), ~x) => Antiderivative(~u * log(~e * ((((~b) ^ ~p * ~f) / (~d) ^ ~p) * (~c + ~d * ~x) ^ (~p + ~q)) ^ ~r) ^ ~s, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~p, ~q, ~r, ~s], ~x) && (EqQ(~b * ~c - ~a * ~d, 0) && IntegerQ(~p))
    @apply_utils Antiderivative(log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ ~(s'), ~x) => (((~a + ~b * ~x) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ ~s) / ~b - ~r * ~s * (~p + ~q) * Antiderivative(log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ (~s - 1), ~x)) + ((~q * ~r * ~s * (~b * ~c - ~a * ~d)) / ~b) * Antiderivative(log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ (~s - 1) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~p, ~q, ~r, ~s], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ(~p + ~q, 0) && (IGtQ(~s, 0) && LtQ(~s, 4))))
    @apply_utils Antiderivative(log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) / (~(g') + ~(h') * ~x), ~x) => ((log(~g + ~h * ~x) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r)) / ~h - ((~b * ~p * ~r) / ~h) * Antiderivative(log(~g + ~h * ~x) / (~a + ~b * ~x), ~x)) - ((~d * ~q * ~r) / ~h) * Antiderivative(log(~g + ~h * ~x) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~p, ~q, ~r], ~x) && NeQ(~b * ~c - ~a * ~d, 0)
    @apply_utils Antiderivative((~(g') + ~(h') * ~x) ^ ~(m') * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')), ~x) => (((~g + ~h * ~x) ^ (~m + 1) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r)) / (~h * (~m + 1)) - ((~b * ~p * ~r) / (~h * (~m + 1))) * Antiderivative((~g + ~h * ~x) ^ (~m + 1) / (~a + ~b * ~x), ~x)) - ((~d * ~q * ~r) / (~h * (~m + 1))) * Antiderivative((~g + ~h * ~x) ^ (~m + 1) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~m, ~p, ~q, ~r], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && NeQ(~m, -1))
    @apply_utils Antiderivative(log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ 2 / (~(g') + ~(h') * ~x), ~x) => Antiderivative((log((~a + ~b * ~x) ^ (~p * ~r)) + log((~c + ~d * ~x) ^ (~q * ~r))) ^ 2 / (~g + ~h * ~x), ~x) + ((log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) - log((~a + ~b * ~x) ^ (~p * ~r))) - log((~c + ~d * ~x) ^ (~q * ~r))) * (2 * Antiderivative(log((~c + ~d * ~x) ^ (~q * ~r)) / (~g + ~h * ~x), ~x) + Antiderivative(((log((~a + ~b * ~x) ^ (~p * ~r)) - log((~c + ~d * ~x) ^ (~q * ~r))) + log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r)) / (~g + ~h * ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~p, ~q, ~r], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ(~b * ~g - ~a * ~h, 0))
    #= Antiderivative(log((~e')*((~f')*((~a')+(~b')*(~x))^(~p')*((~c')+(~d')*(~x))^(~q'))^(~r'))^2/((~g')+(~h') *(~x)),~x) :=  Antiderivative((log((a+b*x)^(p*r))+log((c+d*x)^(q*r)))^2/(g+h*x),x) + (log(e*(f*(a+b*x)^p*(c+d*x)^q)^r)-log((a+b*x)^(p*r))-log((c+d*x)^(q* r)))* Antiderivative((log((a+b*x)^(p*r))+log((c+d*x)^(q*r))+log(e*(f*(a+b*x)^p*(c+ d*x)^q)^r))/(g+h*x),x) <-- FreeQ([a,b,c,d,e,f,g,h,p,q,r],x) &&  NeQ(b*c-a*d,0) && EqQ(b*g-a*h,0) =#
    @apply_utils Antiderivative(log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ 2 / (~(g') + ~(h') * ~x), ~x) => ((log(~g + ~h * ~x) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ 2) / ~h - ((2 * ~b * ~p * ~r) / ~h) * Antiderivative((log(~g + ~h * ~x) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r)) / (~a + ~b * ~x), ~x)) - ((2 * ~d * ~q * ~r) / ~h) * Antiderivative((log(~g + ~h * ~x) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r)) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~p, ~q, ~r], ~x) && NeQ(~b * ~c - ~a * ~d, 0)
    @apply_utils Antiderivative((~(g') + ~(h') * ~x) ^ ~(m') * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ ~s, ~x) => (((~g + ~h * ~x) ^ (~m + 1) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ ~s) / (~h * (~m + 1)) - ((~b * ~p * ~r * ~s) / (~h * (~m + 1))) * Antiderivative(((~g + ~h * ~x) ^ (~m + 1) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ (~s - 1)) / (~a + ~b * ~x), ~x)) - ((~d * ~q * ~r * ~s) / (~h * (~m + 1))) * Antiderivative(((~g + ~h * ~x) ^ (~m + 1) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ (~s - 1)) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~m, ~p, ~q, ~r, ~s], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (IGtQ(~s, 0) && NeQ(~m, -1)))
    @apply_utils Antiderivative(((~(s') + ~(t') * log(~(i') * (~(g') + ~(h') * ~x) ^ ~(n'))) ^ ~(m') * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r'))) / (~(j') + ~(k') * ~x), ~x) => (((~s + ~t * log(~i * (~g + ~h * ~x) ^ ~n)) ^ (~m + 1) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r)) / (~k * ~n * ~t * (~m + 1)) - ((~b * ~p * ~r) / (~k * ~n * ~t * (~m + 1))) * Antiderivative((~s + ~t * log(~i * (~g + ~h * ~x) ^ ~n)) ^ (~m + 1) / (~a + ~b * ~x), ~x)) - ((~d * ~q * ~r) / (~k * ~n * ~t * (~m + 1))) * Antiderivative((~s + ~t * log(~i * (~g + ~h * ~x) ^ ~n)) ^ (~m + 1) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~i, ~j, ~k, ~s, ~t, ~m, ~n, ~p, ~q, ~r], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ(~h * ~j - ~g * ~k, 0) && IGtQ(~m, 0)))
    @apply_utils Antiderivative(((~(s') + ~(t') * log(~(i') * (~(g') + ~(h') * ~x) ^ ~(n'))) * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r'))) / (~(j') + ~(k') * ~x), ~x) => ((log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) - log((~a + ~b * ~x) ^ (~p * ~r))) - log((~c + ~d * ~x) ^ (~q * ~r))) * Antiderivative((~s + ~t * log(~i * (~g + ~h * ~x) ^ ~n)) / (~j + ~k * ~x), ~x) + Antiderivative((log((~a + ~b * ~x) ^ (~p * ~r)) * (~s + ~t * log(~i * (~g + ~h * ~x) ^ ~n))) / (~j + ~k * ~x), ~x) + Antiderivative((log((~c + ~d * ~x) ^ (~q * ~r)) * (~s + ~t * log(~i * (~g + ~h * ~x) ^ ~n))) / (~j + ~k * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~i, ~j, ~k, ~s, ~t, ~n, ~p, ~q, ~r], ~x) && NeQ(~b * ~c - ~a * ~d, 0)
    @apply_utils Antiderivative(((~(s') + ~(t') * log(~(i') * (~(g') + ~(h') * ~x) ^ ~(n'))) ^ ~(m') * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ ~(u')) / (~(j') + ~(k') * ~x), ~x) => Unintegrable(((~s + ~t * log(~i * (~g + ~h * ~x) ^ ~n)) ^ ~m * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ ~u) / (~j + ~k * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~i, ~j, ~k, ~s, ~t, ~m, ~n, ~p, ~q, ~r, ~u], ~x) && NeQ(~b * ~c - ~a * ~d, 0)
    @apply_utils Antiderivative(~u * log(~v) * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ ~(s'), ~x) => With([g = Simplify(((~v - 1) * (~c + ~d * ~x)) / (~a + ~b * ~x)), h = Simplify(~u * (~a + ~b * ~x) * (~c + ~d * ~x))], (-h * PolyLog(2, 1 - ~v) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ ~s) / (~b * ~c - ~a * ~d) + h * ~p * ~r * ~s * Antiderivative((PolyLog(2, 1 - ~v) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ (~s - 1)) / ((~a + ~b * ~x) * (~c + ~d * ~x)), ~x) <-- FreeQ([g, h], ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~p, ~q, ~r, ~s], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (IGtQ(~s, 0) && EqQ(~p + ~q, 0)))
    @apply_utils Antiderivative(~v * log(~(i') * (~(j') * (~(g') + ~(h') * ~x) ^ ~(t')) ^ ~(u')) * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ ~(s'), ~x) => With([k = Simplify(~v * (~a + ~b * ~x) * (~c + ~d * ~x))], (k * log(~i * (~j * (~g + ~h * ~x) ^ ~t) ^ ~u) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ (~s + 1)) / (~p * ~r * (~s + 1) * (~b * ~c - ~a * ~d)) - ((k * ~h * ~t * ~u) / (~p * ~r * (~s + 1) * (~b * ~c - ~a * ~d))) * Antiderivative(log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ (~s + 1) / (~g + ~h * ~x), ~x) <-- FreeQ(k, ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~h, ~i, ~j, ~p, ~q, ~r, ~s, ~t, ~u], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ(~p + ~q, 0) && NeQ(~s, -1)))
    @apply_utils Antiderivative(~u * PolyLog(~n, ~v) * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ ~(s'), ~x) => With([g = Simplify((~v * (~c + ~d * ~x)) / (~a + ~b * ~x)), h = Simplify(~u * (~a + ~b * ~x) * (~c + ~d * ~x))], (h * PolyLog(~n + 1, ~v) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ ~s) / (~b * ~c - ~a * ~d) - h * ~p * ~r * ~s * Antiderivative((PolyLog(~n + 1, ~v) * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ (~s - 1)) / ((~a + ~b * ~x) * (~c + ~d * ~x)), ~x) <-- FreeQ([g, h], ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n, ~p, ~q, ~r, ~s], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (IGtQ(~s, 0) && EqQ(~p + ~q, 0)))
    @apply_utils Antiderivative((~(a') + ~(b') * log((~(c') * sqrt(~(d') + ~(e') * ~x)) / sqrt(~(f') + ~(g') * ~x))) ^ ~(n') / (~(A') + ~(B') * ~x + ~(C') * (~x) ^ 2), ~x) => ((2 * ~e * ~g) / (~C * (~e * ~f - ~d * ~g))) * Subst(Antiderivative((~a + ~b * log(~c * ~x)) ^ ~n / ~x, ~x), ~x, sqrt(~d + ~e * ~x) / sqrt(~f + ~g * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~C, ~n], ~x) && (EqQ(~C * ~d * ~f - ~A * ~e * ~g, 0) && EqQ(~B * ~e * ~g - ~C * (~e * ~f + ~d * ~g), 0))
    @apply_utils Antiderivative((~(a') + ~(b') * log((~(c') * sqrt(~(d') + ~(e') * ~x)) / sqrt(~(f') + ~(g') * ~x))) ^ ~(n') / (~(A') + ~(C') * (~x) ^ 2), ~x) => (~g / (~C * ~f)) * Subst(Antiderivative((~a + ~b * log(~c * ~x)) ^ ~n / ~x, ~x), ~x, sqrt(~d + ~e * ~x) / sqrt(~f + ~g * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~C, ~n], ~x) && (EqQ(~C * ~d * ~f - ~A * ~e * ~g, 0) && EqQ(~e * ~f + ~d * ~g, 0))
    @apply_utils Antiderivative(~(RFx') * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')), ~x) => (~p * ~r * Antiderivative(~RFx * log(~a + ~b * ~x), ~x) + ~q * ~r * Antiderivative(~RFx * log(~c + ~d * ~x), ~x)) - ((~p * ~r * log(~a + ~b * ~x) + ~q * ~r * log(~c + ~d * ~x)) - log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r)) * Antiderivative(~RFx, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~p, ~q, ~r], ~x) && (RationalFunctionQ(~RFx, ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && Not(MatchQ(~RFx, ~(u') * (~a + ~b * ~x) ^ ~(m') * (~c + ~d * ~x) ^ ~(n') <-- IntegersQ(m, n)))))
    #= Antiderivative((~RFx)*log((~e')*((~f')*((~a')+(~b')*(~x))^(~p')*((~c')+(~d')*(~x))^(~q'))^(~r')),(~x)*Symbol) := With([u=IntHide(RFx,x)], u*log(e*(f*(a+b*x)^p*(c+d*x)^q)^r) - b*p*r*Antiderivative(u/(a+b*x),x) -  d*q*r*Antiderivative(u/(c+d*x),x) <-- NonsumQ(u)) <--  FreeQ([a,b,c,d,e,f,p,q,r],x) && RationalFunctionQ(RFx,x) &&  NeQ(b*c-a*d,0) =#
    @apply_utils Antiderivative(~RFx * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ ~(s'), ~x) => With([u = ExpandIntegrand(log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ ~s, ~RFx, ~x)], Antiderivative(u, ~x) <-- SumQ(u)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~p, ~q, ~r, ~s], ~x) && (RationalFunctionQ(~RFx, ~x) && IGtQ(~s, 0))
    @apply_utils Antiderivative(~RFx * log(~(e') * (~(f') * (~(a') + ~(b') * ~x) ^ ~(p') * (~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(r')) ^ ~(s'), ~x) => Unintegrable(~RFx * log(~e * (~f * (~a + ~b * ~x) ^ ~p * (~c + ~d * ~x) ^ ~q) ^ ~r) ^ ~s, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~p, ~q, ~r, ~s], ~x) && RationalFunctionQ(~RFx, ~x)
    @apply_utils Antiderivative(~(u') * log(~(e') * (~(f') * (~v) ^ ~(p') * (~w) ^ ~(q')) ^ ~(r')) ^ ~(s'), ~x) => Antiderivative(~u * log(~e * (~f * ExpandToSum(~v, ~x) ^ ~p * ExpandToSum(~w, ~x) ^ ~q) ^ ~r) ^ ~s, ~x) <-- FreeQ([~e, ~f, ~p, ~q, ~r, ~s], ~x) && (LinearQ([~v, ~w], ~x) && (Not(LinearMatchQ([~v, ~w], ~x)) && AlgebraicFunctionQ(~u, ~x)))
    @apply_utils Antiderivative(~(u') * log(~(e') * (~(f') * (~g + ~(v') / ~w)) ^ ~(r')) ^ ~(s'), ~x) => Antiderivative(~u * log(~e * ((~f * ExpandToSum(~v + ~g * ~w, ~x)) / ExpandToSum(~w, ~x)) ^ ~r) ^ ~s, ~x) <-- FreeQ([~e, ~f, ~g, ~r, ~s], ~x) && (LinearQ(~w, ~x) && ((FreeQ(~v, ~x) || LinearQ(~v, ~x)) && AlgebraicFunctionQ(~u, ~x)))
    #= Antiderivative(log((~g')*((~h')*((~a')+(~b')*(~x))^(~p'))^(~q'))*log((~i')*((~j')*((~c')+(~d')*(~x))^ (~r'))^(~s'))/((~e)+(~f')*(~x)),~x) :=  1/f*Subst(Antiderivative(log(g*(h*Simp(-(b*e-a*f)/f+b*x/f,x)^p)^q)*log(i*(j*Simp( -(d*e-c*f)/f+d*x/f,x)^r)^s)/x,x),x,e+f*x) <--  FreeQ([a,b,c,d,e,f,g,h,i,j,p,q,r,s],x) =#
end
