int_rules_4_1_0_1 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 4.1.0.1*(a*sin)^m*(b*trg)^n =#
    If(TrueQ($LoadShowSteps), Antiderivative((~u), ~x) := Antiderivative(DeactivateTrig(u, x), x) <-- SimplifyFlag && FunctionOfTrigOfLinearQ(u, x), Antiderivative((~u), ~x) := Antiderivative(DeactivateTrig(u, x), x) <-- FunctionOfTrigOfLinearQ(u, x))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * (~(b') * cos(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => ((~a * sin(~e + ~f * ~x)) ^ (~m + 1) * (~b * cos(~e + ~f * ~x)) ^ (~n + 1)) / (~a * ~b * ~f * (~m + 1)) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x) && (EqQ(~m + ~n + 2, 0) && NeQ(~m, -1))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * cos(~(e') + ~(f') * ~x) ^ ~(n'), ~x) => (1 / (~a * ~f)) * Subst(Antiderivative((~x) ^ ~m * (1 - (~x) ^ 2 / (~a) ^ 2) ^ ((~n - 1) / 2), ~x), ~x, ~a * sin(~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') * cos(~(e') + ~(f') * ~x)) ^ ~(m') * sin(~(e') + ~(f') * ~x) ^ ~(n'), ~x) => (-1 / (~a * ~f)) * Subst(Antiderivative((~x) ^ ~m * (1 - (~x) ^ 2 / (~a) ^ 2) ^ ((~n - 1) / 2), ~x), ~x, ~a * cos(~e + ~f * ~x)) <-- FreeQ([~a, ~e, ~f, ~m], ~x) && (IntegerQ((~n - 1) / 2) && Not(IntegerQ((~m - 1) / 2) && (GtQ(~m, 0) && LeQ(~m, ~n))))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * cos(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (-(~a) * (~a * sin(~e + ~f * ~x)) ^ (~m - 1) * (~b * cos(~e + ~f * ~x)) ^ (~n + 1)) / (~b * ~f * (~n + 1)) + (((~a) ^ 2 * (~m - 1)) / ((~b) ^ 2 * (~n + 1))) * Antiderivative((~a * sin(~e + ~f * ~x)) ^ (~m - 2) * (~b * cos(~e + ~f * ~x)) ^ (~n + 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f], ~x) && (GtQ(~m, 1) && (LtQ(~n, -1) && (IntegersQ(2 * ~m, 2 * ~n) || EqQ(~m + ~n, 0))))
    @apply_utils Antiderivative((~(a') * cos(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~a * (~a * cos(~e + ~f * ~x)) ^ (~m - 1) * (~b * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~b * ~f * (~n + 1)) + (((~a) ^ 2 * (~m - 1)) / ((~b) ^ 2 * (~n + 1))) * Antiderivative((~a * cos(~e + ~f * ~x)) ^ (~m - 2) * (~b * sin(~e + ~f * ~x)) ^ (~n + 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f], ~x) && (GtQ(~m, 1) && (LtQ(~n, -1) && (IntegersQ(2 * ~m, 2 * ~n) || EqQ(~m + ~n, 0))))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * cos(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (-(~a) * (~b * cos(~e + ~f * ~x)) ^ (~n + 1) * (~a * sin(~e + ~f * ~x)) ^ (~m - 1)) / (~b * ~f * (~m + ~n)) + (((~a) ^ 2 * (~m - 1)) / (~m + ~n)) * Antiderivative((~b * cos(~e + ~f * ~x)) ^ ~n * (~a * sin(~e + ~f * ~x)) ^ (~m - 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~n], ~x) && (GtQ(~m, 1) && (NeQ(~m + ~n, 0) && IntegersQ(2 * ~m, 2 * ~n)))
    @apply_utils Antiderivative((~(a') * cos(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~a * (~b * sin(~e + ~f * ~x)) ^ (~n + 1) * (~a * cos(~e + ~f * ~x)) ^ (~m - 1)) / (~b * ~f * (~m + ~n)) + (((~a) ^ 2 * (~m - 1)) / (~m + ~n)) * Antiderivative((~b * sin(~e + ~f * ~x)) ^ ~n * (~a * cos(~e + ~f * ~x)) ^ (~m - 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~n], ~x) && (GtQ(~m, 1) && (NeQ(~m + ~n, 0) && IntegersQ(2 * ~m, 2 * ~n)))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * cos(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~b * cos(~e + ~f * ~x)) ^ (~n + 1) * (~a * sin(~e + ~f * ~x)) ^ (~m + 1)) / (~a * ~b * ~f * (~m + 1)) + ((~m + ~n + 2) / ((~a) ^ 2 * (~m + 1))) * Antiderivative((~b * cos(~e + ~f * ~x)) ^ ~n * (~a * sin(~e + ~f * ~x)) ^ (~m + 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~n], ~x) && (LtQ(~m, -1) && IntegersQ(2 * ~m, 2 * ~n))
    @apply_utils Antiderivative((~(a') * cos(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (-((~b * sin(~e + ~f * ~x)) ^ (~n + 1)) * (~a * cos(~e + ~f * ~x)) ^ (~m + 1)) / (~a * ~b * ~f * (~m + 1)) + ((~m + ~n + 2) / ((~a) ^ 2 * (~m + 1))) * Antiderivative((~b * sin(~e + ~f * ~x)) ^ ~n * (~a * cos(~e + ~f * ~x)) ^ (~m + 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~n], ~x) && (LtQ(~m, -1) && IntegersQ(2 * ~m, 2 * ~n))
    @apply_utils Antiderivative(sqrt(~(a') * sin(~(e') + ~(f') * ~x)) * sqrt(~(b') * cos(~(e') + ~(f') * ~x)), ~x) => ((sqrt(~a * sin(~e + ~f * ~x)) * sqrt(~b * cos(~e + ~f * ~x))) / sqrt(sin(2 * ~e + 2 * ~f * ~x))) * Antiderivative(sqrt(sin(2 * ~e + 2 * ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~e, ~f], ~x)
    @apply_utils Antiderivative(1 / (sqrt(~(a') * sin(~(e') + ~(f') * ~x)) * sqrt(~(b') * cos(~(e') + ~(f') * ~x))), ~x) => (sqrt(sin(2 * ~e + 2 * ~f * ~x)) / (sqrt(~a * sin(~e + ~f * ~x)) * sqrt(~b * cos(~e + ~f * ~x)))) * Antiderivative(1 / sqrt(sin(2 * ~e + 2 * ~f * ~x)), ~x) <-- FreeQ([~a, ~b, ~e, ~f], ~x)
    #= Antiderivative(((~a')*sin((~e')+(~f')*(~x)))^(~m)*((~b')*cos((~e')+(~f')*(~x)))^(~n),~x) :=   (a*sin(e+f*x))^m*(b*cos(e+f*x))^n/(a*tan(e+f*x))^m*Antiderivative((a*tan(e+f*x) )^m,x) <-- FreeQ([a,b,e,f,m,n],x) && EqQ(m+n,0) =#
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * cos(~(e') + ~(f') * ~x)) ^ ~n, ~x) => With([k = Denominator(~m)], ((k * ~a * ~b) / ~f) * Subst(Antiderivative((~x) ^ (k * (~m + 1) - 1) / ((~a) ^ 2 + (~b) ^ 2 * (~x) ^ (2k)), ~x), ~x, (~a * sin(~e + ~f * ~x)) ^ (1 / k) / (~b * cos(~e + ~f * ~x)) ^ (1 / k))) <-- FreeQ([~a, ~b, ~e, ~f], ~x) && (EqQ(~m + ~n, 0) && (GtQ(~m, 0) && LtQ(~m, 1)))
    @apply_utils Antiderivative((~(a') * cos(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => With([k = Denominator(~m)], ((-k * ~a * ~b) / ~f) * Subst(Antiderivative((~x) ^ (k * (~m + 1) - 1) / ((~a) ^ 2 + (~b) ^ 2 * (~x) ^ (2k)), ~x), ~x, (~a * cos(~e + ~f * ~x)) ^ (1 / k) / (~b * sin(~e + ~f * ~x)) ^ (1 / k))) <-- FreeQ([~a, ~b, ~e, ~f], ~x) && (EqQ(~m + ~n, 0) && (GtQ(~m, 0) && LtQ(~m, 1)))
    #= Antiderivative(((~a')*sin((~e')+(~f')*(~x)))^(~m)*((~b')*cos((~e')+(~f')*(~x)))^(~n),~x) :=   b^(2*IntPart((n-1)/2)+1)*(b*cos(e+f*x))^(2*FracPart((n-1)/2))/(a*f*( cos(e+f*x)^2)^FracPart((n-1)/2))* Subst(Antiderivative(x^m*(1-x^2/a^2)^((n-1)/2),x),x,a*sin(e+f*x)) <--  FreeQ([a,b,e,f,m,n],x) && (RationalQ(n) || Not(RationalQ(m)) &&  (EqQ(b,1) || NeQ(a,1))) =#
    #= Antiderivative(((~a')*cos((~e')+(~f')*(~x)))^(~m)*((~b')*sin((~e')+(~f')*(~x)))^(~n),~x) :=   -b^(2*IntPart((n-1)/2)+1)*(b*sin(e+f*x))^(2*FracPart((n-1)/2))/(a*f* (sin(e+f*x)^2)^FracPart((n-1)/2))* Subst(Antiderivative(x^m*(1-x^2/a^2)^((n-1)/2),x),x,a*cos(e+f*x)) <--  FreeQ([a,b,e,f,m,n],x) =#
    @apply_utils Antiderivative((~(a') * cos(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((-((~b) ^ (2 * IntPart((~n - 1) / 2) + 1)) * (~b * sin(~e + ~f * ~x)) ^ (2 * FracPart((~n - 1) / 2)) * (~a * cos(~e + ~f * ~x)) ^ (~m + 1)) / (~a * ~f * (~m + 1) * (sin(~e + ~f * ~x) ^ 2) ^ FracPart((~n - 1) / 2))) * HypergeometricFunctions._₂F₁((1 + ~m) / 2, (1 - ~n) / 2, (3 + ~m) / 2, cos(~e + ~f * ~x) ^ 2) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x) && SimplerQ(~n, ~m)
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * cos(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((~b) ^ (2 * IntPart((~n - 1) / 2) + 1) * (~b * cos(~e + ~f * ~x)) ^ (2 * FracPart((~n - 1) / 2)) * (~a * sin(~e + ~f * ~x)) ^ (~m + 1)) / (~a * ~f * (~m + 1) * (cos(~e + ~f * ~x) ^ 2) ^ FracPart((~n - 1) / 2))) * HypergeometricFunctions._₂F₁((1 + ~m) / 2, (1 - ~n) / 2, (3 + ~m) / 2, sin(~e + ~f * ~x) ^ 2) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x)
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (~b * (~a * sin(~e + ~f * ~x)) ^ (~m + 1) * (~b * sec(~e + ~f * ~x)) ^ (~n - 1)) / (~a * ~f * (~m + 1)) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x) && (EqQ((~m - ~n) + 2, 0) && NeQ(~m, -1))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~a * ~b * (~a * sin(~e + ~f * ~x)) ^ (~m - 1) * (~b * sec(~e + ~f * ~x)) ^ (~n - 1)) / (~f * (~n - 1)) - (((~a) ^ 2 * (~b) ^ 2 * (~m - 1)) / (~n - 1)) * Antiderivative((~a * sin(~e + ~f * ~x)) ^ (~m - 2) * (~b * sec(~e + ~f * ~x)) ^ (~n - 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f], ~x) && (GtQ(~n, 1) && (GtQ(~m, 1) && IntegersQ(2 * ~m, 2 * ~n)))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~a * sin(~e + ~f * ~x)) ^ (~m + 1) * (~b * sec(~e + ~f * ~x)) ^ (~n + 1)) / (~a * ~b * ~f * (~m - ~n)) - ((~n + 1) / ((~b) ^ 2 * (~m - ~n))) * Antiderivative((~a * sin(~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') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~a * sin(~e + ~f * ~x)) ^ (~m + 1) * (~b * sec(~e + ~f * ~x)) ^ (~n + 1)) / (~a * ~b * ~f * (~m + 1)) - ((~n + 1) / ((~a) ^ 2 * (~b) ^ 2 * (~m + 1))) * Antiderivative((~a * sin(~e + ~f * ~x)) ^ (~m + 2) * (~b * sec(~e + ~f * ~x)) ^ (~n + 2), ~x) <-- FreeQ([~a, ~b, ~e, ~f], ~x) && (LtQ(~n, -1) && (LtQ(~m, -1) && IntegersQ(2 * ~m, 2 * ~n)))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~a * sin(~e + ~f * ~x)) ^ (~m + 1) * (~b * sec(~e + ~f * ~x)) ^ (~n + 1)) / (~a * ~b * ~f * (~m - ~n)) - ((~n + 1) / ((~b) ^ 2 * (~m - ~n))) * Antiderivative((~a * sin(~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') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (-(~a) * ~b * (~a * sin(~e + ~f * ~x)) ^ (~m - 1) * (~b * sec(~e + ~f * ~x)) ^ (~n - 1)) / (~f * (~m - ~n)) + (((~a) ^ 2 * (~m - 1)) / (~m - ~n)) * Antiderivative((~a * sin(~e + ~f * ~x)) ^ (~m - 2) * (~b * sec(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~n], ~x) && (GtQ(~m, 1) && (NeQ(~m - ~n, 0) && IntegersQ(2 * ~m, 2 * ~n)))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~b * (~a * sin(~e + ~f * ~x)) ^ (~m + 1) * (~b * sec(~e + ~f * ~x)) ^ (~n - 1)) / (~a * ~f * (~m + 1)) + (((~m - ~n) + 2) / ((~a) ^ 2 * (~m + 1))) * Antiderivative((~a * sin(~e + ~f * ~x)) ^ (~m + 2) * (~b * sec(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~n], ~x) && (LtQ(~m, -1) && IntegersQ(2 * ~m, 2 * ~n))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~b * cos(~e + ~f * ~x)) ^ ~n * (~b * sec(~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') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (1 / (~b) ^ 2) * (~b * cos(~e + ~f * ~x)) ^ (~n + 1) * (~b * sec(~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(IntegerQ(~m)) && (Not(IntegerQ(~n)) && LtQ(~n, 1)))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~m * (~(b') * sec(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~b) ^ 2 * (~b * cos(~e + ~f * ~x)) ^ (~n - 1) * (~b * sec(~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(IntegerQ(~m)) && Not(IntegerQ(~n)))
    @apply_utils Antiderivative((~(a') * sin(~(e') + ~(f') * ~x)) ^ ~(m') * (~(b') * csc(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (~a * ~b) ^ IntPart(~n) * (~a * sin(~e + ~f * ~x)) ^ FracPart(~n) * (~b * csc(~e + ~f * ~x)) ^ FracPart(~n) * Antiderivative((~a * sin(~e + ~f * ~x)) ^ (~m - ~n), ~x) <-- FreeQ([~a, ~b, ~e, ~f, ~m, ~n], ~x) && (Not(IntegerQ(~m)) && Not(IntegerQ(~n)))
end
