int_rules_1_2_4_3 = @theory begin

    #= ::Subsection::Closed:: =#
    #= 1.2.4.3*(d+e*x^(n-q))*(a*x^q+b*x^n+c*x^(2*n-q))^p =#
    @apply_utils Antiderivative((~A + ~(B') * (~x) ^ ~(r')) * (~(a') * (~x) ^ ~(q') + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(j')) ^ ~(p'), ~x) => Antiderivative((~x) ^ (~p * ~q) * (~A + ~B * (~x) ^ (~n - ~q)) * (~a + ~b * (~x) ^ (~n - ~q) + ~c * (~x) ^ (2 * (~n - ~q))) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~A, ~B, ~n, ~q], ~x) && (EqQ(~r, ~n - ~q) && (EqQ(~j, 2 * ~n - ~q) && (IntegerQ(~p) && PosQ(~n - ~q))))
    #= Antiderivative(((~A)+(~B')*(~x)^(~j'))*((~a')*(~x)^(~q')+(~b')*(~x)^(~n')+(~c')*(~x)^(~r'))^(~p),~x)  := sqrt(a*x^q+b*x^n+c*x^(2*n-q))/(x^(q/2)*sqrt(a+b*x^(n-q)+c*x^(2*( n-q))))* Antiderivative(x^(q*p)*(A+B*x^(n-q))*(a+b*x^(n-q)+c*x^(2*(n-q)))^p,x) <--  FreeQ([a,b,c,A,B,n,p,q],x) && EqQ(j,n-q) && EqQ(r,2*n-q) && PosQ(n-q)  && IGtQ(p+1/2,0) =#
    #= Antiderivative(((~A)+(~B')*(~x)^(~j'))*((~a')*(~x)^(~q')+(~b')*(~x)^(~n')+(~c')*(~x)^(~r'))^(~p),~x)  := x^(q/2)*sqrt(a+b*x^(n-q)+c*x^(2*(n-q)))/sqrt(a*x^q+b*x^n+c*x^(2* n-q))* Antiderivative(x^(q*p)*(A+B*x^(n-q))*(a+b*x^(n-q)+c*x^(2*(n-q)))^p,x) <--  FreeQ([a,b,c,A,B,n,p,q],x) && EqQ(j,n-q) && EqQ(r,2*n-q) && PosQ(n-q)  && ILtQ(p-1/2,0) =#
    #= Antiderivative(((~A)+(~B')*(~x)^(~j'))*sqrt((~a')*(~x)^(~q')+(~b')*(~x)^(~n')+(~c')*(~x)^(~r')),(~x)*Symbol) :=  sqrt(a*x^q+b*x^n+c*x^(2*n-q))/(x^(q/2)*sqrt(a+b*x^(n-q)+c*x^(2*(n-q))) )* Antiderivative(x^(q/2)*(A+B*x^(n-q))*sqrt(a+b*x^(n-q)+c*x^(2*(n-q))),x) <--  FreeQ([a,b,c,A,B,n,q],x) && EqQ(j,n-q) && EqQ(r,2*n-q) && PosQ(n-q) =#
    @apply_utils Antiderivative((~A + ~(B') * (~x) ^ ~(j')) / sqrt(~(a') * (~x) ^ ~(q') + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(r')), ~x) => (((~x) ^ (~q / 2) * sqrt(~a + ~b * (~x) ^ (~n - ~q) + ~c * (~x) ^ (2 * (~n - ~q)))) / sqrt(~a * (~x) ^ ~q + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n - ~q))) * Antiderivative((~A + ~B * (~x) ^ (~n - ~q)) / ((~x) ^ (~q / 2) * sqrt(~a + ~b * (~x) ^ (~n - ~q) + ~c * (~x) ^ (2 * (~n - ~q)))), ~x) <-- FreeQ([~a, ~b, ~c, ~A, ~B, ~n, ~q], ~x) && (EqQ(~j, ~n - ~q) && (EqQ(~r, 2 * ~n - ~q) && (PosQ(~n - ~q) && (EqQ(~n, 3) && EqQ(~q, 2)))))
    @apply_utils Antiderivative((~A + ~(B') * (~x) ^ ~(r')) * (~(a') * (~x) ^ ~(q') + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(j')) ^ ~p, ~x) => (~x * (~b * ~B * (~n - ~q) * ~p + ~A * ~c * (~p * ~q + (~n - ~q) * (2 * ~p + 1) + 1) + ~B * ~c * (~p * (2 * ~n - ~q) + 1) * (~x) ^ (~n - ~q)) * (~a * (~x) ^ ~q + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n - ~q)) ^ ~p) / (~c * (~p * (2 * ~n - ~q) + 1) * (~p * ~q + (~n - ~q) * (2 * ~p + 1) + 1)) + (((~n - ~q) * ~p) / (~c * (~p * (2 * ~n - ~q) + 1) * (~p * ~q + (~n - ~q) * (2 * ~p + 1) + 1))) * Antiderivative((~x) ^ ~q * ((2 * ~a * ~A * ~c * (~p * ~q + (~n - ~q) * (2 * ~p + 1) + 1) - ~a * ~b * ~B * (~p * ~q + 1)) + ((2 * ~a * ~B * ~c * (~p * (2 * ~n - ~q) + 1) + ~A * ~b * ~c * (~p * ~q + (~n - ~q) * (2 * ~p + 1) + 1)) - (~b) ^ 2 * ~B * (~p * ~q + (~n - ~q) * ~p + 1)) * (~x) ^ (~n - ~q)) * (~a * (~x) ^ ~q + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n - ~q)) ^ (~p - 1), ~x) <-- FreeQ([~a, ~b, ~c, ~A, ~B, ~n, ~q], ~x) && (EqQ(~r, ~n - ~q) && (EqQ(~j, 2 * ~n - ~q) && (Not(IntegerQ(~p)) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && (GtQ(~p, 0) && (NeQ(~p * (2 * ~n - ~q) + 1, 0) && NeQ(~p * ~q + (~n - ~q) * (2 * ~p + 1) + 1, 0)))))))
    @apply_utils Antiderivative((~A + ~(B') * (~x) ^ ~(r')) * (~(a') * (~x) ^ ~(q') + ~(c') * (~x) ^ ~(j')) ^ ~p, ~x) => With([n = ~q + ~r], (~x * (~A * (~p * ~q + (n - ~q) * (2 * ~p + 1) + 1) + ~B * (~p * (2n - ~q) + 1) * (~x) ^ (n - ~q)) * (~a * (~x) ^ ~q + ~c * (~x) ^ (2n - ~q)) ^ ~p) / ((~p * (2n - ~q) + 1) * (~p * ~q + (n - ~q) * (2 * ~p + 1) + 1)) + (((n - ~q) * ~p) / ((~p * (2n - ~q) + 1) * (~p * ~q + (n - ~q) * (2 * ~p + 1) + 1))) * Antiderivative((~x) ^ ~q * (2 * ~a * ~A * (~p * ~q + (n - ~q) * (2 * ~p + 1) + 1) + (2 * ~a * ~B * (~p * (2n - ~q) + 1)) * (~x) ^ (n - ~q)) * (~a * (~x) ^ ~q + ~c * (~x) ^ (2n - ~q)) ^ (~p - 1), ~x) <-- EqQ(~j, 2n - ~q) && (NeQ(~p * (2n - ~q) + 1, 0) && NeQ(~p * ~q + (n - ~q) * (2 * ~p + 1) + 1, 0))) <-- FreeQ([~a, ~c, ~A, ~B, ~q], ~x) && (Not(IntegerQ(~p)) && GtQ(~p, 0))
    @apply_utils Antiderivative((~A + ~(B') * (~x) ^ ~(r')) * (~(a') * (~x) ^ ~(q') + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(j')) ^ ~p, ~x) => (-((~x) ^ (-(~q) + 1)) * (((~A * (~b) ^ 2 - ~a * ~b * ~B) - 2 * ~a * ~A * ~c) + (~A * ~b - 2 * ~a * ~B) * ~c * (~x) ^ (~n - ~q)) * (~a * (~x) ^ ~q + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n - ~q)) ^ (~p + 1)) / (~a * (~n - ~q) * (~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c)) + (1 / (~a * (~n - ~q) * (~p + 1) * ((~b) ^ 2 - 4 * ~a * ~c))) * Antiderivative((~x) ^ -(~q) * ((((~A * (~b) ^ 2 * (~p * ~q + (~n - ~q) * (~p + 1) + 1) - ~a * ~b * ~B * (~p * ~q + 1)) - 2 * ~a * ~A * ~c * (~p * ~q + 2 * (~n - ~q) * (~p + 1) + 1)) + (~p * ~q + (~n - ~q) * (2 * ~p + 3) + 1) * (~A * ~b - 2 * ~a * ~B) * ~c * (~x) ^ (~n - ~q)) * (~a * (~x) ^ ~q + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n - ~q)) ^ (~p + 1)), ~x) <-- FreeQ([~a, ~b, ~c, ~A, ~B, ~n, ~q], ~x) && (EqQ(~r, ~n - ~q) && (EqQ(~j, 2 * ~n - ~q) && (Not(IntegerQ(~p)) && (NeQ((~b) ^ 2 - 4 * ~a * ~c, 0) && LtQ(~p, -1)))))
    @apply_utils Antiderivative((~A + ~(B') * (~x) ^ ~(r')) * (~(a') * (~x) ^ ~(q') + ~(c') * (~x) ^ ~(j')) ^ ~p, ~x) => With([n = ~q + ~r], (-((~x) ^ (-(~q) + 1)) * (~a * ~A * ~c + ~a * ~B * ~c * (~x) ^ (n - ~q)) * (~a * (~x) ^ ~q + ~c * (~x) ^ (2n - ~q)) ^ (~p + 1)) / (~a * (n - ~q) * (~p + 1) * (2 * ~a * ~c)) + (1 / (~a * (n - ~q) * (~p + 1) * (2 * ~a * ~c))) * Antiderivative((~x) ^ -(~q) * ((~a * ~A * ~c * (~p * ~q + 2 * (n - ~q) * (~p + 1) + 1) + ~a * ~B * ~c * (~p * ~q + (n - ~q) * (2 * ~p + 3) + 1) * (~x) ^ (n - ~q)) * (~a * (~x) ^ ~q + ~c * (~x) ^ (2n - ~q)) ^ (~p + 1)), ~x) <-- EqQ(~j, 2n - ~q)) <-- FreeQ([~a, ~c, ~A, ~B, ~q], ~x) && (Not(IntegerQ(~p)) && LtQ(~p, -1))
    #= Antiderivative(((~A)+(~B')*(~x)^(~q))*((~a')*(~x)^(~j')+(~b')*(~x)^(~k')+(~c')*(~x)^(~n'))^(~p),~x)  := (a*x^j+b*x^k+c*x^n)^p/(x^(j*p)*(a+b*x^(k-j)+c*x^(2*(k-j)))^p)* Antiderivative(x^(j*p)*(A+B*x^(k-j))*(a+b*x^(k-j)+c*x^(2*(k-j)))^p,x) <--  FreeQ([a,b,c,A,B,j,k,p],x) && EqQ(q,k-j) && EqQ(n,2*k-j) && PosQ(k-j)  && Not(IntegerQ(p)) =#
    @apply_utils Antiderivative((~A + ~(B') * (~x) ^ ~(j')) * (~(a') * (~x) ^ ~(q') + ~(b') * (~x) ^ ~(n') + ~(c') * (~x) ^ ~(r')) ^ ~(p'), ~x) => Unintegrable((~A + ~B * (~x) ^ (~n - ~q)) * (~a * (~x) ^ ~q + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n - ~q)) ^ ~p, ~x) <-- FreeQ([~a, ~b, ~c, ~A, ~B, ~n, ~p, ~q], ~x) && (EqQ(~j, ~n - ~q) && EqQ(~r, 2 * ~n - ~q))
    @apply_utils Antiderivative((~A + ~(B') * (~u) ^ ~(j')) * (~(a') * (~u) ^ ~(q') + ~(b') * (~u) ^ ~(n') + ~(c') * (~u) ^ ~(r')) ^ ~(p'), ~x) => (1 / Coefficient(~u, ~x, 1)) * Subst(Antiderivative((~A + ~B * (~x) ^ (~n - ~q)) * (~a * (~x) ^ ~q + ~b * (~x) ^ ~n + ~c * (~x) ^ (2 * ~n - ~q)) ^ ~p, ~x), ~x, ~u) <-- FreeQ([~a, ~b, ~c, ~A, ~B, ~n, ~p, ~q], ~x) && (EqQ(~j, ~n - ~q) && (EqQ(~r, 2 * ~n - ~q) && (LinearQ(~u, ~x) && NeQ(~u, ~x))))
end
