int_rules_4_1_3_1 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 4.1.3.1*(a+b*sin)^m*(c+d*sin)^n*(A+B*sin) =#
    @apply_utils Antiderivative(sin(~(e') + ~(f') * ~x) ^ ~(n') * (~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => Antiderivative(ExpandTrig(sin(~e + ~f * ~x) ^ ~n * (~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~A + ~B * sin(~e + ~f * ~x)), ~x), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~A, ~B], ~x) && (EqQ(~A * ~b + ~a * ~B, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (IntegerQ(~m) && IntegerQ(~n))))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * (~c + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~(n') * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (~a) ^ ~m * (~c) ^ ~m * Antiderivative(cos(~e + ~f * ~x) ^ (2 * ~m) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n - ~m) * (~A + ~B * sin(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (IntegerQ(~m) && Not(IntegerQ(~n) && (LtQ(~m, 0) && GtQ(~n, 0) || (LtQ(0, ~n, ~m) || LtQ(~m, ~n, 0)))))))
    @apply_utils Antiderivative((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~A * ~c + (~B * ~c + ~A * ~d) * sin(~e + ~f * ~x) + ~B * ~d * sin(~e + ~f * ~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m], ~x) && NeQ(~b * ~c - ~a * ~d, 0)
    @apply_utils Antiderivative((~(A') + ~(B') * sin(~(e') + ~(f') * ~x)) / (sqrt(~a + ~(b') * sin(~(e') + ~(f') * ~x)) * sqrt(~c + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => ((~A * ~b + ~a * ~B) / (2 * ~a * ~b)) * Antiderivative(sqrt(~a + ~b * sin(~e + ~f * ~x)) / sqrt(~c + ~d * sin(~e + ~f * ~x)), ~x) + ((~B * ~c + ~A * ~d) / (2 * ~c * ~d)) * Antiderivative(sqrt(~c + ~d * sin(~e + ~f * ~x)) / sqrt(~a + ~b * sin(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~(n') * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-(~B) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n) / (~f * (~m + ~n + 1)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (EqQ(~A * ~b * (~m + ~n + 1) + ~a * ~B * (~m - ~n), 0) && NeQ(~m, -1 / 2))))
    @apply_utils Antiderivative(sqrt(~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) * (~c + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (~B / ~d) * Antiderivative(sqrt(~a + ~b * sin(~e + ~f * ~x)) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1), ~x) - ((~B * ~c - ~A * ~d) / ~d) * Antiderivative(sqrt(~a + ~b * sin(~e + ~f * ~x)) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~c + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~(n') * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => ((~A * ~b - ~a * ~B) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n) / (~a * ~f * (2 * ~m + 1)) + ((~a * ~B * (~m - ~n) + ~A * ~b * (~m + ~n + 1)) / (~a * ~b * (2 * ~m + 1))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && ((LtQ(~m, -1 / 2) || ILtQ(~m + ~n, 0) && Not(SumSimplerQ(~n, 1))) && NeQ(2 * ~m + 1, 0))))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * (~c + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-(~B) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n) / (~f * (~m + ~n + 1)) - ((~B * ~c * (~m - ~n) - ~A * ~d * (~m + ~n + 1)) / (~d * (~m + ~n + 1))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m, ~n], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (Not(LtQ(~m, -1 / 2)) && NeQ(~m + ~n + 1, 0))))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => ((~B * ~c - ~A * ~d) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~f * (~n + 1) * ((~c) ^ 2 - (~d) ^ 2)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (EqQ(~m + ~n + 2, 0) && EqQ(~A * (~a * ~d * ~m + ~b * ~c * (~n + 1)) - ~B * (~a * ~c * ~m + ~b * ~d * (~n + 1)), 0)))))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-((~b) ^ 2) * (~B * ~c - ~A * ~d) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ (~m - 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~d * ~f * (~n + 1) * (~b * ~c + ~a * ~d)) - (~b / (~d * (~n + 1) * (~b * ~c + ~a * ~d))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m - 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1) * Simp((~a * ~A * ~d * ((~m - ~n) - 2) - ~B * (~a * ~c * (~m - 1) + ~b * ~d * (~n + 1))) - (~A * ~b * ~d * (~m + ~n + 1) - ~B * (~b * ~c * ~m - ~a * ~d * (~n + 1))) * sin(~e + ~f * ~x), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (GtQ(~m, 1 / 2) && (LtQ(~n, -1) && (IntegerQ(2 * ~m) && (IntegerQ(2 * ~n) || EqQ(~c, 0))))))))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-(~b) * ~B * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ (~m - 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~d * ~f * (~m + ~n + 1)) + (1 / (~d * (~m + ~n + 1))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m - 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n * Simp(~a * ~A * ~d * (~m + ~n + 1) + ~B * (~a * ~c * (~m - 1) + ~b * ~d * (~n + 1)) + (~A * ~b * ~d * (~m + ~n + 1) - ~B * (~b * ~c * ~m - ~a * ~d * (2 * ~m + ~n))) * sin(~e + ~f * ~x), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (GtQ(~m, 1 / 2) && (Not(LtQ(~n, -1)) && (IntegerQ(2 * ~m) && (IntegerQ(2 * ~n) || EqQ(~c, 0))))))))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => ((~A * ~b - ~a * ~B) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n) / (~a * ~f * (2 * ~m + 1)) - (1 / (~a * ~b * (2 * ~m + 1))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n - 1) * Simp((~A * (~a * ~d * ~n - ~b * ~c * (~m + 1)) - ~B * (~a * ~c * ~m + ~b * ~d * ~n)) - ~d * (~a * ~B * (~m - ~n) + ~A * ~b * (~m + ~n + 1)) * sin(~e + ~f * ~x), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (LtQ(~m, -1 / 2) && (GtQ(~n, 0) && (IntegerQ(2 * ~m) && (IntegerQ(2 * ~n) || EqQ(~c, 0))))))))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (~b * (~A * ~b - ~a * ~B) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~a * ~f * (2 * ~m + 1) * (~b * ~c - ~a * ~d)) + (1 / (~a * (2 * ~m + 1) * (~b * ~c - ~a * ~d))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n * Simp(~B * (~a * ~c * ~m + ~b * ~d * (~n + 1)) + ~A * (~b * ~c * (~m + 1) - ~a * ~d * (2 * ~m + ~n + 2)) + ~d * (~A * ~b - ~a * ~B) * (~m + ~n + 2) * sin(~e + ~f * ~x), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (LtQ(~m, -1 / 2) && (Not(GtQ(~n, 0)) && (IntegerQ(2 * ~m) && (IntegerQ(2 * ~n) || EqQ(~c, 0))))))))
    @apply_utils Antiderivative(sqrt(~a + ~(b') * sin(~(e') + ~(f') * ~x)) * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-2 * ~b * ~B * cos(~e + ~f * ~x) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~d * ~f * (2 * ~n + 3) * sqrt(~a + ~b * sin(~e + ~f * ~x))) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && EqQ(~A * ~b * ~d * (2 * ~n + 3) - ~B * (~b * ~c - 2 * ~a * ~d * (~n + 1)), 0))))
    @apply_utils Antiderivative(sqrt(~a + ~(b') * sin(~(e') + ~(f') * ~x)) * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-((~b) ^ 2) * (~B * ~c - ~A * ~d) * cos(~e + ~f * ~x) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~d * ~f * (~n + 1) * (~b * ~c + ~a * ~d) * sqrt(~a + ~b * sin(~e + ~f * ~x))) + ((~A * ~b * ~d * (2 * ~n + 3) - ~B * (~b * ~c - 2 * ~a * ~d * (~n + 1))) / (2 * ~d * (~n + 1) * (~b * ~c + ~a * ~d))) * Antiderivative(sqrt(~a + ~b * sin(~e + ~f * ~x)) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && LtQ(~n, -1))))
    @apply_utils Antiderivative(sqrt(~a + ~(b') * sin(~(e') + ~(f') * ~x)) * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-2 * ~b * ~B * cos(~e + ~f * ~x) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~d * ~f * (2 * ~n + 3) * sqrt(~a + ~b * sin(~e + ~f * ~x))) + ((~A * ~b * ~d * (2 * ~n + 3) - ~B * (~b * ~c - 2 * ~a * ~d * (~n + 1))) / (~b * ~d * (2 * ~n + 3))) * Antiderivative(sqrt(~a + ~b * sin(~e + ~f * ~x)) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && Not(LtQ(~n, -1)))))
    @apply_utils Antiderivative((~(A') + ~(B') * sin(~(e') + ~(f') * ~x)) / (sqrt(~a + ~(b') * sin(~(e') + ~(f') * ~x)) * sqrt(~(c') + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => ((~A * ~b - ~a * ~B) / ~b) * Antiderivative(1 / (sqrt(~a + ~b * sin(~e + ~f * ~x)) * sqrt(~c + ~d * sin(~e + ~f * ~x))), ~x) + (~B / ~b) * Antiderivative(sqrt(~a + ~b * sin(~e + ~f * ~x)) / sqrt(~c + ~d * sin(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-(~B) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n) / (~f * (~m + ~n + 1)) + (1 / (~b * (~m + ~n + 1))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n - 1) * Simp(~A * ~b * ~c * (~m + ~n + 1) + ~B * (~a * ~c * ~m + ~b * ~d * ~n) + (~A * ~b * ~d * (~m + ~n + 1) + ~B * (~a * ~d * ~m + ~b * ~c * ~n)) * sin(~e + ~f * ~x), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (GtQ(~n, 0) && (IntegerQ(~n) || EqQ(~m + 1 / 2, 0))))))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => ((~B * ~c - ~A * ~d) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~f * (~n + 1) * ((~c) ^ 2 - (~d) ^ 2)) + (1 / (~b * (~n + 1) * ((~c) ^ 2 - (~d) ^ 2))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1) * Simp((~A * (~a * ~d * ~m + ~b * ~c * (~n + 1)) - ~B * (~a * ~c * ~m + ~b * ~d * (~n + 1))) + ~b * (~B * ~c - ~A * ~d) * (~m + ~n + 2) * sin(~e + ~f * ~x), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (LtQ(~n, -1) && (IntegerQ(~n) || EqQ(~m + 1 / 2, 0))))))
    @apply_utils Antiderivative((~(A') + ~(B') * sin(~(e') + ~(f') * ~x)) / (sqrt(~a + ~(b') * sin(~(e') + ~(f') * ~x)) * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => ((~A * ~b - ~a * ~B) / (~b * ~c - ~a * ~d)) * Antiderivative(1 / sqrt(~a + ~b * sin(~e + ~f * ~x)), ~x) + ((~B * ~c - ~A * ~d) / (~b * ~c - ~a * ~d)) * Antiderivative(sqrt(~a + ~b * sin(~e + ~f * ~x)) / (~c + ~d * sin(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative(((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x))) / (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)), ~x) => (~B / ~d) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ ~m, ~x) - ((~B * ~c - ~A * ~d) / ~d) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ ~m / (~c + ~d * sin(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && NeQ(~m + 1 / 2, 0))))
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => ((~A * ~b - ~a * ~B) / ~b) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n, ~x) + (~B / ~b) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && NeQ(~A * ~b + ~a * ~B, 0))))
    @apply_utils Antiderivative((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ 2 * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => ((~B * ~c - ~A * ~d) * (~b * ~c - ~a * ~d) ^ 2 * cos(~e + ~f * ~x) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~f * (~d) ^ 2 * (~n + 1) * ((~c) ^ 2 - (~d) ^ 2)) - (1 / ((~d) ^ 2 * (~n + 1) * ((~c) ^ 2 - (~d) ^ 2))) * Antiderivative((~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1) * Simp((~d * (~n + 1) * (~B * (~b * ~c - ~a * ~d) ^ 2 - ~A * ~d * (((~a) ^ 2 * ~c + (~b) ^ 2 * ~c) - 2 * ~a * ~b * ~d)) - ((~B * ~c - ~A * ~d) * ((~a) ^ 2 * (~d) ^ 2 * (~n + 2) + (~b) ^ 2 * ((~c) ^ 2 + (~d) ^ 2 * (~n + 1))) + 2 * ~a * ~b * ~d * (~A * ~c * ~d * (~n + 2) - ~B * ((~c) ^ 2 + (~d) ^ 2 * (~n + 1)))) * sin(~e + ~f * ~x)) - (~b) ^ 2 * ~B * ~d * (~n + 1) * ((~c) ^ 2 - (~d) ^ 2) * sin(~e + ~f * ~x) ^ 2, ~x), ~x) <-- 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) && LtQ(~n, -1))))
    @apply_utils Antiderivative((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-((~b * ~c - ~a * ~d)) * (~B * ~c - ~A * ~d) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ (~m - 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~d * ~f * (~n + 1) * ((~c) ^ 2 - (~d) ^ 2)) + (1 / (~d * (~n + 1) * ((~c) ^ 2 - (~d) ^ 2))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m - 2) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1) * Simp(~b * (~b * ~c - ~a * ~d) * (~B * ~c - ~A * ~d) * (~m - 1) + ~a * ~d * ((~a * ~A * ~c + ~b * ~B * ~c) - (~A * ~b + ~a * ~B) * ~d) * (~n + 1) + (~b * (~b * ~d * (~B * ~c - ~A * ~d) + ~a * (~A * ~c * ~d + ~B * ((~c) ^ 2 - 2 * (~d) ^ 2))) * (~n + 1) - ~a * (~b * ~c - ~a * ~d) * (~B * ~c - ~A * ~d) * (~n + 2)) * sin(~e + ~f * ~x) + ~b * (~d * ((~A * ~b * ~c + ~a * ~B * ~c) - ~a * ~A * ~d) * (~m + ~n + 1) - ~b * ~B * ((~c) ^ 2 * ~m + (~d) ^ 2 * (~n + 1))) * sin(~e + ~f * ~x) ^ 2, ~x), ~x) <-- 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) && (GtQ(~m, 1) && LtQ(~n, -1)))))
    @apply_utils Antiderivative((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-(~b) * ~B * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ (~m - 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~d * ~f * (~m + ~n + 1)) + (1 / (~d * (~m + ~n + 1))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m - 2) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n * Simp((~a) ^ 2 * ~A * ~d * (~m + ~n + 1) + ~b * ~B * (~b * ~c * (~m - 1) + ~a * ~d * (~n + 1)) + (~a * ~d * (2 * ~A * ~b + ~a * ~B) * (~m + ~n + 1) - ~b * ~B * (~a * ~c - ~b * ~d * (~m + ~n))) * sin(~e + ~f * ~x) + ~b * (~A * ~b * ~d * (~m + ~n + 1) - ~B * (~b * ~c * ~m - ~a * ~d * (2 * ~m + ~n))) * sin(~e + ~f * ~x) ^ 2, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (GtQ(~m, 1) && Not(IGtQ(~n, 1) && (Not(IntegerQ(~m)) || EqQ(~a, 0) && NeQ(~c, 0)))))))
    @apply_utils Antiderivative((sqrt(~c + ~(d') * sin(~(e') + ~(f') * ~x)) * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x))) / (~(b') * sin(~(e') + ~(f') * ~x)) ^ (3 / 2), ~x) => ((~B * ~d) / (~b) ^ 2) * Antiderivative(sqrt(~b * sin(~e + ~f * ~x)) / sqrt(~c + ~d * sin(~e + ~f * ~x)), ~x) + Antiderivative((~A * ~c + (~B * ~c + ~A * ~d) * sin(~e + ~f * ~x)) / ((~b * sin(~e + ~f * ~x)) ^ (3 / 2) * sqrt(~c + ~d * sin(~e + ~f * ~x))), ~x) <-- FreeQ([~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)
    @apply_utils Antiderivative((sqrt(~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x))) / (~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ (3 / 2), ~x) => (~B / ~b) * Antiderivative(sqrt(~c + ~d * sin(~e + ~f * ~x)) / sqrt(~a + ~b * sin(~e + ~f * ~x)), ~x) + ((~A * ~b - ~a * ~B) / ~b) * Antiderivative(sqrt(~c + ~d * sin(~e + ~f * ~x)) / (~a + ~b * sin(~e + ~f * ~x)) ^ (3 / 2), ~x) <-- 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)))
    @apply_utils Antiderivative((~(A') + ~(B') * sin(~(e') + ~(f') * ~x)) / ((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ (3 / 2) * sqrt(~(d') * sin(~(e') + ~(f') * ~x))), ~x) => (2 * (~A * ~b - ~a * ~B) * cos(~e + ~f * ~x)) / (~f * ((~a) ^ 2 - (~b) ^ 2) * sqrt(~a + ~b * sin(~e + ~f * ~x)) * sqrt(~d * sin(~e + ~f * ~x))) + (~d / ((~a) ^ 2 - (~b) ^ 2)) * Antiderivative(((~A * ~b - ~a * ~B) + (~a * ~A - ~b * ~B) * sin(~e + ~f * ~x)) / (sqrt(~a + ~b * sin(~e + ~f * ~x)) * (~d * sin(~e + ~f * ~x)) ^ (3 / 2)), ~x) <-- FreeQ([~a, ~b, ~d, ~e, ~f, ~A, ~B], ~x) && NeQ((~a) ^ 2 - (~b) ^ 2, 0)
    @apply_utils Antiderivative((~A + ~(B') * sin(~(e') + ~(f') * ~x)) / ((~(b') * sin(~(e') + ~(f') * ~x)) ^ (3 / 2) * sqrt(~c + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => ((-2 * ~A * (~c - ~d) * tan(~e + ~f * ~x)) / (~f * ~b * (~c) ^ 2)) * Rt((~c + ~d) / ~b, 2) * sqrt((~c * (1 + csc(~e + ~f * ~x))) / (~c - ~d)) * sqrt((~c * (1 - csc(~e + ~f * ~x))) / (~c + ~d)) * Elliptic.E(asin((sqrt(~c + ~d * sin(~e + ~f * ~x)) / sqrt(~b * sin(~e + ~f * ~x))) / Rt((~c + ~d) / ~b, 2)), -((~c + ~d)) / (~c - ~d)) <-- FreeQ([~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (EqQ(~A, ~B) && PosQ((~c + ~d) / ~b)))
    @apply_utils Antiderivative((~A + ~(B') * sin(~(e') + ~(f') * ~x)) / ((~(b') * sin(~(e') + ~(f') * ~x)) ^ (3 / 2) * sqrt(~c + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => (-(sqrt(-(~b) * sin(~e + ~f * ~x))) / sqrt(~b * sin(~e + ~f * ~x))) * Antiderivative((~A + ~B * sin(~e + ~f * ~x)) / ((-(~b) * sin(~e + ~f * ~x)) ^ (3 / 2) * sqrt(~c + ~d * sin(~e + ~f * ~x))), ~x) <-- FreeQ([~b, ~c, ~d, ~e, ~f, ~A, ~B], ~x) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (EqQ(~A, ~B) && NegQ((~c + ~d) / ~b)))
    @apply_utils Antiderivative((~A + ~(B') * sin(~(e') + ~(f') * ~x)) / ((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ (3 / 2) * sqrt(~c + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => ((-2 * ~A * (~c - ~d) * (~a + ~b * sin(~e + ~f * ~x))) / (~f * (~b * ~c - ~a * ~d) ^ 2 * Rt((~a + ~b) / (~c + ~d), 2) * cos(~e + ~f * ~x))) * sqrt(((~b * ~c - ~a * ~d) * (1 + sin(~e + ~f * ~x))) / ((~c - ~d) * (~a + ~b * sin(~e + ~f * ~x)))) * sqrt((-((~b * ~c - ~a * ~d)) * (1 - sin(~e + ~f * ~x))) / ((~c + ~d) * (~a + ~b * sin(~e + ~f * ~x)))) * Elliptic.E(asin((Rt((~a + ~b) / (~c + ~d), 2) * sqrt(~c + ~d * sin(~e + ~f * ~x))) / sqrt(~a + ~b * sin(~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) && PosQ((~a + ~b) / (~c + ~d))))))
    @apply_utils Antiderivative((~A + ~(B') * sin(~(e') + ~(f') * ~x)) / ((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ (3 / 2) * sqrt(~c + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => (sqrt(-(~c) - ~d * sin(~e + ~f * ~x)) / sqrt(~c + ~d * sin(~e + ~f * ~x))) * Antiderivative((~A + ~B * sin(~e + ~f * ~x)) / ((~a + ~b * sin(~e + ~f * ~x)) ^ (3 / 2) * sqrt(-(~c) - ~d * sin(~e + ~f * ~x))), ~x) <-- 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) && NegQ((~a + ~b) / (~c + ~d))))))
    @apply_utils Antiderivative((~(A') + ~(B') * sin(~(e') + ~(f') * ~x)) / ((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ (3 / 2) * sqrt(~c + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => ((~A - ~B) / (~a - ~b)) * Antiderivative(1 / (sqrt(~a + ~b * sin(~e + ~f * ~x)) * sqrt(~c + ~d * sin(~e + ~f * ~x))), ~x) - ((~A * ~b - ~a * ~B) / (~a - ~b)) * Antiderivative((1 + sin(~e + ~f * ~x)) / ((~a + ~b * sin(~e + ~f * ~x)) ^ (3 / 2) * sqrt(~c + ~d * sin(~e + ~f * ~x))), ~x) <-- 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) && NeQ(~A, ~B))))
    @apply_utils Antiderivative((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => ((~B * ~a - ~A * ~b) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n) / (~f * (~m + 1) * ((~a) ^ 2 - (~b) ^ 2)) + (1 / ((~m + 1) * ((~a) ^ 2 - (~b) ^ 2))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ (~n - 1) * Simp((~c * (~a * ~A - ~b * ~B) * (~m + 1) + ~d * ~n * (~A * ~b - ~a * ~B) + (~d * (~a * ~A - ~b * ~B) * (~m + 1) - ~c * (~A * ~b - ~a * ~B) * (~m + 2)) * sin(~e + ~f * ~x)) - ~d * (~A * ~b - ~a * ~B) * (~m + ~n + 2) * sin(~e + ~f * ~x) ^ 2, ~x), ~x) <-- 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) && (LtQ(~m, -1) && GtQ(~n, 0)))))
    @apply_utils Antiderivative((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-((~A * (~b) ^ 2 - ~a * ~b * ~B)) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ (1 + ~n)) / (~f * (~m + 1) * (~b * ~c - ~a * ~d) * ((~a) ^ 2 - (~b) ^ 2)) + (1 / ((~m + 1) * (~b * ~c - ~a * ~d) * ((~a) ^ 2 - (~b) ^ 2))) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ (~m + 1) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n * Simp(((~a * ~A - ~b * ~B) * (~b * ~c - ~a * ~d) * (~m + 1) + ~b * ~d * (~A * ~b - ~a * ~B) * (~m + ~n + 2) + (~A * ~b - ~a * ~B) * (~a * ~d * (~m + 1) - ~b * ~c * (~m + 2)) * sin(~e + ~f * ~x)) - ~b * ~d * (~A * ~b - ~a * ~B) * (~m + ~n + 3) * sin(~e + ~f * ~x) ^ 2, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && (NeQ((~c) ^ 2 - (~d) ^ 2, 0) && (RationalQ(~m) && (~m < -1 && (EqQ(~a, 0) && (IntegerQ(~m) && Not(IntegerQ(~n))) || Not(IntegerQ(2 * ~n) && (LtQ(~n, -1) && (IntegerQ(~n) && Not(IntegerQ(~m)) || EqQ(~a, 0))))))))))
    @apply_utils Antiderivative((~(A') + ~(B') * sin(~(e') + ~(f') * ~x)) / ((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => ((~A * ~b - ~a * ~B) / (~b * ~c - ~a * ~d)) * Antiderivative(1 / (~a + ~b * sin(~e + ~f * ~x)), ~x) + ((~B * ~c - ~A * ~d) / (~b * ~c - ~a * ~d)) * Antiderivative(1 / (~c + ~d * sin(~e + ~f * ~x)), ~x) <-- 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)))
    @apply_utils Antiderivative(((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x))) / (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)), ~x) => (~B / ~d) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ ~m, ~x) - ((~B * ~c - ~A * ~d) / ~d) * Antiderivative((~a + ~b * sin(~e + ~f * ~x)) ^ ~m / (~c + ~d * sin(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    @apply_utils Antiderivative(sqrt(~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~n * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => (-2 * ~B * cos(~e + ~f * ~x) * sqrt(~a + ~b * sin(~e + ~f * ~x)) * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n) / (~f * (2 * ~n + 3)) + (1 / (2 * ~n + 3)) * Antiderivative(((~c + ~d * sin(~e + ~f * ~x)) ^ (~n - 1) / sqrt(~a + ~b * sin(~e + ~f * ~x))) * Simp(~a * ~A * ~c * (2 * ~n + 3) + ~B * (~b * ~c + 2 * ~a * ~d * ~n) + (~B * (~a * ~c + ~b * ~d) * (2 * ~n + 1) + ~A * (~b * ~c + ~a * ~d) * (2 * ~n + 3)) * sin(~e + ~f * ~x) + (~A * ~b * ~d * (2 * ~n + 3) + ~B * (~a * ~d + 2 * ~b * ~c * ~n)) * sin(~e + ~f * ~x) ^ 2, ~x), ~x) <-- 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((~n) ^ 2, 1 / 4))))
    @apply_utils Antiderivative((~A + ~(B') * sin(~(e') + ~(f') * ~x)) / (sqrt(sin(~(e') + ~(f') * ~x)) * sqrt(~a + ~(b') * sin(~(e') + ~(f') * ~x))), ~x) => ((4 * ~A) / (~f * sqrt(~a + ~b))) * Elliptic.Pi(-1, -(asin(cos(~e + ~f * ~x) / (1 + sin(~e + ~f * ~x)))), -((~a - ~b)) / (~a + ~b)) <-- FreeQ([~a, ~b, ~e, ~f, ~A, ~B], ~x) && (GtQ(~b, 0) && (GtQ((~b) ^ 2 - (~a) ^ 2, 0) && EqQ(~A, ~B)))
    @apply_utils Antiderivative((~A + ~(B') * sin(~(e') + ~(f') * ~x)) / (sqrt(~a + ~(b') * sin(~(e') + ~(f') * ~x)) * sqrt(~d * sin(~(e') + ~(f') * ~x))), ~x) => (sqrt(sin(~e + ~f * ~x)) / sqrt(~d * sin(~e + ~f * ~x))) * Antiderivative((~A + ~B * sin(~e + ~f * ~x)) / (sqrt(sin(~e + ~f * ~x)) * sqrt(~a + ~b * sin(~e + ~f * ~x))), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~d, ~A, ~B], ~x) && (GtQ(~b, 0) && (GtQ((~b) ^ 2 - (~a) ^ 2, 0) && EqQ(~A, ~B)))
    @apply_utils Antiderivative((~(A') + ~(B') * sin(~(e') + ~(f') * ~x)) / (sqrt(~a + ~(b') * sin(~(e') + ~(f') * ~x)) * sqrt(~(c') + ~(d') * sin(~(e') + ~(f') * ~x))), ~x) => (~B / ~d) * Antiderivative(sqrt(~c + ~d * sin(~e + ~f * ~x)) / sqrt(~a + ~b * sin(~e + ~f * ~x)), ~x) - ((~B * ~c - ~A * ~d) / ~d) * Antiderivative(1 / (sqrt(~a + ~b * sin(~e + ~f * ~x)) * sqrt(~c + ~d * sin(~e + ~f * ~x))), ~x) <-- 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)))
    @apply_utils Antiderivative((~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(c') + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~(n') * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)), ~x) => Unintegrable((~a + ~b * sin(~e + ~f * ~x)) ^ ~m * (~c + ~d * sin(~e + ~f * ~x)) ^ ~n * (~A + ~B * sin(~e + ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m, ~n], ~x) && (NeQ(~b * ~c - ~a * ~d, 0) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && NeQ((~c) ^ 2 - (~d) ^ 2, 0)))
    #= Antiderivative(((~a)+(~b')*sin((~e')+(~f')*(~x)))^(~m)*((~c)+(~d')*sin((~e')+(~f')*(~x)))^(~n)*((~A')+(~B) .*sin((~e')+(~f')*(~x)))^(~p),~x) :=  a^m*c^m*Antiderivative(cos(e+f*x)^(2*m)*(c+d*sin(e+f*x))^(n-m)*(A+B*sin(e+f*x))^ p,x) <-- FreeQ([a,b,c,d,e,f,A,B,n,p],x) && EqQ(b*c+a*d,0) &&  EqQ(a^2-b^2,0) && IntegerQ(m) && Not(IntegerQ(n) && (LtQ(m,0) && GtQ(n,0) || LtQ(0,n,m) ||  LtQ(m,n,0))) =#
    #= Antiderivative(((~a)+(~b')*cos((~e')+(~f')*(~x)))^(~m)*((~c)+(~d')*cos((~e')+(~f')*(~x)))^(~n)*((~A')+(~B) .*cos((~e')+(~f')*(~x)))^(~p),~x) :=  a^m*c^m*Antiderivative(sin(e+f*x)^(2*m)*(c+d*cos(e+f*x))^(n-m)*(A+B*cos(e+f*x))^ p,x) <-- FreeQ([a,b,c,d,e,f,A,B,n,p],x) && EqQ(b*c+a*d,0) &&  EqQ(a^2-b^2,0) && IntegerQ(m) && Not(IntegerQ(n) && (LtQ(m,0) && GtQ(n,0) || LtQ(0,n,m) ||  LtQ(m,n,0))) =#
    @apply_utils Antiderivative((~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * (~c + ~(d') * sin(~(e') + ~(f') * ~x)) ^ ~(n') * (~(A') + ~(B') * sin(~(e') + ~(f') * ~x)) ^ ~p, ~x) => ((sqrt(~a + ~b * sin(~e + ~f * ~x)) * sqrt(~c + ~d * sin(~e + ~f * ~x))) / (~f * cos(~e + ~f * ~x))) * Subst(Antiderivative((~a + ~b * ~x) ^ (~m - 1 / 2) * (~c + ~d * ~x) ^ (~n - 1 / 2) * (~A + ~B * ~x) ^ ~p, ~x), ~x, sin(~e + ~f * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m, ~n, ~p], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
    @apply_utils Antiderivative((~a + ~(b') * cos(~(e') + ~(f') * ~x)) ^ ~(m') * (~c + ~(d') * cos(~(e') + ~(f') * ~x)) ^ ~(n') * (~(A') + ~(B') * cos(~(e') + ~(f') * ~x)) ^ ~p, ~x) => ((-(sqrt(~a + ~b * cos(~e + ~f * ~x))) * sqrt(~c + ~d * cos(~e + ~f * ~x))) / (~f * sin(~e + ~f * ~x))) * Subst(Antiderivative((~a + ~b * ~x) ^ (~m - 1 / 2) * (~c + ~d * ~x) ^ (~n - 1 / 2) * (~A + ~B * ~x) ^ ~p, ~x), ~x, cos(~e + ~f * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~A, ~B, ~m, ~n, ~p], ~x) && (EqQ(~b * ~c + ~a * ~d, 0) && EqQ((~a) ^ 2 - (~b) ^ 2, 0))
end
