int_rules_4_1_10 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 4.1.10*(c+d*x)^m*(a+b*sin)^n =#
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * sin(~(e') + ~(f') * ~x), ~x) => (-((~c + ~d * ~x) ^ ~m) * cos(~e + ~f * ~x)) / ~f + ((~d * ~m) / ~f) * Antiderivative((~c + ~d * ~x) ^ (~m - 1) * cos(~e + ~f * ~x), ~x) <-- FreeQ([~c, ~d, ~e, ~f], ~x) && GtQ(~m, 0)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~m * sin(~(e') + ~(f') * ~x), ~x) => ((~c + ~d * ~x) ^ (~m + 1) * sin(~e + ~f * ~x)) / (~d * (~m + 1)) - (~f / (~d * (~m + 1))) * Antiderivative((~c + ~d * ~x) ^ (~m + 1) * cos(~e + ~f * ~x), ~x) <-- FreeQ([~c, ~d, ~e, ~f], ~x) && LtQ(~m, -1)
    @apply_utils Antiderivative(sin(~(e') + ~(f') * Complex(0, ~fz) * ~x) / (~(c') + ~(d') * ~x), ~x) => (im * SinhIntegral((~c * ~f * ~fz) / ~d + ~f * ~fz * ~x)) / ~d <-- FreeQ([~c, ~d, ~e, ~f, ~fz], ~x) && EqQ(~d * ~e - ~c * ~f * ~fz * im, 0)
    @apply_utils Antiderivative(sin(~(e') + ~(f') * ~x) / (~(c') + ~(d') * ~x), ~x) => SinIntegral(~e + ~f * ~x) / ~d <-- FreeQ([~c, ~d, ~e, ~f], ~x) && EqQ(~d * ~e - ~c * ~f, 0)
    @apply_utils Antiderivative(sin(~(e') + ~(f') * Complex(0, ~fz) * ~x) / (~(c') + ~(d') * ~x), ~x) => CoshIntegral((-(~c) * ~f * ~fz) / ~d - ~f * ~fz * ~x) / ~d <-- FreeQ([~c, ~d, ~e, ~f, ~fz], ~x) && (EqQ(~d * (~e - pi / 2) - ~c * ~f * ~fz * im, 0) && NegQ((~c * ~f * ~fz) / ~d, 0))
    @apply_utils Antiderivative(sin(~(e') + ~(f') * Complex(0, ~fz) * ~x) / (~(c') + ~(d') * ~x), ~x) => CoshIntegral((~c * ~f * ~fz) / ~d + ~f * ~fz * ~x) / ~d <-- FreeQ([~c, ~d, ~e, ~f, ~fz], ~x) && EqQ(~d * (~e - pi / 2) - ~c * ~f * ~fz * im, 0)
    @apply_utils Antiderivative(sin(~(e') + ~(f') * ~x) / (~(c') + ~(d') * ~x), ~x) => CosIntegral((~e - pi / 2) + ~f * ~x) / ~d <-- FreeQ([~c, ~d, ~e, ~f], ~x) && EqQ(~d * (~e - pi / 2) - ~c * ~f, 0)
    @apply_utils Antiderivative(sin(~(e') + ~(f') * ~x) / (~(c') + ~(d') * ~x), ~x) => cos((~d * ~e - ~c * ~f) / ~d) * Antiderivative(sin((~c * ~f) / ~d + ~f * ~x) / (~c + ~d * ~x), ~x) + sin((~d * ~e - ~c * ~f) / ~d) * Antiderivative(cos((~c * ~f) / ~d + ~f * ~x) / (~c + ~d * ~x), ~x) <-- FreeQ([~c, ~d, ~e, ~f], ~x) && NeQ(~d * ~e - ~c * ~f, 0)
    @apply_utils Antiderivative(sin(~(e') + pi / 2 + ~(f') * ~x) / sqrt(~(c') + ~(d') * ~x), ~x) => (2 / ~d) * Subst(Antiderivative(cos((~f * (~x) ^ 2) / ~d), ~x), ~x, sqrt(~c + ~d * ~x)) <-- FreeQ([~c, ~d, ~e, ~f], ~x) && (ComplexFreeQ(~f) && EqQ(~d * ~e - ~c * ~f, 0))
    @apply_utils Antiderivative(sin(~(e') + ~(f') * ~x) / sqrt(~(c') + ~(d') * ~x), ~x) => (2 / ~d) * Subst(Antiderivative(sin((~f * (~x) ^ 2) / ~d), ~x), ~x, sqrt(~c + ~d * ~x)) <-- FreeQ([~c, ~d, ~e, ~f], ~x) && (ComplexFreeQ(~f) && EqQ(~d * ~e - ~c * ~f, 0))
    @apply_utils Antiderivative(sin(~(e') + ~(f') * ~x) / sqrt(~(c') + ~(d') * ~x), ~x) => cos((~d * ~e - ~c * ~f) / ~d) * Antiderivative(sin((~c * ~f) / ~d + ~f * ~x) / sqrt(~c + ~d * ~x), ~x) + sin((~d * ~e - ~c * ~f) / ~d) * Antiderivative(cos((~c * ~f) / ~d + ~f * ~x) / sqrt(~c + ~d * ~x), ~x) <-- FreeQ([~c, ~d, ~e, ~f], ~x) && (ComplexFreeQ(~f) && NeQ(~d * ~e - ~c * ~f, 0))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * sin(~(e') + ~(k') * pi + ~(f') * ~x), ~x) => (im / 2) * Antiderivative((~c + ~d * ~x) ^ ~m * ℯ ^ (-im * ~k * pi) * ℯ ^ (-im * (~e + ~f * ~x)), ~x) - (im / 2) * Antiderivative((~c + ~d * ~x) ^ ~m * ℯ ^ (im * ~k * pi) * ℯ ^ (im * (~e + ~f * ~x)), ~x) <-- FreeQ([~c, ~d, ~e, ~f, ~m], ~x) && IntegerQ(2 * ~k)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * sin(~(e') + ~(f') * ~x), ~x) => (im / 2) * Antiderivative((~c + ~d * ~x) ^ ~m * ℯ ^ (-im * (~e + ~f * ~x)), ~x) - (im / 2) * Antiderivative((~c + ~d * ~x) ^ ~m * ℯ ^ (im * (~e + ~f * ~x)), ~x) <-- FreeQ([~c, ~d, ~e, ~f, ~m], ~x)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * sin(~(e') + (~(f') * ~x) / 2) ^ 2, ~x) => (1 / 2) * Antiderivative((~c + ~d * ~x) ^ ~m, ~x) - (1 / 2) * Antiderivative((~c + ~d * ~x) ^ ~m * cos(2 * ~e + ~f * ~x), ~x) <-- FreeQ([~c, ~d, ~e, ~f, ~m], ~x)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((~d * (~b * sin(~e + ~f * ~x)) ^ ~n) / ((~f) ^ 2 * (~n) ^ 2) - (~b * (~c + ~d * ~x) * cos(~e + ~f * ~x) * (~b * sin(~e + ~f * ~x)) ^ (~n - 1)) / (~f * ~n)) + (((~b) ^ 2 * (~n - 1)) / ~n) * Antiderivative((~c + ~d * ~x) * (~b * sin(~e + ~f * ~x)) ^ (~n - 2), ~x) <-- FreeQ([~b, ~c, ~d, ~e, ~f], ~x) && GtQ(~n, 1)
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~m * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((~d * ~m * (~c + ~d * ~x) ^ (~m - 1) * (~b * sin(~e + ~f * ~x)) ^ ~n) / ((~f) ^ 2 * (~n) ^ 2) - (~b * (~c + ~d * ~x) ^ ~m * cos(~e + ~f * ~x) * (~b * sin(~e + ~f * ~x)) ^ (~n - 1)) / (~f * ~n)) + (((~b) ^ 2 * (~n - 1)) / ~n) * Antiderivative((~c + ~d * ~x) ^ ~m * (~b * sin(~e + ~f * ~x)) ^ (~n - 2), ~x)) - (((~d) ^ 2 * ~m * (~m - 1)) / ((~f) ^ 2 * (~n) ^ 2)) * Antiderivative((~c + ~d * ~x) ^ (~m - 2) * (~b * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~b, ~c, ~d, ~e, ~f], ~x) && (GtQ(~n, 1) && GtQ(~m, 1))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~m * sin(~(e') + ~(f') * ~x) ^ ~n, ~x) => Antiderivative(ExpandTrigReduce((~c + ~d * ~x) ^ ~m, sin(~e + ~f * ~x) ^ ~n, ~x), ~x) <-- FreeQ([~c, ~d, ~e, ~f, ~m], ~x) && (IGtQ(~n, 1) && (Not(RationalQ(~m)) || GeQ(~m, -1) && LtQ(~m, 1)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~m * sin(~(e') + ~(f') * ~x) ^ ~n, ~x) => ((~c + ~d * ~x) ^ (~m + 1) * sin(~e + ~f * ~x) ^ ~n) / (~d * (~m + 1)) - ((~f * ~n) / (~d * (~m + 1))) * Antiderivative(ExpandTrigReduce((~c + ~d * ~x) ^ (~m + 1), cos(~e + ~f * ~x) * sin(~e + ~f * ~x) ^ (~n - 1), ~x), ~x) <-- FreeQ([~c, ~d, ~e, ~f, ~m], ~x) && (IGtQ(~n, 1) && (GeQ(~m, -2) && LtQ(~m, -1)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~m * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((((~c + ~d * ~x) ^ (~m + 1) * (~b * sin(~e + ~f * ~x)) ^ ~n) / (~d * (~m + 1)) - (~b * ~f * ~n * (~c + ~d * ~x) ^ (~m + 2) * cos(~e + ~f * ~x) * (~b * sin(~e + ~f * ~x)) ^ (~n - 1)) / ((~d) ^ 2 * (~m + 1) * (~m + 2))) - (((~f) ^ 2 * (~n) ^ 2) / ((~d) ^ 2 * (~m + 1) * (~m + 2))) * Antiderivative((~c + ~d * ~x) ^ (~m + 2) * (~b * sin(~e + ~f * ~x)) ^ ~n, ~x)) + (((~b) ^ 2 * (~f) ^ 2 * ~n * (~n - 1)) / ((~d) ^ 2 * (~m + 1) * (~m + 2))) * Antiderivative((~c + ~d * ~x) ^ (~m + 2) * (~b * sin(~e + ~f * ~x)) ^ (~n - 2), ~x) <-- FreeQ([~b, ~c, ~d, ~e, ~f], ~x) && (GtQ(~n, 1) && LtQ(~m, -2))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((~c + ~d * ~x) * cos(~e + ~f * ~x) * (~b * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~b * ~f * (~n + 1)) - (~d * (~b * sin(~e + ~f * ~x)) ^ (~n + 2)) / ((~b) ^ 2 * (~f) ^ 2 * (~n + 1) * (~n + 2))) + ((~n + 2) / ((~b) ^ 2 * (~n + 1))) * Antiderivative((~c + ~d * ~x) * (~b * sin(~e + ~f * ~x)) ^ (~n + 2), ~x) <-- FreeQ([~b, ~c, ~d, ~e, ~f], ~x) && (LtQ(~n, -1) && NeQ(~n, -2))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((~c + ~d * ~x) ^ ~m * cos(~e + ~f * ~x) * (~b * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~b * ~f * (~n + 1)) - (~d * ~m * (~c + ~d * ~x) ^ (~m - 1) * (~b * sin(~e + ~f * ~x)) ^ (~n + 2)) / ((~b) ^ 2 * (~f) ^ 2 * (~n + 1) * (~n + 2))) + ((~n + 2) / ((~b) ^ 2 * (~n + 1))) * Antiderivative((~c + ~d * ~x) ^ ~m * (~b * sin(~e + ~f * ~x)) ^ (~n + 2), ~x) + (((~d) ^ 2 * ~m * (~m - 1)) / ((~b) ^ 2 * (~f) ^ 2 * (~n + 1) * (~n + 2))) * Antiderivative((~c + ~d * ~x) ^ (~m - 2) * (~b * sin(~e + ~f * ~x)) ^ (~n + 2), ~x) <-- FreeQ([~b, ~c, ~d, ~e, ~f], ~x) && (LtQ(~n, -1) && (NeQ(~n, -2) && GtQ(~m, 1)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => Antiderivative(ExpandIntegrand((~c + ~d * ~x) ^ ~m, (~a + ~b * sin(~e + ~f * ~x)) ^ ~n, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (IGtQ(~n, 0) && (EqQ(~n, 1) || (IGtQ(~m, 0) || NeQ((~a) ^ 2 - (~b) ^ 2, 0))))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => (2 * ~a) ^ ~n * Antiderivative((~c + ~d * ~x) ^ ~m * sin((1 / 2) * (~e + (pi * ~a) / (2 * ~b)) + (~f * ~x) / 2) ^ (2 * ~n), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (IntegerQ(~n) && (GtQ(~n, 0) || IGtQ(~m, 0))))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => (((2 * ~a) ^ IntPart(~n) * (~a + ~b * sin(~e + ~f * ~x)) ^ FracPart(~n)) / sin(~e / 2 + (~a * pi) / (4 * ~b) + (~f * ~x) / 2) ^ (2 * FracPart(~n))) * Antiderivative((~c + ~d * ~x) ^ ~m * sin(~e / 2 + (~a * pi) / (4 * ~b) + (~f * ~x) / 2) ^ (2 * ~n), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~a) ^ 2 - (~b) ^ 2, 0) && (IntegerQ(~n + 1 / 2) && (GtQ(~n, 0) || IGtQ(~m, 0))))
    #= Antiderivative(((~c')+(~d')*(~x))^(~m')*((~a)+(~b')*sin((~e')+(~f')*(~x)))^(~n'),~x) :=  (2*a)^n*Antiderivative((c+d*x)^m*cos(1/2*(e-pi*a/(2*b))+f*x/2)^(2*n),x) <--  FreeQ([a,b,c,d,e,f,m],x) && EqQ(a^2-b^2,0) && IntegerQ(n) &&  (GtQ(n,0) || IGtQ(m,0)) =#
    #= Antiderivative(((~c')+(~d')*(~x))^(~m')*((~a)+(~b')*sin((~e')+(~f')*(~x)))^(~n),~x) :=  (2*a)^IntPart(n)*(a+b*sin(e+f*x))^FracPart(n)/cos(1/2*(e-pi*a/(2*b))+ f*x/2)^(2*FracPart(n))* Antiderivative((c+d*x)^m*cos(1/2*(e-pi*a/(2*b))+f*x/2)^(2*n),x) <--  FreeQ([a,b,c,d,e,f,m],x) && EqQ(a^2-b^2,0) && IntegerQ(n+1/2) &&  (GtQ(n,0) || IGtQ(m,0)) =#
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') / (~a + ~(b') * sin(~(e') + ~(k') * pi + ~(f') * Complex(0, ~fz) * ~x)), ~x) => 2 * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ (-im * pi * (~k - 1 / 2)) * ℯ ^ (-im * ~e + ~f * ~fz * ~x)) / ((~b + 2 * ~a * ℯ ^ (-im * pi * (~k - 1 / 2)) * ℯ ^ (-im * ~e + ~f * ~fz * ~x)) - ~b * ℯ ^ (-2 * im * ~k * pi) * ℯ ^ (2 * (-im * ~e + ~f * ~fz * ~x))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~fz], ~x) && (IntegerQ(2 * ~k) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && IGtQ(~m, 0)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') / (~a + ~(b') * sin(~(e') + ~(k') * pi + ~(f') * ~x)), ~x) => 2 * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ (im * pi * (~k - 1 / 2)) * ℯ ^ (im * (~e + ~f * ~x))) / ((~b + 2 * ~a * ℯ ^ (im * pi * (~k - 1 / 2)) * ℯ ^ (im * (~e + ~f * ~x))) - ~b * ℯ ^ (2 * im * ~k * pi) * ℯ ^ (2 * im * (~e + ~f * ~x))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (IntegerQ(2 * ~k) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && IGtQ(~m, 0)))
    #= Antiderivative(((~c')+(~d')*(~x))^(~m')/((~a)+(~b')*sin((~e')+(~f')*Complex(0,(~fz))*(~x))),(~x)*Symbol) :=  2*im*Antiderivative((c+d*x)^m*ℯ^(-im*e+f*fz*x)/(b+2*im*a*ℯ^(-im*e+f*fz*x)-b*ℯ^(2*(-im* e+f*fz*x))),x) <-- FreeQ([a,b,c,d,e,f,fz],x) && NeQ(a^2-b^2,0) &&  IGtQ(m,0) =#
    #= Antiderivative(((~c')+(~d')*(~x))^(~m')/((~a)+(~b')*sin((~e')+(~f')*(~x))),~x) :=  -2*im*Antiderivative((c+d*x)^m*ℯ^(im*(e+f*x))/(b-2*im*a*ℯ^(im*(e+f*x))-b*ℯ^(2*im*(e+f* 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) ^ ~(m') / (~a + ~(b') * sin(~(e') + ~(f') * Complex(0, ~fz) * ~x)), ~x) => 2 * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ (-im * ~e + ~f * ~fz * ~x)) / (-im * ~b + 2 * ~a * ℯ ^ (-im * ~e + ~f * ~fz * ~x) + im * ~b * ℯ ^ (2 * (-im * ~e + ~f * ~fz * ~x))), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~fz], ~x) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && IGtQ(~m, 0))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') / (~a + ~(b') * sin(~(e') + ~(f') * ~x)), ~x) => 2 * Antiderivative(((~c + ~d * ~x) ^ ~m * ℯ ^ (im * (~e + ~f * ~x))) / ((im * ~b + 2 * ~a * ℯ ^ (im * (~e + ~f * ~x))) - im * ~b * ℯ ^ (2 * im * (~e + ~f * ~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) ^ ~(m') / (~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ 2, ~x) => ((~b * (~c + ~d * ~x) ^ ~m * cos(~e + ~f * ~x)) / (~f * ((~a) ^ 2 - (~b) ^ 2) * (~a + ~b * sin(~e + ~f * ~x))) + (~a / ((~a) ^ 2 - (~b) ^ 2)) * Antiderivative((~c + ~d * ~x) ^ ~m / (~a + ~b * sin(~e + ~f * ~x)), ~x)) - ((~b * ~d * ~m) / (~f * ((~a) ^ 2 - (~b) ^ 2))) * Antiderivative(((~c + ~d * ~x) ^ (~m - 1) * cos(~e + ~f * ~x)) / (~a + ~b * sin(~e + ~f * ~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) ^ ~(m') * (~a + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~n, ~x) => ((-(~b) * (~c + ~d * ~x) ^ ~m * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ (~n + 1)) / (~f * (~n + 1) * ((~a) ^ 2 - (~b) ^ 2)) + (~a / ((~a) ^ 2 - (~b) ^ 2)) * Antiderivative((~c + ~d * ~x) ^ ~m * (~a + ~b * sin(~e + ~f * ~x)) ^ (~n + 1), ~x) + ((~b * ~d * ~m) / (~f * (~n + 1) * ((~a) ^ 2 - (~b) ^ 2))) * Antiderivative((~c + ~d * ~x) ^ (~m - 1) * cos(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ (~n + 1), ~x)) - ((~b * (~n + 2)) / ((~n + 1) * ((~a) ^ 2 - (~b) ^ 2))) * Antiderivative((~c + ~d * ~x) ^ ~m * sin(~e + ~f * ~x) * (~a + ~b * sin(~e + ~f * ~x)) ^ (~n + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (NeQ((~a) ^ 2 - (~b) ^ 2, 0) && (ILtQ(~n, -2) && IGtQ(~m, 0)))
    @apply_utils Antiderivative((~(c') + ~(d') * ~x) ^ ~(m') * (~(a') + ~(b') * sin(~(e') + ~(f') * ~x)) ^ ~(n'), ~x) => Unintegrable((~c + ~d * ~x) ^ ~m * (~a + ~b * sin(~e + ~f * ~x)) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~n], ~x)
    @apply_utils Antiderivative((~u) ^ ~(m') * (~(a') + ~(b') * sin(~v)) ^ ~(n'), ~x) => Antiderivative(ExpandToSum(~u, ~x) ^ ~m * (~a + ~b * sin(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') * cos(~v)) ^ ~(n'), ~x) => Antiderivative(ExpandToSum(~u, ~x) ^ ~m * (~a + ~b * cos(ExpandToSum(~v, ~x))) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~m, ~n], ~x) && (LinearQ([~u, ~v], ~x) && Not(LinearMatchQ([~u, ~v], ~x)))
end
