text:
int_rules_7_3_1 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 7.3.1*u*(a+b*arctanh(c*x^n))^p =#
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => ~x * (~a + ~b * atanh(~c * ~x)) ^ ~p - ~b * ~c * ~p * Antiderivative((~x * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c], ~x) && IGtQ(~p, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => ~x * (~a + ~b * acoth(~c * ~x)) ^ ~p - ~b * ~c * ~p * Antiderivative((~x * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c], ~x) && IGtQ(~p, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) / ~x, ~x) => (~a * log(~x) - (~b / 2) * PolyLog(2, -(~c) * ~x)) + (~b / 2) * PolyLog(2, ~c * ~x) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) / ~x, ~x) => (~a * log(~x) + (~b / 2) * PolyLog(2, -1 / (~c * ~x))) - (~b / 2) * PolyLog(2, 1 / (~c * ~x)) <-- FreeQ([~a, ~b, ~c], ~x)
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p / ~x, ~x) => 2 * (~a + ~b * atanh(~c * ~x)) ^ ~p * atanh(1 - 2 / (1 - ~c * ~x)) - 2 * ~b * ~c * ~p * Antiderivative(((~a + ~b * atanh(~c * ~x)) ^ (~p - 1) * atanh(1 - 2 / (1 - ~c * ~x))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c], ~x) && IGtQ(~p, 1)
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p / ~x, ~x) => 2 * (~a + ~b * acoth(~c * ~x)) ^ ~p * acoth(1 - 2 / (1 - ~c * ~x)) - 2 * ~b * ~c * ~p * Antiderivative(((~a + ~b * acoth(~c * ~x)) ^ (~p - 1) * acoth(1 - 2 / (1 - ~c * ~x))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c], ~x) && IGtQ(~p, 1)
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => ((~d * ~x) ^ (~m + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d * (~m + 1)) - ((~b * ~c * ~p) / (~d * (~m + 1))) * Antiderivative(((~d * ~x) ^ (~m + 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m], ~x) && (IGtQ(~p, 0) && ((EqQ(~p, 1) || IntegerQ(~m)) && NeQ(~m, -1)))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => ((~d * ~x) ^ (~m + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d * (~m + 1)) - ((~b * ~c * ~p) / (~d * (~m + 1))) * Antiderivative(((~d * ~x) ^ (~m + 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m], ~x) && (IGtQ(~p, 0) && ((EqQ(~p, 1) || IntegerQ(~m)) && NeQ(~m, -1)))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') / (~d + ~(e') * ~x), ~x) => (-((~a + ~b * atanh(~c * ~x)) ^ ~p) * log(2 / (1 + (~e * ~x) / ~d))) / ~e + ((~b * ~c * ~p) / ~e) * Antiderivative(((~a + ~b * atanh(~c * ~x)) ^ (~p - 1) * log(2 / (1 + (~e * ~x) / ~d))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') / (~d + ~(e') * ~x), ~x) => (-((~a + ~b * acoth(~c * ~x)) ^ ~p) * log(2 / (1 + (~e * ~x) / ~d))) / ~e + ((~b * ~c * ~p) / ~e) * Antiderivative(((~a + ~b * acoth(~c * ~x)) ^ (~p - 1) * log(2 / (1 + (~e * ~x) / ~d))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) / (~d + ~(e') * ~x), ~x) => ((-((~a + ~b * atanh(~c * ~x))) * log(2 / (1 + ~c * ~x))) / ~e + ((~b * ~c) / ~e) * Antiderivative(log(2 / (1 + ~c * ~x)) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) + ((~a + ~b * atanh(~c * ~x)) * log((2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / ~e) - ((~b * ~c) / ~e) * Antiderivative(log((2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && NeQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) / (~d + ~(e') * ~x), ~x) => ((-((~a + ~b * acoth(~c * ~x))) * log(2 / (1 + ~c * ~x))) / ~e + ((~b * ~c) / ~e) * Antiderivative(log(2 / (1 + ~c * ~x)) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) + ((~a + ~b * acoth(~c * ~x)) * log((2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / ~e) - ((~b * ~c) / ~e) * Antiderivative(log((2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && NeQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ 2 / (~d + ~(e') * ~x), ~x) => (((-((~a + ~b * atanh(~c * ~x)) ^ 2) * log(2 / (1 + ~c * ~x))) / ~e + (~b * (~a + ~b * atanh(~c * ~x)) * PolyLog(2, 1 - 2 / (1 + ~c * ~x))) / ~e + ((~b) ^ 2 * PolyLog(3, 1 - 2 / (1 + ~c * ~x))) / (2 * ~e) + ((~a + ~b * atanh(~c * ~x)) ^ 2 * log((2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / ~e) - (~b * (~a + ~b * atanh(~c * ~x)) * PolyLog(2, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / ~e) - ((~b) ^ 2 * PolyLog(3, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / (2 * ~e) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && NeQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ 2 / (~d + ~(e') * ~x), ~x) => (((-((~a + ~b * acoth(~c * ~x)) ^ 2) * log(2 / (1 + ~c * ~x))) / ~e + (~b * (~a + ~b * acoth(~c * ~x)) * PolyLog(2, 1 - 2 / (1 + ~c * ~x))) / ~e + ((~b) ^ 2 * PolyLog(3, 1 - 2 / (1 + ~c * ~x))) / (2 * ~e) + ((~a + ~b * acoth(~c * ~x)) ^ 2 * log((2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / ~e) - (~b * (~a + ~b * acoth(~c * ~x)) * PolyLog(2, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / ~e) - ((~b) ^ 2 * PolyLog(3, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / (2 * ~e) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && NeQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ 3 / (~d + ~(e') * ~x), ~x) => ((((-((~a + ~b * atanh(~c * ~x)) ^ 3) * log(2 / (1 + ~c * ~x))) / ~e + (3 * ~b * (~a + ~b * atanh(~c * ~x)) ^ 2 * PolyLog(2, 1 - 2 / (1 + ~c * ~x))) / (2 * ~e) + (3 * (~b) ^ 2 * (~a + ~b * atanh(~c * ~x)) * PolyLog(3, 1 - 2 / (1 + ~c * ~x))) / (2 * ~e) + (3 * (~b) ^ 3 * PolyLog(4, 1 - 2 / (1 + ~c * ~x))) / (4 * ~e) + ((~a + ~b * atanh(~c * ~x)) ^ 3 * log((2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / ~e) - (3 * ~b * (~a + ~b * atanh(~c * ~x)) ^ 2 * PolyLog(2, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / (2 * ~e)) - (3 * (~b) ^ 2 * (~a + ~b * atanh(~c * ~x)) * PolyLog(3, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / (2 * ~e)) - (3 * (~b) ^ 3 * PolyLog(4, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / (4 * ~e) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && NeQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ 3 / (~d + ~(e') * ~x), ~x) => ((((-((~a + ~b * acoth(~c * ~x)) ^ 3) * log(2 / (1 + ~c * ~x))) / ~e + (3 * ~b * (~a + ~b * acoth(~c * ~x)) ^ 2 * PolyLog(2, 1 - 2 / (1 + ~c * ~x))) / (2 * ~e) + (3 * (~b) ^ 2 * (~a + ~b * acoth(~c * ~x)) * PolyLog(3, 1 - 2 / (1 + ~c * ~x))) / (2 * ~e) + (3 * (~b) ^ 3 * PolyLog(4, 1 - 2 / (1 + ~c * ~x))) / (4 * ~e) + ((~a + ~b * acoth(~c * ~x)) ^ 3 * log((2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / ~e) - (3 * ~b * (~a + ~b * acoth(~c * ~x)) ^ 2 * PolyLog(2, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / (2 * ~e)) - (3 * (~b) ^ 2 * (~a + ~b * acoth(~c * ~x)) * PolyLog(3, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / (2 * ~e)) - (3 * (~b) ^ 3 * PolyLog(4, 1 - (2 * ~c * (~d + ~e * ~x)) / ((~c * ~d + ~e) * (1 + ~c * ~x)))) / (4 * ~e) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && NeQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0)
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => ((~d + ~e * ~x) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x))) / (~e * (~q + 1)) - ((~b * ~c) / (~e * (~q + 1))) * Antiderivative((~d + ~e * ~x) ^ (~q + 1) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~q], ~x) && NeQ(~q, -1)
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => ((~d + ~e * ~x) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x))) / (~e * (~q + 1)) - ((~b * ~c) / (~e * (~q + 1))) * Antiderivative((~d + ~e * ~x) ^ (~q + 1) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~q], ~x) && NeQ(~q, -1)
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p, ~x) => ((~d + ~e * ~x) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~e * (~q + 1)) - ((~b * ~c * ~p) / (~e * (~q + 1))) * Antiderivative(ExpandIntegrand((~a + ~b * atanh(~c * ~x)) ^ (~p - 1), (~d + ~e * ~x) ^ (~q + 1) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 1) && (IntegerQ(~q) && NeQ(~q, -1)))
    @apply_utils Antiderivative((~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p, ~x) => ((~d + ~e * ~x) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~e * (~q + 1)) - ((~b * ~c * ~p) / (~e * (~q + 1))) * Antiderivative(ExpandIntegrand((~a + ~b * acoth(~c * ~x)) ^ (~p - 1), (~d + ~e * ~x) ^ (~q + 1) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 1) && (IntegerQ(~q) && NeQ(~q, -1)))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~(m') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * ~x), ~x) => (~f / ~e) * Antiderivative((~f * ~x) ^ (~m - 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) - ((~d * ~f) / ~e) * Antiderivative(((~f * ~x) ^ (~m - 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d + ~e * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0) && GtQ(~m, 0)))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~(m') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * ~x), ~x) => (~f / ~e) * Antiderivative((~f * ~x) ^ (~m - 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) - ((~d * ~f) / ~e) * Antiderivative(((~f * ~x) ^ (~m - 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d + ~e * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0) && GtQ(~m, 0)))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') / (~x * (~d + ~(e') * ~x)), ~x) => ((~a + ~b * atanh(~c * ~x)) ^ ~p * log(2 - 2 / (1 + (~e * ~x) / ~d))) / ~d - ((~b * ~c * ~p) / ~d) * Antiderivative(((~a + ~b * atanh(~c * ~x)) ^ (~p - 1) * log(2 - 2 / (1 + (~e * ~x) / ~d))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') / (~x * (~d + ~(e') * ~x)), ~x) => ((~a + ~b * acoth(~c * ~x)) ^ ~p * log(2 - 2 / (1 + (~e * ~x) / ~d))) / ~d - ((~b * ~c * ~p) / ~d) * Antiderivative(((~a + ~b * acoth(~c * ~x)) ^ (~p - 1) * log(2 - 2 / (1 + (~e * ~x) / ~d))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * ~x), ~x) => (1 / ~d) * Antiderivative((~f * ~x) ^ ~m * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) - (~e / (~d * ~f)) * Antiderivative(((~f * ~x) ^ (~m + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d + ~e * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0) && LtQ(~m, -1)))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * ~x), ~x) => (1 / ~d) * Antiderivative((~f * ~x) ^ ~m * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) - (~e / (~d * ~f)) * Antiderivative(((~f * ~x) ^ (~m + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d + ~e * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0) && LtQ(~m, -1)))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => With([u = IntHide((~f * ~x) ^ ~m * (~d + ~e * ~x) ^ ~q, ~x)], Dist(~a + ~b * atanh(~c * ~x), u) - ~b * ~c * Antiderivative(SimplifyIntegrand(u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~q], ~x) && (NeQ(~q, -1) && (IntegerQ(2 * ~m) && (IGtQ(~m, 0) && IGtQ(~q, 0) || ILtQ(~m + ~q + 1, 0) && LtQ(~m * ~q, 0))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => With([u = IntHide((~f * ~x) ^ ~m * (~d + ~e * ~x) ^ ~q, ~x)], Dist(~a + ~b * acoth(~c * ~x), u) - ~b * ~c * Antiderivative(SimplifyIntegrand(u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~q], ~x) && (NeQ(~q, -1) && (IntegerQ(2 * ~m) && (IGtQ(~m, 0) && IGtQ(~q, 0) || ILtQ(~m + ~q + 1, 0) && LtQ(~m * ~q, 0))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * ~x) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p, ~x) => With([u = IntHide((~f * ~x) ^ ~m * (~d + ~e * ~x) ^ ~q, ~x)], Dist((~a + ~b * atanh(~c * ~x)) ^ ~p, u) - ~b * ~c * ~p * Antiderivative(ExpandIntegrand((~a + ~b * atanh(~c * ~x)) ^ (~p - 1), u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~q], ~x) && (IGtQ(~p, 1) && (EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0) && (IntegersQ(~m, ~q) && (NeQ(~m, -1) && (NeQ(~q, -1) && (ILtQ(~m + ~q + 1, 0) && LtQ(~m * ~q, 0)))))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * ~x) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p, ~x) => With([u = IntHide((~f * ~x) ^ ~m * (~d + ~e * ~x) ^ ~q, ~x)], Dist((~a + ~b * acoth(~c * ~x)) ^ ~p, u) - ~b * ~c * ~p * Antiderivative(ExpandIntegrand((~a + ~b * acoth(~c * ~x)) ^ (~p - 1), u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~q], ~x) && (IGtQ(~p, 1) && (EqQ((~c) ^ 2 * (~d) ^ 2 - (~e) ^ 2, 0) && (IntegersQ(~m, ~q) && (NeQ(~m, -1) && (NeQ(~q, -1) && (ILtQ(~m + ~q + 1, 0) && LtQ(~m * ~q, 0)))))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~a + ~b * atanh(~c * ~x)) ^ ~p, (~f * ~x) ^ ~m * (~d + ~e * ~x) ^ ~q, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (IGtQ(~p, 0) && (IntegerQ(~q) && (GtQ(~q, 0) || (NeQ(~a, 0) || IntegerQ(~m)))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * ~x) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~a + ~b * acoth(~c * ~x)) ^ ~p, (~f * ~x) ^ ~m * (~d + ~e * ~x) ^ ~q, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (IGtQ(~p, 0) && (IntegerQ(~q) && (GtQ(~q, 0) || (NeQ(~a, 0) || IntegerQ(~m)))))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => (~b * (~d + ~e * (~x) ^ 2) ^ ~q) / (2 * ~c * ~q * (2 * ~q + 1)) + (~x * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x))) / (2 * ~q + 1) + ((2 * ~d * ~q) / (2 * ~q + 1)) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * atanh(~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~q, 0))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => (~b * (~d + ~e * (~x) ^ 2) ^ ~q) / (2 * ~c * ~q * (2 * ~q + 1)) + (~x * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x))) / (2 * ~q + 1) + ((2 * ~d * ~q) / (2 * ~q + 1)) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * acoth(~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~q, 0))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p, ~x) => ((~b * ~p * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / (2 * ~c * ~q * (2 * ~q + 1)) + (~x * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (2 * ~q + 1) + ((2 * ~d * ~q) / (2 * ~q + 1)) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x)) - (((~b) ^ 2 * ~d * ~p * (~p - 1)) / (2 * ~q * (2 * ~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p - 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~q, 0) && GtQ(~p, 1)))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p, ~x) => ((~b * ~p * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / (2 * ~c * ~q * (2 * ~q + 1)) + (~x * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (2 * ~q + 1) + ((2 * ~d * ~q) / (2 * ~q + 1)) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x)) - (((~b) ^ 2 * ~d * ~p * (~p - 1)) / (2 * ~q * (2 * ~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p - 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~q, 0) && GtQ(~p, 1)))
    #= Antiderivative(((~a')+(~b')*atanh((~c')*(~x)))^(~p')/((~d)+(~e')*(~x)^2),~x) :=  1/(c*d)*Subst(Antiderivative((a+b*x)^p,x),x,atanh(c*x)) <--  FreeQ([a,b,c,d,e,p],x) && EqQ(c^2*d+e,0) =#
    #= Antiderivative(((~a')+(~b')*acoth((~c')*(~x)))^(~p')/((~d)+(~e')*(~x)^2),~x) :=  1/(c*d)*Subst(Antiderivative((a+b*x)^p,x),x,acoth(c*x)) <--  FreeQ([a,b,c,d,e,p],x) && EqQ(c^2*d+e,0) =#
    @apply_utils Antiderivative(1 / ((~d + ~(e') * (~x) ^ 2) * (~(a') + ~(b') * atanh(~(c') * ~x))), ~x) => log(RemoveContent(~a + ~b * atanh(~c * ~x), ~x)) / (~b * ~c * ~d) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && EqQ((~c) ^ 2 * ~d + ~e, 0)
    @apply_utils Antiderivative(1 / ((~d + ~(e') * (~x) ^ 2) * (~(a') + ~(b') * acoth(~(c') * ~x))), ~x) => log(RemoveContent(~a + ~b * acoth(~c * ~x), ~x)) / (~b * ~c * ~d) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && EqQ((~c) ^ 2 * ~d + ~e, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') / (~d + ~(e') * (~x) ^ 2), ~x) => (~a + ~b * atanh(~c * ~x)) ^ (~p + 1) / (~b * ~c * ~d * (~p + 1)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && NeQ(~p, -1))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') / (~d + ~(e') * (~x) ^ 2), ~x) => (~a + ~b * acoth(~c * ~x)) ^ (~p + 1) / (~b * ~c * ~d * (~p + 1)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && NeQ(~p, -1))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => ((-2 * (~a + ~b * atanh(~c * ~x)) * atan(sqrt(1 - ~c * ~x) / sqrt(1 + ~c * ~x))) / (~c * sqrt(~d)) - (im * ~b * PolyLog(2, (-im * sqrt(1 - ~c * ~x)) / sqrt(1 + ~c * ~x))) / (~c * sqrt(~d))) + (im * ~b * PolyLog(2, (im * sqrt(1 - ~c * ~x)) / sqrt(1 + ~c * ~x))) / (~c * sqrt(~d)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~d, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => ((-2 * (~a + ~b * acoth(~c * ~x)) * atan(sqrt(1 - ~c * ~x) / sqrt(1 + ~c * ~x))) / (~c * sqrt(~d)) - (im * ~b * PolyLog(2, (-im * sqrt(1 - ~c * ~x)) / sqrt(1 + ~c * ~x))) / (~c * sqrt(~d))) + (im * ~b * PolyLog(2, (im * sqrt(1 - ~c * ~x)) / sqrt(1 + ~c * ~x))) / (~c * sqrt(~d)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~d, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (1 / (~c * sqrt(~d))) * Subst(Antiderivative((~a + ~b * ~x) ^ ~p * sech(~x), ~x), ~x, atanh(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && GtQ(~d, 0)))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => ((-(~x) * sqrt(1 - 1 / ((~c) ^ 2 * (~x) ^ 2))) / sqrt(~d + ~e * (~x) ^ 2)) * Subst(Antiderivative((~a + ~b * ~x) ^ ~p * csch(~x), ~x), ~x, acoth(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && GtQ(~d, 0)))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (sqrt(1 - (~c) ^ 2 * (~x) ^ 2) / sqrt(~d + ~e * (~x) ^ 2)) * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ ~p / sqrt(1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && Not(GtQ(~d, 0))))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (sqrt(1 - (~c) ^ 2 * (~x) ^ 2) / sqrt(~d + ~e * (~x) ^ 2)) * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ ~p / sqrt(1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && Not(GtQ(~d, 0))))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') / (~d + ~(e') * (~x) ^ 2) ^ 2, ~x) => ((~x * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (2 * ~d * (~d + ~e * (~x) ^ 2)) + (~a + ~b * atanh(~c * ~x)) ^ (~p + 1) / (2 * ~b * ~c * (~d) ^ 2 * (~p + 1))) - ((~b * ~c * ~p) / 2) * Antiderivative((~x * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / (~d + ~e * (~x) ^ 2) ^ 2, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') / (~d + ~(e') * (~x) ^ 2) ^ 2, ~x) => ((~x * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (2 * ~d * (~d + ~e * (~x) ^ 2)) + (~a + ~b * acoth(~c * ~x)) ^ (~p + 1) / (2 * ~b * ~c * (~d) ^ 2 * (~p + 1))) - ((~b * ~c * ~p) / 2) * Antiderivative((~x * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / (~d + ~e * (~x) ^ 2) ^ 2, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) / (~d + ~(e') * (~x) ^ 2) ^ (3 / 2), ~x) => -(~b) / (~c * ~d * sqrt(~d + ~e * (~x) ^ 2)) + (~x * (~a + ~b * atanh(~c * ~x))) / (~d * sqrt(~d + ~e * (~x) ^ 2)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && EqQ((~c) ^ 2 * ~d + ~e, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) / (~d + ~(e') * (~x) ^ 2) ^ (3 / 2), ~x) => -(~b) / (~c * ~d * sqrt(~d + ~e * (~x) ^ 2)) + (~x * (~a + ~b * acoth(~c * ~x))) / (~d * sqrt(~d + ~e * (~x) ^ 2)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && EqQ((~c) ^ 2 * ~d + ~e, 0)
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => ((-(~b) * (~d + ~e * (~x) ^ 2) ^ (~q + 1)) / (4 * ~c * ~d * (~q + 1) ^ 2) - (~x * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x))) / (2 * ~d * (~q + 1))) + ((2 * ~q + 3) / (2 * ~d * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~q, -1) && NeQ(~q, -3 / 2)))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => ((-(~b) * (~d + ~e * (~x) ^ 2) ^ (~q + 1)) / (4 * ~c * ~d * (~q + 1) ^ 2) - (~x * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x))) / (2 * ~d * (~q + 1))) + ((2 * ~q + 3) / (2 * ~d * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~q, -1) && NeQ(~q, -3 / 2)))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p / (~d + ~(e') * (~x) ^ 2) ^ (3 / 2), ~x) => (-(~b) * ~p * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / (~c * ~d * sqrt(~d + ~e * (~x) ^ 2)) + (~x * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d * sqrt(~d + ~e * (~x) ^ 2)) + (~b) ^ 2 * ~p * (~p - 1) * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ (~p - 2) / (~d + ~e * (~x) ^ 2) ^ (3 / 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 1))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p / (~d + ~(e') * (~x) ^ 2) ^ (3 / 2), ~x) => (-(~b) * ~p * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / (~c * ~d * sqrt(~d + ~e * (~x) ^ 2)) + (~x * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d * sqrt(~d + ~e * (~x) ^ 2)) + (~b) ^ 2 * ~p * (~p - 1) * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ (~p - 2) / (~d + ~e * (~x) ^ 2) ^ (3 / 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 1))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p, ~x) => ((-(~b) * ~p * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / (4 * ~c * ~d * (~q + 1) ^ 2) - (~x * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (2 * ~d * (~q + 1))) + ((2 * ~q + 3) / (2 * ~d * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) + (((~b) ^ 2 * ~p * (~p - 1)) / (4 * (~q + 1) ^ 2)) * Antiderivative((~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ (~p - 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~q, -1) && (GtQ(~p, 1) && NeQ(~q, -3 / 2))))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p, ~x) => ((-(~b) * ~p * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / (4 * ~c * ~d * (~q + 1) ^ 2) - (~x * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (2 * ~d * (~q + 1))) + ((2 * ~q + 3) / (2 * ~d * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) + (((~b) ^ 2 * ~p * (~p - 1)) / (4 * (~q + 1) ^ 2)) * Antiderivative((~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ (~p - 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~q, -1) && (GtQ(~p, 1) && NeQ(~q, -3 / 2))))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p, ~x) => ((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) + ((2 * ~c * (~q + 1)) / (~b * (~p + 1))) * Antiderivative(~x * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~q, -1) && LtQ(~p, -1)))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p, ~x) => ((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) + ((2 * ~c * (~q + 1)) / (~b * (~p + 1))) * Antiderivative(~x * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~q, -1) && LtQ(~p, -1)))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => ((~d) ^ ~q / ~c) * Subst(Antiderivative((~a + ~b * ~x) ^ ~p / cosh(~x) ^ (2 * (~q + 1)), ~x), ~x, atanh(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (ILtQ(2 * (~q + 1), 0) && (IntegerQ(~q) || GtQ(~d, 0))))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => (((~d) ^ (~q + 1 / 2) * sqrt(1 - (~c) ^ 2 * (~x) ^ 2)) / sqrt(~d + ~e * (~x) ^ 2)) * Antiderivative((1 - (~c) ^ 2 * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (ILtQ(2 * (~q + 1), 0) && Not(IntegerQ(~q) || GtQ(~d, 0))))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => (-((-(~d)) ^ ~q) / ~c) * Subst(Antiderivative((~a + ~b * ~x) ^ ~p / sinh(~x) ^ (2 * (~q + 1)), ~x), ~x, acoth(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (ILtQ(2 * (~q + 1), 0) && IntegerQ(~q)))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => ((-((-(~d)) ^ (~q + 1 / 2)) * ~x * sqrt(((~c) ^ 2 * (~x) ^ 2 - 1) / ((~c) ^ 2 * (~x) ^ 2))) / sqrt(~d + ~e * (~x) ^ 2)) * Subst(Antiderivative((~a + ~b * ~x) ^ ~p / sinh(~x) ^ (2 * (~q + 1)), ~x), ~x, acoth(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (ILtQ(2 * (~q + 1), 0) && Not(IntegerQ(~q))))
    @apply_utils Antiderivative(atanh(~(c') * ~x) / (~(d') + ~(e') * (~x) ^ 2), ~x) => (1 / 2) * Antiderivative(log(1 + ~c * ~x) / (~d + ~e * (~x) ^ 2), ~x) - (1 / 2) * Antiderivative(log(1 - ~c * ~x) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~c, ~d, ~e], ~x)
    @apply_utils Antiderivative(acoth(~(c') * ~x) / (~(d') + ~(e') * (~x) ^ 2), ~x) => (1 / 2) * Antiderivative(log(1 + 1 / (~c * ~x)) / (~d + ~e * (~x) ^ 2), ~x) - (1 / 2) * Antiderivative(log(1 - 1 / (~c * ~x)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~c, ~d, ~e], ~x)
    @apply_utils Antiderivative((~a + ~(b') * atanh(~(c') * ~x)) / (~(d') + ~(e') * (~x) ^ 2), ~x) => ~a * Antiderivative(1 / (~d + ~e * (~x) ^ 2), ~x) + ~b * Antiderivative(atanh(~c * ~x) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x)
    @apply_utils Antiderivative((~a + ~(b') * acoth(~(c') * ~x)) / (~(d') + ~(e') * (~x) ^ 2), ~x) => ~a * Antiderivative(1 / (~d + ~e * (~x) ^ 2), ~x) + ~b * Antiderivative(acoth(~c * ~x) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x)
    @apply_utils Antiderivative((~(d') + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => With([u = IntHide((~d + ~e * (~x) ^ 2) ^ ~q, ~x)], Dist(~a + ~b * atanh(~c * ~x), u, ~x) - ~b * ~c * Antiderivative(u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IntegerQ(~q) || ILtQ(~q + 1 / 2, 0))
    @apply_utils Antiderivative((~(d') + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => With([u = IntHide((~d + ~e * (~x) ^ 2) ^ ~q, ~x)], Dist(~a + ~b * acoth(~c * ~x), u, ~x) - ~b * ~c * Antiderivative(u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IntegerQ(~q) || ILtQ(~q + 1 / 2, 0))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~a + ~b * atanh(~c * ~x)) ^ ~p, (~d + ~e * (~x) ^ 2) ^ ~q, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IntegerQ(~q) && IGtQ(~p, 0))
    @apply_utils Antiderivative((~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~a + ~b * acoth(~c * ~x)) ^ ~p, (~d + ~e * (~x) ^ 2) ^ ~q, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IntegerQ(~q) && IGtQ(~p, 0))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~f) ^ 2 / ~e) * Antiderivative((~f * ~x) ^ (~m - 2) * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) - ((~d * (~f) ^ 2) / ~e) * Antiderivative(((~f * ~x) ^ (~m - 2) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (GtQ(~p, 0) && GtQ(~m, 1))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~f) ^ 2 / ~e) * Antiderivative((~f * ~x) ^ (~m - 2) * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) - ((~d * (~f) ^ 2) / ~e) * Antiderivative(((~f * ~x) ^ (~m - 2) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (GtQ(~p, 0) && GtQ(~m, 1))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => (1 / ~d) * Antiderivative((~f * ~x) ^ ~m * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) - (~e / (~d * (~f) ^ 2)) * Antiderivative(((~f * ~x) ^ (~m + 2) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (GtQ(~p, 0) && LtQ(~m, -1))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => (1 / ~d) * Antiderivative((~f * ~x) ^ ~m * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) - (~e / (~d * (~f) ^ 2)) * Antiderivative(((~f * ~x) ^ (~m + 2) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (GtQ(~p, 0) && LtQ(~m, -1))
    @apply_utils Antiderivative((~x * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => (~a + ~b * atanh(~c * ~x)) ^ (~p + 1) / (~b * ~e * (~p + 1)) + (1 / (~c * ~d)) * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ ~p / (1 - ~c * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && IGtQ(~p, 0))
    @apply_utils Antiderivative((~x * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => (~a + ~b * acoth(~c * ~x)) ^ (~p + 1) / (~b * ~e * (~p + 1)) + (1 / (~c * ~d)) * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ ~p / (1 - ~c * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && IGtQ(~p, 0))
    @apply_utils Antiderivative((~x * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p) / (~d + ~(e') * (~x) ^ 2), ~x) => (~x * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) - (1 / (~b * ~c * ~d * (~p + 1))) * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (Not(IGtQ(~p, 0)) && NeQ(~p, -1)))
    @apply_utils Antiderivative((~x * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p) / (~d + ~(e') * (~x) ^ 2), ~x) => (-(~x) * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) - (1 / (~b * ~c * ~d * (~p + 1))) * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (Not(IGtQ(~p, 0)) && NeQ(~p, -1)))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') / (~x * (~d + ~(e') * (~x) ^ 2)), ~x) => (~a + ~b * atanh(~c * ~x)) ^ (~p + 1) / (~b * ~d * (~p + 1)) + (1 / ~d) * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ ~p / (~x * (1 + ~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') / (~x * (~d + ~(e') * (~x) ^ 2)), ~x) => (~a + ~b * acoth(~c * ~x)) ^ (~p + 1) / (~b * ~d * (~p + 1)) + (1 / ~d) * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ ~p / (~x * (1 + ~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 0))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~f * ~x) ^ ~m * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) - ((~f * ~m) / (~b * ~c * ~d * (~p + 1))) * Antiderivative((~f * ~x) ^ (~m - 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && LtQ(~p, -1))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~f * ~x) ^ ~m * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) - ((~f * ~m) / (~b * ~c * ~d * (~p + 1))) * Antiderivative((~f * ~x) ^ (~m - 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && LtQ(~p, -1))
    @apply_utils Antiderivative(((~x) ^ ~(m') * (~(a') + ~(b') * atanh(~(c') * ~x))) / (~d + ~(e') * (~x) ^ 2), ~x) => Antiderivative(ExpandIntegrand(~a + ~b * atanh(~c * ~x), (~x) ^ ~m / (~d + ~e * (~x) ^ 2), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IntegerQ(~m) && Not(EqQ(~m, 1) && NeQ(~a, 0)))
    @apply_utils Antiderivative(((~x) ^ ~(m') * (~(a') + ~(b') * acoth(~(c') * ~x))) / (~d + ~(e') * (~x) ^ 2), ~x) => Antiderivative(ExpandIntegrand(~a + ~b * acoth(~c * ~x), (~x) ^ ~m / (~d + ~e * (~x) ^ 2), ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IntegerQ(~m) && Not(EqQ(~m, 1) && NeQ(~a, 0)))
    @apply_utils Antiderivative(~x * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => ((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (2 * ~e * (~q + 1)) + ((~b * ~p) / (2 * ~c * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~q], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~p, 0) && NeQ(~q, -1)))
    @apply_utils Antiderivative(~x * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => ((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (2 * ~e * (~q + 1)) + ((~b * ~p) / (2 * ~c * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~q], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~p, 0) && NeQ(~q, -1)))
    @apply_utils Antiderivative((~x * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p) / (~d + ~(e') * (~x) ^ 2) ^ 2, ~x) => (~x * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1) * (~d + ~e * (~x) ^ 2)) + ((1 + (~c) ^ 2 * (~x) ^ 2) * (~a + ~b * atanh(~c * ~x)) ^ (~p + 2)) / ((~b) ^ 2 * ~e * (~p + 1) * (~p + 2) * (~d + ~e * (~x) ^ 2)) + (4 / ((~b) ^ 2 * (~p + 1) * (~p + 2))) * Antiderivative((~x * (~a + ~b * atanh(~c * ~x)) ^ (~p + 2)) / (~d + ~e * (~x) ^ 2) ^ 2, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~p, -1) && NeQ(~p, -2)))
    @apply_utils Antiderivative((~x * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p) / (~d + ~(e') * (~x) ^ 2) ^ 2, ~x) => (~x * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1) * (~d + ~e * (~x) ^ 2)) + ((1 + (~c) ^ 2 * (~x) ^ 2) * (~a + ~b * acoth(~c * ~x)) ^ (~p + 2)) / ((~b) ^ 2 * ~e * (~p + 1) * (~p + 2) * (~d + ~e * (~x) ^ 2)) + (4 / ((~b) ^ 2 * (~p + 1) * (~p + 2))) * Antiderivative((~x * (~a + ~b * acoth(~c * ~x)) ^ (~p + 2)) / (~d + ~e * (~x) ^ 2) ^ 2, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~p, -1) && NeQ(~p, -2)))
    @apply_utils Antiderivative((~x) ^ 2 * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => ((-(~b) * (~d + ~e * (~x) ^ 2) ^ (~q + 1)) / (4 * (~c) ^ 3 * ~d * (~q + 1) ^ 2) - (~x * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x))) / (2 * (~c) ^ 2 * ~d * (~q + 1))) + (1 / (2 * (~c) ^ 2 * ~d * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~q, -1) && NeQ(~q, -5 / 2)))
    @apply_utils Antiderivative((~x) ^ 2 * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => ((-(~b) * (~d + ~e * (~x) ^ 2) ^ (~q + 1)) / (4 * (~c) ^ 3 * ~d * (~q + 1) ^ 2) - (~x * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x))) / (2 * (~c) ^ 2 * ~d * (~q + 1))) + (1 / (2 * (~c) ^ 2 * ~d * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (LtQ(~q, -1) && NeQ(~q, -5 / 2)))
    @apply_utils Antiderivative(((~x) ^ 2 * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2) ^ 2, ~x) => (-((~a + ~b * atanh(~c * ~x)) ^ (~p + 1)) / (2 * ~b * (~c) ^ 3 * (~d) ^ 2 * (~p + 1)) + (~x * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (2 * (~c) ^ 2 * ~d * (~d + ~e * (~x) ^ 2))) - ((~b * ~p) / (2 * ~c)) * Antiderivative((~x * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / (~d + ~e * (~x) ^ 2) ^ 2, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 0))
    @apply_utils Antiderivative(((~x) ^ 2 * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2) ^ 2, ~x) => (-((~a + ~b * acoth(~c * ~x)) ^ (~p + 1)) / (2 * ~b * (~c) ^ 3 * (~d) ^ 2 * (~p + 1)) + (~x * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (2 * (~c) ^ 2 * ~d * (~d + ~e * (~x) ^ 2))) - ((~b * ~p) / (2 * ~c)) * Antiderivative((~x * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / (~d + ~e * (~x) ^ 2) ^ 2, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 0))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => ((-(~b) * (~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1)) / (~c * ~d * (~m) ^ 2) + (~f * (~f * ~x) ^ (~m - 1) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x))) / ((~c) ^ 2 * ~d * ~m)) - (((~f) ^ 2 * (~m - 1)) / ((~c) ^ 2 * ~d * ~m)) * Antiderivative((~f * ~x) ^ (~m - 2) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (EqQ(~m + 2 * ~q + 2, 0) && LtQ(~q, -1)))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => ((-(~b) * (~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1)) / (~c * ~d * (~m) ^ 2) + (~f * (~f * ~x) ^ (~m - 1) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x))) / ((~c) ^ 2 * ~d * ~m)) - (((~f) ^ 2 * (~m - 1)) / ((~c) ^ 2 * ~d * ~m)) * Antiderivative((~f * ~x) ^ (~m - 2) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (EqQ(~m + 2 * ~q + 2, 0) && LtQ(~q, -1)))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p, ~x) => ((-(~b) * ~p * (~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / (~c * ~d * (~m) ^ 2) + (~f * (~f * ~x) ^ (~m - 1) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / ((~c) ^ 2 * ~d * ~m) + (((~b) ^ 2 * ~p * (~p - 1)) / (~m) ^ 2) * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ (~p - 2), ~x)) - (((~f) ^ 2 * (~m - 1)) / ((~c) ^ 2 * ~d * ~m)) * Antiderivative((~f * ~x) ^ (~m - 2) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (EqQ(~m + 2 * ~q + 2, 0) && (LtQ(~q, -1) && GtQ(~p, 1))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p, ~x) => ((-(~b) * ~p * (~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / (~c * ~d * (~m) ^ 2) + (~f * (~f * ~x) ^ (~m - 1) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / ((~c) ^ 2 * ~d * ~m) + (((~b) ^ 2 * ~p * (~p - 1)) / (~m) ^ 2) * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ (~p - 2), ~x)) - (((~f) ^ 2 * (~m - 1)) / ((~c) ^ 2 * ~d * ~m)) * Antiderivative((~f * ~x) ^ (~m - 2) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (EqQ(~m + 2 * ~q + 2, 0) && (LtQ(~q, -1) && GtQ(~p, 1))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p, ~x) => ((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) - ((~f * ~m) / (~b * ~c * (~p + 1))) * Antiderivative((~f * ~x) ^ (~m - 1) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~q], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (EqQ(~m + 2 * ~q + 2, 0) && LtQ(~p, -1)))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p, ~x) => ((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) - ((~f * ~m) / (~b * ~c * (~p + 1))) * Antiderivative((~f * ~x) ^ (~m - 1) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~q], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (EqQ(~m + 2 * ~q + 2, 0) && LtQ(~p, -1)))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => ((~f * ~x) ^ (~m + 1) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d * (~m + 1)) - ((~b * ~c * ~p) / (~m + 1)) * Antiderivative((~f * ~x) ^ (~m + 1) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~q], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (EqQ(~m + 2 * ~q + 3, 0) && (GtQ(~p, 0) && NeQ(~m, -1))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => ((~f * ~x) ^ (~m + 1) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d * ~f * (~m + 1)) - ((~b * ~c * ~p) / (~f * (~m + 1))) * Antiderivative((~f * ~x) ^ (~m + 1) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~q], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (EqQ(~m + 2 * ~q + 3, 0) && (GtQ(~p, 0) && NeQ(~m, -1))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * sqrt(~d + ~(e') * (~x) ^ 2) * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => (((~f * ~x) ^ (~m + 1) * sqrt(~d + ~e * (~x) ^ 2) * (~a + ~b * atanh(~c * ~x))) / (~f * (~m + 2)) - ((~b * ~c * ~d) / (~f * (~m + 2))) * Antiderivative((~f * ~x) ^ (~m + 1) / sqrt(~d + ~e * (~x) ^ 2), ~x)) + (~d / (~m + 2)) * Antiderivative(((~f * ~x) ^ ~m * (~a + ~b * atanh(~c * ~x))) / sqrt(~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && NeQ(~m, -2))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * sqrt(~d + ~(e') * (~x) ^ 2) * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => (((~f * ~x) ^ (~m + 1) * sqrt(~d + ~e * (~x) ^ 2) * (~a + ~b * acoth(~c * ~x))) / (~f * (~m + 2)) - ((~b * ~c * ~d) / (~f * (~m + 2))) * Antiderivative((~f * ~x) ^ (~m + 1) / sqrt(~d + ~e * (~x) ^ 2), ~x)) + (~d / (~m + 2)) * Antiderivative(((~f * ~x) ^ ~m * (~a + ~b * acoth(~c * ~x))) / sqrt(~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && NeQ(~m, -2))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && IGtQ(~q, 1)))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && IGtQ(~q, 1)))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => ~d * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) - (((~c) ^ 2 * ~d) / (~f) ^ 2) * Antiderivative((~f * ~x) ^ (~m + 2) * (~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~q, 0) && (IGtQ(~p, 0) && (RationalQ(~m) || EqQ(~p, 1) && IntegerQ(~q)))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => ~d * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) - (((~c) ^ 2 * ~d) / (~f) ^ 2) * Antiderivative((~f * ~x) ^ (~m + 2) * (~d + ~e * (~x) ^ 2) ^ (~q - 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~q, 0) && (IGtQ(~p, 0) && (RationalQ(~m) || EqQ(~p, 1) && IntegerQ(~q)))))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (-(~f) * (~f * ~x) ^ (~m - 1) * sqrt(~d + ~e * (~x) ^ 2) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / ((~c) ^ 2 * ~d * ~m) + ((~b * ~f * ~p) / (~c * ~m)) * Antiderivative(((~f * ~x) ^ (~m - 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / sqrt(~d + ~e * (~x) ^ 2), ~x) + (((~f) ^ 2 * (~m - 1)) / ((~c) ^ 2 * ~m)) * Antiderivative(((~f * ~x) ^ (~m - 2) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / sqrt(~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~p, 0) && GtQ(~m, 1)))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (-(~f) * (~f * ~x) ^ (~m - 1) * sqrt(~d + ~e * (~x) ^ 2) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / ((~c) ^ 2 * ~d * ~m) + ((~b * ~f * ~p) / (~c * ~m)) * Antiderivative(((~f * ~x) ^ (~m - 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / sqrt(~d + ~e * (~x) ^ 2), ~x) + (((~f) ^ 2 * (~m - 1)) / ((~c) ^ 2 * ~m)) * Antiderivative(((~f * ~x) ^ (~m - 2) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / sqrt(~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~p, 0) && GtQ(~m, 1)))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) / (~x * sqrt(~d + ~(e') * (~x) ^ 2)), ~x) => ((-2 / sqrt(~d)) * (~a + ~b * atanh(~c * ~x)) * atanh(sqrt(1 - ~c * ~x) / sqrt(1 + ~c * ~x)) + (~b / sqrt(~d)) * PolyLog(2, -(sqrt(1 - ~c * ~x)) / sqrt(1 + ~c * ~x))) - (~b / sqrt(~d)) * PolyLog(2, sqrt(1 - ~c * ~x) / sqrt(1 + ~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~d, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) / (~x * sqrt(~d + ~(e') * (~x) ^ 2)), ~x) => ((-2 / sqrt(~d)) * (~a + ~b * acoth(~c * ~x)) * atanh(sqrt(1 - ~c * ~x) / sqrt(1 + ~c * ~x)) + (~b / sqrt(~d)) * PolyLog(2, -(sqrt(1 - ~c * ~x)) / sqrt(1 + ~c * ~x))) - (~b / sqrt(~d)) * PolyLog(2, sqrt(1 - ~c * ~x) / sqrt(1 + ~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~d, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~p / (~x * sqrt(~d + ~(e') * (~x) ^ 2)), ~x) => (1 / sqrt(~d)) * Subst(Antiderivative((~a + ~b * ~x) ^ ~p * csch(~x), ~x), ~x, atanh(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && GtQ(~d, 0)))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~p / (~x * sqrt(~d + ~(e') * (~x) ^ 2)), ~x) => ((-(~c) * ~x * sqrt(1 - 1 / ((~c) ^ 2 * (~x) ^ 2))) / sqrt(~d + ~e * (~x) ^ 2)) * Subst(Antiderivative((~a + ~b * ~x) ^ ~p * sech(~x), ~x), ~x, acoth(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && GtQ(~d, 0)))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') / (~x * sqrt(~d + ~(e') * (~x) ^ 2)), ~x) => (sqrt(1 - (~c) ^ 2 * (~x) ^ 2) / sqrt(~d + ~e * (~x) ^ 2)) * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ ~p / (~x * sqrt(1 - (~c) ^ 2 * (~x) ^ 2)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && Not(GtQ(~d, 0))))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') / (~x * sqrt(~d + ~(e') * (~x) ^ 2)), ~x) => (sqrt(1 - (~c) ^ 2 * (~x) ^ 2) / sqrt(~d + ~e * (~x) ^ 2)) * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ ~p / (~x * sqrt(1 - (~c) ^ 2 * (~x) ^ 2)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && Not(GtQ(~d, 0))))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') / ((~x) ^ 2 * sqrt(~d + ~(e') * (~x) ^ 2)), ~x) => (-(sqrt(~d + ~e * (~x) ^ 2)) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d * ~x) + ~b * ~c * ~p * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ (~p - 1) / (~x * sqrt(~d + ~e * (~x) ^ 2)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 0))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') / ((~x) ^ 2 * sqrt(~d + ~(e') * (~x) ^ 2)), ~x) => (-(sqrt(~d + ~e * (~x) ^ 2)) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d * ~x) + ~b * ~c * ~p * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ (~p - 1) / (~x * sqrt(~d + ~e * (~x) ^ 2)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && GtQ(~p, 0))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (((~f * ~x) ^ (~m + 1) * sqrt(~d + ~e * (~x) ^ 2) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d * ~f * (~m + 1)) - ((~b * ~c * ~p) / (~f * (~m + 1))) * Antiderivative(((~f * ~x) ^ (~m + 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / sqrt(~d + ~e * (~x) ^ 2), ~x)) + (((~c) ^ 2 * (~m + 2)) / ((~f) ^ 2 * (~m + 1))) * Antiderivative(((~f * ~x) ^ (~m + 2) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / sqrt(~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~p, 0) && (LtQ(~m, -1) && NeQ(~m, -2))))
    @apply_utils Antiderivative(((~(f') * ~x) ^ ~m * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / sqrt(~d + ~(e') * (~x) ^ 2), ~x) => (((~f * ~x) ^ (~m + 1) * sqrt(~d + ~e * (~x) ^ 2) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d * ~f * (~m + 1)) - ((~b * ~c * ~p) / (~f * (~m + 1))) * Antiderivative(((~f * ~x) ^ (~m + 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / sqrt(~d + ~e * (~x) ^ 2), ~x)) + (((~c) ^ 2 * (~m + 2)) / ((~f) ^ 2 * (~m + 1))) * Antiderivative(((~f * ~x) ^ (~m + 2) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / sqrt(~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (GtQ(~p, 0) && (LtQ(~m, -1) && NeQ(~m, -2))))
    @apply_utils Antiderivative((~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => (1 / ~e) * Antiderivative((~x) ^ (~m - 2) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) - (~d / ~e) * Antiderivative((~x) ^ (~m - 2) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IntegersQ(~p, 2 * ~q) && (LtQ(~q, -1) && (IGtQ(~m, 1) && NeQ(~p, -1)))))
    @apply_utils Antiderivative((~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => (1 / ~e) * Antiderivative((~x) ^ (~m - 2) * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) - (~d / ~e) * Antiderivative((~x) ^ (~m - 2) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IntegersQ(~p, 2 * ~q) && (LtQ(~q, -1) && (IGtQ(~m, 1) && NeQ(~p, -1)))))
    @apply_utils Antiderivative((~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => (1 / ~d) * Antiderivative((~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) - (~e / ~d) * Antiderivative((~x) ^ (~m + 2) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IntegersQ(~p, 2 * ~q) && (LtQ(~q, -1) && (ILtQ(~m, 0) && NeQ(~p, -1)))))
    @apply_utils Antiderivative((~x) ^ ~m * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => (1 / ~d) * Antiderivative((~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) - (~e / ~d) * Antiderivative((~x) ^ (~m + 2) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IntegersQ(~p, 2 * ~q) && (LtQ(~q, -1) && (ILtQ(~m, 0) && NeQ(~p, -1)))))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => (((~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) - (~m / (~b * ~c * (~p + 1))) * Antiderivative((~x) ^ (~m - 1) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1), ~x)) + ((~c * (~m + 2 * ~q + 2)) / (~b * (~p + 1))) * Antiderivative((~x) ^ (~m + 1) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IntegerQ(~m) && (LtQ(~q, -1) && (LtQ(~p, -1) && NeQ(~m + 2 * ~q + 2, 0)))))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => (((~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1)) / (~b * ~c * ~d * (~p + 1)) - (~m / (~b * ~c * (~p + 1))) * Antiderivative((~x) ^ (~m - 1) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1), ~x)) + ((~c * (~m + 2 * ~q + 2)) / (~b * (~p + 1))) * Antiderivative((~x) ^ (~m + 1) * (~d + ~e * (~x) ^ 2) ^ ~q * (~a + ~b * acoth(~c * ~x)) ^ (~p + 1), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IntegerQ(~m) && (LtQ(~q, -1) && (LtQ(~p, -1) && NeQ(~m + 2 * ~q + 2, 0)))))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => ((~d) ^ ~q / (~c) ^ (~m + 1)) * Subst(Antiderivative(((~a + ~b * ~x) ^ ~p * sinh(~x) ^ ~m) / cosh(~x) ^ (~m + 2 * (~q + 1)), ~x), ~x, atanh(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~m, 0) && (ILtQ(~m + 2 * ~q + 1, 0) && (IntegerQ(~q) || GtQ(~d, 0)))))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => (((~d) ^ (~q + 1 / 2) * sqrt(1 - (~c) ^ 2 * (~x) ^ 2)) / sqrt(~d + ~e * (~x) ^ 2)) * Antiderivative((~x) ^ ~m * (1 - (~c) ^ 2 * (~x) ^ 2) ^ ~q * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~m, 0) && (ILtQ(~m + 2 * ~q + 1, 0) && Not(IntegerQ(~q) || GtQ(~d, 0)))))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => (-((-(~d)) ^ ~q) / (~c) ^ (~m + 1)) * Subst(Antiderivative(((~a + ~b * ~x) ^ ~p * cosh(~x) ^ ~m) / sinh(~x) ^ (~m + 2 * (~q + 1)), ~x), ~x, acoth(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~m, 0) && (ILtQ(~m + 2 * ~q + 1, 0) && IntegerQ(~q))))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~q * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => ((-((-(~d)) ^ (~q + 1 / 2)) * ~x * sqrt(((~c) ^ 2 * (~x) ^ 2 - 1) / ((~c) ^ 2 * (~x) ^ 2))) / ((~c) ^ ~m * sqrt(~d + ~e * (~x) ^ 2))) * Subst(Antiderivative(((~a + ~b * ~x) ^ ~p * cosh(~x) ^ ~m) / sinh(~x) ^ (~m + 2 * (~q + 1)), ~x), ~x, acoth(~c * ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~p], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~m, 0) && (ILtQ(~m + 2 * ~q + 1, 0) && Not(IntegerQ(~q)))))
    @apply_utils Antiderivative(~x * (~(d') + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => ((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * atanh(~c * ~x))) / (2 * ~e * (~q + 1)) - ((~b * ~c) / (2 * ~e * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~q], ~x) && NeQ(~q, -1)
    @apply_utils Antiderivative(~x * (~(d') + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => ((~d + ~e * (~x) ^ 2) ^ (~q + 1) * (~a + ~b * acoth(~c * ~x))) / (2 * ~e * (~q + 1)) - ((~b * ~c) / (2 * ~e * (~q + 1))) * Antiderivative((~d + ~e * (~x) ^ 2) ^ (~q + 1) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~q], ~x) && NeQ(~q, -1)
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => With([u = IntHide((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q, ~x)], Dist(~a + ~b * atanh(~c * ~x), u, ~x) - ~b * ~c * Antiderivative(SimplifyIntegrand(u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~q], ~x) && (IGtQ(~q, 0) && Not(ILtQ((~m - 1) / 2, 0) && GtQ(~m + 2 * ~q + 3, 0)) || (IGtQ((~m + 1) / 2, 0) && Not(ILtQ(~q, 0) && GtQ(~m + 2 * ~q + 3, 0)) || ILtQ((~m + 2 * ~q + 1) / 2, 0) && Not(ILtQ((~m - 1) / 2, 0))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => With([u = IntHide((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q, ~x)], Dist(~a + ~b * acoth(~c * ~x), u, ~x) - ~b * ~c * Antiderivative(SimplifyIntegrand(u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~q], ~x) && (IGtQ(~q, 0) && Not(ILtQ((~m - 1) / 2, 0) && GtQ(~m + 2 * ~q + 3, 0)) || (IGtQ((~m + 1) / 2, 0) && Not(ILtQ(~q, 0) && GtQ(~m + 2 * ~q + 3, 0)) || ILtQ((~m + 2 * ~q + 1) / 2, 0) && Not(ILtQ((~m - 1) / 2, 0))))
    @apply_utils Antiderivative((~x * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2) ^ 2, ~x) => (1 / (4 * (~d) ^ 2 * Rt(-(~e) / ~d, 2))) * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ ~p / (1 - Rt(-(~e) / ~d, 2) * ~x) ^ 2, ~x) - (1 / (4 * (~d) ^ 2 * Rt(-(~e) / ~d, 2))) * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ ~p / (1 + Rt(-(~e) / ~d, 2) * ~x) ^ 2, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && IGtQ(~p, 0)
    @apply_utils Antiderivative((~x * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2) ^ 2, ~x) => (1 / (4 * (~d) ^ 2 * Rt(-(~e) / ~d, 2))) * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ ~p / (1 - Rt(-(~e) / ~d, 2) * ~x) ^ 2, ~x) - (1 / (4 * (~d) ^ 2 * Rt(-(~e) / ~d, 2))) * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ ~p / (1 + Rt(-(~e) / ~d, 2) * ~x) ^ 2, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && IGtQ(~p, 0)
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => With([u = ExpandIntegrand((~a + ~b * atanh(~c * ~x)) ^ ~p, (~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q, ~x)], Antiderivative(u, ~x) <-- SumQ(u)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (IntegerQ(~q) && (IGtQ(~p, 0) && (GtQ(~q, 0) || IntegerQ(~m))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => With([u = ExpandIntegrand((~a + ~b * acoth(~c * ~x)) ^ ~p, (~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q, ~x)], Antiderivative(u, ~x) <-- SumQ(u)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m], ~x) && (IntegerQ(~q) && (IGtQ(~p, 0) && (GtQ(~q, 0) || IntegerQ(~m))))
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~a + ~(b') * atanh(~(c') * ~x)), ~x) => ~a * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q, ~x) + ~b * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q * atanh(~c * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~q], ~x)
    @apply_utils Antiderivative((~(f') * ~x) ^ ~(m') * (~d + ~(e') * (~x) ^ 2) ^ ~(q') * (~a + ~(b') * acoth(~(c') * ~x)), ~x) => ~a * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q, ~x) + ~b * Antiderivative((~f * ~x) ^ ~m * (~d + ~e * (~x) ^ 2) ^ ~q * acoth(~c * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~m, ~q], ~x)
    @apply_utils Antiderivative(((~f + ~(g') * ~x) ^ ~(m') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => Antiderivative(ExpandIntegrand((~a + ~b * atanh(~c * ~x)) ^ ~p / (~d + ~e * (~x) ^ 2), (~f + ~g * ~x) ^ ~m, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && IGtQ(~m, 0)))
    @apply_utils Antiderivative(((~f + ~(g') * ~x) ^ ~(m') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => Antiderivative(ExpandIntegrand((~a + ~b * acoth(~c * ~x)) ^ ~p / (~d + ~e * (~x) ^ 2), (~f + ~g * ~x) ^ ~m, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && IGtQ(~m, 0)))
    @apply_utils Antiderivative((atanh(~u) * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => (1 / 2) * Antiderivative((log(1 + ~u) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) - (1 / 2) * Antiderivative((log(1 - ~u) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~u) ^ 2 - (1 - 2 / (1 + ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative((acoth(~u) * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => (1 / 2) * Antiderivative((log(SimplifyIntegrand(1 + 1 / ~u, ~x)) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) - (1 / 2) * Antiderivative((log(SimplifyIntegrand(1 - 1 / ~u, ~x)) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~u) ^ 2 - (1 - 2 / (1 + ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative((atanh(~u) * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => (1 / 2) * Antiderivative((log(1 + ~u) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) - (1 / 2) * Antiderivative((log(1 - ~u) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~u) ^ 2 - (1 - 2 / (1 - ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative((acoth(~u) * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => (1 / 2) * Antiderivative((log(SimplifyIntegrand(1 + 1 / ~u, ~x)) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) - (1 / 2) * Antiderivative((log(SimplifyIntegrand(1 - 1 / ~u, ~x)) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~u) ^ 2 - (1 - 2 / (1 - ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') * log(~f + ~(g') * ~x)) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~a + ~b * atanh(~c * ~x)) ^ (~p + 1) * log(~f + ~g * ~x)) / (~b * ~c * ~d * (~p + 1)) - (~g / (~b * ~c * ~d * (~p + 1))) * Antiderivative((~a + ~b * atanh(~c * ~x)) ^ (~p + 1) / (~f + ~g * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~c) ^ 2 * (~f) ^ 2 - (~g) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') * log(~f + ~(g') * ~x)) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~a + ~b * acoth(~c * ~x)) ^ (~p + 1) * log(~f + ~g * ~x)) / (~b * ~c * ~d * (~p + 1)) - (~g / (~b * ~c * ~d * (~p + 1))) * Antiderivative((~a + ~b * acoth(~c * ~x)) ^ (~p + 1) / (~f + ~g * ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~c) ^ 2 * (~f) ^ 2 - (~g) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') * log(~u)) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~a + ~b * atanh(~c * ~x)) ^ ~p * PolyLog(2, 1 - ~u)) / (2 * ~c * ~d) - ((~b * ~p) / 2) * Antiderivative(((~a + ~b * atanh(~c * ~x)) ^ (~p - 1) * PolyLog(2, 1 - ~u)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((1 - ~u) ^ 2 - (1 - 2 / (1 + ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') * log(~u)) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~a + ~b * acoth(~c * ~x)) ^ ~p * PolyLog(2, 1 - ~u)) / (2 * ~c * ~d) - ((~b * ~p) / 2) * Antiderivative(((~a + ~b * acoth(~c * ~x)) ^ (~p - 1) * PolyLog(2, 1 - ~u)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((1 - ~u) ^ 2 - (1 - 2 / (1 + ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') * log(~u)) / (~d + ~(e') * (~x) ^ 2), ~x) => (-((~a + ~b * atanh(~c * ~x)) ^ ~p) * PolyLog(2, 1 - ~u)) / (2 * ~c * ~d) + ((~b * ~p) / 2) * Antiderivative(((~a + ~b * atanh(~c * ~x)) ^ (~p - 1) * PolyLog(2, 1 - ~u)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((1 - ~u) ^ 2 - (1 - 2 / (1 - ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') * log(~u)) / (~d + ~(e') * (~x) ^ 2), ~x) => (-((~a + ~b * acoth(~c * ~x)) ^ ~p) * PolyLog(2, 1 - ~u)) / (2 * ~c * ~d) + ((~b * ~p) / 2) * Antiderivative(((~a + ~b * acoth(~c * ~x)) ^ (~p - 1) * PolyLog(2, 1 - ~u)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((1 - ~u) ^ 2 - (1 - 2 / (1 - ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') * PolyLog(~k, ~u)) / (~d + ~(e') * (~x) ^ 2), ~x) => (-((~a + ~b * atanh(~c * ~x)) ^ ~p) * PolyLog(~k + 1, ~u)) / (2 * ~c * ~d) + ((~b * ~p) / 2) * Antiderivative(((~a + ~b * atanh(~c * ~x)) ^ (~p - 1) * PolyLog(~k + 1, ~u)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~k], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~u) ^ 2 - (1 - 2 / (1 + ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') * PolyLog(~k, ~u)) / (~d + ~(e') * (~x) ^ 2), ~x) => (-((~a + ~b * acoth(~c * ~x)) ^ ~p) * PolyLog(~k + 1, ~u)) / (2 * ~c * ~d) + ((~b * ~p) / 2) * Antiderivative(((~a + ~b * acoth(~c * ~x)) ^ (~p - 1) * PolyLog(~k + 1, ~u)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~k], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~u) ^ 2 - (1 - 2 / (1 + ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p') * PolyLog(~k, ~u)) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~a + ~b * atanh(~c * ~x)) ^ ~p * PolyLog(~k + 1, ~u)) / (2 * ~c * ~d) - ((~b * ~p) / 2) * Antiderivative(((~a + ~b * atanh(~c * ~x)) ^ (~p - 1) * PolyLog(~k + 1, ~u)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~k], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~u) ^ 2 - (1 - 2 / (1 - ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative(((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p') * PolyLog(~k, ~u)) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~a + ~b * acoth(~c * ~x)) ^ ~p * PolyLog(~k + 1, ~u)) / (2 * ~c * ~d) - ((~b * ~p) / 2) * Antiderivative(((~a + ~b * acoth(~c * ~x)) ^ (~p - 1) * PolyLog(~k + 1, ~u)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~k], ~x) && (IGtQ(~p, 0) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && EqQ((~u) ^ 2 - (1 - 2 / (1 - ~c * ~x)) ^ 2, 0)))
    @apply_utils Antiderivative(1 / ((~d + ~(e') * (~x) ^ 2) * (~(a') + ~(b') * acoth(~(c') * ~x)) * (~(a') + ~(b') * atanh(~(c') * ~x))), ~x) => (-(log(~a + ~b * acoth(~c * ~x))) + log(~a + ~b * atanh(~c * ~x))) / ((~b) ^ 2 * ~c * ~d * (acoth(~c * ~x) - atanh(~c * ~x))) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && EqQ((~c) ^ 2 * ~d + ~e, 0)
    @apply_utils Antiderivative(((~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(m') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~a + ~b * acoth(~c * ~x)) ^ (~m + 1) * (~a + ~b * atanh(~c * ~x)) ^ ~p) / (~b * ~c * ~d * (~m + 1)) - (~p / (~m + 1)) * Antiderivative(((~a + ~b * acoth(~c * ~x)) ^ (~m + 1) * (~a + ~b * atanh(~c * ~x)) ^ (~p - 1)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && IGeQ(~m, ~p)))
    @apply_utils Antiderivative(((~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(m') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p')) / (~d + ~(e') * (~x) ^ 2), ~x) => ((~a + ~b * atanh(~c * ~x)) ^ (~m + 1) * (~a + ~b * acoth(~c * ~x)) ^ ~p) / (~b * ~c * ~d * (~m + 1)) - (~p / (~m + 1)) * Antiderivative(((~a + ~b * atanh(~c * ~x)) ^ (~m + 1) * (~a + ~b * acoth(~c * ~x)) ^ (~p - 1)) / (~d + ~e * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e], ~x) && (EqQ((~c) ^ 2 * ~d + ~e, 0) && (IGtQ(~p, 0) && IGtQ(~m, ~p)))
    @apply_utils Antiderivative(atanh(~(a') * ~x) / (~c + ~(d') * (~x) ^ ~(n')), ~x) => (1 / 2) * Antiderivative(log(1 + ~a * ~x) / (~c + ~d * (~x) ^ ~n), ~x) - (1 / 2) * Antiderivative(log(1 - ~a * ~x) / (~c + ~d * (~x) ^ ~n), ~x) <-- FreeQ([~a, ~c, ~d], ~x) && (IntegerQ(~n) && Not(EqQ(~n, 2) && EqQ((~a) ^ 2 * ~c + ~d, 0)))
    @apply_utils Antiderivative(acoth(~(a') * ~x) / (~c + ~(d') * (~x) ^ ~(n')), ~x) => (1 / 2) * Antiderivative(log(1 + 1 / (~a * ~x)) / (~c + ~d * (~x) ^ ~n), ~x) - (1 / 2) * Antiderivative(log(1 - 1 / (~a * ~x)) / (~c + ~d * (~x) ^ ~n), ~x) <-- FreeQ([~a, ~c, ~d], ~x) && (IntegerQ(~n) && Not(EqQ(~n, 2) && EqQ((~a) ^ 2 * ~c + ~d, 0)))
    @apply_utils Antiderivative((log(~(d') * (~x) ^ ~(m')) * atanh(~(c') * (~x) ^ ~(n'))) / ~x, ~x) => (1 / 2) * Antiderivative((log(~d * (~x) ^ ~m) * log(1 + ~c * (~x) ^ ~n)) / ~x, ~x) - (1 / 2) * Antiderivative((log(~d * (~x) ^ ~m) * log(1 - ~c * (~x) ^ ~n)) / ~x, ~x) <-- FreeQ([~c, ~d, ~m, ~n], ~x)
    @apply_utils Antiderivative((log(~(d') * (~x) ^ ~(m')) * acoth(~(c') * (~x) ^ ~(n'))) / ~x, ~x) => (1 / 2) * Antiderivative((log(~d * (~x) ^ ~m) * log(1 + 1 / (~c * (~x) ^ ~n))) / ~x, ~x) - (1 / 2) * Antiderivative((log(~d * (~x) ^ ~m) * log(1 - 1 / (~c * (~x) ^ ~n))) / ~x, ~x) <-- FreeQ([~c, ~d, ~m, ~n], ~x)
    @apply_utils Antiderivative((log(~(d') * (~x) ^ ~(m')) * (~a + ~(b') * atanh(~(c') * (~x) ^ ~(n')))) / ~x, ~x) => ~a * Antiderivative(log(~d * (~x) ^ ~m) / ~x, ~x) + ~b * Antiderivative((log(~d * (~x) ^ ~m) * atanh(~c * (~x) ^ ~n)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n], ~x)
    @apply_utils Antiderivative((log(~(d') * (~x) ^ ~(m')) * (~a + ~(b') * acoth(~(c') * (~x) ^ ~(n')))) / ~x, ~x) => ~a * Antiderivative(log(~d * (~x) ^ ~m) / ~x, ~x) + ~b * Antiderivative((log(~d * (~x) ^ ~m) * acoth(~c * (~x) ^ ~n)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n], ~x)
    @apply_utils Antiderivative((~(d') + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => (~x * (~d + ~e * log(~f + ~g * (~x) ^ 2)) * (~a + ~b * atanh(~c * ~x)) - 2 * ~e * ~g * Antiderivative(((~x) ^ 2 * (~a + ~b * atanh(~c * ~x))) / (~f + ~g * (~x) ^ 2), ~x)) - ~b * ~c * Antiderivative((~x * (~d + ~e * log(~f + ~g * (~x) ^ 2))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x)
    @apply_utils Antiderivative((~(d') + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => (~x * (~d + ~e * log(~f + ~g * (~x) ^ 2)) * (~a + ~b * acoth(~c * ~x)) - 2 * ~e * ~g * Antiderivative(((~x) ^ 2 * (~a + ~b * acoth(~c * ~x))) / (~f + ~g * (~x) ^ 2), ~x)) - ~b * ~c * Antiderivative((~x * (~d + ~e * log(~f + ~g * (~x) ^ 2))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x)
    @apply_utils Antiderivative((log(~(f') + ~(g') * (~x) ^ 2) * atanh(~(c') * ~x)) / ~x, ~x) => (((log(~f + ~g * (~x) ^ 2) - log(1 - ~c * ~x)) - log(1 + ~c * ~x)) * Antiderivative(atanh(~c * ~x) / ~x, ~x) - (1 / 2) * Antiderivative(log(1 - ~c * ~x) ^ 2 / ~x, ~x)) + (1 / 2) * Antiderivative(log(1 + ~c * ~x) ^ 2 / ~x, ~x) <-- FreeQ([~c, ~f, ~g], ~x) && EqQ((~c) ^ 2 * ~f + ~g, 0)
    @apply_utils Antiderivative((log(~(f') + ~(g') * (~x) ^ 2) * acoth(~(c') * ~x)) / ~x, ~x) => (((((log(~f + ~g * (~x) ^ 2) - log(-((~c) ^ 2) * (~x) ^ 2)) - log(1 - 1 / (~c * ~x))) - log(1 + 1 / (~c * ~x))) * Antiderivative(acoth(~c * ~x) / ~x, ~x) + Antiderivative((log(-((~c) ^ 2) * (~x) ^ 2) * acoth(~c * ~x)) / ~x, ~x)) - (1 / 2) * Antiderivative(log(1 - 1 / (~c * ~x)) ^ 2 / ~x, ~x)) + (1 / 2) * Antiderivative(log(1 + 1 / (~c * ~x)) ^ 2 / ~x, ~x) <-- FreeQ([~c, ~f, ~g], ~x) && EqQ((~c) ^ 2 * ~f + ~g, 0)
    @apply_utils Antiderivative((log(~(f') + ~(g') * (~x) ^ 2) * (~a + ~(b') * atanh(~(c') * ~x))) / ~x, ~x) => ~a * Antiderivative(log(~f + ~g * (~x) ^ 2) / ~x, ~x) + ~b * Antiderivative((log(~f + ~g * (~x) ^ 2) * atanh(~c * ~x)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~f, ~g], ~x)
    @apply_utils Antiderivative((log(~(f') + ~(g') * (~x) ^ 2) * (~a + ~(b') * acoth(~(c') * ~x))) / ~x, ~x) => ~a * Antiderivative(log(~f + ~g * (~x) ^ 2) / ~x, ~x) + ~b * Antiderivative((log(~f + ~g * (~x) ^ 2) * acoth(~c * ~x)) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~f, ~g], ~x)
    @apply_utils Antiderivative(((~d + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * atanh(~(c') * ~x))) / ~x, ~x) => ~d * Antiderivative((~a + ~b * atanh(~c * ~x)) / ~x, ~x) + ~e * Antiderivative((log(~f + ~g * (~x) ^ 2) * (~a + ~b * atanh(~c * ~x))) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x)
    @apply_utils Antiderivative(((~d + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * acoth(~(c') * ~x))) / ~x, ~x) => ~d * Antiderivative((~a + ~b * acoth(~c * ~x)) / ~x, ~x) + ~e * Antiderivative((log(~f + ~g * (~x) ^ 2) * (~a + ~b * acoth(~c * ~x))) / ~x, ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x)
    @apply_utils Antiderivative((~x) ^ ~(m') * (~(d') + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => (((~x) ^ (~m + 1) * (~d + ~e * log(~f + ~g * (~x) ^ 2)) * (~a + ~b * atanh(~c * ~x))) / (~m + 1) - ((2 * ~e * ~g) / (~m + 1)) * Antiderivative(((~x) ^ (~m + 2) * (~a + ~b * atanh(~c * ~x))) / (~f + ~g * (~x) ^ 2), ~x)) - ((~b * ~c) / (~m + 1)) * Antiderivative(((~x) ^ (~m + 1) * (~d + ~e * log(~f + ~g * (~x) ^ 2))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && ILtQ(~m / 2, 0)
    @apply_utils Antiderivative((~x) ^ ~(m') * (~(d') + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => (((~x) ^ (~m + 1) * (~d + ~e * log(~f + ~g * (~x) ^ 2)) * (~a + ~b * acoth(~c * ~x))) / (~m + 1) - ((2 * ~e * ~g) / (~m + 1)) * Antiderivative(((~x) ^ (~m + 2) * (~a + ~b * acoth(~c * ~x))) / (~f + ~g * (~x) ^ 2), ~x)) - ((~b * ~c) / (~m + 1)) * Antiderivative(((~x) ^ (~m + 1) * (~d + ~e * log(~f + ~g * (~x) ^ 2))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && ILtQ(~m / 2, 0)
    @apply_utils Antiderivative((~x) ^ ~(m') * (~(d') + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => With([u = IntHide((~x) ^ ~m * (~d + ~e * log(~f + ~g * (~x) ^ 2)), ~x)], Dist(~a + ~b * atanh(~c * ~x), u, ~x) - ~b * ~c * Antiderivative(ExpandIntegrand(u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && IGtQ((~m + 1) / 2, 0)
    @apply_utils Antiderivative((~x) ^ ~(m') * (~(d') + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => With([u = IntHide((~x) ^ ~m * (~d + ~e * log(~f + ~g * (~x) ^ 2)), ~x)], Dist(~a + ~b * acoth(~c * ~x), u, ~x) - ~b * ~c * Antiderivative(ExpandIntegrand(u / (1 - (~c) ^ 2 * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && IGtQ((~m + 1) / 2, 0)
    @apply_utils Antiderivative((~x) ^ ~(m') * (~(d') + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * atanh(~(c') * ~x)), ~x) => With([u = IntHide((~x) ^ ~m * (~a + ~b * atanh(~c * ~x)), ~x)], Dist(~d + ~e * log(~f + ~g * (~x) ^ 2), u, ~x) - 2 * ~e * ~g * Antiderivative(ExpandIntegrand((~x * u) / (~f + ~g * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (IntegerQ(~m) && NeQ(~m, -1))
    @apply_utils Antiderivative((~x) ^ ~(m') * (~(d') + ~(e') * log(~(f') + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * acoth(~(c') * ~x)), ~x) => With([u = IntHide((~x) ^ ~m * (~a + ~b * acoth(~c * ~x)), ~x)], Dist(~d + ~e * log(~f + ~g * (~x) ^ 2), u, ~x) - 2 * ~e * ~g * Antiderivative(ExpandIntegrand((~x * u) / (~f + ~g * (~x) ^ 2), ~x), ~x)) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && (IntegerQ(~m) && NeQ(~m, -1))
    @apply_utils Antiderivative(~x * (~(d') + ~(e') * log(~f + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ 2, ~x) => (((~f + ~g * (~x) ^ 2) * (~d + ~e * log(~f + ~g * (~x) ^ 2)) * (~a + ~b * atanh(~c * ~x)) ^ 2) / (2 * ~g) - (~e * (~x) ^ 2 * (~a + ~b * atanh(~c * ~x)) ^ 2) / 2) + (~b / ~c) * Antiderivative((~d + ~e * log(~f + ~g * (~x) ^ 2)) * (~a + ~b * atanh(~c * ~x)), ~x) + ~b * ~c * ~e * Antiderivative(((~x) ^ 2 * (~a + ~b * atanh(~c * ~x))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && EqQ((~c) ^ 2 * ~f + ~g, 0)
    @apply_utils Antiderivative(~x * (~(d') + ~(e') * log(~f + ~(g') * (~x) ^ 2)) * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ 2, ~x) => (((~f + ~g * (~x) ^ 2) * (~d + ~e * log(~f + ~g * (~x) ^ 2)) * (~a + ~b * acoth(~c * ~x)) ^ 2) / (2 * ~g) - (~e * (~x) ^ 2 * (~a + ~b * acoth(~c * ~x)) ^ 2) / 2) + (~b / ~c) * Antiderivative((~d + ~e * log(~f + ~g * (~x) ^ 2)) * (~a + ~b * acoth(~c * ~x)), ~x) + ~b * ~c * ~e * Antiderivative(((~x) ^ 2 * (~a + ~b * acoth(~c * ~x))) / (1 - (~c) ^ 2 * (~x) ^ 2), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~e, ~f, ~g], ~x) && EqQ((~c) ^ 2 * ~f + ~g, 0)
    @apply_utils Antiderivative(~(u') * (~(a') + ~(b') * atanh(~(c') * ~x)) ^ ~(p'), ~x) => Unintegrable(~u * (~a + ~b * atanh(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~p], ~x) && (EqQ(~u, 1) || (MatchQ(~u, (~(d') + ~(e') * ~x) ^ ~(q') <-- FreeQ([d, e, q], ~x)) || (MatchQ(~u, (~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * ~x) ^ ~(q') <-- FreeQ([d, e, f, m, q], ~x)) || (MatchQ(~u, (~(d') + ~(e') * (~x) ^ 2) ^ ~(q') <-- FreeQ([d, e, q], ~x)) || MatchQ(~u, (~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * (~x) ^ 2) ^ ~(q') <-- FreeQ([d, e, f, m, q], ~x))))))
    @apply_utils Antiderivative(~(u') * (~(a') + ~(b') * acoth(~(c') * ~x)) ^ ~(p'), ~x) => Unintegrable(~u * (~a + ~b * acoth(~c * ~x)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~p], ~x) && (EqQ(~u, 1) || (MatchQ(~u, (~(d') + ~(e') * ~x) ^ ~(q') <-- FreeQ([d, e, q], ~x)) || (MatchQ(~u, (~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * ~x) ^ ~(q') <-- FreeQ([d, e, f, m, q], ~x)) || (MatchQ(~u, (~(d') + ~(e') * (~x) ^ 2) ^ ~(q') <-- FreeQ([d, e, q], ~x)) || MatchQ(~u, (~(f') * ~x) ^ ~(m') * (~(d') + ~(e') * (~x) ^ 2) ^ ~(q') <-- FreeQ([d, e, f, m, q], ~x))))))
    @apply_utils Antiderivative(atanh(~(c') * (~x) ^ ~n), ~x) => ~x * atanh(~c * (~x) ^ ~n) - ~c * ~n * Antiderivative((~x) ^ ~n / (1 - (~c) ^ 2 * (~x) ^ (2 * ~n)), ~x) <-- FreeQ([~c, ~n], ~x)
    @apply_utils Antiderivative(acoth(~(c') * (~x) ^ ~n), ~x) => ~x * acoth(~c * (~x) ^ ~n) - ~c * ~n * Antiderivative((~x) ^ ~n / (1 - (~c) ^ 2 * (~x) ^ (2 * ~n)), ~x) <-- FreeQ([~c, ~n], ~x)
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * (~x) ^ ~n)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand(((~a + (~b * log(1 + ~c * (~x) ^ ~n)) / 2) - (~b * log(1 - ~c * (~x) ^ ~n)) / 2) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~n], ~x) && (IGtQ(~p, 0) && IntegerQ(~n))
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * (~x) ^ ~n)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand(((~a + (~b * log(1 + (~x) ^ -(~n) / ~c)) / 2) - (~b * log(1 - (~x) ^ -(~n) / ~c)) / 2) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~n], ~x) && (IGtQ(~p, 0) && IntegerQ(~n))
    @apply_utils Antiderivative((~(a') + ~(b') * atanh(~(c') * (~x) ^ ~n)) ^ ~(p') / ~x, ~x) => (1 / ~n) * Subst(Antiderivative((~a + ~b * atanh(~c * ~x)) ^ ~p / ~x, ~x), ~x, (~x) ^ ~n) <-- FreeQ([~a, ~b, ~c, ~n], ~x) && IGtQ(~p, 0)
    @apply_utils Antiderivative((~(a') + ~(b') * acoth(~(c') * (~x) ^ ~n)) ^ ~(p') / ~x, ~x) => (1 / ~n) * Subst(Antiderivative((~a + ~b * acoth(~c * ~x)) ^ ~p / ~x, ~x), ~x, (~x) ^ ~n) <-- FreeQ([~a, ~b, ~c, ~n], ~x) && IGtQ(~p, 0)
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * (~(a') + ~(b') * atanh(~(c') * (~x) ^ ~n)), ~x) => ((~d * ~x) ^ (~m + 1) * (~a + ~b * atanh(~c * (~x) ^ ~n))) / (~d * (~m + 1)) - ((~b * ~c * ~n) / (~d * (~m + 1))) * Antiderivative(((~x) ^ (~n - 1) * (~d * ~x) ^ (~m + 1)) / (1 - (~c) ^ 2 * (~x) ^ (2 * ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n], ~x) && NeQ(~m, -1)
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * (~(a') + ~(b') * acoth(~(c') * (~x) ^ ~n)), ~x) => ((~d * ~x) ^ (~m + 1) * (~a + ~b * acoth(~c * (~x) ^ ~n))) / (~d * (~m + 1)) - ((~b * ~c * ~n) / (~d * (~m + 1))) * Antiderivative(((~x) ^ (~n - 1) * (~d * ~x) ^ (~m + 1)) / (1 - (~c) ^ 2 * (~x) ^ (2 * ~n)), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n], ~x) && NeQ(~m, -1)
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * (~(a') + ~(b') * atanh(~(c') * (~x) ^ ~n)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~d * ~x) ^ ~m * ((~a + (~b * log(1 + ~c * (~x) ^ ~n)) / 2) - (~b * log(1 - ~c * (~x) ^ ~n)) / 2) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n], ~x) && (IGtQ(~p, 0) && (IntegerQ(~m) && IntegerQ(~n)))
    @apply_utils Antiderivative((~(d') * ~x) ^ ~(m') * (~(a') + ~(b') * acoth(~(c') * (~x) ^ ~n)) ^ ~(p'), ~x) => Antiderivative(ExpandIntegrand((~d * ~x) ^ ~m * ((~a + (~b * log(1 + (~x) ^ -(~n) / ~c)) / 2) - (~b * log(1 - (~x) ^ -(~n) / ~c)) / 2) ^ ~p, ~x), ~x) <-- FreeQ([~a, ~b, ~c, ~d, ~m, ~n], ~x) && (IGtQ(~p, 0) && (IntegerQ(~m) && IntegerQ(~n)))
    @apply_utils Antiderivative(~(u') * (~(a') + ~(b') * atanh(~(c') * (~x) ^ ~n)) ^ ~(p'), ~x) => Unintegrable(~u * (~a + ~b * atanh(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~n, ~p], ~x) && (EqQ(~u, 1) || MatchQ(~u, (~(d') * ~x) ^ ~(m') <-- FreeQ([d, m], ~x)))
    @apply_utils Antiderivative(~(u') * (~(a') + ~(b') * acoth(~(c') * (~x) ^ ~n)) ^ ~(p'), ~x) => Unintegrable(~u * (~a + ~b * acoth(~c * (~x) ^ ~n)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~n, ~p], ~x) && (EqQ(~u, 1) || MatchQ(~u, (~(d') * ~x) ^ ~(m') <-- FreeQ([d, m], ~x)))
end

max_stars_repo_path: src/rules/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.1 u (a+b arctanh(c x^n))^p.jl


text:
function create_trade_grid(client, config, bot_path)
    if !isfile(joinpath(bot_path, "trade_grid.jl"))
        trade_grid = Dict()
        trade_grid[config["init_state"]["price"]] = Dict("status" => "current")
        cur_price = typeof(config["init_state"]["price"]) != Float64 ? parse(Float64, config["init_state"]["price"]) : config["init_state"]["price"]
        last_price = Pinguu.price2string(cur_price, config["sell_precision"])

        #
        ## Calculate some basics
        cQty  = typeof(config["init_state"]["cummulativeQuoteQty"]) != Float64 ? parse(Float64, config["init_state"]["cummulativeQuoteQty"]) : config["init_state"]["cummulativeQuoteQty"]
        exQty = typeof(config["init_state"]["executedQty"]) != Float64 ? parse(Float64, config["init_state"]["executedQty"]) : config["init_state"]["executedQty"]
        tQty  = typeof(config["total_value"]) != Float64 ? parse(Float64, config["total_value"]) : config["total_value"]
        total_range = typeof(config["grid"]["total_range"]) != Float64 ? parse(Float64, config["grid"]["total_range"]) : config["grid"]["total_range"]
        grid_step   = typeof(config["grid"]["step"]) != Float64 ? parse(Float64, config["grid"]["step"]) : config["grid"]["step"]

        total_steps =  total_range / grid_step
        sell_step_num = floor(total_steps * (cQty / tQty))
        buy_step_num  = floor(total_steps * (1 - cQty / tQty))

        sell_coins = exQty
        sell_step_val = round(sell_coins / sell_step_num, digits=config["precision"])
        buy_coins  = tQty - cQty
        buy_step_val  = round(buy_coins  / buy_step_num, digits=config["precision"])

        place = true
        while sell_coins > 0
            last_price = Pinguu.price2string(cur_price, config["sell_precision"])
            cur_price *= (1+grid_step/100)
            qty = sell_step_val
            if sell_coins - qty < 0
                qty = floor(sell_coins, digits=config["precision"])
                if qty * cur_price <= config["min_qty"]
                    trade_grid[last_price]["qty"] += qty
                    sell_coins = 0
                    continue
                end
            end
            tmp_price = Pinguu.price2string(cur_price, config["sell_precision"])
            trade_grid[tmp_price] = Dict(
                "status" => "wait", "side" => client.SIDE_SELL, "type" => "initial", "qty" => qty, "price" => tmp_price
            )
            if place
                trade_grid[tmp_price]["status"] = "place"
                place = false
            end
            sell_coins -= qty
        end

        buy_coins = tQty - cQty
        cur_price = typeof(config["init_state"]["price"]) != Float64 ? parse(Float64, config["init_state"]["price"]) : config["init_state"]["price"]
        place = true
        while buy_coins > 0
            cur_price *= (1-grid_step/100)
            qty = buy_step_val
            if buy_coins - qty < 0
                qty = floor(buy_coins, digits=config["sell_precision"])
                if qty <= config["min_qty"]
                    buy_coins = 0
                    continue
                end
            end
            buy_qty = floor(qty / cur_price, digits=config["precision"])
            tmp_price = Pinguu.price2string(cur_price, config["sell_precision"])
            trade_grid[tmp_price] = Dict(
                "status" => "wait", "side" => client.SIDE_BUY, "type" => "normal", "value" => qty, "price" => tmp_price, "qty" => buy_qty
            )
            if place
                trade_grid[tmp_price]["status"] = "place"
                place = false
            end
            buy_coins -= qty
        end
    else
        trade_grid = JSON.parsefile(joinpath(bot_path, "trade_grid.jl"))
    end
    return trade_grid
end
export create_trade_grid

ext: jl


text:
using ODEFilters
using DiffEqDevTools

TESTTOL = 0.2

# Simple linear problem
prob = ODEProblem(
    ODEFunction(
        (u, p, t) -> [1.01].*u,
        jac=(u, p, t) -> [1.01];
        analytic=(u0, p, t) -> u0.*[exp(1.01*t)],
    ), [big(1/2)], (0.0, 1.0))

@testset "EK0(order=$q)" for q in 1:3
    dts = 1 .//2 .^(9:-1:2)
    sim = test_convergence(dts, prob, EK0(order=q))
    @test sim.𝒪est[:final] ≈ q+1 atol=TESTTOL
    @test sim.𝒪est[:l2] ≈ q+1 atol=TESTTOL
    @test sim.𝒪est[:l∞] ≈ q+1 atol=TESTTOL
end
@testset "EK0(order=$q)" for q in 4:5
    dts = 1 .//2 .^(8:-1:4)
    sim = test_convergence(dts, prob, EK0(order=q))
    @test sim.𝒪est[:final] ≈ q+1 atol=TESTTOL
    @test sim.𝒪est[:l2] ≈ q+1 atol=TESTTOL+0.1
    @test sim.𝒪est[:l∞] ≈ q+1 atol=TESTTOL+0.1
end

@testset "EK1(order=$q)" for q in [1, 3, 4, 5]
    dts = 1 .//2 .^(8:-1:3)
    sim = test_convergence(dts, prob, EK1(order=q))
    @test sim.𝒪est[:l2] ≈ q+1 atol=TESTTOL+0.1
end


text:
using hyporheicBiogeochemistry, DifferentialEquations

α = 1.6; τ₋ = 0.01; τ₊ = 1000.0; k = 0.0; V_frac = 1.0
q = qCalc_powerLaw(α, τ₋, τ₊, V_frac)
p = (q, α, τ₋, τ₊, k)

h(p,t) = [50.0]
u0 = [100.0]
tspan = (1000.0, 2000.0)

f = build_sam_model_dde(E_powerLaw, foc, tspan[1])
j = build_sam_model_dde2(E_powerLaw, foc, tspan[1])

problem = DDEProblem(f, u0, h, tspan, p)
problem2 = DDEProblem(j, u0, h, tspan, p)

@time sol = solve(problem, MethodOfSteps(RK4()))
@time sol2 = solve(problem2, MethodOfSteps(RK4()))

using Plots
plot(sol)

ilt = build_sam_model_lt(E_powerLaw, foc, 1000, 100, 0, p)
out = [ilt(t) for t = 800:1200]
# ILT method is wierd - may need to tune number of terms and/or use incomplete gamma function in place of quadGK integral


text:
using Pkg
Pkg.add("LanguageServer")
Pkg.add("SymbolServer")
Pkg.add("StaticLint")

max_stars_repo_name: squaresurf/dotfiles

max_issues_repo_name: squaresurf/dotfiles

max_forks_repo_name: squaresurf/dotfiles


text:
module EireneComparison

using BenchmarkTools
using Eirene
using Ripserer

include(joinpath(@__DIR__, "utils.jl"))

function _eirene(data; dim_max=1, threshold=nothing, model)
    if isnothing(threshold)
        return eirene(data; maxdim=dim_max, model=model)
    else
        return eirene(data; maxdim=dim_max, maxrad=threshold, model=model)
    end
end

function add_suite!(suite, data, name, dim, threshold; seconds=100, samples=10)
    msg = " preparing $name ($dim). "
    println("="^length(msg))
    println(msg)
    suite[name] = BenchmarkGroup()

    rkw=(;dim_max=dim, reps=true)
    ekw=(;maxdim=dim)
    if !isnothing(threshold)
        rkw = (; rkw..., threshold)
        ekw = (; ekw..., maxrad=threshold)
    end
    if data isa Vector
        eirene_data = Ripserer.to_matrix(data)
        ekw = (;ekw..., model="pc")
    else
        eirene_data = data
        ekw = (;ekw..., model="vr")
    end
    suite[name]["cohomology"] = @benchmarkable ripserer($data; $rkw...) setup=(
        print("  cohomology for ", $name, "                ")
    ) samples=samples seconds=seconds gcsample=true

    suite[name]["involuted"] = @benchmarkable ripserer($data; $rkw..., alg=:involuted) setup=(
        print("  involuted for ", $name, "                ")
    ) samples=samples seconds=seconds gcsample=true

    suite[name]["eirene"] = @benchmarkable eirene($eirene_data; $ekw...) setup=(
        print("  eirene for ", $name, "                ")
    ) samples=samples seconds=seconds gcsample=true

    return suite
end

"""
    EireneComparison.suite()

The suite will compare the computation time of persistent homology in the `dim`-th dimension
for a `Rips` filtration built on each dataset in `datasets`. Notes:

* Ripserer is benchmarked for both persistent cohomology and involuted persistent homology.
* When the data set is a point cloud, calculating the distance matrix is also included in
  the benchmarks. This time is expected to be negligible, but it is done in all cases in the
  interest of fairness.
* Ripserer is set to compute representatives in both cases. The effect this has on
  performance is minor, but is kept in the interest of fairness.
* Eirene will outperform ripserer on `rand` benchmarks because it can do collapses on the
  complex. Ripserer can also perform edge collapses, but this was left out to keep the
  number of benchmarks lower.
* Some Ripserer times could be improved by using a sparse filtration. This was left out.
"""
function suite(
    datasets=[
        # filename            name           dim threshold
        ("gcycle.dist",       "gcycle (1)",   1,  nothing),
        ("gcycle.dist",       "gcycle (3)",   3,  40),
        ("2_sphere_100.pts",  "2 sphere",     2,  nothing),
        ("rand_4_50.pts",     "rand_4",       3,  nothing),
        ("random16.dist",     "random16 (3)", 3,  nothing),
        ("celegans.dist",     "celegans",     2,  nothing),
        ("dragon1000.dist",   "dragon1000",   1,  nothing),
        ("o3_1024.pts",       "o3_1024",      3,  1.8),
        ("o3_4096.pts",       "o3_4096",      3,  1.4),
        ("random16.dist",     "random16 (7)", 7,  nothing),
        ("hiv.dist",          "hiv",          1,  nothing),
    ];
    seconds=1000, samples=10,
)
    suite = BenchmarkGroup()
    for (file, name, dim, threshold) in datasets
        data = load_data(joinpath(@__DIR__, "..", "datasets", file))
        add_suite!(suite, data, name, dim, threshold; seconds, samples)
    end
    return suite
end

end


text:
"""
Expected order of compliance matrix rows is
11, 22, 33, 23, 31, 12

E11, E22, E33, nu_12, nu_21, nu_23,
nu_32, nu_13, nu_31, G23, G13, G12.

"""
function get_engineering_constants_from_compliance_matrix(
    comp_matrix::Matrix{Float64}
)::Dict{Symbol, Float64}
    @assert size(comp_matrix)==(6,6)
    s11, s22, s33 = comp_matrix[1, 1], comp_matrix[2, 2], comp_matrix[3, 3]
    s44, s55, s66 = comp_matrix[4, 4], comp_matrix[5, 5], comp_matrix[6, 6]
    s12 = comp_matrix[1, 2]
    s13 = comp_matrix[1, 3]
    s23 = comp_matrix[2, 3]
    return Dict(
        :E11    => 1.0/s11,
        :E22    => 1.0/s22,
        :E33    => 1.0/s33,
        :nu_12  => -s12/s11,
        :nu_21  => -s12/s22,
        :nu_23  => -s23/s22,
        :nu_32  => -s23/s33,
        :nu_13  => -s13/s11,
        :nu_31  => -s13/s33,
        :G23    => 1.0/s44,
        :G13    => 1.0/s55,
        :G12    => 1.0/s66,
    )
end

"""
E11, E22, E33, nu_12, nu_21, nu_23,
nu_32, nu_13, nu_31, G23, G13, G12.
"""
function get_engineering_constants_from_stiffness_matrix(
    stiff_matrix::Matrix{Float64}
)::Dict{Symbol, Float64}
    return get_engineering_constants_from_compliance_matrix(inv(stiff_matrix))
end


text:
struct MbplsrMid
    fm
    T::Matrix{Float64}
    fm_bl
    T_bl::Vector{Matrix{Float64}}
    scal::Vector{Float64}
end

"""
    mbplsr_mid(X, Y, weights = ones(size(X[1], 1));
        nlvbl, nlv, scaling = false)
Mid-level multiblock PLSR (PLSR on PLS latent variables).
* `X` : List (vector) of blocks (matrices) of X-data.
    Each component of the list is a block.
* `Y` : Y-data.
* `weights` : Weights of the observations (rows). See `?plskern` for details.
* `nlvbl` : Vector of nb. preliminary latent variables (LVs) to compute in each
    of the blocks.
* `nlv` : Final nb. LVs to compute.
* `scaling` : Logical indicating if the blocks of the preliminary LVs
    are autoscaled (`blockscal`) or not before te second PLS is done.

Vector `weights` is internally normalized to sum to 1.
"""
function mbplsr_mid(X, Y, weights = ones(size(X[1], 1));
        nlvbl, nlv, scaling = false)
    nbl = length(X)
    fm_bl = list(nbl)
    T_bl = list(nbl, Matrix{Float64})
    @inbounds for i = 1:nbl
        fm_bl[i] = plskern(X[i], Y, weights; nlv = nlvbl[i])
        T_bl[i] = fm_bl[i].T
    end
    if scaling
        res = blockscal(T_bl)
        T_bl = res.X
        scal = res.scal
    else
        scal = ones(nbl)
    end
    zT = reduce(hcat, T_bl)
    fm = plskern(zT, Y, weights; nlv = nlv)
    MbplsrMid(fm, fm.T, fm_bl, T_bl, scal)
end

"""
    transform(object::MbplsrMid, X; nlv = nothing)
Compute LVs ("scores" T) from a fitted model.
* `object` : The maximal fitted model.
* `X` : A list (vector) of blocks (matrices) of X-data for which LVs are computed.
* `nlv` : Nb. LVs to consider. If nothing, it is the maximum nb. LVs.
"""
function transform(object::MbplsrMid, X; nlv = nothing)
    a = size(object.T, 2)
    isnothing(nlv) ? nlv = a : nlv = min(nlv, a)
    nbl = length(object.fm_bl)
    T_bl = list(nbl, Matrix{Float64})
    @inbounds for i = 1:nbl
        T_bl[i] = transform(object.fm_bl[i], X[i]) / object.scal[i]
    end
    T = reduce(hcat, T_bl)
    transform(object.fm, T)
end

"""
    predict(object::MbplsrMid, X; nlv = nothing)
Compute Y-predictions from a fitted model.
* `object` : The fitted model.
* `X` : A list (vector) of X-data for which predictions are computed.
* `nlv` : Nb. LVs, or collection of nb. LVs, to consider.
    If nothing, it is the maximum nb. LVs.
"""
function predict(object::MbplsrMid, X; nlv = nothing)
    a = size(object.T, 2)
    isnothing(nlv) ? nlv = a : nlv = (max(minimum(nlv), 0):min(maximum(nlv), a))
    nbl = length(object.fm_bl)
    T_bl = list(nbl, Matrix{Float64})
    @inbounds for i = 1:nbl
        T_bl[i] = transform(object.fm_bl[i], X[i]) / object.scal[i]
    end
    T = reduce(hcat, T_bl)
    pred = predict(object.fm, T; nlv = nlv).pred
    (pred = pred,)
end