int_rules_4_3_10 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 4.3.10*(c+d*x)^m*(a+b*tan)^n =#
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * tan(~(e') + ~(k') * pi + ~(f') * Complex(0, ~fz) * ~x), ~x) => (-im * (~c + ~d * ~x) ^ (~m + 1)) / (~d * (~m + 1)) + 2 * im * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ (-2 * im * ~k * pi) * ℯ ^ (2 * (-im * ~e + ~f * ~fz * ~x))) / (1 + ℯ ^ (-2 * im * ~k * pi) * ℯ ^ (2 * (-im * ~e + ~f * ~fz * ~x))), ~x) <-- FreeQ([~c, ~d, ~e, ~f, ~fz], ~x) && (IntegerQ(4 * ~k) && IGtQ(~m, 0))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * tan(~(e') + ~(k') * pi + ~(f') * ~x), ~x) => (im * (~c + ~d * ~x) ^ (~m + 1)) / (~d * (~m + 1)) - 2 * im * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ (2 * im * ~k * pi) * ℯ ^ (2 * im * (~e + ~f * ~x))) / (1 + ℯ ^ (2 * im * ~k * pi) * ℯ ^ (2 * im * (~e + ~f * ~x))), ~x) <-- FreeQ([~c, ~d, ~e, ~f], ~x) && (IntegerQ(4 * ~k) && IGtQ(~m, 0))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * tan(~(e') + ~(f') * Complex(0, ~fz) * ~x), ~x) => (-im * (~c + ~d * ~x) ^ (~m + 1)) / (~d * (~m + 1)) + 2 * im * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ (2 * (-im * ~e + ~f * ~fz * ~x))) / (1 + ℯ ^ (2 * (-im * ~e + ~f * ~fz * ~x))), ~x) <-- FreeQ([~c, ~d, ~e, ~f, ~fz], ~x) && IGtQ(~m, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * tan(~(e') + ~(f') * ~x), ~x) => (im * (~c + ~d * ~x) ^ (~m + 1)) / (~d * (~m + 1)) - 2 * im * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ (2 * im * (~e + ~f * ~x))) / (1 + ℯ ^ (2 * im * (~e + ~f * ~x))), ~x) <-- FreeQ([~c, ~d, ~e, ~f], ~x) && IGtQ(~m, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~(b') * tan(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~b * (~c + ~d * ~x) ^ ~m * (~b * tan(~e + ~f * ~x)) ^ (~n - 1)) / (~f * (~n - 1)) - ((~b * ~d * ~m) / (~f * (~n - 1))) * Antiderivative((~c + ~d * ~x) ^ (~m - 1) * (~b * tan(~e + ~f * ~x)) ^ (~n - 1), ~x)) - (~b) ^ 2 * Antiderivative((~c + ~d * ~x) ^ ~m * (~b * tan(~e + ~f * ~x)) ^ (~n - 2), ~x) <-- FreeQ([~b, ~c, ~d, ~e, ~f], ~x) && (GtQ(~n, 1) && GtQ(~m, 0))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~(b') * tan(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((~c + ~d * ~x) ^ ~m * (~b * tan(~e + ~f * ~x)) ^ (~n + 1)) / (~b * ~f * (~n + 1)) - ((~d * ~m) / (~b * ~f * (~n + 1))) * Antiderivative((~c + ~d * ~x) ^ (~m - 1) * (~b * tan(~e + ~f * ~x)) ^ (~n + 1), ~x)) - (1 / (~b) ^ 2) * Antiderivative((~c + ~d * ~x) ^ ~m * (~b * tan(~e + ~f * ~x)) ^ (~n + 2), ~x) <-- FreeQ([~b, ~c, ~d, ~e, ~f], ~x) && (LtQ(~n, -1) && GtQ(~m, 0))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~a + ~(b') * tan(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => Antiderivative(ExpandIntegrand((~c + ~d * ~x) ^ ~m, (~a + ~b * tan(~e + ~f * ~x)) ^ ~n, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (IGtQ(~m, 0) && IGtQ(~n, 0))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') / (~a + ~(b') * tan(~(e') + ~(f') * ~x)), ~x) => ((~c + ~d * ~x) ^ (~m + 1) / (2 * ~a * ~d * (~m + 1)) - (~a * (~c + ~d * ~x) ^ ~m) / (2 * ~b * ~f * (~a + ~b * tan(~e + ~f * ~x)))) + ((~a * ~d * ~m) / (2 * ~b * ~f)) * Antiderivative((~c + ~d * ~x) ^ (~m - 1) / (~a + ~b * tan(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~a) ^ 2 + (~b) ^ 2, 0) && GtQ(~m, 0))
    @apply_utils Antiderivative(1 / ((~(c') + ~(d') * ~x) ^ 2 * (~a + ~(b') * tan(~(e') + ~(f') * ~x))), ~x) => (-1 / (~d * (~c + ~d * ~x) * (~a + ~b * tan(~e + ~f * ~x))) + (~f / (~b * ~d)) * Antiderivative(cos(2 * ~e + 2 * ~f * ~x) / (~c + ~d * ~x), ~x)) - (~f / (~a * ~d)) * Antiderivative(sin(2 * ~e + 2 * ~f * ~x) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && EqQ((~a) ^ 2 + (~b) ^ 2, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~m / (~a + ~(b') * tan(~(e') + ~(f') * ~x)), ~x) => (~f * (~c + ~d * ~x) ^ (~m + 2)) / (~b * (~d) ^ 2 * (~m + 1) * (~m + 2)) + (~c + ~d * ~x) ^ (~m + 1) / (~d * (~m + 1) * (~a + ~b * tan(~e + ~f * ~x))) + ((2 * ~b * ~f) / (~a * ~d * (~m + 1))) * Antiderivative((~c + ~d * ~x) ^ (~m + 1) / (~a + ~b * tan(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~a) ^ 2 + (~b) ^ 2, 0) && (LtQ(~m, -1) && NeQ(~m, -2)))
    #= Antiderivative(((~c')+(~d')*(~x))^(~m)/((~a)+(~b')*tan((~e')+(~f')*(~x))),~x) :=  (c+d*x)^(m+1)/(d*(m+1)*(a+b*tan(e+f*x))) + f/(b*d*(m+1))*Antiderivative((c+d*x)^(m+1),x) + 2*b*f/(a*d*(m+1))*Antiderivative((c+d*x)^(m+1)/(a+b*tan(e+f*x)),x) <--  FreeQ([a,b,c,d,e,f],x) && EqQ(a^2+b^2,0) && LtQ(m,-1) =#
    @apply_utils Antiderivative(1 / ((~(c') + ~(d') * ~x) * (~a + ~(b') * tan(~(e') + ~(f') * ~x))), ~x) => log(~c + ~d * ~x) / (2 * ~a * ~d) + (1 / (2 * ~a)) * Antiderivative(cos(2 * ~e + 2 * ~f * ~x) / (~c + ~d * ~x), ~x) + (1 / (2 * ~b)) * Antiderivative(sin(2 * ~e + 2 * ~f * ~x) / (~c + ~d * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && EqQ((~a) ^ 2 + (~b) ^ 2, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~m / (~a + ~(b') * tan(~(e') + ~(f') * ~x)), ~x) => (~c + ~d * ~x) ^ (~m + 1) / (2 * ~a * ~d * (~m + 1)) + (1 / (2 * ~a)) * Antiderivative((~c + ~d * ~x) ^ ~m * ℯ ^ (((2 * ~a) / ~b) * (~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~a) ^ 2 + (~b) ^ 2, 0) && Not(IntegerQ(~m)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~m * (~a + ~(b') * tan(~(e') + ~(f') * ~x)) ^ ~n, ~x) => Antiderivative(ExpandIntegrand((~c + ~d * ~x) ^ ~m, (1 / (2 * ~a) + cos(2 * ~e + 2 * ~f * ~x) / (2 * ~a) + sin(2 * ~e + 2 * ~f * ~x) / (2 * ~b)) ^ -(~n), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~a) ^ 2 + (~b) ^ 2, 0) && (ILtQ(~m, 0) && ILtQ(~n, 0)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~m * (~a + ~(b') * tan(~(e') + ~(f') * ~x)) ^ ~n, ~x) => Antiderivative(ExpandIntegrand((~c + ~d * ~x) ^ ~m, (1 / (2 * ~a) + ℯ ^ (((2 * ~a) / ~b) * (~e + ~f * ~x)) / (2 * ~a)) ^ -(~n), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~a) ^ 2 + (~b) ^ 2, 0) && ILtQ(~n, 0))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~a + ~(b') * tan(~(e') + ~(f') * ~x)) ^ ~n, ~x) => With([u = IntHide((~a + ~b * tan(~e + ~f * ~x)) ^ ~n, ~x)], Dist((~c + ~d * ~x) ^ ~m, u, ~x) - ~d * ~m * Antiderivative(Dist((~c + ~d * ~x) ^ (~m - 1), u, ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~a) ^ 2 + (~b) ^ 2, 0) && (ILtQ(~n, -1) && GtQ(~m, 0)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') / (~a + ~(b') * tan(~(e') + ~(k') * pi + ~(f') * ~x)), ~x) => (~c + ~d * ~x) ^ (~m + 1) / (~d * (~m + 1) * (~a + im * ~b)) + 2 * im * ~b * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ (2 * im * ~k * pi) * ℯ ^ Simp(2 * im * (~e + ~f * ~x), ~x)) / ((~a + im * ~b) ^ 2 + ((~a) ^ 2 + (~b) ^ 2) * ℯ ^ (2 * im * ~k * pi) * ℯ ^ Simp(2 * im * (~e + ~f * ~x), ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (IntegerQ(4 * ~k) && (NeQ((~a) ^ 2 + (~b) ^ 2, 0) && IGtQ(~m, 0)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') / (~a + ~(b') * tan(~(e') + ~(f') * ~x)), ~x) => (~c + ~d * ~x) ^ (~m + 1) / (~d * (~m + 1) * (~a + im * ~b)) + 2 * im * ~b * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ Simp(2 * im * (~e + ~f * ~x), ~x)) / ((~a + im * ~b) ^ 2 + ((~a) ^ 2 + (~b) ^ 2) * ℯ ^ Simp(2 * im * (~e + ~f * ~x), ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ((~a) ^ 2 + (~b) ^ 2, 0) && IGtQ(~m, 0))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) / (~a + ~(b') * tan(~(e') + ~(f') * ~x)) ^ 2, ~x) => (-((~c + ~d * ~x) ^ 2) / (2 * ~d * ((~a) ^ 2 + (~b) ^ 2)) - (~b * (~c + ~d * ~x)) / (~f * ((~a) ^ 2 + (~b) ^ 2) * (~a + ~b * tan(~e + ~f * ~x)))) + (1 / (~f * ((~a) ^ 2 + (~b) ^ 2))) * Antiderivative((~b * ~d + 2 * ~a * ~c * ~f + 2 * ~a * ~d * ~f * ~x) / (~a + ~b * tan(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && NeQ((~a) ^ 2 + (~b) ^ 2, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~a + ~(b') * tan(~(e') + ~(f') * ~x)) ^ ~n, ~x) => Antiderivative(ExpandIntegrand((~c + ~d * ~x) ^ ~m, (1 / (~a - im * ~b) - (2 * im * ~b) / ((~a) ^ 2 + (~b) ^ 2 + (~a - im * ~b) ^ 2 * ℯ ^ (2 * im * (~e + ~f * ~x)))) ^ -(~n), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ((~a) ^ 2 + (~b) ^ 2, 0) && (ILtQ(~n, 0) && IGtQ(~m, 0)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) * sqrt(~a + ~(b') * tan(~(e') + ~(f') * ~x)), ~x) => (-(sqrt(2)) * ~b * (~c + ~d * ~x) * atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / (sqrt(2) * Rt(~a, 2)))) / (Rt(~a, 2) * ~f) + ((sqrt(2) * ~b * ~d) / (Rt(~a, 2) * ~f)) * Antiderivative(atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / (sqrt(2) * Rt(~a, 2))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && EqQ((~a) ^ 2 + (~b) ^ 2, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) * sqrt(~(a') + ~(b') * tan(~(e') + ~(f') * ~x)), ~x) => (((-im * Rt(~a - im * ~b, 2) * (~c + ~d * ~x)) / ~f) * atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / Rt(~a - im * ~b, 2)) + ((im * Rt(~a + im * ~b, 2) * (~c + ~d * ~x)) / ~f) * atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / Rt(~a + im * ~b, 2)) + ((im * ~d * Rt(~a - im * ~b, 2)) / ~f) * Antiderivative(atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / Rt(~a - im * ~b, 2)), ~x)) - ((im * ~d * Rt(~a + im * ~b, 2)) / ~f) * Antiderivative(atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / Rt(~a + im * ~b, 2)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && NeQ((~a) ^ 2 + (~b) ^ 2, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) / sqrt(~a + ~(b') * tan(~(e') + ~(f') * ~x)), ~x) => (1 / (2 * ~a)) * Antiderivative((~c + ~d * ~x) * sqrt(~a + ~b * tan(~e + ~f * ~x)), ~x) + (~a / 2) * Antiderivative(((~c + ~d * ~x) * sec(~e + ~f * ~x) ^ 2) / (~a + ~b * tan(~e + ~f * ~x)) ^ (3 / 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && EqQ((~a) ^ 2 + (~b) ^ 2, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) / sqrt(~(a') + ~(b') * tan(~(e') + ~(f') * ~x)), ~x) => (((-im * (~c + ~d * ~x)) / (~f * Rt(~a - im * ~b, 2))) * atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / Rt(~a - im * ~b, 2)) + ((im * (~c + ~d * ~x)) / (~f * Rt(~a + im * ~b, 2))) * atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / Rt(~a + im * ~b, 2)) + ((im * ~d) / (~f * Rt(~a - im * ~b, 2))) * Antiderivative(atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / Rt(~a - im * ~b, 2)), ~x)) - ((im * ~d) / (~f * Rt(~a + im * ~b, 2))) * Antiderivative(atanh(sqrt(~a + ~b * tan(~e + ~f * ~x)) / Rt(~a + im * ~b, 2)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && NeQ((~a) ^ 2 + (~b) ^ 2, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * tan(~(e') + ~(f') * ~x) ^ ~(n'), ~x) => If(MatchQ(~f, ~(f1') * Complex(0, ~j)), If(MatchQ(~e, ~(e1') + pi / 2), im ^ ~n * Unintegrable((~c + ~d * ~x) ^ ~m * coth(-im * (~e - pi / 2) - im * ~f * ~x) ^ ~n, ~x), im ^ ~n * Unintegrable((~c + ~d * ~x) ^ ~m * tanh(-im * ~e - im * ~f * ~x) ^ ~n, ~x)), If(MatchQ(~e, ~(e1') + pi / 2), (-1) ^ ~n * Unintegrable((~c + ~d * ~x) ^ ~m * cot((~e - pi / 2) + ~f * ~x) ^ ~n, ~x), Unintegrable((~c + ~d * ~x) ^ ~m * tan(~e + ~f * ~x) ^ ~n, ~x))) <-- FreeQ([~c, ~d, ~e, ~f, ~m, ~n], ~x) && IntegerQ(~n)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~(a') + ~(b') * tan(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => Unintegrable((~c + ~d * ~x) ^ ~m * (~a + ~b * tan(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n], ~x)
    @apply_utils Antiderivative((~u) ^ ~(m') * (~(a') + ~(b') * tan(~v)) ^ ~(n'), ~x) => Antiderivative(ExpandToSum(~u, ~x) ^ ~m * (~a + ~b * tan(ExpandToSum(~v, ~x))) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~m, ~n], ~x) && (LinearQ([~u, ~v], ~x) && Not(LinearMatchQ([~u, ~v], ~x)))
    @apply_utils Antiderivative((~u) ^ ~(m') * (~(a') + ~(b') * cot(~v)) ^ ~(n'), ~x) => Antiderivative(ExpandToSum(~u, ~x) ^ ~m * (~a + ~b * cot(ExpandToSum(~v, ~x))) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~m, ~n], ~x) && (LinearQ([~u, ~v], ~x) && Not(LinearMatchQ([~u, ~v], ~x)))
end
