int_rules_4_5_2_2 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 4.5.2.2*(g*sec)^p*(a+b*sec)^m*(c+d*sec)^n =#
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (~b * cot(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ ~n) / (~a * ~f * (2 * ~m + 1)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (EqQ(~m + ~n + 1, 0) && NeQ(2 * ~m + 1, 0))))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (~b * cot(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ ~n) / (~a * ~f * (2 * ~m + 1)) + ((~m + ~n + 1) / (~a * (2 * ~m + 1))) * Antiderivative(csc(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * csc(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (ILtQ(~m + ~n + 1, 0) && (NeQ(2 * ~m + 1, 0) && (Not(LtQ(~n, 0)) && Not(IGtQ(~n + 1 / 2, 0) && LtQ(~n + 1 / 2, -((~m + ~n)))))))))
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * sqrt(~c + ~(d') * csc(~(e') + ~(f') * ~x))) / sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)), ~x) => (~a * ~c * log(1 + (~b / ~a) * csc(~e + ~f * ~x)) * cot(~e + ~f * ~x)) / (~b * ~f * sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~(m') * sqrt(~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => (2 * ~a * ~c * cot(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m) / (~b * ~f * (2 * ~m + 1) * sqrt(~c + ~d * csc(~e + ~f * ~x))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ(~m, -1 / 2)))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (2 * ~a * ~c * cot(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - 1)) / (~b * ~f * (2 * ~m + 1)) - ((~d * (2 * ~n - 1)) / (~b * (2 * ~m + 1))) * Antiderivative(csc(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (IGtQ(~n - 1 / 2, 0) && LtQ(~m, -1 / 2))))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~(m') * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (-(~d) * cot(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - 1)) / (~f * (~m + ~n)) + ((~c * (2 * ~n - 1)) / (~m + ~n)) * Antiderivative(csc(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (IGtQ(~n - 1 / 2, 0) && (Not(LtQ(~m, -1 / 2)) && Not(IGtQ(~m - 1 / 2, 0) && LtQ(~m, ~n))))))
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~(n')) / sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)), ~x) => (-2 * ~d * cot(~e + ~f * ~x) * (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - 1)) / (~f * (2 * ~n - 1) * sqrt(~a + ~b * csc(~e + ~f * ~x))) + ((2 * ~c * (2 * ~n - 1)) / (2 * ~n - 1)) * Antiderivative((csc(~e + ~f * ~x) * (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - 1)) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && IGtQ(~n, 0)))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (2 * ~a * ~c * cot(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - 1)) / (~b * ~f * (2 * ~m + 1)) - ((~d * (2 * ~n - 1)) / (~b * (2 * ~m + 1))) * Antiderivative(csc(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (IGtQ(~n, 0) && (LtQ(~m, -1 / 2) && IntegerQ(2 * ~m)))))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~(m') * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (-(~a) * ~c) ^ ~m * Antiderivative(ExpandTrig(csc(~e + ~f * ~x) * cot(~e + ~f * ~x) ^ (2 * ~m), (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - ~m), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (IntegersQ(~m, ~n) && (GeQ(~n - ~m, 0) && GtQ(~m * ~n, 0)))))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~m, ~x) => (((-(~a) * ~c) ^ (~m + 1 / 2) * cot(~e + ~f * ~x)) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x)))) * Antiderivative(csc(~e + ~f * ~x) * cot(~e + ~f * ~x) ^ (2 * ~m), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && IntegerQ(~m + 1 / 2)))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~b * cot(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ ~n) / (~a * ~f * (2 * ~m + 1)) + ((~m + ~n + 1) / (~a * (2 * ~m + 1))) * Antiderivative(csc(~e + ~f * ~x) * (~a + ~b * csc(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * csc(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (ILtQ(~m, 0) && ILtQ(~n - 1 / 2, 0) || ILtQ(~m - 1 / 2, 0) && (ILtQ(~n - 1 / 2, 0) && LtQ(~m, ~n)))))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~(m') * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~a * ~c * cot(~e + ~f * ~x)) / (~f * sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x)))) * Subst(Antiderivative((~a + ~b * ~x) ^ (~m - 1 / 2) * (~c + ~d * ~x) ^ (~n - 1 / 2), ~x), ~x, csc(~e + ~f * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ ~(p') * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~(m') * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (-(~a) * ~c) ^ ~m * Antiderivative(ExpandTrig((~g * csc(~e + ~f * ~x)) ^ ~p * cot(~e + ~f * ~x) ^ (2 * ~m), (~c + ~d * csc(~e + ~f * ~x)) ^ (~n - ~m), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~n, ~p], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (IntegersQ(~m, ~n) && (GeQ(~n - ~m, 0) && GtQ(~m * ~n, 0)))))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ ~(p') * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~m, ~x) => (((-(~a) * ~c) ^ (~m + 1 / 2) * cot(~e + ~f * ~x)) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x)))) * Antiderivative((~g * csc(~e + ~f * ~x)) ^ ~p * cot(~e + ~f * ~x) ^ (2 * ~m), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~p], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && IntegerQ(~m + 1 / 2)))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ ~(p') * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~a * ~c * ~g * cot(~e + ~f * ~x)) / (~f * sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x)))) * Subst(Antiderivative((~g * ~x) ^ (~p - 1) * (~a + ~b * ~x) ^ (~m - 1 / 2) * (~c + ~d * ~x) ^ (~n - 1 / 2), ~x), ~x, csc(~e + ~f * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~p], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((sqrt(~(g') * csc(~(e') + ~(f') * ~x)) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / (~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => ((-2 * ~b * ~g) / ~f) * Subst(Antiderivative(1 / ((~b * ~c + ~a * ~d) - ~c * ~g * (~x) ^ 2), ~x), ~x, (~b * cot(~e + ~f * ~x)) / (sqrt(~g * csc(~e + ~f * ~x)) * sqrt(~a + ~b * csc(~e + ~f * ~x)))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((sqrt(~(g') * csc(~(e') + ~(f') * ~x)) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / (~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => (~a / ~c) * Antiderivative(sqrt(~g * csc(~e + ~f * ~x)) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) + ((~b * ~c - ~a * ~d) / (~c * ~g)) * Antiderivative((~g * csc(~e + ~f * ~x)) ^ (3 / 2) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * (~c + ~d * csc(~e + ~f * ~x))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && NeQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / (~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => ((-2 * ~b) / ~f) * Subst(Antiderivative(1 / (~b * ~c + ~a * ~d + ~d * (~x) ^ 2), ~x), ~x, (~b * cot(~e + ~f * ~x)) / sqrt(~a + ~b * csc(~e + ~f * ~x))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / (~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => ((-(sqrt(~a + ~b * csc(~e + ~f * ~x))) * sqrt(~c / (~c + ~d * csc(~e + ~f * ~x)))) / (~d * ~f * sqrt((~c * ~d * (~a + ~b * csc(~e + ~f * ~x))) / ((~b * ~c + ~a * ~d) * (~c + ~d * csc(~e + ~f * ~x)))))) * Elliptic.E(asin((~c * cot(~e + ~f * ~x)) / (~c + ~d * csc(~e + ~f * ~x))), -((~b * ~c - ~a * ~d)) / (~b * ~c + ~a * ~d)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && EqQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / (~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => (~b / ~d) * Antiderivative(csc(~e + ~f * ~x) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) - ((~b * ~c - ~a * ~d) / ~d) * Antiderivative(csc(~e + ~f * ~x) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * (~c + ~d * csc(~e + ~f * ~x))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative(((~(g') * csc(~(e') + ~(f') * ~x)) ^ (3 / 2) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / (~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => (~g / ~d) * Antiderivative(sqrt(~g * csc(~e + ~f * ~x)) * sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) - ((~c * ~g) / ~d) * Antiderivative((sqrt(~g * csc(~e + ~f * ~x)) * sqrt(~a + ~b * csc(~e + ~f * ~x))) / (~c + ~d * csc(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative(((~(g') * csc(~(e') + ~(f') * ~x)) ^ (3 / 2) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / (~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => (~b / ~d) * Antiderivative((~g * csc(~e + ~f * ~x)) ^ (3 / 2) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) - ((~b * ~c - ~a * ~d) / ~d) * Antiderivative((~g * csc(~e + ~f * ~x)) ^ (3 / 2) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * (~c + ~d * csc(~e + ~f * ~x))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && NeQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * (~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => (~b / (~b * ~c - ~a * ~d)) * Antiderivative(csc(~e + ~f * ~x) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) - (~d / (~b * ~c - ~a * ~d)) * Antiderivative((csc(~e + ~f * ~x) * sqrt(~a + ~b * csc(~e + ~f * ~x))) / (~c + ~d * csc(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) || EqQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * (~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => ((-2 * cot(~e + ~f * ~x)) / (~f * (~c + ~d) * sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(-(cot(~e + ~f * ~x) ^ 2)))) * sqrt((~a + ~b * csc(~e + ~f * ~x)) / (~a + ~b)) * Elliptic.Pi((2 * ~d) / (~c + ~d), asin(sqrt(1 - csc(~e + ~f * ~x)) / sqrt(2)), (2 * ~b) / (~a + ~b)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ (3 / 2) / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * (~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => ((-(~a) * ~g) / (~b * ~c - ~a * ~d)) * Antiderivative(sqrt(~g * csc(~e + ~f * ~x)) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) + ((~c * ~g) / (~b * ~c - ~a * ~d)) * Antiderivative((sqrt(~g * csc(~e + ~f * ~x)) * sqrt(~a + ~b * csc(~e + ~f * ~x))) / (~c + ~d * csc(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ (3 / 2) / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * (~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => ((~g * sqrt(~g * csc(~e + ~f * ~x)) * sqrt(~b + ~a * sin(~e + ~f * ~x))) / sqrt(~a + ~b * csc(~e + ~f * ~x))) * Antiderivative(1 / (sqrt(~b + ~a * sin(~e + ~f * ~x)) * (~d + ~c * sin(~e + ~f * ~x))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && NeQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) ^ 2 / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * (~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => (-(~a) / (~b * ~c - ~a * ~d)) * Antiderivative(csc(~e + ~f * ~x) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) + (~c / (~b * ~c - ~a * ~d)) * Antiderivative((csc(~e + ~f * ~x) * sqrt(~a + ~b * csc(~e + ~f * ~x))) / (~c + ~d * csc(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) || EqQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) ^ 2 / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * (~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => (1 / ~d) * Antiderivative(csc(~e + ~f * ~x) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) - (~c / ~d) * Antiderivative(csc(~e + ~f * ~x) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * (~c + ~d * csc(~e + ~f * ~x))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ (5 / 2) / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * (~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => ((-((~c) ^ 2) * (~g) ^ 2) / (~d * (~b * ~c - ~a * ~d))) * Antiderivative((sqrt(~g * csc(~e + ~f * ~x)) * sqrt(~a + ~b * csc(~e + ~f * ~x))) / (~c + ~d * csc(~e + ~f * ~x)), ~x) + ((~g) ^ 2 / (~d * (~b * ~c - ~a * ~d))) * Antiderivative((sqrt(~g * csc(~e + ~f * ~x)) * (~a * ~c + (~b * ~c - ~a * ~d) * csc(~e + ~f * ~x))) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ (5 / 2) / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * (~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => (~g / ~d) * Antiderivative((~g * csc(~e + ~f * ~x)) ^ (3 / 2) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) - ((~c * ~g) / ~d) * Antiderivative((~g * csc(~e + ~f * ~x)) ^ (3 / 2) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * (~c + ~d * csc(~e + ~f * ~x))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && NeQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / sqrt(~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => ((-2 * ~b) / ~f) * Subst(Antiderivative(1 / (1 - ~b * ~d * (~x) ^ 2), ~x), ~x, cot(~e + ~f * ~x) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x)))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / sqrt(~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => (-((~b * ~c - ~a * ~d)) / ~d) * Antiderivative(csc(~e + ~f * ~x) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x))), ~x) + (~b / ~d) * Antiderivative((csc(~e + ~f * ~x) * sqrt(~c + ~d * csc(~e + ~f * ~x))) / sqrt(~a + ~b * csc(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && EqQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / sqrt(~c + ~(d') * csc(~(e') + ~(f') * ~x)), ~x) => ((-2 * (~a + ~b * csc(~e + ~f * ~x))) / (~d * ~f * sqrt((~a + ~b) / (~c + ~d)) * cot(~e + ~f * ~x))) * sqrt((-((~b * ~c - ~a * ~d)) * (1 - csc(~e + ~f * ~x))) / ((~c + ~d) * (~a + ~b * csc(~e + ~f * ~x)))) * sqrt(((~b * ~c - ~a * ~d) * (1 + csc(~e + ~f * ~x))) / ((~c - ~d) * (~a + ~b * csc(~e + ~f * ~x)))) * Elliptic.Pi((~b * (~c + ~d)) / (~d * (~a + ~b)), asin((sqrt((~a + ~b) / (~c + ~d)) * sqrt(~c + ~d * csc(~e + ~f * ~x))) / sqrt(~a + ~b * csc(~e + ~f * ~x))), ((~a - ~b) * (~c + ~d)) / ((~a + ~b) * (~c - ~d))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * sqrt(~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => ((-2 * ~a) / (~b * ~f)) * Subst(Antiderivative(1 / (2 + (~a * ~c - ~b * ~d) * (~x) ^ 2), ~x), ~x, cot(~e + ~f * ~x) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x)))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * sqrt(~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => ((-2 * (~c + ~d * csc(~e + ~f * ~x))) / (~f * (~b * ~c - ~a * ~d) * Rt((~c + ~d) / (~a + ~b), 2) * cot(~e + ~f * ~x))) * sqrt(((~b * ~c - ~a * ~d) * (1 - csc(~e + ~f * ~x))) / ((~a + ~b) * (~c + ~d * csc(~e + ~f * ~x)))) * sqrt((-((~b * ~c - ~a * ~d)) * (1 + csc(~e + ~f * ~x))) / ((~a - ~b) * (~c + ~d * csc(~e + ~f * ~x)))) * Elliptic.F(asin(Rt((~c + ~d) / (~a + ~b), 2) * (sqrt(~a + ~b * csc(~e + ~f * ~x)) / sqrt(~c + ~d * csc(~e + ~f * ~x)))), ((~a + ~b) * (~c - ~d)) / ((~a - ~b) * (~c + ~d))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) ^ 2 / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * sqrt(~c + ~(d') * csc(~(e') + ~(f') * ~x))), ~x) => (-(~a) / ~b) * Antiderivative(csc(~e + ~f * ~x) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x))), ~x) + (1 / ~b) * Antiderivative((csc(~e + ~f * ~x) * sqrt(~a + ~b * csc(~e + ~f * ~x))) / sqrt(~c + ~d * csc(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && NeQ(~b * ~c - ~a * ~d, 0)
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x))) / (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ (3 / 2), ~x) => ((~a - ~b) / (~c - ~d)) * Antiderivative(csc(~e + ~f * ~x) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x))), ~x) + ((~b * ~c - ~a * ~d) / (~c - ~d)) * Antiderivative((csc(~e + ~f * ~x) * (1 + csc(~e + ~f * ~x))) / (sqrt(~a + ~b * csc(~e + ~f * ~x)) * (~c + ~d * csc(~e + ~f * ~x)) ^ (3 / 2)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ ~(p') * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((~a) ^ 2 * ~g * cot(~e + ~f * ~x)) / (~f * sqrt(~a + ~b * csc(~e + ~f * ~x)) * sqrt(~a - ~b * csc(~e + ~f * ~x)))) * Subst(Antiderivative(((~g * ~x) ^ (~p - 1) * (~a + ~b * ~x) ^ (~m - 1 / 2) * (~c + ~d * ~x) ^ ~n) / sqrt(~a - ~b * ~x), ~x), ~x, csc(~e + ~f * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~p], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (EqQ(~p, 1) || IntegerQ(~m - 1 / 2)))))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ ~(p') * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (1 / (~g) ^ (~m + ~n)) * Antiderivative((~g * csc(~e + ~f * ~x)) ^ (~m + ~n + ~p) * (~b + ~a * sin(~e + ~f * ~x)) ^ ~m * (~d + ~c * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~p], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (IntegerQ(~m) && IntegerQ(~n)))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ ~(p') * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((~g * csc(~e + ~f * ~x)) ^ (~m + ~p) * (~c + ~d * csc(~e + ~f * ~x)) ^ ~n) / ((~g) ^ ~m * (~d + ~c * sin(~e + ~f * ~x)) ^ ~n)) * Antiderivative((~b + ~a * sin(~e + ~f * ~x)) ^ ~m * (~d + ~c * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~n, ~p], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ(~m + ~n + ~p, 0) && IntegerQ(~m)))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ ~(p') * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((~g * csc(~e + ~f * ~x)) ^ ~p * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ ~n) / ((~b + ~a * sin(~e + ~f * ~x)) ^ ~m * (~d + ~c * sin(~e + ~f * ~x)) ^ ~n)) * Antiderivative((~b + ~a * sin(~e + ~f * ~x)) ^ ~m * (~d + ~c * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~p], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ(~m + ~n + ~p, 0) && Not(IntegerQ(~m))))
    @apply_utils Antiderivative(csc(~(e') + ~(f') * ~x) ^ ~(p') * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((sqrt(~d + ~c * sin(~e + ~f * ~x)) * sqrt(~a + ~b * csc(~e + ~f * ~x))) / (sqrt(~b + ~a * sin(~e + ~f * ~x)) * sqrt(~c + ~d * csc(~e + ~f * ~x)))) * Antiderivative(((~b + ~a * sin(~e + ~f * ~x)) ^ ~m * (~d + ~c * sin(~e + ~f * ~x)) ^ ~n) / sin(~e + ~f * ~x) ^ (~m + ~n + ~p), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (IntegerQ(~m - 1 / 2) && (IntegerQ(~n - 1 / 2) && (IntegerQ(~p) && LeQ(-2, ~m + ~n + ~p, -1)))))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ ~(p') * (~a + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => Antiderivative(ExpandTrig((~g * csc(~e + ~f * ~x)) ^ ~p * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ ~n, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~p], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (IntegersQ(~m, ~n) || (IntegersQ(~m, ~p) || IntegersQ(~n, ~p))))
    @apply_utils Antiderivative((~(g') * csc(~(e') + ~(f') * ~x)) ^ ~(p') * (~(a') + ~(b') * csc(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => Unintegrable((~g * csc(~e + ~f * ~x)) ^ ~p * (~a + ~b * csc(~e + ~f * ~x)) ^ ~m * (~c + ~d * csc(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g, ~m, ~n, ~p], ~x)
    @apply_utils Antiderivative((sec(~(e') + ~(f') * ~x) * (~A + ~(B') * sec(~(e') + ~(f') * ~x))) / (sqrt(~a + ~(b') * sec(~(e') + ~(f') * ~x)) * (~c + ~(d') * sec(~(e') + ~(f') * ~x)) ^ (3 / 2)), ~x) => ((2 * ~A * (1 + sec(~e + ~f * ~x)) * sqrt(((~b * ~c - ~a * ~d) * (1 - sec(~e + ~f * ~x))) / ((~a + ~b) * (~c + ~d * sec(~e + ~f * ~x))))) / (~f * (~b * ~c - ~a * ~d) * Rt((~c + ~d) / (~a + ~b), 2) * tan(~e + ~f * ~x) * sqrt((-((~b * ~c - ~a * ~d)) * (1 + sec(~e + ~f * ~x))) / ((~a - ~b) * (~c + ~d * sec(~e + ~f * ~x)))))) * Elliptic.E(asin((Rt((~c + ~d) / (~a + ~b), 2) * sqrt(~a + ~b * sec(~e + ~f * ~x))) / sqrt(~c + ~d * sec(~e + ~f * ~x))), ((~a + ~b) * (~c - ~d)) / ((~a - ~b) * (~c + ~d))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && EqQ(~A, ~B))))
    @apply_utils Antiderivative((csc(~(e') + ~(f') * ~x) * (~A + ~(B') * csc(~(e') + ~(f') * ~x))) / (sqrt(~a + ~(b') * csc(~(e') + ~(f') * ~x)) * (~c + ~(d') * csc(~(e') + ~(f') * ~x)) ^ (3 / 2)), ~x) => ((-2 * ~A * (1 + csc(~e + ~f * ~x)) * sqrt(((~b * ~c - ~a * ~d) * (1 - csc(~e + ~f * ~x))) / ((~a + ~b) * (~c + ~d * csc(~e + ~f * ~x))))) / (~f * (~b * ~c - ~a * ~d) * Rt((~c + ~d) / (~a + ~b), 2) * cot(~e + ~f * ~x) * sqrt((-((~b * ~c - ~a * ~d)) * (1 + csc(~e + ~f * ~x))) / ((~a - ~b) * (~c + ~d * csc(~e + ~f * ~x)))))) * Elliptic.E(asin((Rt((~c + ~d) / (~a + ~b), 2) * sqrt(~a + ~b * csc(~e + ~f * ~x))) / sqrt(~c + ~d * csc(~e + ~f * ~x))), ((~a + ~b) * (~c - ~d)) / ((~a - ~b) * (~c + ~d))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && EqQ(~A, ~B))))
end
