int_rules_4_1_0_3 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 4.1.0.3*(a*csc)^m*(b*sec)^n =#
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~a * ~b * (~a * csc(~e + ~f * ~x)) ^ (~m - 1) * (~b * sec(~e + ~f * ~x)) ^ (~n - 1)) / (~f * (~n - 1)) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x) && (EqQ((~m + ~n) - 2, 0) && NeQ(~n, 1))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) ^ ~(m') * sec(~(e') + ~(f') * ~x) ^ ~(n'), ~x) => (1 / ~f) * Subst(Antiderivative((1 + (~x) ^ 2) ^ ((~m + ~n) / 2 - 1) / (~x) ^ ~m, ~x), ~x, tan(~e + ~f * ~x)) <-- FreeQ([~e, ~f], ~x) && IntegersQ(~m, ~n, (~m + ~n) / 2)
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~m * sec(~(e') + ~(f') * ~x) ^ ~(n'), ~x) => (-1 / (~f * (~a) ^ ~n)) * Subst(Antiderivative((~x) ^ ((~m + ~n) - 1) / (-1 + (~x) ^ 2 / (~a) ^ 2) ^ ((~n + 1) / 2), ~x), ~x, ~a * csc(~e + ~f * ~x)) <-- FreeQ([~a, ~e, ~f, ~m], ~x) && (IntegerQ((~n + 1) / 2) && Not(IntegerQ((~m + 1) / 2) && LtQ(0, ~m, ~n)))
    @apply_utils Antiderivative((~(a') * sec(~(e') + ~(f') * ~x)) ^ ~m * csc(~(e') + ~(f') * ~x) ^ ~(n'), ~x) => (1 / (~f * (~a) ^ ~n)) * Subst(Antiderivative((~x) ^ ((~m + ~n) - 1) / (-1 + (~x) ^ 2 / (~a) ^ 2) ^ ((~n + 1) / 2), ~x), ~x, ~a * sec(~e + ~f * ~x)) <-- FreeQ([~a, ~e, ~f, ~m], ~x) && (IntegerQ((~n + 1) / 2) && Not(IntegerQ((~m + 1) / 2) && LtQ(0, ~m, ~n)))
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (-(~a) * (~a * csc(~e + ~f * ~x)) ^ (~m - 1) * (~b * sec(~e + ~f * ~x)) ^ (~n + 1)) / (~f * ~b * (~m - 1)) + (((~a) ^ 2 * (~n + 1)) / ((~b) ^ 2 * (~m - 1))) * Antiderivative((~a * csc(~e + ~f * ~x)) ^ (~m - 2) * (~b * sec(~e + ~f * ~x)) ^ (~n + 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f], ~x) && (GtQ(~m, 1) && (LtQ(~n, -1) && IntegersQ(2 * ~m, 2 * ~n)))
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~b * (~a * csc(~e + ~f * ~x)) ^ (~m + 1) * (~b * sec(~e + ~f * ~x)) ^ (~n - 1)) / (~f * ~a * (~n - 1)) + (((~b) ^ 2 * (~m + 1)) / ((~a) ^ 2 * (~n - 1))) * Antiderivative((~a * csc(~e + ~f * ~x)) ^ (~m + 2) * (~b * sec(~e + ~f * ~x)) ^ (~n - 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f], ~x) && (GtQ(~n, 1) && (LtQ(~m, -1) && IntegersQ(2 * ~m, 2 * ~n)))
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (-(~a) * ~b * (~a * csc(~e + ~f * ~x)) ^ (~m - 1) * (~b * sec(~e + ~f * ~x)) ^ (~n - 1)) / (~f * (~m - 1)) + (((~a) ^ 2 * ((~m + ~n) - 2)) / (~m - 1)) * Antiderivative((~a * csc(~e + ~f * ~x)) ^ (~m - 2) * (~b * sec(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~n], ~x) && (GtQ(~m, 1) && (IntegersQ(2 * ~m, 2 * ~n) && Not(GtQ(~n, ~m))))
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~(m') * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~a * ~b * (~a * csc(~e + ~f * ~x)) ^ (~m - 1) * (~b * sec(~e + ~f * ~x)) ^ (~n - 1)) / (~f * (~n - 1)) + (((~b) ^ 2 * ((~m + ~n) - 2)) / (~n - 1)) * Antiderivative((~a * csc(~e + ~f * ~x)) ^ ~m * (~b * sec(~e + ~f * ~x)) ^ (~n - 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~m], ~x) && (GtQ(~n, 1) && IntegersQ(2 * ~m, 2 * ~n))
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (~b * (~a * csc(~e + ~f * ~x)) ^ (~m + 1) * (~b * sec(~e + ~f * ~x)) ^ (~n - 1)) / (~a * ~f * (~m + ~n)) + ((~m + 1) / ((~a) ^ 2 * (~m + ~n))) * Antiderivative((~a * csc(~e + ~f * ~x)) ^ (~m + 2) * (~b * sec(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~n], ~x) && (LtQ(~m, -1) && (NeQ(~m + ~n, 0) && IntegersQ(2 * ~m, 2 * ~n)))
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~(m') * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (-(~a) * (~a * csc(~e + ~f * ~x)) ^ (~m - 1) * (~b * sec(~e + ~f * ~x)) ^ (~n + 1)) / (~b * ~f * (~m + ~n)) + ((~n + 1) / ((~b) ^ 2 * (~m + ~n))) * Antiderivative((~a * csc(~e + ~f * ~x)) ^ ~m * (~b * sec(~e + ~f * ~x)) ^ (~n + 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~m], ~x) && (LtQ(~n, -1) && (NeQ(~m + ~n, 0) && IntegersQ(2 * ~m, 2 * ~n)))
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((~a * csc(~e + ~f * ~x)) ^ ~m * (~b * sec(~e + ~f * ~x)) ^ ~n) / tan(~e + ~f * ~x) ^ ~n) * Antiderivative(tan(~e + ~f * ~x) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x) && (Not(IntegerQ(~n)) && EqQ(~m + ~n, 0))
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~a * csc(~e + ~f * ~x)) ^ ~m * (~b * sec(~e + ~f * ~x)) ^ ~n * (~a * sin(~e + ~f * ~x)) ^ ~m * (~b * cos(~e + ~f * ~x)) ^ ~n * Antiderivative((~a * sin(~e + ~f * ~x)) ^ -(~m) * (~b * cos(~e + ~f * ~x)) ^ -(~n), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x) && (IntegerQ(~m - 1 / 2) && IntegerQ(~n - 1 / 2))
    @apply_utils Antiderivative((~(a') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~a) ^ 2 / (~b) ^ 2) * (~a * csc(~e + ~f * ~x)) ^ (~m - 1) * (~b * sec(~e + ~f * ~x)) ^ (~n + 1) * (~a * sin(~e + ~f * ~x)) ^ (~m - 1) * (~b * cos(~e + ~f * ~x)) ^ (~n + 1) * Antiderivative((~a * sin(~e + ~f * ~x)) ^ -(~m) * (~b * cos(~e + ~f * ~x)) ^ -(~n), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x) && Not(SimplerQ(-(~m), -(~n)))
    @apply_utils Antiderivative((~(a') * sec(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~a) ^ 2 / (~b) ^ 2) * (~a * sec(~e + ~f * ~x)) ^ (~m - 1) * (~b * csc(~e + ~f * ~x)) ^ (~n + 1) * (~a * cos(~e + ~f * ~x)) ^ (~m - 1) * (~b * sin(~e + ~f * ~x)) ^ (~n + 1) * Antiderivative((~a * cos(~e + ~f * ~x)) ^ -(~m) * (~b * sin(~e + ~f * ~x)) ^ -(~n), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x)
end
