text:
@testset "1.2.1.5 (a+b x+c x^2)^p (d+e x+f x^2)^q" begin
    (a, b, c, d, e, f, p, q, x, ) = @variables a b c d e f p q x

    #= ::Package:: =#

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

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

    #= [(a + b*x + b*f/e*x^2)^3/sqrt(d + e*x + f*x^2), x, 0, (1/1024)*((1/(3*e^3*f^3))*(2*b*(e + 2*f*x)*sqrt(d + x*(e + f*x))*(1152*a^2*e^2*f^2 - 72*a*b*e*f*(3*e^2 - 8*e*f*x + 4*f*(3*d - 2*f*x^2)) + b^2*(15*e^4 - 40*e^3*f*x + 32*e*f^2*x*(-5*d + 8*f*x^2) + 8*e^2*f*(7*d + 11*f*x^2) + 16*f^2*(15*d^2 - 10*d*f*x^2 + 8*f^2*x^4)))) - ((-1024*a^3*e^3*f^3 + 384*a^2*b*e^2*f^2*(e^2 + 4*d*f) - 24*a*b^2*e*f*(3*e^4 + 8*d*e^2*f + 48*d^2*f^2) + b^3*(5*e^6 + 12*d*e^4*f + 48*d^2*e^2*f^2 + 320*d^3*f^3))*log(e + 2*f*x + 2*sqrt(f)*sqrt(d + x*(e + f*x))))/(e^3*f^(7/2)))]
    @test_int [(a + b*x + b*f/e*x^2)^2/sqrt(d + e*x + f*x^2), x, 0, (1/(128*e^2*f^(5/2)))*(2*b*sqrt(f)*(e + 2*f*x)*sqrt(d + x*(e + f*x))*(32*a*e*f + b*(-3*e^2 + 8*e*f*x + 4*f*(-3*d + 2*f*x^2))) + (128*a^2*e^2*f^2 - 32*a*b*e*f*(e^2 + 4*d*f) + b^2*(3*e^4 + 8*d*e^2*f + 48*d^2*f^2))*log(e + 2*f*x + 2*sqrt(f)*sqrt(d + x*(e + f*x))))] =#
    @test_int [(a + b*x + b*f/e*x^2)^1/sqrt(d + e*x + f*x^2), x, 4, (b*sqrt(d + e*x + f*x^2))/(4*f) + (b*x*sqrt(d + e*x + f*x^2))/(2*e) + ((8*a*f - b*(e + (4*d*f)/e))*atanh((e + 2*f*x)/(2*sqrt(f)*sqrt(d + e*x + f*x^2))))/(8*f^(3/2))]
    @test_int [1/((a + b*x + b*f/e*x^2)^1*sqrt(d + e*x + f*x^2)), x, 2, -((2*sqrt(e)*atanh((sqrt(b*d - a*e)*(e + 2*f*x))/(sqrt(e)*sqrt(b*e - 4*a*f)*sqrt(d + e*x + f*x^2))))/(sqrt(b*d - a*e)*sqrt(b*e - 4*a*f)))]
    #= [1/((a + b*x + b*f/e*x^2)^2*sqrt(d + e*x + f*x^2)), x, 0, (1/(2*((-b)*d + a*e)))*(sqrt(e)*((2*b*sqrt(e)*(e + 2*f*x)*sqrt(d + x*(e + f*x)))/((b*e - 4*a*f)*(a*e + b*x*(e + f*x))) + ((-8*a*e*f + b*(e^2 + 4*d*f))*log((-sqrt(b))*sqrt(e)*sqrt(b*e - 4*a*f) + b*(e + 2*f*x)))/(sqrt(b*d - a*e)*(b*e - 4*a*f)^(3/2)) + ((8*a*e*f - b*(e^2 + 4*d*f))*log(sqrt(b)*sqrt(e)*sqrt(b*e - 4*a*f) + b*(e + 2*f*x)))/(sqrt(b*d - a*e)*(b*e - 4*a*f)^(3/2)) + ((-8*a*e*f + b*(e^2 + 4*d*f))*log(sqrt(b)*(e^(3/2)*sqrt(b*e - 4*a*f) + sqrt(b)*(e^2 - 4*d*f) + 2*sqrt(e)*f*sqrt(b*e - 4*a*f)*x - 4*sqrt(b*d - a*e)*f*sqrt(d + x*(e + f*x)))))/(sqrt(b*d - a*e)*(b*e - 4*a*f)^(3/2)) + ((8*a*e*f - b*(e^2 + 4*d*f))*log(sqrt(b)*(e^(3/2)*sqrt(b*e - 4*a*f) - sqrt(b)*(e^2 - 4*d*f) + 2*sqrt(e)*f*sqrt(b*e - 4*a*f)*x + 4*sqrt(b*d - a*e)*f*sqrt(d + x*(e + f*x)))))/(sqrt(b*d - a*e)*(b*e - 4*a*f)^(3/2))))]
    @test_int [1/((a + b*x + b*f/e*x^2)^3*sqrt(d + e*x + f*x^2)), x, 0, (1/8)*sqrt(e)*((2*b*sqrt(e)*(e + 2*f*x)*sqrt(d + x*(e + f*x))*(-32*a^2*e^2*f + a*b*e*(5*e^2 - 24*e*f*x + 4*f*(5*d - 6*f*x^2)) + b^2*(3*e^2*x*(e + f*x) - 2*d*(e^2 - 6*e*f*x - 6*f^2*x^2))))/((b*d - a*e)^2*(b*e - 4*a*f)^2*(a*e + b*x*(e + f*x))^2) + ((128*a^2*e^2*f^2 - 32*a*b*e*f*(e^2 + 4*d*f) + b^2*(3*e^4 + 8*d*e^2*f + 48*d^2*f^2))*log((-sqrt(b))*sqrt(e)*sqrt(b*e - 4*a*f) + b*(e + 2*f*x)))/((b*d - a*e)^(5/2)*(b*e - 4*a*f)^(5/2)) - ((128*a^2*e^2*f^2 - 32*a*b*e*f*(e^2 + 4*d*f) + b^2*(3*e^4 + 8*d*e^2*f + 48*d^2*f^2))*log(sqrt(b)*sqrt(e)*sqrt(b*e - 4*a*f) + b*(e + 2*f*x)))/((b*d - a*e)^(5/2)*(b*e - 4*a*f)^(5/2)) + ((128*a^2*e^2*f^2 - 32*a*b*e*f*(e^2 + 4*d*f) + b^2*(3*e^4 + 8*d*e^2*f + 48*d^2*f^2))*log(sqrt(b)*(e^(3/2)*sqrt(b*e - 4*a*f) + sqrt(b)*(e^2 - 4*d*f) + 2*sqrt(e)*f*sqrt(b*e - 4*a*f)*x - 4*sqrt(b*d - a*e)*f*sqrt(d + x*(e + f*x)))))/((b*d - a*e)^(5/2)*(b*e - 4*a*f)^(5/2)) - ((128*a^2*e^2*f^2 - 32*a*b*e*f*(e^2 + 4*d*f) + b^2*(3*e^4 + 8*d*e^2*f + 48*d^2*f^2))*log(sqrt(b)*(e^(3/2)*sqrt(b*e - 4*a*f) - sqrt(b)*(e^2 - 4*d*f) + 2*sqrt(e)*f*sqrt(b*e - 4*a*f)*x + 4*sqrt(b*d - a*e)*f*sqrt(d + x*(e + f*x)))))/((b*d - a*e)^(5/2)*(b*e - 4*a*f)^(5/2)))] =#

    @test_int [1/(sqrt(a + b*x + c*x^2)*(d + b*x + c*x^2)^1), x, 2, -((2*atanh((sqrt(a - d)*(b + 2*c*x))/(sqrt(b^2 - 4*c*d)*sqrt(a + b*x + c*x^2))))/(sqrt(a - d)*sqrt(b^2 - 4*c*d)))]
    @test_int [1/(sqrt(a + b*x + c*x^2)*(d + b*x + c*x^2)^2), x, 4, -(((b + 2*c*x)*sqrt(a + b*x + c*x^2))/((a - d)*(b^2 - 4*c*d)*(d + b*x + c*x^2))) + ((b^2 + 4*c*(a - 2*d))*atanh((sqrt(a - d)*(b + 2*c*x))/(sqrt(b^2 - 4*c*d)*sqrt(a + b*x + c*x^2))))/((a - d)^(3/2)*(b^2 - 4*c*d)^(3/2))]
    @test_int [1/(sqrt(a + b*x + c*x^2)*(d + b*x + c*x^2)^3), x, 5, -(((b + 2*c*x)*sqrt(a + b*x + c*x^2))/(2*(a - d)*(b^2 - 4*c*d)*(d + b*x + c*x^2)^2)) + (3*(b^2 + 4*c*(a - 2*d))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(4*(a - d)^2*(b^2 - 4*c*d)^2*(d + b*x + c*x^2)) - ((3*b^4 + 8*b^2*c*(a - 4*d) + 16*c^2*(3*a^2 - 8*a*d + 8*d^2))*atanh((sqrt(a - d)*(b + 2*c*x))/(sqrt(b^2 - 4*c*d)*sqrt(a + b*x + c*x^2))))/(4*(a - d)^(5/2)*(b^2 - 4*c*d)^(5/2))]
    @test_int [1/(sqrt(a + b*x + c*x^2)*(d + b*x + c*x^2)^4), x, 6, -(((b + 2*c*x)*sqrt(a + b*x + c*x^2))/(3*(a - d)*(b^2 - 4*c*d)*(d + b*x + c*x^2)^3)) + (5*(b^2 + 4*c*(a - 2*d))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(12*(a - d)^2*(b^2 - 4*c*d)^2*(d + b*x + c*x^2)^2) - ((15*b^4 + 8*b^2*c*(7*a - 22*d) + 16*c^2*(15*a^2 - 44*a*d + 44*d^2))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(24*(a - d)^3*(b^2 - 4*c*d)^3*(d + b*x + c*x^2)) + ((b^2 + 4*c*(a - 2*d))*(5*b^4 - 8*b^2*c*(a + 4*d) + 16*c^2*(5*a^2 - 8*a*d + 8*d^2))*atanh((sqrt(a - d)*(b + 2*c*x))/(sqrt(b^2 - 4*c*d)*sqrt(a + b*x + c*x^2))))/(8*(a - d)^(7/2)*(b^2 - 4*c*d)^(7/2))]

    @test_int [1/((a*e + b*e*x + b*f*x^2)^2*sqrt(d + e*x + f*x^2)), x, 4, -((b*(e + 2*f*x)*sqrt(d + e*x + f*x^2))/(e*(b*d - a*e)*(b*e - 4*a*f)*(a*e + b*e*x + b*f*x^2))) - ((8*a*e*f - b*(e^2 + 4*d*f))*atanh((sqrt(b*d - a*e)*(e + 2*f*x))/(sqrt(e)*sqrt(b*e - 4*a*f)*sqrt(d + e*x + f*x^2))))/(e^(3/2)*(b*d - a*e)^(3/2)*(b*e - 4*a*f)^(3/2))]

    @test_int [1/((4 + 2*x + x^2)*sqrt(5 + 2*x + x^2)), x, 2, atan((1 + x)/(sqrt(3)*sqrt(5 + 2*x + x^2)))/sqrt(3)]

    @test_int [(a + e*x/2 + c*x^2)^p*(2*a + e*x + 2*c*x^2)^q, x, 2, -((2^(1 + q)*(-((e - sqrt(-16*a*c + e^2) + 4*c*x)/sqrt(-16*a*c + e^2)))^(-1 - p - q)*(2*a + e*x + 2*c*x^2)^(1 + p + q)*HypergeometricFunctions._₂F₁(-p - q, 1 + p + q, 2 + p + q, (e + sqrt(-16*a*c + e^2) + 4*c*x)/(2*sqrt(-16*a*c + e^2))))/(sqrt(-16*a*c + e^2)*(1 + p + q)))]
    @test_int [(a + c*e*x/f + c*x^2)^p*(a*f/c + e*x + f*x^2)^q, x, 2, -((2^(1 + p + q)*sqrt(c)*(-((sqrt(c)*(e - sqrt(c*e^2 - 4*a*f^2)/sqrt(c) + 2*f*x))/sqrt(c*e^2 - 4*a*f^2)))^(-1 - p - q)*(a + (c*e*x)/f + c*x^2)^p*((a*f)/c + e*x + f*x^2)^(1 + q)*HypergeometricFunctions._₂F₁(-p - q, 1 + p + q, 2 + p + q, (sqrt(c)*(e + sqrt(c*e^2 - 4*a*f^2)/sqrt(c) + 2*f*x))/(2*sqrt(c*e^2 - 4*a*f^2))))/(sqrt(c*e^2 - 4*a*f^2)*(1 + p + q)))]

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

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(a+b*x+c*x^2)^p*(d+f*x^2)^q*with*b^2-4*a*c=0=#

    @test_int [sqrt(1 + 2*x + x^2)/sqrt(1 + x^2), x, 3, (sqrt(1 + x^2)*sqrt(1 + 2*x + x^2))/(1 + x) + (sqrt(1 + 2*x + x^2)*asinh(x))/(1 + x)]

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

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

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

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

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

    @test_int [1/(sqrt(a + b*x + c*x^2)*sqrt(d + f*x^2)), x, 3, -(((b^2*d + b*sqrt(b^2 - 4*a*c)*d - 2*a*(c*d - a*f))^(1/4)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)^(3/2)*sqrt(2*a + (b + sqrt(b^2 - 4*a*c))*x)*sqrt(((4*a*c - (b + sqrt(b^2 - 4*a*c))^2)^2*(d + f*x^2))/(((b + sqrt(b^2 - 4*a*c))^2*d + 4*a^2*f)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)^2))*(1 + (sqrt(2*c^2*d - 2*a*c*f + b*(b + sqrt(b^2 - 4*a*c))*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x))/(sqrt(b^2*d + b*sqrt(b^2 - 4*a*c)*d - 2*a*(c*d - a*f))*(b + sqrt(b^2 - 4*a*c) + 2*c*x)))*sqrt((1 - (4*(b + sqrt(b^2 - 4*a*c))*(c*d + a*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x))/(((b + sqrt(b^2 - 4*a*c))^2*d + 4*a^2*f)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)) + ((4*c^2*d + (b + sqrt(b^2 - 4*a*c))^2*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x)^2)/(((b + sqrt(b^2 - 4*a*c))^2*d + 4*a^2*f)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)^2))/(1 + (sqrt(2*c^2*d - 2*a*c*f + b*(b + sqrt(b^2 - 4*a*c))*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x))/(sqrt(b^2*d + b*sqrt(b^2 - 4*a*c)*d - 2*a*(c*d - a*f))*(b + sqrt(b^2 - 4*a*c) + 2*c*x)))^2)*Elliptic.F(2*atan(((2*c^2*d - 2*a*c*f + b*(b + sqrt(b^2 - 4*a*c))*f)^(1/4)*sqrt(2*a + (b + sqrt(b^2 - 4*a*c))*x))/((b^2*d + b*sqrt(b^2 - 4*a*c)*d - 2*a*(c*d - a*f))^(1/4)*sqrt(b + sqrt(b^2 - 4*a*c) + 2*c*x))), (1/2)*(1 + ((b + sqrt(b^2 - 4*a*c))*(c*d + a*f))/(sqrt(2*c^2*d - 2*a*c*f + b*(b + sqrt(b^2 - 4*a*c))*f)*sqrt(b^2*d + b*sqrt(b^2 - 4*a*c)*d - 2*a*(c*d - a*f))))))/((4*a*c - (b + sqrt(b^2 - 4*a*c))^2)*(2*c^2*d - 2*a*c*f + b*(b + sqrt(b^2 - 4*a*c))*f)^(1/4)*sqrt(a + b*x + c*x^2)*sqrt(d + f*x^2)*sqrt(1 - (4*(b + sqrt(b^2 - 4*a*c))*(c*d + a*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x))/(((b + sqrt(b^2 - 4*a*c))^2*d + 4*a^2*f)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)) + ((4*c^2*d + (b + sqrt(b^2 - 4*a*c))^2*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x)^2)/(((b + sqrt(b^2 - 4*a*c))^2*d + 4*a^2*f)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)^2))))]

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

    @test_int [sqrt(-3 - 4*x - x^2)/(3 + 4*x + 2*x^2), x, 16, (-(1/2))*asin(2 + x) - atan((1 - (3 + x)/sqrt(-3 - 4*x - x^2))/sqrt(2))/sqrt(2) + atan((1 + (3 + x)/sqrt(-3 - 4*x - x^2))/sqrt(2))/sqrt(2) - (1/2)*atanh(x/sqrt(-3 - 4*x - x^2))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(3-x+2*x^2)^p*(2+3*x+5*x^2)^q=#

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

    @test_int [(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^4, x, 2, 48*x + 136*x^2 + (1064*x^3)/3 + 656*x^4 + (5099*x^5)/5 + (2377*x^6)/2 + 1176*x^7 + (3415*x^8)/4 + (5075*x^9)/9 + (475*x^10)/2 + (1250*x^11)/11]
    @test_int [(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^3, x, 2, 24*x + 50*x^2 + (322*x^3)/3 + (579*x^4)/4 + (876*x^5)/5 + 134*x^6 + (720*x^7)/7 + (325*x^8)/8 + (250*x^9)/9]
    @test_int [(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^2, x, 2, 12*x + 16*x^2 + (83*x^3)/3 + (85*x^4)/4 + (103*x^5)/5 + (35*x^6)/6 + (50*x^7)/7]
    @test_int [(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^1, x, 2, 6*x + (7*x^2)/2 + (16*x^3)/3 + x^4/4 + 2*x^5]
    @test_int [(3 - x + 2*x^2)/(2 + 3*x + 5*x^2)^1, x, 6, (2*x)/5 + (143*atan((3 + 10*x)/sqrt(31)))/(25*sqrt(31)) - (11*log(2 + 3*x + 5*x^2))/50]
    @test_int [(3 - x + 2*x^2)/(2 + 3*x + 5*x^2)^2, x, 4, (11*(7 + 13*x))/(155*(2 + 3*x + 5*x^2)) + (82*atan((3 + 10*x)/sqrt(31)))/(31*sqrt(31))]
    @test_int [(3 - x + 2*x^2)/(2 + 3*x + 5*x^2)^3, x, 5, (11*(7 + 13*x))/(310*(2 + 3*x + 5*x^2)^2) + (553*(3 + 10*x))/(9610*(2 + 3*x + 5*x^2)) + (1106*atan((3 + 10*x)/sqrt(31)))/(961*sqrt(31))]

    @test_int [(3 - x + 2*x^2)^2*(2 + 3*x + 5*x^2)^4, x, 2, 144*x + 384*x^2 + (3016*x^3)/3 + 1838*x^4 + (14801*x^5)/5 + (10771*x^6)/3 + (27763*x^7)/7 + 3315*x^8 + (24859*x^9)/9 + 1571*x^10 + (11525*x^11)/11 + (875*x^12)/3 + (2500*x^13)/13]
    @test_int [(3 - x + 2*x^2)^2*(2 + 3*x + 5*x^2)^3, x, 2, 72*x + 138*x^2 + (914*x^3)/3 + (1615*x^4)/4 + (2693*x^5)/5 + 449*x^6 + 444*x^7 + (1863*x^8)/8 + (1865*x^9)/9 + 40*x^10 + (500*x^11)/11]
    @test_int [(3 - x + 2*x^2)^2*(2 + 3*x + 5*x^2)^2, x, 2, 36*x + 42*x^2 + (241*x^3)/3 + 59*x^4 + 78*x^5 + (86*x^6)/3 + (321*x^7)/7 + (5*x^8)/2 + (100*x^9)/9]
    @test_int [(3 - x + 2*x^2)^2*(2 + 3*x + 5*x^2)^1, x, 2, 18*x + (15*x^2)/2 + (53*x^3)/3 + x^4/4 + (61*x^5)/5 - (4*x^6)/3 + (20*x^7)/7]
    @test_int [(3 - x + 2*x^2)^2/(2 + 3*x + 5*x^2)^1, x, 6, (381*x)/125 - (16*x^2)/25 + (4*x^3)/15 + (8349*atan((3 + 10*x)/sqrt(31)))/(625*sqrt(31)) - (1573*log(2 + 3*x + 5*x^2))/1250]
    @test_int [(3 - x + 2*x^2)^2/(2 + 3*x + 5*x^2)^2, x, 7, (4*x)/25 + (121*(61 + 69*x))/(3875*(2 + 3*x + 5*x^2)) + (41932*atan((3 + 10*x)/sqrt(31)))/(3875*sqrt(31)) - (22/125)*log(2 + 3*x + 5*x^2)]
    @test_int [(3 - x + 2*x^2)^2/(2 + 3*x + 5*x^2)^3, x, 5, (121*(61 + 69*x))/(7750*(2 + 3*x + 5*x^2)^2) + (11*(17557 + 45710*x))/(240250*(2 + 3*x + 5*x^2)) + (4330*atan((3 + 10*x)/sqrt(31)))/(961*sqrt(31))]
    @test_int [(3 - x + 2*x^2)^2/(2 + 3*x + 5*x^2)^4, x, 6, (121*(61 + 69*x))/(11625*(2 + 3*x + 5*x^2)^3) + (11*(4579 + 12060*x))/(120125*(2 + 3*x + 5*x^2)^2) + (16688*(3 + 10*x))/(148955*(2 + 3*x + 5*x^2)) + (66752*atan((3 + 10*x)/sqrt(31)))/(29791*sqrt(31))]

    @test_int [(3 - x + 2*x^2)^3*(2 + 3*x + 5*x^2)^4, x, 2, 432*x + 1080*x^2 + 2856*x^3 + 5144*x^4 + (43083*x^5)/5 + (64529*x^6)/6 + (91349*x^7)/7 + (94881*x^8)/8 + (103583*x^9)/9 + (75311*x^10)/10 + (68583*x^11)/11 + (30395*x^12)/12 + (27050*x^13)/13 + (2250*x^14)/7 + (1000*x^15)/3]
    @test_int [(3 - x + 2*x^2)^3*(2 + 3*x + 5*x^2)^3, x, 2, 216*x + 378*x^2 + 870*x^3 + (4483*x^4)/4 + (8292*x^5)/5 + (2873*x^6)/2 + (12016*x^7)/7 + (7869*x^8)/8 + (3316*x^9)/3 + (3061*x^10)/10 + (4830*x^11)/11 + 25*x^12 + (1000*x^13)/13]
    @test_int [(3 - x + 2*x^2)^3*(2 + 3*x + 5*x^2)^2, x, 2, 108*x + 108*x^2 + 237*x^3 + (635*x^4)/4 + (1416*x^5)/5 + (299*x^6)/3 + (1571*x^7)/7 + (83*x^8)/8 + (922*x^9)/9 - 6*x^10 + (200*x^11)/11]
    @test_int [(3 - x + 2*x^2)^3*(2 + 3*x + 5*x^2)^1, x, 2, 54*x + (27*x^2)/2 + 60*x^3 - 5*x^4 + (288*x^5)/5 - (83*x^6)/6 + (190*x^7)/7 - (9*x^8)/2 + (40*x^9)/9]
    @test_int [(3 - x + 2*x^2)^3/(2 + 3*x + 5*x^2)^1, x, 6, (49508*x)/3125 - (7451*x^2)/1250 + (1222*x^3)/375 - (21*x^4)/25 + (8*x^5)/25 + (328757*atan((3 + 10*x)/sqrt(31)))/(15625*sqrt(31)) - (158389*log(2 + 3*x + 5*x^2))/31250]
    @test_int [(3 - x + 2*x^2)^3/(2 + 3*x + 5*x^2)^2, x, 7, (1466*x)/625 - (54*x^2)/125 + (8*x^3)/75 + (1331*(443 + 247*x))/(96875*(2 + 3*x + 5*x^2)) + (3819607*atan((3 + 10*x)/sqrt(31)))/(96875*sqrt(31)) - (10769*log(2 + 3*x + 5*x^2))/6250]
    @test_int [(3 - x + 2*x^2)^3/(2 + 3*x + 5*x^2)^3, x, 8, (8*x)/125 + (1331*(443 + 247*x))/(193750*(2 + 3*x + 5*x^2)^2) + (121*(188381 + 342840*x))/(6006250*(2 + 3*x + 5*x^2)) + (11341176*atan((3 + 10*x)/sqrt(31)))/(600625*sqrt(31)) - (66/625)*log(2 + 3*x + 5*x^2)]

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

    @test_int [(2 + 3*x + 5*x^2)^4/(3 - x + 2*x^2), x, 6, (122691*x)/128 - (28747*x^2)/128 - (21229*x^3)/96 + (6245*x^4)/64 + (1855*x^5)/8 + (3625*x^6)/24 + (625*x^7)/14 + (1156639*atan((1 - 4*x)/sqrt(23)))/(256*sqrt(23)) + (307461/512)*log(3 - x + 2*x^2)]
    @test_int [(2 + 3*x + 5*x^2)^3/(3 - x + 2*x^2), x, 6, -((4795*x)/32) - (829*x^2)/32 + (965*x^3)/24 + (575*x^4)/16 + (25*x^5)/2 - (59895*atan((1 - 4*x)/sqrt(23)))/(64*sqrt(23)) + (1331/128)*log(3 - x + 2*x^2)]
    @test_int [(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2), x, 6, (51*x)/8 + (85*x^2)/8 + (25*x^3)/6 + (847*atan((1 - 4*x)/sqrt(23)))/(16*sqrt(23)) - (363/32)*log(3 - x + 2*x^2)]
    @test_int [(2 + 3*x + 5*x^2)^1/(3 - x + 2*x^2), x, 6, (5*x)/2 + (33*atan((1 - 4*x)/sqrt(23)))/(4*sqrt(23)) + (11*log(3 - x + 2*x^2))/8]
    @test_int [1/((3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^1), x, 9, (3*atan((1 - 4*x)/sqrt(23)))/(22*sqrt(23)) + (13*atan((3 + 10*x)/sqrt(31)))/(22*sqrt(31)) - log(3 - x + 2*x^2)/44 + log(2 + 3*x + 5*x^2)/44]
    @test_int [1/((3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^2), x, 10, (4 + 65*x)/(682*(2 + 3*x + 5*x^2)) + (7*atan((1 - 4*x)/sqrt(23)))/(484*sqrt(23)) + (2891*atan((3 + 10*x)/sqrt(31)))/(15004*sqrt(31)) + (3*log(3 - x + 2*x^2))/968 - (3*log(2 + 3*x + 5*x^2))/968]
    @test_int [1/((3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^3), x, 11, (4 + 65*x)/(1364*(2 + 3*x + 5*x^2)^2) + (7923 + 21605*x)/(465124*(2 + 3*x + 5*x^2)) - (45*atan((1 - 4*x)/sqrt(23)))/(10648*sqrt(23)) + (847793*atan((3 + 10*x)/sqrt(31)))/(10232728*sqrt(31)) - log(3 - x + 2*x^2)/21296 + log(2 + 3*x + 5*x^2)/21296]

    @test_int [(2 + 3*x + 5*x^2)^4/(3 - x + 2*x^2)^2, x, 7, -((89359*x)/64) - (1185*x^2)/8 + (9775*x^3)/48 + (2125*x^4)/16 + (125*x^5)/4 - (14641*(101 + 79*x))/(2944*(3 - x + 2*x^2)) - (13292697*atan((1 - 4*x)/sqrt(23)))/(1472*sqrt(23)) - (30613/128)*log(3 - x + 2*x^2)]
    @test_int [(2 + 3*x + 5*x^2)^3/(3 - x + 2*x^2)^2, x, 7, (915*x)/16 + (175*x^2)/4 + (125*x^3)/12 - (1331*(17 - 45*x))/(736*(3 - x + 2*x^2)) + (223971*atan((1 - 4*x)/sqrt(23)))/(368*sqrt(23)) - (2057/32)*log(3 - x + 2*x^2)]
    @test_int [(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^2, x, 7, (25*x)/4 + (121*(19 - 7*x))/(184*(3 - x + 2*x^2)) + (1859*atan((1 - 4*x)/sqrt(23)))/(92*sqrt(23)) + (55/8)*log(3 - x + 2*x^2)]
    @test_int [(2 + 3*x + 5*x^2)^1/(3 - x + 2*x^2)^2, x, 4, (-11*(5 + 3*x))/(46*(3 - x + 2*x^2)) - (82*atan((1 - 4*x)/sqrt(23)))/(23*sqrt(23))]
    @test_int [1/((3 - x + 2*x^2)^2*(2 + 3*x + 5*x^2)^1), x, 10, (13 - 6*x)/(506*(3 - x + 2*x^2)) + (241*atan((1 - 4*x)/sqrt(23)))/(11132*sqrt(23)) + (69*atan((3 + 10*x)/sqrt(31)))/(484*sqrt(31)) - (13*log(3 - x + 2*x^2))/968 + (13*log(2 + 3*x + 5*x^2))/968]
    @test_int [1/((3 - x + 2*x^2)^2*(2 + 3*x + 5*x^2)^2), x, 11, (-25*(117 - 137*x))/(172546*(2 + 3*x + 5*x^2)) + (13 - 6*x)/(506*(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)) + (2769*atan((1 - 4*x)/sqrt(23)))/(122452*sqrt(23)) + (12643*atan((3 + 10*x)/sqrt(31)))/(165044*sqrt(31)) + (19*log(3 - x + 2*x^2))/10648 - (19*log(2 + 3*x + 5*x^2))/10648]
    @test_int [1/((3 - x + 2*x^2)^2*(2 + 3*x + 5*x^2)^3), x, 12, -(9446 - 5765*x)/(690184*(2 + 3*x + 5*x^2)^2) + (13 - 6*x)/(506*(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^2) + (1765599 + 3996965*x)/(235352744*(2 + 3*x + 5*x^2)) - (25557*atan((1 - 4*x)/sqrt(23)))/(5387888*sqrt(23)) + (4464079*atan((3 + 10*x)/sqrt(31)))/(225120016*sqrt(31)) + (97*log(3 - x + 2*x^2))/468512 - (97*log(2 + 3*x + 5*x^2))/468512]

    @test_int [(2 + 3*x + 5*x^2)^4/(3 - x + 2*x^2)^3, x, 8, (2725*x)/8 + (4875*x^2)/32 + (625*x^3)/24 - (14641*(101 + 79*x))/(5888*(3 - x + 2*x^2)^2) + (1331*(5229 + 76420*x))/(135424*(3 - x + 2*x^2)) + (63799791*atan((1 - 4*x)/sqrt(23)))/(16928*sqrt(23)) - (13915/64)*log(3 - x + 2*x^2)]
    @test_int [(2 + 3*x + 5*x^2)^3/(3 - x + 2*x^2)^3, x, 8, (125*x)/8 - (1331*(17 - 45*x))/(1472*(3 - x + 2*x^2)^2) + (121*(21193 - 12828*x))/(33856*(3 - x + 2*x^2)) + (165099*atan((1 - 4*x)/sqrt(23)))/(8464*sqrt(23)) + (825/32)*log(3 - x + 2*x^2)]
    @test_int [(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^3, x, 5, (121*(19 - 7*x))/(368*(3 - x + 2*x^2)^2) - (55*(975 + 332*x))/(8464*(3 - x + 2*x^2)) - (4330*atan((1 - 4*x)/sqrt(23)))/(529*sqrt(23))]
    @test_int [(2 + 3*x + 5*x^2)^1/(3 - x + 2*x^2)^3, x, 5, (-11*(5 + 3*x))/(92*(3 - x + 2*x^2)^2) - (131*(1 - 4*x))/(2116*(3 - x + 2*x^2)) - (262*atan((1 - 4*x)/sqrt(23)))/(529*sqrt(23))]
    @test_int [1/((3 - x + 2*x^2)^3*(2 + 3*x + 5*x^2)^1), x, 11, (13 - 6*x)/(1012*(3 - x + 2*x^2)^2) + (3625 - 746*x)/(256036*(3 - x + 2*x^2)) - (53403*atan((1 - 4*x)/sqrt(23)))/(5632792*sqrt(23)) + (247*atan((3 + 10*x)/sqrt(31)))/(10648*sqrt(31)) - (119*log(3 - x + 2*x^2))/21296 + (119*log(2 + 3*x + 5*x^2))/21296]
    @test_int [1/((3 - x + 2*x^2)^3*(2 + 3*x + 5*x^2)^2), x, 12, -(2328909 + 252815*x)/(174616552*(2 + 3*x + 5*x^2)) + (13 - 6*x)/(1012*(3 - x + 2*x^2)^2*(2 + 3*x + 5*x^2)) + (9665 - 1446*x)/(512072*(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)) + (2038497*atan((1 - 4*x)/sqrt(23)))/(123921424*sqrt(23)) + (246757*atan((3 + 10*x)/sqrt(31)))/(7261936*sqrt(31)) + (181*log(3 - x + 2*x^2))/468512 - (181*log(2 + 3*x + 5*x^2))/468512]
    @test_int [1/((3 - x + 2*x^2)^3*(2 + 3*x + 5*x^2)^3), x, 13, (-5*(223707 + 77020*x))/(87308276*(2 + 3*x + 5*x^2)^2) + (13 - 6*x)/(1012*(3 - x + 2*x^2)^2*(2 + 3*x + 5*x^2)^2) + (5*(302 - 35*x))/(64009*(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^2) + (15*(2618306 + 7140435*x))/(14886061058*(2 + 3*x + 5*x^2)) - (880575*atan((1 - 4*x)/sqrt(23)))/(340783916*sqrt(23)) + (2768835*atan((3 + 10*x)/sqrt(31)))/(619080044*sqrt(31)) + (405*log(3 - x + 2*x^2))/1288408 - (405*log(2 + 3*x + 5*x^2))/1288408]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(3-x+2*x^2)^(p/2)*(2+3*x+5*x^2)^q=#

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

    @test_int [sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^4, x, 11, -((359471503*(1 - 4*x)*sqrt(3 - x + 2*x^2))/67108864) + (27185733541*(3 - x + 2*x^2)^(3/2))/440401920 + (804243809*x*(3 - x + 2*x^2)^(3/2))/36700160 - (83948353*x^2*(3 - x + 2*x^2)^(3/2))/2293760 + (8325631*x^3*(3 - x + 2*x^2)^(3/2))/1032192 + (4796405*x^4*(3 - x + 2*x^2)^(3/2))/43008 + (233225*x^5*(3 - x + 2*x^2)^(3/2))/1536 + (14125/144)*x^6*(3 - x + 2*x^2)^(3/2) + (125/4)*x^7*(3 - x + 2*x^2)^(3/2) - (8267844569*asinh((1 - 4*x)/sqrt(23)))/(134217728*sqrt(2))]
    @test_int [sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^3, x, 9, -((6766097*(1 - 4*x)*sqrt(3 - x + 2*x^2))/2097152) - (22548119*(3 - x + 2*x^2)^(3/2))/4587520 - (9627393*x*(3 - x + 2*x^2)^(3/2))/1146880 + (531681*x^2*(3 - x + 2*x^2)^(3/2))/71680 + (247435*x^3*(3 - x + 2*x^2)^(3/2))/10752 + (8825/448)*x^4*(3 - x + 2*x^2)^(3/2) + (125/16)*x^5*(3 - x + 2*x^2)^(3/2) - (155620231*asinh((1 - 4*x)/sqrt(23)))/(4194304*sqrt(2))]
    @test_int [sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^2, x, 7, (12371*(1 - 4*x)*sqrt(3 - x + 2*x^2))/16384 - (2107*(3 - x + 2*x^2)^(3/2))/3072 + (769/256)*x*(3 - x + 2*x^2)^(3/2) + (63/16)*x^2*(3 - x + 2*x^2)^(3/2) + (25/12)*x^3*(3 - x + 2*x^2)^(3/2) + (284533*asinh((1 - 4*x)/sqrt(23)))/(32768*sqrt(2))]
    @test_int [sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^1, x, 5, (-(81/512))*(1 - 4*x)*sqrt(3 - x + 2*x^2) + (73/96)*(3 - x + 2*x^2)^(3/2) + (5/8)*x*(3 - x + 2*x^2)^(3/2) - (1863*asinh((1 - 4*x)/sqrt(23)))/(1024*sqrt(2))]
    @test_int [sqrt(3 - x + 2*x^2)/(2 + 3*x + 5*x^2)^1, x, 8, -(sqrt(2)*asinh((1 - 4*x)/sqrt(23)))/5 + (sqrt((11*(13 + 10*sqrt(2)))/31)*atan((sqrt(11/(62*(13 + 10*sqrt(2))))*(6 + 7*sqrt(2) + (20 + 13*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/5 - (sqrt((11*(-13 + 10*sqrt(2)))/31)*atanh((sqrt(11/(62*(-13 + 10*sqrt(2))))*(6 - 7*sqrt(2) + (20 - 13*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/5]
    @test_int [sqrt(3 - x + 2*x^2)/(2 + 3*x + 5*x^2)^2, x, 6, ((3 + 10*x)*sqrt(3 - x + 2*x^2))/(31*(2 + 3*x + 5*x^2)) + (sqrt((70517 + 49942*sqrt(2))/682)*atan((sqrt(11/(31*(70517 + 49942*sqrt(2))))*(419 + 277*sqrt(2) + (973 + 696*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/62 - (sqrt((-70517 + 49942*sqrt(2))/682)*atanh((sqrt(11/(31*(-70517 + 49942*sqrt(2))))*(419 - 277*sqrt(2) + (973 - 696*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/62]
    @test_int [sqrt(3 - x + 2*x^2)/(2 + 3*x + 5*x^2)^3, x, 7, ((3 + 10*x)*sqrt(3 - x + 2*x^2))/(62*(2 + 3*x + 5*x^2)^2) + ((3464 + 13665*x)*sqrt(3 - x + 2*x^2))/(84568*(2 + 3*x + 5*x^2)) + (sqrt((112285869463 + 79399380740*sqrt(2))/682)*atan((sqrt(11/(31*(112285869463 + 79399380740*sqrt(2))))*(509587 + 362788*sqrt(2) + (1235163 + 872375*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/169136 - (sqrt((-112285869463 + 79399380740*sqrt(2))/682)*atanh((sqrt(11/(31*(-112285869463 + 79399380740*sqrt(2))))*(509587 - 362788*sqrt(2) + (1235163 - 872375*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/169136]

    @test_int [(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^4, x, 12, -((26366414481*(1 - 4*x)*sqrt(3 - x + 2*x^2))/2147483648) - (382121949*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/134217728 + (2124689283*(3 - x + 2*x^2)^(5/2))/146800640 + (48669967*x*(3 - x + 2*x^2)^(5/2))/22020096 - (56422489*x^2*(3 - x + 2*x^2)^(5/2))/8257536 + (10444117*x^3*(3 - x + 2*x^2)^(5/2))/294912 + (941905*x^4*(3 - x + 2*x^2)^(5/2))/9216 + (95165/768)*x^5*(3 - x + 2*x^2)^(5/2) + (7625/96)*x^6*(3 - x + 2*x^2)^(5/2) + (625/24)*x^7*(3 - x + 2*x^2)^(5/2) - (606427533063*asinh((1 - 4*x)/sqrt(23)))/(4294967296*sqrt(2))]
    @test_int [(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^3, x, 10, -((46077855*(1 - 4*x)*sqrt(3 - x + 2*x^2))/33554432) - (667795*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/2097152 - (4625907*(3 - x + 2*x^2)^(5/2))/2293760 - (81685*x*(3 - x + 2*x^2)^(5/2))/114688 + (384739*x^2*(3 - x + 2*x^2)^(5/2))/43008 + (27785*x^3*(3 - x + 2*x^2)^(5/2))/1536 + (725/48)*x^4*(3 - x + 2*x^2)^(5/2) + (25/4)*x^5*(3 - x + 2*x^2)^(5/2) - (1059790665*asinh((1 - 4*x)/sqrt(23)))/(67108864*sqrt(2))]
    @test_int [(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^2, x, 8, (558739*(1 - 4*x)*sqrt(3 - x + 2*x^2))/1048576 + (24293*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/196608 + (73861*(3 - x + 2*x^2)^(5/2))/215040 + (24499*x*(3 - x + 2*x^2)^(5/2))/10752 + (1235/448)*x^2*(3 - x + 2*x^2)^(5/2) + (25/16)*x^3*(3 - x + 2*x^2)^(5/2) + (12850997*asinh((1 - 4*x)/sqrt(23)))/(2097152*sqrt(2))]
    @test_int [(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^1, x, 6, -((4117*(1 - 4*x)*sqrt(3 - x + 2*x^2))/8192) - (179*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/1536 + (107/240)*(3 - x + 2*x^2)^(5/2) + (5/12)*x*(3 - x + 2*x^2)^(5/2) - (94691*asinh((1 - 4*x)/sqrt(23)))/(16384*sqrt(2))]
    @test_int [(3 - x + 2*x^2)^(3/2)/(2 + 3*x + 5*x^2)^1, x, 9, -((49 - 20*x)*sqrt(3 - x + 2*x^2))/100 - (2203*asinh((1 - 4*x)/sqrt(23)))/(1000*sqrt(2)) + (11*sqrt((11*(247 + 500*sqrt(2)))/31)*atan((sqrt(11/(62*(247 + 500*sqrt(2))))*(8 + 61*sqrt(2) + (130 + 69*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/125 - (11*sqrt((11*(-247 + 500*sqrt(2)))/31)*atanh((sqrt(11/(62*(-247 + 500*sqrt(2))))*(8 - 61*sqrt(2) + (130 - 69*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/125]
    @test_int [(3 - x + 2*x^2)^(3/2)/(2 + 3*x + 5*x^2)^2, x, 10, (4*(4 - 5*x)*sqrt(3 - x + 2*x^2))/155 + ((3 + 10*x)*(3 - x + 2*x^2)^(3/2))/(31*(2 + 3*x + 5*x^2)) - (2*sqrt(2)*asinh((1 - 4*x)/sqrt(23)))/25 + (sqrt((11*(3169333 + 2265350*sqrt(2)))/31)*atan((sqrt(11/(62*(3169333 + 2265350*sqrt(2))))*(3514 + 2963*sqrt(2) + (9440 + 6477*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/1550 - (sqrt((11*(-3169333 + 2265350*sqrt(2)))/31)*atanh((sqrt(11/(62*(-3169333 + 2265350*sqrt(2))))*(3514 - 2963*sqrt(2) + (9440 - 6477*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/1550]
    @test_int [(3 - x + 2*x^2)^(3/2)/(2 + 3*x + 5*x^2)^3, x, 7, ((3 + 10*x)*(3 - x + 2*x^2)^(3/2))/(62*(2 + 3*x + 5*x^2)^2) + (3*(277 + 696*x)*sqrt(3 - x + 2*x^2))/(3844*(2 + 3*x + 5*x^2)) + (3*sqrt((366990269 + 259509026*sqrt(2))/682)*atan((sqrt(11/(31*(366990269 + 259509026*sqrt(2))))*(29367 + 20575*sqrt(2) + (70517 + 49942*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/7688 - (3*sqrt((-366990269 + 259509026*sqrt(2))/682)*atanh((sqrt(11/(31*(-366990269 + 259509026*sqrt(2))))*(29367 - 20575*sqrt(2) + (70517 - 49942*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/7688]

    @test_int [(3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^4, x, 13, -((636602271789*(1 - 4*x)*sqrt(3 - x + 2*x^2))/34359738368) - (9226119881*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/2147483648 - (401135647*(1 - 4*x)*(3 - x + 2*x^2)^(5/2))/335544320 + (25250178739*(3 - x + 2*x^2)^(7/2))/5725224960 + (112244125*x*(3 - x + 2*x^2)^(7/2))/122683392 + (122595067*x^2*(3 - x + 2*x^2)^(7/2))/19169280 + (23460839*x^3*(3 - x + 2*x^2)^(7/2))/532480 + (3684995*x^4*(3 - x + 2*x^2)^(7/2))/39936 + (1046225*x^5*(3 - x + 2*x^2)^(7/2))/9984 + (13875/208)*x^6*(3 - x + 2*x^2)^(7/2) + (625/28)*x^7*(3 - x + 2*x^2)^(7/2) - (14641852251147*asinh((1 - 4*x)/sqrt(23)))/(68719476736*sqrt(2))]
    @test_int [(3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^3, x, 11, -((459555525*(1 - 4*x)*sqrt(3 - x + 2*x^2))/1073741824) - (6660225*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/67108864 - (57915*(1 - 4*x)*(3 - x + 2*x^2)^(5/2))/2097152 - (1696165*(3 - x + 2*x^2)^(7/2))/2752512 + (509257*x*(3 - x + 2*x^2)^(7/2))/294912 + (80483*x^2*(3 - x + 2*x^2)^(7/2))/9216 + (3823/256)*x^3*(3 - x + 2*x^2)^(7/2) + (1175/96)*x^4*(3 - x + 2*x^2)^(7/2) + (125/24)*x^5*(3 - x + 2*x^2)^(7/2) - (10569777075*asinh((1 - 4*x)/sqrt(23)))/(2147483648*sqrt(2))]
    @test_int [(3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^2, x, 9, -((4091815*(1 - 4*x)*sqrt(3 - x + 2*x^2))/16777216) - (177905*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/3145728 - (1547*(1 - 4*x)*(3 - x + 2*x^2)^(5/2))/98304 + (23225*(3 - x + 2*x^2)^(7/2))/43008 + (8467*x*(3 - x + 2*x^2)^(7/2))/4608 + (305/144)*x^2*(3 - x + 2*x^2)^(7/2) + (5/4)*x^3*(3 - x + 2*x^2)^(7/2) - (94111745*asinh((1 - 4*x)/sqrt(23)))/(33554432*sqrt(2))]
    @test_int [(3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^1, x, 7, -((732665*(1 - 4*x)*sqrt(3 - x + 2*x^2))/524288) - (31855*(1 - 4*x)*(3 - x + 2*x^2)^(3/2))/98304 - (277*(1 - 4*x)*(3 - x + 2*x^2)^(5/2))/3072 + (141/448)*(3 - x + 2*x^2)^(7/2) + (5/16)*x*(3 - x + 2*x^2)^(7/2) - (16851295*asinh((1 - 4*x)/sqrt(23)))/(1048576*sqrt(2))]
    @test_int [(3 - x + 2*x^2)^(5/2)/(2 + 3*x + 5*x^2)^1, x, 10, -((226249 - 99620*x)*sqrt(3 - x + 2*x^2))/80000 - ((103 - 60*x)*(3 - x + 2*x^2)^(3/2))/600 - (7216203*asinh((1 - 4*x)/sqrt(23)))/(800000*sqrt(2)) - (121*sqrt((11*(-15457 + 25000*sqrt(2)))/31)*atan((sqrt(11/(62*(-15457 + 25000*sqrt(2))))*(196 - 443*sqrt(2) - (690 + 247*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/3125 + (121*sqrt((11*(15457 + 25000*sqrt(2)))/31)*atanh((sqrt(11/(62*(15457 + 25000*sqrt(2))))*(196 + 443*sqrt(2) - (690 - 247*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/3125]
    @test_int [(3 - x + 2*x^2)^(5/2)/(2 + 3*x + 5*x^2)^2, x, 11, -((1277 + 2240*x)*sqrt(3 - x + 2*x^2))/7750 + (4*(4 - 5*x)*(3 - x + 2*x^2)^(3/2))/155 + ((3 + 10*x)*(3 - x + 2*x^2)^(5/2))/(31*(2 + 3*x + 5*x^2)) - (4799*asinh((1 - 4*x)/sqrt(23)))/(2500*sqrt(2)) + (11*sqrt((11*(224510383 + 194487500*sqrt(2)))/31)*atan((sqrt(11/(62*(224510383 + 194487500*sqrt(2))))*(21136 + 33287*sqrt(2) + (87710 + 54423*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/38750 - (11*sqrt((11*(-224510383 + 194487500*sqrt(2)))/31)*atanh((sqrt(11/(62*(-224510383 + 194487500*sqrt(2))))*(21136 - 33287*sqrt(2) + (87710 - 54423*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/38750]
    @test_int [(3 - x + 2*x^2)^(5/2)/(2 + 3*x + 5*x^2)^3, x, 11, ((11359 - 12920*x)*sqrt(3 - x + 2*x^2))/48050 + ((3 + 10*x)*(3 - x + 2*x^2)^(5/2))/(62*(2 + 3*x + 5*x^2)^2) + ((769 + 2336*x)*(3 - x + 2*x^2)^(3/2))/(3844*(2 + 3*x + 5*x^2)) - (4*sqrt(2)*asinh((1 - 4*x)/sqrt(23)))/125 + (sqrt(11*(1 + 4*sqrt(2)))*(2937349 + 1978861*sqrt(2))*atan((sqrt(11/(62*(3531015707557 + 2498852071250*sqrt(2))))*(3957722 + 2937349*sqrt(2) + (9832420 + 6895071*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/29791000 - ((2937349 - 1978861*sqrt(2))*sqrt(11*(-1 + 4*sqrt(2)))*atanh((sqrt(11/(62*(-3531015707557 + 2498852071250*sqrt(2))))*(3957722 - 2937349*sqrt(2) + (9832420 - 6895071*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/29791000]

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

    @test_int [(2 + 3*x + 5*x^2)^4/sqrt(3 - x + 2*x^2), x, 10, (16493087661*sqrt(3 - x + 2*x^2))/29360128 + (1572007407*x*sqrt(3 - x + 2*x^2))/7340032 - (15428243*x^2*sqrt(3 - x + 2*x^2))/131072 - (19750457*x^3*sqrt(3 - x + 2*x^2))/229376 + (686531*x^4*sqrt(3 - x + 2*x^2))/6144 + (2116475*x^5*sqrt(3 - x + 2*x^2))/10752 + (57375/448)*x^6*sqrt(3 - x + 2*x^2) + (625/16)*x^7*sqrt(3 - x + 2*x^2) + (2899366573*asinh((1 - 4*x)/sqrt(23)))/(8388608*sqrt(2))]
    @test_int [(2 + 3*x + 5*x^2)^3/sqrt(3 - x + 2*x^2), x, 8, -((203373*sqrt(3 - x + 2*x^2))/32768) - (372783*x*sqrt(3 - x + 2*x^2))/8192 - (3387*x^2*sqrt(3 - x + 2*x^2))/1024 + (8185/256)*x^3*sqrt(3 - x + 2*x^2) + (1355/48)*x^4*sqrt(3 - x + 2*x^2) + (125/12)*x^5*sqrt(3 - x + 2*x^2) - (9267707*asinh((1 - 4*x)/sqrt(23)))/(65536*sqrt(2))]
    @test_int [(2 + 3*x + 5*x^2)^2/sqrt(3 - x + 2*x^2), x, 6, -((11373*sqrt(3 - x + 2*x^2))/1024) + (3443/768)*x*sqrt(3 - x + 2*x^2) + (655/96)*x^2*sqrt(3 - x + 2*x^2) + (25/8)*x^3*sqrt(3 - x + 2*x^2) + (30725*asinh((1 - 4*x)/sqrt(23)))/(2048*sqrt(2))]
    @test_int [(2 + 3*x + 5*x^2)^1/sqrt(3 - x + 2*x^2), x, 4, (39/16)*sqrt(3 - x + 2*x^2) + (5/4)*x*sqrt(3 - x + 2*x^2) + (17*asinh((1 - 4*x)/sqrt(23)))/(32*sqrt(2))]
    @test_int [1/(sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^1), x, 5, sqrt((1/682)*(13 + 10*sqrt(2)))*atan((sqrt(11/(31*(13 + 10*sqrt(2))))*(7 + 3*sqrt(2) + (13 + 10*sqrt(2))*x))/sqrt(3 - x + 2*x^2)) - sqrt((1/682)*(-13 + 10*sqrt(2)))*atanh((sqrt(11/(31*(-13 + 10*sqrt(2))))*(7 - 3*sqrt(2) + (13 - 10*sqrt(2))*x))/sqrt(3 - x + 2*x^2))]
    @test_int [1/(sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^2), x, 6, ((4 + 65*x)*sqrt(3 - x + 2*x^2))/(682*(2 + 3*x + 5*x^2)) + (sqrt((2343727 + 1678700*sqrt(2))/682)*atan((sqrt(11/(31*(2343727 + 1678700*sqrt(2))))*(2119 + 1816*sqrt(2) + (5751 + 3935*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/1364 - (sqrt((-2343727 + 1678700*sqrt(2))/682)*atanh((sqrt(11/(31*(-2343727 + 1678700*sqrt(2))))*(2119 - 1816*sqrt(2) + (5751 - 3935*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/1364]
    @test_int [1/(sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^3), x, 7, ((4 + 65*x)*sqrt(3 - x + 2*x^2))/(1364*(2 + 3*x + 5*x^2)^2) + ((26794 + 86265*x)*sqrt(3 - x + 2*x^2))/(1860496*(2 + 3*x + 5*x^2)) + (25*sqrt((6414867847 + 4536374600*sqrt(2))/682)*atan((sqrt(11/(31*(6414867847 + 4536374600*sqrt(2))))*(123161 + 85754*sqrt(2) + (294669 + 208915*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/3720992 - (25*sqrt((-6414867847 + 4536374600*sqrt(2))/682)*atanh((sqrt(11/(31*(-6414867847 + 4536374600*sqrt(2))))*(123161 - 85754*sqrt(2) + (294669 - 208915*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/3720992]

    @test_int [(2 + 3*x + 5*x^2)^4/(3 - x + 2*x^2)^(3/2), x, 9, -((14641*(101 + 79*x))/(1472*sqrt(3 - x + 2*x^2))) - (31009685*sqrt(3 - x + 2*x^2))/65536 - (8992487*x*sqrt(3 - x + 2*x^2))/16384 - (111315*x^2*sqrt(3 - x + 2*x^2))/2048 + (79425/512)*x^3*sqrt(3 - x + 2*x^2) + (10075/96)*x^4*sqrt(3 - x + 2*x^2) + (625/24)*x^5*sqrt(3 - x + 2*x^2) - (310445587*asinh((1 - 4*x)/sqrt(23)))/(131072*sqrt(2))]
    @test_int [(2 + 3*x + 5*x^2)^3/(3 - x + 2*x^2)^(3/2), x, 7, -((1331*(17 - 45*x))/(368*sqrt(3 - x + 2*x^2))) - (181561*sqrt(3 - x + 2*x^2))/2048 + (15565/512)*x*sqrt(3 - x + 2*x^2) + (1825/64)*x^2*sqrt(3 - x + 2*x^2) + (125/16)*x^3*sqrt(3 - x + 2*x^2) + (1168881*asinh((1 - 4*x)/sqrt(23)))/(4096*sqrt(2))]
    @test_int [(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^(3/2), x, 5, (121*(19 - 7*x))/(92*sqrt(3 - x + 2*x^2)) + (415/32)*sqrt(3 - x + 2*x^2) + (25/8)*x*sqrt(3 - x + 2*x^2) - (223*asinh((1 - 4*x)/sqrt(23)))/(64*sqrt(2))]
    @test_int [(2 + 3*x + 5*x^2)^1/(3 - x + 2*x^2)^(3/2), x, 4, (-11*(5 + 3*x))/(23*sqrt(3 - x + 2*x^2)) - (5*asinh((1 - 4*x)/sqrt(23)))/(2*sqrt(2))]
    @test_int [1/((3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^1), x, 6, (13 - 6*x)/(253*sqrt(3 - x + 2*x^2)) + (sqrt((247 + 500*sqrt(2))/682)*atan((sqrt(11/(31*(247 + 500*sqrt(2))))*(61 + 4*sqrt(2) + (69 + 65*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/22 - (sqrt((-247 + 500*sqrt(2))/682)*atanh((sqrt(11/(31*(-247 + 500*sqrt(2))))*(61 - 4*sqrt(2) + (69 - 65*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/22]
    @test_int [1/((3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^2), x, 7, -((6315 - 2306*x)/(345092*sqrt(3 - x + 2*x^2))) + (4 + 65*x)/(682*sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)) + (sqrt((1/682)*(129694447 + 103775000*sqrt(2)))*atan((sqrt(11/(31*(129694447 + 103775000*sqrt(2))))*(12611 + 16454*sqrt(2) + (45519 + 29065*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/30008 - (sqrt((1/682)*(-129694447 + 103775000*sqrt(2)))*atanh((sqrt(11/(31*(-129694447 + 103775000*sqrt(2))))*(12611 - 16454*sqrt(2) + (45519 - 29065*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/30008]
    @test_int [1/((3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^3), x, 8, -((4353943 - 6508666*x)/(941410976*sqrt(3 - x + 2*x^2))) + (4 + 65*x)/(1364*sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^2) + (5*(7318 + 17315*x))/(1860496*sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)) + (3*sqrt((1/682)*(13874275807943 + 9819738650000*sqrt(2)))*atan((sqrt(11/(31*(13874275807943 + 9819738650000*sqrt(2))))*(5538393 + 4123702*sqrt(2) + (13785797 + 9662095*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/81861824 - (3*sqrt((1/682)*(-13874275807943 + 9819738650000*sqrt(2)))*atanh((sqrt(11/(31*(-13874275807943 + 9819738650000*sqrt(2))))*(5538393 - 4123702*sqrt(2) + (13785797 - 9662095*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/81861824]

    @test_int [(2 + 3*x + 5*x^2)^4/(3 - x + 2*x^2)^(5/2), x, 8, -((14641*(101 + 79*x))/(4416*(3 - x + 2*x^2)^(3/2))) + (1331*(7409 + 116368*x))/(101568*sqrt(3 - x + 2*x^2)) - (1308645*sqrt(3 - x + 2*x^2))/4096 + (526075*x*sqrt(3 - x + 2*x^2))/3072 + (38375/384)*x^2*sqrt(3 - x + 2*x^2) + (625/32)*x^3*sqrt(3 - x + 2*x^2) + (16955197*asinh((1 - 4*x)/sqrt(23)))/(8192*sqrt(2))]
    @test_int [(2 + 3*x + 5*x^2)^3/(3 - x + 2*x^2)^(5/2), x, 6, -((1331*(17 - 45*x))/(1104*(3 - x + 2*x^2)^(3/2))) + (121*(10679 - 6744*x))/(8464*sqrt(3 - x + 2*x^2)) + (3175/64)*sqrt(3 - x + 2*x^2) + (125/16)*x*sqrt(3 - x + 2*x^2) - (7495*asinh((1 - 4*x)/sqrt(23)))/(128*sqrt(2))]
    @test_int [(2 + 3*x + 5*x^2)^2/(3 - x + 2*x^2)^(5/2), x, 5, (121*(19 - 7*x))/(276*(3 - x + 2*x^2)^(3/2)) - (11*(7351 + 2336*x))/(6348*sqrt(3 - x + 2*x^2)) - (25*asinh((1 - 4*x)/sqrt(23)))/(4*sqrt(2))]
    @test_int [(2 + 3*x + 5*x^2)^1/(3 - x + 2*x^2)^(5/2), x, 3, (-11*(5 + 3*x))/(69*(3 - x + 2*x^2)^(3/2)) - (71*(1 - 4*x))/(529*sqrt(3 - x + 2*x^2))]
    @test_int [1/((3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^1), x, 7, (13 - 6*x)/(759*(3 - x + 2*x^2)^(3/2)) + (3603 - 658*x)/(128018*sqrt(3 - x + 2*x^2)) + (sqrt((-15457 + 25000*sqrt(2))/682)*atan((sqrt(11/(31*(-15457 + 25000*sqrt(2))))*(443 - 98*sqrt(2) + (247 + 345*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/484 - (sqrt((15457 + 25000*sqrt(2))/682)*atanh((sqrt(11/(31*(15457 + 25000*sqrt(2))))*(443 + 98*sqrt(2) + (247 - 345*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/484]
    @test_int [1/((3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^2), x, 8, -((15101 - 8654*x)/(1035276*(3 - x + 2*x^2)^(3/2))) - (3133427 + 1352542*x)/(523849656*sqrt(3 - x + 2*x^2)) + (4 + 65*x)/(682*(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)) + (625*sqrt((1/682)*(30463 + 23600*sqrt(2)))*atan((sqrt(11/(31*(30463 + 23600*sqrt(2))))*(203 + 242*sqrt(2) + (687 + 445*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/660176 - (625*sqrt((1/682)*(-30463 + 23600*sqrt(2)))*atanh((sqrt(11/(31*(-30463 + 23600*sqrt(2))))*(203 - 242*sqrt(2) + (687 - 445*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/660176]
    @test_int [1/((3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^3), x, 9, -((12280939 - 19536786*x)/(2824232928*(3 - x + 2*x^2)^(3/2))) - (1134826571 - 1504660754*x)/(476353953856*sqrt(3 - x + 2*x^2)) + (4 + 65*x)/(1364*(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^2) + (46386 + 86885*x)/(1860496*(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)) + (35*sqrt((1/682)*(2243059557247 + 2011748500000*sqrt(2)))*atan((sqrt(11/(31*(2243059557247 + 2011748500000*sqrt(2))))*(1432939 + 2428746*sqrt(2) + (6290431 + 3861685*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/1800960128 - (35*sqrt((1/682)*(-2243059557247 + 2011748500000*sqrt(2)))*atanh((sqrt(11/(31*(-2243059557247 + 2011748500000*sqrt(2))))*(1432939 - 2428746*sqrt(2) + (6290431 - 3861685*sqrt(2))*x))/sqrt(3 - x + 2*x^2)))/1800960128]

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

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

    #= [(a + b*x + c*x^2)^(1/2)*(d + e*x + f*x^2)^3, x, 6, (1/(1720320*c^7*(143*b^2*f^2 - 4*c*f*(54*b*e + 35*a*f) + 24*c^2*(e^2 + 14*d*f))^3))*((131720904315*b^13*f^9 - 2456333880*b^11*c*f^8*(441*b*e + 548*a*f) + 58720256*c^13*d^4*e*(2817*e^4 - 2509*d*e^2*f - 104811*d^2*f^2) + 3435432*b^9*c^2*f^7*(2906104*a*b*e*f + 1513454*a^2*f^2 + 3*b^2*(367815*e^2 + 148291*d*f)) - 6864*b^7*c^3*f^6*(4844738160*a^2*b*e*f^2 + 1430272288*a^3*f^3 + 2*a*b^2*f*(2271998449*e^2 + 987763205*d*f) + 7*b^3*(152102440*e^3 + 219389313*d*e*f)) + 2112*b^5*c^4*f^5*(24169194592*a^3*b*e*f^3 + 4616148740*a^4*f^4 + 4*a^2*b^2*f^2*(10343131919*e^2 + 5081383957*d*f) + a*b^3*e*f*(25124312976*e^2 + 39230349275*d*f) + b^4*(3964733325*e^4 + 14150785012*d*e^2*f + 3521258312*d^2*f^2)) - 384*b^3*c^5*f^4*(98858656272*a^4*b*e*f^4 + 12770105600*a^5*f^5 + 8*a^3*b^2*f^3*(33774448497*e^2 + 20066897839*d*f) + 4*a^2*b^3*e*f^2*(78672480478*e^2 + 141628968517*d*f) + 8*a*b^4*f*(17248082453*e^4 + 66825300104*d*e^2*f + 17948203559*d^2*f^2) + b^5*(14877496620*e^5 + 115369116303*d*e^3*f + 108539289287*d^2*e*f^2)) - 1048576*c^12*d^2*(a*e*(29142*e^6 - 610985*d*e^4*f - 11883907*d^2*e^2*f^2 - 53398583*d^3*f^3) + 3*b*d*(68307*e^6 + 192163*d*e^4*f - 4874051*d^2*e^2*f^2 - 3973312*d^3*f^3)) + 512*b*c^6*f^3*(24089928800*a^5*b*e*f^5 + 1927317000*a^6*f^6 + 4*a^4*b^2*f^4*(25606740553*e^2 + 20084428329*d*f) + 4*a^3*b^3*e*f^3*(50173126246*e^2 + 115649830915*d*f) + 4*a^2*b^4*f^2*(45663608393*e^4 + 209172651108*d*e^2*f + 65418587670*d^2*f^2) + 4*a*b^5*e*f*(15199472358*e^4 + 127967138039*d*e^2*f + 130033099046*d^2*f^2) + b^6*(4282531155*e^6 + 69998592069*d*e^4*f + 177563737787*d^2*e^2*f^2 + 38819910558*d^3*f^3)) - 1024*c^7*f^2*(1053696000*a^6*e*f^6 + 9800*a^5*b*f^5*(853397*e^2 + 1034957*d*f) + 4*a^4*b^2*e*f^4*(7200497764*e^2 + 25177071031*d*f) + 16*a^3*b^3*f^3*(3053567673*e^4 + 19636997152*d*e^2*f + 7926092447*d^2*f^2) + 4*a^2*b^4*e*f^2*(9738631768*e^4 + 99336009139*d*e^2*f + 122727201117*d^2*f^2) + 2*a*b^5*f*(4966562363*e^6 + 88123491107*d*e^4*f + 239603241825*d^2*e^2*f^2 + 56024287482*d^3*f^3) + b^6*(410734800*e^7 + 14451268692*d*e^5*f + 92189499961*d^2*e^3*f^2 + 84339860156*d^3*e*f^3)) + 262144*c^11*(b^2*d^2*e*(312156*e^6 + 3382983*d*e^4*f - 62232813*d^2*e^2*f^2 - 206079503*d^3*f^3) + a*b*d*(157590*e^8 - 3308772*d*e^6*f - 105205186*d^2*e^4*f^2 - 637198919*d^3*e^2*f^3 - 215178992*d^4*f^4) - a^2*e*(24336*e^8 + 296412*d*e^6*f + 9185868*d^2*e^4*f^2 + 108609592*d^3*e^2*f^3 + 438813277*d^4*f^4)) + 65536*c^10*(a^3*e*f^2*(235344*e^6 + 24336056*d*e^4*f + 356185137*d^2*e^2*f^2 + 1596586796*d^3*f^3) - 2*a*b^2*e*(74970*e^8 - 2475126*d*e^6*f - 186470652*d^2*e^4*f^2 - 1716697504*d^3*e^2*f^3 - 2176332655*d^4*f^4) - b^3*d*(92610*e^8 + 2682224*d*e^6*f - 169582890*d^2*e^4*f^2 - 1350506795*d^3*e^2*f^3 - 448983808*d^4*f^4) + a^2*b*f*(1311996*e^8 + 45170568*d*e^6*f + 822639183*d^2*e^4*f^2 + 4639404056*d^3*e^2*f^3 + 1569223628*d^4*f^4)) + 4096*c^8*f*(4900*a^5*e*f^5*(49748*e^2 + 571991*d*f) + 4*a^4*b*f^4*(335664737*e^4 + 4352751844*d*e^2*f + 2659134940*d^2*f^2) + 8*a^3*b^2*e*f^3*(326402082*e^4 + 5376699867*d*e^2*f + 9864342320*d^2*f^2) + 2*a^2*b^3*f^2*(1083351109*e^6 + 22792548487*d*e^4*f + 80652437601*d^2*e^2*f^2 + 23088009882*d^3*f^3) + a*b^4*e*f*(385500416*e^6 + 15586684480*d*e^4*f + 103082137027*d^2*e^2*f^2 + 99922313028*d^3*f^3) + b^5*(9287460*e^8 + 610183392*d*e^6*f + 10831211407*d^2*e^4*f^2 + 32393340072*d^3*e^2*f^3 + 7742418780*d^4*f^4)) - 16384*c^9*(2*a^4*e*f^4*(9455980*e^4 + 245971509*d*e^2*f + 1490134345*d^2*f^2) + 2*a^3*b*f^3*(27896093*e^6 + 942789737*d*e^4*f + 6734466683*d^2*e^2*f^2 + 2818017342*d^3*f^3) + a^2*b^2*e*f^2*(64485312*e^6 + 2236392612*d*e^4*f + 20942743419*d^2*e^2*f^2 + 28182484148*d^3*f^3) + 2*a*b^3*f*(1413776*e^8 + 302603620*d*e^6*f + 5043948047*d^2*e^4*f^2 + 15157082192*d^3*e^2*f^3 + 3786148212*d^4*f^4) + b^4*(79380*e^9 + 7359744*d*e^7*f + 387317052*d^2*e^5*f^2 + 4841825320*d^3*e^3*f^3 + 6006507169*d^4*e*f^4)) - 2*c*(43906968105*b^12*f^9 - 245633388*b^10*c*f^8*(1379*b*e + 1532*a*f) - 1048576*c^12*d^3*(110583*e^6 - 138989*d*e^4*f - 3407607*d^2*e^2*f^2 + 6050520*d^3*f^3) + 490776*b^8*c^2*f^7*(5250974*a*b*e*f + 2416686*a^2*f^2 + b^2*(2223718*e^2 + 1038323*d*f)) - 13728*b^6*c^3*f^6*(492065076*a^2*b*e*f^2 + 132738080*a^3*f^3 + 3*a*b^2*f*(176858050*e^2 + 90858339*d*f) + 4*b^3*(34352969*e^3 + 58728241*d*e*f)) + 384*b^4*c^4*f^5*(20792658316*a^3*b*e*f^3 + 3839829922*a^4*f^4 + 6*a^2*b^2*f^2*(6629794868*e^2 + 4130919793*d*f) + 8*a*b^3*e*f*(3557498735*e^2 + 6646367013*d*f) + b^4*(4810071476*e^4 + 21483980518*d*e^2*f + 6029817079*d^2*f^2)) - 256*b^2*c^5*f^4*(17343268532*a^4*b*e*f^4 + 2278284400*a^5*f^5 + 32*a^2*b^3*e*f^2*(2118571586*e^2 + 4977069483*d*f) + 4*a^3*b^2*f^3*(12498823148*e^2 + 10633907561*d*f) + 4*a*b^4*f*(9079346892*e^4 + 42883026358*d*e^2*f + 13991098693*d^2*f^2) + b^5*(3656895921*e^5 + 42555368646*d*e^3*f + 44375607562*d^2*e*f^2)) + 512*c^6*f^3*(1738059400*a^5*b*e*f^5 + 180075000*a^6*f^6 + 32*a^3*b^3*e*f^3*(546455027*e^2 + 1963706809*d*f) + 4*a^4*b^2*f^4*(2013949206*e^2 + 2779080325*d*f) + 8*a^2*b^4*f^2*(2523548465*e^4 + 15625583676*d*e^2*f + 6737286624*d^2*f^2) + 2*a*b^5*e*f*(4283098239*e^4 + 45932792594*d*e^2*f + 56997445662*d^2*f^2) + b^6*(156962533*e^6 + 15148524573*d*e^4*f + 42416899375*d^2*e^2*f^2 + 8988921370*d^3*f^3)) - 2048*c^7*f^2*(4900*a^5*f^5*(17082*e^2 + 109025*d*f) + 16*a^4*b*e*f^4*(35569619*e^2 + 263912775*d*f) + 8*a^3*b^2*f^3*(151347142*e^4 + 1783396074*d*e^2*f + 1268677179*d^2*f^2) + 2*a^2*b^3*e*f^2*(755059707*e^4 + 10821624946*d*e^2*f + 19337083422*d^2*f^2) + a*b^4*f*(484282925*e^6 + 12583857267*d*e^4*f + 42853302525*d^2*e^2*f^2 + 12075228174*d^3*f^3) - 2*b^5*(43960616*e^7 - 608750961*d*e^5*f - 5171674308*d^2*e^3*f^2 - 3722883984*d^3*e*f^3)) + 4096*c^8*f*(8*a^4*f^4*(2433286*e^4 + 51672950*d*e^2*f + 160566875*d^2*f^2) + 4*a^3*b*e*f^3*(9758445*e^4 + 488337830*d*e^2*f + 1895086858*d^2*f^2) + 8*a*b^3*e*f*(2104466*e^6 + 184423833*d*e^4*f + 1841718672*d^2*e^2*f^2 + 2016546368*d^3*f^3) + 2*a^2*b^2*f^2*(56510211*e^6 + 1528505919*d*e^4*f + 8653400253*d^2*e^2*f^2 + 4009042702*d^3*f^3) - b^4*(23205028*e^8 + 85161440*d*e^6*f - 2817028113*d^2*e^4*f^2 - 4815589600*d^3*e^2*f^3 - 458527624*d^4*f^4)) + 262144*c^11*d*(2*b*d*e*(331749*e^6 + 771040*d*e^4*f - 18149947*d^2*e^2*f^2 + 22672692*d^3*f^3) - a*(41022*e^8 - 458838*d*e^6*f + 2085770*d^2*e^4*f^2 + 39393795*d^3*e^2*f^3 - 1584660*d^4*f^4)) + 65536*c^10*(4*a*b*e*(20511*e^8 - 130662*d*e^6*f + 375627*d^2*e^4*f^2 + 87130670*d^3*e^2*f^3 + 74825940*d^4*f^4) - b^2*d*(1285974*e^8 + 14374050*d*e^6*f - 131864546*d^2*e^4*f^2 - 30466239*d^3*e^2*f^3 + 92275428*d^4*f^4) + a^2*f*(156924*e^8 - 127560*d*e^6*f + 12735729*d^2*e^4*f^2 + 174417264*d^3*e^2*f^3 + 186029480*d^4*f^4)) + 32768*c^9*(a^3*f^3*(265221*e^6 - 12941097*d*e^4*f - 192404527*d^2*e^2*f^2 - 375156250*d^3*f^3) - 2*a^2*b*e*f^2*(1191612*e^6 + 11970369*d*e^4*f + 312568812*d^2*e^2*f^2 + 720893488*d^3*f^3) - a*b^2*f*(633996*e^8 - 2283588*d*e^6*f + 543032289*d^2*e^4*f^2 + 1818592824*d^3*e^2*f^3 + 485333240*d^4*f^4) + 2*b^3*(200655*e^9 + 8307722*d*e^7*f - 37434591*d^2*e^5*f^2 - 254217334*d^3*e^3*f^3 + 6701404*d^4*e*f^4)))*x)*sqrt(a + b*x + c*x^2)) + ((20*c*e - 13*b*f + 14*c*f*x)*(a + b*x + c*x^2)^(3/2)*(d + e*x + f*x^2)^2)/(112*c^2) - (1/(645120*c^5*(143*b^2*f^2 - 4*c*f*(54*b*e + 35*a*f) + 24*c^2*(e^2 + 14*d*f))^3))*((8*c*(143*b^2*f^2 - 4*c*f*(54*b*e + 35*a*f) + 24*c^2*(e^2 + 14*d*f))*(1859*b^5*f^4*(35*b*e + 128*a*f) + 14336*c^6*d^2*e*(9*e^2 + 44*d*f) - 52*b^3*c*f^3*(19507*a*b*e*f + 17024*a^2*f^2 - b^2*(4830*e^2 - 43648*d*f)) + 8*b*c^2*f^2*(341622*a^2*b*e*f^2 + 26880*a^3*f^3 + 8*a*b^2*f*(8689*e^2 + 82872*d*f) - b^3*(149905*e^3 - 916902*d*e*f)) - 64*c^3*f*(9485*a^3*e*f^3 - a*b^2*e*f*(7977*e^2 - 173914*d*f) + 2*a^2*b*f^2*(12629*e^2 + 23968*d*f) - b^3*(17885*e^4 - 71136*d*e^2*f - 157520*d^2*f^2)) + 512*c^5*(4*b*d*(180*e^4 - 138*d*e^2*f - 5453*d^2*f^2) - a*e*(117*e^4 + 1289*d*e^2*f + 6069*d^2*f^2)) + 128*c^4*(a^2*e*f^2*(1103*e^2 + 21518*d*f) + 2*a*b*f*(467*e^4 + 11496*d*e^2*f + 41048*d^2*f^2) - b^2*(1575*e^5 + 15247*d*e^3*f - 127245*d^2*e*f^2))) + (656*c^3*d*e - 1001*b^3*f^2 + 22*b*c*f*(77*b*e + 54*a*f) - 8*c^2*(56*b*e^2 + 292*b*d*f + 61*a*e*f))*(184041*b^6*f^5 - 572*b^4*c*f^4*(1310*b*e + 1241*a*f) + 6144*c^6*d*(81*e^4 + 171*d*e^2*f - 1715*d^2*f^2) + 8*b^2*c^2*f^3*(304952*a*b*e*f + 49974*a^2*f^2 + b^2*(200467*e^2 - 170170*d*f)) - 64*c^3*f^2*(3306*a^2*b*e*f^2 + 6125*a^3*f^3 + 9*a*b^2*f*(6913*e^2 - 2974*d*f) + b^3*(34992*e^3 - 71702*d*e*f)) + 128*c^4*f*(4*a*b*e*f*(6078*e^2 - 6079*d*f) + a^2*f^2*(1439*e^2 - 2450*d*f) + b^2*(11796*e^4 - 13704*d*e^2*f - 67987*d^2*f^2)) - 512*c^5*(a*f*(996*e^4 + 4188*d*e^2*f - 14455*d^2*f^2) + 18*b*(27*e^5 + 330*d*e^3*f - 1487*d^2*e*f^2))) + 6*c*(143*b^2*f^2 - 4*c*f*(54*b*e + 35*a*f) + 24*c^2*(e^2 + 14*d*f))*(184041*b^6*f^5 - 572*b^4*c*f^4*(1310*b*e + 1241*a*f) + 6144*c^6*d*(81*e^4 + 171*d*e^2*f - 1715*d^2*f^2) + 8*b^2*c^2*f^3*(304952*a*b*e*f + 49974*a^2*f^2 + b^2*(200467*e^2 - 170170*d*f)) - 64*c^3*f^2*(3306*a^2*b*e*f^2 + 6125*a^3*f^3 + 9*a*b^2*f*(6913*e^2 - 2974*d*f) + b^3*(34992*e^3 - 71702*d*e*f)) + 128*c^4*f*(4*a*b*e*f*(6078*e^2 - 6079*d*f) + a^2*f^2*(1439*e^2 - 2450*d*f) + b^2*(11796*e^4 - 13704*d*e^2*f - 67987*d^2*f^2)) - 512*c^5*(a*f*(996*e^4 + 4188*d*e^2*f - 14455*d^2*f^2) + 18*b*(27*e^5 + 330*d*e^3*f - 1487*d^2*e*f^2)))*x)*sqrt(a + b*x + c*x^2)*(224*c^2*d^2 - 60*b*c*d*e - 80*a*c*e^2 + 39*b^2*d*f - 28*a*c*d*f + 52*a*b*e*f + (328*c^2*d*e + 13*b*f*(7*b*e + 8*a*f) - 4*c*(35*b*e^2 - 2*b*d*f + 61*a*e*f))*x + (143*b^2*f^2 - 4*c*f*(54*b*e + 35*a*f) + 24*c^2*(e^2 + 14*d*f))*x^2)) + (1/(13440*c^3*(143*b^2*f^2 - 4*c*f*(54*b*e + 35*a*f) + 24*c^2*(e^2 + 14*d*f))^2))*((143*b^3*f^3 + 4*b*c*f^2*(193*b*e - 243*a*f) - 8*c^2*f*(181*b*e^2 - 34*b*d*f - 34*a*e*f) + 32*c^3*(9*e^3 + 44*d*e*f) + 10*c*f*(143*b^2*f^2 - 4*c*f*(54*b*e + 35*a*f) + 24*c^2*(e^2 + 14*d*f))*x)*sqrt(a + b*x + c*x^2)*(224*c^2*d^2 - 60*b*c*d*e - 80*a*c*e^2 + 39*b^2*d*f - 28*a*c*d*f + 52*a*b*e*f + (328*c^2*d*e + 13*b*f*(7*b*e + 8*a*f) - 4*c*(35*b*e^2 - 2*b*d*f + 61*a*e*f))*x + (143*b^2*f^2 - 4*c*f*(54*b*e + 35*a*f) + 24*c^2*(e^2 + 14*d*f))*x^2)^2) - (1/(32768*c^(15/2)))*((b^2 - 4*a*c)*(4096*c^6*d^3 + 429*b^6*f^3 - 396*b^4*c*f^2*(4*b*e + 5*a*f) - 3072*c^5*d*(2*b*d*e + a*(e^2 + d*f)) + 144*b^2*c^2*f*(40*a*b*e*f + 15*a^2*f^2 + 14*b^2*(e^2 + d*f)) + 768*c^4*(5*b^2*d*(e^2 + d*f) + 2*a^2*f*(e^2 + d*f) + 2*a*b*e*(e^2 + 6*d*f)) - 64*c^3*(60*a^2*b*e*f^2 + 5*a^3*f^3 + 84*a*b^2*f*(e^2 + d*f) + 14*b^3*(e^3 + 6*d*e*f)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))] =#
    @test_int [(a + b*x + c*x^2)^(1/2)*(d + e*x + f*x^2)^2, x, 7, ((128*c^4*d^2 + 21*b^4*f^2 - 56*b^2*c*f*(b*e + a*f) - 32*c^3*(4*b*d*e + a*(e^2 + 2*d*f)) + 8*c^2*(12*a*b*e*f + 2*a^2*f^2 + 5*b^2*(e^2 + 2*d*f)))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(512*c^5) + ((640*c^3*d*e - 105*b^3*f^2 + 28*b*c*f*(10*b*e + 7*a*f) - 8*c^2*(32*a*e*f + 25*b*(e^2 + 2*d*f)))*(a + b*x + c*x^2)^(3/2))/(960*c^4) + ((21*b^2*f^2 - 4*c*f*(14*b*e + 5*a*f) + 40*c^2*(e^2 + 2*d*f))*x*(a + b*x + c*x^2)^(3/2))/(160*c^3) + (f*(8*c*e - 3*b*f)*x^2*(a + b*x + c*x^2)^(3/2))/(20*c^2) + (f^2*x^3*(a + b*x + c*x^2)^(3/2))/(6*c) - ((b^2 - 4*a*c)*(128*c^4*d^2 + 21*b^4*f^2 - 56*b^2*c*f*(b*e + a*f) - 32*c^3*(4*b*d*e + a*(e^2 + 2*d*f)) + 8*c^2*(12*a*b*e*f + 2*a^2*f^2 + 5*b^2*(e^2 + 2*d*f)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(1024*c^(11/2))]
    @test_int [(a + b*x + c*x^2)^(1/2)*(d + e*x + f*x^2)^1, 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 [(a + b*x + c*x^2)^(1/2)/(d + e*x + f*x^2)^1, x, 8, (sqrt(c)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/f - (sqrt(c*(e^2 - 2*d*f - e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e - sqrt(e^2 - 4*d*f))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*f*sqrt(e^2 - 4*d*f)) + (sqrt(c*(e^2 - 2*d*f + e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e + sqrt(e^2 - 4*d*f))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*f*sqrt(e^2 - 4*d*f))]
    @test_int [(a + b*x + c*x^2)^(1/2)/(d + e*x + f*x^2)^2, x, 6, -(((e + 2*f*x)*sqrt(a + b*x + c*x^2))/((e^2 - 4*d*f)*(d + e*x + f*x^2))) - ((f*(b*e - 4*a*f) - (c*e - b*f)*(e - sqrt(e^2 - 4*d*f)))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*(e^2 - 4*d*f)^(3/2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))) + ((f*(b*e - 4*a*f) - (c*e - b*f)*(e + sqrt(e^2 - 4*d*f)))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*(e^2 - 4*d*f)^(3/2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f)))]
    #= [(a + b*x + c*x^2)^(1/2)/(d + e*x + f*x^2)^3, x, 7, -(((e + 2*f*x)*sqrt(a + b*x + c*x^2))/(2*(e^2 - 4*d*f)*(d + e*x + f*x^2)^2)) + ((f*(8*c*d + b*e - 12*a*f)*(c*d*e - 2*b*d*f + a*e*f) - (f*(b*e - 2*a*f) - c*(e^2 - 2*d*f))*(2*c*d*e + 12*a*e*f - b*(e^2 + 10*d*f)) + f*(2*c^2*d*(e^2 + 8*d*f) - f*(24*a*b*e*f - 24*a^2*f^2 - b^2*(e^2 + 20*d*f)) + c*(2*a*f*(11*e^2 - 20*d*f) - b*(e^3 + 20*d*e*f)))*x)*sqrt(a + b*x + c*x^2))/(4*(e^2 - 4*d*f)^2*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(d + e*x + f*x^2)) - (f*((c*e - b*f)*(e - sqrt(e^2 - 4*d*f))*(24*c^2*d^2 - 24*a*b*e*f + 24*a^2*f^2 + b^2*(e^2 + 20*d*f) - 4*c*(6*b*d*e - 5*a*e^2 + 8*a*d*f)) + 2*(b^3*e*f*(e^2 - 16*d*f) - 4*b*e*f*(3*c^2*d^2 + 15*a^2*f^2 + 2*a*c*(2*e^2 + d*f)) + b^2*(a*f^2*(11*e^2 + 52*d*f) - c*(e^4 - 17*d*e^2*f + 4*d^2*f^2)) + 4*a*(12*a^2*f^4 + a*c*f^2*(13*e^2 - 28*d*f) + c^2*(e^4 - 5*d*e^2*f + 16*d^2*f^2))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(8*sqrt(2)*(e^2 - 4*d*f)^(5/2)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(c*(e^2 - 2*d*f - e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e - sqrt(e^2 - 4*d*f))))) + (f*((c*e - b*f)*(e + sqrt(e^2 - 4*d*f))*(24*c^2*d^2 - 24*a*b*e*f + 24*a^2*f^2 + b^2*(e^2 + 20*d*f) - 4*c*(6*b*d*e - 5*a*e^2 + 8*a*d*f)) + 2*(b^3*e*f*(e^2 - 16*d*f) - 4*b*e*f*(3*c^2*d^2 + 15*a^2*f^2 + 2*a*c*(2*e^2 + d*f)) + b^2*(a*f^2*(11*e^2 + 52*d*f) - c*(e^4 - 17*d*e^2*f + 4*d^2*f^2)) + 4*a*(12*a^2*f^4 + a*c*f^2*(13*e^2 - 28*d*f) + c^2*(e^4 - 5*d*e^2*f + 16*d^2*f^2))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(8*sqrt(2)*(e^2 - 4*d*f)^(5/2)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(c*(e^2 - 2*d*f + e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e + sqrt(e^2 - 4*d*f)))))] =#

    @test_int [(a + b*x + c*x^2)^(3/2)*(d + e*x + f*x^2)^2, x, 8, -(((b^2 - 4*a*c)*(768*c^4*d^2 + 99*b^4*f^2 - 72*b^2*c*f*(4*b*e + 3*a*f) - 128*c^3*(6*b*d*e + a*(e^2 + 2*d*f)) + 16*c^2*(24*a*b*e*f + 3*a^2*f^2 + 14*b^2*(e^2 + 2*d*f)))*(b + 2*c*x)*sqrt(a + b*x + c*x^2))/(16384*c^6)) + ((768*c^4*d^2 + 99*b^4*f^2 - 72*b^2*c*f*(4*b*e + 3*a*f) - 128*c^3*(6*b*d*e + a*(e^2 + 2*d*f)) + 16*c^2*(24*a*b*e*f + 3*a^2*f^2 + 14*b^2*(e^2 + 2*d*f)))*(b + 2*c*x)*(a + b*x + c*x^2)^(3/2))/(6144*c^5) + ((5376*c^3*d*e - 693*b^3*f^2 + 36*b*c*f*(56*b*e + 31*a*f) - 32*c^2*(48*a*e*f + 49*b*(e^2 + 2*d*f)))*(a + b*x + c*x^2)^(5/2))/(13440*c^4) + ((99*b^2*f^2 - 12*c*f*(24*b*e + 7*a*f) + 224*c^2*(e^2 + 2*d*f))*x*(a + b*x + c*x^2)^(5/2))/(1344*c^3) + (f*(32*c*e - 11*b*f)*x^2*(a + b*x + c*x^2)^(5/2))/(112*c^2) + (f^2*x^3*(a + b*x + c*x^2)^(5/2))/(8*c) + ((b^2 - 4*a*c)^2*(768*c^4*d^2 + 99*b^4*f^2 - 72*b^2*c*f*(4*b*e + 3*a*f) - 128*c^3*(6*b*d*e + a*(e^2 + 2*d*f)) + 16*c^2*(24*a*b*e*f + 3*a^2*f^2 + 14*b^2*(e^2 + 2*d*f)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(32768*c^(13/2))]
    @test_int [(a + b*x + c*x^2)^(3/2)*(d + e*x + f*x^2)^1, 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 [(a + b*x + c*x^2)^(3/2)/(d + e*x + f*x^2)^1, x, 9, -(((4*c*e - 5*b*f - 2*c*f*x)*sqrt(a + b*x + c*x^2))/(4*f^2)) + ((3*b^2*f^2 - 12*c*f*(b*e - a*f) + 8*c^2*(e^2 - d*f))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(8*sqrt(c)*f^3) + (((c*e - b*f)*(e - sqrt(e^2 - 4*d*f))*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f)) - 2*f*(2*c*d*f*(b*e - a*f) - f^2*(b^2*d - a^2*f) - c^2*d*(e^2 - d*f)))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*f^3*sqrt(e^2 - 4*d*f)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))) - (((c*e - b*f)*(e + sqrt(e^2 - 4*d*f))*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f)) - 2*f*(2*c*d*f*(b*e - a*f) - f^2*(b^2*d - a^2*f) - c^2*d*(e^2 - d*f)))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*f^3*sqrt(e^2 - 4*d*f)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f)))]
    @test_int [(a + b*x + c*x^2)^(3/2)/(d + e*x + f*x^2)^2, x, 10, -(((c*e - 2*b*f - 2*c*f*x)*sqrt(a + b*x + c*x^2))/(f*(e^2 - 4*d*f))) - ((e + 2*f*x)*(a + b*x + c*x^2)^(3/2))/((e^2 - 4*d*f)*(d + e*x + f*x^2)) + (c^(3/2)*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/f^2 - (((c*e - b*f)*(f*(b*e - 2*a*f) + 2*c*(e^2 - 5*d*f))*(e - sqrt(e^2 - 4*d*f)) - 2*f*(2*c^2*d*(e^2 - 4*d*f) + f*(2*b^2*d*f + 4*a*f*(c*d + a*f) - b*e*(c*d + 3*a*f))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(2*sqrt(2)*f^2*(e^2 - 4*d*f)^(3/2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))) + (((c*e - b*f)*(f*(b*e - 2*a*f) + 2*c*(e^2 - 5*d*f))*(e + sqrt(e^2 - 4*d*f)) - 2*f*(2*c^2*d*(e^2 - 4*d*f) + f*(2*b^2*d*f + 4*a*f*(c*d + a*f) - b*e*(c*d + 3*a*f))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(2*sqrt(2)*f^2*(e^2 - 4*d*f)^(3/2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f)))]
    @test_int [(a + b*x + c*x^2)^(3/2)/(d + e*x + f*x^2)^3, x, 7, -(((e + 2*f*x)*(a + b*x + c*x^2)^(3/2))/(2*(e^2 - 4*d*f)*(d + e*x + f*x^2)^2)) + (3*(4*c*d*e + 4*a*e*f - b*(e^2 + 4*d*f) + 2*(c*e^2 - 2*b*e*f + 4*a*f^2)*x)*sqrt(a + b*x + c*x^2))/(4*(e^2 - 4*d*f)^2*(d + e*x + f*x^2)) - (3*(2*(2*c*d - b*e + 2*a*f)*(c*e - b*f)*(e - sqrt(e^2 - 4*d*f)) - f*(4*b*e*(c*d + 3*a*f) - b^2*(e^2 + 4*d*f) - 4*a*(c*e^2 + 4*a*f^2)))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(4*sqrt(2)*(e^2 - 4*d*f)^(5/2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))) + (3*(2*(2*c*d - b*e + 2*a*f)*(c*e - b*f)*(e + sqrt(e^2 - 4*d*f)) - f*(4*b*e*(c*d + 3*a*f) - b^2*(e^2 + 4*d*f) - 4*a*(c*e^2 + 4*a*f^2)))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(4*sqrt(2)*(e^2 - 4*d*f)^(5/2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f)))]
    #= [(a + b*x + c*x^2)^(3/2)/(d + e*x + f*x^2)^4, x, 8, -(((e + 2*f*x)*(a + b*x + c*x^2)^(3/2))/(3*(e^2 - 4*d*f)*(d + e*x + f*x^2)^3)) + ((20*c*d*e - 3*b*e^2 - 28*b*d*f + 20*a*e*f + 2*(7*c*e^2 - 8*c*d*f - 10*b*e*f + 20*a*f^2)*x)*sqrt(a + b*x + c*x^2))/(12*(e^2 - 4*d*f)^2*(d + e*x + f*x^2)^2) + (((f*(b*e - 2*a*f) - c*(e^2 - 2*d*f))*(40*c^2*d^2*e + 240*a^2*e*f^2 - 20*a*b*f*(7*e^2 + 10*d*f) + b^2*(3*e^3 + 128*d*e*f) + c*(52*a*e^3 + 72*a*d*e*f - 8*b*d*(8*e^2 + 13*d*f))) - (c*d*e - 2*b*d*f + a*e*f)*(8*c^2*d*(3*e^2 + 8*d*f) - 4*c*f*(15*b*d*e + 13*a*e^2 - 32*a*d*f) + f*(140*a*b*e*f - 240*a^2*f^2 - b^2*(3*e^2 + 28*d*f))) - f*(8*c^3*d^2*(11*e^2 + 16*d*f) + 3*f*(b*e - 2*a*f)*(80*a*b*e*f - 80*a^2*f^2 - b^2*(e^2 + 76*d*f)) - 4*c^2*(2*b*d*e*(11*e^2 + 46*d*f) - a*(19*e^4 + 6*d*e^2*f + 32*d^2*f^2)) + c*(32*a^2*f^2*(17*e^2 - 23*d*f) - 4*a*b*e*f*(79*e^2 + 44*d*f) + b^2*(3*e^4 + 310*d*e^2*f + 152*d^2*f^2)))*x)*sqrt(a + b*x + c*x^2))/(24*(e^2 - 4*d*f)^3*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(d + e*x + f*x^2)) + (((c*e - b*f)*(e - sqrt(e^2 - 4*d*f))*(16*c^3*d^2*(e^2 + 6*d*f) + 8*c^2*e*(a*e*(2*e^2 + 7*d*f) - 2*b*d*(e^2 + 11*d*f)) + 2*c*f*(12*a^2*f*(7*e^2 - 8*d*f) - 2*a*b*e*(23*e^2 + 28*d*f) + b^2*d*(49*e^2 + 44*d*f)) + f*(b*e - 2*a*f)*(80*a*b*e*f - 80*a^2*f^2 - b^2*(e^2 + 76*d*f))) - 2*f*(b^4*f*(e^4 - 30*d*e^2*f - 56*d^2*f^2) + b^3*e*(a*f^2*(23*e^2 + 308*d*f) - c*(e^4 - 37*d*e^2*f - 108*d^2*f^2)) - 8*a*(40*a^3*f^5 + 4*a^2*c*f^3*(13*e^2 - 22*d*f) + c^3*d*e^2*(e^2 + 6*d*f) + 6*a*c^2*f*(2*e^4 - 5*d*e^2*f + 8*d^2*f^2)) + 4*b*e*(140*a^3*f^4 + 3*a^2*c*f^2*(29*e^2 - 16*d*f) + 2*c^3*d^2*(e^2 + 6*d*f) + 3*a*c^2*(e^4 + 9*d*e^2*f + 8*d^2*f^2)) - 6*b^2*(4*a^2*f^3*(11*e^2 + 16*d*f) + 2*a*c*f*(3*e^4 + 31*d*e^2*f - 12*d^2*f^2) + c^2*d*(e^4 + 14*d*e^2*f + 8*d^2*f^2))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(16*sqrt(2)*(e^2 - 4*d*f)^(7/2)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(c*(e^2 - 2*d*f - e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e - sqrt(e^2 - 4*d*f))))) - (((c*e - b*f)*(e + sqrt(e^2 - 4*d*f))*(16*c^3*d^2*(e^2 + 6*d*f) + 8*c^2*e*(a*e*(2*e^2 + 7*d*f) - 2*b*d*(e^2 + 11*d*f)) + 2*c*f*(12*a^2*f*(7*e^2 - 8*d*f) - 2*a*b*e*(23*e^2 + 28*d*f) + b^2*d*(49*e^2 + 44*d*f)) + f*(b*e - 2*a*f)*(80*a*b*e*f - 80*a^2*f^2 - b^2*(e^2 + 76*d*f))) - 2*f*(b^4*f*(e^4 - 30*d*e^2*f - 56*d^2*f^2) + b^3*e*(a*f^2*(23*e^2 + 308*d*f) - c*(e^4 - 37*d*e^2*f - 108*d^2*f^2)) - 8*a*(40*a^3*f^5 + 4*a^2*c*f^3*(13*e^2 - 22*d*f) + c^3*d*e^2*(e^2 + 6*d*f) + 6*a*c^2*f*(2*e^4 - 5*d*e^2*f + 8*d^2*f^2)) + 4*b*e*(140*a^3*f^4 + 3*a^2*c*f^2*(29*e^2 - 16*d*f) + 2*c^3*d^2*(e^2 + 6*d*f) + 3*a*c^2*(e^4 + 9*d*e^2*f + 8*d^2*f^2)) - 6*b^2*(4*a^2*f^3*(11*e^2 + 16*d*f) + 2*a*c*f*(3*e^4 + 31*d*e^2*f - 12*d^2*f^2) + c^2*d*(e^4 + 14*d*e^2*f + 8*d^2*f^2))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(16*sqrt(2)*(e^2 - 4*d*f)^(7/2)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(c*(e^2 - 2*d*f + e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e + sqrt(e^2 - 4*d*f)))))] =#

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

    @test_int [(a + b*x + c*x^2)^(-1/2)*(d + e*x + f*x^2)^3, x, 8, (1/(7680*c^6))*((23040*c^5*d^2*e - 3465*b^5*f^3 + 420*b^3*c*f^2*(27*b*e + 34*a*f) - 504*b*c^2*f*(70*a*b*e*f + 22*a^2*f^2 + 25*b^2*(e^2 + d*f)) - 640*c^4*(27*b*d*(e^2 + d*f) + 8*a*e*(e^2 + 6*d*f)) + 96*c^3*(128*a^2*e*f^2 + 275*a*b*f*(e^2 + d*f) + 50*b^2*(e^3 + 6*d*e*f)))*sqrt(a + b*x + c*x^2)) + ((1155*b^4*f^3 - 252*b^2*c*f^2*(15*b*e + 14*a*f) + 5760*c^4*d*(e^2 + d*f) + 24*c^2*f*(322*a*b*e*f + 50*a^2*f^2 + 175*b^2*(e^2 + d*f)) - 160*c^3*(27*a*f*(e^2 + d*f) + 10*b*(e^3 + 6*d*e*f)))*x*sqrt(a + b*x + c*x^2))/(3840*c^5) - ((231*b^3*f^3 - 36*b*c*f^2*(21*b*e + 13*a*f) - 320*c^3*(e^3 + 6*d*e*f) + 24*c^2*f*(32*a*e*f + 35*b*(e^2 + d*f)))*x^2*sqrt(a + b*x + c*x^2))/(960*c^4) + (f*(99*b^2*f^2 - 4*c*f*(81*b*e + 25*a*f) + 360*c^2*(e^2 + d*f))*x^3*sqrt(a + b*x + c*x^2))/(480*c^3) + (f^2*(36*c*e - 11*b*f)*x^4*sqrt(a + b*x + c*x^2))/(60*c^2) + (f^3*x^5*sqrt(a + b*x + c*x^2))/(6*c) + (1/(1024*c^(13/2)))*((1024*c^6*d^3 + 231*b^6*f^3 - 252*b^4*c*f^2*(3*b*e + 5*a*f) - 1536*c^5*d*(b*d*e + a*(e^2 + d*f)) + 840*b^2*c^2*f*(4*a*b*e*f + 2*a^2*f^2 + b^2*(e^2 + d*f)) + 384*c^4*(3*b^2*d*(e^2 + d*f) + 3*a^2*f*(e^2 + d*f) + 2*a*b*e*(e^2 + 6*d*f)) - 320*c^3*(9*a^2*b*e*f^2 + a^3*f^3 + 9*a*b^2*f*(e^2 + d*f) + b^3*(e^3 + 6*d*e*f)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))]
    @test_int [(a + b*x + c*x^2)^(-1/2)*(d + e*x + f*x^2)^2, x, 6, ((384*c^3*d*e - 105*b^3*f^2 + 20*b*c*f*(12*b*e + 11*a*f) - 16*c^2*(16*a*e*f + 9*b*(e^2 + 2*d*f)))*sqrt(a + b*x + c*x^2))/(192*c^4) + ((35*b^2*f^2 - 4*c*f*(20*b*e + 9*a*f) + 48*c^2*(e^2 + 2*d*f))*x*sqrt(a + b*x + c*x^2))/(96*c^3) + (f*(16*c*e - 7*b*f)*x^2*sqrt(a + b*x + c*x^2))/(24*c^2) + (f^2*x^3*sqrt(a + b*x + c*x^2))/(4*c) + ((128*c^4*d^2 + 35*b^4*f^2 - 40*b^2*c*f*(2*b*e + 3*a*f) - 64*c^3*(2*b*d*e + a*(e^2 + 2*d*f)) + 48*c^2*(4*a*b*e*f + a^2*f^2 + b^2*(e^2 + 2*d*f)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(128*c^(9/2))]
    @test_int [(a + b*x + c*x^2)^(-1/2)*(d + e*x + f*x^2)^1, 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 [(a + b*x + c*x^2)^(-1/2)/(d + e*x + f*x^2)^1, x, 5, -((sqrt(2)*f*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(e^2 - 4*d*f)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f)))) + (sqrt(2)*f*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(e^2 - 4*d*f)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f)))]
    @test_int [(a + b*x + c*x^2)^(-1/2)/(d + e*x + f*x^2)^2, x, 6, ((f*(b*e^2 - 2*b*d*f - a*e*f) - c*(e^3 - 3*d*e*f) + f*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f))*x)*sqrt(a + b*x + c*x^2))/((e^2 - 4*d*f)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(d + e*x + f*x^2)) + ((f*(2*c*d - b*e + 2*a*f)*(c*e - b*f)*(e - sqrt(e^2 - 4*d*f)) - 2*f*(2*c^2*d*(e^2 - 4*d*f) + f*(3*a*b*e*f - 4*a^2*f^2 + b^2*(e^2 - 6*d*f)) - c*(4*a*f*(e^2 - 3*d*f) + b*(e^3 - 5*d*e*f))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(2*sqrt(2)*(e^2 - 4*d*f)^(3/2)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))) - ((f*(2*c*d - b*e + 2*a*f)*(c*e - b*f)*(e + sqrt(e^2 - 4*d*f)) - 2*f*(2*c^2*d*(e^2 - 4*d*f) + f*(3*a*b*e*f - 4*a^2*f^2 + b^2*(e^2 - 6*d*f)) - c*(4*a*f*(e^2 - 3*d*f) + b*(e^3 - 5*d*e*f))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(2*sqrt(2)*(e^2 - 4*d*f)^(3/2)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f)))]
    #= [(a + b*x + c*x^2)^(-1/2)/(d + e*x + f*x^2)^3, x, 7, ((f*(b*e^2 - 2*b*d*f - a*e*f) - c*(e^3 - 3*d*e*f) + f*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f))*x)*sqrt(a + b*x + c*x^2))/(2*(e^2 - 4*d*f)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(d + e*x + f*x^2)^2) + ((f*(c*d*e - 2*b*d*f + a*e*f)*(8*c^2*d*(e^2 - 3*d*f) + f*(7*a*b*e*f - 12*a^2*f^2 + b^2*(3*e^2 - 14*d*f)) - c*(2*a*f*(5*e^2 - 18*d*f) + 3*b*(e^3 - 3*d*e*f))) - (c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2)*(c^2*(6*d*e^3 - 26*d^2*e*f) - f*(12*a^2*e*f^2 - a*b*f*(7*e^2 + 10*d*f) - b^2*(3*e^3 - 19*d*e*f)) - c*(2*a*e*f*(5*e^2 - 13*d*f) + b*(3*e^4 - 16*d*e^2*f - 2*d^2*f^2))) - 3*f*(2*c^3*d*(e^4 - 7*d*e^2*f + 8*d^2*f^2) - f^2*(b*e - 2*a*f)*(4*a*b*e*f - 4*a^2*f^2 + b^2*(e^2 - 8*d*f)) + 2*c*f*(3*a*b*e^3*f - a^2*f^2*(7*e^2 - 16*d*f) + b^2*(e^4 - 8*d*e^2*f + 4*d^2*f^2)) - c^2*(4*a*f*(e^4 - 5*d*e^2*f + 10*d^2*f^2) + b*(e^5 - 6*d*e^3*f - 4*d^2*e*f^2)))*x)*sqrt(a + b*x + c*x^2))/(4*(e^2 - 4*d*f)^2*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^2*(d + e*x + f*x^2)) + ((f*(c*e - b*f)*(e - sqrt(e^2 - 4*d*f))*(8*c^3*d^2*(e^2 - 7*d*f) - 3*f*(b*e - 2*a*f)*(4*a*b*e*f - 4*a^2*f^2 + b^2*(e^2 - 8*d*f)) - c*(8*a^2*f^2*(5*e^2 - 11*d*f) - 8*a*b*e*f*(2*e^2 + d*f) - b^2*(3*e^4 - 22*d*e^2*f - 32*d^2*f^2)) - 4*c^2*(b*d*e*(2*e^2 - 17*d*f) + a*(e^4 + 2*d^2*f^2))) - 2*f*(8*c^4*d^2*(e^2 - 4*d*f)^2 - 3*f^2*(28*a^3*b*e*f^3 - 16*a^4*f^4 - 2*a*b^3*e*f*(e^2 - 14*d*f) - 9*a^2*b^2*f^2*(e^2 + 4*d*f) - b^4*(e^4 - 9*d*e^2*f + 28*d^2*f^2)) + 2*c*f*(2*a^3*f^3*(23*e^2 - 56*d*f) - 2*a^2*b*e*f^2*(16*e^2 - 19*d*f) - a*b^2*f*(11*e^4 - 123*d*e^2*f + 172*d^2*f^2) - b^3*(3*e^5 - 26*d*e^3*f + 74*d^2*e*f^2)) - 4*c^3*(b*d*e*(2*e^4 - 17*d*e^2*f + 39*d^2*f^2) + a*(e^6 - d*e^4*f - 39*d^2*e^2*f^2 + 96*d^3*f^3)) + c^2*(8*a^2*f^2*(5*e^4 - 29*d*e^2*f + 54*d^2*f^2) + 4*a*b*e*f*(5*e^4 - 43*d*e^2*f + 65*d^2*f^2) + b^2*(3*e^6 - 17*d*e^4*f - 9*d^2*e^2*f^2 + 188*d^3*f^3))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(8*sqrt(2)*(e^2 - 4*d*f)^(5/2)*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^2*sqrt(c*(e^2 - 2*d*f - e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e - sqrt(e^2 - 4*d*f))))) - ((f*(c*e - b*f)*(e + sqrt(e^2 - 4*d*f))*(8*c^3*d^2*(e^2 - 7*d*f) - 3*f*(b*e - 2*a*f)*(4*a*b*e*f - 4*a^2*f^2 + b^2*(e^2 - 8*d*f)) - c*(8*a^2*f^2*(5*e^2 - 11*d*f) - 8*a*b*e*f*(2*e^2 + d*f) - b^2*(3*e^4 - 22*d*e^2*f - 32*d^2*f^2)) - 4*c^2*(b*d*e*(2*e^2 - 17*d*f) + a*(e^4 + 2*d^2*f^2))) - 2*f*(8*c^4*d^2*(e^2 - 4*d*f)^2 - 3*f^2*(28*a^3*b*e*f^3 - 16*a^4*f^4 - 2*a*b^3*e*f*(e^2 - 14*d*f) - 9*a^2*b^2*f^2*(e^2 + 4*d*f) - b^4*(e^4 - 9*d*e^2*f + 28*d^2*f^2)) + 2*c*f*(2*a^3*f^3*(23*e^2 - 56*d*f) - 2*a^2*b*e*f^2*(16*e^2 - 19*d*f) - a*b^2*f*(11*e^4 - 123*d*e^2*f + 172*d^2*f^2) - b^3*(3*e^5 - 26*d*e^3*f + 74*d^2*e*f^2)) - 4*c^3*(b*d*e*(2*e^4 - 17*d*e^2*f + 39*d^2*f^2) + a*(e^6 - d*e^4*f - 39*d^2*e^2*f^2 + 96*d^3*f^3)) + c^2*(8*a^2*f^2*(5*e^4 - 29*d*e^2*f + 54*d^2*f^2) + 4*a*b*e*f*(5*e^4 - 43*d*e^2*f + 65*d^2*f^2) + b^2*(3*e^6 - 17*d*e^4*f - 9*d^2*e^2*f^2 + 188*d^3*f^3))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(8*sqrt(2)*(e^2 - 4*d*f)^(5/2)*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^2*sqrt(c*(e^2 - 2*d*f + e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e + sqrt(e^2 - 4*d*f)))))] =#

    @test_int [(a + b*x + c*x^2)^(-3/2)*(d + e*x + f*x^2)^3, x, 7, (1/(c^5*(b^2 - 4*a*c)*sqrt(a + b*x + c*x^2)))*(2*(3*a*b^4*c*e*f^2 - a*b^5*f^3 + a*b^3*c*f*(5*a*f^2 - 3*c*(e^2 + d*f)) - b*c^2*(c^3*d^3 + 5*a^3*f^3 + 3*a*c^2*d*(e^2 + d*f) - 9*a^2*c*f*(e^2 + d*f)) - a*b^2*c^2*e*(12*a*f^2 - c*(e^2 + 6*d*f)) + 2*a*c^3*e*(3*c^2*d^2 + 3*a^2*f^2 - a*c*(e^2 + 6*d*f)) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*(c^4*d^2 - b*c^3*d*e + b^2*c^2*e^2 - 3*a*c^3*e^2 + b^2*c^2*d*f - 2*a*c^3*d*f - 2*b^3*c*e*f + 7*a*b*c^2*e*f + b^4*f^2 - 4*a*b^2*c*f^2 + a^2*c^2*f^2)*x)) - ((187*b^3*f^3 - 4*b*c*f^2*(114*b*e + 73*a*f) - 64*c^3*(e^3 + 6*d*e*f) + 16*c^2*f*(20*a*e*f + 21*b*(e^2 + d*f)))*sqrt(a + b*x + c*x^2))/(64*c^5) + (f*(41*b^2*f^2 - 4*c*f*(22*b*e + 7*a*f) + 48*c^2*(e^2 + d*f))*x*sqrt(a + b*x + c*x^2))/(32*c^4) + (f^2*(8*c*e - 5*b*f)*x^2*sqrt(a + b*x + c*x^2))/(8*c^3) + (f^3*x^3*sqrt(a + b*x + c*x^2))/(4*c^2) + (3*(105*b^4*f^3 - 280*b^2*c*f^2*(b*e + a*f) + 128*c^4*d*(e^2 + d*f) + 80*c^2*f*(6*a*b*e*f + a^2*f^2 + 3*b^2*(e^2 + d*f)) - 64*c^3*(3*a*f*(e^2 + d*f) + b*(e^3 + 6*d*e*f)))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(128*c^(11/2))]
    @test_int [(a + b*x + c*x^2)^(-3/2)*(d + e*x + f*x^2)^2, x, 5, (2*(2*a*b^2*c*e*f - a*b^3*f^2 + 4*a*c^2*e*(c*d - a*f) - b*c*(c^2*d^2 - 3*a^2*f^2 + a*c*(e^2 + 2*d*f)) - (2*c^4*d^2 + b^4*f^2 - 2*b^2*c*f*(b*e + 2*a*f) - 2*c^3*(b*d*e + a*(e^2 + 2*d*f)) + c^2*(6*a*b*e*f + 2*a^2*f^2 + b^2*(e^2 + 2*d*f)))*x))/(c^3*(b^2 - 4*a*c)*sqrt(a + b*x + c*x^2)) + (f*(8*c*e - 7*b*f)*sqrt(a + b*x + c*x^2))/(4*c^3) + (f^2*x*sqrt(a + b*x + c*x^2))/(2*c^2) + ((15*b^2*f^2 - 12*c*f*(2*b*e + a*f) + 8*c^2*(e^2 + 2*d*f))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(8*c^(7/2))]
    @test_int [(a + b*x + c*x^2)^(-3/2)*(d + e*x + f*x^2)^1, 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 [(a + b*x + c*x^2)^(-3/2)/(d + e*x + f*x^2)^1, x, 6, (2*(b^2*c*e - 2*a*c^2*e - b^3*f - b*c*(c*d - 3*a*f) - c*(2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x))/((b^2 - 4*a*c)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(a + b*x + c*x^2)) - (f*(c*(e^2 - 2*d*f + e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e + sqrt(e^2 - 4*d*f))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*sqrt(e^2 - 4*d*f)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(c*(e^2 - 2*d*f - e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e - sqrt(e^2 - 4*d*f))))) + (f*(c*(e^2 - 2*d*f - e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e - sqrt(e^2 - 4*d*f))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*sqrt(e^2 - 4*d*f)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(c*(e^2 - 2*d*f + e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e + sqrt(e^2 - 4*d*f)))))]
    #= [(a + b*x + c*x^2)^(-3/2)/(d + e*x + f*x^2)^2, x, 7, (c*(b*c*d - 2*a*c*e + a*b*f)*(2*c^2*d*(e^2 - 4*d*f) - c*(3*b*e^3 - 11*b*d*e*f - 4*a*d*f^2) - f*(3*a*b*e*f - 4*a^2*f^2 - b^2*(3*e^2 - 10*d*f))) - (2*c^2*d + b^2*f - c*(b*e + 2*a*f))*(b^3*f*(3*e^2 - 10*d*f) + 2*a*c*e*(2*c*e^2 - 7*c*d*f + a*f^2) - b^2*(3*c*e^3 - 11*c*d*e*f + 2*a*e*f^2) + b*(2*a^2*f^3 - a*c*f*(5*e^2 - 18*d*f) + 2*c^2*d*(e^2 - 4*d*f))) - c*(4*c^4*d^2*(e^2 - 4*d*f) - b^2*f^2*(2*a*b*e*f - 2*a^2*f^2 - b^2*(3*e^2 - 10*d*f)) + 2*c*f*(4*a^2*b*e*f^2 - 4*a^3*f^3 - a*b^2*f*(5*e^2 - 18*d*f) - b^3*(3*e^3 - 11*d*e*f)) - c^2*(4*a^2*e^2*f^2 - 4*a*b*e*f*(5*e^2 - 18*d*f) - b^2*(3*e^4 - 8*d*e^2*f - 14*d^2*f^2)) - 4*c^3*(b*d*e*(e^2 - 4*d*f) + 2*a*(e^4 - 3*d*e^2*f - 3*d^2*f^2)))*x)/((b^2 - 4*a*c)*(e^2 - 4*d*f)*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^2*sqrt(a + b*x + c*x^2)) + (f*(b*e^2 - 2*b*d*f - a*e*f) - c*(e^3 - 3*d*e*f) + f*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f))*x)/((e^2 - 4*d*f)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*sqrt(a + b*x + c*x^2)*(d + e*x + f*x^2)) + (f*((c*e - b*f)*(e - sqrt(e^2 - 4*d*f))*(2*c^2*d*(3*e^2 - 11*d*f) - f*(2*a*b*e*f - 2*a^2*f^2 - b^2*(3*e^2 - 10*d*f)) - c*(4*a*f*(e^2 - 5*d*f) + b*(3*e^3 - 10*d*e*f))) - 2*(2*c^3*d*(3*e^4 - 14*d*e^2*f + 8*d^2*f^2) + f^2*(5*a^2*b*e*f^2 - 4*a^3*f^3 + 2*a*b^2*f*(e^2 - 8*d*f) - b^3*(3*e^3 - 13*d*e*f)) - 2*c*f*(4*a^2*f^2*(e^2 - 3*d*f) - a*b*e*f*(e^2 - d*f) - b^2*(3*e^4 - 13*d*e^2*f + 2*d^2*f^2)) - c^2*(4*a*f*(e^2 - 3*d*f)^2 + b*(3*e^5 - 7*d*e^3*f - 21*d^2*e*f^2))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(2*sqrt(2)*(e^2 - 4*d*f)^(3/2)*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^2*sqrt(c*(e^2 - 2*d*f - e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e - sqrt(e^2 - 4*d*f))))) - (f*((c*e - b*f)*(e + sqrt(e^2 - 4*d*f))*(2*c^2*d*(3*e^2 - 11*d*f) - f*(2*a*b*e*f - 2*a^2*f^2 - b^2*(3*e^2 - 10*d*f)) - c*(4*a*f*(e^2 - 5*d*f) + b*(3*e^3 - 10*d*e*f))) - 2*(2*c^3*d*(3*e^4 - 14*d*e^2*f + 8*d^2*f^2) + f^2*(5*a^2*b*e*f^2 - 4*a^3*f^3 + 2*a*b^2*f*(e^2 - 8*d*f) - b^3*(3*e^3 - 13*d*e*f)) - 2*c*f*(4*a^2*f^2*(e^2 - 3*d*f) - a*b*e*f*(e^2 - d*f) - b^2*(3*e^4 - 13*d*e^2*f + 2*d^2*f^2)) - c^2*(4*a*f*(e^2 - 3*d*f)^2 + b*(3*e^5 - 7*d*e^3*f - 21*d^2*e*f^2))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(2*sqrt(2)*(e^2 - 4*d*f)^(3/2)*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^2*sqrt(c*(e^2 - 2*d*f + e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e + sqrt(e^2 - 4*d*f)))))] =#

    @test_int [(a + b*x + c*x^2)^(-5/2)*(d + e*x + f*x^2)^3, x, 6, (1/(3*c^5*(b^2 - 4*a*c)*(a + b*x + c*x^2)^(3/2)))*(2*(3*a*b^4*c*e*f^2 - a*b^5*f^3 + a*b^3*c*f*(5*a*f^2 - 3*c*(e^2 + d*f)) - b*c^2*(c^3*d^3 + 5*a^3*f^3 + 3*a*c^2*d*(e^2 + d*f) - 9*a^2*c*f*(e^2 + d*f)) - a*b^2*c^2*e*(12*a*f^2 - c*(e^2 + 6*d*f)) + 2*a*c^3*e*(3*c^2*d^2 + 3*a^2*f^2 - a*c*(e^2 + 6*d*f)) - (2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*(c^4*d^2 - b*c^3*d*e + b^2*c^2*e^2 - 3*a*c^3*e^2 + b^2*c^2*d*f - 2*a*c^3*d*f - 2*b^3*c*e*f + 7*a*b*c^2*e*f + b^4*f^2 - 4*a*b^2*c*f^2 + a^2*c^2*f^2)*x)) - (1/(3*c^5*(b^2 - 4*a*c)^2*sqrt(a + b*x + c*x^2)))*(2*(3*b^6*c*e*f^2 - b^7*f^3 + 3*b^5*c*f*(6*a*f^2 - c*(e^2 + d*f)) - 3*b^3*c^2*(29*a^2*f^3 + c^2*d*(e^2 + d*f) - 10*a*c*f*(e^2 + d*f)) - 4*b*c^3*(2*c^3*d^3 - 29*a^3*f^3 + 3*a*c^2*d*(e^2 + d*f) + 24*a^2*c*f*(e^2 + d*f)) - 24*a^2*c^4*e*(6*a*f^2 - c*(e^2 + 6*d*f)) - b^4*c^2*e*(42*a*f^2 - c*(e^2 + 6*d*f)) + 6*b^2*c^3*e*(2*c^2*d^2 + 28*a^2*f^2 - a*c*(e^2 + 6*d*f)) - c*(16*c^6*d^3 - 10*b^6*f^3 + 3*b^4*c*f^2*(7*b*e + 26*a*f) - 24*c^5*d*(b*d*e - a*(e^2 + d*f)) - 6*b^2*c^2*f*(25*a*b*e*f + 27*a^2*f^2 + 2*b^2*(e^2 + d*f)) + 6*c^4*(b^2*d*(e^2 + d*f) - 16*a^2*f*(e^2 + d*f) - 2*a*b*e*(e^2 + 6*d*f)) + c^3*(240*a^2*b*e*f^2 + 56*a^3*f^3 + 84*a*b^2*f*(e^2 + d*f) + b^3*(e^3 + 6*d*e*f)))*x)) + (f^2*(12*c*e - 11*b*f)*sqrt(a + b*x + c*x^2))/(4*c^4) + (f^3*x*sqrt(a + b*x + c*x^2))/(2*c^3) + (f*(35*b^2*f^2 - 20*c*f*(3*b*e + a*f) + 24*c^2*(e^2 + d*f))*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/(8*c^(9/2))]
    @test_int [(a + b*x + c*x^2)^(-5/2)*(d + e*x + f*x^2)^2, x, 5, (2*(2*a*b^2*c*e*f - a*b^3*f^2 + 4*a*c^2*e*(c*d - a*f) - b*c*(c^2*d^2 - 3*a^2*f^2 + a*c*(e^2 + 2*d*f)) - (2*c^4*d^2 + b^4*f^2 - 2*b^2*c*f*(b*e + 2*a*f) - 2*c^3*(b*d*e + a*(e^2 + 2*d*f)) + c^2*(6*a*b*e*f + 2*a^2*f^2 + b^2*(e^2 + 2*d*f)))*x))/(3*c^3*(b^2 - 4*a*c)*(a + b*x + c*x^2)^(3/2)) - (1/(3*c^3*(b^2 - 4*a*c)^2*sqrt(a + b*x + c*x^2)))*(2*(2*b^4*c*e*f + 48*a^2*c^3*e*f - b^5*f^2 + 4*b^2*c^2*e*(2*c*d - 3*a*f) + b^3*c*(10*a*f^2 - c*(e^2 + 2*d*f)) - 4*b*c^2*(2*c^2*d^2 + 8*a^2*f^2 + a*c*(e^2 + 2*d*f)) - 2*c*(8*c^4*d^2 - 2*b^4*f^2 + b^2*c*f*(b*e + 14*a*f) - c^3*(8*b*d*e - 4*a*(e^2 + 2*d*f)) - c^2*(12*a*b*e*f + 16*a^2*f^2 - b^2*(e^2 + 2*d*f)))*x)) + (f^2*atanh((b + 2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x^2))))/c^(5/2)]
    @test_int [(a + b*x + c*x^2)^(-5/2)*(d + e*x + f*x^2)^1, x, 3, (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))/(3*c*(b^2 - 4*a*c)*(a + b*x + c*x^2)^(3/2)) + (2*(8*c*d - 4*b*e + 4*a*f + (b^2*f)/c)*(b + 2*c*x))/(3*(b^2 - 4*a*c)^2*sqrt(a + b*x + c*x^2))]
    #= [(a + b*x + c*x^2)^(-5/2)/(d + e*x + f*x^2)^1, x, 7, (2*(b^2*c*e - 2*a*c^2*e - b^3*f - b*c*(c*d - 3*a*f) - c*(2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*x))/(3*(b^2 - 4*a*c)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(a + b*x + c*x^2)^(3/2)) - (1/(3*(b^2 - 4*a*c)^2*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))^2*sqrt(a + b*x + c*x^2)))*(2*(c*(b*c*d - 2*a*c*e + a*b*f)*(8*c^3*d^2 + b^2*f*(3*b*e - 7*a*f) - 4*c^2*(b*d*e - 3*a*e^2 + 7*a*d*f) - c*(8*a*b*e*f - 20*a^2*f^2 + b^2*(3*e^2 - 7*d*f))) - (2*c^2*d + b^2*f - c*(b*e + 2*a*f))*(3*b^4*e*f - 4*a*c^2*e*(2*c*d + a*f) - b^2*c*e*(4*c*d + 13*a*f) - b^3*(3*c*e^2 - 7*c*d*f + 6*a*f^2) + 4*b*c*(2*c^2*d^2 + 6*a^2*f^2 + a*c*(4*e^2 - 5*d*f))) - c*(16*c^5*d^3 + 3*b^4*f^2*(b*e - 2*a*f) - 8*c^4*d*(3*b*d*e - 5*a*e^2 + 9*a*d*f) - 2*b^2*c*f*(7*a*b*e*f - 19*a^2*f^2 + b^2*(3*e^2 - 4*d*f)) - 2*c^3*(8*a^2*f*(e^2 - 6*d*f) + 2*a*b*e*(5*e^2 + 2*d*f) - b^2*d*(e^2 + 15*d*f)) - c^2*(16*a^2*b*e*f^2 + 40*a^3*f^3 - 4*a*b^2*f*(10*e^2 - 11*d*f) - b^3*(3*e^3 - 10*d*e*f)))*x)) - (f*((c*e - b*f)*(e - sqrt(e^2 - 4*d*f))*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f)) + 2*(c^2*(e^4 - 3*d*e^2*f + d^2*f^2) - f^2*(2*a*b*e*f - a^2*f^2 - b^2*(e^2 - d*f)) + 2*c*f*(a*f*(e^2 - d*f) - b*(e^3 - 2*d*e*f))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*sqrt(e^2 - 4*d*f)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))^2*sqrt(c*(e^2 - 2*d*f - e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e - sqrt(e^2 - 4*d*f))))) + (f*((c*e - b*f)*(e + sqrt(e^2 - 4*d*f))*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f)) + 2*(c^2*(e^4 - 3*d*e^2*f + d^2*f^2) - f^2*(2*a*b*e*f - a^2*f^2 - b^2*(e^2 - d*f)) + 2*c*f*(a*f*(e^2 - d*f) - b*(e^3 - 2*d*e*f))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(sqrt(2)*sqrt(e^2 - 4*d*f)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))^2*sqrt(c*(e^2 - 2*d*f + e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e + sqrt(e^2 - 4*d*f)))))] =#
    #= [(a + b*x + c*x^2)^(-5/2)/(d + e*x + f*x^2)^2, x, 8, -(((2*c^2*d + b^2*f - c*(b*e + 2*a*f))*(b^3*f*(5*e^2 - 14*d*f) + 2*a*c*e*(4*c*e^2 - 13*c*d*f + 3*a*f^2) - b^2*(5*c*e^3 - 17*c*d*e*f + 6*a*e*f^2) + b*(6*a^2*f^3 - a*c*f*(7*e^2 - 22*d*f) + 2*c^2*d*(e^2 - 4*d*f))) - c*(b*c*d - 2*a*c*e + a*b*f)*(2*c^2*d*(e^2 - 4*d*f) - f*(9*a*b*e*f - 12*a^2*f^2 - b^2*(5*e^2 - 14*d*f)) + c*(4*a*f*(e^2 - d*f) - b*(5*e^3 - 17*d*e*f))) + c*(4*c^4*d^2*(e^2 - 4*d*f) - b^2*f^2*(6*a*b*e*f - 6*a^2*f^2 - b^2*(5*e^2 - 14*d*f)) + 2*c*f*(12*a^2*b*e*f^2 - 12*a^3*f^3 - a*b^2*f*(7*e^2 - 22*d*f) - b^3*(5*e^3 - 17*d*e*f)) + c^2*(12*a*b*e*f*(3*e^2 - 10*d*f) - 4*a^2*f^2*(5*e^2 - 8*d*f) + b^2*(5*e^4 - 16*d*e^2*f - 10*d^2*f^2)) - 4*c^3*(b*d*e*(e^2 - 4*d*f) + 2*a*(2*e^4 - 7*d*e^2*f - d^2*f^2)))*x)/(3*(b^2 - 4*a*c)*(e^2 - 4*d*f)*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^2*(a + b*x + c*x^2)^(3/2))) + (3*b^8*e*f^3*(5*e^2 - 19*d*f) + b^6*e*f*(9*a^2*f^4 - a*c*f^2*(56*e^2 - 227*d*f) + 3*c^2*(15*e^4 - 62*d*e^2*f + 14*d^2*f^2)) + 48*a^2*c^3*e*(a^3*f^5 - 3*a^2*c*f^3*(2*e^2 - 9*d*f) + c^3*d*(5*e^4 - 27*d*e^2*f + 29*d^2*f^2) - a*c^2*f*(2*e^4 - 23*d*e^2*f + 57*d^2*f^2)) - b^7*f^2*(3*a*f^2*(11*e^2 - 38*d*f) + c*(45*e^4 - 191*d*e^2*f + 68*d^2*f^2)) - b^4*c*e*(69*a^3*f^5 + a^2*c*f^3*(248*e^2 - 833*d*f) + 3*a*c^2*f*(114*e^4 - 491*d*e^2*f + 185*d^2*f^2) - c^3*d*(25*e^4 - 151*d*e^2*f + 207*d^2*f^2)) + 8*b^2*c^2*e*(15*a^4*f^5 + a^3*c*f^3*(121*e^2 - 439*d*f) - 4*c^4*d^3*(e^2 - 4*d*f) - 3*a*c^3*d*(8*e^4 - 40*d*e^2*f + 33*d^2*f^2) + a^2*c^2*f*(80*e^4 - 395*d*e^2*f + 327*d^2*f^2)) - b^5*(6*a^3*f^6 - a^2*c*f^4*(269*e^2 - 968*d*f) - 3*a*c^2*f^2*(107*e^4 - 482*d*e^2*f + 262*d^2*f^2) + 3*c^3*(5*e^6 - 9*d*e^4*f - 57*d^2*e^2*f^2 + 60*d^3*f^3)) - 8*b*c^2*(12*a^5*f^6 - 2*a^4*c*f^4*(13*e^2 - 88*d*f) - 2*c^5*d^4*(e^2 - 4*d*f) + a^3*c^2*f^2*(27*e^4 + 26*d*e^2*f - 428*d^2*f^2) - a*c^4*d^2*(9*e^4 - 50*d*e^2*f + 56*d^2*f^2) + a^2*c^3*(23*e^6 - 50*d*e^4*f - 228*d^2*e^2*f^2 + 288*d^3*f^3)) + 2*b^3*c*(24*a^4*f^6 - 298*a^3*c*f^4*(e^2 - 4*d*f) + c^4*d^2*(3*e^4 + 10*d*e^2*f - 88*d^2*f^2) - 3*a^2*c^2*f^2*(81*e^4 - 450*d*e^2*f + 496*d^2*f^2) + a*c^3*(55*e^6 - 88*d*e^4*f - 654*d^2*e^2*f^2 + 600*d^3*f^3)) + c*(32*c^7*d^4*(e^2 - 4*d*f) - 16*c^6*d^2*(e^2 - 4*d*f)*(4*b*d*e - 9*a*e^2 + 14*a*d*f) - 3*b^4*f^3*(b*e - 2*a*f)*(a*b*e*f - a^2*f^2 - b^2*(5*e^2 - 19*d*f)) - b^2*c*f^2*(72*a^3*b*e*f^3 - 48*a^4*f^4 - a^2*b^2*f^2*(247*e^2 - 862*d*f) + 2*a*b^3*e*f*(23*e^2 - 89*d*f) + b^4*(45*e^4 - 196*d*e^2*f + 82*d^2*f^2)) + c^2*f*(144*a^4*b*e*f^4 - 96*a^5*f^5 - 4*a^2*b^3*e*f^2*(67*e^2 - 244*d*f) - 16*a^3*b^2*f^3*(28*e^2 - 103*d*f) + 3*a*b^4*f*(97*e^4 - 444*d*e^2*f + 266*d^2*f^2) + 3*b^5*(15*e^5 - 67*d*e^3*f + 31*d^2*e*f^2)) + c^3*(16*a^3*b*e*f^3*(49*e^2 - 178*d*f) - 16*a^4*f^4*(e^2 + 14*d*f) - 24*a*b^3*e*f*(13*e^4 - 60*d*e^2*f + 35*d^2*f^2) - 12*a^2*b^2*f^2*(27*e^4 - 154*d*e^2*f + 196*d^2*f^2) - 3*b^4*(5*e^6 - 14*d*e^4*f - 39*d^2*e^2*f^2 + 62*d^3*f^3)) + 4*c^5*(b^2*d^2*(3*e^4 + 10*d*e^2*f - 88*d^2*f^2) - 12*a*b*d*e*(3*e^4 - 13*d*e^2*f + 4*d^2*f^2) - 4*a^2*(8*e^6 - 38*d*e^4*f - 3*d^2*e^2*f^2 + 114*d^3*f^3)) - 4*c^4*(8*a^3*f^2*(9*e^4 - 23*d*e^2*f - 43*d^2*f^2) - 5*b^3*d*e*(e^4 - 7*d*e^2*f + 12*d^2*f^2) - 4*a^2*b*e*f*(29*e^4 - 155*d*e^2*f + 165*d^2*f^2) - a*b^2*(25*e^6 - 64*d*e^4*f - 204*d^2*e^2*f^2 + 252*d^3*f^3)))*x)/(3*(b^2 - 4*a*c)^2*(e^2 - 4*d*f)*(c^2*d^2 + f*(b^2*d - a*b*e + a^2*f) - c*(b*d*e - a*(e^2 - 2*d*f)))^3*sqrt(a + b*x + c*x^2)) + (f*(b*e^2 - 2*b*d*f - a*e*f) - c*(e^3 - 3*d*e*f) + f*(f*(b*e - 2*a*f) - c*(e^2 - 2*d*f))*x)/((e^2 - 4*d*f)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(a + b*x + c*x^2)^(3/2)*(d + e*x + f*x^2)) + (f*((c*e - b*f)*(e - sqrt(e^2 - 4*d*f))*(2*c^3*d*(5*e^4 - 27*d*e^2*f + 29*d^2*f^2) + f^2*(b*e - 2*a*f)*(a*b*e*f - a^2*f^2 - b^2*(5*e^2 - 19*d*f)) - c*f*(a*b*e*f*(7*e^2 - 22*d*f) + 6*a^2*f^2*(2*e^2 - 9*d*f) - b^2*(10*e^4 - 43*d*e^2*f + 18*d^2*f^2)) - c^2*(2*a*f*(2*e^4 - 23*d*e^2*f + 57*d^2*f^2) + b*(5*e^5 - 14*d*e^3*f - 21*d^2*e*f^2))) - 2*(2*c^4*d*(5*e^6 - 32*d*e^4*f + 51*d^2*e^2*f^2 - 12*d^3*f^3) + f^3*(7*a^3*b*e*f^3 - 4*a^4*f^4 - a*b^3*e*f*(11*e^2 - 49*d*f) + 3*a^2*b^2*f^2*(e^2 - 10*d*f) + b^4*(5*e^4 - 24*d*e^2*f + 14*d^2*f^2)) + c*f^2*(6*a*b^2*e^2*f*(3*e^2 - 13*d*f) + 3*a^2*b*e*f^2*(3*e^2 - 7*d*f) - 12*a^3*f^3*(e^2 - 3*d*f) - b^3*(15*e^5 - 77*d*e^3*f + 65*d^2*e*f^2)) - 3*c^2*f*(a*b*e*f*(e^4 + 7*d*e^2*f - 47*d^2*f^2) + 2*a^2*f^2*(2*e^4 - 11*d*e^2*f + 14*d^2*f^2) - b^2*(5*e^6 - 24*d*e^4*f + 13*d^2*e^2*f^2 + 10*d^3*f^3)) - c^3*(2*a*f*(2*e^6 - 25*d*e^4*f + 78*d^2*e^2*f^2 - 38*d^3*f^3) + b*(5*e^7 - 9*d*e^5*f - 76*d^2*e^3*f^2 + 127*d^3*e*f^3))))*atanh((4*a*f - b*(e - sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e - sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 - (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(2*sqrt(2)*(e^2 - 4*d*f)^(3/2)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))^3*sqrt(c*(e^2 - 2*d*f - e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e - sqrt(e^2 - 4*d*f))))) - (f*((c*e - b*f)*(e + sqrt(e^2 - 4*d*f))*(2*c^3*d*(5*e^4 - 27*d*e^2*f + 29*d^2*f^2) + f^2*(b*e - 2*a*f)*(a*b*e*f - a^2*f^2 - b^2*(5*e^2 - 19*d*f)) - c*f*(a*b*e*f*(7*e^2 - 22*d*f) + 6*a^2*f^2*(2*e^2 - 9*d*f) - b^2*(10*e^4 - 43*d*e^2*f + 18*d^2*f^2)) - c^2*(2*a*f*(2*e^4 - 23*d*e^2*f + 57*d^2*f^2) + b*(5*e^5 - 14*d*e^3*f - 21*d^2*e*f^2))) - 2*(2*c^4*d*(5*e^6 - 32*d*e^4*f + 51*d^2*e^2*f^2 - 12*d^3*f^3) + f^3*(7*a^3*b*e*f^3 - 4*a^4*f^4 - a*b^3*e*f*(11*e^2 - 49*d*f) + 3*a^2*b^2*f^2*(e^2 - 10*d*f) + b^4*(5*e^4 - 24*d*e^2*f + 14*d^2*f^2)) + c*f^2*(6*a*b^2*e^2*f*(3*e^2 - 13*d*f) + 3*a^2*b*e*f^2*(3*e^2 - 7*d*f) - 12*a^3*f^3*(e^2 - 3*d*f) - b^3*(15*e^5 - 77*d*e^3*f + 65*d^2*e*f^2)) - 3*c^2*f*(a*b*e*f*(e^4 + 7*d*e^2*f - 47*d^2*f^2) + 2*a^2*f^2*(2*e^4 - 11*d*e^2*f + 14*d^2*f^2) - b^2*(5*e^6 - 24*d*e^4*f + 13*d^2*e^2*f^2 + 10*d^3*f^3)) - c^3*(2*a*f*(2*e^6 - 25*d*e^4*f + 78*d^2*e^2*f^2 - 38*d^3*f^3) + b*(5*e^7 - 9*d*e^5*f - 76*d^2*e^3*f^2 + 127*d^3*e*f^3))))*atanh((4*a*f - b*(e + sqrt(e^2 - 4*d*f)) + 2*(b*f - c*(e + sqrt(e^2 - 4*d*f)))*x)/(2*sqrt(2)*sqrt(c*e^2 - 2*c*d*f - b*e*f + 2*a*f^2 + (c*e - b*f)*sqrt(e^2 - 4*d*f))*sqrt(a + b*x + c*x^2))))/(2*sqrt(2)*(e^2 - 4*d*f)^(3/2)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))^3*sqrt(c*(e^2 - 2*d*f + e*sqrt(e^2 - 4*d*f)) + f*(2*a*f - b*(e + sqrt(e^2 - 4*d*f)))))] =#

    @test_int [1/(sqrt(-7 + 2*x + 5*x^2)*(8 + 12*x + 5*x^2)), x, 5, (1/10)*atan((5*(2 + x))/(2*sqrt(-7 + 2*x + 5*x^2))) + (1/5)*atanh((5*(1 + x))/sqrt(-7 + 2*x + 5*x^2))]

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

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

    #= [sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^(5/2), x, 0, 0]
    @test_int [sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^(3/2), x, 0, 0]
    @test_int [sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^(1/2), x, 0, 0]
    @test_int [sqrt(3 - x + 2*x^2)/(2 + 3*x + 5*x^2)^(1/2), x, 0, 0]
    @test_int [sqrt(3 - x + 2*x^2)/(2 + 3*x + 5*x^2)^(3/2), x, 0, 0]
    @test_int [sqrt(3 - x + 2*x^2)/(2 + 3*x + 5*x^2)^(5/2), x, 0, 0] =#

    #= [(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^(5/2), x, 0, 0]
    @test_int [(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^(3/2), x, 0, 0]
    @test_int [(3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^(1/2), x, 0, 0]
    @test_int [(3 - x + 2*x^2)^(3/2)/(2 + 3*x + 5*x^2)^(1/2), x, 0, 0]
    @test_int [(3 - x + 2*x^2)^(3/2)/(2 + 3*x + 5*x^2)^(3/2), x, 0, 0]
    @test_int [(3 - x + 2*x^2)^(3/2)/(2 + 3*x + 5*x^2)^(5/2), x, 0, 0] =#

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

    @test_int [1/(sqrt(a + b*x + c*x^2)*sqrt(d + e*x + f*x^2)), x, 3, -(((b^2*d + b*(sqrt(b^2 - 4*a*c)*d - a*e) - a*(2*c*d + sqrt(b^2 - 4*a*c)*e - 2*a*f))^(1/4)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)^(3/2)*sqrt(2*a + (b + sqrt(b^2 - 4*a*c))*x)*sqrt(((4*a*c - (b + sqrt(b^2 - 4*a*c))^2)^2*(d + e*x + f*x^2))/(((b + sqrt(b^2 - 4*a*c))^2*d - 2*a*(b + sqrt(b^2 - 4*a*c))*e + 4*a^2*f)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)^2))*(1 + (sqrt(2*c^2*d - b*c*e + b^2*f - 2*a*c*f - sqrt(b^2 - 4*a*c)*(c*e - b*f))*(2*a + (b + sqrt(b^2 - 4*a*c))*x))/(sqrt(b^2*d + b*(sqrt(b^2 - 4*a*c)*d - a*e) - a*(2*c*d + sqrt(b^2 - 4*a*c)*e - 2*a*f))*(b + sqrt(b^2 - 4*a*c) + 2*c*x)))*sqrt((1 - ((b + sqrt(b^2 - 4*a*c))*(2*c*d - b*e + 2*a*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x))/((b^2*d + b*(sqrt(b^2 - 4*a*c)*d - a*e) - a*(2*c*d + sqrt(b^2 - 4*a*c)*e - 2*a*f))*(b + sqrt(b^2 - 4*a*c) + 2*c*x)) + ((4*c^2*d - 2*c*(b + sqrt(b^2 - 4*a*c))*e + (b + sqrt(b^2 - 4*a*c))^2*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x)^2)/(((b + sqrt(b^2 - 4*a*c))^2*d - 2*a*(b + sqrt(b^2 - 4*a*c))*e + 4*a^2*f)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)^2))/(1 + (sqrt(2*c^2*d - b*c*e + b^2*f - 2*a*c*f - sqrt(b^2 - 4*a*c)*(c*e - b*f))*(2*a + (b + sqrt(b^2 - 4*a*c))*x))/(sqrt(b^2*d + b*(sqrt(b^2 - 4*a*c)*d - a*e) - a*(2*c*d + sqrt(b^2 - 4*a*c)*e - 2*a*f))*(b + sqrt(b^2 - 4*a*c) + 2*c*x)))^2)*Elliptic.F(2*atan(((2*c^2*d - b*c*e + b^2*f - 2*a*c*f - sqrt(b^2 - 4*a*c)*(c*e - b*f))^(1/4)*sqrt(2*a + (b + sqrt(b^2 - 4*a*c))*x))/((b^2*d + b*(sqrt(b^2 - 4*a*c)*d - a*e) - a*(2*c*d + sqrt(b^2 - 4*a*c)*e - 2*a*f))^(1/4)*sqrt(b + sqrt(b^2 - 4*a*c) + 2*c*x))), (1/4)*(2 + ((b + sqrt(b^2 - 4*a*c))*(2*c*d - b*e + 2*a*f))/(sqrt(b^2*d + b*(sqrt(b^2 - 4*a*c)*d - a*e) - a*(2*c*d + sqrt(b^2 - 4*a*c)*e - 2*a*f))*sqrt(2*c^2*d + b*(b + sqrt(b^2 - 4*a*c))*f - c*(b*e + sqrt(b^2 - 4*a*c)*e + 2*a*f))))))/((4*a*c - (b + sqrt(b^2 - 4*a*c))^2)*(2*c^2*d - b*c*e + b^2*f - 2*a*c*f - sqrt(b^2 - 4*a*c)*(c*e - b*f))^(1/4)*sqrt(a + b*x + c*x^2)*sqrt(d + e*x + f*x^2)*sqrt(1 - ((b + sqrt(b^2 - 4*a*c))*(2*c*d - b*e + 2*a*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x))/((b^2*d + b*(sqrt(b^2 - 4*a*c)*d - a*e) - a*(2*c*d + sqrt(b^2 - 4*a*c)*e - 2*a*f))*(b + sqrt(b^2 - 4*a*c) + 2*c*x)) + ((4*c^2*d - 2*c*(b + sqrt(b^2 - 4*a*c))*e + (b + sqrt(b^2 - 4*a*c))^2*f)*(2*a + (b + sqrt(b^2 - 4*a*c))*x)^2)/(((b + sqrt(b^2 - 4*a*c))^2*d - 2*a*(b + sqrt(b^2 - 4*a*c))*e + 4*a^2*f)*(b + sqrt(b^2 - 4*a*c) + 2*c*x)^2))))]

    #= [(2 + 3*x + 5*x^2)^(5/2)/sqrt(3 - x + 2*x^2), x, 0, 0]
    @test_int [(2 + 3*x + 5*x^2)^(3/2)/sqrt(3 - x + 2*x^2), x, 0, 0]
    @test_int [(2 + 3*x + 5*x^2)^(1/2)/sqrt(3 - x + 2*x^2), x, 0, 0] =#
    @test_int [1/(sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^(1/2)), x, 3, If(13<11, (sqrt(23/11)*(1 - im*sqrt(23) - 4*x)*sqrt(-1 + im*sqrt(23) + 4*x)*sqrt(6 - (1 - im*sqrt(23))*x)*sqrt(((11*im - sqrt(23))*(2 + 3*x + 5*x^2))/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)^2))*(1 - (sqrt(-((3*im - sqrt(23))/(7*im + sqrt(23))))*(6 - (1 - im*sqrt(23))*x))/(1 - im*sqrt(23) - 4*x))*sqrt((11 - (41*(im + sqrt(23))*(6 - (1 - im*sqrt(23))*x))/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)) - (11*(3*im - sqrt(23))*(6 - (1 - im*sqrt(23))*x)^2)/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)^2))/(1 - (sqrt(-((3*im - sqrt(23))/(7*im + sqrt(23))))*(6 - (1 - im*sqrt(23))*x))/(1 - im*sqrt(23) - 4*x))^2)*Elliptic.F(2*atan(((-((3*im - sqrt(23))/(7*im + sqrt(23))))^(1/4)*sqrt(6 - (1 - im*sqrt(23))*x))/sqrt(-1 + im*sqrt(23) + 4*x)), (66*im - 22*sqrt(23) + 41*sqrt(-((23*(3*im - sqrt(23)))/(7*im + sqrt(23)))) + 41*im*sqrt(-((3*im - sqrt(23))/(7*im + sqrt(23)))))/(44*(3*im - sqrt(23)))))/((23 + im*sqrt(23))*(-((3*im - sqrt(23))/(7*im + sqrt(23))))^(1/4)*sqrt(3 - x + 2*x^2)*sqrt(2 + 3*x + 5*x^2)*sqrt(11 - (41*(im + sqrt(23))*(6 - (1 - im*sqrt(23))*x))/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)) - (11*(3*im - sqrt(23))*(6 - (1 - im*sqrt(23))*x)^2)/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)^2))), (sqrt(23/11)*(1 - im*sqrt(23) - 4*x)*sqrt(-1 + im*sqrt(23) + 4*x)*sqrt(6 - (1 - im*sqrt(23))*x)*sqrt(((11*im - sqrt(23))*(2 + 3*x + 5*x^2))/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)^2))*(1 - (sqrt(-((3*im - sqrt(23))/(7*im + sqrt(23))))*(6 - (1 - im*sqrt(23))*x))/(1 - im*sqrt(23) - 4*x))*sqrt((11 - (41*(im + sqrt(23))*(6 - (1 - im*sqrt(23))*x))/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)) - (11*(3*im - sqrt(23))*(6 - (1 - im*sqrt(23))*x)^2)/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)^2))/(1 - (sqrt(-((3*im - sqrt(23))/(7*im + sqrt(23))))*(6 - (1 - im*sqrt(23))*x))/(1 - im*sqrt(23) - 4*x))^2)*Elliptic.F(2*atan(((-((3*im - sqrt(23))/(7*im + sqrt(23))))^(1/4)*sqrt(6 - (1 - im*sqrt(23))*x))/sqrt(-1 + im*sqrt(23) + 4*x)), (1/88)*(44 - (41*(im + sqrt(23)))/sqrt(11 + im*sqrt(23)))))/((23 + im*sqrt(23))*(-((3*im - sqrt(23))/(7*im + sqrt(23))))^(1/4)*sqrt(3 - x + 2*x^2)*sqrt(2 + 3*x + 5*x^2)*sqrt(11 - (41*(im + sqrt(23))*(6 - (1 - im*sqrt(23))*x))/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)) - (11*(3*im - sqrt(23))*(6 - (1 - im*sqrt(23))*x)^2)/((7*im + sqrt(23))*(1 - im*sqrt(23) - 4*x)^2))))]
    #= [1/(sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^(3/2)), x, 0, 0]
    @test_int [1/(sqrt(3 - x + 2*x^2)*(2 + 3*x + 5*x^2)^(5/2)), x, 0, 0] =#

    #= [(2 + 3*x + 5*x^2)^(5/2)/(3 - x + 2*x^2)^(3/2), x, 0, 0]
    @test_int [(2 + 3*x + 5*x^2)^(3/2)/(3 - x + 2*x^2)^(3/2), x, 0, 0]
    @test_int [(2 + 3*x + 5*x^2)^(1/2)/(3 - x + 2*x^2)^(3/2), x, 0, 0]
    @test_int [1/((3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^(1/2)), x, 0, 0]
    @test_int [1/((3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^(3/2)), x, 0, 0]
    @test_int [1/((3 - x + 2*x^2)^(3/2)*(2 + 3*x + 5*x^2)^(5/2)), x, 0, 0] =#

    #= [(2 + 3*x + 5*x^2)^(5/2)/(3 - x + 2*x^2)^(5/2), x, 0, 0]
    @test_int [(2 + 3*x + 5*x^2)^(3/2)/(3 - x + 2*x^2)^(5/2), x, 0, 0]
    @test_int [(2 + 3*x + 5*x^2)^(1/2)/(3 - x + 2*x^2)^(5/2), x, 0, 0]
    @test_int [1/((3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^(1/2)), x, 0, 0]
    @test_int [1/((3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^(3/2)), x, 0, 0]
    @test_int [1/((3 - x + 2*x^2)^(5/2)*(2 + 3*x + 5*x^2)^(5/2)), x, 0, 0] =#
    end

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


text:
abstract type ConvexApproximator <: ParametrisedConvexApproximator end

function _construct_convex_approximator(α_is::AbstractVector, β_is::AbstractVector)
    l = length(α_is[1])
    i_max = length(α_is)
    @assert length(β_is) == i_max
    _α_is = hcat(α_is...)'
    _β_is = hcat(β_is...)'
    l, i_max, _α_is, _β_is
end

function affine_map(nn::ConvexApproximator, z::AbstractArray)
    @unpack _α_is, _β_is = nn
    _α_is * z .+ _β_is
end

function affine_map(nn::ConvexApproximator, z::Convex.AbstractExpr)
    @unpack _α_is, _β_is = nn
    _α_is * z + (_α_is*zeros(size(z)) .+ _β_is)
end

include("MA.jl")
include("LSE.jl")

ext: jl


text:
# IupMessage Example

module message_

using IUP

export
	message

#include("libiup_h.jl")

#------------------------example html/examples/C/message.c ----------------------------------
function message()
	IupOpen()	 #Initializes IUP

	# Executes IupMessage
	IupMessage("IupMessage Example", "Press the button")

	IupClose()   # And close it when ready
end

end 	# module


text:
using Test, Julianda

foo = Julianda.Config.loadConfig("../config")

#FIXME this test literally can't fail as its based on return type
bar = Julianda.Order.marketOrder(foo, "GBP_USD", 100)
@test typeof(bar) == Dict{String,Any}

max_stars_repo_name: CalebDepatie/Julianda

max_forks_repo_name: CalebDepatie/Julianda


text:
function assign_scenario(s::BasePriceScenario, model::JuMP.Model, config::RockyRoadOptions, params::RockyRoadParameters, vars::VariablesV2013)
    setvalue(params.ψ₂, 0.0);

    JuMP.solve(model);

    photel = getvalue(vars.CPRICE);

    for i in 1:config.N
        if i <= config.tnopol
            setupperbound(vars.CPRICE[i], max(photel[i],params.cpricebase[i]));
        end
    end

    setvalue(params.ψ₂, config.ψ₂₀);
end

function assign_scenario(s::OptimalPriceScenario, model::JuMP.Model, config::RockyRoadOptions, params::RockyRoadParameters, vars::VariablesV2013)
    #Coerce ICs first.
    JuMP.solve(model);
    setupperbound(vars.μ[1], config.μ₀);
end

function assign_scenario(s::Limit2DegreesScenario, model::JuMP.Model, config::RockyRoadOptions, params::RockyRoadParameters, vars::VariablesV2013)
    #Coerce ICs first.
    JuMP.solve(model);
    for i in 1:config.N
        setupperbound(vars.Tₐₜ[i], 2.0);
    end
end

function assign_scenario(s::SternScenario, model::JuMP.Model, config::RockyRoadOptions, params::RockyRoadParameters, vars::VariablesV2013)
    setvalue(params.α, 1.01);
    setvalue(params.ρ, 0.001);
    setvalue(params.optlrsav, (config.δk + .004)/(config.δk + .004*1.01 + 0.001)*config.γₑ);
    setvalue(params.rr[i=1:config.N], 1./((1+0.001).^(config.tstep*(i-1))));
end

function assign_scenario(s::SternCalibratedScenario, model::JuMP.Model, config::RockyRoadOptions, params::RockyRoadParameters, vars::VariablesV2013)
    setvalue(params.α, 2.1);
    setvalue(params.ρ, 0.001);
    setvalue(params.optlrsav, (config.δk + .004)/(config.δk + .004*2.1 + 0.001)*config.γₑ);
    setvalue(params.rr[i=1:config.N], 1./((1+0.001).^(config.tstep*(i-1))));

    for i in 1:config.N
        setlowerbound(vars.μ[i], 0.01);
    end

    JuMP.fix(vars.μ[1], 0.038976);
    JuMP.fix(vars.Tₐₜ[1], 0.83);

    JuMP.solve(model);
end

function assign_scenario(s::CopenhagenScenario, model::JuMP.Model, config::RockyRoadOptions, params::RockyRoadParameters, vars::VariablesV2013)
    #The Copenhagen participation fraction.
    imported_partfrac = ones(config.N);
    imported_partfrac[1:19] = [0.2,0.390423082,0.379051794,0.434731269,0.42272216,0.410416777,0.707776548,0.692148237,0.840306905,0.834064356,0.939658852,0.936731085,0.933881267,0.930944201,0.928088049,0.925153812,0.922301007,0.919378497,1.0];

    setvalue(params.partfract[i=1:config.N], imported_partfrac[i]);

    # The Emissions Control Rate Imported
    imported_μ = fill(0.9, config.N);
    imported_μ[1:27] = [0.02,0.055874801,0.110937151,0.163189757,0.206247482,0.241939219,0.30180914,0.364484979,0.423670192,0.478283881,0.534073643,0.588156847,0.633622,0.672457,0.705173102,0.733018573,0.756457118,0.776297581,0.794110815,0.822197128,0.839125811,0.854453754,0.868106413,0.880485825,0.891631752,0.901741794,0.9];

    for i in 1:config.N
        JuMP.fix(vars.μ[i], imported_μ[i]);
    end
end


text:
@testset "std_std" begin
	dbg = true;
	Random.seed!(123);
	nRep = 200;

	# Define samples
	nObsV = [100, 200, 500, 5000];
	nSamples = length(nObsV);
	# Std dev of Normal for each sample
	tgStdV = collect(Float64, range(1.0, 3.0, length = nSamples));
	trueStdStdV = zeros(Float64, nSamples);

	# Iterate over samples
	for i1 = 1 : nSamples
	  # Generate samples and compute std for each
	  stdV = zeros(nRep);
	  for iRep = 1 : nRep
		stdV[iRep] = std(Float64(tgStdV[i1]) .* randn(nObsV[i1]));
	  end
	  trueStdStdV[i1] = std(stdV);
	end

	# Check

	stdOutV = std_std(tgStdV, nObsV, dbg);

	diffV = stdOutV - trueStdStdV;
	if any(abs.(diffV) .> 1e-2)
	  println("Large deviations from target std std")
	  println(tgStdV)
	  println(stdOutV)
	  println(diffV)
	end

	@test all(abs.(diffV) .< 1e-2)
end

# ----------


text:
"""
```
Base.@kwdef struct StdlibInfo
    name::String
    branch::String
    git_url::String
    current_shas::Dict{String, String}
end
```
"""
Base.@kwdef struct StdlibInfo
    name::String
    branch::String
    git_url::String
    current_shas::Dict{String, String}
end

Base.@kwdef struct Config{C1 <: GitHub.Authorization, C2 <: Bool, C3 <: Dates.AbstractTime, C4 <: AbstractString, C5 <: Bool, C6 <: Union{AbstractString, Nothing}, C7 <: Union{AbstractString, AbstractVector{<:AbstractString}}}
    auth::C1 = get_input_from_environment(:auth)
    close_old_pull_requests::C2 = get_input_from_environment(:close_old_pull_requests)
    close_old_pull_requests_older_than::C3 = Dates.Minute(0)
    pr_branch_suffix::C4 = ""
    push_if_no_changes::C5 = get_input_from_environment(:push_if_no_changes)
    julia_repo_default_branch::C6 = nothing
    stdlibs_to_include::C7 = get_input_from_environment(:stdlibs_to_include)
end

Base.@kwdef struct State{S1 <: AbstractVector{<:AbstractString}, S2 <: GitHub.Repo, S3 <:AbstractString, S4 <: GitHub.Repo}
    all_pr_branches::S1 = String[]
    fork_julia_repo_gh::S2
    upstream_julia_repo_default_branch::S3
    upstream_julia_repo_gh::S4
end


text:
#####
##### Shortcut for truncating uniform distributions.
#####

Truncated(d::Uniform, l::Real, u::Real) = Uniform(promote(max(l, d.a), min(u, d.b))...)
Truncated(d::Uniform, l::Integer, u::Integer) = Uniform(max(l, d.a), min(u, d.b))