int_rules_3_2_1 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 3.2.1*(f+g*x)^m*(A+B*log(e*((a+b*x)*over*(c+d*x))^n))^p =#
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))) ^ ~(p'), ~x) => ((~a + ~b * ~x) * (~A + ~B * log(~e * ((~a + ~b * ~x) / (~c + ~d * ~x)) ^ ~n)) ^ ~p) / ~b - ((~B * ~n * ~p * (~b * ~c - ~a * ~d)) / ~b) * Antiderivative((~A + ~B * log(~e * ((~a + ~b * ~x) / (~c + ~d * ~x)) ^ ~n)) ^ (~p - 1) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && IGtQ(~p, 0))
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)) ^ ~(p'), ~x) => ((~a + ~b * ~x) * (~A + ~B * log((~e * (~a + ~b * ~x) ^ ~n) / (~c + ~d * ~x) ^ ~n)) ^ ~p) / ~b - ((~B * ~n * ~p * (~b * ~c - ~a * ~d)) / ~b) * Antiderivative((~A + ~B * log((~e * (~a + ~b * ~x) ^ ~n) / (~c + ~d * ~x) ^ ~n)) ^ (~p - 1) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~A, ~B, ~n], ~x) && (EqQ(~n + ~mn, 0) && (NeQ(~b * ~c - ~a * ~d, 0) && IGtQ(~p, 0)))
    #= Antiderivative(((~A')+(~B')*log((~e')*(((~a')+(~b')*(~x))^(~n1')*((~c')+(~d')*(~x))^(~n2))^(~n')))^(~p') ,~x) := (a+b*x)*(A+B*log(e*((a+b*x)^n1/(c+d*x)^n1)^n))^p/b - B*n*p*(b*c-a*d)/b*Antiderivative((A+B*log(e*((a+b*x)^n1/(c+d*x)^n1)^n))^(p-1)/( c+d*x),x) <-- FreeQ([a,b,c,d,e,A,B,n],x) && EqQ(n1+n2,0) && GtQ(n1,0) &&  (EqQ(n1,1) || EqQ(n,1)) && NeQ(b*c-a*d,0) && IGtQ(p,0) =#
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))) ^ ~p, ~x) => Unintegrable((~A + ~B * log(~e * ((~a + ~b * ~x) / (~c + ~d * ~x)) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~A, ~B, ~n, ~p], ~x)
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)) ^ ~p, ~x) => Unintegrable((~A + ~B * log((~e * (~a + ~b * ~x) ^ ~n) / (~c + ~d * ~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~A, ~B, ~n, ~p], ~x) && EqQ(~n + ~mn, 0)
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * (~u / ~v) ^ ~(n'))) ^ ~(p'), ~x) => Antiderivative((~A + ~B * log(~e * (ExpandToSum(~u, ~x) / ExpandToSum(~v, ~x)) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~e, ~A, ~B, ~n, ~p], ~x) && (LinearQ([~u, ~v], ~x) && Not(LinearMatchQ([~u, ~v], ~x)))
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * (~u) ^ ~(n') * (~v) ^ ~mn)) ^ ~(p'), ~x) => Antiderivative((~A + ~B * log((~e * ExpandToSum(~u, ~x) ^ ~n) / ExpandToSum(~v, ~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~e, ~A, ~B, ~n, ~p], ~x) && (EqQ(~n + ~mn, 0) && (IGtQ(~n, 0) && (LinearQ([~u, ~v], ~x) && Not(LinearMatchQ([~u, ~v], ~x)))))
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))) / (~(f') + ~(g') * ~x), ~x) => (-(log(-((~b * ~c - ~a * ~d)) / (~d * (~a + ~b * ~x)))) * (~A + ~B * log(~e * ((~a + ~b * ~x) / (~c + ~d * ~x)) ^ ~n))) / ~g + ((~B * ~n * (~b * ~c - ~a * ~d)) / ~g) * Antiderivative(log(-((~b * ~c - ~a * ~d)) / (~d * (~a + ~b * ~x))) / ((~a + ~b * ~x) * (~c + ~d * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ(~b * ~f - ~a * ~g, 0))
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)) / (~(f') + ~(g') * ~x), ~x) => (-(log(-((~b * ~c - ~a * ~d)) / (~d * (~a + ~b * ~x)))) * (~A + ~B * log((~e * (~a + ~b * ~x) ^ ~n) / (~c + ~d * ~x) ^ ~n))) / ~g + ((~B * ~n * (~b * ~c - ~a * ~d)) / ~g) * Antiderivative(log(-((~b * ~c - ~a * ~d)) / (~d * (~a + ~b * ~x))) / ((~a + ~b * ~x) * (~c + ~d * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (EqQ(~n + ~mn, 0) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ(~b * ~f - ~a * ~g, 0)))
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))) / (~(f') + ~(g') * ~x), ~x) => (-(log((~b * ~c - ~a * ~d) / (~b * (~c + ~d * ~x)))) * (~A + ~B * log(~e * ((~a + ~b * ~x) / (~c + ~d * ~x)) ^ ~n))) / ~g + ((~B * ~n * (~b * ~c - ~a * ~d)) / ~g) * Antiderivative(log((~b * ~c - ~a * ~d) / (~b * (~c + ~d * ~x))) / ((~a + ~b * ~x) * (~c + ~d * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ(~d * ~f - ~c * ~g, 0))
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)) / (~(f') + ~(g') * ~x), ~x) => (-(log((~b * ~c - ~a * ~d) / (~b * (~c + ~d * ~x)))) * (~A + ~B * log((~e * (~a + ~b * ~x) ^ ~n) / (~c + ~d * ~x) ^ ~n))) / ~g + ((~B * ~n * (~b * ~c - ~a * ~d)) / ~g) * Antiderivative(log((~b * ~c - ~a * ~d) / (~b * (~c + ~d * ~x))) / ((~a + ~b * ~x) * (~c + ~d * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (EqQ(~n + ~mn, 0) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ(~d * ~f - ~c * ~g, 0)))
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))) / (~(f') + ~(g') * ~x), ~x) => ((log(~f + ~g * ~x) * (~A + ~B * log(~e * ((~a + ~b * ~x) / (~c + ~d * ~x)) ^ ~n))) / ~g - ((~b * ~B * ~n) / ~g) * Antiderivative(log(~f + ~g * ~x) / (~a + ~b * ~x), ~x)) + ((~B * ~d * ~n) / ~g) * Antiderivative(log(~f + ~g * ~x) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && NeQ(~b * ~c - ~a * ~d, 0)
    @apply_utils Antiderivative((~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)) / (~(f') + ~(g') * ~x), ~x) => ((log(~f + ~g * ~x) * (~A + ~B * log((~e * (~a + ~b * ~x) ^ ~n) / (~c + ~d * ~x) ^ ~n))) / ~g - ((~b * ~B * ~n) / ~g) * Antiderivative(log(~f + ~g * ~x) / (~a + ~b * ~x), ~x)) + ((~B * ~d * ~n) / ~g) * Antiderivative(log(~f + ~g * ~x) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (EqQ(~n + ~mn, 0) && NeQ(~b * ~c - ~a * ~d, 0))
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))), ~x) => ((~f + ~g * ~x) ^ (~m + 1) * (~A + ~B * log(~e * ((~a + ~b * ~x) / (~c + ~d * ~x)) ^ ~n))) / (~g * (~m + 1)) - ((~B * ~n * (~b * ~c - ~a * ~d)) / (~g * (~m + 1))) * Antiderivative((~f + ~g * ~x) ^ (~m + 1) / ((~a + ~b * ~x) * (~c + ~d * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~m, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ(~m, -1) && NeQ(~m, -2)))
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)), ~x) => ((~f + ~g * ~x) ^ (~m + 1) * (~A + ~B * log((~e * (~a + ~b * ~x) ^ ~n) / (~c + ~d * ~x) ^ ~n))) / (~g * (~m + 1)) - ((~B * ~n * (~b * ~c - ~a * ~d)) / (~g * (~m + 1))) * Antiderivative((~f + ~g * ~x) ^ (~m + 1) / ((~a + ~b * ~x) * (~c + ~d * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~m, ~n], ~x) && (EqQ(~n + ~mn, 0) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ(~m, -1) && Not(EqQ(~m, -2) && IntegerQ(~n)))))
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))) ^ ~(p'), ~x) => (~b * ~c - ~a * ~d) ^ (~m + 1) * (~g / ~b) ^ ~m * Subst(Antiderivative(((~x) ^ ~m * (~A + ~B * log(~e * (~x) ^ ~n)) ^ ~p) / (~b - ~d * ~x) ^ (~m + 2), ~x), ~x, (~a + ~b * ~x) / (~c + ~d * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (IntegersQ(~m, ~p) && (EqQ(~b * ~f - ~a * ~g, 0) && (GtQ(~p, 0) || LtQ(~m, -1)))))
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)) ^ ~(p'), ~x) => (~b * ~c - ~a * ~d) ^ (~m + 1) * (~g / ~b) ^ ~m * Subst(Antiderivative(((~x) ^ ~m * (~A + ~B * log(~e * (~x) ^ ~n)) ^ ~p) / (~b - ~d * ~x) ^ (~m + 2), ~x), ~x, (~a + ~b * ~x) / (~c + ~d * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (EqQ(~n + ~mn, 0) && (IGtQ(~n, 0) && (NeQ(~b * ~c - ~a * ~d, 0) && (IntegersQ(~m, ~p) && (EqQ(~b * ~f - ~a * ~g, 0) && (GtQ(~p, 0) || LtQ(~m, -1)))))))
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))) ^ ~(p'), ~x) => (~b * ~c - ~a * ~d) ^ (~m + 1) * (~g / ~d) ^ ~m * Subst(Antiderivative((~A + ~B * log(~e * (~x) ^ ~n)) ^ ~p / (~b - ~d * ~x) ^ (~m + 2), ~x), ~x, (~a + ~b * ~x) / (~c + ~d * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (IntegersQ(~m, ~p) && (EqQ(~d * ~f - ~c * ~g, 0) && (GtQ(~p, 0) || LtQ(~m, -1)))))
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)) ^ ~(p'), ~x) => (~b * ~c - ~a * ~d) ^ (~m + 1) * (~g / ~d) ^ ~m * Subst(Antiderivative((~A + ~B * log(~e * (~x) ^ ~n)) ^ ~p / (~b - ~d * ~x) ^ (~m + 2), ~x), ~x, (~a + ~b * ~x) / (~c + ~d * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (EqQ(~n + ~mn, 0) && (IGtQ(~n, 0) && (NeQ(~b * ~c - ~a * ~d, 0) && (IntegersQ(~m, ~p) && (EqQ(~d * ~f - ~c * ~g, 0) && (GtQ(~p, 0) || LtQ(~m, -1)))))))
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))) ^ ~(p'), ~x) => (~b * ~c - ~a * ~d) * Subst(Antiderivative((((~b * ~f - ~a * ~g) - (~d * ~f - ~c * ~g) * ~x) ^ ~m * (~A + ~B * log(~e * (~x) ^ ~n)) ^ ~p) / (~b - ~d * ~x) ^ (~m + 2), ~x), ~x, (~a + ~b * ~x) / (~c + ~d * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (IntegerQ(~m) && IGtQ(~p, 0)))
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)) ^ ~(p'), ~x) => (~b * ~c - ~a * ~d) * Subst(Antiderivative((((~b * ~f - ~a * ~g) - (~d * ~f - ~c * ~g) * ~x) ^ ~m * (~A + ~B * log(~e * (~x) ^ ~n)) ^ ~p) / (~b - ~d * ~x) ^ (~m + 2), ~x), ~x, (~a + ~b * ~x) / (~c + ~d * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~n], ~x) && (EqQ(~n + ~mn, 0) && (IGtQ(~n, 0) && (NeQ(~b * ~c - ~a * ~d, 0) && (IntegerQ(~m) && IGtQ(~p, 0)))))
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * ((~(a') + ~(b') * ~x) / (~(c') + ~(d') * ~x)) ^ ~(n'))) ^ ~(p'), ~x) => Unintegrable((~f + ~g * ~x) ^ ~m * (~A + ~B * log(~e * ((~a + ~b * ~x) / (~c + ~d * ~x)) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~m, ~n, ~p], ~x)
    @apply_utils Antiderivative((~(f') + ~(g') * ~x) ^ ~(m') * (~(A') + ~(B') * log(~(e') * (~(a') + ~(b') * ~x) ^ ~(n') * (~(c') + ~(d') * ~x) ^ ~mn)) ^ ~(p'), ~x) => Unintegrable((~f + ~g * ~x) ^ ~m * (~A + ~B * log((~e * (~a + ~b * ~x) ^ ~n) / (~c + ~d * ~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~A, ~B, ~m, ~n, ~p], ~x) && (EqQ(~n + ~mn, 0) && IntegerQ(~n))
    @apply_utils Antiderivative((~w) ^ ~(m') * (~(A') + ~(B') * log(~(e') * (~u / ~v) ^ ~(n'))) ^ ~(p'), ~x) => Antiderivative(ExpandToSum(~w, ~x) ^ ~m * (~A + ~B * log(~e * (ExpandToSum(~u, ~x) / ExpandToSum(~v, ~x)) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~e, ~A, ~B, ~m, ~n, ~p], ~x) && (LinearQ([~u, ~v, ~w], ~x) && Not(LinearMatchQ([~u, ~v, ~w], ~x)))
    @apply_utils Antiderivative((~w) ^ ~(m') * (~(A') + ~(B') * log(~(e') * (~u) ^ ~(n') * (~v) ^ ~mn)) ^ ~(p'), ~x) => Antiderivative(ExpandToSum(~w, ~x) ^ ~m * (~A + ~B * log((~e * ExpandToSum(~u, ~x) ^ ~n) / ExpandToSum(~v, ~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~e, ~A, ~B, ~m, ~n, ~p], ~x) && (EqQ(~n + ~mn, 0) && (IGtQ(~n, 0) && (LinearQ([~u, ~v, ~w], ~x) && Not(LinearMatchQ([~u, ~v, ~w], ~x)))))
end
