int_rules_4_7_5 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 4.7.5*Inert*trig*functions =#
    @apply_utils Antiderivative((~(a') * (~F)(~(c') + ~(d') * ~x) ^ ~p) ^ ~n, ~x) => With([v = ActivateTrig((~F)(~c + ~d * ~x))], (((~a) ^ IntPart(~n) * (v / NonfreeFactors(v, ~x)) ^ (~p * IntPart(~n)) * (~a * v ^ ~p) ^ FracPart(~n)) / NonfreeFactors(v, ~x) ^ (~p * FracPart(~n))) * Antiderivative(NonfreeFactors(v, ~x) ^ (~n * ~p), ~x)) <-- FreeQ([~a, ~c, ~d, ~n, ~p], ~x) && (InertTrigQ(~F) && (Not(IntegerQ(~n)) && IntegerQ(~p)))
    @apply_utils Antiderivative((~(a') * (~(b') * (~F)(~(c') + ~(d') * ~x)) ^ ~p) ^ ~(n'), ~x) => With([v = ActivateTrig((~F)(~c + ~d * ~x))], (((~a) ^ IntPart(~n) * (~a * (~b * v) ^ ~p) ^ FracPart(~n)) / (~b * v) ^ (~p * FracPart(~n))) * Antiderivative((~b * v) ^ (~n * ~p), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~n, ~p], ~x) && (InertTrigQ(~F) && (Not(IntegerQ(~n)) && Not(IntegerQ(~p))))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(sin(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, sin(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sin(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sin(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && (EqQ(~F, cos) || EqQ(~F, cos))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(cos(~c * (~a + ~b * ~x)), ~x)], (-d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, cos(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cos(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cos(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && (EqQ(~F, sin) || EqQ(~F, sin))
    @apply_utils Antiderivative(~u * cosh(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(sinh(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sinh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative(~u * sinh(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(cosh(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cosh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(sin(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c)) * Subst(Antiderivative(SubstFor(1 / ~x, sin(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sin(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sin(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && (EqQ(~F, cot) || EqQ(~F, cot))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(cos(~c * (~a + ~b * ~x)), ~x)], (-1 / (~b * ~c)) * Subst(Antiderivative(SubstFor(1 / ~x, cos(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cos(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cos(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && (EqQ(~F, tan) || EqQ(~F, tan))
    @apply_utils Antiderivative(~u * coth(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(sinh(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c)) * Subst(Antiderivative(SubstFor(1 / ~x, sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sinh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative(~u * tanh(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(cosh(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c)) * Subst(Antiderivative(SubstFor(1 / ~x, cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cosh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ 2, ~x) => With([d = FreeFactors(tan(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, tan(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, tan(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(tan(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && (NonsumQ(~u) && (EqQ(~F, sec) || EqQ(~F, sec)))
    @apply_utils Antiderivative(~u / cos(~(c') * (~(a') + ~(b') * ~x)) ^ 2, ~x) => With([d = FreeFactors(tan(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, tan(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, tan(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(tan(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && NonsumQ(~u)
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ 2, ~x) => With([d = FreeFactors(cot(~c * (~a + ~b * ~x)), ~x)], (-d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, cot(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cot(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cot(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && (NonsumQ(~u) && (EqQ(~F, csc) || EqQ(~F, csc)))
    @apply_utils Antiderivative(~u / sin(~(c') * (~(a') + ~(b') * ~x)) ^ 2, ~x) => With([d = FreeFactors(cot(~c * (~a + ~b * ~x)), ~x)], (-d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, cot(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cot(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cot(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && NonsumQ(~u)
    @apply_utils Antiderivative(~u * sech(~(c') * (~(a') + ~(b') * ~x)) ^ 2, ~x) => With([d = FreeFactors(tanh(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, tanh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, tanh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(tanh(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && NonsumQ(~u)
    @apply_utils Antiderivative(~u * csch(~(c') * (~(a') + ~(b') * ~x)) ^ 2, ~x) => With([d = FreeFactors(coth(~c * (~a + ~b * ~x)), ~x)], (-d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, coth(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, coth(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(coth(~c * (~a + ~b * ~x)) / d, ~u, ~x, True)) <-- FreeQ([~a, ~b, ~c], ~x) && NonsumQ(~u)
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~(n'), ~x) => With([d = FreeFactors(tan(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c * d ^ (~n - 1))) * Subst(Antiderivative(SubstFor(1 / ((~x) ^ ~n * (1 + d ^ 2 * (~x) ^ 2)), tan(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, tan(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(tan(~c * (~a + ~b * ~x)) / d, ~u, ~x, True) && TryPureTanSubst(ActivateTrig(~u) * cot(~c * (~a + ~b * ~x)) ^ ~n, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ(~n) && (EqQ(~F, cot) || EqQ(~F, cot)))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~(n'), ~x) => With([d = FreeFactors(cot(~c * (~a + ~b * ~x)), ~x)], (-1 / (~b * ~c * d ^ (~n - 1))) * Subst(Antiderivative(SubstFor(1 / ((~x) ^ ~n * (1 + d ^ 2 * (~x) ^ 2)), cot(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cot(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cot(~c * (~a + ~b * ~x)) / d, ~u, ~x, True) && TryPureTanSubst(ActivateTrig(~u) * tan(~c * (~a + ~b * ~x)) ^ ~n, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ(~n) && (EqQ(~F, tan) || EqQ(~F, tan)))
    @apply_utils Antiderivative(~u * coth(~(c') * (~(a') + ~(b') * ~x)) ^ ~(n'), ~x) => With([d = FreeFactors(tanh(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c * d ^ (~n - 1))) * Subst(Antiderivative(SubstFor(1 / ((~x) ^ ~n * (1 - d ^ 2 * (~x) ^ 2)), tanh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, tanh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(tanh(~c * (~a + ~b * ~x)) / d, ~u, ~x, True) && TryPureTanSubst(ActivateTrig(~u) * coth(~c * (~a + ~b * ~x)) ^ ~n, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && IntegerQ(~n)
    @apply_utils Antiderivative(~u * tanh(~(c') * (~(a') + ~(b') * ~x)) ^ ~(n'), ~x) => With([d = FreeFactors(coth(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c * d ^ (~n - 1))) * Subst(Antiderivative(SubstFor(1 / ((~x) ^ ~n * (1 - d ^ 2 * (~x) ^ 2)), coth(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, coth(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(coth(~c * (~a + ~b * ~x)) / d, ~u, ~x, True) && TryPureTanSubst(ActivateTrig(~u) * tanh(~c * (~a + ~b * ~x)) ^ ~n, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && IntegerQ(~n)
    If(TrueQ($LoadShowSteps), Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], ShowStep("", "Antiderivative(F(cot(a+b*x)),x)", "-1/b*Subst(Antiderivative(F(x)/(1+x^2),x),x,cot(a+b*x))", Hold( With([d = FreeFactors(cot(v), x)], Dist(-d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1/(1 + d^2*x^2), cot(v)/d, u, x), x), x, cot(v)/d), x)))) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(cot(v), x), u, x, True) && TryPureTanSubst(ActivateTrig(u), x)) <-- SimplifyFlag, Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], With([d = FreeFactors(cot(v), x)], Dist(-d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1/(1 + d^2*x^2), cot(v)/d, u, x), x), x, cot(v)/d), x)) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(cot(v), x), u, x, True) && TryPureTanSubst(ActivateTrig(u), x)))
    If(TrueQ($LoadShowSteps), Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], ShowStep("", "Antiderivative(F(tan(a+b*x)),x)", "1/b*Subst(Antiderivative(F(x)/(1+x^2),x),x,tan(a+b*x))", Hold( With([d = FreeFactors(tan(v), x)], Dist(d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1/(1 + d^2*x^2), tan(v)/d, u, x), x), x, tan(v)/d), x)))) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(tan(v), x), u, x, True) && TryPureTanSubst(ActivateTrig(u), x)) <-- SimplifyFlag, Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], With([d = FreeFactors(tan(v), x)], Dist(d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1/(1 + d^2*x^2), tan(v)/d, u, x), x), x, tan(v)/d), x)) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(tan(v), x), u, x, True) && TryPureTanSubst(ActivateTrig(u), x)))
    @apply_utils Antiderivative((~F)(~(a') + ~(b') * ~x) ^ ~(p') * (~G)(~(c') + ~(d') * ~x) ^ ~(q'), ~x) => Antiderivative(ExpandTrigReduce(ActivateTrig((~F)(~a + ~b * ~x) ^ ~p * (~G)(~c + ~d * ~x) ^ ~q), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && ((EqQ(~F, sin) || EqQ(~F, cos)) && ((EqQ(~G, sin) || EqQ(~G, cos)) && (IGtQ(~p, 0) && IGtQ(~q, 0))))
    @apply_utils Antiderivative((~F)(~(a') + ~(b') * ~x) ^ ~(p') * (~G)(~(c') + ~(d') * ~x) ^ ~(q') * (~H)(~(e') + ~(f') * ~x) ^ ~(r'), ~x) => Antiderivative(ExpandTrigReduce(ActivateTrig((~F)(~a + ~b * ~x) ^ ~p * (~G)(~c + ~d * ~x) ^ ~q * (~H)(~e + ~f * ~x) ^ ~r), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && ((EqQ(~F, sin) || EqQ(~F, cos)) && ((EqQ(~G, sin) || EqQ(~G, cos)) && ((EqQ(~H, sin) || EqQ(~H, cos)) && (IGtQ(~p, 0) && (IGtQ(~q, 0) && IGtQ(~r, 0))))))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(sin(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, sin(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sin(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sin(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (EqQ(~F, cos) || EqQ(~F, cos))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(cos(~c * (~a + ~b * ~x)), ~x)], (-d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, cos(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cos(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cos(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (EqQ(~F, sin) || EqQ(~F, sin))
    @apply_utils Antiderivative(~u * cosh(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(sinh(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sinh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative(~u * sinh(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(cosh(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor(1, cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cosh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(sin(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c)) * Subst(Antiderivative(SubstFor(1 / ~x, sin(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sin(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sin(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (EqQ(~F, cot) || EqQ(~F, cot))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(cos(~c * (~a + ~b * ~x)), ~x)], (-1 / (~b * ~c)) * Subst(Antiderivative(SubstFor(1 / ~x, cos(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cos(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cos(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (EqQ(~F, tan) || EqQ(~F, tan))
    @apply_utils Antiderivative(~u * coth(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(sinh(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c)) * Subst(Antiderivative(SubstFor(1 / ~x, sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sinh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative(~u * tanh(~(c') * (~(a') + ~(b') * ~x)), ~x) => With([d = FreeFactors(cosh(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c)) * Subst(Antiderivative(SubstFor(1 / ~x, cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cosh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(sin(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor((1 - d ^ 2 * (~x) ^ 2) ^ ((~n - 1) / 2), sin(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sin(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sin(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && (NonsumQ(~u) && (EqQ(~F, cos) || EqQ(~F, cos))))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(sin(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor((1 - d ^ 2 * (~x) ^ 2) ^ ((-(~n) - 1) / 2), sin(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sin(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sin(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && (NonsumQ(~u) && (EqQ(~F, sec) || EqQ(~F, sec))))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(cos(~c * (~a + ~b * ~x)), ~x)], (-d / (~b * ~c)) * Subst(Antiderivative(SubstFor((1 - d ^ 2 * (~x) ^ 2) ^ ((~n - 1) / 2), cos(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cos(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cos(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && (NonsumQ(~u) && (EqQ(~F, sin) || EqQ(~F, sin))))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(cos(~c * (~a + ~b * ~x)), ~x)], (-d / (~b * ~c)) * Subst(Antiderivative(SubstFor((1 - d ^ 2 * (~x) ^ 2) ^ ((-(~n) - 1) / 2), cos(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cos(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cos(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && (NonsumQ(~u) && (EqQ(~F, csc) || EqQ(~F, csc))))
    @apply_utils Antiderivative(~u * cosh(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(sinh(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor((1 + d ^ 2 * (~x) ^ 2) ^ ((~n - 1) / 2), sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sinh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && NonsumQ(~u))
    @apply_utils Antiderivative(~u * sech(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(sinh(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor((1 + d ^ 2 * (~x) ^ 2) ^ ((-(~n) - 1) / 2), sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sinh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && NonsumQ(~u))
    @apply_utils Antiderivative(~u * sinh(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(cosh(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor((-1 + d ^ 2 * (~x) ^ 2) ^ ((~n - 1) / 2), cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cosh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && NonsumQ(~u))
    @apply_utils Antiderivative(~u * csch(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(cosh(~c * (~a + ~b * ~x)), ~x)], (d / (~b * ~c)) * Subst(Antiderivative(SubstFor((-1 + d ^ 2 * (~x) ^ 2) ^ ((-(~n) - 1) / 2), cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cosh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && NonsumQ(~u))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(sin(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c * d ^ (~n - 1))) * Subst(Antiderivative(SubstFor((1 - d ^ 2 * (~x) ^ 2) ^ ((~n - 1) / 2) / (~x) ^ ~n, sin(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sin(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sin(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && (NonsumQ(~u) && (EqQ(~F, cot) || EqQ(~F, cot))))
    @apply_utils Antiderivative(~u * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(cos(~c * (~a + ~b * ~x)), ~x)], (-1 / (~b * ~c * d ^ (~n - 1))) * Subst(Antiderivative(SubstFor((1 - d ^ 2 * (~x) ^ 2) ^ ((~n - 1) / 2) / (~x) ^ ~n, cos(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cos(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cos(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && (NonsumQ(~u) && (EqQ(~F, tan) || EqQ(~F, tan))))
    @apply_utils Antiderivative(~u * coth(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(sinh(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c * d ^ (~n - 1))) * Subst(Antiderivative(SubstFor((1 + d ^ 2 * (~x) ^ 2) ^ ((~n - 1) / 2) / (~x) ^ ~n, sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, sinh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(sinh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && NonsumQ(~u))
    @apply_utils Antiderivative(~u * tanh(~(c') * (~(a') + ~(b') * ~x)) ^ ~n, ~x) => With([d = FreeFactors(cosh(~c * (~a + ~b * ~x)), ~x)], (1 / (~b * ~c * d ^ (~n - 1))) * Subst(Antiderivative(SubstFor((-1 + d ^ 2 * (~x) ^ 2) ^ ((~n - 1) / 2) / (~x) ^ ~n, cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x), ~x), ~x, cosh(~c * (~a + ~b * ~x)) / d) <-- FunctionOfQ(cosh(~c * (~a + ~b * ~x)) / d, ~u, ~x)) <-- FreeQ([~a, ~b, ~c], ~x) && (IntegerQ((~n - 1) / 2) && NonsumQ(~u))
    @apply_utils Antiderivative(~u * (~v + ~(d') * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~(n')), ~x) => With([e = FreeFactors(sin(~c * (~a + ~b * ~x)), ~x)], Antiderivative(ActivateTrig(~u * ~v), ~x) + ~d * Antiderivative(ActivateTrig(~u) * cos(~c * (~a + ~b * ~x)) ^ ~n, ~x) <-- FunctionOfQ(sin(~c * (~a + ~b * ~x)) / e, ~u, ~x)) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && (Not(FreeQ(~v, ~x)) && (IntegerQ((~n - 1) / 2) && (NonsumQ(~u) && (EqQ(~F, cos) || EqQ(~F, cos)))))
    @apply_utils Antiderivative(~u * (~v + ~(d') * (~F)(~(c') * (~(a') + ~(b') * ~x)) ^ ~(n')), ~x) => With([e = FreeFactors(cos(~c * (~a + ~b * ~x)), ~x)], Antiderivative(ActivateTrig(~u * ~v), ~x) + ~d * Antiderivative(ActivateTrig(~u) * sin(~c * (~a + ~b * ~x)) ^ ~n, ~x) <-- FunctionOfQ(cos(~c * (~a + ~b * ~x)) / e, ~u, ~x)) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && (Not(FreeQ(~v, ~x)) && (IntegerQ((~n - 1) / 2) && (NonsumQ(~u) && (EqQ(~F, sin) || EqQ(~F, sin)))))
    If(TrueQ($LoadShowSteps), Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], ShowStep("", "Antiderivative(F(sin(a+b*x))*cos(a+b*x),x)", "Subst(Antiderivative(F(x),x),x,sin(a+b*x))/b", Hold( With([d = FreeFactors(sin(v), x)], Dist(d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1, sin(v)/d, u/cos(v), x), x), x, sin(v)/d), x)))) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(sin(v), x), u/cos(v), x)) <-- SimplifyFlag, Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], With([d = FreeFactors(sin(v), x)], Dist(d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1, sin(v)/d, u/cos(v), x), x), x, sin(v)/d), x)) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(sin(v), x), u/cos(v), x)))
    If(TrueQ($LoadShowSteps), Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], ShowStep("", "Antiderivative(F(cos(a+b*x))*sin(a+b*x),x)", "-Subst(Antiderivative(F(x),x),x,cos(a+b*x))/b", Hold( With([d = FreeFactors(cos(v), x)], Dist(-d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1, cos(v)/d, u/sin(v), x), x), x, cos(v)/d), x)))) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(cos(v), x), u/sin(v), x)) <-- SimplifyFlag, Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], With([d = FreeFactors(cos(v), x)], Dist(-d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1, cos(v)/d, u/sin(v), x), x), x, cos(v)/d), x)) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(cos(v), x), u/sin(v), x)))
    @apply_utils Antiderivative(~(u') * (~(a') + ~(b') * cos(~(d') + ~(e') * ~x) ^ 2 + ~(c') * sin(~(d') + ~(e') * ~x) ^ 2) ^ ~(p'), ~x) => (~a + ~c) ^ ~p * Antiderivative(ActivateTrig(~u), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && EqQ(~b - ~c, 0)
    @apply_utils Antiderivative(~(u') * (~(a') + ~(b') * tan(~(d') + ~(e') * ~x) ^ 2 + ~(c') * sec(~(d') + ~(e') * ~x) ^ 2) ^ ~(p'), ~x) => (~a + ~c) ^ ~p * Antiderivative(ActivateTrig(~u), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && EqQ(~b + ~c, 0)
    @apply_utils Antiderivative(~(u') * (~(a') + ~(b') * cot(~(d') + ~(e') * ~x) ^ 2 + ~(c') * csc(~(d') + ~(e') * ~x) ^ 2) ^ ~(p'), ~x) => (~a + ~c) ^ ~p * Antiderivative(ActivateTrig(~u), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && EqQ(~b + ~c, 0)
    @apply_utils Antiderivative(~u / ~y, ~x) => With([q = DerivativeDivides(ActivateTrig(~y), ActivateTrig(~u), ~x)], q * log(RemoveContent(ActivateTrig(~y), ~x)) <-- Not(FalseQ(q))) <-- Not(InertTrigFreeQ(~u))
    @apply_utils Antiderivative(~u / (~y * ~w), ~x) => With([q = DerivativeDivides(ActivateTrig(~y * ~w), ActivateTrig(~u), ~x)], q * log(RemoveContent(ActivateTrig(~y * ~w), ~x)) <-- Not(FalseQ(q))) <-- Not(InertTrigFreeQ(~u))
    @apply_utils Antiderivative(~u * (~y) ^ ~(m'), ~x) => With([q = DerivativeDivides(ActivateTrig(~y), ActivateTrig(~u), ~x)], (q * ActivateTrig((~y) ^ (~m + 1))) / (~m + 1) <-- Not(FalseQ(q))) <-- FreeQ(~m, ~x) && (NeQ(~m, -1) && Not(InertTrigFreeQ(~u)))
    @apply_utils Antiderivative(~u * (~y) ^ ~(m') * (~z) ^ ~(n'), ~x) => With([q = DerivativeDivides(ActivateTrig(~y * ~z), ActivateTrig(~u * (~z) ^ (~n - ~m)), ~x)], (q * ActivateTrig((~y) ^ (~m + 1) * (~z) ^ (~m + 1))) / (~m + 1) <-- Not(FalseQ(q))) <-- FreeQ([~m, ~n], ~x) && (NeQ(~m, -1) && Not(InertTrigFreeQ(~u)))
    @apply_utils Antiderivative(~(u') * (~(a') * (~F)(~(c') + ~(d') * ~x) ^ ~p) ^ ~n, ~x) => With([v = ActivateTrig((~F)(~c + ~d * ~x))], (((~a) ^ IntPart(~n) * (v / NonfreeFactors(v, ~x)) ^ (~p * IntPart(~n)) * (~a * v ^ ~p) ^ FracPart(~n)) / NonfreeFactors(v, ~x) ^ (~p * FracPart(~n))) * Antiderivative(ActivateTrig(~u) * NonfreeFactors(v, ~x) ^ (~n * ~p), ~x)) <-- FreeQ([~a, ~c, ~d, ~n, ~p], ~x) && (InertTrigQ(~F) && (Not(IntegerQ(~n)) && IntegerQ(~p)))
    @apply_utils Antiderivative(~(u') * (~(a') * (~(b') * (~F)(~(c') + ~(d') * ~x)) ^ ~p) ^ ~(n'), ~x) => With([v = ActivateTrig((~F)(~c + ~d * ~x))], (((~a) ^ IntPart(~n) * (~a * (~b * v) ^ ~p) ^ FracPart(~n)) / (~b * v) ^ (~p * FracPart(~n))) * Antiderivative(ActivateTrig(~u) * (~b * v) ^ (~n * ~p), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~n, ~p], ~x) && (InertTrigQ(~F) && (Not(IntegerQ(~n)) && Not(IntegerQ(~p))))
    If(TrueQ($LoadShowSteps), Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], ShowStep("", "Antiderivative(F(tan(a+b*x)),x)", "1/b*Subst(Antiderivative(F(x)/(1+x^2),x),x,tan(a+b*x))", Hold( With([d = FreeFactors(tan(v), x)], Dist(d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1/(1 + d^2*x^2), tan(v)/d, u, x), x), x, tan(v)/d), x)))) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(tan(v), x), u, x)) <-- SimplifyFlag && InverseFunctionFreeQ(u, x) && Not( MatchQ(u, (~v')*((~c')*tan((~w))^(~n')*tan((~z))^(~n'))^(~p') <-- FreeQ([c, p], x) && IntegerQ(n) && LinearQ(w, x) && EqQ(z, 2*w))), Antiderivative((~u), ~x) := With([v = FunctionOfTrig(u, x)], With([d = FreeFactors(tan(v), x)], Dist(d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1/(1 + d^2*x^2), tan(v)/d, u, x), x), x, tan(v)/d), x)) <-- Not(FalseQ(v)) && FunctionOfQ(NonfreeFactors(tan(v), x), u, x)) <-- InverseFunctionFreeQ(u, x) && Not( MatchQ(u, (~v')*((~c')*tan((~w))^(~n')*tan((~z))^(~n'))^(~p') <-- FreeQ([c, p], x) && IntegerQ(n) && LinearQ(w, x) && EqQ(z, 2*w))))
    @apply_utils Antiderivative(~u * (~(c') * sin(~v)) ^ ~m, ~x) => With([w = FunctionOfTrig((~u * sin(~v / 2) ^ (2 * ~m)) / (~c * tan(~v / 2)) ^ ~m, ~x)], (((~c * sin(~v)) ^ ~m * (~c * tan(~v / 2)) ^ ~m) / sin(~v / 2) ^ (2 * ~m)) * Antiderivative((~u * sin(~v / 2) ^ (2 * ~m)) / (~c * tan(~v / 2)) ^ ~m, ~x) <-- Not(FalseQ(w)) && FunctionOfQ(NonfreeFactors(tan(w), ~x), (~u * sin(~v / 2) ^ (2 * ~m)) / (~c * tan(~v / 2)) ^ ~m, ~x)) <-- FreeQ(~c, ~x) && (LinearQ(~v, ~x) && (IntegerQ(~m + 1 / 2) && (Not(SumQ(~u)) && InverseFunctionFreeQ(~u, ~x))))
    @apply_utils Antiderivative(~(u') * (~(a') * tan(~(c') + ~(d') * ~x) ^ ~(n') + ~(b') * sec(~(c') + ~(d') * ~x) ^ ~(n')) ^ ~p, ~x) => Antiderivative(ActivateTrig(~u) * sec(~c + ~d * ~x) ^ (~n * ~p) * (~b + ~a * sin(~c + ~d * ~x) ^ ~n) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && IntegersQ(~n, ~p)
    @apply_utils Antiderivative(~(u') * (~(a') * cot(~(c') + ~(d') * ~x) ^ ~(n') + ~(b') * csc(~(c') + ~(d') * ~x) ^ ~(n')) ^ ~p, ~x) => Antiderivative(ActivateTrig(~u) * csc(~c + ~d * ~x) ^ (~n * ~p) * (~b + ~a * cos(~c + ~d * ~x) ^ ~n) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d], ~x) && IntegersQ(~n, ~p)
    @apply_utils Antiderivative(~u * (~a * (~F)(~(c') + ~(d') * ~x) ^ ~(p') + ~(b') * (~F)(~(c') + ~(d') * ~x) ^ ~(q')) ^ ~(n'), ~x) => Antiderivative(ActivateTrig(~u * (~F)(~c + ~d * ~x) ^ (~n * ~p) * (~a + ~b * (~F)(~c + ~d * ~x) ^ (~q - ~p)) ^ ~n), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~p, ~q], ~x) && (InertTrigQ(~F) && (IntegerQ(~n) && PosQ(~q - ~p)))
    @apply_utils Antiderivative(~u * (~a * (~F)(~(d') + ~(e') * ~x) ^ ~(p') + ~(b') * (~F)(~(d') + ~(e') * ~x) ^ ~(q') + ~(c') * (~F)(~(d') + ~(e') * ~x) ^ ~(r')) ^ ~(n'), ~x) => Antiderivative(ActivateTrig(~u * (~F)(~d + ~e * ~x) ^ (~n * ~p) * (~a + ~b * (~F)(~d + ~e * ~x) ^ (~q - ~p) + ~c * (~F)(~d + ~e * ~x) ^ (~r - ~p)) ^ ~n), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p, ~q, ~r], ~x) && (InertTrigQ(~F) && (IntegerQ(~n) && (PosQ(~q - ~p) && PosQ(~r - ~p))))
    @apply_utils Antiderivative(~u * (~a + ~(b') * (~F)(~(d') + ~(e') * ~x) ^ ~(p') + ~(c') * (~F)(~(d') + ~(e') * ~x) ^ ~(q')) ^ ~(n'), ~x) => Antiderivative(ActivateTrig(~u * (~F)(~d + ~e * ~x) ^ (~n * ~p) * (~b + ~a * (~F)(~d + ~e * ~x) ^ -(~p) + ~c * (~F)(~d + ~e * ~x) ^ (~q - ~p)) ^ ~n), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p, ~q], ~x) && (InertTrigQ(~F) && (IntegerQ(~n) && NegQ(~p)))
    @apply_utils Antiderivative(~(u') * (~(a') * cos(~(c') + ~(d') * ~x) + ~(b') * sin(~(c') + ~(d') * ~x)) ^ ~(n'), ~x) => Antiderivative(ActivateTrig(~u) * (~a * ℯ ^ ((-(~a) / ~b) * (~c + ~d * ~x))) ^ ~n, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~n], ~x) && EqQ((~a) ^ 2 + (~b) ^ 2, 0)
    @apply_utils Antiderivative(~u, ~x) => Antiderivative(TrigSimplify(~u), ~x) <-- TrigSimplifyQ(~u)
    @apply_utils Antiderivative(~(u') * (~a * ~v) ^ ~p, ~x) => With([uu = ActivateTrig(~u), vv = ActivateTrig(~v)], (((~a) ^ IntPart(~p) * (~a * vv) ^ FracPart(~p)) / vv ^ FracPart(~p)) * Antiderivative(uu * vv ^ ~p, ~x)) <-- FreeQ([~a, ~p], ~x) && (Not(IntegerQ(~p)) && Not(InertTrigFreeQ(~v)))
    @apply_utils Antiderivative(~(u') * ((~v) ^ ~m) ^ ~p, ~x) => With([uu = ActivateTrig(~u), vv = ActivateTrig(~v)], ((vv ^ ~m) ^ FracPart(~p) / vv ^ (~m * FracPart(~p))) * Antiderivative(uu * vv ^ (~m * ~p), ~x)) <-- FreeQ([~m, ~p], ~x) && (Not(IntegerQ(~p)) && Not(InertTrigFreeQ(~v)))
    @apply_utils Antiderivative(~(u') * ((~v) ^ ~(m') * (~w) ^ ~(n')) ^ ~p, ~x) => With([uu = ActivateTrig(~u), vv = ActivateTrig(~v), ww = ActivateTrig(~w)], ((vv ^ ~m * ww ^ ~n) ^ FracPart(~p) / (vv ^ (~m * FracPart(~p)) * ww ^ (~n * FracPart(~p)))) * Antiderivative(uu * vv ^ (~m * ~p) * ww ^ (~n * ~p), ~x)) <-- FreeQ([~m, ~n, ~p], ~x) && (Not(IntegerQ(~p)) && (Not(InertTrigFreeQ(~v)) || Not(InertTrigFreeQ(~w))))
    @apply_utils Antiderivative(~u, ~x) => With([v = ExpandTrig(~u, ~x)], Antiderivative(v, ~x) <-- SumQ(v)) <-- Not(InertTrigFreeQ(~u))
    If(TrueQ($LoadShowSteps), Antiderivative((~u), ~x) := With([w = Block([$ShowSteps = False, $StepCounter = Null], Antiderivative(SubstFor( 1/(1 + FreeFactors(tan(FunctionOfTrig(u, x)/2), x)^2*x^2), tan(FunctionOfTrig(u, x)/2)/ FreeFactors(tan(FunctionOfTrig(u, x)/2), x), u, x), x))], ShowStep("", "Antiderivative(F(sin(a+b*x),cos(a+b*x)),x)", "2/b*Subst(Antiderivative(1/(1+x^2)*F(2*x/(1+x^2),(1-x^2)/(1+x^2)),x),x, tan((a+b*x)/2))", Hold( Module([v = FunctionOfTrig(u, x), d], d = FreeFactors(tan(v/2), x); Dist(2*d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1/(1 + d^2*x^2), tan(v/2)/d, u, x), x), x, tan(v/2)/d), x)))) <-- CalculusFreeQ(w, x)) <-- SimplifyFlag && InverseFunctionFreeQ(u, x) && Not(FalseQ(FunctionOfTrig(u, x))), Antiderivative((~u), ~x) := With([w = Block([$ShowSteps = False, $StepCounter = Null], Antiderivative(SubstFor( 1/(1 + FreeFactors(tan(FunctionOfTrig(u, x)/2), x)^2*x^2), tan(FunctionOfTrig(u, x)/2)/ FreeFactors(tan(FunctionOfTrig(u, x)/2), x), u, x), x))], Module([v = FunctionOfTrig(u, x), d], d = FreeFactors(tan(v/2), x); Dist(2*d/Coefficient(v, x, 1), Subst(Antiderivative(SubstFor(1/(1 + d^2*x^2), tan(v/2)/d, u, x), x), x, tan(v/2)/d), x)) <-- CalculusFreeQ(w, x)) <-- InverseFunctionFreeQ(u, x) && Not(FalseQ(FunctionOfTrig(u, x))))
    #= If(TrueQ($LoadShowSteps), Antiderivative((~u),~x) := With([v=FunctionOfTrig(u,x)], ShowStep("","Antiderivative(F(sin(a+b*x),cos(a+b*x)),x)","2/b*Subst(Antiderivative(1/(1+x^ 2)*F(2*x/(1+x^2),(1-x^2)/(1+x^2)),x),x,tan((a+b*x)/2))",Hold( With([d=FreeFactors(tan(v/2),x)], Dist(2*d/Coefficient(v,x,1),Subst(Antiderivative(SubstFor(1/(1+d^2*x^2),tan(v/ 2)/d,u,x),x),x,tan(v/2)/d),x)))) <-- Not(FalseQ(v))) <-- SimplifyFlag &&  InverseFunctionFreeQ(u,x), Antiderivative((~u),~x) := With([v=FunctionOfTrig(u,x)], With([d=FreeFactors(tan(v/2),x)], Dist(2*d/Coefficient(v,x,1),Subst(Antiderivative(SubstFor(1/(1+d^2*x^2),tan(v/ 2)/d,u,x),x),x,tan(v/2)/d),x)) <-- Not(FalseQ(v))) <--  InverseFunctionFreeQ(u,x)) =#
    @apply_utils Antiderivative(~u, ~x) => With([v = ActivateTrig(~u)], CannotIntegrate(v, ~x)) <-- Not(InertTrigFreeQ(~u))
end
