text:
@testset "1.2.1.9 P(x) (d+e x)^m (a+b x+c x^2)^p" begin
    (A, B, C, a, b, c, d, e, f, g, h, i, j, k, l, m, p, q, x, ) = @variables A B C a b c d e f g h i j k l m p q x

    #= ::Package:: =#

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*P2(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P2(x)*(d+e*x)^m*(a+b*x+c*x^2)^p*when*b=0*and*c*d^2+a*e^2=0=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P2(x)*(d+e*x)^m*(d^2-e^2*x^2)^p=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(d + e*x)^2*(A + B*x + C*x^2)*sqrt(d^2 - e^2*x^2), x, 7, (d^2*(3*C*d^2 + 4*B*d*e + 10*A*e^2)*x*sqrt(d^2 - e^2*x^2))/(16*e^2) - (d*(4*C*d^2 + e*(7*B*d + 10*A*e))*(d^2 - e^2*x^2)^(3/2))/(15*e^3) - ((3*C*d^2 + 2*e*(2*B*d + A*e))*x*(d^2 - e^2*x^2)^(3/2))/(8*e^2) - ((2*C*d + B*e)*x^2*(d^2 - e^2*x^2)^(3/2))/(5*e) - (1/6)*C*x^3*(d^2 - e^2*x^2)^(3/2) + (d^4*(3*C*d^2 + 4*B*d*e + 10*A*e^2)*atan((e*x)/sqrt(d^2 - e^2*x^2)))/(16*e^3)]
    @test_int [(d + e*x)^1*(A + B*x + C*x^2)*sqrt(d^2 - e^2*x^2), x, 6, (d*(C*d^2 + e*(B*d + 4*A*e))*x*sqrt(d^2 - e^2*x^2))/(8*e^2) - ((2*C*d^2 + 5*e*(B*d + A*e))*(d^2 - e^2*x^2)^(3/2))/(15*e^3) - ((C*d + B*e)*x*(d^2 - e^2*x^2)^(3/2))/(4*e^2) - (C*x^2*(d^2 - e^2*x^2)^(3/2))/(5*e) + (d^3*(C*d^2 + e*(B*d + 4*A*e))*atan((e*x)/sqrt(d^2 - e^2*x^2)))/(8*e^3)]
    @test_int [(d + e*x)^0*(A + B*x + C*x^2)*sqrt(d^2 - e^2*x^2), x, 5, (1/8)*(4*A + (C*d^2)/e^2)*x*sqrt(d^2 - e^2*x^2) - (B*(d^2 - e^2*x^2)^(3/2))/(3*e^2) - (C*x*(d^2 - e^2*x^2)^(3/2))/(4*e^2) + (d^2*(C*d^2 + 4*A*e^2)*atan((e*x)/sqrt(d^2 - e^2*x^2)))/(8*e^3)]
    @test_int [(A + B*x + C*x^2)*sqrt(d^2 - e^2*x^2)/(d + e*x)^1, x, 5, ((C*d^2 - e*(B*d - 2*A*e))*sqrt(d^2 - e^2*x^2))/(2*e^3) - (C*(d^2 - e^2*x^2)^(3/2))/(3*e^3) + ((C*d - B*e)*(d^2 - e^2*x^2)^(3/2))/(2*e^3*(d + e*x)) + (d*(C*d^2 - e*(B*d - 2*A*e))*atan((e*x)/sqrt(d^2 - e^2*x^2)))/(2*e^3)]
    @test_int [(A + B*x + C*x^2)*sqrt(d^2 - e^2*x^2)/(d + e*x)^2, x, 5, -(((5*C*d^2 - 2*e*(2*B*d - A*e))*sqrt(d^2 - e^2*x^2))/(2*d*e^3)) - ((C*d^2 - B*d*e + A*e^2)*(d^2 - e^2*x^2)^(3/2))/(d*e^3*(d + e*x)^2) - (C*(d^2 - e^2*x^2)^(3/2))/(2*e^3*(d + e*x)) - ((5*C*d^2 - 2*e*(2*B*d - A*e))*atan((e*x)/sqrt(d^2 - e^2*x^2)))/(2*e^3)]
    @test_int [(A + B*x + C*x^2)*sqrt(d^2 - e^2*x^2)/(d + e*x)^3, x, 5, (2*(3*C*d - B*e)*sqrt(d^2 - e^2*x^2))/(e^3*(d + e*x)) - ((C*d^2 - B*d*e + A*e^2)*(d^2 - e^2*x^2)^(3/2))/(3*d*e^3*(d + e*x)^3) - (C*(d^2 - e^2*x^2)^(3/2))/(e^3*(d + e*x)^2) + ((3*C*d - B*e)*atan((e*x)/sqrt(d^2 - e^2*x^2)))/e^3]
    @test_int [(A + B*x + C*x^2)*sqrt(d^2 - e^2*x^2)/(d + e*x)^4, x, 8, -((2*C*sqrt(d^2 - e^2*x^2))/(e^3*(d + e*x))) - ((C*d^2 - B*d*e + A*e^2)*(d^2 - e^2*x^2)^(3/2))/(5*d*e^3*(d + e*x)^4) + ((2*C*d - B*e)*(d^2 - e^2*x^2)^(3/2))/(3*d*e^3*(d + e*x)^3) - ((C*d^2 - B*d*e + A*e^2)*(d^2 - e^2*x^2)^(3/2))/(15*d^2*e^3*(d + e*x)^3) - (C*atan((e*x)/sqrt(d^2 - e^2*x^2)))/e^3]
    @test_int [(A + B*x + C*x^2)*sqrt(d^2 - e^2*x^2)/(d + e*x)^5, x, 4, -(((C*d^2 - B*d*e + A*e^2)*(d^2 - e^2*x^2)^(3/2))/(7*d*e^3*(d + e*x)^5)) + (C*(d^2 - e^2*x^2)^(3/2))/(e^3*(d + e*x)^4) - ((23*C*d^2 + e*(5*B*d + 2*A*e))*(d^2 - e^2*x^2)^(3/2))/(35*d^2*e^3*(d + e*x)^4) - ((23*C*d^2 + e*(5*B*d + 2*A*e))*(d^2 - e^2*x^2)^(3/2))/(105*d^3*e^3*(d + e*x)^3)]
    @test_int [(A + B*x + C*x^2)*sqrt(d^2 - e^2*x^2)/(d + e*x)^6, x, 5, -(((C*d^2 - B*d*e + A*e^2)*(d^2 - e^2*x^2)^(3/2))/(9*d*e^3*(d + e*x)^6)) + (C*(d^2 - e^2*x^2)^(3/2))/(2*e^3*(d + e*x)^5) - ((11*C*d^2 + 2*e*(2*B*d + A*e))*(d^2 - e^2*x^2)^(3/2))/(42*d^2*e^3*(d + e*x)^5) - ((11*C*d^2 + 2*e*(2*B*d + A*e))*(d^2 - e^2*x^2)^(3/2))/(105*d^3*e^3*(d + e*x)^4) - ((11*C*d^2 + 2*e*(2*B*d + A*e))*(d^2 - e^2*x^2)^(3/2))/(315*d^4*e^3*(d + e*x)^3)]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(d + e*x)^3*(A + B*x + C*x^2)/sqrt(d^2 - e^2*x^2), x, 7, -((d^2*(38*C*d^2 + 45*B*d*e + 55*A*e^2)*sqrt(d^2 - e^2*x^2))/(15*e^3)) - (d*(13*C*d^2 + 15*B*d*e + 12*A*e^2)*x*sqrt(d^2 - e^2*x^2))/(8*e^2) - ((19*C*d^2 + 5*e*(3*B*d + A*e))*x^2*sqrt(d^2 - e^2*x^2))/(15*e) - (1/4)*(3*C*d + B*e)*x^3*sqrt(d^2 - e^2*x^2) - (1/5)*C*e*x^4*sqrt(d^2 - e^2*x^2) + (d^3*(13*C*d^2 + 15*B*d*e + 20*A*e^2)*atan((e*x)/sqrt(d^2 - e^2*x^2)))/(8*e^3)]
    @test_int [(d + e*x)^2*(A + B*x + C*x^2)/sqrt(d^2 - e^2*x^2), x, 6, -((d*(4*C*d^2 + e*(5*B*d + 6*A*e))*sqrt(d^2 - e^2*x^2))/(3*e^3)) - ((7*C*d^2 + 4*e*(2*B*d + A*e))*x*sqrt(d^2 - e^2*x^2))/(8*e^2) - ((2*C*d + B*e)*x^2*sqrt(d^2 - e^2*x^2))/(3*e) - (1/4)*C*x^3*sqrt(d^2 - e^2*x^2) + (d^2*(7*C*d^2 + 8*B*d*e + 12*A*e^2)*atan((e*x)/sqrt(d^2 - e^2*x^2)))/(8*e^3)]
    @test_int [(d + e*x)^1*(A + B*x + C*x^2)/sqrt(d^2 - e^2*x^2), x, 5, -(((2*C*d^2 + 3*e*(B*d + A*e))*sqrt(d^2 - e^2*x^2))/(3*e^3)) - ((C*d + B*e)*x*sqrt(d^2 - e^2*x^2))/(2*e^2) - (C*x^2*sqrt(d^2 - e^2*x^2))/(3*e) + (d*(C*d^2 + e*(B*d + 2*A*e))*atan((e*x)/sqrt(d^2 - e^2*x^2)))/(2*e^3)]
    @test_int [(d + e*x)^0*(A + B*x + C*x^2)/sqrt(d^2 - e^2*x^2), x, 4, -((B*sqrt(d^2 - e^2*x^2))/e^2) - (C*x*sqrt(d^2 - e^2*x^2))/(2*e^2) + ((C*d^2 + 2*A*e^2)*atan((e*x)/sqrt(d^2 - e^2*x^2)))/(2*e^3)]
    @test_int [(A + B*x + C*x^2)/((d + e*x)^1*sqrt(d^2 - e^2*x^2)), x, 4, -((C*sqrt(d^2 - e^2*x^2))/e^3) - ((C*d^2 - B*d*e + A*e^2)*sqrt(d^2 - e^2*x^2))/(d*e^3*(d + e*x)) - ((C*d - B*e)*atan((e*x)/sqrt(d^2 - e^2*x^2)))/e^3]
    @test_int [(A + B*x + C*x^2)/((d + e*x)^2*sqrt(d^2 - e^2*x^2)), x, 7, -(((C*d^2 - B*d*e + A*e^2)*sqrt(d^2 - e^2*x^2))/(3*d*e^3*(d + e*x)^2)) + ((2*C*d - B*e)*sqrt(d^2 - e^2*x^2))/(d*e^3*(d + e*x)) - ((C*d^2 - B*d*e + A*e^2)*sqrt(d^2 - e^2*x^2))/(3*d^2*e^3*(d + e*x)) + (C*atan((e*x)/sqrt(d^2 - e^2*x^2)))/e^3]
    @test_int [(A + B*x + C*x^2)/((d + e*x)^3*sqrt(d^2 - e^2*x^2)), x, 4, -(((C*d^2 - B*d*e + A*e^2)*sqrt(d^2 - e^2*x^2))/(5*d*e^3*(d + e*x)^3)) + (C*sqrt(d^2 - e^2*x^2))/(e^3*(d + e*x)^2) - ((7*C*d^2 + e*(3*B*d + 2*A*e))*sqrt(d^2 - e^2*x^2))/(15*d^2*e^3*(d + e*x)^2) - ((7*C*d^2 + e*(3*B*d + 2*A*e))*sqrt(d^2 - e^2*x^2))/(15*d^3*e^3*(d + e*x))]
    @test_int [(A + B*x + C*x^2)/((d + e*x)^4*sqrt(d^2 - e^2*x^2)), x, 5, -(((C*d^2 - B*d*e + A*e^2)*sqrt(d^2 - e^2*x^2))/(7*d*e^3*(d + e*x)^4)) + (C*sqrt(d^2 - e^2*x^2))/(2*e^3*(d + e*x)^3) - ((13*C*d^2 + 8*B*d*e + 6*A*e^2)*sqrt(d^2 - e^2*x^2))/(70*d^2*e^3*(d + e*x)^3) - ((13*C*d^2 + 8*B*d*e + 6*A*e^2)*sqrt(d^2 - e^2*x^2))/(105*d^3*e^3*(d + e*x)^2) - ((13*C*d^2 + 8*B*d*e + 6*A*e^2)*sqrt(d^2 - e^2*x^2))/(105*d^4*e^3*(d + e*x))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P2(x)*(d+e*x)^m*(a+b*x+c*x^2)^p*when*b=0=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d+e*x)^m*(a+c*x^2)^p*(A+B*x+C*x^2)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(d + e*x)^3*(A + B*x + C*x^2)*(a + c*x^2), x, 2, ((c*d^2 + a*e^2)*(C*d^2 - B*d*e + A*e^2)*(d + e*x)^4)/(4*e^5) - ((a*e^2*(2*C*d - B*e) + c*d*(4*C*d^2 - e*(3*B*d - 2*A*e)))*(d + e*x)^5)/(5*e^5) + ((a*C*e^2 + c*(6*C*d^2 - e*(3*B*d - A*e)))*(d + e*x)^6)/(6*e^5) - (c*(4*C*d - B*e)*(d + e*x)^7)/(7*e^5) + (c*C*(d + e*x)^8)/(8*e^5)]
    @test_int [(d + e*x)^2*(A + B*x + C*x^2)*(a + c*x^2), x, 2, ((c*d^2 + a*e^2)*(C*d^2 - B*d*e + A*e^2)*(d + e*x)^3)/(3*e^5) - ((a*e^2*(2*C*d - B*e) + c*d*(4*C*d^2 - e*(3*B*d - 2*A*e)))*(d + e*x)^4)/(4*e^5) + ((a*C*e^2 + c*(6*C*d^2 - e*(3*B*d - A*e)))*(d + e*x)^5)/(5*e^5) - (c*(4*C*d - B*e)*(d + e*x)^6)/(6*e^5) + (c*C*(d + e*x)^7)/(7*e^5)]
    @test_int [(d + e*x)^1*(A + B*x + C*x^2)*(a + c*x^2), x, 2, a*A*d*x + (1/2)*a*(B*d + A*e)*x^2 + (1/3)*(A*c*d + a*C*d + a*B*e)*x^3 + (1/4)*(B*c*d + A*c*e + a*C*e)*x^4 + (1/5)*c*(C*d + B*e)*x^5 + (1/6)*c*C*e*x^6]
    @test_int [(d + e*x)^0*(A + B*x + C*x^2)*(a + c*x^2), x, 2, a*A*x + (1/2)*a*B*x^2 + (1/3)*(A*c + a*C)*x^3 + (1/4)*B*c*x^4 + (1/5)*c*C*x^5]
    @test_int [(A + B*x + C*x^2)*(a + c*x^2)/(d + e*x)^1, x, 2, -(((a*e^2*(C*d - B*e) + c*d*(C*d^2 - e*(B*d - A*e)))*x)/e^4) + ((a*C*e^2 + c*(C*d^2 - e*(B*d - A*e)))*x^2)/(2*e^3) - (c*(C*d - B*e)*x^3)/(3*e^2) + (c*C*x^4)/(4*e) + ((c*d^2 + a*e^2)*(C*d^2 - B*d*e + A*e^2)*log(d + e*x))/e^5]
    @test_int [(A + B*x + C*x^2)*(a + c*x^2)/(d + e*x)^2, x, 2, ((a*C*e^2 + c*(3*C*d^2 - e*(2*B*d - A*e)))*x)/e^4 - (c*(2*C*d - B*e)*x^2)/(2*e^3) + (c*C*x^3)/(3*e^2) - ((c*d^2 + a*e^2)*(C*d^2 - B*d*e + A*e^2))/(e^5*(d + e*x)) - ((a*e^2*(2*C*d - B*e) + c*d*(4*C*d^2 - e*(3*B*d - 2*A*e)))*log(d + e*x))/e^5]
    @test_int [(A + B*x + C*x^2)*(a + c*x^2)/(d + e*x)^3, x, 2, -((c*(3*C*d - B*e)*x)/e^4) + (c*C*x^2)/(2*e^3) - ((c*d^2 + a*e^2)*(C*d^2 - B*d*e + A*e^2))/(2*e^5*(d + e*x)^2) + (a*e^2*(2*C*d - B*e) + c*d*(4*C*d^2 - e*(3*B*d - 2*A*e)))/(e^5*(d + e*x)) + ((a*C*e^2 + c*(6*C*d^2 - e*(3*B*d - A*e)))*log(d + e*x))/e^5]

    @test_int [(d + e*x)^3*(A + B*x + C*x^2)*(a + c*x^2)^2, x, 3, a^2*A*d^3*x + (1/3)*a*d*(a*d*(C*d + 3*B*e) + A*(2*c*d^2 + 3*a*e^2))*x^3 + (1/4)*a^2*e*(3*C*d^2 + e*(3*B*d + A*e))*x^4 + (1/5)*(A*c*d*(c*d^2 + 6*a*e^2) + a*(a*e^2*(3*C*d + B*e) + 2*c*d^2*(C*d + 3*B*e)))*x^5 + (1/6)*a*e*(a*C*e^2 + 2*c*(3*C*d^2 + e*(3*B*d + A*e)))*x^6 + (1/7)*c*(2*a*e^2*(3*C*d + B*e) + c*d*(C*d^2 + 3*e*(B*d + A*e)))*x^7 + (1/8)*c*e*(2*a*C*e^2 + c*(3*C*d^2 + e*(3*B*d + A*e)))*x^8 + (1/9)*c^2*e^2*(3*C*d + B*e)*x^9 + (1/10)*c^2*C*e^3*x^10 + (d^2*(B*d + 3*A*e)*(a + c*x^2)^3)/(6*c)]
    @test_int [(d + e*x)^2*(A + B*x + C*x^2)*(a + c*x^2)^2, x, 3, a^2*A*d^2*x + (1/3)*a*(a*d*(C*d + 2*B*e) + A*(2*c*d^2 + a*e^2))*x^3 + (1/4)*a^2*e*(2*C*d + B*e)*x^4 + (1/5)*(A*c*(c*d^2 + 2*a*e^2) + a*(a*C*e^2 + 2*c*d*(C*d + 2*B*e)))*x^5 + (1/3)*a*c*e*(2*C*d + B*e)*x^6 + (1/7)*c*(2*a*C*e^2 + c*(C*d^2 + e*(2*B*d + A*e)))*x^7 + (1/8)*c^2*e*(2*C*d + B*e)*x^8 + (1/9)*c^2*C*e^2*x^9 + (d*(B*d + 2*A*e)*(a + c*x^2)^3)/(6*c)]
    @test_int [(d + e*x)^1*(A + B*x + C*x^2)*(a + c*x^2)^2, x, 3, a^2*A*d*x + (1/3)*a*(2*A*c*d + a*C*d + a*B*e)*x^3 + (1/4)*a^2*C*e*x^4 + (1/5)*c*(A*c*d + 2*a*(C*d + B*e))*x^5 + (1/3)*a*c*C*e*x^6 + (1/7)*c^2*(C*d + B*e)*x^7 + (1/8)*c^2*C*e*x^8 + ((B*d + A*e)*(a + c*x^2)^3)/(6*c)]
    @test_int [(d + e*x)^0*(A + B*x + C*x^2)*(a + c*x^2)^2, x, 3, a^2*A*x + (1/3)*a*(2*A*c + a*C)*x^3 + (1/5)*c*(A*c + 2*a*C)*x^5 + (1/7)*c^2*C*x^7 + (B*(a + c*x^2)^3)/(6*c)]
    @test_int [(A + B*x + C*x^2)*(a + c*x^2)^2/(d + e*x)^1, x, 2, -(((a^2*e^4*(C*d - B*e) + c^2*d^3*(C*d^2 - e*(B*d - A*e)) + 2*a*c*d*e^2*(C*d^2 - e*(B*d - A*e)))*x)/e^6) + ((a^2*C*e^4 + c^2*d^2*(C*d^2 - e*(B*d - A*e)) + 2*a*c*e^2*(C*d^2 - e*(B*d - A*e)))*x^2)/(2*e^5) - (c*(2*a*e^2*(C*d - B*e) + c*d*(C*d^2 - e*(B*d - A*e)))*x^3)/(3*e^4) + (c*(2*a*C*e^2 + c*(C*d^2 - e*(B*d - A*e)))*x^4)/(4*e^3) - (c^2*(C*d - B*e)*x^5)/(5*e^2) + (c^2*C*x^6)/(6*e) + ((c*d^2 + a*e^2)^2*(C*d^2 - B*d*e + A*e^2)*log(d + e*x))/e^7]
    @test_int [(A + B*x + C*x^2)*(a + c*x^2)^2/(d + e*x)^2, x, 2, ((a^2*C*e^4 + c^2*d^2*(5*C*d^2 - e*(4*B*d - 3*A*e)) + 2*a*c*e^2*(3*C*d^2 - e*(2*B*d - A*e)))*x)/e^6 - (c*(2*a*e^2*(2*C*d - B*e) + c*d*(4*C*d^2 - e*(3*B*d - 2*A*e)))*x^2)/(2*e^5) + (c*(2*a*C*e^2 + c*(3*C*d^2 - e*(2*B*d - A*e)))*x^3)/(3*e^4) - (c^2*(2*C*d - B*e)*x^4)/(4*e^3) + (c^2*C*x^5)/(5*e^2) - ((c*d^2 + a*e^2)^2*(C*d^2 - B*d*e + A*e^2))/(e^7*(d + e*x)) - ((c*d^2 + a*e^2)*(a*e^2*(2*C*d - B*e) + c*d*(6*C*d^2 - e*(5*B*d - 4*A*e)))*log(d + e*x))/e^7]
    @test_int [(A + B*x + C*x^2)*(a + c*x^2)^2/(d + e*x)^3, x, 2, -((c*(2*a*e^2*(3*C*d - B*e) + c*d*(10*C*d^2 - 3*e*(2*B*d - A*e)))*x)/e^6) + (c*(2*a*C*e^2 + c*(6*C*d^2 - e*(3*B*d - A*e)))*x^2)/(2*e^5) - (c^2*(3*C*d - B*e)*x^3)/(3*e^4) + (c^2*C*x^4)/(4*e^3) - ((c*d^2 + a*e^2)^2*(C*d^2 - B*d*e + A*e^2))/(2*e^7*(d + e*x)^2) + ((c*d^2 + a*e^2)*(a*e^2*(2*C*d - B*e) + c*d*(6*C*d^2 - e*(5*B*d - 4*A*e))))/(e^7*(d + e*x)) + ((a^2*C*e^4 + c^2*d^2*(15*C*d^2 - 2*e*(5*B*d - 3*A*e)) + 2*a*c*e^2*(6*C*d^2 - e*(3*B*d - A*e)))*log(d + e*x))/e^7]

    @test_int [(d + e*x)^3*(A + B*x + C*x^2)*(a + c*x^2)^3, x, 3, a^3*A*d^3*x + (1/3)*a^2*d*(a*d*(C*d + 3*B*e) + 3*A*(c*d^2 + a*e^2))*x^3 + (1/4)*a^3*e*(3*C*d^2 + e*(3*B*d + A*e))*x^4 + (1/5)*a*(3*A*c*d*(c*d^2 + 3*a*e^2) + a*(a*e^2*(3*C*d + B*e) + 3*c*d^2*(C*d + 3*B*e)))*x^5 + (1/6)*a^2*e*(a*C*e^2 + 3*c*(3*C*d^2 + e*(3*B*d + A*e)))*x^6 + (1/7)*c*(A*c*d*(c*d^2 + 9*a*e^2) + 3*a*(a*e^2*(3*C*d + B*e) + c*d^2*(C*d + 3*B*e)))*x^7 + (3/8)*a*c*e*(a*C*e^2 + c*(3*C*d^2 + e*(3*B*d + A*e)))*x^8 + (1/9)*c^2*(3*a*e^2*(3*C*d + B*e) + c*d*(C*d^2 + 3*e*(B*d + A*e)))*x^9 + (1/10)*c^2*e*(3*a*C*e^2 + c*(3*C*d^2 + e*(3*B*d + A*e)))*x^10 + (1/11)*c^3*e^2*(3*C*d + B*e)*x^11 + (1/12)*c^3*C*e^3*x^12 + (d^2*(B*d + 3*A*e)*(a + c*x^2)^4)/(8*c)]
    @test_int [(d + e*x)^2*(A + B*x + C*x^2)*(a + c*x^2)^3, x, 3, a^3*A*d^2*x + (1/3)*a^2*(a*d*(C*d + 2*B*e) + A*(3*c*d^2 + a*e^2))*x^3 + (1/4)*a^3*e*(2*C*d + B*e)*x^4 + (1/5)*a*(3*A*c*(c*d^2 + a*e^2) + a*(a*C*e^2 + 3*c*d*(C*d + 2*B*e)))*x^5 + (1/2)*a^2*c*e*(2*C*d + B*e)*x^6 + (1/7)*c*(A*c*(c*d^2 + 3*a*e^2) + 3*a*(a*C*e^2 + c*d*(C*d + 2*B*e)))*x^7 + (3/8)*a*c^2*e*(2*C*d + B*e)*x^8 + (1/9)*c^2*(3*a*C*e^2 + c*(C*d^2 + e*(2*B*d + A*e)))*x^9 + (1/10)*c^3*e*(2*C*d + B*e)*x^10 + (1/11)*c^3*C*e^2*x^11 + (d*(B*d + 2*A*e)*(a + c*x^2)^4)/(8*c)]
    @test_int [(d + e*x)^1*(A + B*x + C*x^2)*(a + c*x^2)^3, x, 3, a^3*A*d*x + (1/3)*a^2*(3*A*c*d + a*C*d + a*B*e)*x^3 + (1/4)*a^3*C*e*x^4 + (3/5)*a*c*(A*c*d + a*C*d + a*B*e)*x^5 + (1/2)*a^2*c*C*e*x^6 + (1/7)*c^2*(A*c*d + 3*a*(C*d + B*e))*x^7 + (3/8)*a*c^2*C*e*x^8 + (1/9)*c^3*(C*d + B*e)*x^9 + (1/10)*c^3*C*e*x^10 + ((B*d + A*e)*(a + c*x^2)^4)/(8*c)]
    @test_int [(d + e*x)^0*(A + B*x + C*x^2)*(a + c*x^2)^3, x, 3, a^3*A*x + (1/3)*a^2*(3*A*c + a*C)*x^3 + (3/5)*a*c*(A*c + a*C)*x^5 + (1/7)*c^2*(A*c + 3*a*C)*x^7 + (1/9)*c^3*C*x^9 + (B*(a + c*x^2)^4)/(8*c)]
    @test_int [(A + B*x + C*x^2)*(a + c*x^2)^3/(d + e*x)^1, x, 2, -(((c*d^2 + a*e^2)^2*(a*e^2*(2*C*d - B*e) + c*d*(8*C*d^2 - e*(7*B*d - 6*A*e)))*x)/e^8) + ((c*d^2 + a*e^2)*(a^2*C*e^4 + c^2*d^2*(28*C*d^2 - 3*e*(7*B*d - 5*A*e)) + a*c*e^2*(17*C*d^2 - 3*e*(3*B*d - A*e)))*(d + e*x)^2)/(2*e^9) - (c*(3*a^2*e^4*(4*C*d - B*e) + c^2*d^3*(56*C*d^2 - 5*e*(7*B*d - 4*A*e)) + 6*a*c*d*e^2*(10*C*d^2 - e*(5*B*d - 2*A*e)))*(d + e*x)^3)/(3*e^9) + (c*(3*a^2*C*e^4 + 5*c^2*d^2*(14*C*d^2 - e*(7*B*d - 3*A*e)) + 3*a*c*e^2*(15*C*d^2 - e*(5*B*d - A*e)))*(d + e*x)^4)/(4*e^9) - (c^2*(3*a*e^2*(6*C*d - B*e) + c*d*(56*C*d^2 - 3*e*(7*B*d - 2*A*e)))*(d + e*x)^5)/(5*e^9) + (c^2*(3*a*C*e^2 + c*(28*C*d^2 - e*(7*B*d - A*e)))*(d + e*x)^6)/(6*e^9) - (c^3*(8*C*d - B*e)*(d + e*x)^7)/(7*e^9) + (c^3*C*(d + e*x)^8)/(8*e^9) + ((c*d^2 + a*e^2)^3*(C*d^2 - B*d*e + A*e^2)*log(d + e*x))/e^9]
    @test_int [(A + B*x + C*x^2)*(a + c*x^2)^3/(d + e*x)^2, x, 2, ((a^3*C*e^6 + c^3*d^4*(7*C*d^2 - e*(6*B*d - 5*A*e)) + 3*a*c^2*d^2*e^2*(5*C*d^2 - e*(4*B*d - 3*A*e)) + 3*a^2*c*e^4*(3*C*d^2 - e*(2*B*d - A*e)))*x)/e^8 - (c*(3*a^2*e^4*(2*C*d - B*e) + c^2*d^3*(6*C*d^2 - e*(5*B*d - 4*A*e)) + 3*a*c*d*e^2*(4*C*d^2 - e*(3*B*d - 2*A*e)))*x^2)/(2*e^7) + (c*(3*a^2*C*e^4 + c^2*d^2*(5*C*d^2 - e*(4*B*d - 3*A*e)) + 3*a*c*e^2*(3*C*d^2 - e*(2*B*d - A*e)))*x^3)/(3*e^6) - (c^2*(3*a*e^2*(2*C*d - B*e) + c*d*(4*C*d^2 - e*(3*B*d - 2*A*e)))*x^4)/(4*e^5) + (c^2*(3*a*C*e^2 + c*(3*C*d^2 - e*(2*B*d - A*e)))*x^5)/(5*e^4) - (c^3*(2*C*d - B*e)*x^6)/(6*e^3) + (c^3*C*x^7)/(7*e^2) - ((c*d^2 + a*e^2)^3*(C*d^2 - B*d*e + A*e^2))/(e^9*(d + e*x)) - ((c*d^2 + a*e^2)^2*(a*e^2*(2*C*d - B*e) + c*d*(8*C*d^2 - e*(7*B*d - 6*A*e)))*log(d + e*x))/e^9]
    @test_int [(A + B*x + C*x^2)*(a + c*x^2)^3/(d + e*x)^3, x, 2, -((c*(3*a^2*e^4*(3*C*d - B*e) + c^2*d^3*(21*C*d^2 - 5*e*(3*B*d - 2*A*e)) + 3*a*c*d*e^2*(10*C*d^2 - 3*e*(2*B*d - A*e)))*x)/e^8) + (c*(3*a^2*C*e^4 + c^2*d^2*(15*C*d^2 - 2*e*(5*B*d - 3*A*e)) + 3*a*c*e^2*(6*C*d^2 - e*(3*B*d - A*e)))*x^2)/(2*e^7) - (c^2*(3*a*e^2*(3*C*d - B*e) + c*d*(10*C*d^2 - 3*e*(2*B*d - A*e)))*x^3)/(3*e^6) + (c^2*(3*a*C*e^2 + c*(6*C*d^2 - e*(3*B*d - A*e)))*x^4)/(4*e^5) - (c^3*(3*C*d - B*e)*x^5)/(5*e^4) + (c^3*C*x^6)/(6*e^3) - ((c*d^2 + a*e^2)^3*(C*d^2 - B*d*e + A*e^2))/(2*e^9*(d + e*x)^2) + ((c*d^2 + a*e^2)^2*(a*e^2*(2*C*d - B*e) + c*d*(8*C*d^2 - e*(7*B*d - 6*A*e))))/(e^9*(d + e*x)) + ((c*d^2 + a*e^2)*(a^2*C*e^4 + c^2*d^2*(28*C*d^2 - 3*e*(7*B*d - 5*A*e)) + a*c*e^2*(17*C*d^2 - 3*e*(3*B*d - A*e)))*log(d + e*x))/e^9]

    @test_int [(a + b*x^2)*(-a*d + 4*b*c*x + 3*b*d*x^2)/(c + d*x)^2, x, 1, (a + b*x^2)^2/(c + d*x)]
    @test_int [(a + b*x^2)*(-a*d + b*x*(4*c + 3*d*x))/(c + d*x)^2, x, 1, (a + b*x^2)^2/(c + d*x)]

    @test_int [(a + b*x^2)^2*(-a*d + 6*b*c*x + 5*b*d*x^2)/(c + d*x)^2, x, 1, (a + b*x^2)^3/(c + d*x)]
    @test_int [(a + b*x^2)^2*(-a*d + b*x*(6*c + 5*d*x))/(c + d*x)^2, x, 1, (a + b*x^2)^3/(c + d*x)]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(d + e*x)^3*(A + B*x + C*x^2)/(a + c*x^2), x, 5, -(((a*e^2*(3*C*d + B*e) - c*d*(C*d^2 + 3*e*(B*d + A*e)))*x)/c^2) - (e*(a*C*e^2 - c*(3*C*d^2 + e*(3*B*d + A*e)))*x^2)/(2*c^2) + (e^2*(3*C*d + B*e)*x^3)/(3*c) + (C*e^3*x^4)/(4*c) + ((A*c*d*(c*d^2 - 3*a*e^2) + a*(a*e^2*(3*C*d + B*e) - c*d^2*(C*d + 3*B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(sqrt(a)*c^(5/2)) + ((B*c*d*(c*d^2 - 3*a*e^2) + (A*c - a*C)*e*(3*c*d^2 - a*e^2))*log(a + c*x^2))/(2*c^3)]
    @test_int [(d + e*x)^2*(A + B*x + C*x^2)/(a + c*x^2), x, 5, -(((a*C*e^2 - c*(C*d^2 + e*(2*B*d + A*e)))*x)/c^2) + (e*(2*C*d + B*e)*x^2)/(2*c) + (C*e^2*x^3)/(3*c) + ((A*c*(c*d^2 - a*e^2) + a*(a*C*e^2 - c*d*(C*d + 2*B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(sqrt(a)*c^(5/2)) + ((B*c*d^2 + 2*A*c*d*e - 2*a*C*d*e - a*B*e^2)*log(a + c*x^2))/(2*c^2)]
    @test_int [(d + e*x)^1*(A + B*x + C*x^2)/(a + c*x^2), x, 5, ((C*d + B*e)*x)/c + (C*e*x^2)/(2*c) + ((A*c*d - a*(C*d + B*e))*atan((sqrt(c)*x)/sqrt(a)))/(sqrt(a)*c^(3/2)) + ((B*c*d + A*c*e - a*C*e)*log(a + c*x^2))/(2*c^2)]
    @test_int [(d + e*x)^0*(A + B*x + C*x^2)/(a + c*x^2), x, 5, (C*x)/c + ((A*c - a*C)*atan((sqrt(c)*x)/sqrt(a)))/(sqrt(a)*c^(3/2)) + (B*log(a + c*x^2))/(2*c)]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)/(d + e*x)^1, x, 5, ((A*c*d - a*C*d + a*B*e)*atan((sqrt(c)*x)/sqrt(a)))/(sqrt(a)*sqrt(c)*(c*d^2 + a*e^2)) + ((C*d^2 - B*d*e + A*e^2)*log(d + e*x))/(e*(c*d^2 + a*e^2)) + ((B*c*d - A*c*e + a*C*e)*log(a + c*x^2))/(2*c*(c*d^2 + a*e^2))]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)/(d + e*x)^2, x, 5, -((C*d^2 - B*d*e + A*e^2)/(e*(c*d^2 + a*e^2)*(d + e*x))) + ((A*c*(c*d^2 - a*e^2) + a*(a*C*e^2 - c*d*(C*d - 2*B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(sqrt(a)*sqrt(c)*(c*d^2 + a*e^2)^2) - ((B*c*d^2 - 2*A*c*d*e + 2*a*C*d*e - a*B*e^2)*log(d + e*x))/(c*d^2 + a*e^2)^2 + ((B*c*d^2 - 2*A*c*d*e + 2*a*C*d*e - a*B*e^2)*log(a + c*x^2))/(2*(c*d^2 + a*e^2)^2)]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)/(d + e*x)^3, x, 5, -((C*d^2 - B*d*e + A*e^2)/(2*e*(c*d^2 + a*e^2)*(d + e*x)^2)) + (B*c*d^2 - 2*A*c*d*e + 2*a*C*d*e - a*B*e^2)/((c*d^2 + a*e^2)^2*(d + e*x)) + (sqrt(c)*(A*c*d*(c*d^2 - 3*a*e^2) - a*(c*d^2*(C*d - 3*B*e) - a*e^2*(3*C*d - B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(sqrt(a)*(c*d^2 + a*e^2)^3) - ((B*c*d*(c*d^2 - 3*a*e^2) - (A*c - a*C)*e*(3*c*d^2 - a*e^2))*log(d + e*x))/(c*d^2 + a*e^2)^3 + ((B*c*d*(c*d^2 - 3*a*e^2) - (A*c - a*C)*e*(3*c*d^2 - a*e^2))*log(a + c*x^2))/(2*(c*d^2 + a*e^2)^3)]

    @test_int [(d + e*x)^3*(A + B*x + C*x^2)/(a + c*x^2)^2, x, 6, -((3*e^2*(A*c*d - a*(3*C*d + B*e))*x)/(2*a*c^2)) - ((A*c - 2*a*C)*e^3*x^2)/(2*a*c^2) - ((a*B - (A*c - a*C)*x)*(d + e*x)^3)/(2*a*c*(a + c*x^2)) + ((A*c*d*(c*d^2 + 3*a*e^2) - a*(3*a*e^2*(3*C*d + B*e) - c*d^2*(C*d + 3*B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(2*a^(3/2)*c^(5/2)) - (e*(2*a*C*e^2 - c*(3*C*d^2 + e*(3*B*d + A*e)))*log(a + c*x^2))/(2*c^3)]
    @test_int [(d + e*x)^2*(A + B*x + C*x^2)/(a + c*x^2)^2, x, 5, -(((A*c - 3*a*C)*e^2*x)/(2*a*c^2)) - ((a*B - (A*c - a*C)*x)*(d + e*x)^2)/(2*a*c*(a + c*x^2)) + ((a*(A*c - 3*a*C)*e^2 + c*d*(A*c*d + a*C*d + 2*a*B*e))*atan((sqrt(c)*x)/sqrt(a)))/(2*a^(3/2)*c^(5/2)) + (e*(2*C*d + B*e)*log(a + c*x^2))/(2*c^2)]
    @test_int [(d + e*x)^1*(A + B*x + C*x^2)/(a + c*x^2)^2, x, 4, -(((a*B - (A*c - a*C)*x)*(d + e*x))/(2*a*c*(a + c*x^2))) + ((A*c*d + a*C*d + a*B*e)*atan((sqrt(c)*x)/sqrt(a)))/(2*a^(3/2)*c^(3/2)) + (C*e*log(a + c*x^2))/(2*c^2)]
    @test_int [(d + e*x)^0*(A + B*x + C*x^2)/(a + c*x^2)^2, x, 3, -((a*B - (A*c - a*C)*x)/(2*a*c*(a + c*x^2))) + ((A*c + a*C)*atan((sqrt(c)*x)/sqrt(a)))/(2*a^(3/2)*c^(3/2))]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)^2/(d + e*x)^1, x, 6, -((a*(B*c*d - A*c*e + a*C*e) - c*(A*c*d - a*C*d + a*B*e)*x)/(2*a*c*(c*d^2 + a*e^2)*(a + c*x^2))) + ((a*(C*d - B*e)*(c*d^2 - a*e^2) + A*c*d*(c*d^2 + 3*a*e^2))*atan((sqrt(c)*x)/sqrt(a)))/(2*a^(3/2)*sqrt(c)*(c*d^2 + a*e^2)^2) + (e*(C*d^2 - B*d*e + A*e^2)*log(d + e*x))/(c*d^2 + a*e^2)^2 - (e*(C*d^2 - B*d*e + A*e^2)*log(a + c*x^2))/(2*(c*d^2 + a*e^2)^2)]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)^2/(d + e*x)^2, x, 6, -((e*(C*d^2 - B*d*e + A*e^2))/((c*d^2 + a*e^2)^2*(d + e*x))) - (a*(B*c*d^2 - 2*A*c*d*e + 2*a*C*d*e - a*B*e^2) - (A*c*(c*d^2 - a*e^2) + a*(a*C*e^2 - c*d*(C*d - 2*B*e)))*x)/(2*a*(c*d^2 + a*e^2)^2*(a + c*x^2)) + ((A*c*(c^2*d^4 + 6*a*c*d^2*e^2 - 3*a^2*e^4) + a*(a^2*C*e^4 + c^2*d^3*(C*d - 2*B*e) - 6*a*c*d*e^2*(C*d - B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(2*a^(3/2)*sqrt(c)*(c*d^2 + a*e^2)^3) - (e*(a*e^2*(2*C*d - B*e) - c*d*(2*C*d^2 - e*(3*B*d - 4*A*e)))*log(d + e*x))/(c*d^2 + a*e^2)^3 + (e*(a*e^2*(2*C*d - B*e) - c*d*(2*C*d^2 - e*(3*B*d - 4*A*e)))*log(a + c*x^2))/(2*(c*d^2 + a*e^2)^3)]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)^2/(d + e*x)^3, x, 6, -((e*(C*d^2 - B*d*e + A*e^2))/(2*(c*d^2 + a*e^2)^2*(d + e*x)^2)) + (e*(a*e^2*(2*C*d - B*e) - c*d*(2*C*d^2 - e*(3*B*d - 4*A*e))))/((c*d^2 + a*e^2)^3*(d + e*x)) - (a*(B*c*d*(c*d^2 - 3*a*e^2) - (A*c - a*C)*e*(3*c*d^2 - a*e^2)) - c*(A*c*d*(c*d^2 - 3*a*e^2) - a*(c*d^2*(C*d - 3*B*e) - a*e^2*(3*C*d - B*e)))*x)/(2*a*(c*d^2 + a*e^2)^3*(a + c*x^2)) + (sqrt(c)*(A*c*d*(c^2*d^4 + 10*a*c*d^2*e^2 - 15*a^2*e^4) - a*(2*a*c*d^2*e^2*(7*C*d - 9*B*e) - c^2*d^4*(C*d - 3*B*e) - 3*a^2*e^4*(3*C*d - B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(2*a^(3/2)*(c*d^2 + a*e^2)^4) + (e*(a^2*C*e^4 + c^2*d^2*(3*C*d^2 - 2*e*(3*B*d - 5*A*e)) - 2*a*c*e^2*(4*C*d^2 - e*(3*B*d - A*e)))*log(d + e*x))/(c*d^2 + a*e^2)^4 - (e*(a^2*C*e^4 + c^2*d^2*(3*C*d^2 - 2*e*(3*B*d - 5*A*e)) - 2*a*c*e^2*(4*C*d^2 - e*(3*B*d - A*e)))*log(a + c*x^2))/(2*(c*d^2 + a*e^2)^4)]

    @test_int [(d + e*x)^3*(A + B*x + C*x^2)/(a + c*x^2)^3, x, 5, If(13>=8, -(((a*B - (A*c - a*C)*x)*(d + e*x)^3)/(4*a*c*(a + c*x^2)^2)) - ((d + e*x)*(a*e*(3*A*c*d + 5*a*C*d + 3*a*B*e) - (3*A*c^2*d^2 - a*(4*a*C*e^2 - c*d*(C*d + 3*B*e)))*x))/(8*a^2*c^2*(a + c*x^2)) + ((3*a*e^2*(A*c*d + 3*a*C*d + a*B*e) + c*d^2*(3*A*c*d + a*C*d + 3*a*B*e))*atan((sqrt(c)*x)/sqrt(a)))/(8*a^(5/2)*c^(5/2)) + (C*e^3*log(a + c*x^2))/(2*c^3), -(((a*B - (A*c - a*C)*x)*(d + e*x)^3)/(4*a*c*(a + c*x^2)^2)) - ((d + e*x)*(a*e*(3*A*c*d + 5*a*C*d + 3*a*B*e) - (3*A*c^2*d^2 - a*(4*a*C*e^2 - c*d*(C*d + 3*B*e)))*x))/(8*a^2*c^2*(a + c*x^2)) + ((3*A*c*d*(c*d^2 + a*e^2) + a*(3*a*e^2*(3*C*d + B*e) + c*d^2*(C*d + 3*B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(8*a^(5/2)*c^(5/2)) + (C*e^3*log(a + c*x^2))/(2*c^3))]
    @test_int [(d + e*x)^2*(A + B*x + C*x^2)/(a + c*x^2)^3, x, 3, -(((a*B - (A*c - a*C)*x)*(d + e*x)^2)/(4*a*c*(a + c*x^2)^2)) - ((d + e*x)*(a*(A*c + 3*a*C)*e - c*(3*A*c*d + a*C*d + 2*a*B*e)*x))/(8*a^2*c^2*(a + c*x^2)) + ((a*(A*c + 3*a*C)*e^2 + c*d*(3*A*c*d + a*C*d + 2*a*B*e))*atan((sqrt(c)*x)/sqrt(a)))/(8*a^(5/2)*c^(5/2)), -(((a*B - (A*c - a*C)*x)*(d + e*x)^2)/(4*a*c*(a + c*x^2)^2)) - (2*a*e*(2*A*c*d + 2*a*C*d + a*B*e) + (a*(A*c + 3*a*C)*e^2 - c*d*(3*A*c*d + a*C*d + 2*a*B*e))*x)/(8*a^2*c^2*(a + c*x^2)) + ((a*(A*c + 3*a*C)*e^2 + c*d*(3*A*c*d + a*C*d + 2*a*B*e))*atan((sqrt(c)*x)/sqrt(a)))/(8*a^(5/2)*c^(5/2))]
    @test_int [(d + e*x)^1*(A + B*x + C*x^2)/(a + c*x^2)^3, x, 3, -(((a*B - (A*c - a*C)*x)*(d + e*x))/(4*a*c*(a + c*x^2)^2)) - (2*a*(A*c + a*C)*e - c*(3*A*c*d + a*C*d + a*B*e)*x)/(8*a^2*c^2*(a + c*x^2)) + ((3*A*c*d + a*C*d + a*B*e)*atan((sqrt(c)*x)/sqrt(a)))/(8*a^(5/2)*c^(3/2))]
    @test_int [(d + e*x)^0*(A + B*x + C*x^2)/(a + c*x^2)^3, x, 4, -((a*B - (A*c - a*C)*x)/(4*a*c*(a + c*x^2)^2)) + ((3*A*c + a*C)*x)/(8*a^2*c*(a + c*x^2)) + ((3*A*c + a*C)*atan((sqrt(c)*x)/sqrt(a)))/(8*a^(5/2)*c^(3/2))]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)^3/(d + e*x)^1, x, 7, -((a*(B*c*d - A*c*e + a*C*e) - c*(A*c*d - a*C*d + a*B*e)*x)/(4*a*c*(c*d^2 + a*e^2)*(a + c*x^2)^2)) + (4*a^2*e*(C*d^2 - B*d*e + A*e^2) + (a*(C*d - B*e)*(c*d^2 - 3*a*e^2) + A*c*d*(3*c*d^2 + 7*a*e^2))*x)/(8*a^2*(c*d^2 + a*e^2)^2*(a + c*x^2)) + ((a*(C*d - B*e)*(c^2*d^4 + 6*a*c*d^2*e^2 - 3*a^2*e^4) + A*c*d*(3*c^2*d^4 + 10*a*c*d^2*e^2 + 15*a^2*e^4))*atan((sqrt(c)*x)/sqrt(a)))/(8*a^(5/2)*sqrt(c)*(c*d^2 + a*e^2)^3) + (e^3*(C*d^2 - B*d*e + A*e^2)*log(d + e*x))/(c*d^2 + a*e^2)^3 - (e^3*(C*d^2 - B*d*e + A*e^2)*log(a + c*x^2))/(2*(c*d^2 + a*e^2)^3)]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)^3/(d + e*x)^2, x, 7, -((e^3*(C*d^2 - B*d*e + A*e^2))/((c*d^2 + a*e^2)^3*(d + e*x))) - (a*(B*c*d^2 - 2*A*c*d*e + 2*a*C*d*e - a*B*e^2) - (A*c*(c*d^2 - a*e^2) + a*(a*C*e^2 - c*d*(C*d - 2*B*e)))*x)/(4*a*(c*d^2 + a*e^2)^2*(a + c*x^2)^2) - (4*a^2*e*(a*e^2*(2*C*d - B*e) - c*d*(2*C*d^2 - e*(3*B*d - 4*A*e))) - (A*c*(3*c^2*d^4 + 12*a*c*d^2*e^2 - 7*a^2*e^4) + a*(3*a^2*C*e^4 - 2*a*c*d*e^2*(6*C*d - 7*B*e) + c^2*d^3*(C*d - 2*B*e)))*x)/(8*a^2*(c*d^2 + a*e^2)^3*(a + c*x^2)) + ((3*A*c*(c^3*d^6 + 5*a*c^2*d^4*e^2 + 15*a^2*c*d^2*e^4 - 5*a^3*e^6) + a*(3*a^3*C*e^6 + a*c^2*d^3*e^2*(13*C*d - 20*B*e) - 3*a^2*c*d*e^4*(11*C*d - 10*B*e) + c^3*d^5*(C*d - 2*B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(8*a^(5/2)*sqrt(c)*(c*d^2 + a*e^2)^4) - (e^3*(a*e^2*(2*C*d - B*e) - c*d*(4*C*d^2 - e*(5*B*d - 6*A*e)))*log(d + e*x))/(c*d^2 + a*e^2)^4 + (e^3*(a*e^2*(2*C*d - B*e) - c*d*(4*C*d^2 - e*(5*B*d - 6*A*e)))*log(a + c*x^2))/(2*(c*d^2 + a*e^2)^4)]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)^3/(d + e*x)^3, x, 7, -((e^3*(C*d^2 - B*d*e + A*e^2))/(2*(c*d^2 + a*e^2)^3*(d + e*x)^2)) + (e^3*(a*e^2*(2*C*d - B*e) - c*d*(4*C*d^2 - e*(5*B*d - 6*A*e))))/((c*d^2 + a*e^2)^4*(d + e*x)) - (a*(B*c*d*(c*d^2 - 3*a*e^2) - (A*c - a*C)*e*(3*c*d^2 - a*e^2)) - c*(A*c*d*(c*d^2 - 3*a*e^2) - a*(c*d^2*(C*d - 3*B*e) - a*e^2*(3*C*d - B*e)))*x)/(4*a*(c*d^2 + a*e^2)^3*(a + c*x^2)^2) + (1/(8*a^2*(c*d^2 + a*e^2)^4*(a + c*x^2)))*(4*a^2*e*(a^2*C*e^4 + c^2*d^2*(3*C*d^2 - 2*e*(3*B*d - 5*A*e)) - 2*a*c*e^2*(4*C*d^2 - e*(3*B*d - A*e))) + c*(3*A*c*d*(c^2*d^4 + 6*a*c*d^2*e^2 - 11*a^2*e^4) - a*(2*a*c*d^2*e^2*(13*C*d - 19*B*e) - c^2*d^4*(C*d - 3*B*e) - 7*a^2*e^4*(3*C*d - B*e)))*x) + (1/(8*a^(5/2)*(c*d^2 + a*e^2)^5))*(sqrt(c)*(3*A*c*d*(c^3*d^6 + 7*a*c^2*d^4*e^2 + 35*a^2*c*d^2*e^4 - 35*a^3*e^6) + a*(a*c^2*d^4*e^2*(23*C*d - 45*B*e) - 5*a^2*c*d^2*e^4*(25*C*d - 27*B*e) + c^3*d^6*(C*d - 3*B*e) + 15*a^3*e^6*(3*C*d - B*e)))*atan((sqrt(c)*x)/sqrt(a))) + (e^3*(a^2*C*e^4 - a*c*e^2*(13*C*d^2 - 9*B*d*e + 3*A*e^2) + c^2*d^2*(10*C*d^2 - 3*e*(5*B*d - 7*A*e)))*log(d + e*x))/(c*d^2 + a*e^2)^5 - (e^3*(a^2*C*e^4 - a*c*e^2*(13*C*d^2 - 9*B*d*e + 3*A*e^2) + c^2*d^2*(10*C*d^2 - 3*e*(5*B*d - 7*A*e)))*log(a + c*x^2))/(2*(c*d^2 + a*e^2)^5)]

    @test_int [(d + e*x)^4*(A + B*x + C*x^2)/(a + c*x^2)^4, x, 4, -(((a*B - (A*c - a*C)*x)*(d + e*x)^4)/(6*a*c*(a + c*x^2)^3)) - ((d + e*x)^3*(a*(A*c + 5*a*C)*e - c*(5*A*c*d + a*C*d + 4*a*B*e)*x))/(24*a^2*c^2*(a + c*x^2)^2) - ((a*(A*c + 5*a*C)*e^2 + c*d*(5*A*c*d + a*C*d + 4*a*B*e))*(a*e - c*d*x)*(d + e*x))/(16*a^3*c^3*(a + c*x^2)) + ((c*d^2 + a*e^2)*(a*(A*c + 5*a*C)*e^2 + c*d*(5*A*c*d + a*C*d + 4*a*B*e))*atan((sqrt(c)*x)/sqrt(a)))/(16*a^(7/2)*c^(7/2))]
    @test_int [(d + e*x)^3*(A + B*x + C*x^2)/(a + c*x^2)^4, x, 4, -(((a*B - (A*c - a*C)*x)*(d + e*x)^3)/(6*a*c*(a + c*x^2)^3)) - ((d + e*x)^2*(2*a*(A*c + 2*a*C)*e - c*(5*A*c*d + a*C*d + 3*a*B*e)*x))/(24*a^2*c^2*(a + c*x^2)^2) - ((d + e*x)*(a*e*(5*A*c*d + a*C*d + 3*a*B*e) - (4*a*(A*c + 2*a*C)*e^2 + 3*c*d*(5*A*c*d + a*C*d + 3*a*B*e))*x))/(48*a^3*c^2*(a + c*x^2)) + ((A*c*d*(5*c*d^2 + 3*a*e^2) + a*(a*e^2*(3*C*d + B*e) + c*d^2*(C*d + 3*B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(16*a^(7/2)*c^(5/2)), -(((a*B - (A*c - a*C)*x)*(d + e*x)^3)/(6*a*c*(a + c*x^2)^3)) - ((d + e*x)^2*(2*a*(A*c + 2*a*C)*e - c*(5*A*c*d + a*C*d + 3*a*B*e)*x))/(24*a^2*c^2*(a + c*x^2)^2) - (4*a*e*(A*c*(5*c*d^2 + a*e^2) + a*(2*a*C*e^2 + c*d*(C*d + 3*B*e))) - c*(A*c*d*(15*c*d^2 - a*e^2) + a*(a*e^2*(7*C*d - 3*B*e) + 3*c*d^2*(C*d + 3*B*e)))*x)/(48*a^3*c^3*(a + c*x^2)) + ((A*c*d*(5*c*d^2 + 3*a*e^2) + a*(a*e^2*(3*C*d + B*e) + c*d^2*(C*d + 3*B*e)))*atan((sqrt(c)*x)/sqrt(a)))/(16*a^(7/2)*c^(5/2))]
    @test_int [(d + e*x)^2*(A + B*x + C*x^2)/(a + c*x^2)^4, x, 4, -(((a*B - (A*c - a*C)*x)*(d + e*x)^2)/(6*a*c*(a + c*x^2)^3)) - (2*a*e*(4*A*c*d + 2*a*C*d + a*B*e) + (3*a*(A*c + a*C)*e^2 - c*d*(5*A*c*d + a*C*d + 2*a*B*e))*x)/(24*a^2*c^2*(a + c*x^2)^2) + ((a*(A*c + a*C)*e^2 + c*d*(5*A*c*d + a*C*d + 2*a*B*e))*x)/(16*a^3*c^2*(a + c*x^2)) + ((a*(A*c + a*C)*e^2 + c*d*(5*A*c*d + a*C*d + 2*a*B*e))*atan((sqrt(c)*x)/sqrt(a)))/(16*a^(7/2)*c^(5/2))]
    @test_int [(d + e*x)^1*(A + B*x + C*x^2)/(a + c*x^2)^4, x, 4, -(((a*B - (A*c - a*C)*x)*(d + e*x))/(6*a*c*(a + c*x^2)^3)) - (2*a*(2*A*c + a*C)*e - c*(5*A*c*d + a*C*d + a*B*e)*x)/(24*a^2*c^2*(a + c*x^2)^2) + ((5*A*c*d + a*C*d + a*B*e)*x)/(16*a^3*c*(a + c*x^2)) + ((5*A*c*d + a*C*d + a*B*e)*atan((sqrt(c)*x)/sqrt(a)))/(16*a^(7/2)*c^(3/2))]
    @test_int [(d + e*x)^0*(A + B*x + C*x^2)/(a + c*x^2)^4, x, 5, -((a*B - (A*c - a*C)*x)/(6*a*c*(a + c*x^2)^3)) + ((5*A*c + a*C)*x)/(24*a^2*c*(a + c*x^2)^2) + ((5*A*c + a*C)*x)/(16*a^3*c*(a + c*x^2)) + ((5*A*c + a*C)*atan((sqrt(c)*x)/sqrt(a)))/(16*a^(7/2)*c^(3/2))]

    @test_int [x^3*(1 + x + x^2)/(1 + x^2)^2, x, 6, (3*x)/2 + x^2/2 - x^3/(2*(1 + x^2)) - (3*atan(x))/2 - (1/2)*log(1 + x^2)]
    @test_int [x^2*(1 + x + x^2)/(1 + x^2)^2, x, 5, x - x^2/(2*(1 + x^2)) - atan(x) + (1/2)*log(1 + x^2)]
    @test_int [x^1*(1 + x + x^2)/(1 + x^2)^2, x, 4, -(x/(2*(1 + x^2))) + atan(x)/2 + (1/2)*log(1 + x^2)]
    @test_int [x^0*(1 + x + x^2)/(1 + x^2)^2, x, 3, -(1/(2*(1 + x^2))) + atan(x)]
    @test_int [(1 + x + x^2)/(x^1*(1 + x^2)^2), x, 6, x/(2*(1 + x^2)) + atan(x)/2 + log(x) - (1/2)*log(1 + x^2)]
    @test_int [(1 + x + x^2)/(x^2*(1 + x^2)^2), x, 6, -(1/x) + 1/(2*(1 + x^2)) - atan(x) + log(x) - (1/2)*log(1 + x^2)]
    @test_int [(1 + x + x^2)/(x^3*(1 + x^2)^2), x, 6, -(1/(2*x^2)) - 1/x - x/(2*(1 + x^2)) - (3*atan(x))/2 - log(x) + (1/2)*log(1 + x^2)]

    @test_int [(1 + 2*x + x^2)/(1 + x^2)^2, x, 3, -(1/(1 + x^2)) + atan(x), -(((1 - x)*(1 + x))/(2*(1 + x^2))) + atan(x)]
    @test_int [(2 + 12*x + 3*x^2)/(4 + x^2)^2, x, 3, -((24 + 5*x)/(4*(4 + x^2))) + (7/8)*atan(x/2)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d+e*x)^m*(a+c*x^2)^(p/2)*(A+B*x+C*x^2)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(g + h*x)^3*sqrt(a + c*x^2)*(d + e*x + f*x^2), x, 7, ((8*c^2*d*g^3 + a^2*h^2*(3*f*g + e*h) - 2*a*c*g*(f*g^2 + 3*h*(e*g + d*h)))*x*sqrt(a + c*x^2))/(16*c^2) - ((8*a*f*h^2 + c*(3*f*g^2 - 7*h*(e*g + 2*d*h)))*(g + h*x)^2*(a + c*x^2)^(3/2))/(70*c^2*h) - ((3*f*g - 7*e*h)*(g + h*x)^3*(a + c*x^2)^(3/2))/(42*c*h) + (f*(g + h*x)^4*(a + c*x^2)^(3/2))/(7*c*h) + ((8*(8*a^2*f*h^4 - 2*a*c*h^2*(15*f*g^2 + 7*h*(3*e*g + d*h)) - c^2*g^2*(3*f*g^2 - 7*h*(e*g + 12*d*h))) - 3*c*h*(a*h^2*(41*f*g + 35*e*h) + 2*c*g*(3*f*g^2 - 7*h*(e*g + 7*d*h)))*x)*(a + c*x^2)^(3/2))/(840*c^3*h) + (a*(8*c^2*d*g^3 + a^2*h^2*(3*f*g + e*h) - 2*a*c*g*(f*g^2 + 3*h*(e*g + d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(16*c^(5/2))]
    @test_int [(g + h*x)^2*sqrt(a + c*x^2)*(d + e*x + f*x^2), x, 6, ((8*c^2*d*g^2 + a^2*f*h^2 - 2*a*c*(f*g^2 + h*(2*e*g + d*h)))*x*sqrt(a + c*x^2))/(16*c^2) - ((f*g - 2*e*h)*(g + h*x)^2*(a + c*x^2)^(3/2))/(10*c*h) + (f*(g + h*x)^3*(a + c*x^2)^(3/2))/(6*c*h) - ((8*(2*a*h^2*(2*f*g + e*h) + c*g*(f*g^2 - 2*h*(e*g + 5*d*h))) - 3*h*(5*(2*c*d - a*f)*h^2 - 2*c*g*(f*g - 2*e*h))*x)*(a + c*x^2)^(3/2))/(120*c^2*h) + (a*(8*c^2*d*g^2 + a^2*f*h^2 - 2*a*c*(f*g^2 + h*(2*e*g + d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(16*c^(5/2))]
    @test_int [(g + h*x)^1*sqrt(a + c*x^2)*(d + e*x + f*x^2), x, 5, ((4*c*d*g - a*(f*g + e*h))*x*sqrt(a + c*x^2))/(8*c) + (f*(g + h*x)^2*(a + c*x^2)^(3/2))/(5*c*h) - ((4*(2*a*f*h^2 + c*(3*f*g^2 - 5*h*(e*g + d*h))) + 3*c*h*(3*f*g - 5*e*h)*x)*(a + c*x^2)^(3/2))/(60*c^2*h) + (a*(4*c*d*g - a*f*g - a*e*h)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(8*c^(3/2))]
    @test_int [(g + h*x)^0*sqrt(a + c*x^2)*(d + e*x + f*x^2), x, 5, ((4*c*d - a*f)*x*sqrt(a + c*x^2))/(8*c) + (e*(a + c*x^2)^(3/2))/(3*c) + (f*x*(a + c*x^2)^(3/2))/(4*c) + (a*(4*c*d - a*f)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(8*c^(3/2))]
    @test_int [sqrt(a + c*x^2)*(d + e*x + f*x^2)/(g + h*x)^1, x, 7, ((2*(f*g^2 - e*g*h + d*h^2) - h*(f*g - e*h)*x)*sqrt(a + c*x^2))/(2*h^3) + (f*(a + c*x^2)^(3/2))/(3*c*h) - ((2*c*d*g*h^2 + (f*g - e*h)*(2*c*g^2 + a*h^2))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(2*sqrt(c)*h^4) - (sqrt(c*g^2 + a*h^2)*(f*g^2 - e*g*h + d*h^2)*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/h^4]
    @test_int [sqrt(a + c*x^2)*(d + e*x + f*x^2)/(g + h*x)^2, x, 7, -(((2*(a*h^2*(2*f*g - e*h) + c*g*(3*f*g^2 - h*(2*e*g - d*h))) - h*(a*f*h^2 + c*(3*f*g^2 - 2*h*(e*g - d*h)))*x)*sqrt(a + c*x^2))/(2*h^3*(c*g^2 + a*h^2))) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(3/2))/(h*(c*g^2 + a*h^2)*(g + h*x)) + ((a*f*h^2 + 2*c*(3*f*g^2 - h*(2*e*g - d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(2*sqrt(c)*h^4) + ((a*h^2*(2*f*g - e*h) + c*g*(3*f*g^2 - h*(2*e*g - d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(h^4*sqrt(c*g^2 + a*h^2))]
    @test_int [sqrt(a + c*x^2)*(d + e*x + f*x^2)/(g + h*x)^3, x, 7, ((2*(3*f*g - e*h)*(c*g^2 + a*h^2) + h*(2*a*f*h^2 + c*(3*f*g^2 - h*(e*g - d*h)))*x)*sqrt(a + c*x^2))/(2*h^3*(c*g^2 + a*h^2)*(g + h*x)) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(3/2))/(2*h*(c*g^2 + a*h^2)*(g + h*x)^2) - (sqrt(c)*(3*f*g - e*h)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/h^4 - ((2*a^2*f*h^4 + 2*c^2*g^3*(3*f*g - e*h) + a*c*h^2*(9*f*g^2 - h*(3*e*g - d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(2*h^4*(c*g^2 + a*h^2)^(3/2))]
    @test_int [sqrt(a + c*x^2)*(d + e*x + f*x^2)/(g + h*x)^4, x, 7, -(((2*c^2*f*g^5 + a^2*e*h^5 + a*c*g*h^2*(3*f*g^2 + d*h^2) + h*(2*a^2*f*h^4 + a*c*g*h^2*(6*f*g - e*h) + c^2*(3*f*g^4 - d*g^2*h^2))*x)*sqrt(a + c*x^2))/(2*h^3*(c*g^2 + a*h^2)^2*(g + h*x)^2)) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(3/2))/(3*h*(c*g^2 + a*h^2)*(g + h*x)^3) + (sqrt(c)*f*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/h^4 + (c*(2*c^2*f*g^5 + a^2*h^4*(4*f*g - e*h) + a*c*g*h^2*(5*f*g^2 - d*h^2))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(2*h^4*(c*g^2 + a*h^2)^(5/2))]
    @test_int [sqrt(a + c*x^2)*(d + e*x + f*x^2)/(g + h*x)^5, x, 5, -(((4*c^2*d*g^2 + 4*a^2*f*h^2 - a*c*(f*g^2 - h*(5*e*g - d*h)))*(a*h - c*g*x)*sqrt(a + c*x^2))/(8*(c*g^2 + a*h^2)^3*(g + h*x)^2)) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(3/2))/(4*h*(c*g^2 + a*h^2)*(g + h*x)^4) + ((4*a*h^2*(2*f*g - e*h) + c*g*(3*f*g^2 + h*(e*g - 5*d*h)))*(a + c*x^2)^(3/2))/(12*h*(c*g^2 + a*h^2)^2*(g + h*x)^3) - (a*c*(4*c^2*d*g^2 + 4*a^2*f*h^2 - a*c*(f*g^2 - h*(5*e*g - d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(8*(c*g^2 + a*h^2)^(7/2))]
    @test_int [sqrt(a + c*x^2)*(d + e*x + f*x^2)/(g + h*x)^6, x, 6, -((c*(4*c^2*d*g^3 + a^2*h^2*(6*f*g - e*h) - a*c*g*(f*g^2 - 3*h*(2*e*g - d*h)))*(a*h - c*g*x)*sqrt(a + c*x^2))/(8*(c*g^2 + a*h^2)^4*(g + h*x)^2)) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(3/2))/(5*h*(c*g^2 + a*h^2)*(g + h*x)^5) + ((5*a*h^2*(2*f*g - e*h) + c*g*(3*f*g^2 + h*(2*e*g - 7*d*h)))*(a + c*x^2)^(3/2))/(20*h*(c*g^2 + a*h^2)^2*(g + h*x)^4) - ((20*a^2*f*h^4 - c^2*g^2*(3*f*g^2 + h*(2*e*g - 27*d*h)) - a*c*h^2*(18*f*g^2 - h*(33*e*g - 8*d*h)))*(a + c*x^2)^(3/2))/(60*h*(c*g^2 + a*h^2)^3*(g + h*x)^3) - (a*c^2*(4*c^2*d*g^3 + a^2*h^2*(6*f*g - e*h) - a*c*g*(f*g^2 - 3*h*(2*e*g - d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(8*(c*g^2 + a*h^2)^(9/2))]

    @test_int [(g + h*x)^3*(a + c*x^2)^(3/2)*(d + e*x + f*x^2), x, 8, (a*(48*c^2*d*g^3 + 3*a^2*h^2*(3*f*g + e*h) - 8*a*c*g*(f*g^2 + 3*h*(e*g + d*h)))*x*sqrt(a + c*x^2))/(128*c^2) + ((48*c^2*d*g^3 + 3*a^2*h^2*(3*f*g + e*h) - 8*a*c*g*(f*g^2 + 3*h*(e*g + d*h)))*x*(a + c*x^2)^(3/2))/(192*c^2) + ((8*(9*c*d - 4*a*f)*h^2 - 3*c*g*(5*f*g - 9*e*h))*(g + h*x)^2*(a + c*x^2)^(5/2))/(504*c^2*h) - ((5*f*g - 9*e*h)*(g + h*x)^3*(a + c*x^2)^(5/2))/(72*c*h) + (f*(g + h*x)^4*(a + c*x^2)^(5/2))/(9*c*h) + ((4*(32*a^2*f*h^4 - 8*a*c*h^2*(17*f*g^2 + 9*h*(3*e*g + d*h)) - 3*c^2*g^2*(5*f*g^2 - 3*h*(3*e*g + 64*d*h))) - 5*c*h*(a*h^2*(61*f*g + 63*e*h) + 2*c*g*(5*f*g^2 - 9*h*(e*g + 12*d*h)))*x)*(a + c*x^2)^(5/2))/(5040*c^3*h) + (a^2*(48*c^2*d*g^3 + 3*a^2*h^2*(3*f*g + e*h) - 8*a*c*g*(f*g^2 + 3*h*(e*g + d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(128*c^(5/2))]
    @test_int [(g + h*x)^2*(a + c*x^2)^(3/2)*(d + e*x + f*x^2), x, 7, (a*(48*c^2*d*g^2 + 3*a^2*f*h^2 - 8*a*c*(f*g^2 + h*(2*e*g + d*h)))*x*sqrt(a + c*x^2))/(128*c^2) + ((48*c^2*d*g^2 + 3*a^2*f*h^2 - 8*a*c*(f*g^2 + h*(2*e*g + d*h)))*x*(a + c*x^2)^(3/2))/(192*c^2) - ((5*f*g - 8*e*h)*(g + h*x)^2*(a + c*x^2)^(5/2))/(56*c*h) + (f*(g + h*x)^3*(a + c*x^2)^(5/2))/(8*c*h) - ((12*(8*a*h^2*(2*f*g + e*h) + c*g*(5*f*g^2 - 8*h*(e*g + 7*d*h))) - 5*h*(7*(8*c*d - 3*a*f)*h^2 - 2*c*g*(5*f*g - 8*e*h))*x)*(a + c*x^2)^(5/2))/(1680*c^2*h) + (a^2*(48*c^2*d*g^2 + 3*a^2*f*h^2 - 8*a*c*(f*g^2 + h*(2*e*g + d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(128*c^(5/2))]
    @test_int [(g + h*x)^1*(a + c*x^2)^(3/2)*(d + e*x + f*x^2), x, 6, (a*(6*c*d*g - a*f*g - a*e*h)*x*sqrt(a + c*x^2))/(16*c) + ((6*c*d*g - a*(f*g + e*h))*x*(a + c*x^2)^(3/2))/(24*c) + (f*(g + h*x)^2*(a + c*x^2)^(5/2))/(7*c*h) - ((6*(2*a*f*h^2 + c*(5*f*g^2 - 7*h*(e*g + d*h))) + 5*c*h*(5*f*g - 7*e*h)*x)*(a + c*x^2)^(5/2))/(210*c^2*h) + (a^2*(6*c*d*g - a*f*g - a*e*h)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(16*c^(3/2))]
    @test_int [(g + h*x)^0*(a + c*x^2)^(3/2)*(d + e*x + f*x^2), x, 6, (a*(6*c*d - a*f)*x*sqrt(a + c*x^2))/(16*c) + ((6*c*d - a*f)*x*(a + c*x^2)^(3/2))/(24*c) + (e*(a + c*x^2)^(5/2))/(5*c) + (f*x*(a + c*x^2)^(5/2))/(6*c) + (a^2*(6*c*d - a*f)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(16*c^(3/2))]
    @test_int [(a + c*x^2)^(3/2)*(d + e*x + f*x^2)/(g + h*x)^1, x, 8, ((8*(c*g^2 + a*h^2)*(f*g^2 - e*g*h + d*h^2) - h*(4*c*d*g*h^2 + (f*g - e*h)*(4*c*g^2 + 3*a*h^2))*x)*sqrt(a + c*x^2))/(8*h^5) + ((4*(f*g^2 - e*g*h + d*h^2) - 3*h*(f*g - e*h)*x)*(a + c*x^2)^(3/2))/(12*h^3) + (f*(a + c*x^2)^(5/2))/(5*c*h) - ((3*a^2*h^4*(f*g - e*h) + 8*c^2*g^3*(f*g^2 - h*(e*g - d*h)) + 12*a*c*g*h^2*(f*g^2 - h*(e*g - d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(8*sqrt(c)*h^6) - ((c*g^2 + a*h^2)^(3/2)*(f*g^2 - e*g*h + d*h^2)*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/h^6]
    @test_int [(a + c*x^2)^(3/2)*(d + e*x + f*x^2)/(g + h*x)^2, x, 8, -(((8*(a*h^2*(2*f*g - e*h) + c*g*(5*f*g^2 - h*(4*e*g - 3*d*h))) - h*(20*c*f*g^2 - 16*c*e*g*h + 12*c*d*h^2 + 3*a*f*h^2)*x)*sqrt(a + c*x^2))/(8*h^5)) - ((4*(a*h^2*(2*f*g - e*h) + c*g*(5*f*g^2 - h*(4*e*g - 3*d*h))) - 3*h*(a*f*h^2 + c*(5*f*g^2 - 4*h*(e*g - d*h)))*x)*(a + c*x^2)^(3/2))/(12*h^3*(c*g^2 + a*h^2)) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(5/2))/(h*(c*g^2 + a*h^2)*(g + h*x)) + ((3*a^2*f*h^4 + 8*c^2*g^2*(5*f*g^2 - h*(4*e*g - 3*d*h)) + 12*a*c*h^2*(3*f*g^2 - h*(2*e*g - d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(8*sqrt(c)*h^6) + (sqrt(c*g^2 + a*h^2)*(a*h^2*(2*f*g - e*h) + c*g*(5*f*g^2 - h*(4*e*g - 3*d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/h^6]
    @test_int [(a + c*x^2)^(3/2)*(d + e*x + f*x^2)/(g + h*x)^3, x, 8, ((2*a^2*f*h^4 + 2*c^2*g^2*(10*f*g^2 - 3*h*(2*e*g - d*h)) + a*c*h^2*(19*f*g^2 - 3*h*(3*e*g - d*h)) - c*h*(a*h^2*(7*f*g - 3*e*h) + c*g*(10*f*g^2 - 3*h*(2*e*g - d*h)))*x)*sqrt(a + c*x^2))/(2*h^5*(c*g^2 + a*h^2)) - ((2*(c*g*(6*e*g - (10*f*g^2)/h - 3*d*h) - a*h*(7*f*g - 3*e*h)) - (2*a*f*h^2 + c*(5*f*g^2 - 3*h*(e*g - d*h)))*x)*(a + c*x^2)^(3/2))/(6*h^2*(c*g^2 + a*h^2)*(g + h*x)) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(5/2))/(2*h*(c*g^2 + a*h^2)*(g + h*x)^2) - (sqrt(c)*(3*a*h^2*(3*f*g - e*h) + 2*c*g*(10*f*g^2 - 3*h*(2*e*g - d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(2*h^6) - ((2*a^2*f*h^4 + 2*c^2*g^2*(10*f*g^2 - 3*h*(2*e*g - d*h)) + a*c*h^2*(19*f*g^2 - 3*h*(3*e*g - d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(2*h^6*sqrt(c*g^2 + a*h^2))]
    @test_int [(a + c*x^2)^(3/2)*(d + e*x + f*x^2)/(g + h*x)^4, x, 8, -((((c*g^2 + a*h^2)*(3*a*f*h^2 + 2*c*(10*f*g^2 - h*(4*e*g - d*h))) + c*h*(3*a*h^2*(3*f*g - e*h) + c*g*(10*f*g^2 - h*(4*e*g - d*h)))*x)*sqrt(a + c*x^2))/(2*h^5*(c*g^2 + a*h^2)*(g + h*x))) - ((c*g*(4*e*g - (10*f*g^2)/h - d*h) - 3*a*h*(3*f*g - e*h) - (3*a*f*h^2 + c*(5*f*g^2 - 2*h*(e*g - d*h)))*x)*(a + c*x^2)^(3/2))/(6*h^2*(c*g^2 + a*h^2)*(g + h*x)^2) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(5/2))/(3*h*(c*g^2 + a*h^2)*(g + h*x)^3) + (sqrt(c)*(3*a*f*h^2 + 2*c*(10*f*g^2 - h*(4*e*g - d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(2*h^6) + (c*(3*a^2*h^4*(4*f*g - e*h) + 2*c^2*g^3*(10*f*g^2 - h*(4*e*g - d*h)) + 3*a*c*g*h^2*(11*f*g^2 - h*(4*e*g - d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(2*h^6*(c*g^2 + a*h^2)^(3/2))]
    @test_int [(a + c*x^2)^(3/2)*(d + e*x + f*x^2)/(g + h*x)^5, x, 8, (c*(8*(5*f*g - e*h)*(c*g^2 + a*h^2)^2 + h*(12*a^2*f*h^4 + 4*c^2*g^3*(5*f*g - e*h) + a*c*h^2*(35*f*g^2 - h*(7*e*g - 3*d*h)))*x)*sqrt(a + c*x^2))/(8*h^5*(c*g^2 + a*h^2)^2*(g + h*x)) + ((4*a^2*h^4*(f*g - 2*e*h) - 4*c^2*g^4*(5*f*g - e*h) - a*c*g*h^2*(25*f*g^2 - h*(5*e*g - 9*d*h)) - 3*h*(4*a^2*f*h^4 + a*c*h^2*(17*f*g^2 - h*(5*e*g - d*h)) + 2*c^2*g^2*(5*f*g^2 - h*(e*g + d*h)))*x)*(a + c*x^2)^(3/2))/(24*h^3*(c*g^2 + a*h^2)^2*(g + h*x)^3) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(5/2))/(4*h*(c*g^2 + a*h^2)*(g + h*x)^4) - (c^(3/2)*(5*f*g - e*h)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/h^6 - (c*(12*a^3*f*h^6 + 8*c^3*g^5*(5*f*g - e*h) + 20*a*c^2*g^3*h^2*(5*f*g - e*h) + 3*a^2*c*h^4*(25*f*g^2 - h*(5*e*g - d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(8*h^6*(c*g^2 + a*h^2)^(5/2))]
    @test_int [(a + c*x^2)^(3/2)*(d + e*x + f*x^2)/(g + h*x)^6, x, 8, -((c*(8*c^3*f*g^7 + 20*a*c^2*f*g^5*h^2 - a^3*h^6*(2*f*g - 3*e*h) + a^2*c*g*h^4*(13*f*g^2 + 3*d*h^2) + h*(12*c^3*f*g^6 + 8*a^3*f*h^6 + a^2*c*g*h^4*(34*f*g - 3*e*h) + a*c^2*g^2*h^2*(35*f*g^2 - 3*d*h^2))*x)*sqrt(a + c*x^2))/(8*h^5*(c*g^2 + a*h^2)^3*(g + h*x)^2)) - ((4*c^2*f*g^5 - a^2*h^4*(2*f*g - 3*e*h) + a*c*g*h^2*(5*f*g^2 + 3*d*h^2) + h*(4*a^2*f*h^4 + a*c*g*h^2*(14*f*g - 3*e*h) + c^2*(7*f*g^4 - 3*d*g^2*h^2))*x)*(a + c*x^2)^(3/2))/(12*h^3*(c*g^2 + a*h^2)^2*(g + h*x)^4) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(5/2))/(5*h*(c*g^2 + a*h^2)*(g + h*x)^5) + (c^(3/2)*f*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/h^6 + (c^2*(8*c^3*f*g^7 + 28*a*c^2*f*g^5*h^2 + 3*a^3*h^6*(6*f*g - e*h) + a^2*c*g*h^4*(35*f*g^2 - 3*d*h^2))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(8*h^6*(c*g^2 + a*h^2)^(7/2))]
    @test_int [(a + c*x^2)^(3/2)*(d + e*x + f*x^2)/(g + h*x)^7, x, 6, -((a*c*(6*c^2*d*g^2 + 6*a^2*f*h^2 - a*c*(f*g^2 - h*(7*e*g - d*h)))*(a*h - c*g*x)*sqrt(a + c*x^2))/(16*(c*g^2 + a*h^2)^4*(g + h*x)^2)) - ((6*c^2*d*g^2 + 6*a^2*f*h^2 - a*c*(f*g^2 - h*(7*e*g - d*h)))*(a*h - c*g*x)*(a + c*x^2)^(3/2))/(24*(c*g^2 + a*h^2)^3*(g + h*x)^4) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(5/2))/(6*h*(c*g^2 + a*h^2)*(g + h*x)^6) + ((6*a*h^2*(2*f*g - e*h) + c*g*(5*f*g^2 + h*(e*g - 7*d*h)))*(a + c*x^2)^(5/2))/(30*h*(c*g^2 + a*h^2)^2*(g + h*x)^5) - (a^2*c^2*(6*c^2*d*g^2 + 6*a^2*f*h^2 - a*c*(f*g^2 - h*(7*e*g - d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(16*(c*g^2 + a*h^2)^(9/2))]
    @test_int [(a + c*x^2)^(3/2)*(d + e*x + f*x^2)/(g + h*x)^8, x, 7, -((a*c^2*(6*c^2*d*g^3 + a^2*h^2*(8*f*g - e*h) - a*c*g*(f*g^2 - h*(8*e*g - 3*d*h)))*(a*h - c*g*x)*sqrt(a + c*x^2))/(16*(c*g^2 + a*h^2)^5*(g + h*x)^2)) - (c*(6*c^2*d*g^3 + a^2*h^2*(8*f*g - e*h) - a*c*g*(f*g^2 - h*(8*e*g - 3*d*h)))*(a*h - c*g*x)*(a + c*x^2)^(3/2))/(24*(c*g^2 + a*h^2)^4*(g + h*x)^4) - ((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(5/2))/(7*h*(c*g^2 + a*h^2)*(g + h*x)^7) + ((7*a*h^2*(2*f*g - e*h) + c*g*(5*f*g^2 + h*(2*e*g - 9*d*h)))*(a + c*x^2)^(5/2))/(42*h*(c*g^2 + a*h^2)^2*(g + h*x)^6) - ((42*a^2*f*h^4 - c^2*g^2*(5*f*g^2 + h*(2*e*g - 51*d*h)) - a*c*h^2*(26*f*g^2 - h*(61*e*g - 12*d*h)))*(a + c*x^2)^(5/2))/(210*h*(c*g^2 + a*h^2)^3*(g + h*x)^5) - (a^2*c^3*(6*c^2*d*g^3 + a^2*h^2*(8*f*g - e*h) - a*c*g*(f*g^2 - h*(8*e*g - 3*d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(16*(c*g^2 + a*h^2)^(11/2))]

    @test_int [(A + B*x + C*x^2)*(a + c*x^2)^(5/2), x, 7, (5*a^2*(8*A*c - a*C)*x*sqrt(a + c*x^2))/(128*c) + (5*a*(8*A*c - a*C)*x*(a + c*x^2)^(3/2))/(192*c) + ((8*A*c - a*C)*x*(a + c*x^2)^(5/2))/(48*c) + (B*(a + c*x^2)^(7/2))/(7*c) + (C*x*(a + c*x^2)^(7/2))/(8*c) + (5*a^3*(8*A*c - a*C)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(128*c^(3/2))]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(g + h*x)^3*(d + e*x + f*x^2)/sqrt(a + c*x^2), x, 6, ((4*(5*c*d - 4*a*f)*h^2 - 3*c*g*(f*g - 5*e*h))*(g + h*x)^2*sqrt(a + c*x^2))/(60*c^2*h) - ((f*g - 5*e*h)*(g + h*x)^3*sqrt(a + c*x^2))/(20*c*h) + (f*(g + h*x)^4*sqrt(a + c*x^2))/(5*c*h) + ((4*(16*a^2*f*h^4 - 4*a*c*h^2*(13*f*g^2 + 5*h*(3*e*g + d*h)) - c^2*g^2*(3*f*g^2 - 5*h*(3*e*g + 16*d*h))) - c*h*(a*h^2*(71*f*g + 45*e*h) + 2*c*g*(3*f*g^2 - 5*h*(3*e*g + 10*d*h)))*x)*sqrt(a + c*x^2))/(120*c^3*h) + ((8*c^2*d*g^3 + 3*a^2*h^2*(3*f*g + e*h) - 4*a*c*g*(f*g^2 + 3*h*(e*g + d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(8*c^(5/2))]
    @test_int [(g + h*x)^2*(d + e*x + f*x^2)/sqrt(a + c*x^2), x, 5, -(((f*g - 4*e*h)*(g + h*x)^2*sqrt(a + c*x^2))/(12*c*h)) + (f*(g + h*x)^3*sqrt(a + c*x^2))/(4*c*h) - ((4*(4*a*h^2*(2*f*g + e*h) + c*g*(f*g^2 - 4*h*(e*g + 3*d*h))) - h*(3*(4*c*d - 3*a*f)*h^2 - 2*c*g*(f*g - 4*e*h))*x)*sqrt(a + c*x^2))/(24*c^2*h) + ((8*c^2*d*g^2 + 3*a^2*f*h^2 - 4*a*c*(f*g^2 + h*(2*e*g + d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(8*c^(5/2))]
    @test_int [(g + h*x)^1*(d + e*x + f*x^2)/sqrt(a + c*x^2), x, 4, (f*(g + h*x)^2*sqrt(a + c*x^2))/(3*c*h) - ((2*(2*a*f*h^2 + c*(f*g^2 - 3*h*(e*g + d*h))) + c*h*(f*g - 3*e*h)*x)*sqrt(a + c*x^2))/(6*c^2*h) + ((2*c*d*g - a*(f*g + e*h))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(2*c^(3/2))]
    @test_int [(g + h*x)^0*(d + e*x + f*x^2)/sqrt(a + c*x^2), x, 4, (e*sqrt(a + c*x^2))/c + (f*x*sqrt(a + c*x^2))/(2*c) + ((2*c*d - a*f)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(2*c^(3/2))]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^1*sqrt(a + c*x^2)), x, 6, (f*sqrt(a + c*x^2))/(c*h) - ((f*g - e*h)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(sqrt(c)*h^2) - ((f*g^2 - e*g*h + d*h^2)*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(h^2*sqrt(c*g^2 + a*h^2))]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^2*sqrt(a + c*x^2)), x, 6, -(((f*g^2 - e*g*h + d*h^2)*sqrt(a + c*x^2))/(h*(c*g^2 + a*h^2)*(g + h*x))) + (f*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(sqrt(c)*h^2) + ((a*h^2*(2*f*g - e*h) + c*(f*g^3 - d*g*h^2))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(h^2*(c*g^2 + a*h^2)^(3/2))]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^3*sqrt(a + c*x^2)), x, 4, -(((f*g^2 - e*g*h + d*h^2)*sqrt(a + c*x^2))/(2*h*(c*g^2 + a*h^2)*(g + h*x)^2)) + ((2*a*h^2*(2*f*g - e*h) + c*g*(f*g^2 + h*(e*g - 3*d*h)))*sqrt(a + c*x^2))/(2*h*(c*g^2 + a*h^2)^2*(g + h*x)) - ((2*c^2*d*g^2 + 2*a^2*f*h^2 - a*c*(f*g^2 - h*(3*e*g - d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(2*(c*g^2 + a*h^2)^(5/2))]

    @test_int [(g + h*x)^3*(d + e*x + f*x^2)/(a + c*x^2)^(3/2), x, 5, -(((a*e - (c*d - a*f)*x)*(g + h*x)^3)/(a*c*sqrt(a + c*x^2))) - ((3*c*d - 4*a*f)*h*(g + h*x)^2*sqrt(a + c*x^2))/(3*a*c^2) - (h*(4*(3*c^2*d*g^2 + 4*a^2*f*h^2 - a*c*(7*f*g^2 + 3*h*(3*e*g + d*h))) + c*h*(6*c*d*g - 11*a*f*g - 9*a*e*h)*x)*sqrt(a + c*x^2))/(6*a*c^3) - ((3*a*h^2*(3*f*g + e*h) - 2*c*g*(f*g^2 + 3*h*(e*g + d*h)))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(2*c^(5/2))]
    @test_int [(g + h*x)^2*(d + e*x + f*x^2)/(a + c*x^2)^(3/2), x, 4, -(((a*e - (c*d - a*f)*x)*(g + h*x)^2)/(a*c*sqrt(a + c*x^2))) - (h*(4*(c*d*g - a*(2*f*g + e*h)) + (2*c*d - 3*a*f)*h*x)*sqrt(a + c*x^2))/(2*a*c^2) + (((2*c*d - 3*a*f)*h^2 + 2*c*g*(f*g + 2*e*h))*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/(2*c^(5/2))]
    @test_int [(g + h*x)^1*(d + e*x + f*x^2)/(a + c*x^2)^(3/2), x, 4, -(((a*e - (c*d - a*f)*x)*(g + h*x))/(a*c*sqrt(a + c*x^2))) - ((c*d - 2*a*f)*h*sqrt(a + c*x^2))/(a*c^2) + ((f*g + e*h)*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/c^(3/2)]
    @test_int [(g + h*x)^0*(d + e*x + f*x^2)/(a + c*x^2)^(3/2), x, 4, -((a*e - (c*d - a*f)*x)/(a*c*sqrt(a + c*x^2))) + (f*atanh((sqrt(c)*x)/sqrt(a + c*x^2)))/c^(3/2)]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^1*(a + c*x^2)^(3/2)), x, 4, -((a*(c*e*g - c*d*h + a*f*h) - c*(c*d*g - a*f*g + a*e*h)*x)/(a*c*(c*g^2 + a*h^2)*sqrt(a + c*x^2))) - ((f*g^2 - e*g*h + d*h^2)*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(c*g^2 + a*h^2)^(3/2)]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^2*(a + c*x^2)^(3/2)), x, 4, -((a*(c*g*(e*g - 2*d*h) + a*h*(2*f*g - e*h)) - (c^2*d*g^2 + a^2*f*h^2 - a*c*(f*g^2 - h*(2*e*g - d*h)))*x)/(a*(c*g^2 + a*h^2)^2*sqrt(a + c*x^2))) - (h*(f*g^2 - e*g*h + d*h^2)*sqrt(a + c*x^2))/((c*g^2 + a*h^2)^2*(g + h*x)) + ((a*h^2*(2*f*g - e*h) - c*g*(f*g^2 - h*(2*e*g - 3*d*h)))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(c*g^2 + a*h^2)^(5/2)]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^3*(a + c*x^2)^(3/2)), x, 5, (a*(a^2*f*h^3 - c^2*g^2*(e*g - 3*d*h) - a*c*h*(3*f*g^2 - h*(3*e*g - d*h))) + c*(c^2*d*g^3 + a^2*h^2*(3*f*g - e*h) - a*c*g*(f*g^2 - 3*h*(e*g - d*h)))*x)/(a*(c*g^2 + a*h^2)^3*sqrt(a + c*x^2)) - (h*(f*g^2 - e*g*h + d*h^2)*sqrt(a + c*x^2))/(2*(c*g^2 + a*h^2)^2*(g + h*x)^2) + (h*(2*a*h^2*(2*f*g - e*h) - c*g*(3*f*g^2 - h*(5*e*g - 7*d*h)))*sqrt(a + c*x^2))/(2*(c*g^2 + a*h^2)^3*(g + h*x)) - ((2*a^2*f*h^4 - a*c*h^2*(11*f*g^2 - 9*e*g*h + 3*d*h^2) + 2*c^2*g^2*(f*g^2 - 3*e*g*h + 6*d*h^2))*atanh((a*h - c*g*x)/(sqrt(c*g^2 + a*h^2)*sqrt(a + c*x^2))))/(2*(c*g^2 + a*h^2)^(7/2))]

    @test_int [(A + B*x + C*x^2)/(a + c*x^2)^(5/2), x, 3, -((a*B - (A*c - a*C)*x)/(3*a*c*(a + c*x^2)^(3/2))) + ((2*A*c + a*C)*x)/(3*a^2*c*sqrt(a + c*x^2))]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)^(7/2), x, 4, -((a*B - (A*c - a*C)*x)/(5*a*c*(a + c*x^2)^(5/2))) + ((4*A*c + a*C)*x)/(15*a^2*c*(a + c*x^2)^(3/2)) + (2*(4*A*c + a*C)*x)/(15*a^3*c*sqrt(a + c*x^2))]
    @test_int [(A + B*x + C*x^2)/(a + c*x^2)^(9/2), x, 5, -((a*B - (A*c - a*C)*x)/(7*a*c*(a + c*x^2)^(7/2))) + ((6*A*c + a*C)*x)/(35*a^2*c*(a + c*x^2)^(5/2)) + (4*(6*A*c + a*C)*x)/(105*a^3*c*(a + c*x^2)^(3/2)) + (8*(6*A*c + a*C)*x)/(105*a^4*c*sqrt(a + c*x^2))]

    @test_int [((1 + 2*x)^3*(1 + 3*x + 4*x^2))/sqrt(2 + 3*x^2), x, 5, (-(19/540))*(1 + 2*x)^2*sqrt(2 + 3*x^2) + (13/60)*(1 + 2*x)^3*sqrt(2 + 3*x^2) + (2/15)*(1 + 2*x)^4*sqrt(2 + 3*x^2) - (1/810)*(3937 + 2073*x)*sqrt(2 + 3*x^2) + (5*asinh(sqrt(3/2)*x))/(3*sqrt(3))]
    @test_int [((1 + 2*x)^2*(1 + 3*x + 4*x^2))/sqrt(2 + 3*x^2), x, 4, (5/18)*(1 + 2*x)^2*sqrt(2 + 3*x^2) + (1/6)*(1 + 2*x)^3*sqrt(2 + 3*x^2) - (1/27)*(61 + 3*x)*sqrt(2 + 3*x^2) - sqrt(3)*asinh(sqrt(3/2)*x)]
    @test_int [((1 + 2*x)*(1 + 3*x + 4*x^2))/sqrt(2 + 3*x^2), x, 3, (2/9)*(1 + 2*x)^2*sqrt(2 + 3*x^2) + (7/27)*(1 + 3*x)*sqrt(2 + 3*x^2) - (7*asinh(sqrt(3/2)*x))/(3*sqrt(3))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)*sqrt(2 + 3*x^2)), x, 5, (2*sqrt(2 + 3*x^2))/3 + asinh(sqrt(3/2)*x)/(2*sqrt(3)) - atanh((4 - 3*x)/(sqrt(11)*sqrt(2 + 3*x^2)))/(2*sqrt(11))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^2*sqrt(2 + 3*x^2)), x, 5, -sqrt(2 + 3*x^2)/(11*(1 + 2*x)) + asinh(sqrt(3/2)*x)/sqrt(3) + (4*atanh((4 - 3*x)/(sqrt(11)*sqrt(2 + 3*x^2))))/(11*sqrt(11))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^3*sqrt(2 + 3*x^2)), x, 4, -sqrt(2 + 3*x^2)/(22*(1 + 2*x)^2) + (13*sqrt(2 + 3*x^2))/(242*(1 + 2*x)) - (103*atanh((4 - 3*x)/(sqrt(11)*sqrt(2 + 3*x^2))))/(121*sqrt(11))]

    @test_int [((1 + 2*x)^3*(1 + 3*x + 4*x^2))/(2 + 3*x^2)^(3/2), x, 5, (398 + 279*x)/(54*sqrt(2 + 3*x^2)) + (292/81)*sqrt(2 + 3*x^2) + 4*x*sqrt(2 + 3*x^2) + (32/27)*x^2*sqrt(2 + 3*x^2) - (38*asinh(sqrt(3/2)*x))/(3*sqrt(3))]
    @test_int [((1 + 2*x)^2*(1 + 3*x + 4*x^2))/(2 + 3*x^2)^(3/2), x, 4, (70 - 47*x)/(18*sqrt(2 + 3*x^2)) + (28/9)*sqrt(2 + 3*x^2) + (8/9)*x*sqrt(2 + 3*x^2) + (4*asinh(sqrt(3/2)*x))/(3*sqrt(3))]
    @test_int [((1 + 2*x)*(1 + 3*x + 4*x^2))/(2 + 3*x^2)^(3/2), x, 3, (2 - 51*x)/(18*sqrt(2 + 3*x^2)) + (8/9)*sqrt(2 + 3*x^2) + (10*asinh(sqrt(3/2)*x))/(3*sqrt(3))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)*(2 + 3*x^2)^(3/2)), x, 4, -(38 - 21*x)/(66*sqrt(2 + 3*x^2)) - (2*atanh((4 - 3*x)/(sqrt(11)*sqrt(2 + 3*x^2))))/(11*sqrt(11))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^2*(2 + 3*x^2)^(3/2)), x, 4, -(10 - 97*x)/(242*sqrt(2 + 3*x^2)) - (4*sqrt(2 + 3*x^2))/(121*(1 + 2*x)) + (4*atanh((4 - 3*x)/(sqrt(11)*sqrt(2 + 3*x^2))))/(121*sqrt(11))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^3*(2 + 3*x^2)^(3/2)), x, 5, (358 + 351*x)/(2662*sqrt(2 + 3*x^2)) - (2*sqrt(2 + 3*x^2))/(121*(1 + 2*x)^2) + (2*sqrt(2 + 3*x^2))/(1331*(1 + 2*x)) - (322*atanh((4 - 3*x)/(sqrt(11)*sqrt(2 + 3*x^2))))/(1331*sqrt(11))]

    @test_int [((1 + 2*x)^3*(1 + 3*x + 4*x^2))/(2 + 3*x^2)^(5/2), x, 4, (398 + 279*x)/(162*(2 + 3*x^2)^(3/2)) - (152 + 465*x)/(54*sqrt(2 + 3*x^2)) + (32/27)*sqrt(2 + 3*x^2) + (8*asinh(sqrt(3/2)*x))/sqrt(3)]
    @test_int [((1 + 2*x)^2*(1 + 3*x + 4*x^2))/(2 + 3*x^2)^(5/2), x, 4, (70 - 47*x)/(54*(2 + 3*x^2)^(3/2)) - (168 + 59*x)/(54*sqrt(2 + 3*x^2)) + (16*asinh(sqrt(3/2)*x))/(9*sqrt(3))]
    @test_int [((1 + 2*x)*(1 + 3*x + 4*x^2))/(2 + 3*x^2)^(5/2), x, 2, (2 - 51*x)/(54*(2 + 3*x^2)^(3/2)) - (16 - 13*x)/(18*sqrt(2 + 3*x^2))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)*(2 + 3*x^2)^(5/2)), x, 5, -(38 - 21*x)/(198*(2 + 3*x^2)^(3/2)) + (24 + 95*x)/(726*sqrt(2 + 3*x^2)) - (8*atanh((4 - 3*x)/(sqrt(11)*sqrt(2 + 3*x^2))))/(121*sqrt(11))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^2*(2 + 3*x^2)^(5/2)), x, 5, -(10 - 97*x)/(726*(2 + 3*x^2)^(3/2)) + (24 + 887*x)/(7986*sqrt(2 + 3*x^2)) - (16*sqrt(2 + 3*x^2))/(1331*(1 + 2*x)) - (32*atanh((4 - 3*x)/(sqrt(11)*sqrt(2 + 3*x^2))))/(1331*sqrt(11))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^3*(2 + 3*x^2)^(5/2)), x, 6, (358 + 351*x)/(7986*(2 + 3*x^2)^(3/2)) + (1216 + 2133*x)/(29282*sqrt(2 + 3*x^2)) - (8*sqrt(2 + 3*x^2))/(1331*(1 + 2*x)^2) - (8*sqrt(2 + 3*x^2))/(1331*(1 + 2*x)) - (1216*atanh((4 - 3*x)/(sqrt(11)*sqrt(2 + 3*x^2))))/(14641*sqrt(11))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d+e*x)^m*(a+c*x^2)^p*(A+B*x+C*x^2)*when*m*and/or*p*symbolic=#

    @test_int [(g + h*x)^m*(a + c*x^2)^p*(d + e*x + f*x^2), x, 6, (f*(g + h*x)^(1 + m)*(a + c*x^2)^(1 + p))/(c*h*(3 + m + 2*p)) - ((1/(c*h^3*(1 + m)*(3 + m + 2*p)))*(a*f*h^2*(1 + m) - c*(2*f*g^2*(1 + p) - h*(e*g - d*h)*(3 + m + 2*p)))*(g + h*x)^(1 + m)*(a + c*x^2)^p*AppellF1(1 + m, -p, -p, 2 + m, (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)), (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c))))/((1 - (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)))^p*(1 - (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c)))^p) - ((2*f*g*(1 + p) - e*h*(3 + m + 2*p))*(g + h*x)^(2 + m)*(a + c*x^2)^p*AppellF1(2 + m, -p, -p, 3 + m, (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)), (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c))))/((1 - (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)))^p*(1 - (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c)))^p*(h^3*(2 + m)*(3 + m + 2*p)))]

    @test_int [(g + h*x)^m*sqrt(a + c*x^2)*(d + e*x + f*x^2), x, 6, (f*(g + h*x)^(1 + m)*(a + c*x^2)^(3/2))/(c*h*(4 + m)) - ((a*f*h^2*(1 + m) - c*(3*f*g^2 - h*(e*g - d*h)*(4 + m)))*(g + h*x)^(1 + m)*sqrt(a + c*x^2)*AppellF1(1 + m, -(1/2), -(1/2), 2 + m, (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)), (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c))))/(c*h^3*(1 + m)*(4 + m)*sqrt(1 - (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)))*sqrt(1 - (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c)))) - ((3*f*g - e*h*(4 + m))*(g + h*x)^(2 + m)*sqrt(a + c*x^2)*AppellF1(2 + m, -(1/2), -(1/2), 3 + m, (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)), (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c))))/(h^3*(2 + m)*(4 + m)*sqrt(1 - (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)))*sqrt(1 - (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c))))]

    @test_int [(g + h*x)^(-3 - 2*p)*(a + c*x^2)^p*(d + e*x + f*x^2), x, 5, -(((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(1 + p))/((g + h*x)^(2*(1 + p))*(2*h*(c*g^2 + a*h^2)*(1 + p)))) - (f*(a + c*x^2)^p*AppellF1(-2*p, -p, -p, 1 - 2*p, (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)), (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c))))/((g + h*x)^(2*p)*(1 - (g + h*x)/(g - (sqrt(-a)*h)/sqrt(c)))^p*(1 - (g + h*x)/(g + (sqrt(-a)*h)/sqrt(c)))^p*(2*h^3*p)) + (1/(h^2*(sqrt(c)*g + sqrt(-a)*h)*(c*g^2 + a*h^2)*(1 + 2*p)))*(((a*h^2*(2*f*g - e*h) + c*(f*g^3 - d*g*h^2))*(sqrt(-a) - sqrt(c)*x)*(g + h*x)^(-1 - 2*p)*(a + c*x^2)^p*HypergeometricFunctions._₂F₁(-1 - 2*p, -p, -2*p, (2*sqrt(-a)*sqrt(c)*(g + h*x))/((sqrt(c)*g - sqrt(-a)*h)*(sqrt(-a) - sqrt(c)*x))))/(-(((sqrt(c)*g + sqrt(-a)*h)*(sqrt(-a) + sqrt(c)*x))/((sqrt(c)*g - sqrt(-a)*h)*(sqrt(-a) - sqrt(c)*x))))^p)]

    #= ::Section:: =#
    #=Integrands*of*the*form*P2(x)*(d+e*x)^m*(a+b*x+c*x^2)^p*when*b^2-4*a*c=0=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P2(x)*(d+e*x)^m*(a+b*x+c*x^2)^p*when*c*d^2-b*d*e+a*e^2=0=#

    #= ::Subsection:: =#
    #=Integrands*of*the*form*(d+e*x)^m*(A+B*x+C*x^2)*(c*d^2-b*d*e-b*e^2*x-c*e^2*x^2)^p=#

    #= ::Subsection:: =#
    #=Integrands*of*the*form*(d+e*x)^(m/2)*(A+B*x+C*x^2)*(c*d^2-b*d*e-b*e^2*x-c*e^2*x^2)^(p/2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d+e*x)^m*(A+B*x+C*x^2)*(c*d^2-b*d*e-b*e^2*x-c*e^2*x^2)^p*when*p*symbolic=#

    @test_int [(d + e*x)^m*(-c*d^2 + b*d*e + b*e^2*x + c*e^2*x^2)^p*(-(c*d - b*e)*f + (c*e*f - c*d*g + b*e*g)*x + c*e*g*x^2), x, 6, (g*(d + e*x)^(-1 + m)*((-d)*(c*d - b*e) + b*e^2*x + c*e^2*x^2)^(2 + p))/(c*e^2*(3 + m + 2*p)) - ((b*e*g*(1 + m + p) + c*(d*g*(1 - m) - e*f*(3 + m + 2*p)))*(d + e*x)^m*((c*(d + e*x))/(2*c*d - b*e))^(-m - p)*(c*d - b*e - c*e*x)^2*((-d)*(c*d - b*e) + b*e^2*x + c*e^2*x^2)^p*HypergeometricFunctions._₂F₁(-m - p, 2 + p, 3 + p, (c*d - b*e - c*e*x)/(2*c*d - b*e)))/(c^2*e^2*(2 + p)*(3 + m + 2*p))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P2(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(A+B*x+C*x^2)*(d+e*x)^m*(a+b*x+c*x^2)^p*with*B=0=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(A + C*x^2)*(a + b*x + c*x^2)^4, x, 2, a^4*A*x + 2*a^3*A*b*x^2 + (1/3)*a^2*(6*A*b^2 + 4*a*A*c + a^2*C)*x^3 + a*b*(A*(b^2 + 3*a*c) + a^2*C)*x^4 + (1/5)*(A*(b^4 + 12*a*b^2*c + 6*a^2*c^2) + 2*a^2*(3*b^2 + 2*a*c)*C)*x^5 + (2/3)*b*(b^2 + 3*a*c)*(A*c + a*C)*x^6 + (1/7)*(2*A*c^2*(3*b^2 + 2*a*c) + (b^4 + 12*a*b^2*c + 6*a^2*c^2)*C)*x^7 + (1/2)*b*c*(A*c^2 + (b^2 + 3*a*c)*C)*x^8 + (1/9)*c^2*(A*c^2 + 6*b^2*C + 4*a*c*C)*x^9 + (2/5)*b*c^3*C*x^10 + (1/11)*c^4*C*x^11]
    @test_int [(A + C*x^2)*(a + b*x + c*x^2)^3, x, 2, a^3*A*x + (3/2)*a^2*A*b*x^2 + (1/3)*a*(3*A*(b^2 + a*c) + a^2*C)*x^3 + (1/4)*b*(A*(b^2 + 6*a*c) + 3*a^2*C)*x^4 + (3/5)*(b^2 + a*c)*(A*c + a*C)*x^5 + (1/6)*b*(3*A*c^2 + (b^2 + 6*a*c)*C)*x^6 + (1/7)*c*(A*c^2 + 3*(b^2 + a*c)*C)*x^7 + (3/8)*b*c^2*C*x^8 + (1/9)*c^3*C*x^9]
    @test_int [(A + C*x^2)*(a + b*x + c*x^2)^2, x, 2, a^2*A*x + a*A*b*x^2 + (1/3)*(A*(b^2 + 2*a*c) + a^2*C)*x^3 + (1/2)*b*(A*c + a*C)*x^4 + (1/5)*(A*c^2 + (b^2 + 2*a*c)*C)*x^5 + (1/3)*b*c*C*x^6 + (1/7)*c^2*C*x^7]
    @test_int [(A + C*x^2)*(a + b*x + c*x^2)^1, x, 2, a*A*x + (1/2)*A*b*x^2 + (1/3)*(A*c + a*C)*x^3 + (1/4)*b*C*x^4 + (1/5)*c*C*x^5]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(A + C*x^2)/(a + b*x + c*x^2)^1, x, 6, (C*x)/c - ((2*A*c^2 + (b^2 - 2*a*c)*C)*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c^2*sqrt(b^2 - 4*a*c)) - (b*C*log(a + b*x + c*x^2))/(2*c^2)]
    @test_int [(A + C*x^2)/(a + b*x + c*x^2)^2, x, 4, -((b*c*(A + (a*C)/c) + (2*A*c^2 + (b^2 - 2*a*c)*C)*x)/(c*(b^2 - 4*a*c)*(a + b*x + c*x^2))) + (4*(A*c + a*C)*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(b^2 - 4*a*c)^(3/2)]
    @test_int [(A + C*x^2)/(a + b*x + c*x^2)^3, x, 5, -((b*c*(A + (a*C)/c) + (2*A*c^2 + (b^2 - 2*a*c)*C)*x)/(2*c*(b^2 - 4*a*c)*(a + b*x + c*x^2)^2)) + ((6*A*c + 2*a*C + (b^2*C)/c)*(b + 2*c*x))/(2*(b^2 - 4*a*c)^2*(a + b*x + c*x^2)) - (2*(6*A*c^2 + (b^2 + 2*a*c)*C)*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(b^2 - 4*a*c)^(5/2)]
    @test_int [(A + C*x^2)/(a + b*x + c*x^2)^4, x, 6, -((b*c*(A + (a*C)/c) + (2*A*c^2 + (b^2 - 2*a*c)*C)*x)/(3*c*(b^2 - 4*a*c)*(a + b*x + c*x^2)^3)) + ((5*A*c + (a + b^2/c)*C)*(b + 2*c*x))/(3*(b^2 - 4*a*c)^2*(a + b*x + c*x^2)^2) - (2*(5*A*c^2 + (b^2 + a*c)*C)*(b + 2*c*x))/((b^2 - 4*a*c)^3*(a + b*x + c*x^2)) + (8*c*(5*A*c^2 + (b^2 + a*c)*C)*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(b^2 - 4*a*c)^(7/2)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(A+B*x+C*x^2)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Subsubsection:: =#
    #=p>0=#

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(d + e*x)^3*(f + g*x + h*x^2)/(a + b*x + c*x^2), x, 6, -(((b^3*e^3*h - c^3*d*(3*e^2*f + 3*d*e*g + d^2*h) - b*c*e^2*(b*e*g + 3*b*d*h + 2*a*e*h) + c^2*e*(a*e*(e*g + 3*d*h) + b*(e^2*f + 3*d*e*g + 3*d^2*h)))*x)/c^4) + (e*(b^2*e^2*h + c^2*(e^2*f + 3*d*e*g + 3*d^2*h) - c*e*(b*e*g + 3*b*d*h + a*e*h))*x^2)/(2*c^3) + (e^2*(c*e*g + 3*c*d*h - b*e*h)*x^3)/(3*c^2) + (e^3*h*x^4)/(4*c) - (1/(c^5*sqrt(b^2 - 4*a*c)))*((2*c^5*d^3*f - b^5*e^3*h + b^3*c*e^2*(b*e*g + 3*b*d*h + 5*a*e*h) - c^4*d*(b*d*(3*e*f + d*g) + 2*a*(3*e^2*f + 3*d*e*g + d^2*h)) - b*c^2*e*(5*a^2*e^2*h + 4*a*b*e*(e*g + 3*d*h) + b^2*(e^2*f + 3*d*e*g + 3*d^2*h)) + c^3*(2*a^2*e^2*(e*g + 3*d*h) + b^2*d*(3*e^2*f + 3*d*e*g + d^2*h) + 3*a*b*e*(e^2*f + 3*d*e*g + 3*d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c))) + ((c^4*d^2*(3*e*f + d*g) + b^4*e^3*h - b^2*c*e^2*(b*e*g + 3*b*d*h + 3*a*e*h) + c^2*e*(a^2*e^2*h + 2*a*b*e*(e*g + 3*d*h) + b^2*(e^2*f + 3*d*e*g + 3*d^2*h)) - c^3*(b*d*(3*e^2*f + 3*d*e*g + d^2*h) + a*e*(e^2*f + 3*d*e*g + 3*d^2*h)))*log(a + b*x + c*x^2))/(2*c^5)]
    @test_int [(d + e*x)^2*(f + g*x + h*x^2)/(a + b*x + c*x^2), x, 6, ((b^2*e^2*h + c^2*(e^2*f + 2*d*e*g + d^2*h) - c*e*(b*e*g + 2*b*d*h + a*e*h))*x)/c^3 + (e*(c*e*g + 2*c*d*h - b*e*h)*x^2)/(2*c^2) + (e^2*h*x^3)/(3*c) - ((2*c^4*d^2*f + b^4*e^2*h - b^2*c*e*(b*e*g + 2*b*d*h + 4*a*e*h) - c^3*(b*d*(2*e*f + d*g) + 2*a*(e^2*f + 2*d*e*g + d^2*h)) + c^2*(2*a^2*e^2*h + 3*a*b*e*(e*g + 2*d*h) + b^2*(e^2*f + 2*d*e*g + d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c^4*sqrt(b^2 - 4*a*c)) + ((c^3*d*(2*e*f + d*g) - b^3*e^2*h + b*c*e*(b*e*g + 2*b*d*h + 2*a*e*h) - c^2*(a*e*(e*g + 2*d*h) + b*(e^2*f + 2*d*e*g + d^2*h)))*log(a + b*x + c*x^2))/(2*c^4)]
    @test_int [(d + e*x)^1*(f + g*x + h*x^2)/(a + b*x + c*x^2), x, 6, ((c*e*g + c*d*h - b*e*h)*x)/c^2 + (e*h*x^2)/(2*c) - ((2*c^3*d*f - b^3*e*h - c^2*(b*e*f + b*d*g + 2*a*e*g + 2*a*d*h) + b*c*(b*e*g + b*d*h + 3*a*e*h))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c^3*sqrt(b^2 - 4*a*c)) + ((c^2*(e*f + d*g) + b^2*e*h - c*(b*e*g + b*d*h + a*e*h))*log(a + b*x + c*x^2))/(2*c^3)]
    @test_int [(d + e*x)^0*(f + g*x + h*x^2)/(a + b*x + c*x^2), x, 6, (h*x)/c - ((2*c^2*f - b*c*g + b^2*h - 2*a*c*h)*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c^2*sqrt(b^2 - 4*a*c)) + ((c*g - b*h)*log(a + b*x + c*x^2))/(2*c^2)]
    @test_int [(f + g*x + h*x^2)/((d + e*x)^1*(a + b*x + c*x^2)), x, 6, -(((2*c^2*d*f + b*(b*d - a*e)*h - c*(b*e*f + b*d*g - 2*a*e*g + 2*a*d*h))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c*sqrt(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2))) + ((e^2*f - d*e*g + d^2*h)*log(d + e*x))/(e*(c*d^2 - b*d*e + a*e^2)) - ((c*e*f - c*d*g + b*d*h - a*e*h)*log(a + b*x + c*x^2))/(2*c*(c*d^2 - b*d*e + a*e^2))]
    @test_int [(f + g*x + h*x^2)/((d + e*x)^2*(a + b*x + c*x^2)), x, 6, -((e^2*f - d*e*g + d^2*h)/(e*(c*d^2 - b*d*e + a*e^2)*(d + e*x))) - ((2*c^2*d^2*f + 2*a^2*e^2*h - a*b*e*(e*g + 2*d*h) + b^2*(e^2*f + d^2*h) - c*(b*d*(2*e*f + d*g) + 2*a*(e^2*f - 2*d*e*g + d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(sqrt(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)^2) + ((c*d*(2*e*f - d*g) + a*e*(e*g - 2*d*h) - b*(e^2*f - d^2*h))*log(d + e*x))/(c*d^2 - b*d*e + a*e^2)^2 - ((c*d*(2*e*f - d*g) + a*e*(e*g - 2*d*h) - b*(e^2*f - d^2*h))*log(a + b*x + c*x^2))/(2*(c*d^2 - b*d*e + a*e^2)^2)]
    @test_int [(f + g*x + h*x^2)/((d + e*x)^3*(a + b*x + c*x^2)), x, 6, -((e^2*f - d*e*g + d^2*h)/(2*e*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^2)) - (c*d*(2*e*f - d*g) + a*e*(e*g - 2*d*h) - b*(e^2*f - d^2*h))/((c*d^2 - b*d*e + a*e^2)^2*(d + e*x)) - ((2*c^3*d^3*f - b*e^3*(b^2*f - a*b*g + a^2*h) - c^2*d*(b*d*(3*e*f + d*g) + 2*a*(3*e^2*f - 3*d*e*g + d^2*h)) - c*(2*a^2*e^2*(e*g - 3*d*h) - 3*a*b*e*(e^2*f - d*e*g - d^2*h) - b^2*(3*d*e^2*f + d^3*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(sqrt(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)^3) + ((c^2*d^2*(3*e*f - d*g) + e^3*(b^2*f - a*b*g + a^2*h) - c*(a*e*(e^2*f - 3*d*e*g + 3*d^2*h) + b*(3*d*e^2*f - d^3*h)))*log(d + e*x))/(c*d^2 - b*d*e + a*e^2)^3 - ((c^2*d^2*(3*e*f - d*g) + e^3*(b^2*f - a*b*g + a^2*h) - c*(a*e*(e^2*f - 3*d*e*g + 3*d^2*h) + b*(3*d*e^2*f - d^3*h)))*log(a + b*x + c*x^2))/(2*(c*d^2 - b*d*e + a*e^2)^3)]

    #= [(d + e*x)^3*(f + g*x + h*x^2)/(a + b*x + c*x^2)^2, x, 8, If(13>=8, (e^2*(6*c^3*d*f - 3*b^3*e*h - c^2*(b*e*f + 3*b*d*g + 6*a*e*g + 18*a*d*h) + b*c*(2*b*e*g + 6*b*d*h + 11*a*e*h))*x)/(c^3*(b^2 - 4*a*c)) + (e^3*(4*c^2*f - 2*b*c*g + 3*b^2*h - 8*a*c*h)*x^2)/(2*c^2*(b^2 - 4*a*c)) + ((d + e*x)^3*(c*(2*a*g - b*(f + (a*h)/c)) - (2*c^2*f - b*c*g + b^2*h - 2*a*c*h)*x))/(c*(b^2 - 4*a*c)*(a + b*x + c*x^2)) + (1/(c^4*(b^2 - 4*a*c)^(3/2)))*((4*c^5*d^3*f + 3*b^5*e^3*h - 2*b^3*c*e^2*(b*e*g + 3*b*d*h + 10*a*e*h) - 2*c^4*d*(b*d*(3*e*f + d*g) - 2*a*(3*e^2*f + 3*d*e*g + d^2*h)) - 6*a*c^3*e*(2*a*e*(e*g + 3*d*h) + b*(e^2*f + 3*d*e*g + 3*d^2*h)) + b*c^2*e*(30*a^2*e^2*h + 12*a*b*e*(e*g + 3*d*h) + b^2*(e^2*f + 3*d*e*g + 3*d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c))) + (e*(3*b^2*e^2*h + c^2*(e^2*f + 3*d*e*g + 3*d^2*h) - 2*c*e*(b*e*g + 3*b*d*h + a*e*h))*log(a + b*x + c*x^2))/(2*c^4), (e^2*(6*c^3*d*f - 3*b^3*e*h - c^2*(b*e*f + 3*b*d*g + 6*a*e*g + 18*a*d*h) + b*c*(2*b*e*g + 6*b*d*h + 11*a*e*h))*x)/(c^3*(b^2 - 4*a*c)) + (e^3*(4*c^2*f + 3*b^2*h - 2*c*(b*g + 4*a*h))*x^2)/(2*c^2*(b^2 - 4*a*c)) + ((d + e*x)^3*(c*(2*a*g - b*(f + (a*h)/c)) - (2*c^2*f - b*c*g + b^2*h - 2*a*c*h)*x))/(c*(b^2 - 4*a*c)*(a + b*x + c*x^2)) + ((4*c^5*d^3*f + 3*b^5*e^3*h - 2*b^3*c*e^2*(b*e*g + 3*b*d*h + 10*a*e*h) - 2*c^4*d*(b*d*(3*e*f + d*g) - 2*a*(3*e^2*f + 3*d*e*g + d^2*h)) - 6*a*c^3*e*(2*a*e*(e*g + 3*d*h) + b*(e^2*f + 3*d*e*g + 3*d^2*h)) + b*c^2*e*(30*a^2*e^2*h + 12*a*b*e*(e*g + 3*d*h) + b^2*(e^2*f + 3*d*e*g + 3*d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c^4*(b^2 - 4*a*c)^(3/2)) + (e*(3*b^2*e^2*h + c^2*(e^2*f + 3*d*e*g + 3*d^2*h) - 2*c*e*(b*e*g + 3*b*d*h + a*e*h))*log(a + b*x + c*x^2))/(2*c^4))] =#
    @test_int [(d + e*x)^2*(f + g*x + h*x^2)/(a + b*x + c*x^2)^2, x, 6, If(13>=8, (e^2*(2*c^2*f - b*c*g + 2*b^2*h - 6*a*c*h)*x)/(c^2*(b^2 - 4*a*c)) + ((d + e*x)^2*(c*(2*a*g - b*(f + (a*h)/c)) - (2*c^2*f - b*c*g + b^2*h - 2*a*c*h)*x))/(c*(b^2 - 4*a*c)*(a + b*x + c*x^2)) + ((4*c^4*d^2*f - 2*b^4*e^2*h - 6*a*c^2*e*(b*e*g + 2*b*d*h + 2*a*e*h) + b^2*c*e*(b*e*g + 2*b*d*h + 12*a*e*h) - c^3*(2*b*d*(2*e*f + d*g) - 4*a*(e^2*f + 2*d*e*g + d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c^3*(b^2 - 4*a*c)^(3/2)) + (e*(c*e*g + 2*c*d*h - 2*b*e*h)*log(a + b*x + c*x^2))/(2*c^3), (e^2*(2*c^2*f + 2*b^2*h - c*(b*g + 6*a*h))*x)/(c^2*(b^2 - 4*a*c)) + ((d + e*x)^2*(c*(2*a*g - b*(f + (a*h)/c)) - (2*c^2*f - b*c*g + b^2*h - 2*a*c*h)*x))/(c*(b^2 - 4*a*c)*(a + b*x + c*x^2)) + ((4*c^4*d^2*f - 2*b^4*e^2*h - 6*a*c^2*e*(b*e*g + 2*b*d*h + 2*a*e*h) + b^2*c*e*(b*e*g + 2*b*d*h + 12*a*e*h) - c^3*(2*b*d*(2*e*f + d*g) - 4*a*(e^2*f + 2*d*e*g + d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c^3*(b^2 - 4*a*c)^(3/2)) + (e*(c*e*g + 2*c*d*h - 2*b*e*h)*log(a + b*x + c*x^2))/(2*c^3))]
    @test_int [(d + e*x)^1*(f + g*x + h*x^2)/(a + b*x + c*x^2)^2, x, 5, ((d + e*x)*(c*(2*a*g - b*(f + (a*h)/c)) - (2*c^2*f - b*c*g + b^2*h - 2*a*c*h)*x))/(c*(b^2 - 4*a*c)*(a + b*x + c*x^2)) + ((4*c^3*d*f + b^3*e*h - 6*a*b*c*e*h - 2*c^2*(b*(e*f + d*g) - 2*a*(e*g + d*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c^2*(b^2 - 4*a*c)^(3/2)) + (e*h*log(a + b*x + c*x^2))/(2*c^2)]
    @test_int [(d + e*x)^0*(f + g*x + h*x^2)/(a + b*x + c*x^2)^2, x, 4, (c*(2*a*g - b*(f + (a*h)/c)) - (2*c^2*f - b*c*g + b^2*h - 2*a*c*h)*x)/(c*(b^2 - 4*a*c)*(a + b*x + c*x^2)) + (2*(2*c*f - b*g + 2*a*h)*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(b^2 - 4*a*c)^(3/2)]
    @test_int [(f + g*x + h*x^2)/((d + e*x)^1*(a + b*x + c*x^2)^2), x, 7, (b^2*e*f - b*(c*d*f + a*e*g + a*d*h) - 2*a*(c*e*f - c*d*g - a*e*h) - (2*c^2*d*f + b*(b*d - a*e)*h - c*(b*e*f + b*d*g - 2*a*e*g + 2*a*d*h))*x)/((b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)*(a + b*x + c*x^2)) + ((4*c^3*d^3*f + b*e*(4*a*b*d*e*h - 2*a^2*e^2*h + b^2*(e^2*f - d*e*g - d^2*h)) - 2*c^2*d*(b*d*(3*e*f + d*g) - 2*a*(3*e^2*f - d*e*g + d^2*h)) + 2*c*e*(2*b^2*d^2*g + 2*a^2*e*(e*g - d*h) - a*b*(3*e^2*f + d*e*g + d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/((b^2 - 4*a*c)^(3/2)*(c*d^2 - b*d*e + a*e^2)^2) + (e*(e^2*f - d*e*g + d^2*h)*log(d + e*x))/(c*d^2 - b*d*e + a*e^2)^2 - (e*(e^2*f - d*e*g + d^2*h)*log(a + b*x + c*x^2))/(2*(c*d^2 - b*d*e + a*e^2)^2)]
    @test_int [(f + g*x + h*x^2)/((d + e*x)^2*(a + b*x + c*x^2)^2), x, 7, -((e*(e^2*f - d*e*g + d^2*h))/((c*d^2 - b*d*e + a*e^2)^2*(d + e*x))) - (b^3*e^2*f - b^2*e*(2*c*d*f + a*e*g) + 2*a*c*(c*d*(2*e*f - d*g) + a*e*(e*g - 2*d*h)) + b*(c^2*d^2*f + a^2*e^2*h - a*c*(3*e^2*f - 2*d*e*g - d^2*h)) + c*(2*c^2*d^2*f + 2*a^2*e^2*h - a*b*e*(e*g + 2*d*h) + b^2*(e^2*f + d^2*h) - c*(b*d*(2*e*f + d*g) + 2*a*(e^2*f - 2*d*e*g + d^2*h)))*x)/((b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)^2*(a + b*x + c*x^2)) + ((4*c^4*d^4*f - b^3*e^3*(2*b*e*f - b*d*g - a*e*g + 2*a*d*h) - 2*c^3*d^2*(b*d*(4*e*f + d*g) - 2*a*(6*e^2*f - 2*d*e*g + d^2*h)) - 6*c^2*e*(4*a*b*d*e^2*f - b^2*d^3*g + 2*a^2*e*(e^2*f - 2*d*e*g + 2*d^2*h)) - c*e*(6*a^2*b*e^3*g - 4*a^3*e^3*h - b^3*d*(4*e^2*f - 3*d*e*g - 2*d^2*h) - 6*a*b^2*e*(2*e^2*f - d*e*g + 2*d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/((b^2 - 4*a*c)^(3/2)*(c*d^2 - b*d*e + a*e^2)^3) - (e*(e^2*(2*b*e*f - b*d*g - a*e*g + 2*a*d*h) - c*d*(4*e^2*f - 3*d*e*g + 2*d^2*h))*log(d + e*x))/(c*d^2 - b*d*e + a*e^2)^3 + (e*(e^2*(2*b*e*f - b*d*g - a*e*g + 2*a*d*h) - c*d*(4*e^2*f - 3*d*e*g + 2*d^2*h))*log(a + b*x + c*x^2))/(2*(c*d^2 - b*d*e + a*e^2)^3)]
    #= [(f + g*x + h*x^2)/((d + e*x)^3*(a + b*x + c*x^2)^2), x, 8, -((e*(e^2*f - d*e*g + d^2*h))/(2*(c*d^2 - b*d*e + a*e^2)^2*(d + e*x)^2)) + (e*(e^2*(2*b*e*f - b*d*g - a*e*g + 2*a*d*h) - c*d*(4*e^2*f - 3*d*e*g + 2*d^2*h)))/((c*d^2 - b*d*e + a*e^2)^3*(d + e*x)) + (1/((b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)^3*(a + b*x + c*x^2)))*(b^4*e^3*f - b^3*e^2*(3*c*d*f + a*e*g) + b^2*e*(3*c^2*d^2*f - a*c*e*(4*e*f - 3*d*g) + a^2*e^2*h) - b*c*(c^2*d^3*f - 3*a^2*e^2*(e*g - d*h) - a*c*d*(9*e^2*f - 3*d*e*g - d^2*h)) - 2*a*c*(c^2*d^2*(3*e*f - d*g) + a^2*e^3*h - a*c*e*(e^2*f - 3*d*e*g + 3*d^2*h)) - c*(2*c^3*d^3*f - b*e^3*(b^2*f - a*b*g + a^2*h) - c^2*d*(b*d*(3*e*f + d*g) + 2*a*(3*e^2*f - 3*d*e*g + d^2*h)) - c*(2*a^2*e^2*(e*g - 3*d*h) - 3*a*b*e*(e^2*f - d*e*g - d^2*h) - b^2*(3*d*e^2*f + d^3*h)))*x) + (1/((b^2 - 4*a*c)^(3/2)*(c*d^2 - b*d*e + a*e^2)^4))*((4*c^5*d^5*f + b^3*e^4*(b^2*(3*e*f - d*g) + a^2*e*h - 2*a*b*(e*g - d*h)) - 2*c^4*d^3*(b*d*(5*e*f + d*g) - 2*a*(10*e^2*f - 3*d*e*g + d^2*h)) - 2*b*c*e^3*(b^3*d*(5*e*f - 2*d*g) + 3*a^3*e^2*h - 6*a^2*b*e*(e*g - d*h) + 2*a*b^2*(5*e^2*f - 3*d*e*g + 2*d^2*h)) - c^2*e*(12*a^3*e^3*(e*g - 3*d*h) - b^3*d^2*(10*e^2*f - 6*d*e*g - 3*d^2*h) - 6*a^2*b*e^2*(5*e^2*f - 7*d*e*g + 2*d^2*h) - 12*a*b^2*d*e*(5*e^2*f - 2*d*e*g + 2*d^2*h)) + 2*c^3*d*e*(4*b^2*d^3*g - a*b*d*(30*e^2*f - 2*d*e*g - d^2*h) - 2*a^2*e*(15*e^2*f - 18*d*e*g + 14*d^2*h)))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c))) + (e*(c^2*d^2*(10*e^2*f - 6*d*e*g + 3*d^2*h) + e^3*(b^2*(3*e*f - d*g) + a^2*e*h - 2*a*b*(e*g - d*h)) - 2*c*e^2*(b*d*(5*e*f - 2*d*g) + a*(e^2*f - 3*d*e*g + 4*d^2*h)))*log(d + e*x))/(c*d^2 - b*d*e + a*e^2)^4 - (e*(c^2*d^2*(10*e^2*f - 6*d*e*g + 3*d^2*h) + e^3*(b^2*(3*e*f - d*g) + a^2*e*h - 2*a*b*(e*g - d*h)) - 2*c*e^2*(b*d*(5*e*f - 2*d*g) + a*(e^2*f - 3*d*e*g + 4*d^2*h)))*log(a + b*x + c*x^2))/(2*(c*d^2 - b*d*e + a*e^2)^4)] =#

    @test_int [x^3*(1 + x + x^2)/(1 - x + x^2)^2, x, 7, 3*x + x^2/2 + (2*(2 - x))/(3*(1 - x + x^2)) + (10*atan((1 - 2*x)/sqrt(3)))/(3*sqrt(3)) + 2*log(1 - x + x^2)]
    @test_int [x^2*(1 + x + x^2)/(1 - x + x^2)^2, x, 7, x + (2*(1 - 2*x))/(3*(1 - x + x^2)) - (7*atan((1 - 2*x)/sqrt(3)))/(3*sqrt(3)) + (3/2)*log(1 - x + x^2)]
    @test_int [x^1*(1 + x + x^2)/(1 - x + x^2)^2, x, 5, -((2*(1 + x))/(3*(1 - x + x^2))) - (11*atan((1 - 2*x)/sqrt(3)))/(3*sqrt(3)) + (1/2)*log(1 - x + x^2)]
    @test_int [x^0*(1 + x + x^2)/(1 - x + x^2)^2, x, 4, -((2*(2 - x))/(3*(1 - x + x^2))) - (10*atan((1 - 2*x)/sqrt(3)))/(3*sqrt(3))]
    @test_int [(1 + x + x^2)/(x^1*(1 - x + x^2)^2), x, 7, -((2*(1 - 2*x))/(3*(1 - x + x^2))) - (11*atan((1 - 2*x)/sqrt(3)))/(3*sqrt(3)) + log(x) - (1/2)*log(1 - x + x^2)]
    @test_int [(1 + x + x^2)/(x^2*(1 - x + x^2)^2), x, 7, -(1/x) + (2*(1 + x))/(3*(1 - x + x^2)) - (7*atan((1 - 2*x)/sqrt(3)))/(3*sqrt(3)) + 3*log(x) - (3/2)*log(1 - x + x^2)]
    @test_int [(1 + x + x^2)/(x^3*(1 - x + x^2)^2), x, 7, -(1/(2*x^2)) - 3/x + (2*(2 - x))/(3*(1 - x + x^2)) + (10*atan((1 - 2*x)/sqrt(3)))/(3*sqrt(3)) + 4*log(x) - 2*log(1 - x + x^2)]

    @test_int [(1 - x^2)/(1 + x + x^2)^2, x, 1, x/(1 + x + x^2)]
    @test_int [(1 + x^2)/(1 + x + x^2), x, 6, x + atan((1 + 2*x)/sqrt(3))/sqrt(3) - log(1 + x + x^2)/2]
    @test_int [(-1 + x^2)/(25 - 6*x + x^2), x, 6, x - 2*atan((1/4)*(-3 + x)) + 3*log(25 - 6*x + x^2)]
    @test_int [(-10 + 3*x^2)/(4 - 4*x + x^2), x, 3, 2/(2 - x) + 3*x + 12*log(2 - x)]
    @test_int [(8 + x^2)/(6 - 5*x + x^2), x, 5, x - 12*log(2 - x) + 17*log(3 - x)]

    @test_int [(-4 + 3*x + x^2)/(-8 - 2*x + x^2), x, 5, x + 4*log(4 - x) + log(2 + x)]
    @test_int [(7 + 5*x + 4*x^2)/(5 + 4*x + 4*x^2), x, 6, x + (3/8)*atan(1/2 + x) + (1/8)*log(5 + 4*x + 4*x^2)]
    @test_int [(2 - x + x^2)/(-5 + 2*x + x^2), x, 5, x - (1/6)*(9 - 5*sqrt(6))*log(1 - sqrt(6) + x) - (1/6)*(9 + 5*sqrt(6))*log(1 + sqrt(6) + x)]
    @test_int [(1 + 4*x + 3*x^2)/(4 + 7*x + 2*x^2)^2, x, 2, -((2 + 3*x)/(2*(4 + 7*x + 2*x^2)))]
    @test_int [(1 + x + x^2)/(3 + 2*x + x^2)^2, x, 4, (1 - x)/(4*(3 + 2*x + x^2)) + (3*atan((1 + x)/sqrt(2)))/(4*sqrt(2))]
    @test_int [(-1 + 2*x + 5*x^2)/(1 + x + x^2)^4, x, 1, -(x/(1 + x + x^2)^3)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(A+B*x+C*x^2)*(d+e*x)^m*(a+b*x+c*x^2)^(p/2)*with*B=0=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(A + C*x^2)*(a + b*x + c*x^2)^(5/2), x, 7, (5*(b^2 - 4*a*c)^2*(32*A*c^2 + 9*b^2*C - 4*a*c*C)*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(16384*c^5) - (5*(b^2 - 4*a*c)*(32*A*c^2 + 9*b^2*C - 4*a*c*C)*(b + 2*c*x)*(a + b*x + c*x^2)^(3/2))/(6144*c^4) + ((32*A*c^2 + 9*b^2*C - 4*a*c*C)*(b + 2*c*x)*(a + b*x + c*x^2)^(5/2))/(384*c^3) - (9*b*C*(a + b*x + c*x^2)^(7/2))/(112*c^2) + (C*x*(a + b*x + c*x^2)^(7/2))/(8*c) - (5*(b^2 - 4*a*c)^3*(32*A*c^2 + 9*b^2*C - 4*a*c*C)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(32768*c^(11/2))]
    @test_int [(A + C*x^2)*(a + b*x + c*x^2)^(3/2), x, 6, -(((b^2 - 4*a*c)*(24*A*c^2 + 7*b^2*C - 4*a*c*C)*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(512*c^4)) + ((24*A*c^2 + 7*b^2*C - 4*a*c*C)*(b + 2*c*x)*(a + b*x + c*x^2)^(3/2))/(192*c^3) - (7*b*C*(a + b*x + c*x^2)^(5/2))/(60*c^2) + (C*x*(a + b*x + c*x^2)^(5/2))/(6*c) + ((b^2 - 4*a*c)^2*(24*A*c^2 + 7*b^2*C - 4*a*c*C)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(1024*c^(9/2))]
    @test_int [(A + C*x^2)*(a + b*x + c*x^2)^(1/2), x, 5, ((16*A*c^2 + 5*b^2*C - 4*a*c*C)*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(64*c^3) - (5*b*C*(a + b*x + c*x^2)^(3/2))/(24*c^2) + (C*x*(a + b*x + c*x^2)^(3/2))/(4*c) - ((b^2 - 4*a*c)*(16*A*c^2 + 5*b^2*C - 4*a*c*C)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(128*c^(7/2))]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(A + C*x^2)/(a + b*x + c*x^2)^(1/2), x, 4, -((3*b*C*sqrt(a + b*x + c*x^2))/(4*c^2)) + (C*x*sqrt(a + b*x + c*x^2))/(2*c) + ((8*A*c^2 + 3*b^2*C - 4*a*c*C)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(8*c^(5/2))]
    @test_int [(A + C*x^2)/(a + b*x + c*x^2)^(3/2), x, 4, -((2*(b*c*(A + (a*C)/c) + (2*A*c^2 + (b^2 - 2*a*c)*C)*x))/(c*(b^2 - 4*a*c)*sqrt(a + b*x + c*x^2))) + (C*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/c^(3/2)]
    @test_int [(A + C*x^2)/(a + b*x + c*x^2)^(5/2), x, 3, -((2*(b*c*(A + (a*C)/c) + (2*A*c^2 + (b^2 - 2*a*c)*C)*x))/(3*c*(b^2 - 4*a*c)*(a + b*x + c*x^2)^(3/2))) + (2*(8*A*c + 4*a*C + (b^2*C)/c)*(b + 2*c*x))/(3*(b^2 - 4*a*c)^2*sqrt(a + b*x + c*x^2))]
    @test_int [(A + C*x^2)/(a + b*x + c*x^2)^(7/2), x, 4, -((2*(b*c*(A + (a*C)/c) + (2*A*c^2 + (b^2 - 2*a*c)*C)*x))/(5*c*(b^2 - 4*a*c)*(a + b*x + c*x^2)^(5/2))) + (2*(16*A*c + 4*a*C + (3*b^2*C)/c)*(b + 2*c*x))/(15*(b^2 - 4*a*c)^2*(a + b*x + c*x^2)^(3/2)) - (16*(16*A*c^2 + 3*b^2*C + 4*a*c*C)*(b + 2*c*x))/(15*(b^2 - 4*a*c)^3*sqrt(a + b*x + c*x^2))]
    @test_int [(A + C*x^2)/(a + b*x + c*x^2)^(9/2), x, 5, -((2*(b*c*(A + (a*C)/c) + (2*A*c^2 + (b^2 - 2*a*c)*C)*x))/(7*c*(b^2 - 4*a*c)*(a + b*x + c*x^2)^(7/2))) + (2*(24*A*c + 4*a*C + (5*b^2*C)/c)*(b + 2*c*x))/(35*(b^2 - 4*a*c)^2*(a + b*x + c*x^2)^(5/2)) - (32*(24*A*c^2 + 5*b^2*C + 4*a*c*C)*(b + 2*c*x))/(105*(b^2 - 4*a*c)^3*(a + b*x + c*x^2)^(3/2)) + (256*c*(24*A*c^2 + 5*b^2*C + 4*a*c*C)*(b + 2*c*x))/(105*(b^2 - 4*a*c)^4*sqrt(a + b*x + c*x^2))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(A+B*x+C*x^2)*(d+e*x)^m*(a+b*x+c*x^2)^(p/2)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)*(g + h*x)^3, x, 7, (1/(1024*c^6))*((256*c^5*d*g^3 - 33*b^5*f*h^3 + 6*b^3*c*h^2*(20*a*f*h + 7*b*(3*f*g + e*h)) - 8*b*c^2*h*(10*a^2*f*h^2 + 14*a*b*h*(3*f*g + e*h) + 7*b^2*(3*f*g^2 + 3*e*g*h + d*h^2)) - 64*c^4*g*(2*b*g*(e*g + 3*d*h) + a*(f*g^2 + 3*h*(e*g + d*h))) + 16*c^3*(2*a^2*h^2*(3*f*g + e*h) + 5*b^2*g*(f*g^2 + 3*h*(e*g + d*h)) + 6*a*b*h*(3*f*g^2 + h*(3*e*g + d*h))))*(b + 2*c*x)*sqrt(a + b*x + c*x^2)) + ((33*b^2*f*h^2 - 2*c*h*(8*b*f*g + 21*b*e*h + 16*a*f*h) - 4*c^2*(3*f*g^2 - 7*h*(e*g + 2*d*h)))*(g + h*x)^2*(a + b*x + c*x^2)^(3/2))/(280*c^3*h) - ((6*c*f*g - 14*c*e*h + 11*b*f*h)*(g + h*x)^3*(a + b*x + c*x^2)^(3/2))/(84*c^2*h) + (f*(g + h*x)^4*(a + b*x + c*x^2)^(3/2))/(7*c*h) + (1/(13440*c^5*h))*((1155*b^4*f*h^4 - 128*c^4*g^2*(3*f*g^2 - 7*h*(e*g + 12*d*h)) - 42*b^2*c*h^3*(78*a*f*h + 35*b*(3*f*g + e*h)) + 8*c^2*h^2*(128*a^2*f*h^2 + 343*a*b*h*(3*f*g + e*h) + b^2*(537*f*g^2 + 245*h*(3*e*g + d*h))) - 16*c^3*h*(16*a*h*(15*f*g^2 + 7*h*(3*e*g + d*h)) + b*g*(17*f*g^2 + 21*h*(19*e*g + 25*d*h))) - 6*c*h*(231*b^3*f*h^3 - 6*b*c*h^2*(59*b*f*g + 49*b*e*h + 74*a*f*h) + 16*c^3*g*(3*f*g^2 - 7*h*(e*g + 7*d*h)) + 8*c^2*h*(a*h*(41*f*g + 35*e*h) + b*(5*f*g^2 + 7*h*(9*e*g + 7*d*h))))*x)*(a + b*x + c*x^2)^(3/2)) - (1/(2048*c^(13/2)))*((b^2 - 4*a*c)*(256*c^5*d*g^3 - 33*b^5*f*h^3 + 6*b^3*c*h^2*(20*a*f*h + 7*b*(3*f*g + e*h)) - 8*b*c^2*h*(10*a^2*f*h^2 + 14*a*b*h*(3*f*g + e*h) + 7*b^2*(3*f*g^2 + 3*e*g*h + d*h^2)) - 64*c^4*g*(2*b*g*(e*g + 3*d*h) + a*(f*g^2 + 3*h*(e*g + d*h))) + 16*c^3*(2*a^2*h^2*(3*f*g + e*h) + 5*b^2*g*(f*g^2 + 3*h*(e*g + d*h)) + 6*a*b*h*(3*f*g^2 + h*(3*e*g + d*h))))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))]
    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)*(g + h*x)^2, x, 6, ((128*c^4*d*g^2 + 21*b^4*f*h^2 - 28*b^2*c*h*(2*b*f*g + b*e*h + 2*a*f*h) - 32*c^3*(2*b*g*(e*g + 2*d*h) + a*(f*g^2 + 2*e*g*h + d*h^2)) + 8*c^2*(2*a^2*f*h^2 + 6*a*b*h*(2*f*g + e*h) + 5*b^2*(f*g^2 + 2*e*g*h + d*h^2)))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(512*c^5) - ((2*c*f*g - 4*c*e*h + 3*b*f*h)*(g + h*x)^2*(a + b*x + c*x^2)^(3/2))/(20*c^2*h) + (f*(g + h*x)^3*(a + b*x + c*x^2)^(3/2))/(6*c*h) - ((105*b^3*f*h^3 + 64*c^3*g*(f*g^2 - 2*h*(e*g + 5*d*h)) - 28*b*c*h^2*(7*a*f*h + 5*b*(2*f*g + e*h)) + 8*c^2*h*(16*a*h*(2*f*g + e*h) + b*(7*f*g^2 + 25*h*(2*e*g + d*h))) - 6*c*h*(21*b^2*f*h^2 - 4*c*h*(2*b*f*g + 7*b*e*h + 5*a*f*h) - 8*c^2*(f*g^2 - h*(2*e*g + 5*d*h)))*x)*(a + b*x + c*x^2)^(3/2))/(960*c^4*h) - ((b^2 - 4*a*c)*(128*c^4*d*g^2 + 21*b^4*f*h^2 - 28*b^2*c*h*(2*b*f*g + b*e*h + 2*a*f*h) - 32*c^3*(2*b*g*(e*g + 2*d*h) + a*(f*g^2 + 2*e*g*h + d*h^2)) + 8*c^2*(2*a^2*f*h^2 + 6*a*b*h*(2*f*g + e*h) + 5*b^2*(f*g^2 + 2*e*g*h + d*h^2)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(1024*c^(11/2))]
    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)*(g + h*x)^1, x, 5, ((32*c^3*d*g - 7*b^3*f*h - 8*c^2*(2*b*e*g + a*f*g + 2*b*d*h + a*e*h) + 2*b*c*(6*a*f*h + 5*b*(f*g + e*h)))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(128*c^4) + (f*(g + h*x)^2*(a + b*x + c*x^2)^(3/2))/(5*c*h) + ((35*b^2*f*h^2 - 16*c^2*(3*f*g^2 - 5*h*(e*g + d*h)) - 2*c*h*(16*a*f*h + 25*b*(f*g + e*h)) - 6*c*h*(6*c*f*g - 10*c*e*h + 7*b*f*h)*x)*(a + b*x + c*x^2)^(3/2))/(240*c^3*h) - ((b^2 - 4*a*c)*(32*c^3*d*g - 7*b^3*f*h - 8*c^2*(2*b*e*g + a*f*g + 2*b*d*h + a*e*h) + 2*b*c*(6*a*f*h + 5*b*(f*g + e*h)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(256*c^(9/2))]
    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)*(g + h*x)^0, x, 5, ((16*c^2*d - 8*b*c*e + 5*b^2*f - 4*a*c*f)*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(64*c^3) + ((8*c*e - 5*b*f)*(a + b*x + c*x^2)^(3/2))/(24*c^2) + (f*x*(a + b*x + c*x^2)^(3/2))/(4*c) - ((b^2 - 4*a*c)*(16*c^2*d + 5*b^2*f - 4*c*(2*b*e + a*f))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(128*c^(7/2))]
    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)/(g + h*x)^1, x, 7, -(((4*c*h*(b*f*g - 2*c*d*h) - (4*c*g - b*h)*(2*c*f*g - 2*c*e*h + b*f*h) + 2*c*h*(2*c*f*g - 2*c*e*h + b*f*h)*x)*sqrt(a + b*x + c*x^2))/(8*c^2*h^3)) + (f*(a + b*x + c*x^2)^(3/2))/(3*c*h) + ((4*c*h*(2*c*g - b*h)*(b*f*g - 2*c*d*h) - (2*c*f*g - 2*c*e*h + b*f*h)*(8*c^2*g^2 - b^2*h^2 - 4*c*h*(b*g - a*h)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(16*c^(5/2)*h^4) + (sqrt(c*g^2 - b*g*h + a*h^2)*(f*g^2 - e*g*h + d*h^2)*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/h^4]
    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)/(g + h*x)^2, x, 7, -(((b*f*h^2*(b*g - a*h) + 4*c^2*g*(3*f*g^2 - h*(2*e*g - d*h)) + c*h*(4*a*h*(2*f*g - e*h) - b*(13*f*g^2 - 8*e*g*h + 4*d*h^2)) + 2*c*h^2*(2*c*e*g + b*f*g - (3*c*f*g^2)/h - 2*c*d*h - a*f*h)*x)*sqrt(a + b*x + c*x^2))/(4*c*h^3*(c*g^2 - b*g*h + a*h^2))) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(3/2))/(h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)) - ((b^2*f*h^2 + 4*c*h*(2*b*f*g - b*e*h - a*f*h) - 8*c^2*(3*f*g^2 - h*(2*e*g - d*h)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(8*c^(3/2)*h^4) - ((2*c*g*(3*f*g^2 - h*(2*e*g - d*h)) + h*(2*a*h*(2*f*g - e*h) - b*(5*f*g^2 - 3*e*g*h + d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(2*h^4*sqrt(c*g^2 - b*g*h + a*h^2))]
    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)/(g + h*x)^3, x, 7, (((4*c*g^2*(3*f*g - e*h))/h + 4*a*h*(3*f*g - e*h) - b*(11*f*g^2 - 3*e*g*h - d*h^2) - 2*h*(c*e*g + 2*b*f*g - (3*c*f*g^2)/h - c*d*h - 2*a*f*h)*x)*sqrt(a + b*x + c*x^2))/(4*h^2*(c*g^2 - b*g*h + a*h^2)*(g + h*x)) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(3/2))/(2*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^2) - ((6*c*f*g - 2*c*e*h - b*f*h)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(2*sqrt(c)*h^4) + ((8*c^2*g^3*(3*f*g - e*h) - 4*c*h*(b*g^2*(10*f*g - 3*e*h) - a*h*(9*f*g^2 - 3*e*g*h + d*h^2)) + h^2*(8*a^2*f*h^2 - 4*a*b*h*(6*f*g - e*h) + b^2*(15*f*g^2 - h*(3*e*g + d*h))))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(8*h^4*(c*g^2 - b*g*h + a*h^2)^(3/2))]
    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)/(g + h*x)^4, x, 7, -((1/(8*h^3*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)^2))*((8*c^2*f*g^5 - 2*c*g*h*(7*b*f*g^3 - 6*a*f*g^2*h + b*d*g*h^2 - 2*a*d*h^3) + h^2*(4*a^2*e*h^3 + b^2*g*(5*f*g^2 + e*g*h + d*h^2) - 2*a*b*h*(3*f*g^2 + 2*e*g*h + d*h^2)) + h*(4*c^2*(3*f*g^4 - d*g^2*h^2) + h^2*(8*a^2*f*h^2 - 2*a*b*h*(10*f*g - e*h) + b^2*(11*f*g^2 - h*(e*g + d*h))) + 2*c*g*h*(2*a*h*(6*f*g - e*h) - b*(12*f*g^2 - h*(e*g + 2*d*h))))*x)*sqrt(a + b*x + c*x^2))) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(3/2))/(3*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^3) + (sqrt(c)*f*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/h^4 - (1/(16*h^4*(c*g^2 - b*g*h + a*h^2)^(5/2)))*((16*c^3*f*g^5 - 8*c^2*g*h*(5*b*f*g^3 - 5*a*f*g^2*h + a*d*h^3) - b*h^3*(8*a^2*f*h^2 - 2*a*b*h*(6*f*g + e*h) + b^2*(5*f*g^2 + e*g*h + d*h^2)) + 2*c*h^2*(4*a^2*h^2*(4*f*g - e*h) - 2*a*b*h*(15*f*g^2 - e*g*h - d*h^2) + b^2*(15*f*g^3 + d*g*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))]
    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)/(g + h*x)^5, x, 5, ((16*c^2*d*g^2 + 16*a^2*f*h^2 - 8*a*b*h*(2*f*g + e*h) + b^2*(5*f*g^2 + 3*e*g*h + 5*d*h^2) - 4*c*(2*b*g*(e*g + 2*d*h) + a*(f*g^2 - 5*e*g*h + d*h^2)))*(b*g - 2*a*h + (2*c*g - b*h)*x)*sqrt(a + b*x + c*x^2))/(64*(c*g^2 - b*g*h + a*h^2)^3*(g + h*x)^2) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(3/2))/(4*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^4) + ((2*c*g*(3*f*g^2 + h*(e*g - 5*d*h)) + h*(8*a*h*(2*f*g - e*h) - b*(11*f*g^2 - 3*e*g*h - 5*d*h^2)))*(a + b*x + c*x^2)^(3/2))/(24*h*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)^3) - ((b^2 - 4*a*c)*(16*c^2*d*g^2 + 16*a^2*f*h^2 - 8*a*b*h*(2*f*g + e*h) + b^2*(5*f*g^2 + 3*e*g*h + 5*d*h^2) - 4*c*(2*b*g*(e*g + 2*d*h) + a*(f*g^2 - 5*e*g*h + d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(128*(c*g^2 - b*g*h + a*h^2)^(7/2))]
    @test_int [(d + e*x + f*x^2)*sqrt(a + b*x + c*x^2)/(g + h*x)^6, x, 6, (1/(128*(c*g^2 - b*g*h + a*h^2)^4*(g + h*x)^2))*((32*c^3*d*g^3 - 8*c^2*g*(2*b*g*(e*g + 3*d*h) + a*(f*g^2 - 6*e*g*h + 3*d*h^2)) - b*h*(16*a^2*f*h^2 - 2*a*b*h*(6*f*g + 5*e*h) + b^2*(3*f*g^2 + 3*e*g*h + 7*d*h^2)) + 2*c*(4*a^2*h^2*(6*f*g - e*h) - 6*a*b*h*(3*f*g^2 + 3*e*g*h - d*h^2) + b^2*g*(5*f*g^2 + 6*e*g*h + 15*d*h^2)))*(b*g - 2*a*h + (2*c*g - b*h)*x)*sqrt(a + b*x + c*x^2)) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(3/2))/(5*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^5) + ((2*c*g*(3*f*g^2 + h*(2*e*g - 7*d*h)) + h*(10*a*h*(2*f*g - e*h) - b*(13*f*g^2 - 3*e*g*h - 7*d*h^2)))*(a + b*x + c*x^2)^(3/2))/(40*h*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)^4) + ((4*c^2*g^2*(3*f*g^2 + h*(2*e*g - 27*d*h)) - 5*h^2*(16*a^2*f*h^2 - 2*a*b*h*(6*f*g + 5*e*h) + b^2*(3*f*g^2 + 3*e*g*h + 7*d*h^2)) - 2*c*h*(b*g*(16*f*g^2 - 21*e*g*h - 54*d*h^2) - 2*a*h*(18*f*g^2 - 33*e*g*h + 8*d*h^2)))*(a + b*x + c*x^2)^(3/2))/(240*h*(c*g^2 - b*g*h + a*h^2)^3*(g + h*x)^3) - (1/(256*(c*g^2 - b*g*h + a*h^2)^(9/2)))*((b^2 - 4*a*c)*(32*c^3*d*g^3 - 8*c^2*g*(2*b*g*(e*g + 3*d*h) + a*(f*g^2 - 6*e*g*h + 3*d*h^2)) - b*h*(16*a^2*f*h^2 - 2*a*b*h*(6*f*g + 5*e*h) + b^2*(3*f*g^2 + 3*e*g*h + 7*d*h^2)) + 2*c*(4*a^2*h^2*(6*f*g - e*h) - 6*a*b*h*(3*f*g^2 + 3*e*g*h - d*h^2) + b^2*g*(5*f*g^2 + 6*e*g*h + 15*d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))]

    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)*(g + h*x)^3, x, 8, -((1/(32768*c^7))*((b^2 - 4*a*c)*(1536*c^5*d*g^3 - 143*b^5*f*h^3 + 22*b^3*c*h^2*(20*a*f*h + 9*b*(3*f*g + e*h)) - 48*b*c^2*h*(5*a^2*f*h^2 + 9*a*b*h*(3*f*g + e*h) + 6*b^2*(3*f*g^2 + 3*e*g*h + d*h^2)) - 256*c^4*g*(3*b*g*(e*g + 3*d*h) + a*(f*g^2 + 3*h*(e*g + d*h))) + 32*c^3*(3*a^2*h^2*(3*f*g + e*h) + 14*b^2*g*(f*g^2 + 3*h*(e*g + d*h)) + 12*a*b*h*(3*f*g^2 + h*(3*e*g + d*h))))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))) + (1/(12288*c^6))*((1536*c^5*d*g^3 - 143*b^5*f*h^3 + 22*b^3*c*h^2*(20*a*f*h + 9*b*(3*f*g + e*h)) - 48*b*c^2*h*(5*a^2*f*h^2 + 9*a*b*h*(3*f*g + e*h) + 6*b^2*(3*f*g^2 + 3*e*g*h + d*h^2)) - 256*c^4*g*(3*b*g*(e*g + 3*d*h) + a*(f*g^2 + 3*h*(e*g + d*h))) + 32*c^3*(3*a^2*h^2*(3*f*g + e*h) + 14*b^2*g*(f*g^2 + 3*h*(e*g + d*h)) + 12*a*b*h*(3*f*g^2 + h*(3*e*g + d*h))))*(b + 2*c*x)*(a + b*x + c*x^2)^(3/2)) + ((143*b^2*f*h^2 - 2*c*h*(24*b*f*g + 99*b*e*h + 64*a*f*h) - 12*c^2*(5*f*g^2 - 3*h*(3*e*g + 8*d*h)))*(g + h*x)^2*(a + b*x + c*x^2)^(5/2))/(2016*c^3*h) - ((10*c*f*g - 18*c*e*h + 13*b*f*h)*(g + h*x)^3*(a + b*x + c*x^2)^(5/2))/(144*c^2*h) + (f*(g + h*x)^4*(a + b*x + c*x^2)^(5/2))/(9*c*h) + (1/(80640*c^5*h))*((3003*b^4*f*h^4 - 192*c^4*g^2*(5*f*g^2 - 3*h*(3*e*g + 64*d*h)) - 198*b^2*c*h^3*(38*a*f*h + 21*b*(3*f*g + e*h)) + 8*c^2*h^2*(256*a^2*f*h^2 + 837*a*b*h*(3*f*g + e*h) + b^2*(1553*f*g^2 + 756*h*(3*e*g + d*h))) - 16*c^3*h*(32*a*h*(17*f*g^2 + 9*h*(3*e*g + d*h)) + b*g*(13*f*g^2 + 9*h*(141*e*g + 196*d*h))) - 10*c*h*(429*b^3*f*h^3 - 22*b*c*h^2*(29*b*f*g + 27*b*e*h + 34*a*f*h) + 16*c^3*g*(5*f*g^2 - 9*h*(e*g + 12*d*h)) + 8*c^2*h*(a*h*(61*f*g + 63*e*h) + 3*b*(f*g^2 + 6*h*(7*e*g + 6*d*h))))*x)*(a + b*x + c*x^2)^(5/2)) + (1/(65536*c^(15/2)))*((b^2 - 4*a*c)^2*(1536*c^5*d*g^3 - 143*b^5*f*h^3 + 22*b^3*c*h^2*(20*a*f*h + 9*b*(3*f*g + e*h)) - 48*b*c^2*h*(5*a^2*f*h^2 + 9*a*b*h*(3*f*g + e*h) + 6*b^2*(3*f*g^2 + 3*e*g*h + d*h^2)) - 256*c^4*g*(3*b*g*(e*g + 3*d*h) + a*(f*g^2 + 3*h*(e*g + d*h))) + 32*c^3*(3*a^2*h^2*(3*f*g + e*h) + 14*b^2*g*(f*g^2 + 3*h*(e*g + d*h)) + 12*a*b*h*(3*f*g^2 + h*(3*e*g + d*h))))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)*(g + h*x)^2, x, 7, -((1/(16384*c^6))*((b^2 - 4*a*c)*(768*c^4*d*g^2 + 99*b^4*f*h^2 - 72*b^2*c*h*(4*b*f*g + 2*b*e*h + 3*a*f*h) - 128*c^3*(3*b*g*(e*g + 2*d*h) + a*(f*g^2 + 2*e*g*h + d*h^2)) + 16*c^2*(3*a^2*f*h^2 + 12*a*b*h*(2*f*g + e*h) + 14*b^2*(f*g^2 + 2*e*g*h + d*h^2)))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))) + (1/(6144*c^5))*((768*c^4*d*g^2 + 99*b^4*f*h^2 - 72*b^2*c*h*(4*b*f*g + 2*b*e*h + 3*a*f*h) - 128*c^3*(3*b*g*(e*g + 2*d*h) + a*(f*g^2 + 2*e*g*h + d*h^2)) + 16*c^2*(3*a^2*f*h^2 + 12*a*b*h*(2*f*g + e*h) + 14*b^2*(f*g^2 + 2*e*g*h + d*h^2)))*(b + 2*c*x)*(a + b*x + c*x^2)^(3/2)) - ((10*c*f*g - 16*c*e*h + 11*b*f*h)*(g + h*x)^2*(a + b*x + c*x^2)^(5/2))/(112*c^2*h) + (f*(g + h*x)^3*(a + b*x + c*x^2)^(5/2))/(8*c*h) - (1/(13440*c^4*h))*((693*b^3*f*h^3 + 96*c^3*g*(5*f*g^2 - 8*h*(e*g + 7*d*h)) - 36*b*c*h^2*(31*a*f*h + 28*b*(2*f*g + e*h)) + 8*c^2*h*(96*a*h*(2*f*g + e*h) + b*(31*f*g^2 + 196*h*(2*e*g + d*h))) - 10*c*h*(99*b^2*f*h^2 - 8*c^2*(5*f*g^2 - 4*h*(2*e*g + 7*d*h)) - 12*c*h*(7*a*f*h + 2*b*(f*g + 6*e*h)))*x)*(a + b*x + c*x^2)^(5/2)) + (1/(32768*c^(13/2)))*((b^2 - 4*a*c)^2*(768*c^4*d*g^2 + 99*b^4*f*h^2 - 72*b^2*c*h*(4*b*f*g + 2*b*e*h + 3*a*f*h) - 128*c^3*(3*b*g*(e*g + 2*d*h) + a*(f*g^2 + 2*e*g*h + d*h^2)) + 16*c^2*(3*a^2*f*h^2 + 12*a*b*h*(2*f*g + e*h) + 14*b^2*(f*g^2 + 2*e*g*h + d*h^2)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)*(g + h*x)^1, x, 6, -(((b^2 - 4*a*c)*(48*c^3*d*g - 9*b^3*f*h - 8*c^2*(3*b*e*g + a*f*g + 3*b*d*h + a*e*h) + 2*b*c*(6*a*f*h + 7*b*(f*g + e*h)))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(1024*c^5)) + ((48*c^3*d*g - 9*b^3*f*h - 8*c^2*(3*b*e*g + a*f*g + 3*b*d*h + a*e*h) + 2*b*c*(6*a*f*h + 7*b*(f*g + e*h)))*(b + 2*c*x)*(a + b*x + c*x^2)^(3/2))/(384*c^4) + (f*(g + h*x)^2*(a + b*x + c*x^2)^(5/2))/(7*c*h) + ((63*b^2*f*h^2 - 24*c^2*(5*f*g^2 - 7*h*(e*g + d*h)) - 2*c*h*(24*a*f*h + 49*b*(f*g + e*h)) - 10*c*h*(10*c*f*g - 14*c*e*h + 9*b*f*h)*x)*(a + b*x + c*x^2)^(5/2))/(840*c^3*h) + ((b^2 - 4*a*c)^2*(48*c^3*d*g - 9*b^3*f*h - 8*c^2*(3*b*e*g + a*f*g + 3*b*d*h + a*e*h) + 2*b*c*(6*a*f*h + 7*b*(f*g + e*h)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(2048*c^(11/2))]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)*(g + h*x)^0, x, 6, -(((b^2 - 4*a*c)*(24*c^2*d + 7*b^2*f - 4*c*(3*b*e + a*f))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(512*c^4)) + ((24*c^2*d - 12*b*c*e + 7*b^2*f - 4*a*c*f)*(b + 2*c*x)*(a + b*x + c*x^2)^(3/2))/(192*c^3) + ((12*c*e - 7*b*f)*(a + b*x + c*x^2)^(5/2))/(60*c^2) + (f*x*(a + b*x + c*x^2)^(5/2))/(6*c) + ((b^2 - 4*a*c)^2*(24*c^2*d + 7*b^2*f - 4*c*(3*b*e + a*f))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(1024*c^(9/2))]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)/(g + h*x)^1, x, 8, (1/(128*c^3*h^5))*((3*b^4*f*h^4 + 6*b^2*c*h^3*(b*f*g - b*e*h - 2*a*f*h) + 128*c^4*g^2*(f*g^2 - h*(e*g - d*h)) - 32*c^3*h*(5*b*g - 4*a*h)*(f*g^2 - h*(e*g - d*h)) - 8*b*c^2*h^2*(3*a*h*(f*g - e*h) - 2*b*(f*g^2 - e*g*h + d*h^2)) + 2*c*h*(8*c*h*(2*c*g - b*h)*(b*f*g - 2*c*d*h) - (2*c*f*g - 2*c*e*h + b*f*h)*(16*c^2*g^2 - 3*b^2*h^2 - 4*c*h*(2*b*g - 3*a*h)))*x)*sqrt(a + b*x + c*x^2)) - ((8*c*h*(b*f*g - 2*c*d*h) - (8*c*g - 3*b*h)*(2*c*f*g - 2*c*e*h + b*f*h) + 6*c*h*(2*c*f*g - 2*c*e*h + b*f*h)*x)*(a + b*x + c*x^2)^(3/2))/(48*c^2*h^3) + (f*(a + b*x + c*x^2)^(5/2))/(5*c*h) - (1/(256*c^(7/2)*h^6))*((4*c*h*(2*c*g - b*h)*(8*c*h*(b*g - 2*a*h)*(b*f*g - 2*c*d*h) - g*(8*b*c*g - 3*b^2*h - 4*a*c*h)*(2*c*f*g - 2*c*e*h + b*f*h)) - 2*(4*c^2*g^2 - (b^2*h^2)/2 - 2*c*h*(b*g - a*h))*(8*c*h*(2*c*g - b*h)*(b*f*g - 2*c*d*h) - (2*c*f*g - 2*c*e*h + b*f*h)*(16*c^2*g^2 - 3*b^2*h^2 - 4*c*h*(2*b*g - 3*a*h))))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2)))) + ((c*g^2 - b*g*h + a*h^2)^(3/2)*(f*g^2 - h*(e*g - d*h))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/h^6]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)/(g + h*x)^2, x, 8, -((1/(64*c^2*h^5))*((3*b^3*f*h^3 + 4*b*c*h^2*(4*b*f*g - 2*b*e*h - 3*a*f*h) + 64*c^3*g*(5*f*g^2 - h*(4*e*g - 3*d*h)) + 16*c^2*h*(4*a*h*(2*f*g - e*h) - b*(19*f*g^2 - 14*e*g*h + 9*d*h^2)) + 2*c*h*(3*b^2*f*h^2 + 4*c*h*(4*b*f*g - 2*b*e*h - 3*a*f*h) - 16*c^2*(5*f*g^2 - h*(4*e*g - 3*d*h)))*x)*sqrt(a + b*x + c*x^2))) - ((3*b*f*h^2*(b*g - a*h) + 8*c^2*g*(5*f*g^2 - h*(4*e*g - 3*d*h)) + c*h*(8*a*h*(2*f*g - e*h) - b*(43*f*g^2 - 8*h*(4*e*g - 3*d*h))) + 6*c*h^2*(4*c*e*g + b*f*g - (5*c*f*g^2)/h - 4*c*d*h - a*f*h)*x)*(a + b*x + c*x^2)^(3/2))/(24*c*h^3*(c*g^2 - b*g*h + a*h^2)) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(5/2))/(h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)) + (1/(128*c^(5/2)*h^6))*((3*b^4*f*h^4 + 8*b^2*c*h^3*(2*b*f*g - b*e*h - 3*a*f*h) + 128*c^4*g^2*(5*f*g^2 - h*(4*e*g - 3*d*h)) + 48*c^2*h^2*(a^2*f*h^2 - 2*a*b*h*(2*f*g - e*h) + b^2*(3*f*g^2 - 2*e*g*h + d*h^2)) + 192*c^3*h*(a*h*(3*f*g^2 - 2*e*g*h + d*h^2) - b*g*(4*f*g^2 - 3*e*g*h + 2*d*h^2)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2)))) - (sqrt(c*g^2 - b*g*h + a*h^2)*(2*c*g*(5*f*g^2 - h*(4*e*g - 3*d*h)) + h*(2*a*h*(2*f*g - e*h) - b*(7*f*g^2 - 5*e*g*h + 3*d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(2*h^6)]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)/(g + h*x)^3, x, 8, -((1/(8*c*h^5*(c*g^2 - b*g*h + a*h^2)))*((b^2*f*h^3*(b*g - a*h) - 8*c^3*g^2*(10*f*g^2 - 3*h*(2*e*g - d*h)) - 2*c^2*h*(2*a*h*(19*f*g^2 - 9*e*g*h + 3*d*h^2) - 3*b*g*(22*f*g^2 - 12*e*g*h + 5*d*h^2)) - c*h^2*(8*a^2*f*h^2 - 18*a*b*h*(3*f*g - e*h) + b^2*(53*f*g^2 - 6*h*(4*e*g - d*h))) + 2*c*h*(b*f*h^2*(b*g - a*h) + 2*c^2*g*(10*f*g^2 - 3*h*(2*e*g - d*h)) + c*h*(2*a*h*(7*f*g - 3*e*h) - 3*b*(6*f*g^2 - 3*e*g*h + d*h^2)))*x)*sqrt(a + b*x + c*x^2))) - ((4*c*g*(6*e*g - (10*f*g^2)/h - 3*d*h) - 4*a*h*(7*f*g - 3*e*h) + b*(31*f*g^2 - 3*h*(5*e*g - d*h)) + 2*h*(3*c*e*g + 2*b*f*g - (5*c*f*g^2)/h - 3*c*d*h - 2*a*f*h)*x)*(a + b*x + c*x^2)^(3/2))/(12*h^2*(c*g^2 - b*g*h + a*h^2)*(g + h*x)) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(5/2))/(2*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^2) - ((b^3*f*h^3 + 6*b*c*h^2*(3*b*f*g - b*e*h - 2*a*f*h) + 16*c^3*g*(10*f*g^2 - 3*h*(2*e*g - d*h)) + 24*c^2*h*(a*h*(3*f*g - e*h) - b*(6*f*g^2 - 3*e*g*h + d*h^2)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(16*c^(3/2)*h^6) + (1/(8*h^6*sqrt(c*g^2 - b*g*h + a*h^2)))*((8*c^2*g^2*(10*f*g^2 - 3*h*(2*e*g - d*h)) + 4*c*h*(a*h*(19*f*g^2 - 9*e*g*h + 3*d*h^2) - b*g*(28*f*g^2 - 15*e*g*h + 6*d*h^2)) + h^2*(8*a^2*f*h^2 - 4*a*b*h*(10*f*g - 3*e*h) + b^2*(35*f*g^2 - 3*h*(5*e*g - d*h))))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)/(g + h*x)^4, x, 8, -((1/(8*h^5*(c*g^2 - b*g*h + a*h^2)*(g + h*x)))*((8*c^2*g^2*(10*f*g^2 - h*(4*e*g - d*h)) - 2*c*h*(3*b*g*(18*f*g^2 - 6*e*g*h + d*h^2) - 2*a*h*(23*f*g^2 - 8*e*g*h + 2*d*h^2)) + h^2*(12*a^2*f*h^2 - 6*a*b*h*(7*f*g - e*h) + b^2*(29*f*g^2 - h*(5*e*g + d*h))) + 2*h*(3*b*f*h^2*(b*g - a*h) + 2*c^2*g*(10*f*g^2 - h*(4*e*g - d*h)) + c*h*(6*a*h*(3*f*g - e*h) - b*(22*f*g^2 - 7*e*g*h + d*h^2)))*x)*sqrt(a + b*x + c*x^2))) - ((2*c*g*(4*e*g - (10*f*g^2)/h - d*h) - 6*a*h*(3*f*g - e*h) + b*(17*f*g^2 - h*(5*e*g + d*h)) + 2*h*(2*c*e*g + 3*b*f*g - (5*c*f*g^2)/h - 2*c*d*h - 3*a*f*h)*x)*(a + b*x + c*x^2)^(3/2))/(12*h^2*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^2) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(5/2))/(3*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^3) + ((3*b^2*f*h^2 - 12*c*h*(4*b*f*g - b*e*h - a*f*h) + 8*c^2*(10*f*g^2 - h*(4*e*g - d*h)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(8*sqrt(c)*h^6) - (1/(16*h^6*(c*g^2 - b*g*h + a*h^2)^(3/2)))*((16*c^3*g^3*(10*f*g^2 - h*(4*e*g - d*h)) - b*h^3*(24*a^2*f*h^2 - 6*a*b*h*(10*f*g - e*h) + b^2*(35*f*g^2 - 5*e*g*h - d*h^2)) + 6*c*h^2*(4*a^2*h^2*(4*f*g - e*h) + b^2*g*(35*f*g^2 - 10*e*g*h + d*h^2) - 2*a*b*h*(25*f*g^2 - 7*e*g*h + d*h^2)) - 24*c^2*g*h*(b*g*(14*f*g^2 - 5*e*g*h + d*h^2) - a*h*(11*f*g^2 - 4*e*g*h + d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)/(g + h*x)^5, x, 8, (1/(64*h^5*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)))*((64*c^3*g^4*(5*f*g - e*h) - 16*c^2*g^2*h*(b*g*(41*f*g - 7*e*h) - 8*a*h*(5*f*g - e*h)) + 4*c*h^2*(2*b^2*g^2*(46*f*g - 5*e*h) + 16*a^2*h^2*(5*f*g - e*h) - a*b*h*(173*f*g^2 - 25*e*g*h - 3*d*h^2)) - b*h^3*(48*a^2*f*h^2 - 8*a*b*h*(10*f*g + e*h) + b^2*(35*f*g^2 + 5*e*g*h + 3*d*h^2)) + 2*c*h*(16*c^2*g^3*(5*f*g - e*h) - 4*c*h*(6*b*g^2*(6*f*g - e*h) - a*h*(35*f*g^2 - h*(7*e*g - 3*d*h))) + h^2*(48*a^2*f*h^2 - 8*a*b*h*(14*f*g - e*h) + b^2*(61*f*g^2 - h*(5*e*g + 3*d*h))))*x)*sqrt(a + b*x + c*x^2)) - (1/(96*h^3*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)^3))*((16*c^2*g^4*(5*f*g - e*h) - h^2*(16*a^2*h^2*(f*g - 2*e*h) - b^2*g*(35*f*g^2 + 5*e*g*h + 3*d*h^2) + 4*a*b*h*(7*f*g^2 + 7*e*g*h + 3*d*h^2)) - 4*c*g*h*(b*g*(31*f*g^2 - 5*e*g*h + 3*d*h^2) - a*h*(25*f*g^2 - 5*e*g*h + 9*d*h^2)) + 3*h*(8*c^2*g^2*(5*f*g^2 - h*(e*g + d*h)) + h^2*(16*a^2*f*h^2 - 8*a*b*h*(6*f*g - e*h) + b^2*(29*f*g^2 - 5*e*g*h - 3*d*h^2)) - 4*c*h*(2*b*g*(9*f*g^2 - 2*e*g*h - d*h^2) - a*h*(17*f*g^2 - 5*e*g*h + d*h^2)))*x)*(a + b*x + c*x^2)^(3/2)) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(5/2))/(4*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^4) - (sqrt(c)*(10*c*f*g - 2*c*e*h - 3*b*f*h)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(2*h^6) + (1/(128*h^6*(c*g^2 - b*g*h + a*h^2)^(5/2)))*((128*c^4*g^5*(5*f*g - e*h) - 64*c^3*g^3*h*(b*g*(28*f*g - 5*e*h) - 5*a*h*(5*f*g - e*h)) + 8*c*h^3*(24*a^3*f*h^3 - 12*a^2*b*h^2*(10*f*g - e*h) - 5*b^3*g^2*(14*f*g - e*h) + 3*a*b^2*h*(55*f*g^2 - 5*e*g*h - d*h^2)) - 48*c^2*h^2*(10*a*b*g^2*h*(6*f*g - e*h) - 5*b^2*g^3*(7*f*g - e*h) - a^2*h^2*(25*f*g^2 - 5*e*g*h + d*h^2)) + b^2*h^4*(48*a^2*f*h^2 - 8*a*b*h*(10*f*g + e*h) + b^2*(35*f*g^2 + 5*e*g*h + 3*d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)/(g + h*x)^6, x, 8, -((1/(128*h^5*(c*g^2 - b*g*h + a*h^2)^3*(g + h*x)^2))*((128*c^4*f*g^7 - 32*c^3*f*g^5*h*(11*b*g - 10*a*h) + 8*c^2*g*h^2*(38*b^2*f*g^4 + 2*a^2*h^2*(13*f*g^2 + 3*d*h^2) - a*b*g*h*(65*f*g^2 + 3*d*h^2)) - 2*c*h^3*(8*a^3*h^3*(2*f*g - 3*e*h) - 2*a*b^2*g^2*h*(34*f*g + 3*e*h) + 4*a^2*b*h^2*(5*f*g^2 + 6*e*g*h + 3*d*h^2) + b^3*(35*f*g^4 - 3*d*g^2*h^2)) - b*h^4*(b*g - 2*a*h)*(16*a^2*f*h^2 - 2*a*b*h*(10*f*g + 3*e*h) + b^2*(7*f*g^2 + 3*h*(e*g + d*h))) + h*(128*c*f*(c*g^2 - h*(b*g - a*h))^3 + (2*c*g - b*h)*(32*c^3*f*g^5 - 8*c^2*g*h*(10*b*f*g^3 - 11*a*f*g^2*h + 3*a*d*h^3) + 2*c*h^2*(4*a^2*h^2*(10*f*g - 3*e*h) - 6*a*b*h*(11*f*g^2 - e*g*h - d*h^2) + b^2*(29*f*g^3 + 3*d*g*h^2)) - b*h^3*(16*a^2*f*h^2 - 2*a*b*h*(10*f*g + 3*e*h) + b^2*(7*f*g^2 + 3*h*(e*g + d*h)))))*x)*sqrt(a + b*x + c*x^2))) - (1/(48*h^3*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)^4))*((16*c^2*f*g^5 - 2*c*g*h*(13*b*f*g^3 - 10*a*f*g^2*h + 3*b*d*g*h^2 - 6*a*d*h^3) - h^2*(4*a^2*h^2*(2*f*g - 3*e*h) - b^2*g*(7*f*g^2 + 3*h*(e*g + d*h)) + 2*a*b*h*(f*g^2 + 3*h*(2*e*g + d*h))) + h*(4*c^2*(7*f*g^4 - 3*d*g^2*h^2) + 2*c*g*h*(2*a*h*(14*f*g - 3*e*h) - b*(28*f*g^2 - 3*e*g*h - 6*d*h^2)) + h^2*(16*a^2*f*h^2 - 2*a*b*h*(22*f*g - 3*e*h) + b^2*(25*f*g^2 - 3*h*(e*g + d*h))))*x)*(a + b*x + c*x^2)^(3/2)) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(5/2))/(5*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^5) + (c^(3/2)*f*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/h^6 - (1/(256*h^6*(c*g^2 - b*g*h + a*h^2)^(7/2)))*((256*c^5*f*g^7 - 896*c^4*f*g^5*h*(b*g - a*h) + 32*c^3*g*h^2*(35*b^2*f*g^4 - 70*a*b*f*g^3*h + a^2*h^2*(35*f*g^2 - 3*d*h^2)) - 16*c^2*h^3*(35*b^3*f*g^4 - 6*a^3*h^3*(6*f*g - e*h) + 3*a^2*b*h^2*(35*f*g^2 - e*g*h - d*h^2) - 3*a*b^2*g*h*(35*f*g^2 + d*h^2)) + b^3*h^5*(16*a^2*f*h^2 - 2*a*b*h*(10*f*g + 3*e*h) + b^2*(7*f*g^2 + 3*h*(e*g + d*h))) - 2*b*c*h^4*(96*a^3*f*h^3 - 24*a^2*b*h^2*(8*f*g + e*h) - b^3*(35*f*g^3 - 3*d*g*h^2) + 4*a*b^2*h*(35*f*g^2 + 3*h*(e*g + d*h))))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)/(g + h*x)^7, x, 6, -(((b^2 - 4*a*c)*(24*c^2*d*g^2 + 24*a^2*f*h^2 - 12*a*b*h*(2*f*g + e*h) + b^2*(7*f*g^2 + 5*e*g*h + 7*d*h^2) - 4*c*(3*b*g*(e*g + 2*d*h) + a*(f*g^2 - 7*e*g*h + d*h^2)))*(b*g - 2*a*h + (2*c*g - b*h)*x)*sqrt(a + b*x + c*x^2))/(512*(c*g^2 - b*g*h + a*h^2)^4*(g + h*x)^2)) + ((24*c^2*d*g^2 + 24*a^2*f*h^2 - 12*a*b*h*(2*f*g + e*h) + b^2*(7*f*g^2 + 5*e*g*h + 7*d*h^2) - 4*c*(3*b*g*(e*g + 2*d*h) + a*(f*g^2 - 7*e*g*h + d*h^2)))*(b*g - 2*a*h + (2*c*g - b*h)*x)*(a + b*x + c*x^2)^(3/2))/(192*(c*g^2 - b*g*h + a*h^2)^3*(g + h*x)^4) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(5/2))/(6*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^6) + ((2*c*g*(5*f*g^2 + h*(e*g - 7*d*h)) + h*(12*a*h*(2*f*g - e*h) - b*(17*f*g^2 - 5*e*g*h - 7*d*h^2)))*(a + b*x + c*x^2)^(5/2))/(60*h*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)^5) + ((b^2 - 4*a*c)^2*(24*c^2*d*g^2 + 24*a^2*f*h^2 - 12*a*b*h*(2*f*g + e*h) + b^2*(7*f*g^2 + 5*e*g*h + 7*d*h^2) - 4*c*(3*b*g*(e*g + 2*d*h) + a*(f*g^2 - 7*e*g*h + d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(1024*(c*g^2 - b*g*h + a*h^2)^(9/2))]
    @test_int [(d + e*x + f*x^2)*(a + b*x + c*x^2)^(3/2)/(g + h*x)^8, x, 7, -((1/(1024*(c*g^2 - b*g*h + a*h^2)^5*(g + h*x)^2))*((b^2 - 4*a*c)*(48*c^3*d*g^3 - 8*c^2*g*(3*b*g*(e*g + 3*d*h) + a*(f*g^2 - 8*e*g*h + 3*d*h^2)) - b*h*(24*a^2*f*h^2 - 2*a*b*h*(10*f*g + 7*e*h) + b^2*(5*f*g^2 + 5*e*g*h + 9*d*h^2)) + 2*c*(4*a^2*h^2*(8*f*g - e*h) - 2*a*b*h*(13*f*g^2 + 13*e*g*h - 3*d*h^2) + b^2*g*(7*f*g^2 + 10*e*g*h + 21*d*h^2)))*(b*g - 2*a*h + (2*c*g - b*h)*x)*sqrt(a + b*x + c*x^2))) + (1/(384*(c*g^2 - b*g*h + a*h^2)^4*(g + h*x)^4))*((48*c^3*d*g^3 - 8*c^2*g*(3*b*g*(e*g + 3*d*h) + a*(f*g^2 - 8*e*g*h + 3*d*h^2)) - b*h*(24*a^2*f*h^2 - 2*a*b*h*(10*f*g + 7*e*h) + b^2*(5*f*g^2 + 5*e*g*h + 9*d*h^2)) + 2*c*(4*a^2*h^2*(8*f*g - e*h) - 2*a*b*h*(13*f*g^2 + 13*e*g*h - 3*d*h^2) + b^2*g*(7*f*g^2 + 10*e*g*h + 21*d*h^2)))*(b*g - 2*a*h + (2*c*g - b*h)*x)*(a + b*x + c*x^2)^(3/2)) - ((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(5/2))/(7*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^7) + ((2*c*g*(5*f*g^2 + h*(2*e*g - 9*d*h)) + h*(14*a*h*(2*f*g - e*h) - b*(19*f*g^2 - 5*e*g*h - 9*d*h^2)))*(a + b*x + c*x^2)^(5/2))/(84*h*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)^6) + ((4*c^2*g^2*(5*f*g^2 + h*(2*e*g - 51*d*h)) - 7*h^2*(24*a^2*f*h^2 - 2*a*b*h*(10*f*g + 7*e*h) + b^2*(5*f*g^2 + 5*e*g*h + 9*d*h^2)) - 2*c*h*(3*b*g*(8*f*g^2 - 15*e*g*h - 34*d*h^2) - 2*a*h*(26*f*g^2 - 61*e*g*h + 12*d*h^2)))*(a + b*x + c*x^2)^(5/2))/(840*h*(c*g^2 - b*g*h + a*h^2)^3*(g + h*x)^5) + (1/(2048*(c*g^2 - b*g*h + a*h^2)^(11/2)))*((b^2 - 4*a*c)^2*(48*c^3*d*g^3 - 8*c^2*g*(3*b*g*(e*g + 3*d*h) + a*(f*g^2 - 8*e*g*h + 3*d*h^2)) - b*h*(24*a^2*f*h^2 - 2*a*b*h*(10*f*g + 7*e*h) + b^2*(5*f*g^2 + 5*e*g*h + 9*d*h^2)) + 2*c*(4*a^2*h^2*(8*f*g - e*h) - 2*a*b*h*(13*f*g^2 + 13*e*g*h - 3*d*h^2) + b^2*g*(7*f*g^2 + 10*e*g*h + 21*d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))]

    @test_int [(1 + 2*x)^3*sqrt(2 - x + 3*x^2)*(1 + 3*x + 4*x^2), x, 7, (5393*(1 - 6*x)*sqrt(2 - x + 3*x^2))/15552 + (17*(1 + 2*x)^2*(2 - x + 3*x^2)^(3/2))/105 + (67*(1 + 2*x)^3*(2 - x + 3*x^2)^(3/2))/378 + (2*(1 + 2*x)^4*(2 - x + 3*x^2)^(3/2))/21 - ((75295 + 26982*x)*(2 - x + 3*x^2)^(3/2))/68040 + (124039*asinh((1 - 6*x)/sqrt(23)))/(31104*sqrt(3))]
    @test_int [(1 + 2*x)^2*sqrt(2 - x + 3*x^2)*(1 + 3*x + 4*x^2), x, 6, (235*(1 - 6*x)*sqrt(2 - x + 3*x^2))/1296 + ((1 + 2*x)^2*(2 - x + 3*x^2)^(3/2))/5 + ((1 + 2*x)^3*(2 - x + 3*x^2)^(3/2))/9 + ((25 + 306*x)*(2 - x + 3*x^2)^(3/2))/810 + (5405*asinh((1 - 6*x)/sqrt(23)))/(2592*sqrt(3))]
    @test_int [(1 + 2*x)^1*sqrt(2 - x + 3*x^2)*(1 + 3*x + 4*x^2), x, 5, (19*(1 - 6*x)*sqrt(2 - x + 3*x^2))/2592 + (2*(1 + 2*x)^2*(2 - x + 3*x^2)^(3/2))/15 + ((745 + 738*x)*(2 - x + 3*x^2)^(3/2))/1620 + (437*asinh((1 - 6*x)/sqrt(23)))/(5184*sqrt(3))]
    @test_int [(sqrt(2 - x + 3*x^2)*(1 + 3*x + 4*x^2))/(1 + 2*x)^1, x, 7, ((13 + 30*x)*sqrt(2 - x + 3*x^2))/72 + (2*(2 - x + 3*x^2)^(3/2))/9 - (43*asinh((1 - 6*x)/sqrt(23)))/(144*sqrt(3)) - (sqrt(13)*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/8]
    @test_int [(sqrt(2 - x + 3*x^2)*(1 + 3*x + 4*x^2))/(1 + 2*x)^2, x, 7, -((67 - 96*x)*sqrt(2 - x + 3*x^2))/156 - (2 - x + 3*x^2)^(3/2)/(13*(1 + 2*x)) - (11*asinh((1 - 6*x)/sqrt(23)))/(6*sqrt(3)) + (17*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(8*sqrt(13))]
    @test_int [(sqrt(2 - x + 3*x^2)*(1 + 3*x + 4*x^2))/(1 + 2*x)^3, x, 7, (11*(7 + 10*x)*sqrt(2 - x + 3*x^2))/(104*(1 + 2*x)) - (2 - x + 3*x^2)^(3/2)/(26*(1 + 2*x)^2) + (11*asinh((1 - 6*x)/sqrt(23)))/(8*sqrt(3)) - (803*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(208*sqrt(13))]

    @test_int [(1 + 2*x)^3*(2 - x + 3*x^2)^(3/2)*(1 + 3*x + 4*x^2), x, 9, (1255639*(1 - 6*x)*sqrt(2 - x + 3*x^2))/4478976 + (54593*(1 - 6*x)*(2 - x + 3*x^2)^(3/2))/559872 - (11*(283 - 5850*x)*(2 - x + 3*x^2)^(5/2))/58320 + (913/486)*x^2*(2 - x + 3*x^2)^(5/2) + (77/81)*x^3*(2 - x + 3*x^2)^(5/2) + (2/27)*(1 + 2*x)^4*(2 - x + 3*x^2)^(5/2) + (28879697*asinh((1 - 6*x)/sqrt(23)))/(8957952*sqrt(3))]
    @test_int [(1 + 2*x)^2*(2 - x + 3*x^2)^(3/2)*(1 + 3*x + 4*x^2), x, 7, (2093*(1 - 6*x)*sqrt(2 - x + 3*x^2))/27648 + (91*(1 - 6*x)*(2 - x + 3*x^2)^(3/2))/3456 + (8*(1 + 2*x)^2*(2 - x + 3*x^2)^(5/2))/63 + ((1 + 2*x)^3*(2 - x + 3*x^2)^(5/2))/12 + (13*(29 + 50*x)*(2 - x + 3*x^2)^(5/2))/2520 + (48139*asinh((1 - 6*x)/sqrt(23)))/(55296*sqrt(3))]
    @test_int [(1 + 2*x)^1*(2 - x + 3*x^2)^(3/2)*(1 + 3*x + 4*x^2), x, 6, (-1633*(1 - 6*x)*sqrt(2 - x + 3*x^2))/20736 - (71*(1 - 6*x)*(2 - x + 3*x^2)^(3/2))/2592 + (2*(1 + 2*x)^2*(2 - x + 3*x^2)^(5/2))/21 + ((109 + 102*x)*(2 - x + 3*x^2)^(5/2))/378 - (37559*asinh((1 - 6*x)/sqrt(23)))/(41472*sqrt(3))]
    @test_int [((2 - x + 3*x^2)^(3/2)*(1 + 3*x + 4*x^2))/(1 + 2*x)^1, x, 8, ((869 + 402*x)*sqrt(2 - x + 3*x^2))/1152 + ((7 + 30*x)*(2 - x + 3*x^2)^(3/2))/144 + (2*(2 - x + 3*x^2)^(5/2))/15 + (2203*asinh((1 - 6*x)/sqrt(23)))/(2304*sqrt(3)) - (13*sqrt(13)*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/32]
    @test_int [((2 - x + 3*x^2)^(3/2)*(1 + 3*x + 4*x^2))/(1 + 2*x)^2, x, 8, -((349 - 294*x)*sqrt(2 - x + 3*x^2))/192 - ((23 - 38*x)*(2 - x + 3*x^2)^(3/2))/104 - (2 - x + 3*x^2)^(5/2)/(13*(1 + 2*x)) - (2327*asinh((1 - 6*x)/sqrt(23)))/(384*sqrt(3)) + (25*sqrt(13)*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/32]
    @test_int [((2 - x + 3*x^2)^(3/2)*(1 + 3*x + 4*x^2))/(1 + 2*x)^3, x, 8, ((1858 - 771*x)*sqrt(2 - x + 3*x^2))/624 + ((151 + 122*x)*(2 - x + 3*x^2)^(3/2))/(312*(1 + 2*x)) - (2 - x + 3*x^2)^(5/2)/(26*(1 + 2*x)^2) + (1519*asinh((1 - 6*x)/sqrt(23)))/(192*sqrt(3)) - (1153*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(64*sqrt(13))]

    @test_int [(1 + 2*x)^3*(2 - x + 3*x^2)^(5/2)*(1 + 3*x + 4*x^2), x, 9, (2692081*(1 - 6*x)*sqrt(2 - x + 3*x^2))/11943936 + (117047*(1 - 6*x)*(2 - x + 3*x^2)^(3/2))/1492992 + (5089*(1 - 6*x)*(2 - x + 3*x^2)^(5/2))/155520 - ((26353 - 21350*x)*(2 - x + 3*x^2)^(7/2))/498960 + (133*(1 + 2*x)^2*(2 - x + 3*x^2)^(7/2))/1485 + (29*(1 + 2*x)^3*(2 - x + 3*x^2)^(7/2))/330 + (2*(1 + 2*x)^4*(2 - x + 3*x^2)^(7/2))/33 + (61917863*asinh((1 - 6*x)/sqrt(23)))/(23887872*sqrt(3))]
    @test_int [(1 + 2*x)^2*(2 - x + 3*x^2)^(5/2)*(1 + 3*x + 4*x^2), x, 8, (-154997*(1 - 6*x)*sqrt(2 - x + 3*x^2))/4478976 - (6739*(1 - 6*x)*(2 - x + 3*x^2)^(3/2))/559872 - (293*(1 - 6*x)*(2 - x + 3*x^2)^(5/2))/58320 + (37*(1 + 2*x)^2*(2 - x + 3*x^2)^(7/2))/405 + ((1 + 2*x)^3*(2 - x + 3*x^2)^(7/2))/15 + ((2731 + 3430*x)*(2 - x + 3*x^2)^(7/2))/17010 - (3564931*asinh((1 - 6*x)/sqrt(23)))/(8957952*sqrt(3))]
    @test_int [(1 + 2*x)^1*(2 - x + 3*x^2)^(5/2)*(1 + 3*x + 4*x^2), x, 7, (-1177025*(1 - 6*x)*sqrt(2 - x + 3*x^2))/5971968 - (51175*(1 - 6*x)*(2 - x + 3*x^2)^(3/2))/746496 - (445*(1 - 6*x)*(2 - x + 3*x^2)^(5/2))/15552 + (2*(1 + 2*x)^2*(2 - x + 3*x^2)^(7/2))/27 + ((137 + 122*x)*(2 - x + 3*x^2)^(7/2))/648 - (27071575*asinh((1 - 6*x)/sqrt(23)))/(11943936*sqrt(3))]
    @test_int [((2 - x + 3*x^2)^(5/2)*(1 + 3*x + 4*x^2))/(1 + 2*x)^1, x, 9, ((221999 - 17850*x)*sqrt(2 - x + 3*x^2))/82944 + ((2449 + 2154*x)*(2 - x + 3*x^2)^(3/2))/10368 + ((29 + 150*x)*(2 - x + 3*x^2)^(5/2))/1080 + (2*(2 - x + 3*x^2)^(7/2))/21 + (944521*asinh((1 - 6*x)/sqrt(23)))/(165888*sqrt(3)) - (169*sqrt(13)*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/128]
    @test_int [((2 - x + 3*x^2)^(5/2)*(1 + 3*x + 4*x^2))/(1 + 2*x)^2, x, 9, (-11*(4727 - 3090*x)*sqrt(2 - x + 3*x^2))/6912 - (11*(67 - 78*x)*(2 - x + 3*x^2)^(3/2))/864 - (11*(37 - 60*x)*(2 - x + 3*x^2)^(5/2))/2340 - (2 - x + 3*x^2)^(7/2)/(13*(1 + 2*x)) - (315623*asinh((1 - 6*x)/sqrt(23)))/(13824*sqrt(3)) + (429*sqrt(13)*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/128]
    @test_int [((2 - x + 3*x^2)^(5/2)*(1 + 3*x + 4*x^2))/(1 + 2*x)^3, x, 9, ((21317 - 10470*x)*sqrt(2 - x + 3*x^2))/1536 + ((1227 - 838*x)*(2 - x + 3*x^2)^(3/2))/832 + ((257 + 134*x)*(2 - x + 3*x^2)^(5/2))/(520*(1 + 2*x)) - (2 - x + 3*x^2)^(7/2)/(26*(1 + 2*x)^2) + (118423*asinh((1 - 6*x)/sqrt(23)))/(3072*sqrt(3)) - (1631*sqrt(13)*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/256]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(g + h*x)^3*(d + e*x + f*x^2)/sqrt(a + b*x + c*x^2), x, 6, ((63*b^2*f*h^2 - 2*c*h*(24*b*f*g + 35*b*e*h + 32*a*f*h) - c^2*(12*f*g^2 - 20*h*(3*e*g + 4*d*h)))*(g + h*x)^2*sqrt(a + b*x + c*x^2))/(240*c^3*h) - ((9*b*f*h + 2*c*(f*g - 5*e*h))*(g + h*x)^3*sqrt(a + b*x + c*x^2))/(40*c^2*h) + (f*(g + h*x)^4*sqrt(a + b*x + c*x^2))/(5*c*h) + (1/(1920*c^5*h))*((945*b^4*f*h^4 - 64*c^4*g^2*(3*f*g^2 - 5*h*(3*e*g + 16*d*h)) - 210*b^2*c*h^3*(14*a*f*h + 5*b*(3*f*g + e*h)) + 8*c^2*h^2*(128*a^2*f*h^2 + 275*a*b*h*(3*f*g + e*h) + 3*b^2*(129*f*g^2 + 50*h*(3*e*g + d*h))) - 16*c^3*h*(16*a*h*(13*f*g^2 + 5*h*(3*e*g + d*h)) + b*g*(39*f*g^2 + 5*h*(47*e*g + 54*d*h))) - 2*c*h*(315*b^3*f*h^3 - 14*b*c*h^2*(39*b*f*g + 25*b*e*h + 46*a*f*h) + 16*c^3*g*(3*f*g^2 - 5*h*(3*e*g + 10*d*h)) + 8*c^2*h*(a*h*(71*f*g + 45*e*h) + b*(21*f*g^2 + 80*e*g*h + 50*d*h^2)))*x)*sqrt(a + b*x + c*x^2)) + (1/(256*c^(11/2)))*((256*c^5*d*g^3 - 63*b^5*f*h^3 + 70*b^3*c*h^2*(3*b*f*g + b*e*h + 4*a*f*h) - 80*b*c^2*h*(3*a^2*f*h^2 + 3*a*b*h*(3*f*g + e*h) + b^2*(3*f*g^2 + 3*e*g*h + d*h^2)) - 128*c^4*g*(b*g*(e*g + 3*d*h) + a*(f*g^2 + 3*h*(e*g + d*h))) + 96*c^3*(a^2*h^2*(3*f*g + e*h) + b^2*g*(f*g^2 + 3*h*(e*g + d*h)) + 2*a*b*h*(3*f*g^2 + h*(3*e*g + d*h))))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))]
    @test_int [(g + h*x)^2*(d + e*x + f*x^2)/sqrt(a + b*x + c*x^2), x, 5, -(((2*c*f*g - 8*c*e*h + 7*b*f*h)*(g + h*x)^2*sqrt(a + b*x + c*x^2))/(24*c^2*h)) + (f*(g + h*x)^3*sqrt(a + b*x + c*x^2))/(4*c*h) - (1/(192*c^4*h))*((105*b^3*f*h^3 + 32*c^3*g*(f*g^2 - 4*h*(e*g + 3*d*h)) - 20*b*c*h^2*(11*a*f*h + 6*b*(2*f*g + e*h)) + 8*c^2*h*(16*a*h*(2*f*g + e*h) + b*(11*f*g^2 + 18*h*(2*e*g + d*h))) - 2*c*h*(35*b^2*f*h^2 - 4*c*h*(6*b*f*g + 10*b*e*h + 9*a*f*h) - 8*c^2*(f*g^2 - 2*h*(2*e*g + 3*d*h)))*x)*sqrt(a + b*x + c*x^2)) + ((128*c^4*d*g^2 + 35*b^4*f*h^2 - 40*b^2*c*h*(2*b*f*g + b*e*h + 3*a*f*h) - 64*c^3*(b*g*(e*g + 2*d*h) + a*(f*g^2 + 2*e*g*h + d*h^2)) + 48*c^2*(a^2*f*h^2 + 2*a*b*h*(2*f*g + e*h) + b^2*(f*g^2 + 2*e*g*h + d*h^2)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(128*c^(9/2))]
    @test_int [(g + h*x)^1*(d + e*x + f*x^2)/sqrt(a + b*x + c*x^2), x, 4, (f*(g + h*x)^2*sqrt(a + b*x + c*x^2))/(3*c*h) + ((15*b^2*f*h^2 - 8*c^2*(f*g^2 - 3*h*(e*g + d*h)) - 2*c*h*(8*a*f*h + 9*b*(f*g + e*h)) - 2*c*h*(2*c*f*g - 6*c*e*h + 5*b*f*h)*x)*sqrt(a + b*x + c*x^2))/(24*c^3*h) + ((16*c^3*d*g - 5*b^3*f*h - 8*c^2*(b*e*g + a*f*g + b*d*h + a*e*h) + 6*b*c*(b*f*g + b*e*h + 2*a*f*h))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(16*c^(7/2))]
    @test_int [(g + h*x)^0*(d + e*x + f*x^2)/sqrt(a + b*x + c*x^2), x, 4, ((4*c*e - 3*b*f)*sqrt(a + b*x + c*x^2))/(4*c^2) + (f*x*sqrt(a + b*x + c*x^2))/(2*c) + ((8*c^2*d + 3*b^2*f - 4*c*(b*e + a*f))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(8*c^(5/2))]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^1*sqrt(a + b*x + c*x^2)), x, 6, (f*sqrt(a + b*x + c*x^2))/(c*h) - ((2*c*f*g - 2*c*e*h + b*f*h)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(2*c^(3/2)*h^2) + ((f*g^2 - h*(e*g - d*h))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(h^2*sqrt(c*g^2 - b*g*h + a*h^2))]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^2*sqrt(a + b*x + c*x^2)), x, 6, -(((f*g^2 - h*(e*g - d*h))*sqrt(a + b*x + c*x^2))/(h*(c*g^2 - b*g*h + a*h^2)*(g + h*x))) + (f*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(sqrt(c)*h^2) - ((2*c*(f*g^3 - d*g*h^2) + h*(2*a*h*(2*f*g - e*h) - b*(3*f*g^2 - e*g*h - d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(2*h^2*(c*g^2 - b*g*h + a*h^2)^(3/2))]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^3*sqrt(a + b*x + c*x^2)), x, 4, -(((f*g^2 - h*(e*g - d*h))*sqrt(a + b*x + c*x^2))/(2*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^2)) + ((2*c*g*(f*g^2 + h*(e*g - 3*d*h)) + h*(4*a*h*(2*f*g - e*h) - b*(5*f*g^2 - e*g*h - 3*d*h^2)))*sqrt(a + b*x + c*x^2))/(4*h*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)) + ((8*c^2*d*g^2 + 8*a^2*f*h^2 - 4*a*b*h*(2*f*g + e*h) + b^2*(3*f*g^2 + e*g*h + 3*d*h^2) - 4*c*(b*g*(e*g + 2*d*h) + a*(f*g^2 - 3*e*g*h + d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(8*(c*g^2 - b*g*h + a*h^2)^(5/2))]

    @test_int [(g + h*x)^3*(d + e*x + f*x^2)/(a + b*x + c*x^2)^(3/2), x, 5, (2*(c*(2*a*e - b*(d + (a*f)/c)) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x)*(g + h*x)^3)/(c*(b^2 - 4*a*c)*sqrt(a + b*x + c*x^2)) + ((12*c^2*d - 6*b*c*e + 7*b^2*f - 16*a*c*f)*h*(g + h*x)^2*sqrt(a + b*x + c*x^2))/(3*c^2*(b^2 - 4*a*c)) + (1/(24*c^4*(b^2 - 4*a*c)))*(h*(192*c^4*d*g^2 + 105*b^4*f*h^2 - 10*b^2*c*h*(46*a*f*h + 9*b*(3*f*g + e*h)) - 16*c^3*(3*b*g*(2*e*g + 3*d*h) + 4*a*(7*f*g^2 + 9*e*g*h + 3*d*h^2)) + 8*c^2*(32*a^2*f*h^2 + 39*a*b*h*(3*f*g + e*h) + b^2*(20*f*g^2 + 9*h*(3*e*g + d*h))) + 2*c*h*(48*c^3*d*g - 35*b^3*f*h - 8*c^2*(3*b*e*g + 11*a*f*g + 3*b*d*h + 9*a*e*h) + 2*b*c*(17*b*f*g + 15*b*e*h + 58*a*f*h))*x)*sqrt(a + b*x + c*x^2)) - ((35*b^3*f*h^3 - 30*b*c*h^2*(3*b*f*g + b*e*h + 2*a*f*h) - 16*c^3*g*(f*g^2 + 3*h*(e*g + d*h)) + 24*c^2*h*(a*h*(3*f*g + e*h) + b*(3*f*g^2 + 3*e*g*h + d*h^2)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(16*c^(9/2))]
    @test_int [(g + h*x)^2*(d + e*x + f*x^2)/(a + b*x + c*x^2)^(3/2), x, 4, (2*(c*(2*a*e - b*(d + (a*f)/c)) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x)*(g + h*x)^2)/(c*(b^2 - 4*a*c)*sqrt(a + b*x + c*x^2)) + (h*(32*c^3*d*g - 15*b^3*f*h - 8*c^2*(2*b*e*g + 8*a*f*g + b*d*h + 4*a*e*h) + 4*b*c*(6*b*f*g + 3*b*e*h + 13*a*f*h) + 2*c*(8*c^2*d - 4*b*c*e + 5*b^2*f - 12*a*c*f)*h*x)*sqrt(a + b*x + c*x^2))/(4*c^3*(b^2 - 4*a*c)) + ((15*b^2*f*h^2 - 12*c*h*(2*b*f*g + b*e*h + a*f*h) + 8*c^2*(f*g^2 + h*(2*e*g + d*h)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(8*c^(7/2))]
    @test_int [(g + h*x)^1*(d + e*x + f*x^2)/(a + b*x + c*x^2)^(3/2), x, 4, If(13>=8, (2*(c*(2*a*e - b*(d + (a*f)/c)) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x)*(g + h*x))/(c*(b^2 - 4*a*c)*sqrt(a + b*x + c*x^2)) + ((4*c^2*d - 2*b*c*e + 3*b^2*f - 8*a*c*f)*h*sqrt(a + b*x + c*x^2))/(c^2*(b^2 - 4*a*c)) - ((3*b*f*h - 2*c*(f*g + e*h))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(2*c^(5/2)), (2*(c*(2*a*e - b*(d + (a*f)/c)) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x)*(g + h*x))/(c*(b^2 - 4*a*c)*sqrt(a + b*x + c*x^2)) + ((4*c^2*d + 3*b^2*f - 2*c*(b*e + 4*a*f))*h*sqrt(a + b*x + c*x^2))/(c^2*(b^2 - 4*a*c)) - ((3*b*f*h - 2*c*(f*g + e*h))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(2*c^(5/2)))]
    @test_int [(g + h*x)^0*(d + e*x + f*x^2)/(a + b*x + c*x^2)^(3/2), x, 4, (2*(c*(2*a*e - b*(d + (a*f)/c)) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x))/(c*(b^2 - 4*a*c)*sqrt(a + b*x + c*x^2)) + (f*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/c^(3/2)]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^1*(a + b*x + c*x^2)^(3/2)), x, 4, (2*(b^2*d*h - b*(c*d*g + a*f*g + a*e*h) + 2*a*(c*e*g - c*d*h + a*f*h) - (2*c^2*d*g + b*f*(b*g - a*h) - c*(b*e*g + 2*a*f*g + b*d*h - 2*a*e*h))*x))/((b^2 - 4*a*c)*(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2)) + ((f*g^2 - h*(e*g - d*h))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(c*g^2 - b*g*h + a*h^2)^(3/2)]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^2*(a + b*x + c*x^2)^(3/2)), x, 4, -((1/((b^2 - 4*a*c)*(c*g^2 - b*g*h + a*h^2)^2*sqrt(a + b*x + c*x^2)))*(2*(b^3*d*h^2 - b^2*h*(2*c*d*g + a*e*h) - 2*a*c*(c*g*(e*g - 2*d*h) + a*h*(2*f*g - e*h)) + b*(c^2*d*g^2 + a^2*f*h^2 + a*c*(f*g^2 + 2*e*g*h - 3*d*h^2)) + c*(2*c^2*d*g^2 + 2*a^2*f*h^2 - a*b*h*(2*f*g + e*h) + b^2*(f*g^2 + d*h^2) - c*(b*g*(e*g + 2*d*h) + 2*a*(f*g^2 - 2*e*g*h + d*h^2)))*x))) - (h*(f*g^2 - h*(e*g - d*h))*sqrt(a + b*x + c*x^2))/((c*g^2 - b*g*h + a*h^2)^2*(g + h*x)) + ((2*c*g*(f*g^2 - h*(2*e*g - 3*d*h)) - h*(2*a*h*(2*f*g - e*h) - b*(f*g^2 + e*g*h - 3*d*h^2)))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(2*(c*g^2 - b*g*h + a*h^2)^(5/2))]
    @test_int [(d + e*x + f*x^2)/((g + h*x)^3*(a + b*x + c*x^2)^(3/2)), x, 5, (1/((b^2 - 4*a*c)*(c*g^2 - b*g*h + a*h^2)^3*sqrt(a + b*x + c*x^2)))*(2*(b^4*d*h^3 - b^3*h^2*(3*c*d*g + a*e*h) + b^2*h*(3*c^2*d*g^2 + a^2*f*h^2 + a*c*h*(3*e*g - 4*d*h)) - b*c*(c^2*d*g^3 + 3*a^2*h^2*(f*g - e*h) + a*c*g*(f*g^2 + 3*e*g*h - 9*d*h^2)) - 2*a*c*(a^2*f*h^3 - c^2*g^2*(e*g - 3*d*h) - a*c*h*(3*f*g^2 - 3*e*g*h + d*h^2)) - c*(2*c^3*d*g^3 - b*(b^2*d - a*b*e + a^2*f)*h^3 - c^2*g*(b*g*(e*g + 3*d*h) + 2*a*(f*g^2 - 3*e*g*h + 3*d*h^2)) + c*(2*a^2*h^2*(3*f*g - e*h) - 3*a*b*h*(f*g^2 + e*g*h - d*h^2) + b^2*(f*g^3 + 3*d*g*h^2)))*x)) - (h*(f*g^2 - h*(e*g - d*h))*sqrt(a + b*x + c*x^2))/(2*(c*g^2 - b*g*h + a*h^2)^2*(g + h*x)^2) - (h*(2*c*g*(3*f*g^2 - h*(5*e*g - 7*d*h)) - h*(4*a*h*(2*f*g - e*h) - b*(f*g^2 + 3*e*g*h - 7*d*h^2)))*sqrt(a + b*x + c*x^2))/(4*(c*g^2 - b*g*h + a*h^2)^3*(g + h*x)) + ((8*c^2*g^2*(f*g^2 - 3*e*g*h + 6*d*h^2) + h^2*(8*a^2*f*h^2 + 4*a*b*h*(2*f*g - 3*e*h) - b^2*(f*g^2 + 3*h*(e*g - 5*d*h))) - 4*c*h*(a*h*(11*f*g^2 - 9*e*g*h + 3*d*h^2) - b*g*(2*f*g^2 + 3*h*(e*g - 4*d*h))))*atanh((b*g - 2*a*h + (2*c*g - b*h)*x)/(2*sqrt(c*g^2 - b*g*h + a*h^2)*sqrt(a + b*x + c*x^2))))/(8*(c*g^2 - b*g*h + a*h^2)^(7/2))]

    @test_int [((1 + 2*x)^3*(1 + 3*x + 4*x^2))/sqrt(2 - x + 3*x^2), x, 6, (44*(1 + 2*x)^2*sqrt(2 - x + 3*x^2))/135 + (19*(1 + 2*x)^3*sqrt(2 - x + 3*x^2))/60 + (2*(1 + 2*x)^4*sqrt(2 - x + 3*x^2))/15 - ((24897 + 6298*x)*sqrt(2 - x + 3*x^2))/3240 + (9211*asinh((1 - 6*x)/sqrt(23)))/(1296*sqrt(3))]
    @test_int [((1 + 2*x)^2*(1 + 3*x + 4*x^2))/sqrt(2 - x + 3*x^2), x, 5, (-143*(3 - 2*x)*sqrt(2 - x + 3*x^2))/324 + (11*(1 + 2*x)^2*sqrt(2 - x + 3*x^2))/27 + ((1 + 2*x)^3*sqrt(2 - x + 3*x^2))/6 + (4147*asinh((1 - 6*x)/sqrt(23)))/(648*sqrt(3))]
    @test_int [((1 + 2*x)^1*(1 + 3*x + 4*x^2))/sqrt(2 - x + 3*x^2), x, 4, (2*(1 + 2*x)^2*sqrt(2 - x + 3*x^2))/9 + ((69 + 62*x)*sqrt(2 - x + 3*x^2))/54 + (251*asinh((1 - 6*x)/sqrt(23)))/(108*sqrt(3))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^1*sqrt(2 - x + 3*x^2)), x, 6, (2*sqrt(2 - x + 3*x^2))/3 - (5*asinh((1 - 6*x)/sqrt(23)))/(6*sqrt(3)) - atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2)))/(2*sqrt(13))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^2*sqrt(2 - x + 3*x^2)), x, 6, -sqrt(2 - x + 3*x^2)/(13*(1 + 2*x)) - asinh((1 - 6*x)/sqrt(23))/sqrt(3) + (9*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(26*sqrt(13))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^3*sqrt(2 - x + 3*x^2)), x, 4, -sqrt(2 - x + 3*x^2)/(26*(1 + 2*x)^2) + (7*sqrt(2 - x + 3*x^2))/(169*(1 + 2*x)) - (581*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(676*sqrt(13))]

    @test_int [((1 + 2*x)^3*(1 + 3*x + 4*x^2))/(2 - x + 3*x^2)^(3/2), x, 6, (2*(12839 - 3871*x))/(1863*sqrt(2 - x + 3*x^2)) + (746/81)*sqrt(2 - x + 3*x^2) + (412/81)*x*sqrt(2 - x + 3*x^2) + (32/27)*x^2*sqrt(2 - x + 3*x^2) + (353*asinh((1 - 6*x)/sqrt(23)))/(81*sqrt(3))]
    @test_int [((1 + 2*x)^2*(1 + 3*x + 4*x^2))/(2 - x + 3*x^2)^(3/2), x, 5, (2*(1249 - 2273*x))/(621*sqrt(2 - x + 3*x^2)) + (112/27)*sqrt(2 - x + 3*x^2) + (8/9)*x*sqrt(2 - x + 3*x^2) - (64*asinh((1 - 6*x)/sqrt(23)))/(9*sqrt(3))]
    @test_int [((1 + 2*x)^1*(1 + 3*x + 4*x^2))/(2 - x + 3*x^2)^(3/2), x, 4, -((2*(73 + 367*x))/(207*sqrt(2 - x + 3*x^2))) + (8/9)*sqrt(2 - x + 3*x^2) - (14*asinh((1 - 6*x)/sqrt(23)))/(3*sqrt(3))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^1*(2 - x + 3*x^2)^(3/2)), x, 4, (-2*(101 - 77*x))/(299*sqrt(2 - x + 3*x^2)) - (2*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(13*sqrt(13))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^2*(2 - x + 3*x^2)^(3/2)), x, 4, -((2*(197 - 837*x))/(3887*sqrt(2 - x + 3*x^2))) - (4*sqrt(2 - x + 3*x^2))/(169*(1 + 2*x)) + (2*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(169*sqrt(13))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^3*(2 - x + 3*x^2)^(3/2)), x, 5, (2*(2363 + 3693*x))/(50531*sqrt(2 - x + 3*x^2)) - (2*sqrt(2 - x + 3*x^2))/(169*(1 + 2*x)^2) - (4*sqrt(2 - x + 3*x^2))/(2197*(1 + 2*x)) - (487*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(2197*sqrt(13))]

    @test_int [((1 + 2*x)^3*(1 + 3*x + 4*x^2))/(2 - x + 3*x^2)^(5/2), x, 5, (2*(12839 - 3871*x))/(5589*(2 - x + 3*x^2)^(3/2)) - (28*(35809 + 42240*x))/(128547*sqrt(2 - x + 3*x^2)) + (32/27)*sqrt(2 - x + 3*x^2) - (296*asinh((1 - 6*x)/sqrt(23)))/(27*sqrt(3))]
    @test_int [((1 + 2*x)^2*(1 + 3*x + 4*x^2))/(2 - x + 3*x^2)^(5/2), x, 5, (2*(1249 - 2273*x))/(1863*(2 - x + 3*x^2)^(3/2)) - (8*(23257 - 1473*x))/(42849*sqrt(2 - x + 3*x^2)) - (16*asinh((1 - 6*x)/sqrt(23)))/(9*sqrt(3))]
    @test_int [((1 + 2*x)^1*(1 + 3*x + 4*x^2))/(2 - x + 3*x^2)^(5/2), x, 2, -((2*(73 + 367*x))/(621*(2 - x + 3*x^2)^(3/2))) - (4*(3889 - 4290*x))/(14283*sqrt(2 - x + 3*x^2))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^1*(2 - x + 3*x^2)^(5/2)), x, 5, (-2*(101 - 77*x))/(897*(2 - x + 3*x^2)^(3/2)) - (4*(691 - 13668*x))/(268203*sqrt(2 - x + 3*x^2)) - (8*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(169*sqrt(13))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^2*(2 - x + 3*x^2)^(5/2)), x, 5, -((2*(197 - 837*x))/(11661*(2 - x + 3*x^2)^(3/2))) - (24*(841 - 6633*x))/(1162213*sqrt(2 - x + 3*x^2)) - (16*sqrt(2 - x + 3*x^2))/(2197*(1 + 2*x)) - (56*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(2197*sqrt(13))]
    @test_int [(1 + 3*x + 4*x^2)/((1 + 2*x)^3*(2 - x + 3*x^2)^(5/2)), x, 6, (2*(2363 + 3693*x))/(151593*(2 - x + 3*x^2)^(3/2)) + (12*(25771 + 103526*x))/(15108769*sqrt(2 - x + 3*x^2)) - (8*sqrt(2 - x + 3*x^2))/(2197*(1 + 2*x)^2) - (144*sqrt(2 - x + 3*x^2))/(28561*(1 + 2*x)) - (2084*atanh((9 - 8*x)/(2*sqrt(13)*sqrt(2 - x + 3*x^2))))/(28561*sqrt(13))]

    @test_int [(d + e*x + f*x^2)/((g + h*x)*(-c*g^2 + b*g*h + b*h^2*x + c*h^2*x^2)^(3/2)), x, 3, -(f/(c*h^3*sqrt((-g)*(c*g - b*h) + b*h^2*x + c*h^2*x^2))) + ((6*b*c*e*h^2 - 3*b^2*f*h^2 + 4*c^2*(f*g^2 - h*(e*g + 2*d*h)))*(b + 2*c*x))/(3*c*h^2*(2*c*g - b*h)^3*sqrt((-g)*(c*g - b*h) + b*h^2*x + c*h^2*x^2)) + (2*(f*g^2 - e*g*h + d*h^2))/(3*h^3*(2*c*g - b*h)*(g + h*x)*sqrt((-g)*(c*g - b*h) + b*h^2*x + c*h^2*x^2))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(A+B*x+C*x^2)*(d+e*x)^(m/2)*(a+b*x+c*x^2)^(p/2)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(d + e*x)^(1/2)*sqrt(a + b*x + c*x^2)*(A + B*x + C*x^2), x, 8, (1/(315*c^3*e^3))*(2*sqrt(d + e*x)*(8*b^3*C*e^3 - 3*b*c*e^2*(b*C*d + 4*b*B*e - a*C*e) + c^3*d*(8*C*d^2 - 3*e*(4*B*d - 7*A*e)) + 3*c^2*e*(a*e*(C*d - 5*B*e) - b*(C*d^2 - 2*B*d*e - 7*A*e^2)) + 3*c*e*(8*b^2*C*e^2 - c*e*(b*C*d + 12*b*B*e + 7*a*C*e) - c^2*(2*C*d^2 - 3*e*(B*d + 7*A*e)))*x)*sqrt(a + b*x + c*x^2)) - (2*(2*c*C*d - 3*B*c*e + 2*b*C*e)*sqrt(d + e*x)*(a + b*x + c*x^2)^(3/2))/(21*c^2*e) + (2*C*(d + e*x)^(3/2)*(a + b*x + c*x^2)^(3/2))/(9*c*e) + (1/(315*c^4*e^4*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)))*(sqrt(2)*sqrt(b^2 - 4*a*c)*(2*(4*c^2*d^2 - b^2*e^2 - (3/2)*c*e*(b*d - 2*a*e))*(8*b^2*C*e^2 - c*e*(b*C*d + 12*b*B*e + 7*a*C*e) - c^2*(2*C*d^2 - 3*e*(B*d + 7*A*e))) - 5*c*e*(2*c*d - b*e)*(6*b^2*C*d*e + c*e*(21*A*c*d - 5*a*C*d - 3*a*B*e) + b*(2*a*C*e^2 - c*d*(C*d + 9*B*e))))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e)))) - (1/(315*c^4*e^4*sqrt(d + e*x)*sqrt(a + b*x + c*x^2)))*(2*sqrt(2)*sqrt(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)*(8*b^3*C*e^3 - 3*c^2*e^2*(b*B*d + 2*a*C*d - 7*A*b*e - 10*a*B*e) + 3*b*c*e^2*(b*C*d - 4*b*B*e - 9*a*C*e) - 2*c^3*d*(8*C*d^2 - 3*e*(4*B*d - 7*A*e)))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))]
    @test_int [sqrt(a + b*x + c*x^2)*(A + B*x + C*x^2)/(d + e*x)^(1/2), x, 7, -((2*sqrt(d + e*x)*(5*c*e*(3*b*C*d - 7*A*c*e + a*C*e) - (4*c*d - b*e)*(6*c*C*d - 7*B*c*e + 4*b*C*e) + 3*c*e*(6*c*C*d - 7*B*c*e + 4*b*C*e)*x)*sqrt(a + b*x + c*x^2))/(105*c^2*e^3)) + (2*C*sqrt(d + e*x)*(a + b*x + c*x^2)^(3/2))/(7*c*e) + (1/(105*c^3*e^4*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)))*(sqrt(2)*sqrt(b^2 - 4*a*c)*(5*c*e*(2*c*d - b*e)*(3*b*C*d - 7*A*c*e + a*C*e) - (6*c*C*d - 7*B*c*e + 4*b*C*e)*(8*c^2*d^2 - 2*b^2*e^2 - 3*c*e*(b*d - 2*a*e)))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e)))) + (1/(105*c^3*e^4*sqrt(d + e*x)*sqrt(a + b*x + c*x^2)))*(2*sqrt(2)*sqrt(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)*(4*b^2*C*e^2 + c*e*(8*b*C*d - 7*b*B*e - 10*a*C*e) + c^2*(48*C*d^2 - 14*e*(4*B*d - 5*A*e)))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))]
    @test_int [sqrt(a + b*x + c*x^2)*(A + B*x + C*x^2)/(d + e*x)^(3/2), x, 7, -((2*sqrt(d + e*x)*(b*C*e^2*(b*d - a*e) + c^2*d*(24*C*d^2 - 5*e*(4*B*d - 3*A*e)) + c*e*(a*e*(9*C*d - 5*B*e) - 5*b*(5*C*d^2 - 4*B*d*e + 3*A*e^2)) + 3*c*e^2*(5*B*c*d + b*C*d - (6*c*C*d^2)/e - 5*A*c*e - a*C*e)*x)*sqrt(a + b*x + c*x^2))/(15*c*e^3*(c*d^2 - b*d*e + a*e^2))) - (2*(C*d^2 - e*(B*d - A*e))*(a + b*x + c*x^2)^(3/2))/(e*(c*d^2 - b*d*e + a*e^2)*sqrt(d + e*x)) - (sqrt(2)*sqrt(b^2 - 4*a*c)*(2*b^2*C*e^2 + c*e*(8*b*C*d - 5*b*B*e - 6*a*C*e) - c^2*(48*C*d^2 - 10*e*(4*B*d - 3*A*e)))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(15*c^2*e^4*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) + (1/(15*c^2*e^4*sqrt(d + e*x)*sqrt(a + b*x + c*x^2)))*(2*sqrt(2)*sqrt(b^2 - 4*a*c)*(b*C*e^2*(b*d - a*e) - 2*c^2*d*(24*C*d^2 - 5*e*(4*B*d - 3*A*e)) - c*e*(2*a*e*(9*C*d - 5*B*e) - b*(32*C*d^2 - 5*e*(5*B*d - 3*A*e))))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))]
    @test_int [sqrt(a + b*x + c*x^2)*(A + B*x + C*x^2)/(d + e*x)^(5/2), x, 7, -((2*(e*(b*d - a*e)*(7*C*d - 3*B*e) - c*d*(8*C*d^2 - e*(4*B*d - A*e)) + e^2*(B*c*d + b*C*d - (2*c*C*d^2)/e - A*c*e - a*C*e)*x)*sqrt(a + b*x + c*x^2))/(3*e^3*(c*d^2 - b*d*e + a*e^2)*sqrt(d + e*x))) - (2*(C*d^2 - e*(B*d - A*e))*(a + b*x + c*x^2)^(3/2))/(3*e*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^(3/2)) + (sqrt(2)*sqrt(b^2 - 4*a*c)*(2*(4*c*d - (b*e)/2)*(B*c*d + b*C*d - (2*c*C*d^2)/e - A*c*e - a*C*e) + 6*c*(b*d*(C*d - B*e) + e*(A*c*d - a*C*d + a*B*e)))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(3*c*e^3*(c*d^2 - b*d*e + a*e^2)*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) - (2*sqrt(2)*sqrt(b^2 - 4*a*c)*(e*(8*b*C*d - 3*b*B*e - 2*a*C*e) - 2*c*(8*C*d^2 - e*(4*B*d - A*e)))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(3*c*e^4*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))]
    @test_int [sqrt(a + b*x + c*x^2)*(A + B*x + C*x^2)/(d + e*x)^(7/2), x, 7, -((1/(15*e^3*(c*d^2 - b*d*e + a*e^2)^2*(d + e*x)^(3/2)))*(2*(c^2*d^3*(24*C*d^2 - e*(4*B*d + A*e)) + e^2*(15*b^2*C*d^3 + 5*a^2*e^2*(C*d + B*e) - a*b*e*(22*C*d^2 + 3*B*d*e + 2*A*e^2)) - c*d*e*(b*d*(41*C*d^2 - 6*B*d*e + A*e^2) - a*e*(37*C*d^2 - 7*B*d*e + 7*A*e^2)) + e*(5*c^2*d^2*(6*C*d^2 - e*(B*d + A*e)) + e^2*(15*a^2*C*e^2 - 5*a*b*e*(8*C*d - B*e) + b^2*(23*C*d^2 - 3*B*d*e - 2*A*e^2)) - c*e*(5*b*d*(11*C*d^2 - 2*B*d*e - A*e^2) - a*e*(53*C*d^2 - 13*B*d*e + 3*A*e^2)))*x)*sqrt(a + b*x + c*x^2))) - (2*(C*d^2 - e*(B*d - A*e))*(a + b*x + c*x^2)^(3/2))/(5*e*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^(5/2)) + (sqrt(2)*sqrt(b^2 - 4*a*c)*(2*c^2*d^2*(24*C*d^2 - e*(4*B*d + A*e)) + e^2*(30*a^2*C*e^2 - 5*a*b*e*(14*C*d - B*e) + b^2*(38*C*d^2 - 3*B*d*e - 2*A*e^2)) - c*e*(b*d*(88*C*d^2 - 13*B*d*e - 2*A*e^2) - 2*a*e*(43*C*d^2 - 8*B*d*e + 3*A*e^2)))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(15*e^4*(c*d^2 - b*d*e + a*e^2)^2*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) - (1/(15*c*e^4*(c*d^2 - b*d*e + a*e^2)*sqrt(d + e*x)*sqrt(a + b*x + c*x^2)))*(2*sqrt(2)*sqrt(b^2 - 4*a*c)*(15*b*C*e^2*(b*d - a*e) + 2*c^2*d*(24*C*d^2 - e*(4*B*d + A*e)) + c*e*(10*a*e*(5*C*d - B*e) - b*(64*C*d^2 - 9*B*d*e - A*e^2)))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))]
    @test_int [sqrt(a + b*x + c*x^2)*(A + B*x + C*x^2)/(d + e*x)^(9/2), x, 8, (1/(105*e^3*(c*d^2 - b*d*e + a*e^2)^3*sqrt(d + e*x)))*(2*(2*c^3*d^3*(24*C*d^2 + e*(4*B*d + 3*A*e)) - b*e^3*(35*a^2*C*e^2 - 14*a*b*e*(3*C*d + B*e) + b^2*(15*C*d^2 + 6*B*d*e + 8*A*e^2)) + c^2*d*e*(2*a*e*(69*C*d^2 + e*(15*B*d - 29*A*e)) - b*d*(128*C*d^2 + e*(19*B*d + 9*A*e))) + c*e^2*(14*a^2*e^2*(11*C*d - 3*B*e) - a*b*e*(237*C*d^2 + e*(B*d - 29*A*e)) + b^2*d*(103*C*d^2 + e*(9*B*d + 19*A*e))))*sqrt(a + b*x + c*x^2)) - (1/(105*e^3*(c*d^2 - b*d*e + a*e^2)^2*(d + e*x)^(5/2)))*(2*(c^2*d^3*(24*C*d^2 + e*(4*B*d + 3*A*e)) - e^2*(7*a^2*e^2*(C*d - 3*B*e) - b^2*d*(15*C*d^2 + 6*B*d*e + 8*A*e^2) + a*b*e*(12*C*d^2 + 23*B*d*e + 12*A*e^2)) - c*d*e*(b*d*(43*C*d^2 + 6*B*d*e + 15*A*e^2) - a*e*(33*C*d^2 + 9*B*d*e + 19*A*e^2)) + e*(7*c^2*d^2*(6*C*d^2 + e*(B*d - 3*A*e)) + e^2*(35*a^2*C*e^2 - 7*a*b*e*(12*C*d - B*e) + b^2*(45*C*d^2 - 3*B*d*e - 4*A*e^2)) + c*e*(a*e*(93*C*d^2 - 9*B*d*e - 5*A*e^2) - b*(91*C*d^3 - 21*A*d*e^2)))*x)*sqrt(a + b*x + c*x^2)) - (2*(C*d^2 - e*(B*d - A*e))*(a + b*x + c*x^2)^(3/2))/(7*e*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^(7/2)) - (sqrt(2)*sqrt(b^2 - 4*a*c)*(2*c^3*d^3*(24*C*d^2 + e*(4*B*d + 3*A*e)) - b*e^3*(35*a^2*C*e^2 - 14*a*b*e*(3*C*d + B*e) + b^2*(15*C*d^2 + 6*B*d*e + 8*A*e^2)) + c^2*d*e*(2*a*e*(69*C*d^2 + e*(15*B*d - 29*A*e)) - b*d*(128*C*d^2 + e*(19*B*d + 9*A*e))) + c*e^2*(14*a^2*e^2*(11*C*d - 3*B*e) - a*b*e*(237*C*d^2 + e*(B*d - 29*A*e)) + b^2*d*(103*C*d^2 + e*(9*B*d + 19*A*e))))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(105*e^4*(c*d^2 - b*d*e + a*e^2)^3*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) + (2*sqrt(2)*sqrt(b^2 - 4*a*c)*(2*c^2*d^2*(24*C*d^2 + e*(4*B*d + 3*A*e)) + c*e*(2*a*e*(51*C*d^2 + e*(12*B*d - 5*A*e)) - b*d*(104*C*d^2 + 3*e*(5*B*d + 2*A*e))) + e^2*(70*a^2*C*e^2 - 7*a*b*e*(18*C*d + B*e) + b^2*(60*C*d^2 + e*(3*B*d + 4*A*e))))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(105*e^4*(c*d^2 - b*d*e + a*e^2)^2*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))]
    @test_int [sqrt(a + b*x + c*x^2)*(A + B*x + C*x^2)/(d + e*x)^(11/2), x, 9, (1/(315*e^3*(c*d^2 - b*d*e + a*e^2)^3*(d + e*x)^(3/2)))*(2*(2*c^3*d^3*(8*C*d^2 + e*(4*B*d + 5*A*e)) + 3*c^2*d*e*(2*a*e*(9*C*d^2 + 7*B*d*e - 9*A*e^2) - b*d*(16*C*d^2 + 7*B*d*e + 5*A*e^2)) + 3*c*e^2*(2*a^2*e^2*(17*C*d - 5*B*e) - a*b*e*(41*C*d^2 + 5*B*d*e - 9*A*e^2) + b^2*d*(15*C*d^2 + 3*B*d*e + 7*A*e^2)) - b*e^3*(21*a^2*C*e^2 - 6*a*b*e*(3*C*d + 2*B*e) + b^2*(5*C*d^2 + 4*B*d*e + 8*A*e^2)))*sqrt(a + b*x + c*x^2)) + (1/(315*e^3*(c*d^2 - b*d*e + a*e^2)^4*sqrt(d + e*x)))*(2*(2*c^4*d^4*(8*C*d^2 + e*(4*B*d + 5*A*e)) + 2*b^2*e^4*(21*a^2*C*e^2 - 6*a*b*e*(3*C*d + 2*B*e) + b^2*(5*C*d^2 + 4*B*d*e + 8*A*e^2)) - 6*c^2*e^2*(a*b*d*e*(30*C*d^2 - 5*B*d*e - 34*A*e^2) - a^2*e^2*(30*C*d^2 - 36*B*d*e + 7*A*e^2) - b^2*d^2*(11*C*d^2 + 3*B*d*e + 11*A*e^2)) - c*e^3*(126*a^3*C*e^3 - 3*a^2*b*e^2*(12*C*d + 29*B*e) - 6*a*b^2*e*(5*C*d^2 + 7*B*d*e - 12*A*e^2) + b^3*d*(20*C*d^2 + 25*B*d*e + 56*A*e^2)) + c^3*d^2*e*(6*a*e*(11*C*d^2 + 8*B*d*e - 34*A*e^2) - b*d*(56*C*d^2 + 5*e*(5*B*d + 4*A*e))))*sqrt(a + b*x + c*x^2)) - (1/(105*e^3*(c*d^2 - b*d*e + a*e^2)^2*(d + e*x)^(7/2)))*(2*(c^2*d^3*(8*C*d^2 + e*(4*B*d + 5*A*e)) - e^2*(3*a^2*e^2*(3*C*d - 5*B*e) - a*b*e*(2*C*d^2 - 17*B*d*e - 10*A*e^2) - b^2*d*(5*C*d^2 + 4*B*d*e + 8*A*e^2)) - c*d*e*(3*b*d*(5*C*d^2 + 2*B*d*e + 5*A*e^2) - a*e*(7*C*d^2 + 11*B*d*e + 13*A*e^2)) + e*(3*c^2*d^2*(6*C*d^2 + e*(3*B*d - 5*A*e)) + c*e*(a*e*(47*C*d^2 + B*d*e - 7*A*e^2) - 3*b*d*(15*C*d^2 + 2*B*d*e - 5*A*e^2)) + e^2*(21*a^2*C*e^2 - 3*a*b*e*(16*C*d - B*e) + b^2*(25*C*d^2 - e*(B*d + 2*A*e))))*x)*sqrt(a + b*x + c*x^2)) - (2*(C*d^2 - e*(B*d - A*e))*(a + b*x + c*x^2)^(3/2))/(9*e*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^(9/2)) - (sqrt(2)*sqrt(b^2 - 4*a*c)*(2*c^4*d^4*(8*C*d^2 + e*(4*B*d + 5*A*e)) + 2*b^2*e^4*(21*a^2*C*e^2 - 6*a*b*e*(3*C*d + 2*B*e) + b^2*(5*C*d^2 + 4*B*d*e + 8*A*e^2)) - 6*c^2*e^2*(a*b*d*e*(30*C*d^2 - 5*B*d*e - 34*A*e^2) - a^2*e^2*(30*C*d^2 - 36*B*d*e + 7*A*e^2) - b^2*d^2*(11*C*d^2 + 3*B*d*e + 11*A*e^2)) - c*e^3*(126*a^3*C*e^3 - 3*a^2*b*e^2*(12*C*d + 29*B*e) - 6*a*b^2*e*(5*C*d^2 + 7*B*d*e - 12*A*e^2) + b^3*d*(20*C*d^2 + 25*B*d*e + 56*A*e^2)) + c^3*d^2*e*(6*a*e*(11*C*d^2 + 8*B*d*e - 34*A*e^2) - b*d*(56*C*d^2 + 5*e*(5*B*d + 4*A*e))))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(315*e^4*(c*d^2 - b*d*e + a*e^2)^4*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) + (2*sqrt(2)*sqrt(b^2 - 4*a*c)*(2*c^3*d^3*(8*C*d^2 + e*(4*B*d + 5*A*e)) + 3*c^2*d*e*(2*a*e*(9*C*d^2 + 7*B*d*e - 9*A*e^2) - b*d*(16*C*d^2 + 7*B*d*e + 5*A*e^2)) + 3*c*e^2*(2*a^2*e^2*(17*C*d - 5*B*e) - a*b*e*(41*C*d^2 + 5*B*d*e - 9*A*e^2) + b^2*d*(15*C*d^2 + 3*B*d*e + 7*A*e^2)) - b*e^3*(21*a^2*C*e^2 - 6*a*b*e*(3*C*d + 2*B*e) + b^2*(5*C*d^2 + 4*B*d*e + 8*A*e^2)))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(315*e^4*(c*d^2 - b*d*e + a*e^2)^3*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(d + e*x)^(3/2)*(A + B*x + C*x^2)/(sqrt(a + b*x + c*x^2)), x, 8, (2*(24*b^2*C*e^2 - c*e*(15*b*C*d + 28*b*B*e + 25*a*C*e) - c^2*(6*C*d^2 - 7*e*(3*B*d + 5*A*e)))*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))/(105*c^3*e) - (2*(2*c*C*d - 7*B*c*e + 6*b*C*e)*(d + e*x)^(3/2)*sqrt(a + b*x + c*x^2))/(35*c^2*e) + (2*C*(d + e*x)^(5/2)*sqrt(a + b*x + c*x^2))/(7*c*e) - (1/(105*c^4*e^2*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)))*(sqrt(2)*sqrt(b^2 - 4*a*c)*(48*b^3*C*e^3 - 8*b*c*e^2*(9*b*C*d + 7*b*B*e + 13*a*C*e) + c^3*d*(6*C*d^2 - 7*e*(3*B*d + 20*A*e)) + c^2*e*(a*e*(82*C*d + 63*B*e) + b*(12*C*d^2 + 91*B*d*e + 70*A*e^2)))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e)))) - (1/(105*c^4*e^2*sqrt(d + e*x)*sqrt(a + b*x + c*x^2)))*(2*sqrt(2)*sqrt(b^2 - 4*a*c)*(c*d^2 - b*d*e + a*e^2)*(24*b^2*C*e^2 - c*e*(15*b*C*d + 28*b*B*e + 25*a*C*e) - c^2*(6*C*d^2 - 7*e*(3*B*d + 5*A*e)))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))]
    @test_int [(d + e*x)^(1/2)*(A + B*x + C*x^2)/(sqrt(a + b*x + c*x^2)), x, 7, -((2*(2*c*C*d - 5*B*c*e + 4*b*C*e)*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))/(15*c^2*e)) + (2*C*(d + e*x)^(3/2)*sqrt(a + b*x + c*x^2))/(5*c*e) + (sqrt(2)*sqrt(b^2 - 4*a*c)*(8*b^2*C*e^2 - c*e*(3*b*C*d + 10*b*B*e + 9*a*C*e) - c^2*(2*C*d^2 - 5*e*(B*d + 3*A*e)))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(15*c^3*e^2*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) + (2*sqrt(2)*sqrt(b^2 - 4*a*c)*(2*c*C*d - 5*B*c*e + 4*b*C*e)*(c*d^2 - b*d*e + a*e^2)*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(15*c^3*e^2*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))]
    @test_int [(A + B*x + C*x^2)/((d + e*x)^(1/2)*sqrt(a + b*x + c*x^2)), x, 6, (2*C*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))/(3*c*e) - (sqrt(2)*sqrt(b^2 - 4*a*c)*(2*c*C*d - 3*B*c*e + 2*b*C*e)*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(3*c^2*e^2*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) + (2*sqrt(2)*sqrt(b^2 - 4*a*c)*(C*e*(b*d - a*e) + c*(2*C*d^2 - 3*e*(B*d - A*e)))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(3*c^2*e^2*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))]
    @test_int [(A + B*x + C*x^2)/((d + e*x)^(3/2)*sqrt(a + b*x + c*x^2)), x, 6, -((2*(C*d^2 - e*(B*d - A*e))*sqrt(a + b*x + c*x^2))/(e*(c*d^2 - b*d*e + a*e^2)*sqrt(d + e*x))) - (sqrt(2)*sqrt(b^2 - 4*a*c)*(C*e*(b*d - a*e) - c*(2*C*d^2 - e*(B*d - A*e)))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(c*e^2*(c*d^2 - b*d*e + a*e^2)*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) - (2*sqrt(2)*sqrt(b^2 - 4*a*c)*(2*C*d - B*e)*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(c*e^2*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))]
    @test_int [(A + B*x + C*x^2)/((d + e*x)^(5/2)*sqrt(a + b*x + c*x^2)), x, 7, -((2*(C*d^2 - e*(B*d - A*e))*sqrt(a + b*x + c*x^2))/(3*e*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^(3/2))) + (2*(c*d*(2*C*d^2 + e*(B*d - 4*A*e)) + e*(3*a*e*(2*C*d - B*e) - b*(4*C*d^2 - B*d*e - 2*A*e^2)))*sqrt(a + b*x + c*x^2))/(3*e*(c*d^2 - b*d*e + a*e^2)^2*sqrt(d + e*x)) - (sqrt(2)*sqrt(b^2 - 4*a*c)*(c*d*(2*C*d^2 + e*(B*d - 4*A*e)) + e*(3*a*e*(2*C*d - B*e) - b*(4*C*d^2 - B*d*e - 2*A*e^2)))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(3*e^2*(c*d^2 - b*d*e + a*e^2)^2*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) - (2*sqrt(2)*sqrt(b^2 - 4*a*c)*(3*C*e*(b*d - a*e) - c*(2*C*d^2 + e*(B*d - A*e)))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(3*c*e^2*(c*d^2 - b*d*e + a*e^2)*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))]
    @test_int [(A + B*x + C*x^2)/((d + e*x)^(7/2)*sqrt(a + b*x + c*x^2)), x, 8, -((2*(C*d^2 - e*(B*d - A*e))*sqrt(a + b*x + c*x^2))/(5*e*(c*d^2 - b*d*e + a*e^2)*(d + e*x)^(5/2))) + (2*(c*d*(2*C*d^2 + e*(3*B*d - 8*A*e)) + e*(5*a*e*(2*C*d - B*e) - b*(6*C*d^2 - B*d*e - 4*A*e^2)))*sqrt(a + b*x + c*x^2))/(15*e*(c*d^2 - b*d*e + a*e^2)^2*(d + e*x)^(3/2)) + (2*(c^2*d^2*(2*C*d^2 + e*(3*B*d - 23*A*e)) - e^2*(15*a^2*C*e^2 - 10*a*b*e*(C*d + B*e) + b^2*(3*C*d^2 + 2*B*d*e + 8*A*e^2)) - c*e*(b*d*(7*C*d^2 - 7*B*d*e - 23*A*e^2) - a*e*(19*C*d^2 - 29*B*d*e + 9*A*e^2)))*sqrt(a + b*x + c*x^2))/(15*e*(c*d^2 - b*d*e + a*e^2)^3*sqrt(d + e*x)) - (sqrt(2)*sqrt(b^2 - 4*a*c)*(c^2*d^2*(2*C*d^2 + e*(3*B*d - 23*A*e)) - e^2*(15*a^2*C*e^2 - 10*a*b*e*(C*d + B*e) + b^2*(3*C*d^2 + 2*B*d*e + 8*A*e^2)) - c*e*(b*d*(7*C*d^2 - 7*B*d*e - 23*A*e^2) - a*e*(19*C*d^2 - 29*B*d*e + 9*A*e^2)))*sqrt(d + e*x)*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.E(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(15*e^2*(c*d^2 - b*d*e + a*e^2)^3*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(a + b*x + c*x^2)) + (2*sqrt(2)*sqrt(b^2 - 4*a*c)*(c*d*(2*C*d^2 + e*(3*B*d - 8*A*e)) + e*(5*a*e*(2*C*d - B*e) - b*(6*C*d^2 - B*d*e - 4*A*e^2)))*sqrt((c*(d + e*x))/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))*sqrt(-((c*(a + b*x + c*x^2))/(b^2 - 4*a*c)))*Elliptic.F(asin(sqrt((b + sqrt(b^2 - 4*a*c) + 2*c*x)/sqrt(b^2 - 4*a*c))/sqrt(2)), -((2*sqrt(b^2 - 4*a*c)*e)/(2*c*d - (b + sqrt(b^2 - 4*a*c))*e))))/(15*e^2*(c*d^2 - b*d*e + a*e^2)^2*sqrt(d + e*x)*sqrt(a + b*x + c*x^2))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(A+B*x+C*x^2)*(d+e*x)^m*(a+b*x+c*x^2)^p*when*m*and/or*p*symbolic=#

    @test_int [(g + h*x)^m*(a + b*x + c*x^2)^p*(d + e*x + f*x^2), x, 6, (f*(g + h*x)^(1 + m)*(a + b*x + c*x^2)^(1 + p))/(c*h*(3 + m + 2*p)) + (1/(c*h^3*(1 + m)*(3 + m + 2*p)))*(((f*h*(b*g - a*h)*(1 + m) + c*(2*f*g^2*(1 + p) - h*(e*g - d*h)*(3 + m + 2*p)))*(g + h*x)^(1 + m)*(a + b*x + c*x^2)^p*AppellF1(1 + m, -p, -p, 2 + m, (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h), (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h)))/((1 - (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h))^p*(1 - (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h))^p)) - ((b*f*h*(2 + m + p) + c*(2*f*g*(1 + p) - e*h*(3 + m + 2*p)))*(g + h*x)^(2 + m)*(a + b*x + c*x^2)^p*AppellF1(2 + m, -p, -p, 3 + m, (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h), (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h)))/((1 - (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h))^p*(1 - (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h))^p*(c*h^3*(2 + m)*(3 + m + 2*p)))]

    @test_int [(g + h*x)^m*sqrt(a + b*x + c*x^2)*(d + e*x + f*x^2), x, 6, (f*(g + h*x)^(1 + m)*(a + b*x + c*x^2)^(3/2))/(c*h*(4 + m)) + ((f*h*(b*g - a*h)*(1 + m) + c*(3*f*g^2 - h*(e*g - d*h)*(4 + m)))*(g + h*x)^(1 + m)*sqrt(a + b*x + c*x^2)*AppellF1(1 + m, -(1/2), -(1/2), 2 + m, (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h), (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h)))/(c*h^3*(1 + m)*(4 + m)*sqrt(1 - (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h))*sqrt(1 - (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h))) - ((b*f*h*(5 + 2*m) + c*(6*f*g - 2*e*h*(4 + m)))*(g + h*x)^(2 + m)*sqrt(a + b*x + c*x^2)*AppellF1(2 + m, -(1/2), -(1/2), 3 + m, (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h), (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h)))/(2*c*h^3*(2 + m)*(4 + m)*sqrt(1 - (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h))*sqrt(1 - (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h)))]

    @test_int [(g + h*x)^(-3 - 2*p)*(a + b*x + c*x^2)^p*(d + e*x + f*x^2), x, 5, -(((f*g^2 - h*(e*g - d*h))*(a + b*x + c*x^2)^(1 + p))/((g + h*x)^(2*(1 + p))*(2*h*(c*g^2 - b*g*h + a*h^2)*(1 + p)))) - (f*(a + b*x + c*x^2)^p*AppellF1(-2*p, -p, -p, 1 - 2*p, (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h), (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h)))/((g + h*x)^(2*p)*(1 - (2*c*(g + h*x))/(2*c*g - (b - sqrt(b^2 - 4*a*c))*h))^p*(1 - (2*c*(g + h*x))/(2*c*g - (b + sqrt(b^2 - 4*a*c))*h))^p*(2*h^3*p)) - ((2*c*(f*g^3 - d*g*h^2) + h*(2*a*h*(2*f*g - e*h) - b*(3*f*g^2 - e*g*h - d*h^2)))*(b - sqrt(b^2 - 4*a*c) + 2*c*x)*(g + h*x)^(-1 - 2*p)*(a + b*x + c*x^2)^p*HypergeometricFunctions._₂F₁(-1 - 2*p, -p, -2*p, -((4*c*sqrt(b^2 - 4*a*c)*(g + h*x))/((2*c*g - (b + sqrt(b^2 - 4*a*c))*h)*(b - sqrt(b^2 - 4*a*c) + 2*c*x)))))/(((2*c*g - (b - sqrt(b^2 - 4*a*c))*h)*(b + sqrt(b^2 - 4*a*c) + 2*c*x))/((2*c*g - (b + sqrt(b^2 - 4*a*c))*h)*(b - sqrt(b^2 - 4*a*c) + 2*c*x)))^p/(2*h^2*(2*c*g - (b - sqrt(b^2 - 4*a*c))*h)*(c*g^2 - b*g*h + a*h^2)*(1 + 2*p))]

    @test_int [(2*c*d*f + 2*b*f^2*(3 + 2*p)*x + 2*c*f^2*(3 + 2*p)*x^2)*(d + f*x^2)^p, x, 3, (b*f*(3 + 2*p)*(d + f*x^2)^(1 + p))/(1 + p) + 2*c*f*x*(d + f*x^2)^(1 + p)]
    @test_int [(-2*c*e^2 + 2*c*d*f - c*e^2*p + 2*c*f^2*(3 + 2*p)*x^2)*(d + e*x + f*x^2)^p, x, 2, -((c*e*(2 + p)*(d + e*x + f*x^2)^(1 + p))/(1 + p)) + 2*c*f*x*(d + e*x + f*x^2)^(1 + p)]
    @test_int [(-2*c*e^2 + 2*c*d*f + 3*b*e*f - c*e^2*p + 2*b*e*f*p + b*2*f^2*(3 + 2*p)*x + c*2*f^2*(3 + 2*p)*x^2)*(d + e*x + f*x^2)^p, x, 2, -(((c*e*(2 + p) - b*f*(3 + 2*p))*(d + e*x + f*x^2)^(1 + p))/(1 + p)) + 2*c*f*x*(d + e*x + f*x^2)^(1 + p)]

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*P3(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Section:: =#
    #=Integrands*of*the*form*P3(x)*(d+e*x)^m*(a+b*x+c*x^2)^p*when*b^2-4*a*c=0=#

    #= ::Section:: =#
    #=Integrands*of*the*form*P3(x)*(d+e*x)^m*(a+b*x+c*x^2)^p*when*b=0=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P3(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P3(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(d + e*x)^3*(a + b*x + c*x^2)^5*(d*(6*b*d + 5*a*e) + (12*c*d^2 + 17*b*d*e + 5*a*e^2)*x + e*(29*c*d + 11*b*e)*x^2 + 17*c*e^2*x^3), x, 2, (d + e*x)^5*(a + b*x + c*x^2)^6]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(x^2 + x^3)/(-2 + x + x^2), x, 6, x^2/2 + (2/3)*log(1 - x) + (4/3)*log(2 + x)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P3(x)*(d+e*x)^m*(a+b*x+c*x^2)^(p/2)=#

    #= ::Subsubsection:: =#
    #=p>0=#

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [x^2*(d + e*x + f*x^2 + g*x^3)/sqrt(a + b*x + c*x^2), x, 6, ((80*c^2*e - 70*b*c*f + 63*b^2*g - 64*a*c*g)*x^2*sqrt(a + b*x + c*x^2))/(240*c^3) + ((10*c*f - 9*b*g)*x^3*sqrt(a + b*x + c*x^2))/(40*c^2) + (g*x^4*sqrt(a + b*x + c*x^2))/(5*c) - (1/(1920*c^5))*((1050*b^3*c*f + 40*b*c^2*(36*c*d - 55*a*f) - 945*b^4*g - 60*b^2*c*(20*c*e - 49*a*g) + 256*a*c^2*(5*c*e - 4*a*g) - 2*c*(480*c^3*d - 40*c^2*(10*b*e + 9*a*f) - 315*b^3*g + 14*b*c*(25*b*f + 46*a*g))*x)*sqrt(a + b*x + c*x^2)) + ((70*b^4*c*f + 48*b^2*c^2*(2*c*d - 5*a*f) - 32*a*c^3*(4*c*d - 3*a*f) - 63*b^5*g - 40*b^3*c*(2*c*e - 7*a*g) + 48*a*b*c^2*(4*c*e - 5*a*g))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(256*c^(11/2))]
    @test_int [x^1*(d + e*x + f*x^2 + g*x^3)/sqrt(a + b*x + c*x^2), x, 5, ((8*c*f - 7*b*g)*x^2*sqrt(a + b*x + c*x^2))/(24*c^2) + (g*x^3*sqrt(a + b*x + c*x^2))/(4*c) + ((192*c^3*d - 16*c^2*(9*b*e + 8*a*f) - 105*b^3*g + 20*b*c*(6*b*f + 11*a*g) + 2*c*(48*c^2*e - 40*b*c*f + 35*b^2*g - 36*a*c*g)*x)*sqrt(a + b*x + c*x^2))/(192*c^4) - ((40*b^3*c*f + 32*b*c^2*(2*c*d - 3*a*f) - 35*b^4*g - 24*b^2*c*(2*c*e - 5*a*g) + 16*a*c^2*(4*c*e - 3*a*g))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(128*c^(9/2))]
    @test_int [x^0*(d + e*x + f*x^2 + g*x^3)/sqrt(a + b*x + c*x^2), x, 5, ((24*c^2*e - 18*b*c*f + 15*b^2*g - 16*a*c*g)*sqrt(a + b*x + c*x^2))/(24*c^3) + ((6*c*f - 5*b*g)*x*sqrt(a + b*x + c*x^2))/(12*c^2) + (g*x^2*sqrt(a + b*x + c*x^2))/(3*c) + ((16*c^3*d - 8*c^2*(b*e + a*f) - 5*b^3*g + 6*b*c*(b*f + 2*a*g))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(16*c^(7/2))]
    @test_int [(d + e*x + f*x^2 + g*x^3)/(x^1*sqrt(a + b*x + c*x^2)), x, 7, ((4*c*f - 3*b*g)*sqrt(a + b*x + c*x^2))/(4*c^2) + (g*x*sqrt(a + b*x + c*x^2))/(2*c) - (d*atanh((2*a + b*x)/(2*sqrt(a)*sqrt(a + b*x + c*x^2))))/sqrt(a) + ((8*c^2*e + 3*b^2*g - 4*c*(b*f + a*g))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(8*c^(5/2))]
    @test_int [(d + e*x + f*x^2 + g*x^3)/(x^2*sqrt(a + b*x + c*x^2)), x, 7, (g*sqrt(a + b*x + c*x^2))/c - (d*sqrt(a + b*x + c*x^2))/(a*x) + ((b*d - 2*a*e)*atanh((2*a + b*x)/(2*sqrt(a)*sqrt(a + b*x + c*x^2))))/(2*a^(3/2)) + ((2*c*f - b*g)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(2*c^(3/2))]
    @test_int [(d + e*x + f*x^2 + g*x^3)/(x^3*sqrt(a + b*x + c*x^2)), x, 7, -((d*sqrt(a + b*x + c*x^2))/(2*a*x^2)) + ((3*b*d - 4*a*e)*sqrt(a + b*x + c*x^2))/(4*a^2*x) + (g*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/sqrt(c) - ((3*b^2*d - 4*a*c*d - 4*a*b*e + 8*a^2*f)*atanh((2*a + b*x)/(2*sqrt(a)*sqrt(a + b*x + c*x^2))))/(8*a^(5/2))]
    @test_int [(d + e*x + f*x^2 + g*x^3)/(x^4*sqrt(a + b*x + c*x^2)), x, 5, -((d*sqrt(a + b*x + c*x^2))/(3*a*x^3)) + ((5*b*d - 6*a*e)*sqrt(a + b*x + c*x^2))/(12*a^2*x^2) - ((15*b^2*d - 16*a*c*d - 18*a*b*e + 24*a^2*f)*sqrt(a + b*x + c*x^2))/(24*a^3*x) + ((5*b^3*d - 6*a*b^2*e - 4*a*b*(3*c*d - 2*a*f) + 8*a^2*(c*e - 2*a*g))*atanh((2*a + b*x)/(2*sqrt(a)*sqrt(a + b*x + c*x^2))))/(16*a^(7/2))]
    @test_int [(d + e*x + f*x^2 + g*x^3)/(x^5*sqrt(a + b*x + c*x^2)), x, 6, -((d*sqrt(a + b*x + c*x^2))/(4*a*x^4)) + ((7*b*d - 8*a*e)*sqrt(a + b*x + c*x^2))/(24*a^2*x^3) - ((35*b^2*d - 36*a*c*d - 40*a*b*e + 48*a^2*f)*sqrt(a + b*x + c*x^2))/(96*a^3*x^2) + ((105*b^3*d - 120*a*b^2*e - 4*a*b*(55*c*d - 36*a*f) + 64*a^2*(2*c*e - 3*a*g))*sqrt(a + b*x + c*x^2))/(192*a^4*x) - ((35*b^4*d - 40*a*b^3*e + 16*a^2*c*(3*c*d - 4*a*f) - 24*a*b^2*(5*c*d - 2*a*f) + 32*a^2*b*(3*c*e - 2*a*g))*atanh((2*a + b*x)/(2*sqrt(a)*sqrt(a + b*x + c*x^2))))/(128*a^(9/2))]
    @test_int [(d + e*x + f*x^2 + g*x^3)/(x^6*sqrt(a + b*x + c*x^2)), x, 7, -((d*sqrt(a + b*x + c*x^2))/(5*a*x^5)) + ((9*b*d - 10*a*e)*sqrt(a + b*x + c*x^2))/(40*a^2*x^4) - ((63*b^2*d - 64*a*c*d - 70*a*b*e + 80*a^2*f)*sqrt(a + b*x + c*x^2))/(240*a^3*x^3) + ((315*b^3*d - 350*a*b^2*e - 4*a*b*(161*c*d - 100*a*f) + 120*a^2*(3*c*e - 4*a*g))*sqrt(a + b*x + c*x^2))/(960*a^4*x^2) - ((945*b^4*d - 1050*a*b^3*e - 60*a*b^2*(49*c*d - 20*a*f) + 256*a^2*c*(4*c*d - 5*a*f) + 40*a^2*b*(55*c*e - 36*a*g))*sqrt(a + b*x + c*x^2))/(1920*a^5*x) + ((63*b^5*d - 70*a*b^4*e + 48*a^2*b*c*(5*c*d - 4*a*f) - 40*a*b^3*(7*c*d - 2*a*f) - 32*a^3*c*(3*c*e - 4*a*g) + 48*a^2*b^2*(5*c*e - 2*a*g))*atanh((2*a + b*x)/(2*sqrt(a)*sqrt(a + b*x + c*x^2))))/(256*a^(11/2))]

    #= ::Subsection:: =#
    #=Integrands*of*the*form*(d+e*x)^m*(a+b*x+c*x^2)^p*(f+g*x+h*x^2)*when*m*and/or*p*symbolic=#

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*P4(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Section:: =#
    #=Integrands*of*the*form*P4(x)*(d+e*x)^m*(a+b*x+c*x^2)^p*when*b=0=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P4(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P4(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(d + e*x)^3*(3 + 2*x + 5*x^2)*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, ((5*d^2 - 2*d*e + 3*e^2)*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*(d + e*x)^4)/(4*e^7) - ((120*d^5 + 85*d^4*e + 68*d^3*e^2 + 12*d^2*e^3 + 42*d*e^4 - 7*e^5)*(d + e*x)^5)/(5*e^7) + ((300*d^4 + 170*d^3*e + 102*d^2*e^2 + 12*d*e^3 + 21*e^4)*(d + e*x)^6)/(6*e^7) - (2*(200*d^3 + 85*d^2*e + 34*d*e^2 + 2*e^3)*(d + e*x)^7)/(7*e^7) + ((300*d^2 + 85*d*e + 17*e^2)*(d + e*x)^8)/(8*e^7) - ((120*d + 17*e)*(d + e*x)^9)/(9*e^7) + (2*(d + e*x)^10)/e^7]
    @test_int [(d + e*x)^2*(3 + 2*x + 5*x^2)*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, 6*d^2*x + (1/2)*d*(7*d + 12*e)*x^2 + (1/3)*(21*d^2 + 14*d*e + 6*e^2)*x^3 - (1/4)*(4*d^2 - 42*d*e - 7*e^2)*x^4 + (1/5)*(17*d^2 - 8*d*e + 21*e^2)*x^5 - (1/6)*(17*d^2 - 34*d*e + 4*e^2)*x^6 + (1/7)*(20*d^2 - 34*d*e + 17*e^2)*x^7 + (1/8)*(40*d - 17*e)*e*x^8 + (20*e^2*x^9)/9]
    @test_int [(d + e*x)^1*(3 + 2*x + 5*x^2)*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, 6*d*x + (1/2)*(7*d + 6*e)*x^2 + (7/3)*(3*d + e)*x^3 - (1/4)*(4*d - 21*e)*x^4 + (1/5)*(17*d - 4*e)*x^5 - (17/6)*(d - e)*x^6 + (1/7)*(20*d - 17*e)*x^7 + (5*e*x^8)/2]
    @test_int [(d + e*x)^0*(3 + 2*x + 5*x^2)*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, 6*x + (7*x^2)/2 + 7*x^3 - x^4 + (17*x^5)/5 - (17*x^6)/6 + (20*x^7)/7]
    @test_int [(3 + 2*x + 5*x^2)*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(d + e*x)^1, x, 2, -(((20*d^5 + 17*d^4*e + 17*d^3*e^2 + 4*d^2*e^3 + 21*d*e^4 - 7*e^5)*x)/e^6) + ((20*d^4 + 17*d^3*e + 17*d^2*e^2 + 4*d*e^3 + 21*e^4)*x^2)/(2*e^5) - ((20*d^3 + 17*d^2*e + 17*d*e^2 + 4*e^3)*x^3)/(3*e^4) + ((20*d^2 + 17*d*e + 17*e^2)*x^4)/(4*e^3) - ((20*d + 17*e)*x^5)/(5*e^2) + (10*x^6)/(3*e) + ((5*d^2 - 2*d*e + 3*e^2)*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*log(d + e*x))/e^7]
    @test_int [(3 + 2*x + 5*x^2)*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(d + e*x)^2, x, 2, ((100*d^4 + 68*d^3*e + 51*d^2*e^2 + 8*d*e^3 + 21*e^4)*x)/e^6 - ((80*d^3 + 51*d^2*e + 34*d*e^2 + 4*e^3)*x^2)/(2*e^5) + ((60*d^2 + 34*d*e + 17*e^2)*x^3)/(3*e^4) - ((40*d + 17*e)*x^4)/(4*e^3) + (4*x^5)/e^2 - ((5*d^2 - 2*d*e + 3*e^2)*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4))/(e^7*(d + e*x)) - ((120*d^5 + 85*d^4*e + 68*d^3*e^2 + 12*d^2*e^3 + 42*d*e^4 - 7*e^5)*log(d + e*x))/e^7]
    @test_int [(3 + 2*x + 5*x^2)*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(d + e*x)^3, x, 2, -(((200*d^3 + 102*d^2*e + 51*d*e^2 + 4*e^3)*x)/e^6) + ((120*d^2 + 51*d*e + 17*e^2)*x^2)/(2*e^5) - ((60*d + 17*e)*x^3)/(3*e^4) + (5*x^4)/e^3 - ((5*d^2 - 2*d*e + 3*e^2)*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4))/(2*e^7*(d + e*x)^2) + (120*d^5 + 85*d^4*e + 68*d^3*e^2 + 12*d^2*e^3 + 42*d*e^4 - 7*e^5)/(e^7*(d + e*x)) + ((300*d^4 + 170*d^3*e + 102*d^2*e^2 + 12*d*e^3 + 21*e^4)*log(d + e*x))/e^7]

    @test_int [(d + e*x)^3*(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, ((5*d^2 - 2*d*e + 3*e^2)^2*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*(d + e*x)^4)/(4*e^9) - ((5*d^2 - 2*d*e + 3*e^2)*(160*d^5 + 127*d^4*e + 88*d^3*e^2 - 4*d^2*e^3 + 64*d*e^4 - 11*e^5)*(d + e*x)^5)/(5*e^9) + ((2800*d^6 + 945*d^5*e + 1665*d^4*e^2 + 370*d^3*e^3 + 888*d^2*e^4 - 195*d*e^5 + 107*e^6)*(d + e*x)^6)/(6*e^9) - ((5600*d^5 + 1575*d^4*e + 2220*d^3*e^2 + 370*d^2*e^3 + 592*d*e^4 - 65*e^5)*(d + e*x)^7)/(7*e^9) + ((7000*d^4 + 1575*d^3*e + 1665*d^2*e^2 + 185*d*e^3 + 148*e^4)*(d + e*x)^8)/(8*e^9) - ((5600*d^3 + 945*d^2*e + 666*d*e^2 + 37*e^3)*(d + e*x)^9)/(9*e^9) + ((2800*d^2 + 315*d*e + 111*e^2)*(d + e*x)^10)/(10*e^9) - (5*(160*d + 9*e)*(d + e*x)^11)/(11*e^9) + (25*(d + e*x)^12)/(3*e^9)]
    @test_int [(d + e*x)^2*(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, 18*d^2*x + (3/2)*d*(11*d + 12*e)*x^2 + (1/3)*(107*d^2 + 66*d*e + 18*e^2)*x^3 + (1/4)*(65*d^2 + 214*d*e + 33*e^2)*x^4 + (1/5)*(148*d^2 + 130*d*e + 107*e^2)*x^5 - (1/6)*(37*d^2 - 296*d*e - 65*e^2)*x^6 + (37/7)*(3*d^2 - 2*d*e + 4*e^2)*x^7 - (1/8)*(45*d^2 - 222*d*e + 37*e^2)*x^8 + (1/9)*(100*d^2 - 90*d*e + 111*e^2)*x^9 + (1/2)*(40*d - 9*e)*e*x^10 + (100*e^2*x^11)/11]
    @test_int [(d + e*x)^1*(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, 18*d*x + (3/2)*(11*d + 6*e)*x^2 + (1/3)*(107*d + 33*e)*x^3 + (1/4)*(65*d + 107*e)*x^4 + (1/5)*(148*d + 65*e)*x^5 - (37/6)*(d - 4*e)*x^6 + (37/7)*(3*d - e)*x^7 - (3/8)*(15*d - 37*e)*x^8 + (5/9)*(20*d - 9*e)*x^9 + 10*e*x^10]
    @test_int [(d + e*x)^0*(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, 18*x + (33*x^2)/2 + (107*x^3)/3 + (65*x^4)/4 + (148*x^5)/5 - (37*x^6)/6 + (111*x^7)/7 - (45*x^8)/8 + (100*x^9)/9]
    @test_int [(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(d + e*x)^1, x, 2, -(((100*d^7 + 45*d^6*e + 111*d^5*e^2 + 37*d^4*e^3 + 148*d^3*e^4 - 65*d^2*e^5 + 107*d*e^6 - 33*e^7)*x)/e^8) + ((100*d^6 + 45*d^5*e + 111*d^4*e^2 + 37*d^3*e^3 + 148*d^2*e^4 - 65*d*e^5 + 107*e^6)*x^2)/(2*e^7) - ((100*d^5 + 45*d^4*e + 111*d^3*e^2 + 37*d^2*e^3 + 148*d*e^4 - 65*e^5)*x^3)/(3*e^6) + ((100*d^4 + 45*d^3*e + 111*d^2*e^2 + 37*d*e^3 + 148*e^4)*x^4)/(4*e^5) - ((100*d^3 + 45*d^2*e + 111*d*e^2 + 37*e^3)*x^5)/(5*e^4) + ((100*d^2 + 45*d*e + 111*e^2)*x^6)/(6*e^3) - (5*(20*d + 9*e)*x^7)/(7*e^2) + (25*x^8)/(2*e) + ((5*d^2 - 2*d*e + 3*e^2)^2*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*log(d + e*x))/e^9]
    @test_int [(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(d + e*x)^2, x, 2, ((700*d^6 + 270*d^5*e + 555*d^4*e^2 + 148*d^3*e^3 + 444*d^2*e^4 - 130*d*e^5 + 107*e^6)*x)/e^8 - ((600*d^5 + 225*d^4*e + 444*d^3*e^2 + 111*d^2*e^3 + 296*d*e^4 - 65*e^5)*x^2)/(2*e^7) + ((500*d^4 + 180*d^3*e + 333*d^2*e^2 + 74*d*e^3 + 148*e^4)*x^3)/(3*e^6) - ((400*d^3 + 135*d^2*e + 222*d*e^2 + 37*e^3)*x^4)/(4*e^5) + (3*(100*d^2 + 30*d*e + 37*e^2)*x^5)/(5*e^4) - (5*(40*d + 9*e)*x^6)/(6*e^3) + (100*x^7)/(7*e^2) - ((5*d^2 - 2*d*e + 3*e^2)^2*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4))/(e^9*(d + e*x)) - ((5*d^2 - 2*d*e + 3*e^2)*(160*d^5 + 127*d^4*e + 88*d^3*e^2 - 4*d^2*e^3 + 64*d*e^4 - 11*e^5)*log(d + e*x))/e^9]
    @test_int [(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(d + e*x)^3, x, 2, -(((2100*d^5 + 675*d^4*e + 1110*d^3*e^2 + 222*d^2*e^3 + 444*d*e^4 - 65*e^5)*x)/e^8) + ((1500*d^4 + 450*d^3*e + 666*d^2*e^2 + 111*d*e^3 + 148*e^4)*x^2)/(2*e^7) - ((1000*d^3 + 270*d^2*e + 333*d*e^2 + 37*e^3)*x^3)/(3*e^6) + (3*(200*d^2 + 45*d*e + 37*e^2)*x^4)/(4*e^5) - (3*(20*d + 3*e)*x^5)/e^4 + (50*x^6)/(3*e^3) - ((5*d^2 - 2*d*e + 3*e^2)^2*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4))/(2*e^9*(d + e*x)^2) + ((5*d^2 - 2*d*e + 3*e^2)*(160*d^5 + 127*d^4*e + 88*d^3*e^2 - 4*d^2*e^3 + 64*d*e^4 - 11*e^5))/(e^9*(d + e*x)) + ((2800*d^6 + 945*d^5*e + 1665*d^4*e^2 + 370*d^3*e^3 + 888*d^2*e^4 - 195*d*e^5 + 107*e^6)*log(d + e*x))/e^9]
    @test_int [(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(d + e*x)^4, x, 2, (2*(1750*d^4 + 450*d^3*e + 555*d^2*e^2 + 74*d*e^3 + 74*e^4)*x)/e^8 - ((2000*d^3 + 450*d^2*e + 444*d*e^2 + 37*e^3)*x^2)/(2*e^7) + ((1000*d^2 + 180*d*e + 111*e^2)*x^3)/(3*e^6) - (5*(80*d + 9*e)*x^4)/(4*e^5) + (20*x^5)/e^4 - ((5*d^2 - 2*d*e + 3*e^2)^2*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4))/(3*e^9*(d + e*x)^3) + ((5*d^2 - 2*d*e + 3*e^2)*(160*d^5 + 127*d^4*e + 88*d^3*e^2 - 4*d^2*e^3 + 64*d*e^4 - 11*e^5))/(2*e^9*(d + e*x)^2) - (2800*d^6 + 945*d^5*e + 1665*d^4*e^2 + 370*d^3*e^3 + 888*d^2*e^4 - 195*d*e^5 + 107*e^6)/(e^9*(d + e*x)) - ((5600*d^5 + 1575*d^4*e + 2220*d^3*e^2 + 370*d^2*e^3 + 592*d*e^4 - 65*e^5)*log(d + e*x))/e^9]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(d + e*x)^3*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2), x, 6, ((10125*d^3 + 34350*d^2*e - 13215*d*e^2 - 5108*e^3)*x)/15625 - ((4125*d^3 - 6075*d^2*e - 6870*d*e^2 + 881*e^3)*x^2)/6250 + ((500*d^3 - 2475*d^2*e + 1215*d*e^2 + 458*e^3)*x^3)/1875 + (3/500)*e*(100*d^2 - 165*d*e + 27*e^2)*x^4 + (3/125)*(20*d - 11*e)*e^2*x^5 + (2*e^3*x^6)/15 - ((52875*d^3 + 449175*d^2*e - 274845*d*e^2 - 53189*e^3)*atan((1 + 5*x)/sqrt(14)))/(78125*sqrt(14)) + ((57250*d^3 - 66075*d^2*e - 76620*d*e^2 + 23431*e^3)*log(3 + 2*x + 5*x^2))/156250]
    @test_int [(d + e*x)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2), x, 6, ((2025*d^2 + 4580*d*e - 881*e^2)*x)/3125 - ((825*d^2 - 810*d*e - 458*e^2)*x^2)/1250 + (1/375)*(100*d^2 - 330*d*e + 81*e^2)*x^3 + (1/100)*(40*d - 33*e)*e*x^4 + (4*e^2*x^5)/25 - ((10575*d^2 + 59890*d*e - 18323*e^2)*atan((1 + 5*x)/sqrt(14)))/(15625*sqrt(14)) + ((5725*d^2 - 4405*d*e - 2554*e^2)*log(3 + 2*x + 5*x^2))/15625]
    @test_int [(d + e*x)^1*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2), x, 6, (1/625)*(405*d + 458*e)*x - (3/250)*(55*d - 27*e)*x^2 + (1/75)*(20*d - 33*e)*x^3 + (e*x^4)/5 - ((2115*d + 5989*e)*atan((1 + 5*x)/sqrt(14)))/(3125*sqrt(14)) + ((2290*d - 881*e)*log(3 + 2*x + 5*x^2))/6250]
    @test_int [(d + e*x)^0*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2), x, 6, (81*x)/125 - (33*x^2)/50 + (4*x^3)/15 - (423*atan((1 + 5*x)/sqrt(14)))/(625*sqrt(14)) + (229/625)*log(3 + 2*x + 5*x^2)]
    @test_int [(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/((d + e*x)^1*(3 + 2*x + 5*x^2)), x, 6, -(((20*d + 33*e)*x)/(25*e^2)) + (2*x^2)/(5*e) - ((423*d - 1367*e)*atan((1 + 5*x)/sqrt(14)))/(125*sqrt(14)*(5*d^2 - 2*d*e + 3*e^2)) + ((4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*log(d + e*x))/(e^3*(5*d^2 - 2*d*e + 3*e^2)) + ((458*d - 7*e)*log(3 + 2*x + 5*x^2))/(250*(5*d^2 - 2*d*e + 3*e^2))]
    @test_int [(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/((d + e*x)^2*(3 + 2*x + 5*x^2)), x, 6, (4*x)/(5*e^2) - (4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)/(e^3*(5*d^2 - 2*d*e + 3*e^2)*(d + e*x)) - ((423*d^2 - 2734*d*e + 293*e^2)*atan((1 + 5*x)/sqrt(14)))/(25*sqrt(14)*(5*d^2 - 2*d*e + 3*e^2)^2) - ((40*d^5 + d^4*e + 28*d^3*e^2 + 44*d^2*e^3 - 2*d*e^4 + e^5)*log(d + e*x))/(e^3*(5*d^2 - 2*d*e + 3*e^2)^2) + ((229*d^2 - 7*d*e - 136*e^2)*log(3 + 2*x + 5*x^2))/(25*(5*d^2 - 2*d*e + 3*e^2)^2)]
    @test_int [(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/((d + e*x)^3*(3 + 2*x + 5*x^2)), x, 6, -((4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)/(2*e^3*(5*d^2 - 2*d*e + 3*e^2)*(d + e*x)^2)) + (40*d^5 + d^4*e + 28*d^3*e^2 + 44*d^2*e^3 - 2*d*e^4 + e^5)/(e^3*(5*d^2 - 2*d*e + 3*e^2)^2*(d + e*x)) - ((423*d^3 - 4101*d^2*e + 879*d*e^2 + 703*e^3)*atan((1 + 5*x)/sqrt(14)))/(5*sqrt(14)*(5*d^2 - 2*d*e + 3*e^2)^3) + ((100*d^6 - 120*d^5*e + 228*d^4*e^2 - 242*d^3*e^3 + 141*d^2*e^4 + 120*d*e^5 - e^6)*log(d + e*x))/(e^3*(5*d^2 - 2*d*e + 3*e^2)^3) + ((458*d^3 - 21*d^2*e - 816*d*e^2 + 113*e^3)*log(3 + 2*x + 5*x^2))/(10*(5*d^2 - 2*d*e + 3*e^2)^3)]

    @test_int [(d + e*x)^3*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2)^2, x, 7, ((2800*d^3 - 17220*d^2*e + 9921*d*e^2 + 6053*e^3)*x)/17500 + (e*(840*d^2 - 1722*d*e + 373*e^2)*x^2)/3500 + (1/375)*(60*d - 41*e)*e^2*x^3 + (e^3*x^4)/25 - ((1367 + 423*x)*(d + e*x)^3)/(3500*(3 + 2*x + 5*x^2)) + ((32825*d^3 + 317565*d^2*e - 221643*d*e^2 - 67499*e^3)*atan((1 + 5*x)/sqrt(14)))/(87500*sqrt(14)) - ((1025*d^3 - 1545*d^2*e - 2601*d*e^2 + 832*e^3)*log(3 + 2*x + 5*x^2))/6250]
    @test_int [(d + e*x)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2)^2, x, 7, ((2800*d^2 - 11480*d*e + 3307*e^2)*x)/17500 + (1/250)*(40*d - 41*e)*e*x^2 + (4*e^2*x^3)/75 - ((1367 + 423*x)*(d + e*x)^2)/(3500*(3 + 2*x + 5*x^2)) + ((32825*d^2 + 211710*d*e - 73881*e^2)*atan((1 + 5*x)/sqrt(14)))/(87500*sqrt(14)) - ((1025*d^2 - 1030*d*e - 867*e^2)*log(3 + 2*x + 5*x^2))/6250]
    @test_int [(d + e*x)^1*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2)^2, x, 7, (1/125)*(20*d - 41*e)*x + (2*e*x^2)/25 - ((1367 + 423*x)*(d + e*x))/(3500*(3 + 2*x + 5*x^2)) + ((6565*d + 21171*e)*atan((1 + 5*x)/sqrt(14)))/(17500*sqrt(14)) - ((205*d - 103*e)*log(3 + 2*x + 5*x^2))/1250]
    @test_int [(d + e*x)^0*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2)^2, x, 7, (4*x)/25 - (1367 + 423*x)/(3500*(3 + 2*x + 5*x^2)) + (1313*atan((1 + 5*x)/sqrt(14)))/(3500*sqrt(14)) - (41/250)*log(3 + 2*x + 5*x^2)]
    @test_int [(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/((d + e*x)^1*(3 + 2*x + 5*x^2)^2), x, 7, -((1367*d - 293*e + (423*d - 1367*e)*x)/(700*(5*d^2 - 2*d*e + 3*e^2)*(3 + 2*x + 5*x^2))) + ((6565*d^3 - 26423*d^2*e + 11089*d*e^2 - 6623*e^3)*atan((1 + 5*x)/sqrt(14)))/(700*sqrt(14)*(5*d^2 - 2*d*e + 3*e^2)^2) + ((4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*log(d + e*x))/(e*(5*d^2 - 2*d*e + 3*e^2)^2) - ((205*d^3 - 61*d^2*e + 23*d*e^2 + 14*e^3)*log(3 + 2*x + 5*x^2))/(50*(5*d^2 - 2*d*e + 3*e^2)^2)]
    @test_int [(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/((d + e*x)^2*(3 + 2*x + 5*x^2)^2), x, 7, -((4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)/(e*(5*d^2 - 2*d*e + 3*e^2)^2*(d + e*x))) - (1367*d^2 - 586*d*e - 703*e^2 + (423*d^2 - 2734*d*e + 293*e^2)*x)/(140*(5*d^2 - 2*d*e + 3*e^2)^2*(3 + 2*x + 5*x^2)) + ((1313*d^4 - 10044*d^3*e + 4290*d^2*e^2 + 156*d*e^3 - 271*e^4)*atan((1 + 5*x)/sqrt(14)))/(28*sqrt(14)*(5*d^2 - 2*d*e + 3*e^2)^3) + ((41*d^4 - 8*d^3*e - 60*d^2*e^2 + 24*d*e^3 - 5*e^4)*log(d + e*x))/(5*d^2 - 2*d*e + 3*e^2)^3 - ((41*d^4 - 8*d^3*e - 60*d^2*e^2 + 24*d*e^3 - 5*e^4)*log(3 + 2*x + 5*x^2))/(2*(5*d^2 - 2*d*e + 3*e^2)^3)]
    @test_int [(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/((d + e*x)^3*(3 + 2*x + 5*x^2)^2), x, 7, -((4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)/(2*e*(5*d^2 - 2*d*e + 3*e^2)^2*(d + e*x)^2)) - (41*d^4 - 8*d^3*e - 60*d^2*e^2 + 24*d*e^3 - 5*e^4)/((5*d^2 - 2*d*e + 3*e^2)^3*(d + e*x)) - (1367*d^3 - 879*d^2*e - 2109*d*e^2 + 457*e^3 + (423*d^3 - 4101*d^2*e + 879*d*e^2 + 703*e^3)*x)/(28*(5*d^2 - 2*d*e + 3*e^2)^3*(3 + 2*x + 5*x^2)) + ((6565*d^5 - 74017*d^4*e + 35022*d^3*e^2 + 42858*d^2*e^3 - 17247*d*e^4 + 579*e^5)*atan((1 + 5*x)/sqrt(14)))/(28*sqrt(14)*(5*d^2 - 2*d*e + 3*e^2)^4) + ((205*d^5 - 19*d^4*e - 846*d^3*e^2 + 396*d^2*e^3 + 57*d*e^4 - 21*e^5)*log(d + e*x))/(5*d^2 - 2*d*e + 3*e^2)^4 - ((205*d^5 - 19*d^4*e - 846*d^3*e^2 + 396*d^2*e^3 + 57*d*e^4 - 21*e^5)*log(3 + 2*x + 5*x^2))/(2*(5*d^2 - 2*d*e + 3*e^2)^4)]

    @test_int [(d + e*x)^3*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2)^3, x, 8, ((83065*d - 126009*e)*e^2*x)/980000 + (2*e^3*x^2)/125 - ((1367 + 423*x)*(d + e*x)^3)/(7000*(3 + 2*x + 5*x^2)^2) + ((d + e*x)^2*(3*(11449*d - 2105*e) + (11015*d + 49177*e)*x))/(196000*(3 + 2*x + 5*x^2)) + (3*(353125*d^3 - 855175*d^2*e + 74085*d*e^2 + 556349*e^3)*atan((1 + 5*x)/sqrt(14)))/(4900000*sqrt(14)) + (3*e*(100*d^2 - 245*d*e + 47*e^2)*log(3 + 2*x + 5*x^2))/6250]
    @test_int [(d + e*x)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2)^3, x, 8, (4*e^2*x)/125 - ((1367 + 423*x)*(d + e*x)^2)/(7000*(3 + 2*x + 5*x^2)^2) + ((d + e*x)*(34347*d - 6413*e + 5*(2203*d + 8553*e)*x))/(196000*(3 + 2*x + 5*x^2)) + ((211875*d^2 - 342070*d*e + 14817*e^2)*atan((1 + 5*x)/sqrt(14)))/(980000*sqrt(14)) + ((40*d - 49*e)*e*log(3 + 2*x + 5*x^2))/1250]
    @test_int [(d + e*x)^1*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2)^3, x, 6, -(((1367 + 423*x)*(d + e*x))/(7000*(3 + 2*x + 5*x^2)^2)) + (34347*d - 6511*e + (11015*d + 36353*e)*x)/(196000*(3 + 2*x + 5*x^2)) + ((42375*d - 34207*e)*atan((1 + 5*x)/sqrt(14)))/(196000*sqrt(14)) + (2/125)*e*log(3 + 2*x + 5*x^2)]
    @test_int [(d + e*x)^0*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/(3 + 2*x + 5*x^2)^3, x, 5, -((1367 + 423*x)/(7000*(3 + 2*x + 5*x^2)^2)) + (34347 + 11015*x)/(196000*(3 + 2*x + 5*x^2)) + (339*atan((1 + 5*x)/sqrt(14)))/(1568*sqrt(14))]
    @test_int [(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/((d + e*x)^1*(3 + 2*x + 5*x^2)^3), x, 8, -((1367*d - 293*e + (423*d - 1367*e)*x)/(1400*(5*d^2 - 2*d*e + 3*e^2)*(3 + 2*x + 5*x^2)^2)) + (171735*d^3 - 92989*d^2*e + 36207*d*e^2 + 1831*e^3 + 25*(2203*d^3 - 9033*d^2*e + 3635*d*e^2 - 1829*e^3)*x)/(39200*(5*d^2 - 2*d*e + 3*e^2)^2*(3 + 2*x + 5*x^2)) + ((42375*d^5 - 16643*d^4*e + 58530*d^3*e^2 - 56058*d^2*e^3 + 31811*d*e^4 - 8623*e^5)*atan((1 + 5*x)/sqrt(14)))/(1568*sqrt(14)*(5*d^2 - 2*d*e + 3*e^2)^3) + (e*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*log(d + e*x))/(5*d^2 - 2*d*e + 3*e^2)^3 - (e*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*log(3 + 2*x + 5*x^2))/(2*(5*d^2 - 2*d*e + 3*e^2)^3)]
    @test_int [(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4)/((d + e*x)^2*(3 + 2*x + 5*x^2)^3), x, 8, -((e*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4))/((5*d^2 - 2*d*e + 3*e^2)^3*(d + e*x))) - (1367*d^2 - 586*d*e - 703*e^2 + (423*d^2 - 2734*d*e + 293*e^2)*x)/(280*(5*d^2 - 2*d*e + 3*e^2)^2*(3 + 2*x + 5*x^2)^2) + (171735*d^4 - 117284*d^3*e - 200502*d^2*e^2 + 104428*d*e^3 - 23189*e^4 + 5*(11015*d^4 - 85924*d^3*e + 34698*d^2*e^2 + 10348*d*e^3 - 3589*e^4)*x)/(7840*(5*d^2 - 2*d*e + 3*e^2)^3*(3 + 2*x + 5*x^2)) + ((211875*d^6 + 3070*d^5*e + 209039*d^4*e^2 - 921444*d^3*e^3 + 380621*d^2*e^4 - 49586*d*e^5 - 43695*e^6)*atan((1 + 5*x)/sqrt(14)))/(1568*sqrt(14)*(5*d^2 - 2*d*e + 3*e^2)^4) + (e*(40*d^5 + 83*d^4*e + 12*d^3*e^2 - 76*d^2*e^3 + 46*d*e^4 - 9*e^5)*log(d + e*x))/(5*d^2 - 2*d*e + 3*e^2)^4 - (e*(40*d^5 + 83*d^4*e + 12*d^3*e^2 - 76*d^2*e^3 + 46*d*e^4 - 9*e^5)*log(3 + 2*x + 5*x^2))/(2*(5*d^2 - 2*d*e + 3*e^2)^4)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*x^m*P4(x)*(a+b*x+c*x^2)^(p/2)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(5 + 2*x)^1*sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4), x, 7, (-51435*(1 - 4*x)*sqrt(3 - x + 2*x^2))/32768 + (11433*(5 + 2*x)^2*(3 - x + 2*x^2)^(3/2))/4480 - (823*(5 + 2*x)^3*(3 - x + 2*x^2)^(3/2))/1344 + (5*(5 + 2*x)^4*(3 - x + 2*x^2)^(3/2))/112 - ((1005757 + 295276*x)*(3 - x + 2*x^2)^(3/2))/71680 - (1183005*asinh((1 - 4*x)/sqrt(23)))/(65536*sqrt(2))]
    @test_int [(5 + 2*x)^0*sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4), x, 7, (-4609*(1 - 4*x)*sqrt(3 - x + 2*x^2))/16384 + (287*(3 - x + 2*x^2)^(3/2))/5120 - (71*x*(3 - x + 2*x^2)^(3/2))/1280 + (7*x^2*(3 - x + 2*x^2)^(3/2))/80 + (5*x^3*(3 - x + 2*x^2)^(3/2))/12 - (106007*asinh((1 - 4*x)/sqrt(23)))/(32768*sqrt(2))]
    @test_int [(sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^1, x, 9, ((489587 - 80844*x)*sqrt(3 - x + 2*x^2))/4096 + (4535*(3 - x + 2*x^2)^(3/2))/768 - (127*(5 + 2*x)*(3 - x + 2*x^2)^(3/2))/128 + ((5 + 2*x)^2*(3 - x + 2*x^2)^(3/2))/16 + (5627989*asinh((1 - 4*x)/sqrt(23)))/(8192*sqrt(2)) - (11001*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(16*sqrt(2))]
    @test_int [(sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^2, x, 9, -((1996953 - 333380*x)*sqrt(3 - x + 2*x^2))/18432 - (541*(3 - x + 2*x^2)^(3/2))/384 - (3667*(3 - x + 2*x^2)^(3/2))/(576*(5 + 2*x)) + (5*(5 + 2*x)*(3 - x + 2*x^2)^(3/2))/64 - (2551847*asinh((1 - 4*x)/sqrt(23)))/(4096*sqrt(2)) + (239201*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(384*sqrt(2))]
    @test_int [(sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^3, x, 9, (5*(661065 - 110099*x)*sqrt(3 - x + 2*x^2))/82944 + (5*(3 - x + 2*x^2)^(3/2))/48 - (3667*(3 - x + 2*x^2)^(3/2))/(1152*(5 + 2*x)^2) + (357391*(3 - x + 2*x^2)^(3/2))/(82944*(5 + 2*x)) + (117315*asinh((1 - 4*x)/sqrt(23)))/(512*sqrt(2)) - (12670805*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(55296*sqrt(2))]
    @test_int [(sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^4, x, 9, -((44378877 - 7400779*x)*sqrt(3 - x + 2*x^2))/5971968 - (3667*(3 - x + 2*x^2)^(3/2))/(1728*(5 + 2*x)^3) + (158527*(3 - x + 2*x^2)^(3/2))/(82944*(5 + 2*x)^2) - (6467659*(3 - x + 2*x^2)^(3/2))/(5971968*(5 + 2*x)) - (10939*asinh((1 - 4*x)/sqrt(23)))/(256*sqrt(2)) + (170114729*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(3981312*sqrt(2))]
    @test_int [(sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^5, x, 9, (7*(52836655 + 9616196*x)*sqrt(3 - x + 2*x^2))/(95551488*(5 + 2*x)) - (3667*(3 - x + 2*x^2)^(3/2))/(2304*(5 + 2*x)^4) + (593771*(3 - x + 2*x^2)^(3/2))/(497664*(5 + 2*x)^3) - (9363383*(3 - x + 2*x^2)^(3/2))/(23887872*(5 + 2*x)^2) + (259*asinh((1 - 4*x)/sqrt(23)))/(64*sqrt(2)) - (4640586097*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(1146617856*sqrt(2))]
    @test_int [(sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^6, x, 9, -((4583087983 + 3174439702*x)*sqrt(3 - x + 2*x^2))/(6879707136*(5 + 2*x)^2) - (3667*(3 - x + 2*x^2)^(3/2))/(2880*(5 + 2*x)^5) + (711961*(3 - x + 2*x^2)^(3/2))/(829440*(5 + 2*x)^4) - (38732321*(3 - x + 2*x^2)^(3/2))/(179159040*(5 + 2*x)^3) - (5*asinh((1 - 4*x)/sqrt(23)))/(32*sqrt(2)) + (12895597463*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(82556485632*sqrt(2))]
    @test_int [(sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^7, x, 7, (-1172725*(17 - 22*x)*sqrt(3 - x + 2*x^2))/(330225942528*(5 + 2*x)^2) - (3667*(3 - x + 2*x^2)^(3/2))/(3456*(5 + 2*x)^6) + (92239*(3 - x + 2*x^2)^(3/2))/(138240*(5 + 2*x)^5) - (5703277*(3 - x + 2*x^2)^(3/2))/(39813120*(5 + 2*x)^4) + (87677717*(3 - x + 2*x^2)^(3/2))/(8599633920*(5 + 2*x)^3) - (26972675*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(3962711310336*sqrt(2))]
    @test_int [(sqrt(3 - x + 2*x^2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^8, x, 8, (-12568315*(17 - 22*x)*sqrt(3 - x + 2*x^2))/(23776267862016*(5 + 2*x)^2) - (3667*(3 - x + 2*x^2)^(3/2))/(4032*(5 + 2*x)^7) + (948341*(3 - x + 2*x^2)^(3/2))/(1741824*(5 + 2*x)^6) - (1464037*(3 - x + 2*x^2)^(3/2))/(13934592*(5 + 2*x)^5) + (19414831*(3 - x + 2*x^2)^(3/2))/(4013162496*(5 + 2*x)^4) + (246159769*(3 - x + 2*x^2)^(3/2))/(866843099136*(5 + 2*x)^3) - (289071245*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(285315214344192*sqrt(2))]

    @test_int [(5 + 2*x)^1*(3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4), x, 8, (-6398163*(1 - 4*x)*sqrt(3 - x + 2*x^2))/2097152 - (92727*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/131072 + (69415*(5 + 2*x)^2*(3 - x + 2*x^2)^(5/2))/32256 - (1121*(5 + 2*x)^3*(3 - x + 2*x^2)^(5/2))/2304 + (5*(5 + 2*x)^4*(3 - x + 2*x^2)^(5/2))/144 - (3*(661397 + 215900*x)*(3 - x + 2*x^2)^(5/2))/143360 - (147157749*asinh((1 - 4*x)/sqrt(23)))/(4194304*sqrt(2))]
    @test_int [(5 + 2*x)^0*(3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4), x, 8, (-593193*(1 - 4*x)*sqrt(3 - x + 2*x^2))/1048576 - (8597*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/65536 + (1167*(3 - x + 2*x^2)^(5/2))/14336 + (125*x*(3 - x + 2*x^2)^(5/2))/3584 + (23*x^2*(3 - x + 2*x^2)^(5/2))/448 + (5*x^3*(3 - x + 2*x^2)^(5/2))/16 - (13643439*asinh((1 - 4*x)/sqrt(23)))/(2097152*sqrt(2))]
    @test_int [((3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^1, x, 10, ((141051019 - 23482924*x)*sqrt(3 - x + 2*x^2))/65536 + ((500141 - 123060*x)*(3 - x + 2*x^2)^(3/2))/12288 + (3505*(3 - x + 2*x^2)^(5/2))/896 - (311*(5 + 2*x)*(3 - x + 2*x^2)^(5/2))/448 + (5*(5 + 2*x)^2*(3 - x + 2*x^2)^(5/2))/112 + (1622009981*asinh((1 - 4*x)/sqrt(23)))/(131072*sqrt(2)) - (99009*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(8*sqrt(2))]
    @test_int [((3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^2, x, 10, -((85448933 - 14243732*x)*sqrt(3 - x + 2*x^2))/32768 - ((909513 - 226052*x)*(3 - x + 2*x^2)^(3/2))/18432 - (839*(3 - x + 2*x^2)^(5/2))/960 - (3667*(3 - x + 2*x^2)^(5/2))/(576*(5 + 2*x)) + (5*(5 + 2*x)*(3 - x + 2*x^2)^(5/2))/96 - (982669459*asinh((1 - 4*x)/sqrt(23)))/(65536*sqrt(2)) + (959625*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(64*sqrt(2))]
    @test_int [((3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^3, x, 10, ((33741483 - 5623292*x)*sqrt(3 - x + 2*x^2))/24576 + ((2154633 - 534617*x)*(3 - x + 2*x^2)^(3/2))/82944 + (3 - x + 2*x^2)^(5/2)/16 - (3667*(3 - x + 2*x^2)^(5/2))/(1152*(5 + 2*x)^2) + (438065*(3 - x + 2*x^2)^(5/2))/(82944*(5 + 2*x)) + (129342063*asinh((1 - 4*x)/sqrt(23)))/(16384*sqrt(2)) - (8083915*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(1024*sqrt(2))]
    @test_int [((3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^4, x, 10, -((135068604 - 22512089*x)*sqrt(3 - x + 2*x^2))/331776 - ((138006843 - 34265045*x)*(3 - x + 2*x^2)^(3/2))/17915904 - (3667*(3 - x + 2*x^2)^(5/2))/(1728*(5 + 2*x)^3) + (556255*(3 - x + 2*x^2)^(5/2))/(248832*(5 + 2*x)^2) - (32865365*(3 - x + 2*x^2)^(5/2))/(17915904*(5 + 2*x)) - (19176431*asinh((1 - 4*x)/sqrt(23)))/(8192*sqrt(2)) + (517762327*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(221184*sqrt(2))]
    @test_int [((3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^5, x, 10, ((2339916063 - 389975609*x)*sqrt(3 - x + 2*x^2))/31850496 + ((762984903 + 67865260*x)*(3 - x + 2*x^2)^(3/2))/(95551488*(5 + 2*x)) - (3667*(3 - x + 2*x^2)^(5/2))/(2304*(5 + 2*x)^4) + (224815*(3 - x + 2*x^2)^(5/2))/(165888*(5 + 2*x)^3) - (14477995*(3 - x + 2*x^2)^(5/2))/(23887872*(5 + 2*x)^2) + (432565*asinh((1 - 4*x)/sqrt(23)))/(1024*sqrt(2)) - (8969688643*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(21233664*sqrt(2))]
    @test_int [((3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^6, x, 10, -((5658774871 + 1028823716*x)*sqrt(3 - x + 2*x^2))/(127401984*(5 + 2*x)) + ((246012435 + 44773976*x)*(3 - x + 2*x^2)^(3/2))/(95551488*(5 + 2*x)^2) - (3667*(3 - x + 2*x^2)^(5/2))/(2880*(5 + 2*x)^5) + (158527*(3 - x + 2*x^2)^(5/2))/(165888*(5 + 2*x)^4) - (3730507*(3 - x + 2*x^2)^(5/2))/(11943936*(5 + 2*x)^3) - (23775*asinh((1 - 4*x)/sqrt(23)))/(512*sqrt(2)) + (70991525167*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(1528823808*sqrt(2))]
    @test_int [((3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^7, x, 10, ((151764102421 + 27596573612*x)*sqrt(3 - x + 2*x^2))/(55037657088*(5 + 2*x)) - ((9802984711 + 6793718806*x)*(3 - x + 2*x^2)^(3/2))/(13759414272*(5 + 2*x)^3) - (3667*(3 - x + 2*x^2)^(5/2))/(3456*(5 + 2*x)^6) + (182165*(3 - x + 2*x^2)^(5/2))/(248832*(5 + 2*x)^5) - (14087245*(3 - x + 2*x^2)^(5/2))/(71663616*(5 + 2*x)^4) + (369*asinh((1 - 4*x)/sqrt(23)))/(128*sqrt(2)) - (1903976002333*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(660451885056*sqrt(2))]
    @test_int [((3 - x + 2*x^2)^(3/2)*(2 + x + 3*x^2 - x^3 + 5*x^4))/(5 + 2*x)^8, x, 10, -((146583836191 + 101679102454*x)*sqrt(3 - x + 2*x^2))/(440301256704*(5 + 2*x)^2) - ((463558457 + 411822458*x)*(3 - x + 2*x^2)^(3/2))/(2293235712*(5 + 2*x)^4) - (3667*(3 - x + 2*x^2)^(5/2))/(4032*(5 + 2*x)^7) + (114335*(3 - x + 2*x^2)^(5/2))/(193536*(5 + 2*x)^6) - (1930441*(3 - x + 2*x^2)^(5/2))/(13934592*(5 + 2*x)^5) - (5*asinh((1 - 4*x)/sqrt(23)))/(64*sqrt(2)) + (412760561351*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(5283615080448*sqrt(2))]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(5 + 2*x)^1*(2 + x + 3*x^2 - x^3 + 5*x^4)/sqrt(3 - x + 2*x^2), x, 6, (761*(5 + 2*x)^2*sqrt(3 - x + 2*x^2))/256 - (105*(5 + 2*x)^3*sqrt(3 - x + 2*x^2))/128 + ((5 + 2*x)^4*sqrt(3 - x + 2*x^2))/16 - ((19227 + 4676*x)*sqrt(3 - x + 2*x^2))/2048 - (85429*asinh((1 - 4*x)/sqrt(23)))/(4096*sqrt(2))]
    @test_int [(5 + 2*x)^0*(2 + x + 3*x^2 - x^3 + 5*x^4)/sqrt(3 - x + 2*x^2), x, 6, (-505*sqrt(3 - x + 2*x^2))/1024 - (409*x*sqrt(3 - x + 2*x^2))/768 + (19*x^2*sqrt(3 - x + 2*x^2))/96 + (5*x^3*sqrt(3 - x + 2*x^2))/8 - (6863*asinh((1 - 4*x)/sqrt(23)))/(2048*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^1*sqrt(3 - x + 2*x^2)), x, 8, (1669*sqrt(3 - x + 2*x^2))/128 - (337*(5 + 2*x)*sqrt(3 - x + 2*x^2))/192 + (5*(5 + 2*x)^2*sqrt(3 - x + 2*x^2))/48 + (9657*asinh((1 - 4*x)/sqrt(23)))/(256*sqrt(2)) - (3667*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(96*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^2*sqrt(3 - x + 2*x^2)), x, 8, (-243*sqrt(3 - x + 2*x^2))/64 - (3667*sqrt(3 - x + 2*x^2))/(576*(5 + 2*x)) + (5*(5 + 2*x)*sqrt(3 - x + 2*x^2))/32 - (2943*asinh((1 - 4*x)/sqrt(23)))/(128*sqrt(2)) + (158527*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(6912*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^3*sqrt(3 - x + 2*x^2)), x, 8, (5*sqrt(3 - x + 2*x^2))/16 - (3667*sqrt(3 - x + 2*x^2))/(1152*(5 + 2*x)^2) + (92239*sqrt(3 - x + 2*x^2))/(27648*(5 + 2*x)) + (149*asinh((1 - 4*x)/sqrt(23)))/(32*sqrt(2)) - (1546507*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(331776*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^4*sqrt(3 - x + 2*x^2)), x, 8, (-3667*sqrt(3 - x + 2*x^2))/(1728*(5 + 2*x)^3) + (394907*sqrt(3 - x + 2*x^2))/(248832*(5 + 2*x)^2) - (3163415*sqrt(3 - x + 2*x^2))/(5971968*(5 + 2*x)) - (5*asinh((1 - 4*x)/sqrt(23)))/(16*sqrt(2)) + (22389491*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(71663616*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^5*sqrt(3 - x + 2*x^2)), x, 6, (-3667*sqrt(3 - x + 2*x^2))/(2304*(5 + 2*x)^4) + (513097*sqrt(3 - x + 2*x^2))/(497664*(5 + 2*x)^3) - (16295969*sqrt(3 - x + 2*x^2))/(71663616*(5 + 2*x)^2) + (26800085*sqrt(3 - x + 2*x^2))/(1719926784*(5 + 2*x)) + (2053207*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(20639121408*sqrt(2))]

    @test_int [(5 + 2*x)^2*(2 + x + 3*x^2 - x^3 + 5*x^4)/(3 - x + 2*x^2)^(3/2), x, 7, (-4*(346 - 533*x))/(23*sqrt(3 - x + 2*x^2)) - (13153*sqrt(3 - x + 2*x^2))/512 + (2645*x*sqrt(3 - x + 2*x^2))/128 + (153*x^2*sqrt(3 - x + 2*x^2))/16 + (5*x^3*sqrt(3 - x + 2*x^2))/4 + (144217*asinh((1 - 4*x)/sqrt(23)))/(1024*sqrt(2))]
    @test_int [(5 + 2*x)^1*(2 + x + 3*x^2 - x^3 + 5*x^4)/(3 - x + 2*x^2)^(3/2), x, 6, -(53 - 373*x)/(23*sqrt(3 - x + 2*x^2)) + (33*sqrt(3 - x + 2*x^2))/64 + (193*x*sqrt(3 - x + 2*x^2))/48 + (5*x^2*sqrt(3 - x + 2*x^2))/6 + (3111*asinh((1 - 4*x)/sqrt(23)))/(128*sqrt(2))]
    @test_int [(5 + 2*x)^0*(2 + x + 3*x^2 - x^3 + 5*x^4)/(3 - x + 2*x^2)^(3/2), x, 5, (89 + 219*x)/(92*sqrt(3 - x + 2*x^2)) + (27*sqrt(3 - x + 2*x^2))/32 + (5*x*sqrt(3 - x + 2*x^2))/8 + (213*asinh((1 - 4*x)/sqrt(23)))/(64*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^1*(3 - x + 2*x^2)^(3/2)), x, 7, (1191 + 917*x)/(3312*sqrt(3 - x + 2*x^2)) + (5*sqrt(3 - x + 2*x^2))/8 + (39*asinh((1 - 4*x)/sqrt(23)))/(16*sqrt(2)) - (3667*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(1728*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^2*(3 - x + 2*x^2)^(3/2)), x, 7, (9897 + 2203*x)/(119232*sqrt(3 - x + 2*x^2)) - (3667*sqrt(3 - x + 2*x^2))/(10368*(5 + 2*x)) - (5*asinh((1 - 4*x)/sqrt(23)))/(8*sqrt(2)) + (25951*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(41472*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^3*(3 - x + 2*x^2)^(3/2)), x, 5, (65991 - 8779*x)/(4292352*sqrt(3 - x + 2*x^2)) - (3667*sqrt(3 - x + 2*x^2))/(20736*(5 + 2*x)^2) + (115369*sqrt(3 - x + 2*x^2))/(1492992*(5 + 2*x)) - (52631*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(5971968*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^4*(3 - x + 2*x^2)^(3/2)), x, 6, (369609 - 175877*x)/(154524672*sqrt(3 - x + 2*x^2)) - (3667*sqrt(3 - x + 2*x^2))/(31104*(5 + 2*x)^3) + (152885*sqrt(3 - x + 2*x^2))/(4478976*(5 + 2*x)^2) + (430799*sqrt(3 - x + 2*x^2))/(107495424*(5 + 2*x)) - (3505819*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(1289945088*sqrt(2))]

    @test_int [(5 + 2*x)^2*(2 + x + 3*x^2 - x^3 + 5*x^4)/(3 - x + 2*x^2)^(5/2), x, 6, (-4*(346 - 533*x))/(69*(3 - x + 2*x^2)^(3/2)) + (4*(18982 - 20383*x))/(1587*sqrt(3 - x + 2*x^2)) + (247*sqrt(3 - x + 2*x^2))/16 + (5*x*sqrt(3 - x + 2*x^2))/4 - (1471*asinh((1 - 4*x)/sqrt(23)))/(32*sqrt(2))]
    @test_int [(5 + 2*x)^1*(2 + x + 3*x^2 - x^3 + 5*x^4)/(3 - x + 2*x^2)^(5/2), x, 5, -(53 - 373*x)/(69*(3 - x + 2*x^2)^(3/2)) + (6055 - 28981*x)/(3174*sqrt(3 - x + 2*x^2)) + (5*sqrt(3 - x + 2*x^2))/4 - (71*asinh((1 - 4*x)/sqrt(23)))/(8*sqrt(2))]
    @test_int [(5 + 2*x)^0*(2 + x + 3*x^2 - x^3 + 5*x^4)/(3 - x + 2*x^2)^(5/2), x, 5, (89 + 219*x)/(276*(3 - x + 2*x^2)^(3/2)) - (1465 + 2604*x)/(2116*sqrt(3 - x + 2*x^2)) - (5*asinh((1 - 4*x)/sqrt(23)))/(4*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^1*(3 - x + 2*x^2)^(5/2)), x, 5, (1191 + 917*x)/(9936*(3 - x + 2*x^2)^(3/2)) - (335337 + 146729*x)/(1371168*sqrt(3 - x + 2*x^2)) - (3667*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(31104*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^2*(3 - x + 2*x^2)^(5/2)), x, 5, (9897 + 2203*x)/(357696*(3 - x + 2*x^2)^(3/2)) - (1255878 - 62021*x)/(24681024*sqrt(3 - x + 2*x^2)) - (3667*sqrt(3 - x + 2*x^2))/(186624*(5 + 2*x)) - (2821*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(2239488*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^3*(3 - x + 2*x^2)^(5/2)), x, 6, (65991 - 8779*x)/(12877056*(3 - x + 2*x^2)^(3/2)) - (4679797 - 2148263*x)/(592344576*sqrt(3 - x + 2*x^2)) - (3667*sqrt(3 - x + 2*x^2))/(373248*(5 + 2*x)^2) - (45979*sqrt(3 - x + 2*x^2))/(26873856*(5 + 2*x)) + (774079*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(322486272*sqrt(2))]
    @test_int [(2 + x + 3*x^2 - x^3 + 5*x^4)/((5 + 2*x)^4*(3 - x + 2*x^2)^(5/2)), x, 7, (369609 - 175877*x)/(463574016*(3 - x + 2*x^2)^(3/2)) - (27754539 - 31190998*x)/(31986607104*sqrt(3 - x + 2*x^2)) - (3667*sqrt(3 - x + 2*x^2))/(559872*(5 + 2*x)^3) - (89137*sqrt(3 - x + 2*x^2))/(80621568*(5 + 2*x)^2) + (475357*sqrt(3 - x + 2*x^2))/(1934917632*(5 + 2*x)) + (4778789*atanh((17 - 22*x)/(12*sqrt(2)*sqrt(3 - x + 2*x^2))))/(7739670528*sqrt(2))]

    #= Note: Tests*the*case*when*q+2*p+1==0.0. =#
    @test_int [(f + g*x + h*x^2 + i*x^3 + j*x^4)/(a + b*x + c*x^2)^(5/2), x, 5, (2*(a*b^2*c*i + 2*a*c^2*(c*g - a*i) - a*b^3*j - b*c*(c^2*f + a*c*h - 3*a^2*j) - (2*c^4*f - c^3*(b*g + 2*a*h) + b^4*j - b^2*c*(b*i + 4*a*j) + c^2*(b^2*h + 3*a*b*i + 2*a^2*j))*x))/(3*c^3*(b^2 - 4*a*c)*(a + b*x + c*x^2)^(3/2)) - (2*(b^4*c*i + 24*a^2*c^3*i + 2*b^2*c^2*(2*c*g - 3*a*i) - b^5*j - b^3*c*(c*h - 10*a*j) - 4*b*c^2*(2*c^2*f + a*c*h + 8*a^2*j) - c*(16*c^4*f - c^3*(8*b*g - 8*a*h) - 4*b^4*j + b^2*c*(b*i + 28*a*j) + 2*c^2*(b^2*h - 6*a*b*i - 16*a^2*j))*x))/(3*c^3*(b^2 - 4*a*c)^2*sqrt(a + b*x + c*x^2)) + (j*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/c^(5/2)]
    @test_int [(f + g*x + h*x^2 + i*x^3 + j*x^4)/(a + b*x - c*x^2)^(5/2), x, 5, (2*(a*b^2*c*i + 2*a*c^2*(c*g + a*i) + a*b^3*j - b*c*(c^2*f - a*c*h - 3*a^2*j) + (2*c^4*f + c^3*(b*g + 2*a*h) + b^4*j + b^2*c*(b*i + 4*a*j) + c^2*(b^2*h + 3*a*b*i + 2*a^2*j))*x))/(3*c^3*(b^2 + 4*a*c)*(a + b*x - c*x^2)^(3/2)) - (2*(b^4*c*i + 24*a^2*c^3*i + 2*b^2*c^2*(2*c*g + 3*a*i) + b^5*j + b^3*c*(c*h + 10*a*j) + 4*b*c^2*(2*c^2*f - a*c*h + 8*a^2*j) - c*(16*c^4*f + 8*c^3*(b*g - a*h) - 4*b^4*j - b^2*c*(b*i + 28*a*j) + 2*c^2*(b^2*h - 6*a*b*i - 16*a^2*j))*x))/(3*c^3*(b^2 + 4*a*c)^2*sqrt(a + b*x - c*x^2)) - (j*atan((b - 2*c*x)/(2*sqrt(c)*sqrt(a + b*x - c*x^2))))/c^(5/2)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P4(x)*(d+e*x)^m*(a+b*x+c*x^2)^p*with*m*symbolic=#

    @test_int [(d + e*x)^m*(3 + 2*x + 5*x^2)^3*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, ((5*d^2 - 2*d*e + 3*e^2)^3*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*(d + e*x)^(1 + m))/(e^11*(1 + m)) - ((5*d^2 - 2*d*e + 3*e^2)^2*(200*d^5 + 169*d^4*e + 108*d^3*e^2 - 20*d^2*e^3 + 86*d*e^4 - 15*e^5)*(d + e*x)^(2 + m))/(e^11*(2 + m)) + (3*(5*d^2 - 2*d*e + 3*e^2)*(1500*d^6 + 660*d^5*e + 792*d^4*e^2 + 58*d^3*e^3 + 547*d^2*e^4 - 156*d*e^5 + 53*e^6)*(d + e*x)^(3 + m))/(e^11*(3 + m)) - (2*(30000*d^7 + 1050*d^6*e + 21420*d^5*e^2 + 1715*d^4*e^3 + 9990*d^3*e^4 - 2550*d^2*e^5 + 2218*d*e^6 - 287*e^7)*(d + e*x)^(4 + m))/(e^11*(4 + m)) + ((105000*d^6 + 3150*d^5*e + 53550*d^4*e^2 + 3430*d^3*e^3 + 14985*d^2*e^4 - 2550*d*e^5 + 1109*e^6)*(d + e*x)^(5 + m))/(e^11*(5 + m)) - (6*(21000*d^5 + 525*d^4*e + 7140*d^3*e^2 + 343*d^2*e^3 + 999*d*e^4 - 85*e^5)*(d + e*x)^(6 + m))/(e^11*(6 + m)) + ((105000*d^4 + 2100*d^3*e + 21420*d^2*e^2 + 686*d*e^3 + 999*e^4)*(d + e*x)^(7 + m))/(e^11*(7 + m)) - (2*(30000*d^3 + 450*d^2*e + 3060*d*e^2 + 49*e^3)*(d + e*x)^(8 + m))/(e^11*(8 + m)) + (45*(500*d^2 + 5*d*e + 17*e^2)*(d + e*x)^(9 + m))/(e^11*(9 + m)) - (25*(200*d + e)*(d + e*x)^(10 + m))/(e^11*(10 + m)) + (500*(d + e*x)^(11 + m))/(e^11*(11 + m))]
    @test_int [(d + e*x)^m*(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, ((5*d^2 - 2*d*e + 3*e^2)^2*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*(d + e*x)^(1 + m))/(e^9*(1 + m)) - ((5*d^2 - 2*d*e + 3*e^2)*(160*d^5 + 127*d^4*e + 88*d^3*e^2 - 4*d^2*e^3 + 64*d*e^4 - 11*e^5)*(d + e*x)^(2 + m))/(e^9*(2 + m)) + ((2800*d^6 + 945*d^5*e + 1665*d^4*e^2 + 370*d^3*e^3 + 888*d^2*e^4 - 195*d*e^5 + 107*e^6)*(d + e*x)^(3 + m))/(e^9*(3 + m)) - ((5600*d^5 + 1575*d^4*e + 2220*d^3*e^2 + 370*d^2*e^3 + 592*d*e^4 - 65*e^5)*(d + e*x)^(4 + m))/(e^9*(4 + m)) + ((7000*d^4 + 1575*d^3*e + 1665*d^2*e^2 + 185*d*e^3 + 148*e^4)*(d + e*x)^(5 + m))/(e^9*(5 + m)) - ((5600*d^3 + 945*d^2*e + 666*d*e^2 + 37*e^3)*(d + e*x)^(6 + m))/(e^9*(6 + m)) + ((2800*d^2 + 315*d*e + 111*e^2)*(d + e*x)^(7 + m))/(e^9*(7 + m)) - (5*(160*d + 9*e)*(d + e*x)^(8 + m))/(e^9*(8 + m)) + (100*(d + e*x)^(9 + m))/(e^9*(9 + m))]
    @test_int [(d + e*x)^m*(3 + 2*x + 5*x^2)^1*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 2, ((5*d^2 - 2*d*e + 3*e^2)*(4*d^4 + 5*d^3*e + 3*d^2*e^2 - d*e^3 + 2*e^4)*(d + e*x)^(1 + m))/(e^7*(1 + m)) - ((120*d^5 + 85*d^4*e + 68*d^3*e^2 + 12*d^2*e^3 + 42*d*e^4 - 7*e^5)*(d + e*x)^(2 + m))/(e^7*(2 + m)) + ((300*d^4 + 170*d^3*e + 102*d^2*e^2 + 12*d*e^3 + 21*e^4)*(d + e*x)^(3 + m))/(e^7*(3 + m)) - (2*(200*d^3 + 85*d^2*e + 34*d*e^2 + 2*e^3)*(d + e*x)^(4 + m))/(e^7*(4 + m)) + ((300*d^2 + 85*d*e + 17*e^2)*(d + e*x)^(5 + m))/(e^7*(5 + m)) - ((120*d + 17*e)*(d + e*x)^(6 + m))/(e^7*(6 + m)) + (20*(d + e*x)^(7 + m))/(e^7*(7 + m))]
    @test_int [(d + e*x)^m/(3 + 2*x + 5*x^2)^1*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 4, ((100*d^2 + 165*d*e + 81*e^2)*(d + e*x)^(1 + m))/(125*e^3*(1 + m)) - ((40*d + 33*e)*(d + e*x)^(2 + m))/(25*e^3*(2 + m)) + (4*(d + e*x)^(3 + m))/(5*e^3*(3 + m)) - ((6412*im - 423*sqrt(14))*(d + e*x)^(1 + m)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, (5*(d + e*x))/(5*d - e + im*sqrt(14)*e)))/(3500*(5*im*d - (im + sqrt(14))*e)*(1 + m)) - ((6412*im + 423*sqrt(14))*(d + e*x)^(1 + m)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, (5*(d + e*x))/(5*d - (1 + im*sqrt(14))*e)))/(3500*(5*im*d - (im - sqrt(14))*e)*(1 + m))]
    @test_int [(d + e*x)^m/(3 + 2*x + 5*x^2)^2*(2 + 1*x + 3*x^2 - 5*x^3 + 4*x^4), x, 5, (4*(d + e*x)^(1 + m))/(25*e*(1 + m)) - ((1367*d - 293*e + (423*d - 1367*e)*x)*(d + e*x)^(1 + m))/(700*(5*d^2 - 2*d*e + 3*e^2)*(3 + 2*x + 5*x^2)) + ((80360*d^2 - 32144*d*e + 48216*e^2 + im*sqrt(14)*(6565*d^2 - 2*d*e*(1313 - 3206*m) + e^2*(3939 - 98*m)) - 5922*d*e*m + 19138*e^2*m)*(d + e*x)^(1 + m)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, (5*(d + e*x))/(5*d - e + im*sqrt(14)*e)))/(19600*(5*d + im*(im + sqrt(14))*e)*(5*d^2 - 2*d*e + 3*e^2)*(1 + m)) + ((80360*d^2 - 32144*d*e + 48216*e^2 - im*sqrt(14)*(6565*d^2 - 2*d*e*(1313 - 3206*m) + e^2*(3939 - 98*m)) - 5922*d*e*m + 19138*e^2*m)*(d + e*x)^(1 + m)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, (5*(d + e*x))/(5*d - (1 + im*sqrt(14))*e)))/(19600*(5*d - (1 + im*sqrt(14))*e)*(5*d^2 - 2*d*e + 3*e^2)*(1 + m))]

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*Pq(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*Pq(x)*(d+e*x)^m*(a+b*x+c*x^2)^p=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*x^m*Pq(x)*(a+b*x+c*x^2)^p=#

    #= ::Subsubsection:: =#
    #=p>0=#

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    #= Note: Tests*the*case*when*q+2*p+1==0.0. =#
    @test_int [(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5)/(a + b*x + c*x^2)^3, x, 6, -((a*b^3*c*h + b*c^2*(c^2*d + a*c*f - 3*a^2*h) - a*b^4*i - a*b^2*c*(c*g - 4*a*i) - 2*a*c^2*(c^2*e - a*c*g + a^2*i) + (2*c^5*d - c^4*(b*e + 2*a*f) + c^3*(b^2*f + 3*a*b*g + 2*a^2*h) - b^5*i + b^3*c*(b*h + 5*a*i) - b*c^2*(b^2*g + 4*a*b*h + 5*a^2*i))*x)/(2*c^4*(b^2 - 4*a*c)*(a + b*x + c*x^2)^2)) + (1/(2*c^4*(b^2 - 4*a*c)^2*(a + b*x + c*x^2)))*(b^5*c*h + b^3*c^2*(c*f - 8*a*h) + 2*b*c^3*(3*c^2*d + a*c*f + 11*a^2*h) - b^6*i - b^4*c*(c*g - 11*a*i) - 16*a^2*c^3*(c*g - 2*a*i) - b^2*c^2*(3*c^2*e - 5*a*c*g + 39*a^2*i) + 2*c*(6*c^5*d - c^4*(3*b*e - 2*a*f) + c^3*(b^2*f - 3*a*b*g - 10*a^2*h) + 2*b^5*i - b^3*c*(b*h + 15*a*i) + a*b*c^2*(8*b*h + 25*a*i))*x) - ((12*c^5*d - c^4*(6*b*e - 4*a*f) + 2*c^3*(b^2*f - 3*a*b*g + 6*a^2*h) - b^5*i + 10*a*b^3*c*i - 30*a^2*b*c^2*i)*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c)))/(c^3*(b^2 - 4*a*c)^(5/2)) + (i*log(a + b*x + c*x^2))/(2*c^3)]

    @test_int [(d + e*x + f*x^2 + g*x^3 + h*x^4 + j*x^5 + k*x^6 + l*x^7 + m*x^8)/(a + b*x + c*x^2), x, 6, ((c^6*f - c^5*(b*g + a*h) + c^4*(b^2*h + 2*a*b*j + a^2*k) + b^6*m - b^4*c*(b*l + 5*a*m) + b^2*c^2*(b^2*k + 4*a*b*l + 6*a^2*m) - c^3*(b^3*j + 3*a*b^2*k + 3*a^2*b*l + a^3*m))*x)/c^7 + ((c^5*g - c^4*(b*h + a*j) + c^3*(b^2*j + 2*a*b*k + a^2*l) - b^5*m + b^3*c*(b*l + 4*a*m) - b*c^2*(b^2*k + 3*a*b*l + 3*a^2*m))*x^2)/(2*c^6) + ((c^4*h - c^3*(b*j + a*k) + b^4*m - b^2*c*(b*l + 3*a*m) + c^2*(b^2*k + 2*a*b*l + a^2*m))*x^3)/(3*c^5) + ((c^3*j - c^2*(b*k + a*l) - b^3*m + b*c*(b*l + 2*a*m))*x^4)/(4*c^4) + ((c^2*k + b^2*m - c*(b*l + a*m))*x^5)/(5*c^3) + ((c*l - b*m)*x^6)/(6*c^2) + (m*x^7)/(7*c) - (1/(c^8*sqrt(b^2 - 4*a*c)))*((2*c^8*d - c^7*(b*e + 2*a*f) + c^6*(b^2*f + 3*a*b*g + 2*a^2*h) - c^5*(b^3*g + 4*a*b^2*h + 5*a^2*b*j + 2*a^3*k) + b^8*m - b^6*c*(b*l + 8*a*m) + b^4*c^2*(b^2*k + 7*a*b*l + 20*a^2*m) - b^2*c^3*(b^3*j + 6*a*b^2*k + 14*a^2*b*l + 16*a^3*m) + c^4*(b^4*h + 5*a*b^3*j + 9*a^2*b^2*k + 7*a^3*b*l + 2*a^4*m))*atanh((b + 2*c*x)/sqrt(b^2 - 4*a*c))) + ((c^7*e - c^6*(b*f + a*g) + c^5*(b^2*g + 2*a*b*h + a^2*j) - c^4*(b^3*h + 3*a*b^2*j + 3*a^2*b*k + a^3*l) - b^7*m + b^5*c*(b*l + 6*a*m) - b^3*c^2*(b^2*k + 5*a*b*l + 10*a^2*m) + b*c^3*(b^3*j + 4*a*b^2*k + 6*a^2*b*l + 4*a^3*m))*log(a + b*x + c*x^2))/(2*c^8)]

    #= ::Subsection:: =#
    #=Integrands*of*the*form*x^m*Pq(x)*(a+b*x+c*x^2)^(p/2)=#

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*Pq(x)*(d+e*x+f*x^2)^m*(a+b*x+c*x^2)^p=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*Pq(x)*(d+e*x+f*x^2)^m*(a+b*x+c*x^2)^p=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d+e*x+f*x^2)^m*Pq(x)*(a+b*x+c*x^2)^(p/2)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [(1 + 4*x - 7*x^2)^3*(2 + 5*x + x^2)*sqrt(3 + 2*x + 5*x^2), x, 11, -((77159983*(1 + 5*x)*sqrt(3 + 2*x + 5*x^2))/31250000) - (1968340667*(3 + 2*x + 5*x^2)^(3/2))/131250000 + (1045360143*x*(3 + 2*x + 5*x^2)^(3/2))/43750000 + (98060877*x^2*(3 + 2*x + 5*x^2)^(3/2))/4375000 - (90960857*x^3*(3 + 2*x + 5*x^2)^(3/2))/1575000 - (888751*x^4*(3 + 2*x + 5*x^2)^(3/2))/105000 + (190939*x^5*(3 + 2*x + 5*x^2)^(3/2))/3000 - (50519*x^6*(3 + 2*x + 5*x^2)^(3/2))/2250 - (343/50)*x^7*(3 + 2*x + 5*x^2)^(3/2) - (540119881*asinh((1 + 5*x)/sqrt(14)))/(15625000*sqrt(5))]
    @test_int [(1 + 4*x - 7*x^2)^2*(2 + 5*x + x^2)*sqrt(3 + 2*x + 5*x^2), x, 9, -((2521723*(1 + 5*x)*sqrt(3 + 2*x + 5*x^2))/1250000) + (198439*(3 + 2*x + 5*x^2)^(3/2))/750000 + (1781669*x*(3 + 2*x + 5*x^2)^(3/2))/250000 - (77509*x^2*(3 + 2*x + 5*x^2)^(3/2))/25000 - (25277*x^3*(3 + 2*x + 5*x^2)^(3/2))/3000 + (989/200)*x^4*(3 + 2*x + 5*x^2)^(3/2) + (49/40)*x^5*(3 + 2*x + 5*x^2)^(3/2) - (17652061*asinh((1 + 5*x)/sqrt(14)))/(625000*sqrt(5))]
    @test_int [(1 + 4*x - 7*x^2)^1*(2 + 5*x + x^2)*sqrt(3 + 2*x + 5*x^2), x, 7, -((4633*(1 + 5*x)*sqrt(3 + 2*x + 5*x^2))/12500) + (7819*(3 + 2*x + 5*x^2)^(3/2))/7500 + (2149*x*(3 + 2*x + 5*x^2)^(3/2))/2500 - (289/250)*x^2*(3 + 2*x + 5*x^2)^(3/2) - (7/30)*x^3*(3 + 2*x + 5*x^2)^(3/2) - (32431*asinh((1 + 5*x)/sqrt(14)))/(6250*sqrt(5))]
    @test_int [((2 + 5*x + x^2)*sqrt(3 + 2*x + 5*x^2))/(1 + 4*x - 7*x^2)^1, x, 9, (-(1/490))*(397 + 35*x)*sqrt(3 + 2*x + 5*x^2) - (8233*asinh((1 + 5*x)/sqrt(14)))/(1715*sqrt(5)) - (3/343)*sqrt((1/11)*(497041 - 146555*sqrt(11)))*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))) + (3/343)*sqrt((1/11)*(497041 + 146555*sqrt(11)))*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2)))]
    @test_int [((2 + 5*x + x^2)*sqrt(3 + 2*x + 5*x^2))/(1 + 4*x - 7*x^2)^2, x, 9, (3*(3 + 61*x)*sqrt(3 + 2*x + 5*x^2))/(154*(1 + 4*x - 7*x^2)) + (1/49)*sqrt(5)*asinh((1 + 5*x)/sqrt(14)) - (sqrt((325022311 + 39132731*sqrt(11))/1397)*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/2156 + (sqrt((325022311 - 39132731*sqrt(11))/1397)*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/2156]
    @test_int [((2 + 5*x + x^2)*sqrt(3 + 2*x + 5*x^2))/(1 + 4*x - 7*x^2)^3, x, 7, (3*(3 + 61*x)*sqrt(3 + 2*x + 5*x^2))/(308*(1 + 4*x - 7*x^2)^2) - ((272941 - 813113*x)*sqrt(3 + 2*x + 5*x^2))/(1721104*(1 + 4*x - 7*x^2)) - (sqrt((6492253020949 - 11879169071*sqrt(11))/1397)*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/491744 + (sqrt((6492253020949 + 11879169071*sqrt(11))/1397)*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/491744]

    @test_int [(1 + 4*x - 7*x^2)^3*(2 + 5*x + x^2)*(3 + 2*x + 5*x^2)^(3/2), x, 12, -((479652579*(1 + 5*x)*sqrt(3 + 2*x + 5*x^2))/312500000) - (22840599*(1 + 5*x)*(3 + 2*x + 5*x^2)^(3/2))/62500000 - (6133820867*(3 + 2*x + 5*x^2)^(5/2))/1203125000 + (837379699*x*(3 + 2*x + 5*x^2)^(5/2))/72187500 + (2173004363*x^2*(3 + 2*x + 5*x^2)^(5/2))/173250000 - (190236913*x^3*(3 + 2*x + 5*x^2)^(5/2))/4950000 - (796559*x^4*(3 + 2*x + 5*x^2)^(5/2))/123750 + (1031177*x^5*(3 + 2*x + 5*x^2)^(5/2))/20625 - (61103*x^6*(3 + 2*x + 5*x^2)^(5/2))/3300 - (343/60)*x^7*(3 + 2*x + 5*x^2)^(5/2) - (3357568053*asinh((1 + 5*x)/sqrt(14)))/(156250000*sqrt(5))]
    @test_int [(1 + 4*x - 7*x^2)^2*(2 + 5*x + x^2)*(3 + 2*x + 5*x^2)^(3/2), x, 10, -((14501781*(1 + 5*x)*sqrt(3 + 2*x + 5*x^2))/6250000) - (690561*(1 + 5*x)*(3 + 2*x + 5*x^2)^(3/2))/1250000 + (505667*(3 + 2*x + 5*x^2)^(5/2))/2187500 + (86721*x*(3 + 2*x + 5*x^2)^(5/2))/21875 - (219271*x^2*(3 + 2*x + 5*x^2)^(5/2))/105000 - (18379*x^3*(3 + 2*x + 5*x^2)^(5/2))/3000 + (581/150)*x^4*(3 + 2*x + 5*x^2)^(5/2) + (49/50)*x^5*(3 + 2*x + 5*x^2)^(5/2) - (101512467*asinh((1 + 5*x)/sqrt(14)))/(3125000*sqrt(5))]
    @test_int [(1 + 4*x - 7*x^2)^1*(2 + 5*x + x^2)*(3 + 2*x + 5*x^2)^(3/2), x, 8, -((128779*(1 + 5*x)*sqrt(3 + 2*x + 5*x^2))/250000) - (18397*(1 + 5*x)*(3 + 2*x + 5*x^2)^(3/2))/150000 + (149509*(3 + 2*x + 5*x^2)^(5/2))/262500 + (2809*x*(3 + 2*x + 5*x^2)^(5/2))/5250 - (1163*x^2*(3 + 2*x + 5*x^2)^(5/2))/1400 - (7/40)*x^3*(3 + 2*x + 5*x^2)^(5/2) - (901453*asinh((1 + 5*x)/sqrt(14)))/(125000*sqrt(5))]
    @test_int [((2 + 5*x + x^2)*(3 + 2*x + 5*x^2)^(3/2))/(1 + 4*x - 7*x^2)^1, x, 10, -((3*(571621 + 196105*x)*sqrt(3 + 2*x + 5*x^2))/240100) - (1/980)*(267 + 35*x)*(3 + 2*x + 5*x^2)^(3/2) - (34425687*asinh((1 + 5*x)/sqrt(14)))/(840350*sqrt(5)) - (6*sqrt((2/11)*(8098902607 - 2434122235*sqrt(11)))*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/16807 + (6*sqrt((2/11)*(8098902607 + 2434122235*sqrt(11)))*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/16807]
    @test_int [((2 + 5*x + x^2)*(3 + 2*x + 5*x^2)^(3/2))/(1 + 4*x - 7*x^2)^2, x, 10, ((5826 + 3395*x)*sqrt(3 + 2*x + 5*x^2))/3773 + (3*(3 + 61*x)*(3 + 2*x + 5*x^2)^(3/2))/(154*(1 + 4*x - 7*x^2)) + (16691*asinh((1 + 5*x)/sqrt(14)))/(2401*sqrt(5)) - (sqrt((1/22)*(52175400311 - 13155376531*sqrt(11)))*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/26411 - (sqrt((1/22)*(52175400311 + 13155376531*sqrt(11)))*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/26411]
    @test_int [((2 + 5*x + x^2)*(3 + 2*x + 5*x^2)^(3/2))/(1 + 4*x - 7*x^2)^3, x, 10, -(((9495 - 37088*x)*sqrt(3 + 2*x + 5*x^2))/(23716*(1 + 4*x - 7*x^2))) + (3*(3 + 61*x)*(3 + 2*x + 5*x^2)^(3/2))/(308*(1 + 4*x - 7*x^2)^2) - (5/343)*sqrt(5)*asinh((1 + 5*x)/sqrt(14)) - (sqrt((62294197250171 - 2085440742055*sqrt(11))/2794)*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/332024 + (sqrt((62294197250171 + 2085440742055*sqrt(11))/2794)*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/332024]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [((1 + 4*x - 7*x^2)^3*(2 + 5*x + x^2))/sqrt(3 + 2*x + 5*x^2), x, 10, -((16515809*sqrt(3 + 2*x + 5*x^2))/156250) + (5793077*x*sqrt(3 + 2*x + 5*x^2))/75000 + (40722851*x^2*sqrt(3 + 2*x + 5*x^2))/750000 - (5160533*x^3*sqrt(3 + 2*x + 5*x^2))/50000 - (47807*x^4*sqrt(3 + 2*x + 5*x^2))/3750 + (26159/300)*x^5*sqrt(3 + 2*x + 5*x^2) - (1141/40)*x^6*sqrt(3 + 2*x + 5*x^2) - (343/40)*x^7*sqrt(3 + 2*x + 5*x^2) - (77513689*asinh((1 + 5*x)/sqrt(14)))/(625000*sqrt(5))]
    @test_int [((1 + 4*x - 7*x^2)^2*(2 + 5*x + x^2))/sqrt(3 + 2*x + 5*x^2), x, 8, -((22053*sqrt(3 + 2*x + 5*x^2))/31250) + (36073*x*sqrt(3 + 2*x + 5*x^2))/1875 - (207427*x^2*sqrt(3 + 2*x + 5*x^2))/37500 - (33259*x^3*sqrt(3 + 2*x + 5*x^2))/2500 + (5131/750)*x^4*sqrt(3 + 2*x + 5*x^2) + (49/30)*x^5*sqrt(3 + 2*x + 5*x^2) - (1719097*asinh((1 + 5*x)/sqrt(14)))/(31250*sqrt(5))]
    @test_int [((1 + 4*x - 7*x^2)^1*(2 + 5*x + x^2))/sqrt(3 + 2*x + 5*x^2), x, 6, (463/125)*sqrt(3 + 2*x + 5*x^2) + (59/30)*x*sqrt(3 + 2*x + 5*x^2) - (571/300)*x^2*sqrt(3 + 2*x + 5*x^2) - (7/20)*x^3*sqrt(3 + 2*x + 5*x^2) - (1901*asinh((1 + 5*x)/sqrt(14)))/(250*sqrt(5))]
    @test_int [(2 + 5*x + x^2)/((1 + 4*x - 7*x^2)^1*sqrt(3 + 2*x + 5*x^2)), x, 8, -(asinh((1 + 5*x)/sqrt(14))/(7*sqrt(5))) - (3/14)*sqrt((4091 - 1055*sqrt(11))/2794)*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))) + (3/14)*sqrt((4091 + 1055*sqrt(11))/2794)*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2)))]
    @test_int [(2 + 5*x + x^2)/((1 + 4*x - 7*x^2)^2*sqrt(3 + 2*x + 5*x^2)), x, 6, -((3*(40 - 371*x)*sqrt(3 + 2*x + 5*x^2))/(5588*(1 + 4*x - 7*x^2))) - (sqrt((3027900955 + 14035681*sqrt(11))/2794)*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/11176 + (sqrt((3027900955 - 14035681*sqrt(11))/2794)*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/11176]
    @test_int [(2 + 5*x + x^2)/((1 + 4*x - 7*x^2)^3*sqrt(3 + 2*x + 5*x^2)), x, 7, -((3*(40 - 371*x)*sqrt(3 + 2*x + 5*x^2))/(11176*(1 + 4*x - 7*x^2)^2)) - (7*(409769 - 1189370*x)*sqrt(3 + 2*x + 5*x^2))/(62451488*(1 + 4*x - 7*x^2)) - (7*(39370231 - 2538725*sqrt(11))*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/(124902976*sqrt(22*(125 - 17*sqrt(11)))) + (7*(39370231 + 2538725*sqrt(11))*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/(124902976*sqrt(22*(125 + 17*sqrt(11))))]

    @test_int [((1 + 4*x - 7*x^2)^3*(2 + 5*x + x^2))/(3 + 2*x + 5*x^2)^(3/2), x, 9, (16*(6122807 - 5338217*x))/(546875*sqrt(3 + 2*x + 5*x^2)) + (15715799*sqrt(3 + 2*x + 5*x^2))/156250 - (3192602*x*sqrt(3 + 2*x + 5*x^2))/46875 - (2583293*x^2*sqrt(3 + 2*x + 5*x^2))/187500 + (393659*x^3*sqrt(3 + 2*x + 5*x^2))/12500 - (25921*x^4*sqrt(3 + 2*x + 5*x^2))/3750 - (343/150)*x^5*sqrt(3 + 2*x + 5*x^2) + (50047657*asinh((1 + 5*x)/sqrt(14)))/(156250*sqrt(5))]
    @test_int [((1 + 4*x - 7*x^2)^2*(2 + 5*x + x^2))/(3 + 2*x + 5*x^2)^(3/2), x, 7, -((8*(12983 + 136602*x))/(21875*sqrt(3 + 2*x + 5*x^2))) - (5086*sqrt(3 + 2*x + 5*x^2))/3125 - (8749*x*sqrt(3 + 2*x + 5*x^2))/1250 + (203/100)*x^2*sqrt(3 + 2*x + 5*x^2) + (49/100)*x^3*sqrt(3 + 2*x + 5*x^2) + (89583*asinh((1 + 5*x)/sqrt(14)))/(1250*sqrt(5))]
    @test_int [((1 + 4*x - 7*x^2)^1*(2 + 5*x + x^2))/(3 + 2*x + 5*x^2)^(3/2), x, 5, -((2*(2321 + 2449*x))/(875*sqrt(3 + 2*x + 5*x^2))) - (261/250)*sqrt(3 + 2*x + 5*x^2) - (7/50)*x*sqrt(3 + 2*x + 5*x^2) + (149*asinh((1 + 5*x)/sqrt(14)))/(25*sqrt(5))]
    @test_int [(2 + 5*x + x^2)/((1 + 4*x - 7*x^2)^1*(3 + 2*x + 5*x^2)^(3/2)), x, 6, -((131 - 605*x)/(3556*sqrt(3 + 2*x + 5*x^2))) - (3*sqrt((281693 - 25015*sqrt(11))/1397)*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/1016 + (3*sqrt((281693 + 25015*sqrt(11))/1397)*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/1016]
    @test_int [(2 + 5*x + x^2)/((1 + 4*x - 7*x^2)^2*(3 + 2*x + 5*x^2)^(3/2)), x, 7, -((76567 + 22755*x)/(19870928*sqrt(3 + 2*x + 5*x^2))) - (3*(40 - 371*x))/(5588*(1 + 4*x - 7*x^2)*sqrt(3 + 2*x + 5*x^2)) - (7*(541543 - 5144*sqrt(11))*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/(2838704*sqrt(22*(125 - 17*sqrt(11)))) + (7*(541543 + 5144*sqrt(11))*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/(2838704*sqrt(22*(125 + 17*sqrt(11))))]
    @test_int [(2 + 5*x + x^2)/((1 + 4*x - 7*x^2)^3*(3 + 2*x + 5*x^2)^(3/2)), x, 8, -((5*(461370781 + 1118731375*x))/(222077491328*sqrt(3 + 2*x + 5*x^2))) - (3*(40 - 371*x))/(11176*(1 + 4*x - 7*x^2)^2*sqrt(3 + 2*x + 5*x^2)) - (2701733 - 9148874*x)/(62451488*(1 + 4*x - 7*x^2)*sqrt(3 + 2*x + 5*x^2)) - (7*(2792860024 - 84865895*sqrt(11))*atanh((23 - sqrt(11) + (17 - 5*sqrt(11))*x)/(sqrt(2*(125 - 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/(31725355904*sqrt(22*(125 - 17*sqrt(11)))) + (7*(2792860024 + 84865895*sqrt(11))*atanh((23 + sqrt(11) + (17 + 5*sqrt(11))*x)/(sqrt(2*(125 + 17*sqrt(11)))*sqrt(3 + 2*x + 5*x^2))))/(31725355904*sqrt(22*(125 + 17*sqrt(11))))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d+e*x+f*x^2)^m*Pq(x)*(a+b*x+c*x^2)^p*with*p*and/or*q*symbolic=#

    @test_int [(a + c*x^2)^p*(d + f*x^2)^q*(A + C*x^2), x, 7, (A*x*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1(1/2, -p, -q, 3/2, -((c*x^2)/a), -((f*x^2)/d)))/((1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q) + ((1/3)*C*x^3*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1(3/2, -p, -q, 5/2, -((c*x^2)/a), -((f*x^2)/d)))/((1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q)]
    @test_int [(a + c*x^2)^p*(d + f*x^2)^q*(A + B*x), x, 7, (A*x*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1(1/2, -p, -q, 3/2, -((c*x^2)/a), -((f*x^2)/d)))/((1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q) + (B*(a + c*x^2)^(1 + p)*(d + f*x^2)^q*HypergeometricFunctions._₂F₁(1 + p, -q, 2 + p, -((f*(a + c*x^2))/(c*d - a*f))))/(((c*(d + f*x^2))/(c*d - a*f))^q*(2*c*(1 + p)))]
    @test_int [(a + c*x^2)^p*(d + f*x^2)^q*(A + B*x + C*x^2), x, 11, (A*x*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1(1/2, -p, -q, 3/2, -((c*x^2)/a), -((f*x^2)/d)))/((1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q) + ((1/3)*C*x^3*(a + c*x^2)^p*(d + f*x^2)^q*AppellF1(3/2, -p, -q, 5/2, -((c*x^2)/a), -((f*x^2)/d)))/((1 + (c*x^2)/a)^p*(1 + (f*x^2)/d)^q) + (B*(a + c*x^2)^(1 + p)*(d + f*x^2)^q*HypergeometricFunctions._₂F₁(1 + p, -q, 2 + p, -((f*(a + c*x^2))/(c*d - a*f))))/(((c*(d + f*x^2))/(c*d - a*f))^q*(2*c*(1 + p)))]
    end

max_stars_repo_path: test/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.9 P(x) (d+e x)^m (a+b x+c x^2)^p.jl