@testset "4.5.4.2 (a+b sec)^m (d sec)^n (A+B sec+C sec^2)" begin
    (A, B, C, a, b, c, d, m, n, x, ) = @variables A B C a b c d m n x

    #= ::Package:: =#

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*(b*sec(e+f*x))^m*(d*sec(e+f*x))^n*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#
    #==#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(a*sec(e+f*x))^m*(b*sec(e+f*x))^n*(A+C*sec(e+f*x)^2)=#

    #= ::Subsection:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(A+C*sec(c+d*x)^2)*(b*sec(c+d*x))^(n/2)=#

    #= ::Subsection:: =#
    #=Integrands*of*the*form*sec(c+d*x)^(m/2)*(A+C*sec(c+d*x)^2)*(b*sec(c+d*x))^(n/2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(A+C*sec(c+d*x)^2)*(b*sec(c+d*x))^(n/3)=#

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [sec(c + d*x)^2*(b*sec(c + d*x))^(1/3)*(A + C*sec(c + d*x)^2), x, 4, (3*(10*A + 7*C)*HypergeometricFunctions._₂F₁(-(2/3), 1/2, 1/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(4/3)*sin(c + d*x))/(40*b*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(7/3)*tan(c + d*x))/(10*b^2*d)]
    @test_int [sec(c + d*x)^1*(b*sec(c + d*x))^(1/3)*(A + C*sec(c + d*x)^2), x, 4, (3*(7*A + 4*C)*HypergeometricFunctions._₂F₁(-(1/6), 1/2, 5/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(7*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(4/3)*tan(c + d*x))/(7*b*d)]
    @test_int [(b*sec(c + d*x))^(1/3)*(A + C*sec(c + d*x)^2), x, 3, -((3*b*(4*A + C)*HypergeometricFunctions._₂F₁(1/3, 1/2, 4/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2))) + (3*C*(b*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^1*(b*sec(c + d*x))^(1/3)*(A + C*sec(c + d*x)^2), x, 4, -((3*b^2*(A - 2*C)*HypergeometricFunctions._₂F₁(1/2, 5/6, 11/6, cos(c + d*x)^2)*sin(c + d*x))/(5*d*(b*sec(c + d*x))^(5/3)*sqrt(sin(c + d*x)^2))) + (3*b*C*tan(c + d*x))/(d*(b*sec(c + d*x))^(2/3))]
    @test_int [cos(c + d*x)^2*(b*sec(c + d*x))^(1/3)*(A + C*sec(c + d*x)^2), x, 4, -((3*b*(2*A + 5*C)*HypergeometricFunctions._₂F₁(1/3, 1/2, 4/3, cos(c + d*x)^2)*sin(c + d*x))/(10*d*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2))) + (3*A*b^2*tan(c + d*x))/(5*d*(b*sec(c + d*x))^(5/3))]

    @test_int [sec(c + d*x)^2*(b*sec(c + d*x))^(4/3)*(A + C*sec(c + d*x)^2), x, 4, (3*(13*A + 10*C)*HypergeometricFunctions._₂F₁(-(7/6), 1/2, -(1/6), cos(c + d*x)^2)*(b*sec(c + d*x))^(7/3)*sin(c + d*x))/(91*b*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(10/3)*tan(c + d*x))/(13*b^2*d)]
    @test_int [sec(c + d*x)^1*(b*sec(c + d*x))^(4/3)*(A + C*sec(c + d*x)^2), x, 4, (3*(10*A + 7*C)*HypergeometricFunctions._₂F₁(-(2/3), 1/2, 1/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(4/3)*sin(c + d*x))/(40*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(7/3)*tan(c + d*x))/(10*b*d)]
    @test_int [(b*sec(c + d*x))^(4/3)*(A + C*sec(c + d*x)^2), x, 3, (3*b*(7*A + 4*C)*HypergeometricFunctions._₂F₁(-(1/6), 1/2, 5/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(7*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(4/3)*tan(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^1*(b*sec(c + d*x))^(4/3)*(A + C*sec(c + d*x)^2), x, 4, -((3*b^2*(4*A + C)*HypergeometricFunctions._₂F₁(1/3, 1/2, 4/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2))) + (3*b*C*(b*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^2*(b*sec(c + d*x))^(4/3)*(A + C*sec(c + d*x)^2), x, 4, -((3*b^3*(A - 2*C)*HypergeometricFunctions._₂F₁(1/2, 5/6, 11/6, cos(c + d*x)^2)*sin(c + d*x))/(5*d*(b*sec(c + d*x))^(5/3)*sqrt(sin(c + d*x)^2))) + (3*b^2*C*tan(c + d*x))/(d*(b*sec(c + d*x))^(2/3))]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(sec(c + d*x)^2*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(1/3), x, 4, (3*(8*A + 5*C)*HypergeometricFunctions._₂F₁(-(1/3), 1/2, 2/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(16*b*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(5/3)*tan(c + d*x))/(8*b^2*d)]
    @test_int [(sec(c + d*x)^1*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(1/3), x, 4, -((3*(5*A + 2*C)*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(5*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2))) + (3*C*(b*sec(c + d*x))^(2/3)*tan(c + d*x))/(5*b*d)]
    @test_int [(A + C*sec(c + d*x)^2)/(b*sec(c + d*x))^(1/3), x, 3, -((3*b*(2*A - C)*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2))) + (3*C*tan(c + d*x))/(2*d*(b*sec(c + d*x))^(1/3))]
    @test_int [(cos(c + d*x)^1*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(1/3), x, 4, -((3*(A + 4*C)*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(4*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2))) + (3*A*b*tan(c + d*x))/(4*d*(b*sec(c + d*x))^(4/3))]
    @test_int [(cos(c + d*x)^2*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(1/3), x, 4, -((3*b*(4*A + 7*C)*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(28*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2))) + (3*A*b^2*tan(c + d*x))/(7*d*(b*sec(c + d*x))^(7/3))]

    @test_int [(sec(c + d*x)^2*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 4, -((3*(5*A + 2*C)*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(5*b*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2))) + (3*C*(b*sec(c + d*x))^(2/3)*tan(c + d*x))/(5*b^2*d)]
    @test_int [(sec(c + d*x)^1*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 4, -((3*(2*A - C)*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2))) + (3*C*tan(c + d*x))/(2*b*d*(b*sec(c + d*x))^(1/3))]
    @test_int [(A + C*sec(c + d*x)^2)/(b*sec(c + d*x))^(4/3), x, 3, -((3*(A + 4*C)*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(4*b*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2))) + (3*A*tan(c + d*x))/(4*d*(b*sec(c + d*x))^(4/3))]
    @test_int [(cos(c + d*x)^1*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 4, -((3*(4*A + 7*C)*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(28*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2))) + (3*A*b*tan(c + d*x))/(7*d*(b*sec(c + d*x))^(7/3))]
    @test_int [(cos(c + d*x)^2*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 4, -((3*b*(7*A + 10*C)*HypergeometricFunctions._₂F₁(1/2, 7/6, 13/6, cos(c + d*x)^2)*sin(c + d*x))/(70*d*(b*sec(c + d*x))^(7/3)*sqrt(sin(c + d*x)^2))) + (3*A*b^2*tan(c + d*x))/(10*d*(b*sec(c + d*x))^(10/3))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(A+C*sec(c+d*x)^2)*(b*sec(c+d*x))^n*with*m*symbolic=#

    @test_int [sec(c + d*x)^m*(b*sec(c + d*x))^(4/3)*(A + C*sec(c + d*x)^2), x, 4, If(13>=8, (3*b*C*sec(c + d*x)^(2 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(7 + 3*m)) + (3*b*(C*(4 + 3*m) + A*(7 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-1 - 3*m), (1/6)*(5 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(1 + 3*m)*(7 + 3*m)*sqrt(sin(c + d*x)^2)), (3*b*C*sec(c + d*x)^(2 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(7 + 3*m)) + (3*b*(C*(4 + 3*m) + A*(7 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-1 - 3*m), (1/6)*(5 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(7 + 24*m + 9*m^2)*sqrt(sin(c + d*x)^2)))]
    @test_int [sec(c + d*x)^m*(b*sec(c + d*x))^(2/3)*(A + C*sec(c + d*x)^2), x, 4, If(13>=8, (3*C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(5 + 3*m)) - (3*(C*(2 + 3*m) + A*(5 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(1 - 3*m), (1/6)*(7 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(1 - 3*m)*(5 + 3*m)*sqrt(sin(c + d*x)^2)), (3*C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(5 + 3*m)) - (3*(C*(2 + 3*m) + A*(5 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(1 - 3*m), (1/6)*(7 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(5 - 12*m - 9*m^2)*sqrt(sin(c + d*x)^2)))]
    @test_int [sec(c + d*x)^m*(b*sec(c + d*x))^(1/3)*(A + C*sec(c + d*x)^2), x, 4, If(13>=8, (3*C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(4 + 3*m)) - (3*(C + 3*C*m + A*(4 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(2 - 3*m), (1/6)*(8 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(2 - 3*m)*(4 + 3*m)*sqrt(sin(c + d*x)^2)), (3*C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(4 + 3*m)) - (3*(C + 3*C*m + A*(4 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(2 - 3*m), (1/6)*(8 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(8 - 6*m - 9*m^2)*sqrt(sin(c + d*x)^2)))]
    @test_int [(sec(c + d*x)^m*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(1/3), x, 4, If(13>=8, (3*C*sec(c + d*x)^(1 + m)*sin(c + d*x))/(d*(2 + 3*m)*(b*sec(c + d*x))^(1/3)) + (3*(C*(1 - 3*m) - A*(2 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(4 - 3*m), (1/6)*(10 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(d*(4 - 3*m)*(2 + 3*m)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)), (3*C*sec(c + d*x)^(1 + m)*sin(c + d*x))/(d*(2 + 3*m)*(b*sec(c + d*x))^(1/3)) + (3*(C*(1 - 3*m) - A*(2 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(4 - 3*m), (1/6)*(10 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(d*(8 + 6*m - 9*m^2)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)))]
    @test_int [(sec(c + d*x)^m*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(2/3), x, 4, If(13>=8, (3*C*sec(c + d*x)^(1 + m)*sin(c + d*x))/(d*(1 + 3*m)*(b*sec(c + d*x))^(2/3)) - (3*(A - C*(2 - 3*m) + 3*A*m)*HypergeometricFunctions._₂F₁(1/2, (1/6)*(5 - 3*m), (1/6)*(11 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(d*(5 - 3*m)*(1 + 3*m)*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2)), (3*C*sec(c + d*x)^(1 + m)*sin(c + d*x))/(d*(1 + 3*m)*(b*sec(c + d*x))^(2/3)) - (3*(A - C*(2 - 3*m) + 3*A*m)*HypergeometricFunctions._₂F₁(1/2, (1/6)*(5 - 3*m), (1/6)*(11 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(d*(5 + 12*m - 9*m^2)*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2)))]
    @test_int [(sec(c + d*x)^m*(A + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 4, If(13>=8, -((3*C*sec(c + d*x)^m*sin(c + d*x))/(b*d*(1 - 3*m)*(b*sec(c + d*x))^(1/3))) - (3*(A + C*(4 - 3*m) - 3*A*m)*HypergeometricFunctions._₂F₁(1/2, (1/6)*(7 - 3*m), (1/6)*(13 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-2 + m)*sin(c + d*x))/(b*d*(1 - 3*m)*(7 - 3*m)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)), -((3*C*sec(c + d*x)^m*sin(c + d*x))/(b*d*(1 - 3*m)*(b*sec(c + d*x))^(1/3))) - (3*(A + C*(4 - 3*m) - 3*A*m)*HypergeometricFunctions._₂F₁(1/2, (1/6)*(7 - 3*m), (1/6)*(13 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-2 + m)*sin(c + d*x))/(b*d*(7 - 24*m + 9*m^2)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(A+C*sec(c+d*x)^2)*(b*sec(c+d*x))^n*with*n*symbolic=#

    @test_int [sec(c + d*x)^m*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 4, If(13>=8, (C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + m + n)) - ((C*(m + n) + A*(1 + m + n))*HypergeometricFunctions._₂F₁(1/2, (1/2)*(1 - m - n), (1/2)*(3 - m - n), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - m - n)*(1 + m + n)*sqrt(sin(c + d*x)^2)), (C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + m + n)) - ((C*(m + n) + A*(1 + m + n))*HypergeometricFunctions._₂F₁(1/2, (1/2)*(1 - m - n), (1/2)*(3 - m - n), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - m^2 - 2*m*n - n^2)*sqrt(sin(c + d*x)^2)))]

    @test_int [sec(c + d*x)^2*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 4, ((C*(2 + n) + A*(3 + n))*HypergeometricFunctions._₂F₁(1/2, (1/2)*(-1 - n), (1 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(1 + n)*sin(c + d*x))/(b*d*(1 + n)*(3 + n)*sqrt(sin(c + d*x)^2)) + (C*(b*sec(c + d*x))^(2 + n)*tan(c + d*x))/(b^2*d*(3 + n))]
    @test_int [sec(c + d*x)^1*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 4, ((C*(1 + n) + A*(2 + n))*HypergeometricFunctions._₂F₁(1/2, -(n/2), (2 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*n*(2 + n)*sqrt(sin(c + d*x)^2)) + (C*(b*sec(c + d*x))^(1 + n)*tan(c + d*x))/(b*d*(2 + n))]
    @test_int [sec(c + d*x)^0*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 3, If(13>=8, -((b*(A + A*n + C*n)*HypergeometricFunctions._₂F₁(1/2, (1 - n)/2, (3 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-1 + n)*sin(c + d*x))/(d*(1 - n)*(1 + n)*sqrt(sin(c + d*x)^2))) + (C*(b*sec(c + d*x))^n*tan(c + d*x))/(d*(1 + n)), -((b*(A + A*n + C*n)*HypergeometricFunctions._₂F₁(1/2, (1 - n)/2, (3 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-1 + n)*sin(c + d*x))/(d*(1 - n^2)*sqrt(sin(c + d*x)^2))) + (C*(b*sec(c + d*x))^n*tan(c + d*x))/(d*(1 + n)))]
    @test_int [cos(c + d*x)^1*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 4, (b^2*(C*(1 - n) - A*n)*HypergeometricFunctions._₂F₁(1/2, (2 - n)/2, (4 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-2 + n)*sin(c + d*x))/(d*(2 - n)*n*sqrt(sin(c + d*x)^2)) + (b*C*(b*sec(c + d*x))^(-1 + n)*tan(c + d*x))/(d*n)]
    @test_int [cos(c + d*x)^2*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 4, If(13>=8, -((b^3*(A*(1 - n) + C*(2 - n))*HypergeometricFunctions._₂F₁(1/2, (3 - n)/2, (5 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-3 + n)*sin(c + d*x))/(d*(1 - n)*(3 - n)*sqrt(sin(c + d*x)^2))) - (b^2*C*(b*sec(c + d*x))^(-2 + n)*tan(c + d*x))/(d*(1 - n)), -((b^3*(A*(1 - n) + C*(2 - n))*HypergeometricFunctions._₂F₁(1/2, (3 - n)/2, (5 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-3 + n)*sin(c + d*x))/(d*(3 - 4*n + n^2)*sqrt(sin(c + d*x)^2))) - (b^2*C*(b*sec(c + d*x))^(-2 + n)*tan(c + d*x))/(d*(1 - n)))]
    @test_int [cos(c + d*x)^3*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 4, If(13>=8, -((b^4*(A*(2 - n) + C*(3 - n))*HypergeometricFunctions._₂F₁(1/2, (4 - n)/2, (6 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-4 + n)*sin(c + d*x))/(d*(2 - n)*(4 - n)*sqrt(sin(c + d*x)^2))) - (b^3*C*(b*sec(c + d*x))^(-3 + n)*tan(c + d*x))/(d*(2 - n)), -((b^4*(A*(2 - n) + C*(3 - n))*HypergeometricFunctions._₂F₁(1/2, (4 - n)/2, (6 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-4 + n)*sin(c + d*x))/(d*(8 - 6*n + n^2)*sqrt(sin(c + d*x)^2))) - (b^3*C*(b*sec(c + d*x))^(-3 + n)*tan(c + d*x))/(d*(2 - n)))]

    @test_int [sec(c + d*x)^(5/2)*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 4, If(13>=8, (2*C*sec(c + d*x)^(7/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(7 + 2*n)) + (2*(C*(5 + 2*n) + A*(7 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-3 - 2*n), (1/4)*(1 - 2*n), cos(c + d*x)^2)*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 2*n)*(7 + 2*n)*sqrt(sin(c + d*x)^2)), (2*C*sec(c + d*x)^(7/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(7 + 2*n)) + (2*(C*(5 + 2*n) + A*(7 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-3 - 2*n), (1/4)*(1 - 2*n), cos(c + d*x)^2)*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(21 + 20*n + 4*n^2)*sqrt(sin(c + d*x)^2)))]
    @test_int [sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 4, If(13>=8, (2*C*sec(c + d*x)^(5/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 + 2*n)) + (2*(C*(3 + 2*n) + A*(5 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-1 - 2*n), (1/4)*(3 - 2*n), cos(c + d*x)^2)*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + 2*n)*(5 + 2*n)*sqrt(sin(c + d*x)^2)), (2*C*sec(c + d*x)^(5/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 + 2*n)) + (2*(C*(3 + 2*n) + A*(5 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-1 - 2*n), (1/4)*(3 - 2*n), cos(c + d*x)^2)*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 + 12*n + 4*n^2)*sqrt(sin(c + d*x)^2)))]
    @test_int [sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2), x, 4, If(13>=8, (2*C*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 2*n)) - (2*(C + 2*C*n + A*(3 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(1 - 2*n), (1/4)*(5 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*(3 + 2*n)*sqrt(sec(c + d*x))*sqrt(sin(c + d*x)^2)), (2*C*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 2*n)) - (2*(C + 2*C*n + A*(3 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(1 - 2*n), (1/4)*(5 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 4*n - 4*n^2)*sqrt(sec(c + d*x))*sqrt(sin(c + d*x)^2)))]
    @test_int [((b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 4, If(13>=8, (2*C*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + 2*n)) - (2*(A - C*(1 - 2*n) + 2*A*n)*HypergeometricFunctions._₂F₁(1/2, (1/4)*(3 - 2*n), (1/4)*(7 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*(1 + 2*n)*sec(c + d*x)^(3/2)*sqrt(sin(c + d*x)^2)), (2*C*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + 2*n)) - (2*(A - C*(1 - 2*n) + 2*A*n)*HypergeometricFunctions._₂F₁(1/2, (1/4)*(3 - 2*n), (1/4)*(7 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 4*n - 4*n^2)*sec(c + d*x)^(3/2)*sqrt(sin(c + d*x)^2)))]
    @test_int [((b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 4, If(13>=8, -((2*C*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*sqrt(sec(c + d*x)))) - (2*(A + C*(3 - 2*n) - 2*A*n)*HypergeometricFunctions._₂F₁(1/2, (1/4)*(5 - 2*n), (1/4)*(9 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*(5 - 2*n)*sec(c + d*x)^(5/2)*sqrt(sin(c + d*x)^2)), -((2*C*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*sqrt(sec(c + d*x)))) - (2*(A + C*(3 - 2*n) - 2*A*n)*HypergeometricFunctions._₂F₁(1/2, (1/4)*(5 - 2*n), (1/4)*(9 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 - 12*n + 4*n^2)*sec(c + d*x)^(5/2)*sqrt(sin(c + d*x)^2)))]
    @test_int [((b*sec(c + d*x))^n*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 4, If(13>=8, -((2*C*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*sec(c + d*x)^(3/2))) - (2*(A*(3 - 2*n) + C*(5 - 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(7 - 2*n), (1/4)*(11 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*(7 - 2*n)*sec(c + d*x)^(7/2)*sqrt(sin(c + d*x)^2)), -((2*C*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*sec(c + d*x)^(3/2))) - (2*(A*(3 - 2*n) + C*(5 - 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(7 - 2*n), (1/4)*(11 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(21 - 20*n + 4*n^2)*sec(c + d*x)^(7/2)*sqrt(sin(c + d*x)^2)))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(a*sec(c+d*x))^m*(b*sec(c+d*x))^n*(B*sec(c+d*x)+C*sec(c+d*x)^2)=#

    #= ::Subsection:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(B*sec(c+d*x)+C*sec(c+d*x)^2)*(b*sec(c+d*x))^(n/2)=#

    #= ::Subsection:: =#
    #=Integrands*of*the*form*sec(c+d*x)^(m/2)*(B*sec(c+d*x)+C*sec(c+d*x)^2)*(b*sec(c+d*x))^(n/2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(B*sec(c+d*x)+C*sec(c+d*x)^2)*(b*sec(c+d*x))^n*with*n*symbolic=#

    @test_int [sec(c + d*x)^m*(b*sec(c + d*x))^n*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (B*HypergeometricFunctions._₂F₁(1/2, (1/2)*(-m - n), (1/2)*(2 - m - n), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(m + n)*sqrt(sin(c + d*x)^2)) + (C*HypergeometricFunctions._₂F₁(1/2, (1/2)*(-1 - m - n), (1/2)*(1 - m - n), cos(c + d*x)^2)*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + m + n)*sqrt(sin(c + d*x)^2))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(a*sec(c+d*x))^m*(b*sec(c+d*x))^n*(A+B*sec(c+d*x)+C*sec(c+d*x)^2)=#

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

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

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

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [sec(c + d*x)^2*(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (3*(11*A + 8*C)*HypergeometricFunctions._₂F₁(-(5/6), 1/2, 1/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(5/3)*sin(c + d*x))/(55*b*d*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(-(4/3), 1/2, -(1/3), cos(c + d*x)^2)*(b*sec(c + d*x))^(8/3)*sin(c + d*x))/(8*b^2*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(8/3)*tan(c + d*x))/(11*b^2*d)]
    @test_int [sec(c + d*x)*(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (3*(8*A + 5*C)*HypergeometricFunctions._₂F₁(-(1/3), 1/2, 2/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(16*d*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(-(5/6), 1/2, 1/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(5/3)*sin(c + d*x))/(5*b*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(5/3)*tan(c + d*x))/(8*b*d)]
    @test_int [(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, -((3*b*(5*A + 2*C)*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(5*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2))) + (3*B*HypergeometricFunctions._₂F₁(-(1/3), 1/2, 2/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(2*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(2/3)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)*(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, -((3*b^2*(2*A - C)*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2))) - (3*b*B*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)) + (3*b*C*tan(c + d*x))/(2*d*(b*sec(c + d*x))^(1/3))]
    @test_int [cos(c + d*x)^2*(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, -((3*b^2*B*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(4*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2))) - (3*b*(A + 4*C)*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(4*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)) + (3*A*b^2*tan(c + d*x))/(4*d*(b*sec(c + d*x))^(4/3))]
    @test_int [cos(c + d*x)^3*(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, -((3*b^3*B*HypergeometricFunctions._₂F₁(1/2, 7/6, 13/6, cos(c + d*x)^2)*sin(c + d*x))/(7*d*(b*sec(c + d*x))^(7/3)*sqrt(sin(c + d*x)^2))) - (3*b^2*(4*A + 7*C)*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(28*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2)) + (3*A*b^3*tan(c + d*x))/(7*d*(b*sec(c + d*x))^(7/3))]

    @test_int [sec(c + d*x)^2*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (3*(13*A + 10*C)*HypergeometricFunctions._₂F₁(-(7/6), 1/2, -(1/6), cos(c + d*x)^2)*(b*sec(c + d*x))^(7/3)*sin(c + d*x))/(91*b*d*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(-(5/3), 1/2, -(2/3), cos(c + d*x)^2)*(b*sec(c + d*x))^(10/3)*sin(c + d*x))/(10*b^2*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(10/3)*tan(c + d*x))/(13*b^2*d)]
    @test_int [sec(c + d*x)*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (3*(10*A + 7*C)*HypergeometricFunctions._₂F₁(-(2/3), 1/2, 1/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(4/3)*sin(c + d*x))/(40*d*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(-(7/6), 1/2, -(1/6), cos(c + d*x)^2)*(b*sec(c + d*x))^(7/3)*sin(c + d*x))/(7*b*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(7/3)*tan(c + d*x))/(10*b*d)]
    @test_int [(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (3*b*(7*A + 4*C)*HypergeometricFunctions._₂F₁(-(1/6), 1/2, 5/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(7*d*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(-(2/3), 1/2, 1/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(4/3)*sin(c + d*x))/(4*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(4/3)*tan(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, -((3*b^2*(4*A + C)*HypergeometricFunctions._₂F₁(1/3, 1/2, 4/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2))) + (3*b*B*HypergeometricFunctions._₂F₁(-(1/6), 1/2, 5/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*sqrt(sin(c + d*x)^2)) + (3*b*C*(b*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^2*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, -((3*b^3*(A - 2*C)*HypergeometricFunctions._₂F₁(1/2, 5/6, 11/6, cos(c + d*x)^2)*sin(c + d*x))/(5*d*(b*sec(c + d*x))^(5/3)*sqrt(sin(c + d*x)^2))) - (3*b^2*B*HypergeometricFunctions._₂F₁(1/3, 1/2, 4/3, cos(c + d*x)^2)*sin(c + d*x))/(2*d*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2)) + (3*b^2*C*tan(c + d*x))/(d*(b*sec(c + d*x))^(2/3))]
    @test_int [cos(c + d*x)^3*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, -((3*b^3*B*HypergeometricFunctions._₂F₁(1/2, 5/6, 11/6, cos(c + d*x)^2)*sin(c + d*x))/(5*d*(b*sec(c + d*x))^(5/3)*sqrt(sin(c + d*x)^2))) - (3*b^2*(2*A + 5*C)*HypergeometricFunctions._₂F₁(1/3, 1/2, 4/3, cos(c + d*x)^2)*sin(c + d*x))/(10*d*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2)) + (3*A*b^3*tan(c + d*x))/(5*d*(b*sec(c + d*x))^(5/3))]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(2/3), x, 7, (3*(7*A + 4*C)*HypergeometricFunctions._₂F₁(-(1/6), 1/2, 5/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(7*b*d*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(-(2/3), 1/2, 1/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(4/3)*sin(c + d*x))/(4*b^2*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(4/3)*tan(c + d*x))/(7*b^2*d)]
    @test_int [(sec(c + d*x)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(2/3), x, 7, -((3*(4*A + C)*HypergeometricFunctions._₂F₁(1/3, 1/2, 4/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2))) + (3*B*HypergeometricFunctions._₂F₁(-(1/6), 1/2, 5/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(b*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*b*d)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(b*sec(c + d*x))^(2/3), x, 6, -((3*b*(A - 2*C)*HypergeometricFunctions._₂F₁(1/2, 5/6, 11/6, cos(c + d*x)^2)*sin(c + d*x))/(5*d*(b*sec(c + d*x))^(5/3)*sqrt(sin(c + d*x)^2))) - (3*B*HypergeometricFunctions._₂F₁(1/3, 1/2, 4/3, cos(c + d*x)^2)*sin(c + d*x))/(2*d*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2)) + (3*C*tan(c + d*x))/(d*(b*sec(c + d*x))^(2/3))]
    @test_int [(sec(c + d*x)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(2/3), x, 7, -((3*(4*A + C)*HypergeometricFunctions._₂F₁(1/3, 1/2, 4/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2))) + (3*B*HypergeometricFunctions._₂F₁(-(1/6), 1/2, 5/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(b*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*b*d)]
    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(2/3), x, 7, (3*(7*A + 4*C)*HypergeometricFunctions._₂F₁(-(1/6), 1/2, 5/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(7*b*d*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(-(2/3), 1/2, 1/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(4/3)*sin(c + d*x))/(4*b^2*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(4/3)*tan(c + d*x))/(7*b^2*d)]
    @test_int [(sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(2/3), x, 7, (3*(10*A + 7*C)*HypergeometricFunctions._₂F₁(-(2/3), 1/2, 1/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(4/3)*sin(c + d*x))/(40*b^2*d*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(-(7/6), 1/2, -(1/6), cos(c + d*x)^2)*(b*sec(c + d*x))^(7/3)*sin(c + d*x))/(7*b^3*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(7/3)*tan(c + d*x))/(10*b^3*d)]

    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 7, -((3*(5*A + 2*C)*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(5*b*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2))) + (3*B*HypergeometricFunctions._₂F₁(-(1/3), 1/2, 2/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(2*b^2*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(2/3)*tan(c + d*x))/(5*b^2*d)]
    @test_int [(sec(c + d*x)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 7, -((3*(2*A - C)*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2))) - (3*B*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(b*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)) + (3*C*tan(c + d*x))/(2*b*d*(b*sec(c + d*x))^(1/3))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(b*sec(c + d*x))^(4/3), x, 6, -((3*B*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(4*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2))) - (3*(A + 4*C)*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(4*b*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)) + (3*A*tan(c + d*x))/(4*d*(b*sec(c + d*x))^(4/3))]
    @test_int [(sec(c + d*x)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 7, -((3*(2*A - C)*HypergeometricFunctions._₂F₁(1/2, 2/3, 5/3, cos(c + d*x)^2)*sin(c + d*x))/(8*d*(b*sec(c + d*x))^(4/3)*sqrt(sin(c + d*x)^2))) - (3*B*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(b*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)) + (3*C*tan(c + d*x))/(2*b*d*(b*sec(c + d*x))^(1/3))]
    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 7, -((3*(5*A + 2*C)*HypergeometricFunctions._₂F₁(1/6, 1/2, 7/6, cos(c + d*x)^2)*sin(c + d*x))/(5*b*d*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2))) + (3*B*HypergeometricFunctions._₂F₁(-(1/3), 1/2, 2/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(2*b^2*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(2/3)*tan(c + d*x))/(5*b^2*d)]
    @test_int [(sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 7, (3*(8*A + 5*C)*HypergeometricFunctions._₂F₁(-(1/3), 1/2, 2/3, cos(c + d*x)^2)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(16*b^2*d*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(-(5/6), 1/2, 1/6, cos(c + d*x)^2)*(b*sec(c + d*x))^(5/3)*sin(c + d*x))/(5*b^3*d*sqrt(sin(c + d*x)^2)) + (3*C*(b*sec(c + d*x))^(5/3)*tan(c + d*x))/(8*b^3*d)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(A+B*sec(c+d*x)+C*sec(c+d*x)^2)*(b*sec(c+d*x))^n*with*m*symbolic=#

    @test_int [sec(c + d*x)^m*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, If(13>=8, (3*b*C*sec(c + d*x)^(2 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(7 + 3*m)) + (3*b*(C*(4 + 3*m) + A*(7 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-1 - 3*m), (1/6)*(5 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(1 + 3*m)*(7 + 3*m)*sqrt(sin(c + d*x)^2)) + (3*b*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-4 - 3*m), (1/6)*(2 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(4 + 3*m)*sqrt(sin(c + d*x)^2)), (3*b*C*sec(c + d*x)^(2 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(7 + 3*m)) + (3*b*(C*(4 + 3*m) + A*(7 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-1 - 3*m), (1/6)*(5 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(7 + 24*m + 9*m^2)*sqrt(sin(c + d*x)^2)) + (3*b*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-4 - 3*m), (1/6)*(2 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(4 + 3*m)*sqrt(sin(c + d*x)^2)))]
    @test_int [sec(c + d*x)^m*(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, If(13>=8, (3*C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(5 + 3*m)) - (3*(C*(2 + 3*m) + A*(5 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(1 - 3*m), (1/6)*(7 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(1 - 3*m)*(5 + 3*m)*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-2 - 3*m), (1/6)*(4 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(2 + 3*m)*sqrt(sin(c + d*x)^2)), (3*C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(5 + 3*m)) - (3*(C*(2 + 3*m) + A*(5 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(1 - 3*m), (1/6)*(7 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(5 - 12*m - 9*m^2)*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-2 - 3*m), (1/6)*(4 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^(2/3)*sin(c + d*x))/(d*(2 + 3*m)*sqrt(sin(c + d*x)^2)))]
    @test_int [sec(c + d*x)^m*(b*sec(c + d*x))^(1/3)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, If(13>=8, (3*C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(4 + 3*m)) - (3*(C + 3*C*m + A*(4 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(2 - 3*m), (1/6)*(8 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(2 - 3*m)*(4 + 3*m)*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-1 - 3*m), (1/6)*(5 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(1 + 3*m)*sqrt(sin(c + d*x)^2)), (3*C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(4 + 3*m)) - (3*(C + 3*C*m + A*(4 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(2 - 3*m), (1/6)*(8 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(8 - 6*m - 9*m^2)*sqrt(sin(c + d*x)^2)) + (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(-1 - 3*m), (1/6)*(5 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^(1/3)*sin(c + d*x))/(d*(1 + 3*m)*sqrt(sin(c + d*x)^2)))]
    @test_int [(sec(c + d*x)^m*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(1/3), x, 7, If(13>=8, (3*C*sec(c + d*x)^(1 + m)*sin(c + d*x))/(d*(2 + 3*m)*(b*sec(c + d*x))^(1/3)) + (3*(C*(1 - 3*m) - A*(2 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(4 - 3*m), (1/6)*(10 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(d*(4 - 3*m)*(2 + 3*m)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)) - (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(1 - 3*m), (1/6)*(7 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*sin(c + d*x))/(d*(1 - 3*m)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)), (3*C*sec(c + d*x)^(1 + m)*sin(c + d*x))/(d*(2 + 3*m)*(b*sec(c + d*x))^(1/3)) + (3*(C*(1 - 3*m) - A*(2 + 3*m))*HypergeometricFunctions._₂F₁(1/2, (1/6)*(4 - 3*m), (1/6)*(10 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(d*(8 + 6*m - 9*m^2)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)) - (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(1 - 3*m), (1/6)*(7 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*sin(c + d*x))/(d*(1 - 3*m)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)))]
    @test_int [(sec(c + d*x)^m*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(2/3), x, 7, If(13>=8, (3*C*sec(c + d*x)^(1 + m)*sin(c + d*x))/(d*(1 + 3*m)*(b*sec(c + d*x))^(2/3)) - (3*(A - C*(2 - 3*m) + 3*A*m)*HypergeometricFunctions._₂F₁(1/2, (1/6)*(5 - 3*m), (1/6)*(11 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(d*(5 - 3*m)*(1 + 3*m)*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2)) - (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(2 - 3*m), (1/6)*(8 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*sin(c + d*x))/(d*(2 - 3*m)*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2)), (3*C*sec(c + d*x)^(1 + m)*sin(c + d*x))/(d*(1 + 3*m)*(b*sec(c + d*x))^(2/3)) - (3*(A - C*(2 - 3*m) + 3*A*m)*HypergeometricFunctions._₂F₁(1/2, (1/6)*(5 - 3*m), (1/6)*(11 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(d*(5 + 12*m - 9*m^2)*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2)) - (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(2 - 3*m), (1/6)*(8 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^m*sin(c + d*x))/(d*(2 - 3*m)*(b*sec(c + d*x))^(2/3)*sqrt(sin(c + d*x)^2)))]
    @test_int [(sec(c + d*x)^m*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(b*sec(c + d*x))^(4/3), x, 7, If(13>=8, -((3*C*sec(c + d*x)^m*sin(c + d*x))/(b*d*(1 - 3*m)*(b*sec(c + d*x))^(1/3))) - (3*(A + C*(4 - 3*m) - 3*A*m)*HypergeometricFunctions._₂F₁(1/2, (1/6)*(7 - 3*m), (1/6)*(13 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-2 + m)*sin(c + d*x))/(b*d*(1 - 3*m)*(7 - 3*m)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)) - (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(4 - 3*m), (1/6)*(10 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(b*d*(4 - 3*m)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)), -((3*C*sec(c + d*x)^m*sin(c + d*x))/(b*d*(1 - 3*m)*(b*sec(c + d*x))^(1/3))) - (3*(A + C*(4 - 3*m) - 3*A*m)*HypergeometricFunctions._₂F₁(1/2, (1/6)*(7 - 3*m), (1/6)*(13 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-2 + m)*sin(c + d*x))/(b*d*(7 - 24*m + 9*m^2)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)) - (3*B*HypergeometricFunctions._₂F₁(1/2, (1/6)*(4 - 3*m), (1/6)*(10 - 3*m), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*sin(c + d*x))/(b*d*(4 - 3*m)*(b*sec(c + d*x))^(1/3)*sqrt(sin(c + d*x)^2)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(A+B*sec(c+d*x)+C*sec(c+d*x)^2)*(b*sec(c+d*x))^n*with*n*symbolic=#

    @test_int [sec(c + d*x)^m*(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, If(13>=8, (C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + m + n)) - ((C*(m + n) + A*(1 + m + n))*HypergeometricFunctions._₂F₁(1/2, (1/2)*(1 - m - n), (1/2)*(3 - m - n), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - m - n)*(1 + m + n)*sqrt(sin(c + d*x)^2)) + (B*HypergeometricFunctions._₂F₁(1/2, (1/2)*(-m - n), (1/2)*(2 - m - n), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(m + n)*sqrt(sin(c + d*x)^2)), (C*sec(c + d*x)^(1 + m)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + m + n)) - ((C*(m + n) + A*(1 + m + n))*HypergeometricFunctions._₂F₁(1/2, (1/2)*(1 - m - n), (1/2)*(3 - m - n), cos(c + d*x)^2)*sec(c + d*x)^(-1 + m)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - m^2 - 2*m*n - n^2)*sqrt(sin(c + d*x)^2)) + (B*HypergeometricFunctions._₂F₁(1/2, (1/2)*(-m - n), (1/2)*(2 - m - n), cos(c + d*x)^2)*sec(c + d*x)^m*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(m + n)*sqrt(sin(c + d*x)^2)))]

    @test_int [sec(c + d*x)^2*(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, ((C*(2 + n) + A*(3 + n))*HypergeometricFunctions._₂F₁(1/2, (1/2)*(-1 - n), (1 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(1 + n)*sin(c + d*x))/(b*d*(1 + n)*(3 + n)*sqrt(sin(c + d*x)^2)) + (B*HypergeometricFunctions._₂F₁(1/2, (1/2)*(-2 - n), -(n/2), cos(c + d*x)^2)*(b*sec(c + d*x))^(2 + n)*sin(c + d*x))/(b^2*d*(2 + n)*sqrt(sin(c + d*x)^2)) + (C*(b*sec(c + d*x))^(2 + n)*tan(c + d*x))/(b^2*d*(3 + n))]
    @test_int [sec(c + d*x)*(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, ((C*(1 + n) + A*(2 + n))*HypergeometricFunctions._₂F₁(1/2, -(n/2), (2 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*n*(2 + n)*sqrt(sin(c + d*x)^2)) + (B*HypergeometricFunctions._₂F₁(1/2, (1/2)*(-1 - n), (1 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(1 + n)*sin(c + d*x))/(b*d*(1 + n)*sqrt(sin(c + d*x)^2)) + (C*(b*sec(c + d*x))^(1 + n)*tan(c + d*x))/(b*d*(2 + n))]
    @test_int [(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, If(13>=8, -((b*(A + A*n + C*n)*HypergeometricFunctions._₂F₁(1/2, (1 - n)/2, (3 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-1 + n)*sin(c + d*x))/(d*(1 - n)*(1 + n)*sqrt(sin(c + d*x)^2))) + (B*HypergeometricFunctions._₂F₁(1/2, -(n/2), (2 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*n*sqrt(sin(c + d*x)^2)) + (C*(b*sec(c + d*x))^n*tan(c + d*x))/(d*(1 + n)), -((b*(A + A*n + C*n)*HypergeometricFunctions._₂F₁(1/2, (1 - n)/2, (3 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-1 + n)*sin(c + d*x))/(d*(1 - n^2)*sqrt(sin(c + d*x)^2))) + (B*HypergeometricFunctions._₂F₁(1/2, -(n/2), (2 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*n*sqrt(sin(c + d*x)^2)) + (C*(b*sec(c + d*x))^n*tan(c + d*x))/(d*(1 + n)))]
    @test_int [cos(c + d*x)*(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (b^2*(C*(1 - n) - A*n)*HypergeometricFunctions._₂F₁(1/2, (2 - n)/2, (4 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-2 + n)*sin(c + d*x))/(d*(2 - n)*n*sqrt(sin(c + d*x)^2)) - (b*B*HypergeometricFunctions._₂F₁(1/2, (1 - n)/2, (3 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-1 + n)*sin(c + d*x))/(d*(1 - n)*sqrt(sin(c + d*x)^2)) + (b*C*(b*sec(c + d*x))^(-1 + n)*tan(c + d*x))/(d*n)]
    @test_int [cos(c + d*x)^2*(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, If(13>=8, -((b^3*(A*(1 - n) + C*(2 - n))*HypergeometricFunctions._₂F₁(1/2, (3 - n)/2, (5 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-3 + n)*sin(c + d*x))/(d*(1 - n)*(3 - n)*sqrt(sin(c + d*x)^2))) - (b^2*B*HypergeometricFunctions._₂F₁(1/2, (2 - n)/2, (4 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-2 + n)*sin(c + d*x))/(d*(2 - n)*sqrt(sin(c + d*x)^2)) - (b^2*C*(b*sec(c + d*x))^(-2 + n)*tan(c + d*x))/(d*(1 - n)), -((b^3*(A*(1 - n) + C*(2 - n))*HypergeometricFunctions._₂F₁(1/2, (3 - n)/2, (5 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-3 + n)*sin(c + d*x))/(d*(3 - 4*n + n^2)*sqrt(sin(c + d*x)^2))) - (b^2*B*HypergeometricFunctions._₂F₁(1/2, (2 - n)/2, (4 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-2 + n)*sin(c + d*x))/(d*(2 - n)*sqrt(sin(c + d*x)^2)) - (b^2*C*(b*sec(c + d*x))^(-2 + n)*tan(c + d*x))/(d*(1 - n)))]
    @test_int [cos(c + d*x)^3*(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, If(13>=8, -((b^4*(A*(2 - n) + C*(3 - n))*HypergeometricFunctions._₂F₁(1/2, (4 - n)/2, (6 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-4 + n)*sin(c + d*x))/(d*(2 - n)*(4 - n)*sqrt(sin(c + d*x)^2))) - (b^3*B*HypergeometricFunctions._₂F₁(1/2, (3 - n)/2, (5 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-3 + n)*sin(c + d*x))/(d*(3 - n)*sqrt(sin(c + d*x)^2)) - (b^3*C*(b*sec(c + d*x))^(-3 + n)*tan(c + d*x))/(d*(2 - n)), -((b^4*(A*(2 - n) + C*(3 - n))*HypergeometricFunctions._₂F₁(1/2, (4 - n)/2, (6 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-4 + n)*sin(c + d*x))/(d*(8 - 6*n + n^2)*sqrt(sin(c + d*x)^2))) - (b^3*B*HypergeometricFunctions._₂F₁(1/2, (3 - n)/2, (5 - n)/2, cos(c + d*x)^2)*(b*sec(c + d*x))^(-3 + n)*sin(c + d*x))/(d*(3 - n)*sqrt(sin(c + d*x)^2)) - (b^3*C*(b*sec(c + d*x))^(-3 + n)*tan(c + d*x))/(d*(2 - n)))]

    @test_int [sec(c + d*x)^(5/2)*(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, If(13>=8, (2*C*sec(c + d*x)^(7/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(7 + 2*n)) + (2*(C*(5 + 2*n) + A*(7 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-3 - 2*n), (1/4)*(1 - 2*n), cos(c + d*x)^2)*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 2*n)*(7 + 2*n)*sqrt(sin(c + d*x)^2)) + (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-5 - 2*n), (1/4)*(-1 - 2*n), cos(c + d*x)^2)*sec(c + d*x)^(5/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 + 2*n)*sqrt(sin(c + d*x)^2)), (2*C*sec(c + d*x)^(7/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(7 + 2*n)) + (2*(C*(5 + 2*n) + A*(7 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-3 - 2*n), (1/4)*(1 - 2*n), cos(c + d*x)^2)*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(21 + 20*n + 4*n^2)*sqrt(sin(c + d*x)^2)) + (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-5 - 2*n), (1/4)*(-1 - 2*n), cos(c + d*x)^2)*sec(c + d*x)^(5/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 + 2*n)*sqrt(sin(c + d*x)^2)))]
    @test_int [sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, If(13>=8, (2*C*sec(c + d*x)^(5/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 + 2*n)) + (2*(C*(3 + 2*n) + A*(5 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-1 - 2*n), (1/4)*(3 - 2*n), cos(c + d*x)^2)*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + 2*n)*(5 + 2*n)*sqrt(sin(c + d*x)^2)) + (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-3 - 2*n), (1/4)*(1 - 2*n), cos(c + d*x)^2)*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 2*n)*sqrt(sin(c + d*x)^2)), (2*C*sec(c + d*x)^(5/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 + 2*n)) + (2*(C*(3 + 2*n) + A*(5 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-1 - 2*n), (1/4)*(3 - 2*n), cos(c + d*x)^2)*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 + 12*n + 4*n^2)*sqrt(sin(c + d*x)^2)) + (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-3 - 2*n), (1/4)*(1 - 2*n), cos(c + d*x)^2)*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 2*n)*sqrt(sin(c + d*x)^2)))]
    @test_int [sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, If(13>=8, (2*C*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 2*n)) - (2*(C + 2*C*n + A*(3 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(1 - 2*n), (1/4)*(5 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*(3 + 2*n)*sqrt(sec(c + d*x))*sqrt(sin(c + d*x)^2)) + (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-1 - 2*n), (1/4)*(3 - 2*n), cos(c + d*x)^2)*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + 2*n)*sqrt(sin(c + d*x)^2)), (2*C*sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 2*n)) - (2*(C + 2*C*n + A*(3 + 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(1 - 2*n), (1/4)*(5 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 4*n - 4*n^2)*sqrt(sec(c + d*x))*sqrt(sin(c + d*x)^2)) + (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(-1 - 2*n), (1/4)*(3 - 2*n), cos(c + d*x)^2)*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + 2*n)*sqrt(sin(c + d*x)^2)))]
    @test_int [((b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 7, If(13>=8, (2*C*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + 2*n)) - (2*(A - C*(1 - 2*n) + 2*A*n)*HypergeometricFunctions._₂F₁(1/2, (1/4)*(3 - 2*n), (1/4)*(7 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*(1 + 2*n)*sec(c + d*x)^(3/2)*sqrt(sin(c + d*x)^2)) - (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(1 - 2*n), (1/4)*(5 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*sqrt(sec(c + d*x))*sqrt(sin(c + d*x)^2)), (2*C*sqrt(sec(c + d*x))*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + 2*n)) - (2*(A - C*(1 - 2*n) + 2*A*n)*HypergeometricFunctions._₂F₁(1/2, (1/4)*(3 - 2*n), (1/4)*(7 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 + 4*n - 4*n^2)*sec(c + d*x)^(3/2)*sqrt(sin(c + d*x)^2)) - (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(1 - 2*n), (1/4)*(5 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*sqrt(sec(c + d*x))*sqrt(sin(c + d*x)^2)))]
    @test_int [((b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 7, If(13>=8, -((2*C*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*sqrt(sec(c + d*x)))) - (2*(A + C*(3 - 2*n) - 2*A*n)*HypergeometricFunctions._₂F₁(1/2, (1/4)*(5 - 2*n), (1/4)*(9 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*(5 - 2*n)*sec(c + d*x)^(5/2)*sqrt(sin(c + d*x)^2)) - (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(3 - 2*n), (1/4)*(7 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*sec(c + d*x)^(3/2)*sqrt(sin(c + d*x)^2)), -((2*C*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(1 - 2*n)*sqrt(sec(c + d*x)))) - (2*(A + C*(3 - 2*n) - 2*A*n)*HypergeometricFunctions._₂F₁(1/2, (1/4)*(5 - 2*n), (1/4)*(9 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 - 12*n + 4*n^2)*sec(c + d*x)^(5/2)*sqrt(sin(c + d*x)^2)) - (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(3 - 2*n), (1/4)*(7 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*sec(c + d*x)^(3/2)*sqrt(sin(c + d*x)^2)))]
    @test_int [((b*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 7, If(13>=8, -((2*C*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*sec(c + d*x)^(3/2))) - (2*(A*(3 - 2*n) + C*(5 - 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(7 - 2*n), (1/4)*(11 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*(7 - 2*n)*sec(c + d*x)^(7/2)*sqrt(sin(c + d*x)^2)) - (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(5 - 2*n), (1/4)*(9 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 - 2*n)*sec(c + d*x)^(5/2)*sqrt(sin(c + d*x)^2)), -((2*C*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(3 - 2*n)*sec(c + d*x)^(3/2))) - (2*(A*(3 - 2*n) + C*(5 - 2*n))*HypergeometricFunctions._₂F₁(1/2, (1/4)*(7 - 2*n), (1/4)*(11 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(21 - 20*n + 4*n^2)*sec(c + d*x)^(7/2)*sqrt(sin(c + d*x)^2)) - (2*B*HypergeometricFunctions._₂F₁(1/2, (1/4)*(5 - 2*n), (1/4)*(9 - 2*n), cos(c + d*x)^2)*(b*sec(c + d*x))^n*sin(c + d*x))/(d*(5 - 2*n)*sec(c + d*x)^(5/2)*sqrt(sin(c + d*x)^2)))]

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*(a+a*sec(e+f*x))^m*(d*sec(e+f*x))^n*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^n*(a+a*sec(e+f*x))^m*(A+C*sec(e+f*x)^2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+a*sec(e+f*x))^m*(A+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 7, (a*(4*A + 3*C)*atanh(sin(c + d*x)))/(8*d) + (a*(5*A + 4*C)*tan(c + d*x))/(5*d) + (a*(4*A + 3*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (a*C*sec(c + d*x)^3*tan(c + d*x))/(4*d) + (a*C*sec(c + d*x)^4*tan(c + d*x))/(5*d) + (a*(5*A + 4*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 7, (a*(4*A + 3*C)*atanh(sin(c + d*x)))/(8*d) + (a*(3*A + 2*C)*tan(c + d*x))/(3*d) + (a*(4*A + 3*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (a*C*sec(c + d*x)^2*tan(c + d*x))/(3*d) + (a*C*sec(c + d*x)^3*tan(c + d*x))/(4*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 6, (a*(2*A + C)*atanh(sin(c + d*x)))/(2*d) + (a*(3*A + 2*C)*tan(c + d*x))/(3*d) + (a*C*sec(c + d*x)*tan(c + d*x))/(2*d) + (a*C*sec(c + d*x)^2*tan(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 5, a*A*x + (a*(2*A + C)*atanh(sin(c + d*x)))/(2*d) + (a*C*tan(c + d*x))/d + (a*C*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 5, a*A*x + (a*C*atanh(sin(c + d*x)))/d + (a*A*sin(c + d*x))/d + (a*C*tan(c + d*x))/d]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 5, (1/2)*a*(A + 2*C)*x + (a*C*atanh(sin(c + d*x)))/d + (a*A*sin(c + d*x))/d + (a*A*cos(c + d*x)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 5, (1/2)*a*(A + 2*C)*x + (a*(2*A + 3*C)*sin(c + d*x))/(3*d) + (a*A*cos(c + d*x)*sin(c + d*x))/(2*d) + (a*A*cos(c + d*x)^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 7, (1/8)*a*(3*A + 4*C)*x + (a*(A + C)*sin(c + d*x))/d + (a*(3*A + 4*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*A*cos(c + d*x)^3*sin(c + d*x))/(4*d) - (a*A*sin(c + d*x)^3)/(3*d)]
    @test_int [cos(c + d*x)^5*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 7, (1/8)*a*(3*A + 4*C)*x + (a*(4*A + 5*C)*sin(c + d*x))/(5*d) + (a*(3*A + 4*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*A*cos(c + d*x)^3*sin(c + d*x))/(4*d) + (a*A*cos(c + d*x)^4*sin(c + d*x))/(5*d) - (a*(4*A + 5*C)*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 8, (a^2*(4*A + 3*C)*atanh(sin(c + d*x)))/(4*d) + (a^2*(4*A + 3*C)*tan(c + d*x))/(3*d) + (a^2*(4*A + 3*C)*sec(c + d*x)*tan(c + d*x))/(12*d) + ((10*A + 3*C)*(a + a*sec(c + d*x))^2*tan(c + d*x))/(30*d) + (C*sec(c + d*x)^2*(a + a*sec(c + d*x))^2*tan(c + d*x))/(5*d) + (C*(a + a*sec(c + d*x))^3*tan(c + d*x))/(10*a*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 7, (a^2*(12*A + 7*C)*atanh(sin(c + d*x)))/(8*d) + (a^2*(12*A + 7*C)*tan(c + d*x))/(6*d) + (a^2*(12*A + 7*C)*sec(c + d*x)*tan(c + d*x))/(24*d) - (C*(a + a*sec(c + d*x))^2*tan(c + d*x))/(12*d) + (C*(a + a*sec(c + d*x))^3*tan(c + d*x))/(4*a*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 6, a^2*A*x + (a^2*(2*A + C)*atanh(sin(c + d*x)))/d + (a^2*(A + C)*tan(c + d*x))/d + (C*(a + a*sec(c + d*x))^2*tan(c + d*x))/(3*d) + (C*(a^2 + a^2*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 6, 2*a^2*A*x + (a^2*(2*A + 3*C)*atanh(sin(c + d*x)))/(2*d) + (A*(a + a*sec(c + d*x))^2*sin(c + d*x))/d - (a^2*(2*A - 3*C)*tan(c + d*x))/(2*d) - ((2*A - C)*(a^2 + a^2*sec(c + d*x))*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 5, (1/2)*a^2*(3*A + 2*C)*x + (2*a^2*C*atanh(sin(c + d*x)))/d + (a^2*(3*A - 2*C)*sin(c + d*x))/(2*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^2*sin(c + d*x))/(2*d) - ((A - 2*C)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 5, a^2*(A + 2*C)*x + (a^2*C*atanh(sin(c + d*x)))/d + (a^2*(A + C)*sin(c + d*x))/d + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^2*sin(c + d*x))/(3*d) + (A*cos(c + d*x)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 6, (1/8)*a^2*(7*A + 12*C)*x + (a^2*(7*A + 12*C)*sin(c + d*x))/(6*d) + (a^2*(7*A + 12*C)*cos(c + d*x)*sin(c + d*x))/(24*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^2*sin(c + d*x))/(6*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^2*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 7, (1/4)*a^2*(3*A + 4*C)*x + (a^2*(18*A + 25*C)*sin(c + d*x))/(15*d) + (a^2*(3*A + 4*C)*cos(c + d*x)*sin(c + d*x))/(4*d) + (a^2*(9*A + 10*C)*cos(c + d*x)^2*sin(c + d*x))/(30*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^2*sin(c + d*x))/(5*d) + (A*cos(c + d*x)^3*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(10*d)]
    @test_int [cos(c + d*x)^6*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 8, (1/16)*a^2*(11*A + 14*C)*x + (2*a^2*(4*A + 5*C)*sin(c + d*x))/(5*d) + (a^2*(11*A + 14*C)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^2*(9*A + 10*C)*cos(c + d*x)^3*sin(c + d*x))/(40*d) + (A*cos(c + d*x)^5*(a + a*sec(c + d*x))^2*sin(c + d*x))/(6*d) + (A*cos(c + d*x)^4*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(15*d) - (2*a^2*(4*A + 5*C)*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 12, (a^3*(30*A + 23*C)*atanh(sin(c + d*x)))/(16*d) + (a^3*(30*A + 23*C)*tan(c + d*x))/(10*d) + (3*a^3*(30*A + 23*C)*sec(c + d*x)*tan(c + d*x))/(80*d) + ((30*A + 7*C)*(a + a*sec(c + d*x))^3*tan(c + d*x))/(120*d) + (C*sec(c + d*x)^2*(a + a*sec(c + d*x))^3*tan(c + d*x))/(6*d) + (C*(a + a*sec(c + d*x))^4*tan(c + d*x))/(10*a*d) + (a^3*(30*A + 23*C)*tan(c + d*x)^3)/(120*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 11, (a^3*(20*A + 13*C)*atanh(sin(c + d*x)))/(8*d) + (a^3*(20*A + 13*C)*tan(c + d*x))/(5*d) + (3*a^3*(20*A + 13*C)*sec(c + d*x)*tan(c + d*x))/(40*d) - (C*(a + a*sec(c + d*x))^3*tan(c + d*x))/(20*d) + (C*(a + a*sec(c + d*x))^4*tan(c + d*x))/(5*a*d) + (a^3*(20*A + 13*C)*tan(c + d*x)^3)/(60*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 7, a^3*A*x + (a^3*(28*A + 15*C)*atanh(sin(c + d*x)))/(8*d) + (5*a^3*(4*A + 3*C)*tan(c + d*x))/(8*d) + (C*(a + a*sec(c + d*x))^3*tan(c + d*x))/(4*d) + (C*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(4*a*d) + ((4*A + 5*C)*(a^3 + a^3*sec(c + d*x))*tan(c + d*x))/(8*d)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 7, 3*a^3*A*x + (a^3*(6*A + 5*C)*atanh(sin(c + d*x)))/(2*d) + (A*(a + a*sec(c + d*x))^3*sin(c + d*x))/d + (5*a^3*C*tan(c + d*x))/(2*d) - ((3*A - C)*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(3*a*d) - ((6*A - 5*C)*(a^3 + a^3*sec(c + d*x))*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 6, (1/2)*a^3*(7*A + 2*C)*x + (a^3*(2*A + 7*C)*atanh(sin(c + d*x)))/(2*d) + (5*a^3*(A - C)*sin(c + d*x))/(2*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(2*d) - ((A - C)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*a*d) - ((A - 4*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 6, (1/2)*a^3*(5*A + 6*C)*x + (3*a^3*C*atanh(sin(c + d*x)))/d + (5*a^3*A*sin(c + d*x))/(2*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^3*sin(c + d*x))/(3*d) + (A*cos(c + d*x)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*a*d) - ((5*A - 6*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 6, (1/8)*a^3*(15*A + 28*C)*x + (a^3*C*atanh(sin(c + d*x)))/d + (5*a^3*(3*A + 4*C)*sin(c + d*x))/(8*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^3*sin(c + d*x))/(4*d) + (A*cos(c + d*x)^2*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(4*a*d) + ((5*A + 4*C)*cos(c + d*x)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(8*d)]
    @test_int [cos(c + d*x)^5*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 9, (1/8)*a^3*(13*A + 20*C)*x + (a^3*(13*A + 20*C)*sin(c + d*x))/(5*d) + (3*a^3*(13*A + 20*C)*cos(c + d*x)*sin(c + d*x))/(40*d) + (3*A*cos(c + d*x)^3*(a + a*sec(c + d*x))^3*sin(c + d*x))/(20*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^3*sin(c + d*x))/(5*d) - (a^3*(13*A + 20*C)*sin(c + d*x)^3)/(60*d)]
    @test_int [cos(c + d*x)^6*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 8, (1/16)*a^3*(23*A + 30*C)*x + (a^3*(34*A + 45*C)*sin(c + d*x))/(15*d) + (a^3*(23*A + 30*C)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^3*(73*A + 90*C)*cos(c + d*x)^2*sin(c + d*x))/(120*d) + (A*cos(c + d*x)^5*(a + a*sec(c + d*x))^3*sin(c + d*x))/(6*d) + (A*cos(c + d*x)^4*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(10*a*d) + ((31*A + 30*C)*cos(c + d*x)^3*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(120*d)]

    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 15, (a^4*(14*A + 11*C)*atanh(sin(c + d*x)))/(4*d) + (16*a^4*(14*A + 11*C)*tan(c + d*x))/(35*d) + (27*a^4*(14*A + 11*C)*sec(c + d*x)*tan(c + d*x))/(140*d) + (a^4*(14*A + 11*C)*sec(c + d*x)^3*tan(c + d*x))/(70*d) + ((21*A + 4*C)*(a + a*sec(c + d*x))^4*tan(c + d*x))/(105*d) + (C*sec(c + d*x)^2*(a + a*sec(c + d*x))^4*tan(c + d*x))/(7*d) + (2*C*(a + a*sec(c + d*x))^5*tan(c + d*x))/(21*a*d) + (8*a^4*(14*A + 11*C)*tan(c + d*x)^3)/(105*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 14, (7*a^4*(10*A + 7*C)*atanh(sin(c + d*x)))/(16*d) + (4*a^4*(10*A + 7*C)*tan(c + d*x))/(5*d) + (27*a^4*(10*A + 7*C)*sec(c + d*x)*tan(c + d*x))/(80*d) + (a^4*(10*A + 7*C)*sec(c + d*x)^3*tan(c + d*x))/(40*d) - (C*(a + a*sec(c + d*x))^4*tan(c + d*x))/(30*d) + (C*(a + a*sec(c + d*x))^5*tan(c + d*x))/(6*a*d) + (2*a^4*(10*A + 7*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 8, a^4*A*x + (a^4*(12*A + 7*C)*atanh(sin(c + d*x)))/(2*d) + (a^4*(10*A + 7*C)*tan(c + d*x))/(2*d) + (a*C*(a + a*sec(c + d*x))^3*tan(c + d*x))/(5*d) + (C*(a + a*sec(c + d*x))^4*tan(c + d*x))/(5*d) + ((5*A + 7*C)*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(15*d) + ((8*A + 7*C)*(a^4 + a^4*sec(c + d*x))*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 8, 4*a^4*A*x + (a^4*(52*A + 35*C)*atanh(sin(c + d*x)))/(8*d) + (A*(a + a*sec(c + d*x))^4*sin(c + d*x))/d + (5*a^4*(4*A + 7*C)*tan(c + d*x))/(8*d) - (a*(4*A - C)*(a + a*sec(c + d*x))^3*tan(c + d*x))/(4*d) - ((12*A - 7*C)*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(12*d) - ((12*A - 35*C)*(a^4 + a^4*sec(c + d*x))*tan(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 7, (1/2)*a^4*(13*A + 2*C)*x + (2*a^4*(2*A + 3*C)*atanh(sin(c + d*x)))/d + (5*a^4*(A - 2*C)*sin(c + d*x))/(2*d) - (a*(3*A - 2*C)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(6*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^4*sin(c + d*x))/(2*d) - ((A - 2*C)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*d) + ((3*A + 22*C)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 7, 2*a^4*(3*A + 2*C)*x + (a^4*(2*A + 13*C)*atanh(sin(c + d*x)))/(2*d) + (5*a^4*(2*A - C)*sin(c + d*x))/(2*d) + (2*a*A*cos(c + d*x)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(3*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^4*sin(c + d*x))/(3*d) - ((2*A - C)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*d) - ((4*A - 9*C)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 7, (1/8)*a^4*(35*A + 52*C)*x + (4*a^4*C*atanh(sin(c + d*x)))/d + (5*a^4*(7*A + 4*C)*sin(c + d*x))/(8*d) + (a*A*cos(c + d*x)^2*(a + a*sec(c + d*x))^3*sin(c + d*x))/(3*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^4*sin(c + d*x))/(4*d) + ((7*A + 4*C)*cos(c + d*x)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(8*d) - ((35*A - 12*C)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^5*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 7, (1/2)*a^4*(7*A + 12*C)*x + (a^4*C*atanh(sin(c + d*x)))/d + (a^4*(7*A + 10*C)*sin(c + d*x))/(2*d) + (a*A*cos(c + d*x)^3*(a + a*sec(c + d*x))^3*sin(c + d*x))/(5*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^4*sin(c + d*x))/(5*d) + ((7*A + 5*C)*cos(c + d*x)^2*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(15*d) + ((7*A + 8*C)*cos(c + d*x)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^6*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 12, (7/16)*a^4*(7*A + 10*C)*x + (4*a^4*(7*A + 10*C)*sin(c + d*x))/(5*d) + (27*a^4*(7*A + 10*C)*cos(c + d*x)*sin(c + d*x))/(80*d) + (a^4*(7*A + 10*C)*cos(c + d*x)^3*sin(c + d*x))/(40*d) + (2*A*cos(c + d*x)^4*(a + a*sec(c + d*x))^4*sin(c + d*x))/(15*d) + (A*cos(c + d*x)^5*(a + a*sec(c + d*x))^4*sin(c + d*x))/(6*d) - (2*a^4*(7*A + 10*C)*sin(c + d*x)^3)/(15*d)]
    @test_int [cos(c + d*x)^7*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^4, x, 9, (1/4)*a^4*(11*A + 14*C)*x + (a^4*(454*A + 581*C)*sin(c + d*x))/(105*d) + (a^4*(11*A + 14*C)*cos(c + d*x)*sin(c + d*x))/(4*d) + (a^4*(247*A + 308*C)*cos(c + d*x)^2*sin(c + d*x))/(210*d) + (2*a*A*cos(c + d*x)^5*(a + a*sec(c + d*x))^3*sin(c + d*x))/(21*d) + (A*cos(c + d*x)^6*(a + a*sec(c + d*x))^4*sin(c + d*x))/(7*d) + ((8*A + 7*C)*cos(c + d*x)^4*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(35*d) + ((109*A + 126*C)*cos(c + d*x)^3*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(210*d)]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [sec(c + d*x)^4*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 7, (3*(4*A + 5*C)*atanh(sin(c + d*x)))/(8*a*d) - ((3*A + 4*C)*tan(c + d*x))/(a*d) + (3*(4*A + 5*C)*sec(c + d*x)*tan(c + d*x))/(8*a*d) + ((4*A + 5*C)*sec(c + d*x)^3*tan(c + d*x))/(4*a*d) - ((A + C)*sec(c + d*x)^4*tan(c + d*x))/(d*(a + a*sec(c + d*x))) - ((3*A + 4*C)*tan(c + d*x)^3)/(3*a*d)]
    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 6, -(((2*A + 3*C)*atanh(sin(c + d*x)))/(2*a*d)) + ((3*A + 4*C)*tan(c + d*x))/(a*d) - ((2*A + 3*C)*sec(c + d*x)*tan(c + d*x))/(2*a*d) - ((A + C)*sec(c + d*x)^3*tan(c + d*x))/(d*(a + a*sec(c + d*x))) + ((3*A + 4*C)*tan(c + d*x)^3)/(3*a*d)]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 6, ((2*A + 3*C)*atanh(sin(c + d*x)))/(2*a*d) - ((A + 2*C)*tan(c + d*x))/(a*d) + ((2*A + 3*C)*sec(c + d*x)*tan(c + d*x))/(2*a*d) - ((A + C)*sec(c + d*x)^2*tan(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 4, -((C*atanh(sin(c + d*x)))/(a*d)) + (C*tan(c + d*x))/(a*d) + ((A + C)*tan(c + d*x))/(a*d*(1 + sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 4, (A*x)/a + (C*atanh(sin(c + d*x)))/(a*d) - ((A + C)*tan(c + d*x))/(a*d*(1 + sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 4, -((A*x)/a) + ((2*A + C)*sin(c + d*x))/(a*d) - ((A + C)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 5, ((3*A + 2*C)*x)/(2*a) - ((2*A + C)*sin(c + d*x))/(a*d) + ((3*A + 2*C)*cos(c + d*x)*sin(c + d*x))/(2*a*d) - ((A + C)*cos(c + d*x)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 6, -(((3*A + 2*C)*x)/(2*a)) + ((4*A + 3*C)*sin(c + d*x))/(a*d) - ((3*A + 2*C)*cos(c + d*x)*sin(c + d*x))/(2*a*d) - ((A + C)*cos(c + d*x)^2*sin(c + d*x))/(d*(a + a*sec(c + d*x))) - ((4*A + 3*C)*sin(c + d*x)^3)/(3*a*d)]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 7, (3*(5*A + 4*C)*x)/(8*a) - ((4*A + 3*C)*sin(c + d*x))/(a*d) + (3*(5*A + 4*C)*cos(c + d*x)*sin(c + d*x))/(8*a*d) + ((5*A + 4*C)*cos(c + d*x)^3*sin(c + d*x))/(4*a*d) - ((A + C)*cos(c + d*x)^3*sin(c + d*x))/(d*(a + a*sec(c + d*x))) + ((4*A + 3*C)*sin(c + d*x)^3)/(3*a*d)]

    @test_int [sec(c + d*x)^4*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 7, -(((2*A + 5*C)*atanh(sin(c + d*x)))/(a^2*d)) + ((5*A + 12*C)*tan(c + d*x))/(a^2*d) - ((2*A + 5*C)*sec(c + d*x)*tan(c + d*x))/(a^2*d) - (2*(2*A + 5*C)*sec(c + d*x)^3*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^4*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2) + ((5*A + 12*C)*tan(c + d*x)^3)/(3*a^2*d)]
    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 7, ((2*A + 7*C)*atanh(sin(c + d*x)))/(2*a^2*d) - (4*(A + 4*C)*tan(c + d*x))/(3*a^2*d) + ((2*A + 7*C)*sec(c + d*x)*tan(c + d*x))/(2*a^2*d) - (2*(A + 4*C)*sec(c + d*x)^2*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^3*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 6, -((2*C*atanh(sin(c + d*x)))/(a^2*d)) + ((A + 4*C)*tan(c + d*x))/(3*a^2*d) + (2*C*tan(c + d*x))/(a^2*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^2*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 4, (C*atanh(sin(c + d*x)))/(a^2*d) + ((A - 5*C)*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) + ((A + C)*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2), (C*atanh(sin(c + d*x)))/(a^2*d) + (2*(A - 2*C)*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 3, (A*x)/a^2 - (2*(2*A - C)*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A + C)*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 5, -((2*A*x)/a^2) + ((10*A + C)*sin(c + d*x))/(3*a^2*d) - (2*A*sin(c + d*x))/(a^2*d*(1 + sec(c + d*x))) - ((A + C)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 6, ((7*A + 2*C)*x)/(2*a^2) - (4*(4*A + C)*sin(c + d*x))/(3*a^2*d) + ((7*A + 2*C)*cos(c + d*x)*sin(c + d*x))/(2*a^2*d) - (2*(4*A + C)*cos(c + d*x)*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A + C)*cos(c + d*x)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 7, -(((5*A + 2*C)*x)/a^2) + ((12*A + 5*C)*sin(c + d*x))/(a^2*d) - ((5*A + 2*C)*cos(c + d*x)*sin(c + d*x))/(a^2*d) - (2*(5*A + 2*C)*cos(c + d*x)^2*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A + C)*cos(c + d*x)^2*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2) - ((12*A + 5*C)*sin(c + d*x)^3)/(3*a^2*d)]

    @test_int [sec(c + d*x)^4*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 8, ((2*A + 13*C)*atanh(sin(c + d*x)))/(2*a^3*d) - (2*(11*A + 76*C)*tan(c + d*x))/(15*a^3*d) + ((2*A + 13*C)*sec(c + d*x)*tan(c + d*x))/(2*a^3*d) - ((A + C)*sec(c + d*x)^4*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((A + 11*C)*sec(c + d*x)^3*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((11*A + 76*C)*sec(c + d*x)^2*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 7, -((3*C*atanh(sin(c + d*x)))/(a^3*d)) + ((2*A + 27*C)*tan(c + d*x))/(15*a^3*d) - ((A + C)*sec(c + d*x)^3*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((A - 9*C)*sec(c + d*x)^2*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + (3*C*tan(c + d*x))/(d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 5, (C*atanh(sin(c + d*x)))/(a^3*d) - ((A + C)*sec(c + d*x)^2*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((3*A - 7*C)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((6*A - 29*C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 3, -(((A + C)*sec(c + d*x)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3)) + ((A - C)*tan(c + d*x))/(3*a*d*(a + a*sec(c + d*x))^2) + ((2*A + 7*C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 4, (A*x)/a^3 - ((A + C)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((7*A - 3*C)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((22*A - 3*C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 6, -((3*A*x)/a^3) + (2*(36*A + C)*sin(c + d*x))/(15*a^3*d) - ((A + C)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((9*A - C)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - (3*A*sin(c + d*x))/(d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 7, ((13*A + 2*C)*x)/(2*a^3) - (2*(76*A + 11*C)*sin(c + d*x))/(15*a^3*d) + ((13*A + 2*C)*cos(c + d*x)*sin(c + d*x))/(2*a^3*d) - ((A + C)*cos(c + d*x)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((11*A + C)*cos(c + d*x)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((76*A + 11*C)*cos(c + d*x)*sin(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 8, -(((23*A + 6*C)*x)/(2*a^3)) + (4*(34*A + 9*C)*sin(c + d*x))/(5*a^3*d) - ((23*A + 6*C)*cos(c + d*x)*sin(c + d*x))/(2*a^3*d) - ((A + C)*cos(c + d*x)^2*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((13*A + 3*C)*cos(c + d*x)^2*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((23*A + 6*C)*cos(c + d*x)^2*sin(c + d*x))/(3*d*(a^3 + a^3*sec(c + d*x))) - (4*(34*A + 9*C)*sin(c + d*x)^3)/(15*a^3*d)]

    @test_int [sec(c + d*x)^5*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 9, ((2*A + 21*C)*atanh(sin(c + d*x)))/(2*a^4*d) - (32*(5*A + 54*C)*tan(c + d*x))/(105*a^4*d) + ((2*A + 21*C)*sec(c + d*x)*tan(c + d*x))/(2*a^4*d) - ((10*A + 129*C)*sec(c + d*x)^3*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (16*(5*A + 54*C)*sec(c + d*x)^2*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^5*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - (2*C*sec(c + d*x)^4*tan(c + d*x))/(5*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [sec(c + d*x)^4*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 8, -((4*C*atanh(sin(c + d*x)))/(a^4*d)) + (2*(3*A + 122*C)*tan(c + d*x))/(105*a^4*d) + ((3*A - 88*C)*sec(c + d*x)^2*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) + (4*C*tan(c + d*x))/(a^4*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^4*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) + (2*(A - 6*C)*sec(c + d*x)^3*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 6, (C*atanh(sin(c + d*x)))/(a^4*d) - ((8*A - 55*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) + ((16*A - 215*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^3*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) + (2*(2*A - 5*C)*sec(c + d*x)^2*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 4, ((23*A - 54*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) + (4*(2*A + 9*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^2*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - (2*(3*A - 4*C)*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 4, -(((A + C)*sec(c + d*x)*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4)) + (2*(4*A - 3*C)*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3) + ((6*A + 13*C)*tan(c + d*x))/(105*d*(a^2 + a^2*sec(c + d*x))^2) + ((6*A + 13*C)*tan(c + d*x))/(105*d*(a^4 + a^4*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 5, (A*x)/a^4 - ((55*A - 8*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (8*(20*A - C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A + C)*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - (2*(5*A - 2*C)*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 7, -((4*A*x)/a^4) + (2*(332*A + 3*C)*sin(c + d*x))/(105*a^4*d) - ((88*A - 3*C)*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (4*A*sin(c + d*x))/(a^4*d*(1 + sec(c + d*x))) - ((A + C)*sin(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - (2*(6*A - C)*sin(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 8, ((21*A + 2*C)*x)/(2*a^4) - (32*(54*A + 5*C)*sin(c + d*x))/(105*a^4*d) + ((21*A + 2*C)*cos(c + d*x)*sin(c + d*x))/(2*a^4*d) - ((129*A + 10*C)*cos(c + d*x)*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (16*(54*A + 5*C)*cos(c + d*x)*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A + C)*cos(c + d*x)*sin(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - (2*A*cos(c + d*x)*sin(c + d*x))/(5*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 9, -((2*(11*A + 2*C)*x)/a^4) + (4*(454*A + 83*C)*sin(c + d*x))/(35*a^4*d) - (2*(11*A + 2*C)*cos(c + d*x)*sin(c + d*x))/(a^4*d) - ((178*A + 31*C)*cos(c + d*x)^2*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (4*(11*A + 2*C)*cos(c + d*x)^2*sin(c + d*x))/(3*a^4*d*(1 + sec(c + d*x))) - ((A + C)*cos(c + d*x)^2*sin(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - (2*(8*A + C)*cos(c + d*x)^2*sin(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3) - (4*(454*A + 83*C)*sin(c + d*x)^3)/(105*a^4*d)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+a*sec(e+f*x))^(m/2)*(A+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^4*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, (4*a*(99*A + 80*C)*tan(c + d*x))/(495*d*sqrt(a + a*sec(c + d*x))) + (2*a*(99*A + 80*C)*sec(c + d*x)^3*tan(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a*C*sec(c + d*x)^4*tan(c + d*x))/(99*d*sqrt(a + a*sec(c + d*x))) - (8*(99*A + 80*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3465*d) + (2*C*sec(c + d*x)^4*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(11*d) + (4*(99*A + 80*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(1155*a*d)]
    @test_int [sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 5, (2*a*(21*A + 16*C)*tan(c + d*x))/(45*d*sqrt(a + a*sec(c + d*x))) + (2*a*C*sec(c + d*x)^3*tan(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) - (4*(21*A + 16*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*C*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(9*d) + (2*(21*A + 16*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*a*d)]
    @test_int [sec(c + d*x)^2*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 4, (2*a*(35*A + 27*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*(35*A + 18*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*C*sec(c + d*x)^2*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(7*d) + (2*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*a*d)]
    @test_int [sec(c + d*x)^1*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 3, (2*a*(15*A + 7*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) - (4*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*a*d)]
    @test_int [sec(c + d*x)^0*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 5, (2*sqrt(a)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a*C*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 5, (sqrt(a)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/d - (a*(A - 2*C)*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 4, (sqrt(a)*(3*A + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a*A*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 5, (sqrt(a)*(5*A + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a*(5*A + 8*C)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a*A*cos(c + d*x)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, (sqrt(a)*(35*A + 48*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a*(35*A + 48*C)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a*(35*A + 48*C)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a*A*cos(c + d*x)^2*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d)]

    @test_int [sec(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (2*a^2*(143*A + 112*C)*tan(c + d*x))/(165*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(33*A + 28*C)*sec(c + d*x)^3*tan(c + d*x))/(231*d*sqrt(a + a*sec(c + d*x))) - (4*a*(143*A + 112*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(1155*d) + (2*a*C*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(33*d) + (2*(143*A + 112*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(385*d) + (2*C*sec(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(11*d)]
    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 5, (8*a^2*(63*A + 47*C)*tan(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a*(63*A + 47*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*(63*A + 22*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*d) + (2*C*sec(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(9*d) + (2*C*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(21*a*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 4, (8*a^2*(35*A + 19*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(35*A + 19*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) - (4*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*C*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*a*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (2*a^(3/2)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^2*(5*A + 4*C)*tan(c + d*x))/(5*d*sqrt(a + a*sec(c + d*x))) + (2*a*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(5*d) + (2*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (3*a^(3/2)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/d - (a^2*(3*A - 8*C)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) - (a*(3*A - 2*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 5, (a^(3/2)*(7*A + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^2*(5*A - 8*C)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) - (a*(A - 4*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 5, (a^(3/2)*(11*A + 24*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^2*(19*A + 24*C)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a*A*cos(c + d*x)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (a^(3/2)*(75*A + 112*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^2*(75*A + 112*C)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^2*(13*A + 16*C)*cos(c + d*x)*sin(c + d*x))/(32*d*sqrt(a + a*sec(c + d*x))) + (a*A*cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(8*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 7, (a^(3/2)*(133*A + 176*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^2*(133*A + 176*C)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^2*(133*A + 176*C)*cos(c + d*x)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(67*A + 80*C)*cos(c + d*x)^2*sin(c + d*x))/(240*d*sqrt(a + a*sec(c + d*x))) + (3*a*A*cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d)]

    @test_int [sec(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (2*a^3*(10439*A + 8368*C)*tan(c + d*x))/(6435*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(2717*A + 2224*C)*sec(c + d*x)^3*tan(c + d*x))/(9009*d*sqrt(a + a*sec(c + d*x))) - (4*a^2*(10439*A + 8368*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(45045*d) + (2*a^2*(143*A + 136*C)*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(1287*d) + (2*a*(10439*A + 8368*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(15015*d) + (10*a*C*sec(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(143*d) + (2*C*sec(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(13*d)]
    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 6, (64*a^3*(33*A + 25*C)*tan(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(33*A + 25*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(693*d) + (2*a*(33*A + 25*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(231*d) + (2*(99*A + 26*C)*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(693*d) + (2*C*sec(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(11*d) + (10*C*(a + a*sec(c + d*x))^(7/2)*tan(c + d*x))/(99*a*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 5, (64*a^3*(21*A + 13*C)*tan(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(21*A + 13*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*a*(21*A + 13*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*d) - (4*C*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*d) + (2*C*(a + a*sec(c + d*x))^(7/2)*tan(c + d*x))/(9*a*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (2*a^(5/2)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^3*(49*A + 32*C)*tan(c + d*x))/(21*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(7*A + 8*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(21*d) + (2*a*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(7*d) + (2*C*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (5*a^(5/2)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/d + (a^3*(15*A + 64*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) - (a^2*(15*A - 16*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) - (a*(5*A - 2*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(19*A + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^3*(27*A - 56*C)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) - (a^2*(A - 8*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d) - (a*(3*A - 4*C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(6*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 6, (5*a^(5/2)*(5*A + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^3*(49*A - 24*C)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) - (a^2*(3*A - 8*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (5*a*A*cos(c + d*x)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(163*A + 304*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^3*(299*A + 432*C)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(17*A + 16*C)*cos(c + d*x)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(32*d) + (5*a*A*cos(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(283*A + 400*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^3*(283*A + 400*C)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^3*(787*A + 1040*C)*cos(c + d*x)*sin(c + d*x))/(960*d*sqrt(a + a*sec(c + d*x))) + (a^2*(79*A + 80*C)*cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(240*d) + (a*A*cos(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(8*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^6*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 8, (a^(5/2)*(1015*A + 1304*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(512*d) + (a^3*(1015*A + 1304*C)*sin(c + d*x))/(512*d*sqrt(a + a*sec(c + d*x))) + (a^3*(1015*A + 1304*C)*cos(c + d*x)*sin(c + d*x))/(768*d*sqrt(a + a*sec(c + d*x))) + (a^3*(109*A + 136*C)*cos(c + d*x)^2*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(23*A + 24*C)*cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(96*d) + (a*A*cos(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d) + (A*cos(c + d*x)^5*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(6*d)]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [sec(c + d*x)^4*(A + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 7, -((sqrt(2)*(A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (4*(147*A + 143*C)*tan(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*(21*A + 19*C)*sec(c + d*x)^2*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) - (2*C*sec(c + d*x)^3*tan(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) + (2*C*sec(c + d*x)^4*tan(c + d*x))/(9*d*sqrt(a + a*sec(c + d*x))) - (2*(21*A + 29*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*a*d)]
    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 6, (sqrt(2)*(A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - (4*(35*A + 37*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) - (2*C*sec(c + d*x)^2*tan(c + d*x))/(35*d*sqrt(a + a*sec(c + d*x))) + (2*C*sec(c + d*x)^3*tan(c + d*x))/(7*d*sqrt(a + a*sec(c + d*x))) + (2*(35*A + 31*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*a*d)]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 5, -((sqrt(2)*(A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (2*(15*A + 14*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*C*sec(c + d*x)^2*tan(c + d*x))/(5*d*sqrt(a + a*sec(c + d*x))) - (2*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*a*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 4, (sqrt(2)*(A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - (4*C*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*a*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 6, (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) - (sqrt(2)*(A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*C*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 6, -((A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d)) + (sqrt(2)*(A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (A*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 7, ((7*A + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*sqrt(a)*d) - (sqrt(2)*(A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - (A*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)*sin(c + d*x))/(2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 8, -((9*A + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*sqrt(a)*d) + (sqrt(2)*(A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + ((7*A + 8*C)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) - (A*cos(c + d*x)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)^2*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 9, ((107*A + 112*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*sqrt(a)*d) - (sqrt(2)*(A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - ((21*A + 16*C)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + ((43*A + 48*C)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) - (A*cos(c + d*x)^2*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)^3*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 7, ((11*A + 19*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sec(c + d*x)^4*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((455*A + 799*C)*tan(c + d*x))/(105*a*d*sqrt(a + a*sec(c + d*x))) - ((35*A + 67*C)*sec(c + d*x)^2*tan(c + d*x))/(70*a*d*sqrt(a + a*sec(c + d*x))) + ((7*A + 11*C)*sec(c + d*x)^3*tan(c + d*x))/(14*a*d*sqrt(a + a*sec(c + d*x))) + ((245*A + 397*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(210*a^2*d)]
    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 6, -(((7*A + 15*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d)) - ((A + C)*sec(c + d*x)^3*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((15*A + 31*C)*tan(c + d*x))/(5*a*d*sqrt(a + a*sec(c + d*x))) + ((5*A + 9*C)*sec(c + d*x)^2*tan(c + d*x))/(10*a*d*sqrt(a + a*sec(c + d*x))) - ((5*A + 13*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(10*a^2*d)]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 5, ((3*A + 11*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sec(c + d*x)^2*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((3*A + 13*C)*tan(c + d*x))/(3*a*d*sqrt(a + a*sec(c + d*x))) + ((3*A + 7*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(6*a^2*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 4, ((A - 7*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sec(c + d*x)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((A + 5*C)*tan(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 6, (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) - ((5*A - 3*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 7, (-3*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) + ((9*A + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((3*A + C)*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 8, ((19*A + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*a^(3/2)*d) - ((13*A + 5*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*cos(c + d*x)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((7*A + 2*C)*sin(c + d*x))/(4*a*d*sqrt(a + a*sec(c + d*x))) + ((2*A + C)*cos(c + d*x)*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 9, -((47*A + 24*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*a^(3/2)*d) + ((17*A + 9*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*cos(c + d*x)^2*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + (3*(7*A + 4*C)*sin(c + d*x))/(8*a*d*sqrt(a + a*sec(c + d*x))) - ((13*A + 6*C)*cos(c + d*x)*sin(c + d*x))/(12*a*d*sqrt(a + a*sec(c + d*x))) + ((5*A + 3*C)*cos(c + d*x)^2*sin(c + d*x))/(6*a*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 7, -(((75*A + 283*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d)) - ((A + C)*sec(c + d*x)^4*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((5*A + 21*C)*sec(c + d*x)^3*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((465*A + 1729*C)*tan(c + d*x))/(120*a^2*d*sqrt(a + a*sec(c + d*x))) + ((45*A + 157*C)*sec(c + d*x)^2*tan(c + d*x))/(80*a^2*d*sqrt(a + a*sec(c + d*x))) - ((195*A + 787*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(240*a^3*d)]
    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 6, ((19*A + 163*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sec(c + d*x)^3*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((A + 17*C)*sec(c + d*x)^2*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((21*A + 197*C)*tan(c + d*x))/(24*a^2*d*sqrt(a + a*sec(c + d*x))) + (5*(3*A + 19*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(48*a^3*d)]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 5, (5*(A - 15*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sec(c + d*x)^2*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((3*A - 13*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((A + 9*C)*tan(c + d*x))/(4*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 4, ((3*A + 19*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sec(c + d*x)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((7*A - 9*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 7, (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) - ((43*A - 5*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((11*A - 5*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 8, (-5*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) + ((115*A + 3*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((15*A - C)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((35*A + 3*C)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 9, ((39*A + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*a^(5/2)*d) - ((219*A + 43*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*cos(c + d*x)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((19*A + 3*C)*cos(c + d*x)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((63*A + 11*C)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x))) + ((31*A + 7*C)*cos(c + d*x)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^(n/2)*(a+a*sec(e+f*x))^m*(A+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 9, -((2*a*(5*A + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*a*(7*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*(5*A + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a*(7*A + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*a*C*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d) + (2*a*C*sec(c + d*x)^(7/2)*sin(c + d*x))/(7*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 8, -((2*a*(5*A + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*a*(3*A + C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*(5*A + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a*C*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d) + (2*a*C*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [((a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 7, (2*a*(A - C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*a*(3*A + C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*C*sqrt(sec(c + d*x))*sin(c + d*x))/d + (2*a*C*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [((a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 7, (2*a*(A - C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*a*(A + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*A*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) + (2*a*C*sqrt(sec(c + d*x))*sin(c + d*x))/d]
    @test_int [((a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 7, (2*a*(3*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*a*(A + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*A*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*a*A*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 8, (2*a*(3*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*a*(5*A + 7*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*A*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*a*A*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*a*(5*A + 7*C)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 9, (2*a*(7*A + 9*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*a*(5*A + 7*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*A*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*a*A*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*a*(7*A + 9*C)*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (2*a*(5*A + 7*C)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x)))]

    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2), x, 10, (-16*a^2*(3*A + 2*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^2*(7*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (16*a^2*(3*A + 2*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (4*a^2*(7*A + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*a^2*(21*A + 19*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(105*d) + (2*C*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2*sin(c + d*x))/(9*d) + (8*C*sec(c + d*x)^(5/2)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(63*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2), x, 9, (-4*a^2*(5*A + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (8*a^2*(7*A + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^2*(5*A + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a^2*(35*A + 33*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*C*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2*sin(c + d*x))/(7*d) + (8*C*sec(c + d*x)^(3/2)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(35*d)]
    @test_int [((a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 8, (-16*a^2*C*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^2*(3*A + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a^2*(15*A + 17*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*C*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2*sin(c + d*x))/(5*d) + (8*C*sqrt(sec(c + d*x))*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [((a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 8, (4*a^2*(A - C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/d + (8*a^2*(A + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) - (2*a^2*(A - 5*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) - (2*(A - C)*sqrt(sec(c + d*x))*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [((a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 8, (16*a^2*A*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^2*(A + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) - (2*a^2*(7*A - 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (8*A*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 8, (4*a^2*(3*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (8*a^2*(3*A + 7*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a^2*(33*A + 35*C)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (8*A*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 9, (16*a^2*(2*A + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^2*(5*A + 7*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a^2*(19*A + 21*C)*sin(c + d*x))/(105*d*sec(c + d*x)^(3/2)) + (4*a^2*(5*A + 7*C)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (8*A*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(11/2), x, 10, (4*a^2*(7*A + 9*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (8*a^2*(25*A + 33*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(231*d) + (2*a^2*(89*A + 99*C)*sin(c + d*x))/(693*d*sec(c + d*x)^(5/2)) + (4*a^2*(7*A + 9*C)*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (8*a^2*(25*A + 33*C)*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2)) + (8*A*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2))]

    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2), x, 11, (-4*a^3*(7*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(143*A + 105*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(231*d) + (4*a^3*(7*A + 5*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (4*a^3*(143*A + 105*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(231*d) + (8*a^3*(44*A + 35*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(385*d) + (2*C*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(11*d) + (4*C*sec(c + d*x)^(5/2)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(33*a*d) + (2*(33*A + 35*C)*sec(c + d*x)^(5/2)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(231*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2), x, 10, (-4*a^3*(27*A + 17*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^3*(21*A + 11*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^3*(27*A + 17*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (8*a^3*(21*A + 16*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*C*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(9*d) + (4*C*sec(c + d*x)^(3/2)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(21*a*d) + (2*(63*A + 73*C)*sec(c + d*x)^(3/2)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(315*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 9, (-4*a^3*(5*A + 7*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(35*A + 13*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (8*a^3*(70*A + 53*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d) + (2*C*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3*sin(c + d*x))/(7*d) + (12*C*sqrt(sec(c + d*x))*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(35*a*d) + (2*(5*A + 7*C)*sqrt(sec(c + d*x))*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 9, (4*a^3*(5*A - 9*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(5*A + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (4*a^3*(5*A + 21*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) - (2*(5*A - 3*C)*sqrt(sec(c + d*x))*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(15*a*d) - (2*(5*A - 9*C)*sqrt(sec(c + d*x))*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 9, (4*a^3*(9*A - 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(3*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) - (8*a^3*(3*A - 10*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (4*A*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(5*a*d*sqrt(sec(c + d*x))) - (2*(9*A - 5*C)*sqrt(sec(c + d*x))*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 9, (4*a^3*(7*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(13*A + 35*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) - (4*a^3*(41*A - 35*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (12*A*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(35*a*d*sec(c + d*x)^(3/2)) + (2*(7*A + 5*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 9, (4*a^3*(17*A + 27*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^3*(11*A + 21*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (8*a^3*(16*A + 21*C)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (4*A*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(21*a*d*sec(c + d*x)^(5/2)) + (2*(73*A + 63*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(315*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(11/2), x, 10, (4*a^3*(5*A + 7*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(105*A + 143*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(231*d) + (8*a^3*(35*A + 44*C)*sin(c + d*x))/(385*d*sec(c + d*x)^(3/2)) + (4*a^3*(105*A + 143*C)*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2)) + (4*A*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(33*a*d*sec(c + d*x)^(7/2)) + (2*(35*A + 33*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(231*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(13/2), x, 11, (4*a^3*(175*A + 221*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(195*d) + (4*a^3*(95*A + 121*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(231*d) + (40*a^3*(118*A + 143*C)*sin(c + d*x))/(9009*d*sec(c + d*x)^(5/2)) + (4*a^3*(175*A + 221*C)*sin(c + d*x))/(585*d*sec(c + d*x)^(3/2)) + (4*a^3*(95*A + 121*C)*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(13*d*sec(c + d*x)^(11/2)) + (12*A*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(143*a*d*sec(c + d*x)^(9/2)) + (2*(145*A + 143*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(1287*d*sec(c + d*x)^(7/2))]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [(sec(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 9, (-3*(5*A + 7*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*a*d) - ((3*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a*d) + (3*(5*A + 7*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*a*d) - ((3*A + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a*d) + ((5*A + 7*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*a*d) - ((A + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 8, ((A + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d) + ((3*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a*d) - ((A + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(a*d) + ((3*A + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a*d) - ((A + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [(sqrt(sec(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 7, -(((A + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d)) + ((A - C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d) + ((A + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(a*d) - ((A + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))), x, 6, ((3*A + C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d) - ((A - C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d) - ((A + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))), x, 7, -(((3*A + C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d)) + ((5*A + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a*d) + ((5*A + 3*C)*sin(c + d*x))/(3*a*d*sqrt(sec(c + d*x))) - ((A + C)*sin(c + d*x))/(d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))), x, 8, (3*(7*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*a*d) - ((5*A + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a*d) + ((7*A + 5*C)*sin(c + d*x))/(5*a*d*sec(c + d*x)^(3/2)) - ((5*A + 3*C)*sin(c + d*x))/(3*a*d*sqrt(sec(c + d*x))) - ((A + C)*sin(c + d*x))/(d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x)))]

    @test_int [(sec(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 9, ((A + 7*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d) + (2*(A + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) - ((A + 7*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(a^2*d) + (2*(A + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*d) - ((A + 7*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [(sec(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 8, (-4*C*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d) + ((A - 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + (4*C*sqrt(sec(c + d*x))*sin(c + d*x))/(a^2*d) + ((A - 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [(sqrt(sec(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 7, -(((A - C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d)) + (2*(A + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + ((A - C)*sqrt(sec(c + d*x))*sin(c + d*x))/(a^2*d*(1 + sec(c + d*x))) - ((A + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2), x, 7, (4*A*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d) - ((5*A - C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) - ((5*A - C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2), x, 8, -(((7*A + C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d)) + (2*(5*A + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + (2*(5*A + C)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x))) - ((7*A + C)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x))*(1 + sec(c + d*x))) - ((A + C)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2)]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2), x, 9, (4*(14*A + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*a^2*d) - (5*(3*A + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + (4*(14*A + 5*C)*sin(c + d*x))/(15*a^2*d*sec(c + d*x)^(3/2)) - (5*(3*A + C)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x))) - ((3*A + C)*sin(c + d*x))/(a^2*d*sec(c + d*x)^(3/2)*(1 + sec(c + d*x))) - ((A + C)*sin(c + d*x))/(3*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2)]

    @test_int [(sec(c + d*x)^(7/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 10, ((9*A + 119*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((A + 11*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(2*a^3*d) - ((9*A + 119*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*a^3*d) + ((A + 11*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(2*a^3*d) - ((A + C)*sec(c + d*x)^(9/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - (2*C*sec(c + d*x)^(7/2)*sin(c + d*x))/(3*a*d*(a + a*sec(c + d*x))^2) - ((9*A + 119*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(30*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 9, ((A - 49*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((A - 13*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((A - 49*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*a^3*d) - ((A + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + (2*(A - 4*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((A - 13*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(6*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 8, -((A - 9*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((A + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((A + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + (2*(2*A - 3*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((A - 9*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(sqrt(sec(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 8, -((9*A - C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((3*A + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((A + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + (2*(3*A - 2*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((3*A + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(6*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3), x, 8, ((49*A - C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) - ((13*A - C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((A + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - (2*(4*A - C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((13*A - C)*sqrt(sec(c + d*x))*sin(c + d*x))/(6*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3), x, 9, -((119*A + 9*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((11*A + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(2*a^3*d) + ((11*A + C)*sin(c + d*x))/(2*a^3*d*sqrt(sec(c + d*x))) - ((A + C)*sin(c + d*x))/(5*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3) - (2*A*sin(c + d*x))/(3*a*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2) - ((119*A + 9*C)*sin(c + d*x))/(30*d*sqrt(sec(c + d*x))*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3), x, 10, (7*(33*A + 7*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) - ((63*A + 13*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) + (7*(33*A + 7*C)*sin(c + d*x))/(30*a^3*d*sec(c + d*x)^(3/2)) - ((63*A + 13*C)*sin(c + d*x))/(6*a^3*d*sqrt(sec(c + d*x))) - ((A + C)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3) - (2*(6*A + C)*sin(c + d*x))/(15*a*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2) - ((63*A + 13*C)*sin(c + d*x))/(10*d*sec(c + d*x)^(3/2)*(a^3 + a^3*sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^(n/2)*(a+a*sec(e+f*x))^(m/2)*(A+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, (sqrt(a)*(48*A + 35*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a*(48*A + 35*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a*(48*A + 35*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a*C*sec(c + d*x)^(7/2)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d)]
    @test_int [sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 5, (sqrt(a)*(8*A + 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a*(8*A + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a*C*sec(c + d*x)^(5/2)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^(1/2)*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 4, (sqrt(a)*(8*A + 3*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a*C*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(1/2), x, 4, (sqrt(a)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a*(2*A - C)*sqrt(sec(c + d*x))*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (C*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 4, (2*sqrt(a)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a*A*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 3, (2*a*(7*A + 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 4, (2*a*A*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*a*(24*A + 35*C)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (4*a*(24*A + 35*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 5, (2*a*A*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (2*a*(16*A + 21*C)*sin(c + d*x))/(105*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (8*a*(16*A + 21*C)*sin(c + d*x))/(315*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a*(16*A + 21*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2))]

    @test_int [sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 7, (a^(3/2)*(176*A + 133*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^2*(176*A + 133*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^2*(176*A + 133*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(80*A + 67*C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(240*d*sqrt(a + a*sec(c + d*x))) + (3*a*C*sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d) + (C*sec(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (a^(3/2)*(112*A + 75*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^2*(112*A + 75*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^2*(16*A + 13*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(32*d*sqrt(a + a*sec(c + d*x))) + (a*C*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(8*d) + (C*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]
    @test_int [sec(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 5, (a^(3/2)*(24*A + 11*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^2*(24*A + 19*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a*C*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (C*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(1/2), x, 5, (a^(3/2)*(8*A + 7*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^2*(8*A - 5*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (3*a*C*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (C*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d)]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 5, (3*a^(3/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a^2*(8*A - 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) - (a*(2*A - 3*C)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 5, (2*a^(3/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^2*(4*A + 5*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(5*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 4, (8*a^2*(19*A + 35*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(19*A + 35*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (6*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 5, (2*a^2*(52*A + 63*C)*sin(c + d*x))/(315*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*a^2*(136*A + 189*C)*sin(c + d*x))/(315*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (4*a^2*(136*A + 189*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(21*d*sec(c + d*x)^(5/2)) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(11/2), x, 6, (2*a^2*(28*A + 33*C)*sin(c + d*x))/(231*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (2*a^2*(112*A + 143*C)*sin(c + d*x))/(385*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (8*a^2*(112*A + 143*C)*sin(c + d*x))/(1155*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^2*(112*A + 143*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(1155*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(33*d*sec(c + d*x)^(7/2)) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]

    @test_int [sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 8, (a^(5/2)*(1304*A + 1015*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(512*d) + (a^3*(1304*A + 1015*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(512*d*sqrt(a + a*sec(c + d*x))) + (a^3*(1304*A + 1015*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(768*d*sqrt(a + a*sec(c + d*x))) + (a^3*(136*A + 109*C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(24*A + 23*C)*sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(96*d) + (a*C*sec(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d) + (C*sec(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(6*d)]
    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(400*A + 283*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^3*(400*A + 283*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^3*(1040*A + 787*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(960*d*sqrt(a + a*sec(c + d*x))) + (a^2*(80*A + 79*C)*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(240*d) + (a*C*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(8*d) + (C*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [sec(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(304*A + 163*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^3*(432*A + 299*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(16*A + 17*C)*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(32*d) + (5*a*C*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d) + (C*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d)]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(1/2), x, 6, (5*a^(5/2)*(8*A + 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^3*(24*A - 49*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a^2*(24*A + 31*C)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d) + (5*a*C*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d) + (C*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 6, (a^(5/2)*(8*A + 19*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^3*(56*A - 27*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) - (a^2*(8*A - 21*C)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(12*d) - (a*(4*A - 3*C)*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(6*d) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 6, (5*a^(5/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a^3*(64*A + 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) - (a^2*(16*A - 15*C)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d) + (2*a*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 6, (2*a^(5/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^3*(32*A + 49*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(21*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(8*A + 7*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*a*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(7*d*sec(c + d*x)^(3/2)) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 5, (64*a^3*(13*A + 21*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(13*A + 21*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(315*d*sqrt(sec(c + d*x))) + (2*a*(13*A + 21*C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(105*d*sec(c + d*x)^(3/2)) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (10*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(11/2), x, 6, (2*a^3*(232*A + 297*C)*sin(c + d*x))/(693*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*a^3*(568*A + 759*C)*sin(c + d*x))/(693*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (4*a^3*(568*A + 759*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(32*A + 33*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(231*d*sec(c + d*x)^(5/2)) + (10*a*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2)) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/sec(c + d*x)^(13/2), x, 7, (2*a^3*(2224*A + 2717*C)*sin(c + d*x))/(9009*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (2*a^3*(8368*A + 10439*C)*sin(c + d*x))/(15015*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (8*a^3*(8368*A + 10439*C)*sin(c + d*x))/(45045*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^3*(8368*A + 10439*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(45045*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(136*A + 143*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(1287*d*sec(c + d*x)^(7/2)) + (10*a*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(143*d*sec(c + d*x)^(9/2)) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(13*d*sec(c + d*x)^(11/2))]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [(sec(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 8, -(((8*A + 9*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*sqrt(a)*d)) + (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + ((8*A + 7*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) - (C*sec(c + d*x)^(5/2)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(7/2)*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 7, ((8*A + 7*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*sqrt(a)*d) - (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - (C*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(5/2)*sin(c + d*x))/(2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(sec(c + d*x))*(A + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 6, -((C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d)) + (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (C*sec(c + d*x)^(3/2)*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))), x, 6, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) - (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*A*sqrt(sec(c + d*x))*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))), x, 4, (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*A*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - (2*A*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))), x, 5, -((sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (2*A*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) - (2*A*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*(13*A + 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))), x, 6, (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*A*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) - (2*A*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*(31*A + 35*C)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - (2*(43*A + 35*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [(sec(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 7, -((3*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d)) + ((A + 9*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((A + 3*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(sec(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 6, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) + ((3*A - 5*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)), x, 4, -(((7*A - C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d)) - ((A + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((5*A + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)), x, 5, ((11*A + 3*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sin(c + d*x))/(2*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((7*A + 3*C)*sin(c + d*x))/(6*a*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((19*A + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(6*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)), x, 6, -(((15*A + 7*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d)) - ((A + C)*sin(c + d*x))/(2*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)) + ((9*A + 5*C)*sin(c + d*x))/(10*a*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) - ((13*A + 5*C)*sin(c + d*x))/(10*a*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((49*A + 25*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*a*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [(sec(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 8, -((5*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d)) + ((3*A + 115*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((A - 15*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((3*A + 35*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 7, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) + ((5*A - 43*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((5*A - 11*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(sqrt(sec(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 4, ((19*A + 3*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((9*A - 7*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)), x, 5, -((5*(15*A - C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d)) - ((A + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((13*A - 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((49*A + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)), x, 6, ((163*A + 19*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sin(c + d*x))/(4*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)) - ((17*A + C)*sin(c + d*x))/(16*a*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + (5*(19*A + 3*C)*sin(c + d*x))/(48*a^2*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((299*A + 27*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(48*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)), x, 7, -(((283*A + 75*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d)) - ((A + C)*sin(c + d*x))/(4*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)) - ((21*A + 5*C)*sin(c + d*x))/(16*a*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)) + ((157*A + 45*C)*sin(c + d*x))/(80*a^2*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) - ((787*A + 195*C)*sin(c + d*x))/(240*a^2*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((2671*A + 735*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(240*a^2*d*sqrt(a + a*sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+a*sec(e+f*x))^(m/3)*(A+C*sec(e+f*x)^2)=#

    @test_int [(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^(2/3), x, 10, (3*C*(a + a*sec(c + d*x))^(2/3)*tan(c + d*x))/(5*d) + (3*sqrt(2)*A*AppellF1(7/6, 1/2, 1, 13/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(2/3)*tan(c + d*x))/(7*d*sqrt(1 - sec(c + d*x))) + (3*C*(a + a*sec(c + d*x))^(2/3)*tan(c + d*x))/(5*d*(1 + sec(c + d*x))) - (3^(3/4)*C*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(5*2^(1/3)*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(1/3), x, 9, (3*C*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(1/3)) + (3*sqrt(2)*A*AppellF1(1/6, 1/2, 1, 7/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*tan(c + d*x))/(d*sqrt(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)) + (3^(3/4)*C*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(2*2^(1/3)*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(4/3), x, 9, -((3*(A + C)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^(4/3))) + (3*sqrt(2)*A*AppellF1(1/6, 1/2, 1, 7/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*tan(c + d*x))/(a*d*sqrt(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)) + (3^(3/4)*(A - 4*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(5*2^(1/3)*a*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(7/3), x, 10, -((3*(A + C)*tan(c + d*x))/(11*d*(a + a*sec(c + d*x))^(7/3))) - (3*(4*A - 7*C)*tan(c + d*x))/(55*a^2*d*(1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)) - (3*sqrt(2)*A*AppellF1(-(5/6), 1/2, 1, 1/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*tan(c + d*x))/(5*a^2*d*sqrt(1 - sec(c + d*x))*(1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)) + (3^(3/4)*(4*A - 7*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(55*2^(1/3)*a^2*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]

    @test_int [(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^(4/3), x, 12, (3*a*C*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(7*d) + (3*sqrt(2)*a*A*AppellF1(11/6, 1/2, 1, 17/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*(1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(11*d*sqrt(1 - sec(c + d*x))) + (3*C*(a + a*sec(c + d*x))^(4/3)*tan(c + d*x))/(7*d) - (15*(1 + sqrt(3))*a*C*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(7*d*(1 + sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))) + (15*2^(1/3)*3^(1/4)*a*C*Elliptic.E(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(7*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2))) + (5*3^(3/4)*(1 - sqrt(3))*a*C*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(7*2^(2/3)*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^(1/3), x, 11, (3*C*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*d) + (3*sqrt(2)*A*AppellF1(5/6, 1/2, 1, 11/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(5*d*sqrt(1 - sec(c + d*x))) - (3*(1 + sqrt(3))*C*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*d*(1 + sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))) + (3*3^(1/4)*C*Elliptic.E(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(2*2^(2/3)*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2))) + (3^(3/4)*(1 - sqrt(3))*C*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(4*2^(2/3)*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(2/3), x, 11, -((3*(A + C)*tan(c + d*x))/(d*(a + a*sec(c + d*x))^(2/3))) + (3*sqrt(2)*A*AppellF1(5/6, 1/2, 1, 11/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(5*a*d*sqrt(1 - sec(c + d*x))) - (3*(1 + sqrt(3))*(A + 2*C)*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(a*d*(1 + sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))) + (3*2^(1/3)*3^(1/4)*(A + 2*C)*Elliptic.E(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(a*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2))) + (3^(3/4)*(1 - sqrt(3))*(A + 2*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(2^(2/3)*a*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/3), x, 12, -((3*(A + C)*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^(5/3))) - (3*(2*A - 5*C)*tan(c + d*x))/(7*a*d*(a + a*sec(c + d*x))^(2/3)) - (3*sqrt(2)*A*AppellF1(-(1/6), 1/2, 1, 5/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*tan(c + d*x))/(a*d*sqrt(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(2/3)) - (3*(1 + sqrt(3))*(2*A - 5*C)*(1 + sec(c + d*x))^(1/3)*tan(c + d*x))/(7*a*d*(a + a*sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))) + (3*2^(1/3)*3^(1/4)*(2*A - 5*C)*Elliptic.E(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(7*a*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2))) + (3^(3/4)*(1 - sqrt(3))*(2*A - 5*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(7*2^(2/3)*a*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^n*(a+a*sec(e+f*x))^m*(A+C*sec(e+f*x)^2)*with*m*and/or*n*symbolic=#

    @test_int [sec(c + d*x)^m*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^n, x, 8, (C*sec(c + d*x)^(1 + m)*(a + a*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + m + n)) + (2^(3/2 + n)*C*n*AppellF1(1/2, 1 - m, -(1/2) - n, 3/2, 1 - sec(c + d*x), (1/2)*(1 - sec(c + d*x)))*(1 + sec(c + d*x))^(-(1/2) - n)*(a + a*sec(c + d*x))^n*tan(c + d*x))/(d*(1 + m + n)) + (2^(1/2 + n)*(C*(m - n) + A*(1 + m + n))*AppellF1(1/2, 1 - m, 1/2 - n, 3/2, 1 - sec(c + d*x), (1/2)*(1 - sec(c + d*x)))*(1 + sec(c + d*x))^(-(1/2) - n)*(a + a*sec(c + d*x))^n*tan(c + d*x))/(d*(1 + m + n))]

    @test_int [sec(c + d*x)^(-n - 1)*(A + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^n, x, 8, (A*(a + a*sec(c + d*x))^n*sin(c + d*x))/(sec(c + d*x)^n*(d*(1 + n))) - ((C - A*n + C*n)*HypergeometricFunctions._₂F₁(1/2 - n, -n, 1 - n, -((2*sec(c + d*x))/(1 - sec(c + d*x))))*sec(c + d*x)^(1 - n)*((1 + sec(c + d*x))/(1 - sec(c + d*x)))^(1/2 - n)*(a + a*sec(c + d*x))^n*sin(c + d*x))/(d*n*(1 + n)*(1 + sec(c + d*x))) + (2^(3/2 + n)*C*AppellF1(1/2, 1 + n, -(1/2) - n, 3/2, 1 - sec(c + d*x), (1/2)*(1 - sec(c + d*x)))*(1 + sec(c + d*x))^(-(1/2) - n)*(a + a*sec(c + d*x))^n*tan(c + d*x))/d]

    @test_int [sec(c + d*x)^(-1 - n)*(a + a*sec(c + d*x))^n*(A + C*sec(c + d*x)^2) + (((-a)*A*n - a*C*(1 + n)*sec(c + d*x))*(a + a*sec(c + d*x))^n)/(sec(c + d*x)^n*(a*(1 + n))), x, 16, (A*(a + a*sec(c + d*x))^n*sin(c + d*x))/(sec(c + d*x)^n*(d*(1 + n)))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^n*(a+a*sec(e+f*x))^m*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+a*sec(e+f*x))^m*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 7, (a*(4*B + 3*C)*atanh(sin(c + d*x)))/(8*d) + (a*(B + C)*tan(c + d*x))/d + (a*(4*B + 3*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (a*C*sec(c + d*x)^3*tan(c + d*x))/(4*d) + (a*(B + C)*tan(c + d*x)^3)/(3*d)]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 7, (a*(B + C)*atanh(sin(c + d*x)))/(2*d) + (a*(3*B + 2*C)*tan(c + d*x))/(3*d) + (a*(B + C)*sec(c + d*x)*tan(c + d*x))/(2*d) + (a*C*sec(c + d*x)^2*tan(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 5, (a*(2*B + C)*atanh(sin(c + d*x)))/(2*d) + (a*(B + C)*tan(c + d*x))/d + (a*C*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 5, a*B*x + (a*(B + C)*atanh(sin(c + d*x)))/d + (a*C*tan(c + d*x))/d]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 4, a*(B + C)*x + (a*C*atanh(sin(c + d*x)))/d + (a*B*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 5, (1/2)*a*(B + 2*C)*x + (a*(B + C)*sin(c + d*x))/d + (a*B*cos(c + d*x)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 6, (1/2)*a*(B + C)*x + (a*(2*B + 3*C)*sin(c + d*x))/(3*d) + (a*(B + C)*cos(c + d*x)*sin(c + d*x))/(2*d) + (a*B*cos(c + d*x)^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^5*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x)), x, 7, (1/8)*a*(3*B + 4*C)*x + (a*(B + C)*sin(c + d*x))/d + (a*(3*B + 4*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*B*cos(c + d*x)^3*sin(c + d*x))/(4*d) - (a*(B + C)*sin(c + d*x)^3)/(3*d)]

    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 8, (a^2*(7*B + 6*C)*atanh(sin(c + d*x)))/(8*d) + (a^2*(10*B + 9*C)*tan(c + d*x))/(5*d) + (a^2*(7*B + 6*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (a^2*(5*B + 6*C)*sec(c + d*x)^3*tan(c + d*x))/(20*d) + (C*sec(c + d*x)^3*(a^2 + a^2*sec(c + d*x))*tan(c + d*x))/(5*d) + (a^2*(10*B + 9*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 8, (a^2*(8*B + 7*C)*atanh(sin(c + d*x)))/(8*d) + (a^2*(8*B + 7*C)*tan(c + d*x))/(6*d) + (a^2*(8*B + 7*C)*sec(c + d*x)*tan(c + d*x))/(24*d) + ((4*B - C)*(a + a*sec(c + d*x))^2*tan(c + d*x))/(12*d) + (C*(a + a*sec(c + d*x))^3*tan(c + d*x))/(4*a*d)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 7, (a^2*(3*B + 2*C)*atanh(sin(c + d*x)))/(2*d) + (2*a^2*(3*B + 2*C)*tan(c + d*x))/(3*d) + (a^2*(3*B + 2*C)*sec(c + d*x)*tan(c + d*x))/(6*d) + (C*(a + a*sec(c + d*x))^2*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 6, a^2*B*x + (a^2*(4*B + 3*C)*atanh(sin(c + d*x)))/(2*d) + (a^2*(2*B + 3*C)*tan(c + d*x))/(2*d) + (C*(a^2 + a^2*sec(c + d*x))*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 5, a^2*(2*B + C)*x + (a^2*(B + 2*C)*atanh(sin(c + d*x)))/d + (a^2*(B - C)*sin(c + d*x))/d + (C*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 5, (1/2)*a^2*(3*B + 4*C)*x + (a^2*C*atanh(sin(c + d*x)))/d + (a^2*(3*B + 2*C)*sin(c + d*x))/(2*d) + (B*cos(c + d*x)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 6, (1/2)*a^2*(2*B + 3*C)*x + (2*a^2*(2*B + 3*C)*sin(c + d*x))/(3*d) + (a^2*(2*B + 3*C)*cos(c + d*x)*sin(c + d*x))/(6*d) + (B*cos(c + d*x)^2*(a + a*sec(c + d*x))^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^5*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 7, (1/8)*a^2*(7*B + 8*C)*x + (a^2*(4*B + 5*C)*sin(c + d*x))/(3*d) + (a^2*(7*B + 8*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a^2*(5*B + 4*C)*cos(c + d*x)^2*sin(c + d*x))/(12*d) + (B*cos(c + d*x)^3*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^6*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^2, x, 8, (1/8)*a^2*(6*B + 7*C)*x + (a^2*(9*B + 10*C)*sin(c + d*x))/(5*d) + (a^2*(6*B + 7*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a^2*(6*B + 5*C)*cos(c + d*x)^3*sin(c + d*x))/(20*d) + (B*cos(c + d*x)^4*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(5*d) - (a^2*(9*B + 10*C)*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 12, (a^3*(15*B + 13*C)*atanh(sin(c + d*x)))/(8*d) + (a^3*(15*B + 13*C)*tan(c + d*x))/(5*d) + (3*a^3*(15*B + 13*C)*sec(c + d*x)*tan(c + d*x))/(40*d) + ((5*B - C)*(a + a*sec(c + d*x))^3*tan(c + d*x))/(20*d) + (C*(a + a*sec(c + d*x))^4*tan(c + d*x))/(5*a*d) + (a^3*(15*B + 13*C)*tan(c + d*x)^3)/(60*d)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 11, (5*a^3*(4*B + 3*C)*atanh(sin(c + d*x)))/(8*d) + (a^3*(4*B + 3*C)*tan(c + d*x))/d + (3*a^3*(4*B + 3*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (C*(a + a*sec(c + d*x))^3*tan(c + d*x))/(4*d) + (a^3*(4*B + 3*C)*tan(c + d*x)^3)/(12*d)]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 7, a^3*B*x + (a^3*(7*B + 5*C)*atanh(sin(c + d*x)))/(2*d) + (5*a^3*(B + C)*tan(c + d*x))/(2*d) + (a*C*(a + a*sec(c + d*x))^2*tan(c + d*x))/(3*d) + ((3*B + 5*C)*(a^3 + a^3*sec(c + d*x))*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 6, a^3*(3*B + C)*x + (a^3*(6*B + 7*C)*atanh(sin(c + d*x)))/(2*d) - (5*a^3*C*sin(c + d*x))/(2*d) + (a*C*(a + a*sec(c + d*x))^2*sin(c + d*x))/(2*d) + ((B + 2*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 6, (1/2)*a^3*(7*B + 6*C)*x + (a^3*(B + 3*C)*atanh(sin(c + d*x)))/d + (5*a^3*B*sin(c + d*x))/(2*d) + (a*B*cos(c + d*x)*(a + a*sec(c + d*x))^2*sin(c + d*x))/(2*d) - ((B - 2*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 6, (1/2)*a^3*(5*B + 7*C)*x + (a^3*C*atanh(sin(c + d*x)))/d + (5*a^3*(B + C)*sin(c + d*x))/(2*d) + (a*B*cos(c + d*x)^2*(a + a*sec(c + d*x))^2*sin(c + d*x))/(3*d) + ((5*B + 3*C)*cos(c + d*x)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^5*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 9, (5/8)*a^3*(3*B + 4*C)*x + (a^3*(3*B + 4*C)*sin(c + d*x))/d + (3*a^3*(3*B + 4*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (B*cos(c + d*x)^3*(a + a*sec(c + d*x))^3*sin(c + d*x))/(4*d) - (a^3*(3*B + 4*C)*sin(c + d*x)^3)/(12*d)]
    @test_int [cos(c + d*x)^6*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 8, (1/8)*a^3*(13*B + 15*C)*x + (a^3*(38*B + 45*C)*sin(c + d*x))/(15*d) + (a^3*(13*B + 15*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a^3*(43*B + 45*C)*cos(c + d*x)^2*sin(c + d*x))/(60*d) + (a*B*cos(c + d*x)^4*(a + a*sec(c + d*x))^2*sin(c + d*x))/(5*d) + ((7*B + 5*C)*cos(c + d*x)^3*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(20*d)]
    @test_int [cos(c + d*x)^7*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^3, x, 9, (1/16)*a^3*(23*B + 26*C)*x + (a^3*(17*B + 19*C)*sin(c + d*x))/(5*d) + (a^3*(23*B + 26*C)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^3*(21*B + 22*C)*cos(c + d*x)^3*sin(c + d*x))/(40*d) + (a*B*cos(c + d*x)^5*(a + a*sec(c + d*x))^2*sin(c + d*x))/(6*d) + ((4*B + 3*C)*cos(c + d*x)^4*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d) - (a^3*(17*B + 19*C)*sin(c + d*x)^3)/(15*d)]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 7, (3*(B - C)*atanh(sin(c + d*x)))/(2*a*d) - ((3*B - 4*C)*tan(c + d*x))/(a*d) + (3*(B - C)*sec(c + d*x)*tan(c + d*x))/(2*a*d) + ((B - C)*sec(c + d*x)^3*tan(c + d*x))/(d*(a + a*sec(c + d*x))) - ((3*B - 4*C)*tan(c + d*x)^3)/(3*a*d)]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 7, -(((2*B - 3*C)*atanh(sin(c + d*x)))/(2*a*d)) + (2*(B - C)*tan(c + d*x))/(a*d) - ((2*B - 3*C)*sec(c + d*x)*tan(c + d*x))/(2*a*d) + ((B - C)*sec(c + d*x)^2*tan(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 6, ((B - C)*atanh(sin(c + d*x)))/(a*d) + (C*tan(c + d*x))/(a*d) - ((B - C)*tan(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 4, (C*atanh(sin(c + d*x)))/(a*d) + ((B - C)*tan(c + d*x))/(a*d*(1 + sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 3, (B*x)/a - ((B - C)*tan(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 5, -(((B - C)*x)/a) + ((2*B - C)*sin(c + d*x))/(a*d) - ((B - C)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 6, ((3*B - 2*C)*x)/(2*a) - (2*(B - C)*sin(c + d*x))/(a*d) + ((3*B - 2*C)*cos(c + d*x)*sin(c + d*x))/(2*a*d) - ((B - C)*cos(c + d*x)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x)), x, 7, -((3*(B - C)*x)/(2*a)) + ((4*B - 3*C)*sin(c + d*x))/(a*d) - (3*(B - C)*cos(c + d*x)*sin(c + d*x))/(2*a*d) - ((B - C)*cos(c + d*x)^2*sin(c + d*x))/(d*(a + a*sec(c + d*x))) - ((4*B - 3*C)*sin(c + d*x)^3)/(3*a*d)]

    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 8, -(((4*B - 7*C)*atanh(sin(c + d*x)))/(2*a^2*d)) + (2*(5*B - 8*C)*tan(c + d*x))/(3*a^2*d) - ((4*B - 7*C)*sec(c + d*x)*tan(c + d*x))/(2*a^2*d) + ((5*B - 8*C)*sec(c + d*x)^2*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) + ((B - C)*sec(c + d*x)^3*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 7, ((B - 2*C)*atanh(sin(c + d*x)))/(a^2*d) - ((B - 4*C)*tan(c + d*x))/(3*a^2*d) - ((B - 2*C)*tan(c + d*x))/(a^2*d*(1 + sec(c + d*x))) + ((B - C)*sec(c + d*x)^2*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 5, (C*atanh(sin(c + d*x)))/(a^2*d) + ((2*B - 5*C)*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((B - C)*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 3, ((B + 2*C)*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) + ((B - C)*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 4, (B*x)/a^2 - ((4*B - C)*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((B - C)*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 6, -(((2*B - C)*x)/a^2) + (2*(5*B - 2*C)*sin(c + d*x))/(3*a^2*d) - ((2*B - C)*sin(c + d*x))/(a^2*d*(1 + sec(c + d*x))) - ((B - C)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 7, ((7*B - 4*C)*x)/(2*a^2) - (2*(8*B - 5*C)*sin(c + d*x))/(3*a^2*d) + ((7*B - 4*C)*cos(c + d*x)*sin(c + d*x))/(2*a^2*d) - ((8*B - 5*C)*cos(c + d*x)*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((B - C)*cos(c + d*x)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 8, -(((10*B - 7*C)*x)/(2*a^2)) + (4*(3*B - 2*C)*sin(c + d*x))/(a^2*d) - ((10*B - 7*C)*cos(c + d*x)*sin(c + d*x))/(2*a^2*d) - ((10*B - 7*C)*cos(c + d*x)^2*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((B - C)*cos(c + d*x)^2*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2) - (4*(3*B - 2*C)*sin(c + d*x)^3)/(3*a^2*d)]

    @test_int [sec(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 9, -(((6*B - 13*C)*atanh(sin(c + d*x)))/(2*a^3*d)) + (8*(9*B - 19*C)*tan(c + d*x))/(15*a^3*d) - ((6*B - 13*C)*sec(c + d*x)*tan(c + d*x))/(2*a^3*d) + ((B - C)*sec(c + d*x)^4*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((6*B - 11*C)*sec(c + d*x)^3*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + (4*(9*B - 19*C)*sec(c + d*x)^2*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 8, ((B - 3*C)*atanh(sin(c + d*x)))/(a^3*d) - ((7*B - 27*C)*tan(c + d*x))/(15*a^3*d) + ((B - C)*sec(c + d*x)^3*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((4*B - 9*C)*sec(c + d*x)^2*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((B - 3*C)*tan(c + d*x))/(d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 6, (C*atanh(sin(c + d*x)))/(a^3*d) + ((B - C)*sec(c + d*x)^2*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((2*B - 7*C)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((4*B - 29*C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 4, -(((B - C)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3)) + ((3*B - 8*C)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((3*B + 7*C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 4, ((B - C)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((2*B + 3*C)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((2*B + 3*C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 5, (B*x)/a^3 - ((B - C)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((7*B - 2*C)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - (2*(11*B - C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 7, -(((3*B - C)*x)/a^3) + (2*(36*B - 11*C)*sin(c + d*x))/(15*a^3*d) - ((B - C)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((9*B - 4*C)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((3*B - C)*sin(c + d*x))/(d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 8, ((13*B - 6*C)*x)/(2*a^3) - (8*(19*B - 9*C)*sin(c + d*x))/(15*a^3*d) + ((13*B - 6*C)*cos(c + d*x)*sin(c + d*x))/(2*a^3*d) - ((B - C)*cos(c + d*x)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((11*B - 6*C)*cos(c + d*x)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - (4*(19*B - 9*C)*cos(c + d*x)*sin(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+a*sec(e+f*x))^(m/2)*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^4*sqrt(a + a*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (32*a*(11*B + 10*C)*tan(c + d*x))/(495*d*sqrt(a + a*sec(c + d*x))) + (16*a*(11*B + 10*C)*sec(c + d*x)^3*tan(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a*(11*B + 10*C)*sec(c + d*x)^4*tan(c + d*x))/(99*d*sqrt(a + a*sec(c + d*x))) + (2*a*C*sec(c + d*x)^5*tan(c + d*x))/(11*d*sqrt(a + a*sec(c + d*x))) - (64*(11*B + 10*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3465*d) + (32*(11*B + 10*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(1155*a*d)]
    @test_int [sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (4*a*(9*B + 8*C)*tan(c + d*x))/(45*d*sqrt(a + a*sec(c + d*x))) + (2*a*(9*B + 8*C)*sec(c + d*x)^3*tan(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) + (2*a*C*sec(c + d*x)^4*tan(c + d*x))/(9*d*sqrt(a + a*sec(c + d*x))) - (8*(9*B + 8*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (4*(9*B + 8*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*a*d)]
    @test_int [sec(c + d*x)^2*sqrt(a + a*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (2*a*(7*B + 6*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a*C*sec(c + d*x)^3*tan(c + d*x))/(7*d*sqrt(a + a*sec(c + d*x))) - (4*(7*B + 6*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*(7*B + 6*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*a*d)]
    @test_int [sec(c + d*x)^1*sqrt(a + a*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 4, (2*a*(5*B + 7*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*(5*B - 2*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*a*d)]
    @test_int [sec(c + d*x)^0*sqrt(a + a*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 3, (2*a*(3*B + C)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*sqrt(a + a*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (2*sqrt(a)*B*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a*C*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 4, (sqrt(a)*(B + 2*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a*B*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (sqrt(a)*(3*B + 4*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a*(3*B + 4*C)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (a*B*cos(c + d*x)*sin(c + d*x))/(2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^4*sqrt(a + a*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (sqrt(a)*(5*B + 6*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a*(5*B + 6*C)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a*(5*B + 6*C)*cos(c + d*x)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (a*B*cos(c + d*x)^2*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (4*a^2*(187*B + 168*C)*tan(c + d*x))/(495*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(187*B + 168*C)*sec(c + d*x)^3*tan(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(11*B + 12*C)*sec(c + d*x)^4*tan(c + d*x))/(99*d*sqrt(a + a*sec(c + d*x))) - (8*a*(187*B + 168*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3465*d) + (2*a*C*sec(c + d*x)^4*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(11*d) + (4*(187*B + 168*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(1155*d)]
    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*a^2*(39*B + 34*C)*tan(c + d*x))/(45*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(9*B + 10*C)*sec(c + d*x)^3*tan(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) - (4*a*(39*B + 34*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*a*C*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(9*d) + (2*(39*B + 34*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (8*a^2*(21*B + 19*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(21*B + 19*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*(7*B - 2*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*C*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*a*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 4, (8*a^2*(5*B + 3*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a*(5*B + 3*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*a^(3/2)*B*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^2*(3*B + 4*C)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*a*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (a^(3/2)*(3*B + 2*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a^2*(B - 2*C)*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (2*a*C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (a^(3/2)*(7*B + 12*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^2*(5*B + 4*C)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (a*B*cos(c + d*x)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(3/2)*(11*B + 14*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^2*(11*B + 14*C)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a^2*(7*B + 6*C)*cos(c + d*x)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (a*B*cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(3/2)*(75*B + 88*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^2*(75*B + 88*C)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^2*(75*B + 88*C)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a^2*(9*B + 8*C)*cos(c + d*x)^2*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a*B*cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d)]

    @test_int [sec(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (4*a^3*(4615*B + 4184*C)*tan(c + d*x))/(6435*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(4615*B + 4184*C)*sec(c + d*x)^3*tan(c + d*x))/(9009*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(299*B + 280*C)*sec(c + d*x)^4*tan(c + d*x))/(1287*d*sqrt(a + a*sec(c + d*x))) - (8*a^2*(4615*B + 4184*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(45045*d) + (2*a^2*(13*B + 16*C)*sec(c + d*x)^4*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(143*d) + (4*a*(4615*B + 4184*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(15015*d) + (2*a*C*sec(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(13*d)]
    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*a^3*(803*B + 710*C)*tan(c + d*x))/(495*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(209*B + 194*C)*sec(c + d*x)^3*tan(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) - (4*a^2*(803*B + 710*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3465*d) + (2*a^2*(11*B + 14*C)*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(99*d) + (2*a*(803*B + 710*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(1155*d) + (2*a*C*sec(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(11*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (64*a^3*(15*B + 13*C)*tan(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(15*B + 13*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*a*(15*B + 13*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*d) + (2*(9*B - 2*C)*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*d) + (2*C*(a + a*sec(c + d*x))^(7/2)*tan(c + d*x))/(9*a*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (64*a^3*(7*B + 5*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(7*B + 5*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*a*(7*B + 5*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*C*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*a^(5/2)*B*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^3*(35*B + 32*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(5*B + 8*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*a*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(5*B + 2*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d - (a^3*(3*B + 14*C)*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(B + 2*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/d + (2*a*C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(19*B + 20*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^3*(9*B - 4*C)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) - (a^2*(B - 4*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d) + (a*B*cos(c + d*x)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(25*B + 38*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^3*(49*B + 54*C)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a^2*(3*B + 2*C)*cos(c + d*x)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*B*cos(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(163*B + 200*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^3*(163*B + 200*C)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^3*(95*B + 104*C)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a^2*(11*B + 8*C)*cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d) + (a*B*cos(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^6*(a + a*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (a^(5/2)*(283*B + 326*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^3*(283*B + 326*C)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^3*(283*B + 326*C)*cos(c + d*x)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^3*(157*B + 170*C)*cos(c + d*x)^2*sin(c + d*x))/(240*d*sqrt(a + a*sec(c + d*x))) + (a^2*(13*B + 10*C)*cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d) + (a*B*cos(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d)]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [sec(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 8, (sqrt(2)*(B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - (4*(111*B - 143*C)*tan(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) - (2*(3*B - 19*C)*sec(c + d*x)^2*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*(9*B - C)*sec(c + d*x)^3*tan(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) + (2*C*sec(c + d*x)^4*tan(c + d*x))/(9*d*sqrt(a + a*sec(c + d*x))) + (2*(93*B - 29*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*a*d)]
    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 7, -((sqrt(2)*(B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (4*(49*B - 37*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*(7*B - C)*sec(c + d*x)^2*tan(c + d*x))/(35*d*sqrt(a + a*sec(c + d*x))) + (2*C*sec(c + d*x)^3*tan(c + d*x))/(7*d*sqrt(a + a*sec(c + d*x))) - (2*(7*B - 31*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*a*d)]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 6, (sqrt(2)*(B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - (4*(5*B - 7*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*C*sec(c + d*x)^2*tan(c + d*x))/(5*d*sqrt(a + a*sec(c + d*x))) + (2*(5*B - C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*a*d)]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 5, -((sqrt(2)*(B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (2*(3*B - 2*C)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*a*d)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 4, (sqrt(2)*(B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*C*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 6, (2*B*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) - (sqrt(2)*(B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 7, -(((B - 2*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d)) + (sqrt(2)*(B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (B*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 8, ((7*B - 4*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*sqrt(a)*d) - (sqrt(2)*(B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - ((B - 4*C)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (B*cos(c + d*x)*sin(c + d*x))/(2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 9, -((9*B - 14*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*sqrt(a)*d) + (sqrt(2)*(B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + ((7*B - 2*C)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) - ((B - 6*C)*cos(c + d*x)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (B*cos(c + d*x)^2*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 8, -((15*B - 19*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) + ((B - C)*sec(c + d*x)^4*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((651*B - 799*C)*tan(c + d*x))/(105*a*d*sqrt(a + a*sec(c + d*x))) + ((63*B - 67*C)*sec(c + d*x)^2*tan(c + d*x))/(70*a*d*sqrt(a + a*sec(c + d*x))) - ((7*B - 11*C)*sec(c + d*x)^3*tan(c + d*x))/(14*a*d*sqrt(a + a*sec(c + d*x))) - ((273*B - 397*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(210*a^2*d)]
    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 7, ((11*B - 15*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) + ((B - C)*sec(c + d*x)^3*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((65*B - 93*C)*tan(c + d*x))/(15*a*d*sqrt(a + a*sec(c + d*x))) - ((5*B - 9*C)*sec(c + d*x)^2*tan(c + d*x))/(10*a*d*sqrt(a + a*sec(c + d*x))) + ((35*B - 39*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(30*a^2*d)]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 6, -((7*B - 11*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) + ((B - C)*sec(c + d*x)^2*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((9*B - 13*C)*tan(c + d*x))/(3*a*d*sqrt(a + a*sec(c + d*x))) - ((3*B - 7*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(6*a^2*d)]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 5, ((3*B - 7*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((B - C)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + (2*C*tan(c + d*x))/(a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 4, ((B + 3*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) + ((B - C)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 7, (2*B*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) - ((5*B - C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((B - C)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 8, -(((3*B - 2*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d)) + ((9*B - 5*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((B - C)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((3*B - C)*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 9, ((19*B - 12*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*a^(3/2)*d) - ((13*B - 9*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((B - C)*cos(c + d*x)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((7*B - 6*C)*sin(c + d*x))/(4*a*d*sqrt(a + a*sec(c + d*x))) + ((2*B - C)*cos(c + d*x)*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 8, ((163*B - 283*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) + ((B - C)*sec(c + d*x)^4*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((13*B - 21*C)*sec(c + d*x)^3*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((985*B - 1729*C)*tan(c + d*x))/(120*a^2*d*sqrt(a + a*sec(c + d*x))) - ((85*B - 157*C)*sec(c + d*x)^2*tan(c + d*x))/(80*a^2*d*sqrt(a + a*sec(c + d*x))) + ((475*B - 787*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(240*a^3*d)]
    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 7, -((75*B - 163*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) + ((B - C)*sec(c + d*x)^3*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((9*B - 17*C)*sec(c + d*x)^2*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((93*B - 197*C)*tan(c + d*x))/(24*a^2*d*sqrt(a + a*sec(c + d*x))) - ((39*B - 95*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(48*a^3*d)]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 6, ((19*B - 75*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) + ((B - C)*sec(c + d*x)^2*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((5*B - 13*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((B - 9*C)*tan(c + d*x))/(4*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 5, ((5*B + 19*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((B - C)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((5*B - 13*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 5, ((3*B + 5*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) + ((B - C)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((3*B + 5*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 8, (2*B*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) - ((43*B - 3*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((B - C)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((11*B - 3*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 9, -(((5*B - 2*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d)) + ((115*B - 43*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((B - C)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((15*B - 7*C)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((35*B - 11*C)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x)))]

    #= ::Subsection:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^(n/2)*(a+a*sec(e+f*x))^m*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsection:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^(n/2)*(a+a*sec(e+f*x))^(m/2)*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^n*(a+a*sec(e+f*x))^m*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+a*sec(e+f*x))^m*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^3*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a*(4*A + 3*(B + C))*atanh(sin(c + d*x)))/(8*d) + (a*(5*A + 5*B + 4*C)*tan(c + d*x))/(5*d) + (a*(4*A + 3*(B + C))*sec(c + d*x)*tan(c + d*x))/(8*d) + (a*(B + C)*sec(c + d*x)^3*tan(c + d*x))/(4*d) + (a*C*sec(c + d*x)^4*tan(c + d*x))/(5*d) + (a*(5*A + 5*B + 4*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a*(4*A + 4*B + 3*C)*atanh(sin(c + d*x)))/(8*d) + (a*(3*A + 2*(B + C))*tan(c + d*x))/(3*d) + (a*(4*A + 4*B + 3*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (a*(B + C)*sec(c + d*x)^2*tan(c + d*x))/(3*d) + (a*C*sec(c + d*x)^3*tan(c + d*x))/(4*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a*(2*A + B + C)*atanh(sin(c + d*x)))/(2*d) + (a*(3*A + 3*B + 2*C)*tan(c + d*x))/(3*d) + (a*(B + C)*sec(c + d*x)*tan(c + d*x))/(2*d) + (a*C*sec(c + d*x)^2*tan(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, a*A*x + (a*(2*A + 2*B + C)*atanh(sin(c + d*x)))/(2*d) + (a*(B + C)*tan(c + d*x))/d + (a*C*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, a*(A + B)*x + (a*(B + C)*atanh(sin(c + d*x)))/d + (a*A*sin(c + d*x))/d + (a*C*tan(c + d*x))/d]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (1/2)*a*(A + 2*(B + C))*x + (a*C*atanh(sin(c + d*x)))/d + (a*(A + B)*sin(c + d*x))/d + (a*A*cos(c + d*x)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (1/2)*a*(A + B + 2*C)*x + (a*(2*A + 3*(B + C))*sin(c + d*x))/(3*d) + (a*(A + B)*cos(c + d*x)*sin(c + d*x))/(2*d) + (a*A*cos(c + d*x)^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (1/8)*a*(3*A + 4*(B + C))*x + (a*(A + B + C)*sin(c + d*x))/d + (a*(3*A + 4*(B + C))*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*A*cos(c + d*x)^3*sin(c + d*x))/(4*d) - (a*(A + B)*sin(c + d*x)^3)/(3*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (1/8)*a*(3*(A + B) + 4*C)*x + (a*(4*A + 5*(B + C))*sin(c + d*x))/(5*d) + (a*(3*(A + B) + 4*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*(A + B)*cos(c + d*x)^3*sin(c + d*x))/(4*d) + (a*A*cos(c + d*x)^4*sin(c + d*x))/(5*d) - (a*(4*A + 5*(B + C))*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^3*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (a^2*(14*A + 12*B + 11*C)*atanh(sin(c + d*x)))/(16*d) + (a^2*(10*A + 9*B + 8*C)*tan(c + d*x))/(5*d) + (a^2*(14*A + 12*B + 11*C)*sec(c + d*x)*tan(c + d*x))/(16*d) + (a^2*(10*A + 12*B + 9*C)*sec(c + d*x)^3*tan(c + d*x))/(40*d) + (C*sec(c + d*x)^3*(a + a*sec(c + d*x))^2*tan(c + d*x))/(6*d) + ((3*B + C)*sec(c + d*x)^3*(a^2 + a^2*sec(c + d*x))*tan(c + d*x))/(15*d) + (a^2*(10*A + 9*B + 8*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (a^2*(8*A + 7*B + 6*C)*atanh(sin(c + d*x)))/(8*d) + (a^2*(8*A + 7*B + 6*C)*tan(c + d*x))/(6*d) + (a^2*(8*A + 7*B + 6*C)*sec(c + d*x)*tan(c + d*x))/(24*d) + ((20*A - 5*B + 6*C)*(a + a*sec(c + d*x))^2*tan(c + d*x))/(60*d) + (C*sec(c + d*x)^2*(a + a*sec(c + d*x))^2*tan(c + d*x))/(5*d) + ((5*B + 2*C)*(a + a*sec(c + d*x))^3*tan(c + d*x))/(20*a*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^2*(12*A + 8*B + 7*C)*atanh(sin(c + d*x)))/(8*d) + (a^2*(12*A + 8*B + 7*C)*tan(c + d*x))/(6*d) + (a^2*(12*A + 8*B + 7*C)*sec(c + d*x)*tan(c + d*x))/(24*d) + ((4*B - C)*(a + a*sec(c + d*x))^2*tan(c + d*x))/(12*d) + (C*(a + a*sec(c + d*x))^3*tan(c + d*x))/(4*a*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, a^2*A*x + (a^2*(4*A + 3*B + 2*C)*atanh(sin(c + d*x)))/(2*d) + (a^2*(2*A + 3*B + 2*C)*tan(c + d*x))/(2*d) + (C*(a + a*sec(c + d*x))^2*tan(c + d*x))/(3*d) + ((3*B + 2*C)*(a^2 + a^2*sec(c + d*x))*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, a^2*(2*A + B)*x + (a^2*(2*A + 4*B + 3*C)*atanh(sin(c + d*x)))/(2*d) + (A*(a + a*sec(c + d*x))^2*sin(c + d*x))/d - (a^2*(2*A - 2*B - 3*C)*tan(c + d*x))/(2*d) - ((2*A - C)*(a^2 + a^2*sec(c + d*x))*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (1/2)*a^2*(3*A + 4*B + 2*C)*x + (a^2*(B + 2*C)*atanh(sin(c + d*x)))/d + (a^2*(3*A + 2*B - 2*C)*sin(c + d*x))/(2*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^2*sin(c + d*x))/(2*d) - ((A - 2*C)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (1/2)*a^2*(2*A + 3*B + 4*C)*x + (a^2*C*atanh(sin(c + d*x)))/d + (a^2*(2*A + 3*B + 2*C)*sin(c + d*x))/(2*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^2*sin(c + d*x))/(3*d) + ((2*A + 3*B)*cos(c + d*x)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (1/8)*a^2*(7*A + 8*B + 12*C)*x + (a^2*(7*A + 8*B + 12*C)*sin(c + d*x))/(6*d) + (a^2*(7*A + 8*B + 12*C)*cos(c + d*x)*sin(c + d*x))/(24*d) + ((A + 2*B)*cos(c + d*x)^2*(a + a*sec(c + d*x))^2*sin(c + d*x))/(6*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^2*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (1/8)*a^2*(6*A + 7*B + 8*C)*x + (a^2*(18*A + 20*B + 25*C)*sin(c + d*x))/(15*d) + (a^2*(6*A + 7*B + 8*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a^2*(18*A + 25*B + 20*C)*cos(c + d*x)^2*sin(c + d*x))/(60*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^2*sin(c + d*x))/(5*d) + ((2*A + 5*B)*cos(c + d*x)^3*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(20*d)]
    @test_int [cos(c + d*x)^6*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (1/16)*a^2*(11*A + 12*B + 14*C)*x + (a^2*(8*A + 9*B + 10*C)*sin(c + d*x))/(5*d) + (a^2*(11*A + 12*B + 14*C)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^2*(9*A + 12*B + 10*C)*cos(c + d*x)^3*sin(c + d*x))/(40*d) + (A*cos(c + d*x)^5*(a + a*sec(c + d*x))^2*sin(c + d*x))/(6*d) + ((A + 3*B)*cos(c + d*x)^4*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(15*d) - (a^2*(8*A + 9*B + 10*C)*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^3*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (a^3*(26*A + 23*B + 21*C)*atanh(sin(c + d*x)))/(16*d) + (a^3*(133*A + 119*B + 108*C)*tan(c + d*x))/(35*d) + (a^3*(26*A + 23*B + 21*C)*sec(c + d*x)*tan(c + d*x))/(16*d) + (a^3*(154*A + 147*B + 129*C)*sec(c + d*x)^3*tan(c + d*x))/(280*d) + (C*sec(c + d*x)^3*(a + a*sec(c + d*x))^3*tan(c + d*x))/(7*d) + ((7*B + 3*C)*sec(c + d*x)^3*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(42*a*d) + ((3*A + 4*B + 3*C)*sec(c + d*x)^3*(a^3 + a^3*sec(c + d*x))*tan(c + d*x))/(15*d) + (a^3*(133*A + 119*B + 108*C)*tan(c + d*x)^3)/(105*d)]
    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 12, (a^3*(30*A + 26*B + 23*C)*atanh(sin(c + d*x)))/(16*d) + (a^3*(30*A + 26*B + 23*C)*tan(c + d*x))/(10*d) + (3*a^3*(30*A + 26*B + 23*C)*sec(c + d*x)*tan(c + d*x))/(80*d) + ((30*A - 6*B + 7*C)*(a + a*sec(c + d*x))^3*tan(c + d*x))/(120*d) + (C*sec(c + d*x)^2*(a + a*sec(c + d*x))^3*tan(c + d*x))/(6*d) + ((2*B + C)*(a + a*sec(c + d*x))^4*tan(c + d*x))/(10*a*d) + (a^3*(30*A + 26*B + 23*C)*tan(c + d*x)^3)/(120*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 11, (a^3*(20*A + 15*B + 13*C)*atanh(sin(c + d*x)))/(8*d) + (a^3*(20*A + 15*B + 13*C)*tan(c + d*x))/(5*d) + (3*a^3*(20*A + 15*B + 13*C)*sec(c + d*x)*tan(c + d*x))/(40*d) + ((5*B - C)*(a + a*sec(c + d*x))^3*tan(c + d*x))/(20*d) + (C*(a + a*sec(c + d*x))^4*tan(c + d*x))/(5*a*d) + (a^3*(20*A + 15*B + 13*C)*tan(c + d*x)^3)/(60*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, a^3*A*x + (a^3*(28*A + 20*B + 15*C)*atanh(sin(c + d*x)))/(8*d) + (5*a^3*(4*A + 4*B + 3*C)*tan(c + d*x))/(8*d) + (C*(a + a*sec(c + d*x))^3*tan(c + d*x))/(4*d) + ((4*B + 3*C)*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(12*a*d) + ((12*A + 20*B + 15*C)*(a^3 + a^3*sec(c + d*x))*tan(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, a^3*(3*A + B)*x + (a^3*(6*A + 7*B + 5*C)*atanh(sin(c + d*x)))/(2*d) + (A*(a + a*sec(c + d*x))^3*sin(c + d*x))/d + (5*a^3*(B + C)*tan(c + d*x))/(2*d) - ((3*A - C)*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(3*a*d) - ((6*A - 3*B - 5*C)*(a^3 + a^3*sec(c + d*x))*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (1/2)*a^3*(7*A + 6*B + 2*C)*x + (a^3*(2*A + 6*B + 7*C)*atanh(sin(c + d*x)))/(2*d) + (5*a^3*(A - C)*sin(c + d*x))/(2*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(2*d) - ((A - C)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*a*d) - ((A - 2*B - 4*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (1/2)*a^3*(5*A + 7*B + 6*C)*x + (a^3*(B + 3*C)*atanh(sin(c + d*x)))/d + (5*a^3*(A + B)*sin(c + d*x))/(2*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^3*sin(c + d*x))/(3*d) + ((A + B)*cos(c + d*x)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*a*d) - ((5*A + 3*B - 6*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (1/8)*a^3*(15*A + 20*B + 28*C)*x + (a^3*C*atanh(sin(c + d*x)))/d + (5*a^3*(3*A + 4*(B + C))*sin(c + d*x))/(8*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^3*sin(c + d*x))/(4*d) + ((3*A + 4*B)*cos(c + d*x)^2*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(12*a*d) + ((15*A + 20*B + 12*C)*cos(c + d*x)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (1/8)*a^3*(13*A + 15*B + 20*C)*x + (a^3*(13*A + 15*B + 20*C)*sin(c + d*x))/(5*d) + (3*a^3*(13*A + 15*B + 20*C)*cos(c + d*x)*sin(c + d*x))/(40*d) + ((3*A + 5*B)*cos(c + d*x)^3*(a + a*sec(c + d*x))^3*sin(c + d*x))/(20*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^3*sin(c + d*x))/(5*d) - (a^3*(13*A + 15*B + 20*C)*sin(c + d*x)^3)/(60*d)]
    @test_int [cos(c + d*x)^6*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (1/16)*a^3*(23*A + 26*B + 30*C)*x + (a^3*(34*A + 38*B + 45*C)*sin(c + d*x))/(15*d) + (a^3*(23*A + 26*B + 30*C)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^3*(73*A + 86*B + 90*C)*cos(c + d*x)^2*sin(c + d*x))/(120*d) + (A*cos(c + d*x)^5*(a + a*sec(c + d*x))^3*sin(c + d*x))/(6*d) + ((A + 2*B)*cos(c + d*x)^4*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(10*a*d) + ((31*A + 42*B + 30*C)*cos(c + d*x)^3*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(120*d)]
    @test_int [cos(c + d*x)^7*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (1/16)*a^3*(21*A + 23*B + 26*C)*x + (a^3*(108*A + 119*B + 133*C)*sin(c + d*x))/(35*d) + (a^3*(21*A + 23*B + 26*C)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^3*(129*A + 147*B + 154*C)*cos(c + d*x)^3*sin(c + d*x))/(280*d) + (A*cos(c + d*x)^6*(a + a*sec(c + d*x))^3*sin(c + d*x))/(7*d) + ((3*A + 7*B)*cos(c + d*x)^5*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(42*a*d) + ((3*A + 4*B + 3*C)*cos(c + d*x)^4*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d) - (a^3*(108*A + 119*B + 133*C)*sin(c + d*x)^3)/(105*d)]

    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 15, (a^4*(56*A + 49*B + 44*C)*atanh(sin(c + d*x)))/(16*d) + (4*a^4*(56*A + 49*B + 44*C)*tan(c + d*x))/(35*d) + (27*a^4*(56*A + 49*B + 44*C)*sec(c + d*x)*tan(c + d*x))/(560*d) + (a^4*(56*A + 49*B + 44*C)*sec(c + d*x)^3*tan(c + d*x))/(280*d) + ((42*A - 7*B + 8*C)*(a + a*sec(c + d*x))^4*tan(c + d*x))/(210*d) + (C*sec(c + d*x)^2*(a + a*sec(c + d*x))^4*tan(c + d*x))/(7*d) + ((7*B + 4*C)*(a + a*sec(c + d*x))^5*tan(c + d*x))/(42*a*d) + (2*a^4*(56*A + 49*B + 44*C)*tan(c + d*x)^3)/(105*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 14, (7*a^4*(10*A + 8*B + 7*C)*atanh(sin(c + d*x)))/(16*d) + (4*a^4*(10*A + 8*B + 7*C)*tan(c + d*x))/(5*d) + (27*a^4*(10*A + 8*B + 7*C)*sec(c + d*x)*tan(c + d*x))/(80*d) + (a^4*(10*A + 8*B + 7*C)*sec(c + d*x)^3*tan(c + d*x))/(40*d) + ((6*B - C)*(a + a*sec(c + d*x))^4*tan(c + d*x))/(30*d) + (C*(a + a*sec(c + d*x))^5*tan(c + d*x))/(6*a*d) + (2*a^4*(10*A + 8*B + 7*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, a^4*A*x + (a^4*(48*A + 35*B + 28*C)*atanh(sin(c + d*x)))/(8*d) + (a^4*(40*A + 35*B + 28*C)*tan(c + d*x))/(8*d) + (a*(5*B + 4*C)*(a + a*sec(c + d*x))^3*tan(c + d*x))/(20*d) + (C*(a + a*sec(c + d*x))^4*tan(c + d*x))/(5*d) + ((20*A + 35*B + 28*C)*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(60*d) + ((32*A + 35*B + 28*C)*(a^4 + a^4*sec(c + d*x))*tan(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, a^4*(4*A + B)*x + (a^4*(52*A + 48*B + 35*C)*atanh(sin(c + d*x)))/(8*d) + (A*(a + a*sec(c + d*x))^4*sin(c + d*x))/d + (5*a^4*(4*A + 8*B + 7*C)*tan(c + d*x))/(8*d) - (a*(4*A - C)*(a + a*sec(c + d*x))^3*tan(c + d*x))/(4*d) - ((12*A - 4*B - 7*C)*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(12*d) - ((12*A - 32*B - 35*C)*(a^4 + a^4*sec(c + d*x))*tan(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (1/2)*a^4*(13*A + 8*B + 2*C)*x + (a^4*(8*A + 13*B + 12*C)*atanh(sin(c + d*x)))/(2*d) + (5*a^4*(A - B - 2*C)*sin(c + d*x))/(2*d) - (a*(3*A - 2*C)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(6*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^4*sin(c + d*x))/(2*d) - ((A - B - 2*C)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*d) + ((3*A + 18*B + 22*C)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (1/2)*a^4*(12*A + 13*B + 8*C)*x + (a^4*(2*A + 8*B + 13*C)*atanh(sin(c + d*x)))/(2*d) + (5*a^4*(2*A + B - C)*sin(c + d*x))/(2*d) + (a*(4*A + 3*B)*cos(c + d*x)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(6*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^4*sin(c + d*x))/(3*d) - ((2*A + B - C)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*d) - ((8*A - 3*B - 18*C)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (1/8)*a^4*(35*A + 48*B + 52*C)*x + (a^4*(B + 4*C)*atanh(sin(c + d*x)))/d + (5*a^4*(7*A + 8*B + 4*C)*sin(c + d*x))/(8*d) + (a*(A + B)*cos(c + d*x)^2*(a + a*sec(c + d*x))^3*sin(c + d*x))/(3*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^4*sin(c + d*x))/(4*d) + ((7*A + 8*B + 4*C)*cos(c + d*x)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(8*d) - ((35*A + 32*B - 12*C)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (1/8)*a^4*(28*A + 35*B + 48*C)*x + (a^4*C*atanh(sin(c + d*x)))/d + (a^4*(28*A + 35*B + 40*C)*sin(c + d*x))/(8*d) + (a*(4*A + 5*B)*cos(c + d*x)^3*(a + a*sec(c + d*x))^3*sin(c + d*x))/(20*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^4*sin(c + d*x))/(5*d) + ((28*A + 35*B + 20*C)*cos(c + d*x)^2*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(60*d) + ((28*A + 35*B + 32*C)*cos(c + d*x)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^6*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 12, (7/16)*a^4*(7*A + 8*B + 10*C)*x + (4*a^4*(7*A + 8*B + 10*C)*sin(c + d*x))/(5*d) + (27*a^4*(7*A + 8*B + 10*C)*cos(c + d*x)*sin(c + d*x))/(80*d) + (a^4*(7*A + 8*B + 10*C)*cos(c + d*x)^3*sin(c + d*x))/(40*d) + ((2*A + 3*B)*cos(c + d*x)^4*(a + a*sec(c + d*x))^4*sin(c + d*x))/(15*d) + (A*cos(c + d*x)^5*(a + a*sec(c + d*x))^4*sin(c + d*x))/(6*d) - (2*a^4*(7*A + 8*B + 10*C)*sin(c + d*x)^3)/(15*d)]
    @test_int [cos(c + d*x)^7*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (1/16)*a^4*(44*A + 49*B + 56*C)*x + (a^4*(454*A + 504*B + 581*C)*sin(c + d*x))/(105*d) + (a^4*(44*A + 49*B + 56*C)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^4*(988*A + 1113*B + 1232*C)*cos(c + d*x)^2*sin(c + d*x))/(840*d) + (a*(4*A + 7*B)*cos(c + d*x)^5*(a + a*sec(c + d*x))^3*sin(c + d*x))/(42*d) + (A*cos(c + d*x)^6*(a + a*sec(c + d*x))^4*sin(c + d*x))/(7*d) + ((16*A + 21*B + 14*C)*cos(c + d*x)^4*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(70*d) + ((436*A + 511*B + 504*C)*cos(c + d*x)^3*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(840*d)]
    @test_int [cos(c + d*x)^8*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (1/128)*a^4*(323*A + 352*B + 392*C)*x + (a^4*(208*A + 227*B + 252*C)*sin(c + d*x))/(35*d) + (a^4*(323*A + 352*B + 392*C)*cos(c + d*x)*sin(c + d*x))/(128*d) + (a^4*(2007*A + 2208*B + 2408*C)*cos(c + d*x)^3*sin(c + d*x))/(2240*d) + (a*(A + 2*B)*cos(c + d*x)^6*(a + a*sec(c + d*x))^3*sin(c + d*x))/(14*d) + (A*cos(c + d*x)^7*(a + a*sec(c + d*x))^4*sin(c + d*x))/(8*d) + ((61*A + 80*B + 56*C)*cos(c + d*x)^5*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(336*d) + (7*(7*A + 8*(B + C))*cos(c + d*x)^4*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(120*d) - (a^4*(208*A + 227*B + 252*C)*sin(c + d*x)^3)/(105*d)]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

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

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 7, -(((4*A - 7*B + 10*C)*atanh(sin(c + d*x)))/(2*a^2*d)) + ((5*A - 8*B + 12*C)*tan(c + d*x))/(a^2*d) - ((4*A - 7*B + 10*C)*sec(c + d*x)*tan(c + d*x))/(2*a^2*d) - ((4*A - 7*B + 10*C)*sec(c + d*x)^3*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^4*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2) + ((5*A - 8*B + 12*C)*tan(c + d*x)^3)/(3*a^2*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 7, ((2*A - 4*B + 7*C)*atanh(sin(c + d*x)))/(2*a^2*d) - (2*(2*A - 5*B + 8*C)*tan(c + d*x))/(3*a^2*d) + ((2*A - 4*B + 7*C)*sec(c + d*x)*tan(c + d*x))/(2*a^2*d) - ((2*A - 5*B + 8*C)*sec(c + d*x)^2*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^3*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 6, ((B - 2*C)*atanh(sin(c + d*x)))/(a^2*d) + ((A - B + 4*C)*tan(c + d*x))/(3*a^2*d) - ((B - 2*C)*tan(c + d*x))/(a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^2*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 4, (C*atanh(sin(c + d*x)))/(a^2*d) + ((A + 2*B - 5*C)*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) + ((A - B + C)*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2), (C*atanh(sin(c + d*x)))/(a^2*d) + ((2*A + B - 4*C)*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 3, (A*x)/a^2 - ((4*A - B - 2*C)*tan(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*tan(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 5, -(((2*A - B)*x)/a^2) + ((10*A - 4*B + C)*sin(c + d*x))/(3*a^2*d) - ((2*A - B)*sin(c + d*x))/(a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 6, ((7*A - 4*B + 2*C)*x)/(2*a^2) - (2*(8*A - 5*B + 2*C)*sin(c + d*x))/(3*a^2*d) + ((7*A - 4*B + 2*C)*cos(c + d*x)*sin(c + d*x))/(2*a^2*d) - ((8*A - 5*B + 2*C)*cos(c + d*x)*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*cos(c + d*x)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^2, x, 7, -(((10*A - 7*B + 4*C)*x)/(2*a^2)) + ((12*A - 8*B + 5*C)*sin(c + d*x))/(a^2*d) - ((10*A - 7*B + 4*C)*cos(c + d*x)*sin(c + d*x))/(2*a^2*d) - ((10*A - 7*B + 4*C)*cos(c + d*x)^2*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*cos(c + d*x)^2*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2) - ((12*A - 8*B + 5*C)*sin(c + d*x)^3)/(3*a^2*d)]

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 8, ((2*A - 6*B + 13*C)*atanh(sin(c + d*x)))/(2*a^3*d) - (2*(11*A - 36*B + 76*C)*tan(c + d*x))/(15*a^3*d) + ((2*A - 6*B + 13*C)*sec(c + d*x)*tan(c + d*x))/(2*a^3*d) - ((A - B + C)*sec(c + d*x)^4*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((A - 6*B + 11*C)*sec(c + d*x)^3*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((11*A - 36*B + 76*C)*sec(c + d*x)^2*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 7, ((B - 3*C)*atanh(sin(c + d*x)))/(a^3*d) + ((2*A - 7*B + 27*C)*tan(c + d*x))/(15*a^3*d) - ((A - B + C)*sec(c + d*x)^3*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((A + 4*B - 9*C)*sec(c + d*x)^2*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((B - 3*C)*tan(c + d*x))/(d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 5, (C*atanh(sin(c + d*x)))/(a^3*d) - ((A - B + C)*sec(c + d*x)^2*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((3*A + 2*B - 7*C)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((6*A + 4*B - 29*C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 3, -(((A - B + C)*sec(c + d*x)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3)) + ((A - C)*tan(c + d*x))/(3*a*d*(a + a*sec(c + d*x))^2) + ((2*A + 3*B + 7*C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 4, (A*x)/a^3 - ((A - B + C)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((7*A - 2*B - 3*C)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((22*A - 2*B - 3*C)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 6, -(((3*A - B)*x)/a^3) + (2*(36*A - 11*B + C)*sin(c + d*x))/(15*a^3*d) - ((A - B + C)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((9*A - 4*B - C)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((3*A - B)*sin(c + d*x))/(d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 7, ((13*A - 6*B + 2*C)*x)/(2*a^3) - (2*(76*A - 36*B + 11*C)*sin(c + d*x))/(15*a^3*d) + ((13*A - 6*B + 2*C)*cos(c + d*x)*sin(c + d*x))/(2*a^3*d) - ((A - B + C)*cos(c + d*x)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((11*A - 6*B + C)*cos(c + d*x)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((76*A - 36*B + 11*C)*cos(c + d*x)*sin(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^3, x, 8, -(((23*A - 13*B + 6*C)*x)/(2*a^3)) + (4*(34*A - 19*B + 9*C)*sin(c + d*x))/(5*a^3*d) - ((23*A - 13*B + 6*C)*cos(c + d*x)*sin(c + d*x))/(2*a^3*d) - ((A - B + C)*cos(c + d*x)^2*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((13*A - 8*B + 3*C)*cos(c + d*x)^2*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((23*A - 13*B + 6*C)*cos(c + d*x)^2*sin(c + d*x))/(3*d*(a^3 + a^3*sec(c + d*x))) - (4*(34*A - 19*B + 9*C)*sin(c + d*x)^3)/(15*a^3*d)]

    @test_int [sec(c + d*x)^5*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 9, ((2*A - 8*B + 21*C)*atanh(sin(c + d*x)))/(2*a^4*d) - (8*(20*A - 83*B + 216*C)*tan(c + d*x))/(105*a^4*d) + ((2*A - 8*B + 21*C)*sec(c + d*x)*tan(c + d*x))/(2*a^4*d) - ((10*A - 52*B + 129*C)*sec(c + d*x)^3*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (4*(20*A - 83*B + 216*C)*sec(c + d*x)^2*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^5*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) + ((B - 2*C)*sec(c + d*x)^4*tan(c + d*x))/(5*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 8, ((B - 4*C)*atanh(sin(c + d*x)))/(a^4*d) + ((6*A - 55*B + 244*C)*tan(c + d*x))/(105*a^4*d) + ((3*A + 25*B - 88*C)*sec(c + d*x)^2*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - ((B - 4*C)*tan(c + d*x))/(a^4*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^4*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) + ((2*A + 5*B - 12*C)*sec(c + d*x)^3*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 6, (C*atanh(sin(c + d*x)))/(a^4*d) - ((8*A + 6*B - 55*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) + ((16*A + 12*B - 215*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^3*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) + ((4*A + 3*B - 10*C)*sec(c + d*x)^2*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 4, ((23*A - 2*B - 54*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) + ((8*A + 13*B + 36*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^2*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - ((6*A + B - 8*C)*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 4, -(((A - B + C)*sec(c + d*x)*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4)) + ((8*A - B - 6*C)*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3) + ((6*A + 8*B + 13*C)*tan(c + d*x))/(105*d*(a^2 + a^2*sec(c + d*x))^2) + ((6*A + 8*B + 13*C)*tan(c + d*x))/(105*d*(a^4 + a^4*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 5, (A*x)/a^4 - ((55*A - 6*B - 8*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (2*(80*A - 3*B - 4*C)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A - B + C)*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - ((10*A - 3*B - 4*C)*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 7, -(((4*A - B)*x)/a^4) + (2*(332*A - 80*B + 3*C)*sin(c + d*x))/(105*a^4*d) - ((88*A - 25*B - 3*C)*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - ((4*A - B)*sin(c + d*x))/(a^4*d*(1 + sec(c + d*x))) - ((A - B + C)*sin(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - ((12*A - 5*B - 2*C)*sin(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3)]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^4, x, 8, ((21*A - 8*B + 2*C)*x)/(2*a^4) - (8*(216*A - 83*B + 20*C)*sin(c + d*x))/(105*a^4*d) + ((21*A - 8*B + 2*C)*cos(c + d*x)*sin(c + d*x))/(2*a^4*d) - ((129*A - 52*B + 10*C)*cos(c + d*x)*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (4*(216*A - 83*B + 20*C)*cos(c + d*x)*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A - B + C)*cos(c + d*x)*sin(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - ((2*A - B)*cos(c + d*x)*sin(c + d*x))/(5*a*d*(a + a*sec(c + d*x))^3)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+a*sec(e+f*x))^(m/2)*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^4*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (4*a*(99*A + 88*B + 80*C)*tan(c + d*x))/(495*d*sqrt(a + a*sec(c + d*x))) + (2*a*(99*A + 88*B + 80*C)*sec(c + d*x)^3*tan(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a*(11*B + C)*sec(c + d*x)^4*tan(c + d*x))/(99*d*sqrt(a + a*sec(c + d*x))) - (8*(99*A + 88*B + 80*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3465*d) + (2*C*sec(c + d*x)^4*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(11*d) + (4*(99*A + 88*B + 80*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(1155*a*d)]
    @test_int [sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (2*a*(21*A + 18*B + 16*C)*tan(c + d*x))/(45*d*sqrt(a + a*sec(c + d*x))) + (2*a*(9*B + C)*sec(c + d*x)^3*tan(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) - (4*(21*A + 18*B + 16*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*C*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(9*d) + (2*(21*A + 18*B + 16*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*a*d)]
    @test_int [sec(c + d*x)^2*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 4, (2*a*(35*A + 49*B + 27*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*(35*A - 14*B + 18*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*C*sec(c + d*x)^2*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(7*d) + (2*(7*B + C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*a*d)]
    @test_int [sec(c + d*x)^1*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 3, (2*a*(15*A + 5*B + 7*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*(5*B - 2*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*a*d)]
    @test_int [sec(c + d*x)^0*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (2*sqrt(a)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a*(3*B + C)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (sqrt(a)*(A + 2*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/d - (a*(A - 2*C)*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 4, (sqrt(a)*(3*A + 4*B + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a*(A + 4*B)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (sqrt(a)*(5*A + 6*B + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a*(5*A + 6*B + 8*C)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a*(A + 6*B)*cos(c + d*x)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (sqrt(a)*(35*A + 40*B + 48*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a*(35*A + 40*B + 48*C)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a*(35*A + 40*B + 48*C)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a*(A + 8*B)*cos(c + d*x)^2*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d)]

    @test_int [sec(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*a^2*(429*A + 374*B + 336*C)*tan(c + d*x))/(495*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(99*A + 110*B + 84*C)*sec(c + d*x)^3*tan(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) - (4*a*(429*A + 374*B + 336*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3465*d) + (2*a*(11*B + 3*C)*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(99*d) + (2*(429*A + 374*B + 336*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(1155*d) + (2*C*sec(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(11*d)]
    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (8*a^2*(63*A + 57*B + 47*C)*tan(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a*(63*A + 57*B + 47*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*(63*A - 18*B + 22*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*d) + (2*C*sec(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(9*d) + (2*(3*B + C)*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(21*a*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 4, (8*a^2*(35*A + 21*B + 19*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(35*A + 21*B + 19*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*(7*B - 2*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*C*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*a*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*a^(3/2)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^2*(15*A + 20*B + 12*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a*(5*B + 3*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*C*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(3/2)*(3*A + 2*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/d - (a^2*(3*A - 6*B - 8*C)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) - (a*(3*A - 2*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (a^(3/2)*(7*A + 12*B + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^2*(5*A + 4*B - 8*C)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) - (a*(A - 4*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (a^(3/2)*(11*A + 14*B + 24*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^2*(19*A + 30*B + 24*C)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a*(A + 2*B)*cos(c + d*x)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(3/2)*(75*A + 88*B + 112*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^2*(75*A + 88*B + 112*C)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^2*(39*A + 56*B + 48*C)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a*(3*A + 8*B)*cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(3/2)*(133*A + 150*B + 176*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^2*(133*A + 150*B + 176*C)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^2*(133*A + 150*B + 176*C)*cos(c + d*x)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(67*A + 90*B + 80*C)*cos(c + d*x)^2*sin(c + d*x))/(240*d*sqrt(a + a*sec(c + d*x))) + (a*(3*A + 10*B)*cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d)]

    @test_int [sec(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*a^3*(10439*A + 9230*B + 8368*C)*tan(c + d*x))/(6435*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(2717*A + 2522*B + 2224*C)*sec(c + d*x)^3*tan(c + d*x))/(9009*d*sqrt(a + a*sec(c + d*x))) - (4*a^2*(10439*A + 9230*B + 8368*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(45045*d) + (2*a^2*(143*A + 182*B + 136*C)*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(1287*d) + (2*a*(10439*A + 9230*B + 8368*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(15015*d) + (2*a*(13*B + 5*C)*sec(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(143*d) + (2*C*sec(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(13*d)]
    @test_int [sec(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (64*a^3*(165*A + 143*B + 125*C)*tan(c + d*x))/(3465*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(165*A + 143*B + 125*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3465*d) + (2*a*(165*A + 143*B + 125*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(1155*d) + (2*(99*A - 22*B + 26*C)*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(693*d) + (2*C*sec(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(11*d) + (2*(11*B + 5*C)*(a + a*sec(c + d*x))^(7/2)*tan(c + d*x))/(99*a*d)]
    @test_int [sec(c + d*x)^1*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (64*a^3*(21*A + 15*B + 13*C)*tan(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(21*A + 15*B + 13*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*a*(21*A + 15*B + 13*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*d) + (2*(9*B - 2*C)*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*d) + (2*C*(a + a*sec(c + d*x))^(7/2)*tan(c + d*x))/(9*a*d)]
    @test_int [sec(c + d*x)^0*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*a^(5/2)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^3*(245*A + 224*B + 160*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(35*A + 56*B + 40*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*a*(7*B + 5*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*C*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^1*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(5*A + 2*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/d + (a^3*(15*A + 70*B + 64*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) - (a^2*(15*A - 10*B - 16*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) - (a*(5*A - 2*C)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(19*A + 20*B + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^3*(27*A - 12*B - 56*C)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) - (a^2*(A - 4*B - 8*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d) - (a*(3*A - 4*C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(6*d) + (A*cos(c + d*x)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(25*A + 38*B + 40*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^3*(49*A + 54*B - 24*C)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) - (a^2*(3*A + 2*B - 8*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*(5*A + 6*B)*cos(c + d*x)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d) + (A*cos(c + d*x)^2*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(163*A + 200*B + 304*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^3*(299*A + 392*B + 432*C)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(17*A + 24*B + 16*C)*cos(c + d*x)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(32*d) + (a*(5*A + 8*B)*cos(c + d*x)^2*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d) + (A*cos(c + d*x)^3*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(283*A + 326*B + 400*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^3*(283*A + 326*B + 400*C)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^3*(787*A + 950*B + 1040*C)*cos(c + d*x)*sin(c + d*x))/(960*d*sqrt(a + a*sec(c + d*x))) + (a^2*(79*A + 110*B + 80*C)*cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(240*d) + (a*(A + 2*B)*cos(c + d*x)^3*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(8*d) + (A*cos(c + d*x)^4*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^6*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (a^(5/2)*(1015*A + 1132*B + 1304*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(512*d) + (a^3*(1015*A + 1132*B + 1304*C)*sin(c + d*x))/(512*d*sqrt(a + a*sec(c + d*x))) + (a^3*(1015*A + 1132*B + 1304*C)*cos(c + d*x)*sin(c + d*x))/(768*d*sqrt(a + a*sec(c + d*x))) + (a^3*(545*A + 628*B + 680*C)*cos(c + d*x)^2*sin(c + d*x))/(960*d*sqrt(a + a*sec(c + d*x))) + (a^2*(115*A + 156*B + 120*C)*cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(480*d) + (a*(5*A + 12*B)*cos(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(60*d) + (A*cos(c + d*x)^5*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(6*d)]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 7, -((sqrt(2)*(A - B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (4*(147*A - 111*B + 143*C)*tan(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*(21*A - 3*B + 19*C)*sec(c + d*x)^2*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*(9*B - C)*sec(c + d*x)^3*tan(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) + (2*C*sec(c + d*x)^4*tan(c + d*x))/(9*d*sqrt(a + a*sec(c + d*x))) - (2*(21*A - 93*B + 29*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*a*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 6, (sqrt(2)*(A - B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - (4*(35*A - 49*B + 37*C)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*(7*B - C)*sec(c + d*x)^2*tan(c + d*x))/(35*d*sqrt(a + a*sec(c + d*x))) + (2*C*sec(c + d*x)^3*tan(c + d*x))/(7*d*sqrt(a + a*sec(c + d*x))) + (2*(35*A - 7*B + 31*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*a*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 5, -((sqrt(2)*(A - B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (2*(15*A - 10*B + 14*C)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*C*sec(c + d*x)^2*tan(c + d*x))/(5*d*sqrt(a + a*sec(c + d*x))) + (2*(5*B - C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*a*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 4, (sqrt(2)*(A - B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*(3*B - 2*C)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*C*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*a*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 6, (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) - (sqrt(2)*(A - B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*C*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 6, -(((A - 2*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d)) + (sqrt(2)*(A - B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (A*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 7, ((7*A - 4*B + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*sqrt(a)*d) - (sqrt(2)*(A - B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - ((A - 4*B)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)*sin(c + d*x))/(2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 8, -(((9*A - 14*B + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*sqrt(a)*d)) + (sqrt(2)*(A - B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + ((7*A - 2*B + 8*C)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) - ((A - 6*B)*cos(c + d*x)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)^2*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + a*sec(c + d*x)), x, 9, ((107*A - 72*B + 112*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*sqrt(a)*d) - (sqrt(2)*(A - B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - ((21*A - 56*B + 16*C)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + ((43*A - 8*B + 48*C)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) - ((A - 8*B)*cos(c + d*x)^2*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (A*cos(c + d*x)^3*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 7, ((11*A - 15*B + 19*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sec(c + d*x)^4*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((455*A - 651*B + 799*C)*tan(c + d*x))/(105*a*d*sqrt(a + a*sec(c + d*x))) - ((35*A - 63*B + 67*C)*sec(c + d*x)^2*tan(c + d*x))/(70*a*d*sqrt(a + a*sec(c + d*x))) + ((7*A - 7*B + 11*C)*sec(c + d*x)^3*tan(c + d*x))/(14*a*d*sqrt(a + a*sec(c + d*x))) + ((245*A - 273*B + 397*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(210*a^2*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 6, -(((7*A - 11*B + 15*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d)) - ((A - B + C)*sec(c + d*x)^3*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((45*A - 65*B + 93*C)*tan(c + d*x))/(15*a*d*sqrt(a + a*sec(c + d*x))) + ((5*A - 5*B + 9*C)*sec(c + d*x)^2*tan(c + d*x))/(10*a*d*sqrt(a + a*sec(c + d*x))) - ((15*A - 35*B + 39*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(30*a^2*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 5, ((3*A - 7*B + 11*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sec(c + d*x)^2*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((3*A - 9*B + 13*C)*tan(c + d*x))/(3*a*d*sqrt(a + a*sec(c + d*x))) + ((3*A - 3*B + 7*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(6*a^2*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 4, ((A + 3*B - 7*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) + ((A - B + C)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + (2*C*tan(c + d*x))/(a*d*sqrt(a + a*sec(c + d*x))), ((A + 3*B - 7*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sec(c + d*x)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((A - B + 5*C)*tan(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 6, (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) - ((5*A - B - 3*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 7, -(((3*A - 2*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d)) + ((9*A - 5*B + C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((3*A - B + C)*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 8, ((19*A - 12*B + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*a^(3/2)*d) - ((13*A - 9*B + 5*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*cos(c + d*x)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((7*A - 6*B + 2*C)*sin(c + d*x))/(4*a*d*sqrt(a + a*sec(c + d*x))) + ((2*A - B + C)*cos(c + d*x)*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(3/2), x, 9, -(((47*A - 38*B + 24*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*a^(3/2)*d)) + ((17*A - 13*B + 9*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*cos(c + d*x)^2*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((21*A - 14*B + 12*C)*sin(c + d*x))/(8*a*d*sqrt(a + a*sec(c + d*x))) - ((13*A - 12*B + 6*C)*cos(c + d*x)*sin(c + d*x))/(12*a*d*sqrt(a + a*sec(c + d*x))) + ((5*A - 3*B + 3*C)*cos(c + d*x)^2*sin(c + d*x))/(6*a*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 7, -(((75*A - 163*B + 283*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d)) - ((A - B + C)*sec(c + d*x)^4*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((5*A - 13*B + 21*C)*sec(c + d*x)^3*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((465*A - 985*B + 1729*C)*tan(c + d*x))/(120*a^2*d*sqrt(a + a*sec(c + d*x))) + ((45*A - 85*B + 157*C)*sec(c + d*x)^2*tan(c + d*x))/(80*a^2*d*sqrt(a + a*sec(c + d*x))) - ((195*A - 475*B + 787*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(240*a^3*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 6, ((19*A - 75*B + 163*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sec(c + d*x)^3*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((A - 9*B + 17*C)*sec(c + d*x)^2*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((21*A - 93*B + 197*C)*tan(c + d*x))/(24*a^2*d*sqrt(a + a*sec(c + d*x))) + ((15*A - 39*B + 95*C)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(48*a^3*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 5, ((5*A + 19*B - 75*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sec(c + d*x)^2*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((3*A + 5*B - 13*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((A - B + 9*C)*tan(c + d*x))/(4*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 4, ((3*A + 5*B + 19*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sec(c + d*x)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((7*A + B - 9*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 7, (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) - ((43*A - 3*B - 5*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((11*A - 3*B - 5*C)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 8, -(((5*A - 2*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d)) + ((115*A - 43*B + 3*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((15*A - 7*B - C)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((35*A - 11*B + 3*C)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/2), x, 9, ((39*A - 20*B + 8*C)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*a^(5/2)*d) - ((219*A - 115*B + 43*C)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*cos(c + d*x)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((19*A - 11*B + 3*C)*cos(c + d*x)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((63*A - 35*B + 11*C)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x))) + ((31*A - 15*B + 7*C)*cos(c + d*x)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x)))]

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

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, -((2*a*(5*A + 3*(B + C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*a*(7*A + 7*B + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*(5*A + 3*(B + C))*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a*(7*A + 7*B + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*a*(B + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d) + (2*a*C*sec(c + d*x)^(7/2)*sin(c + d*x))/(7*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, -((2*a*(5*A + 5*B + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*a*(3*A + B + C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*(5*A + 5*B + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a*(B + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d) + (2*a*C*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [((a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 7, (2*a*(A - B - C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*a*(3*A + 3*B + C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*(B + C)*sqrt(sec(c + d*x))*sin(c + d*x))/d + (2*a*C*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [((a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 7, (2*a*(A + B - C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*a*(A + 3*(B + C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*A*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) + (2*a*C*sqrt(sec(c + d*x))*sin(c + d*x))/d]
    @test_int [((a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 7, (2*a*(3*A + 5*(B + C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*a*(A + B + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*A*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*a*(A + B)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 8, (2*a*(3*(A + B) + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*a*(5*A + 7*(B + C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*A*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*a*(A + B)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*a*(5*A + 7*(B + C))*sin(c + d*x))/(21*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 9, (2*a*(7*A + 9*(B + C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*a*(5*(A + B) + 7*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*A*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*a*(A + B)*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*a*(7*A + 9*(B + C))*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (2*a*(5*(A + B) + 7*C)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x)))]

    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (-4*a^2*(12*A + 9*B + 8*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^2*(7*A + 6*B + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^2*(12*A + 9*B + 8*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (4*a^2*(7*A + 6*B + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*a^2*(21*A + 27*B + 19*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(105*d) + (2*C*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2*sin(c + d*x))/(9*d) + (2*(9*B + 4*C)*sec(c + d*x)^(5/2)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(63*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (-4*a^2*(5*A + 4*B + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^2*(14*A + 7*B + 6*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^2*(5*A + 4*B + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a^2*(35*A + 49*B + 33*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*C*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2*sin(c + d*x))/(7*d) + (2*(7*B + 4*C)*sec(c + d*x)^(3/2)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(35*d)]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 8, (-4*a^2*(5*B + 4*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^2*(3*A + 2*B + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a^2*(15*A + 25*B + 17*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*C*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2*sin(c + d*x))/(5*d) + (2*(5*B + 4*C)*sqrt(sec(c + d*x))*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 8, (4*a^2*(A - C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/d + (4*a^2*(2*A + 3*B + 2*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) - (2*a^2*(A - 3*B - 5*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) - (2*(A - C)*sqrt(sec(c + d*x))*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 8, (4*a^2*(4*A + 5*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^2*(A + 2*B + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) - (2*a^2*(7*A + 5*B - 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*(4*A + 5*B)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 8, (4*a^2*(3*A + 4*B + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^2*(6*A + 7*B + 14*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a^2*(33*A + 49*B + 35*C)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*(4*A + 7*B)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 9, (4*a^2*(8*A + 9*B + 12*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^2*(5*A + 6*B + 7*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a^2*(19*A + 27*B + 21*C)*sin(c + d*x))/(105*d*sec(c + d*x)^(3/2)) + (4*a^2*(5*A + 6*B + 7*C)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*(4*A + 9*B)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(11/2), x, 10, (4*a^2*(7*A + 8*B + 9*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^2*(50*A + 55*B + 66*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(231*d) + (2*a^2*(89*A + 121*B + 99*C)*sin(c + d*x))/(693*d*sec(c + d*x)^(5/2)) + (4*a^2*(7*A + 8*B + 9*C)*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (4*a^2*(50*A + 55*B + 66*C)*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2)) + (2*(4*A + 11*B)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2))]

    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 11, (-4*a^3*(21*A + 17*B + 15*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^3*(143*A + 121*B + 105*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(231*d) + (4*a^3*(21*A + 17*B + 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (4*a^3*(143*A + 121*B + 105*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(231*d) + (4*a^3*(264*A + 253*B + 210*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(1155*d) + (2*C*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(11*d) + (2*(11*B + 6*C)*sec(c + d*x)^(5/2)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(99*a*d) + (2*(99*A + 143*B + 105*C)*sec(c + d*x)^(5/2)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(693*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (-4*a^3*(27*A + 21*B + 17*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^3*(21*A + 13*B + 11*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^3*(27*A + 21*B + 17*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (4*a^3*(42*A + 41*B + 32*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*C*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(9*d) + (2*(3*B + 2*C)*sec(c + d*x)^(3/2)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(21*a*d) + (2*(63*A + 99*B + 73*C)*sec(c + d*x)^(3/2)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(315*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 9, (-4*a^3*(5*A + 9*B + 7*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(35*A + 21*B + 13*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^3*(140*A + 147*B + 106*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d) + (2*C*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3*sin(c + d*x))/(7*d) + (2*(7*B + 6*C)*sqrt(sec(c + d*x))*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(35*a*d) + (2*(5*A + 9*B + 7*C)*sqrt(sec(c + d*x))*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 9, (4*a^3*(5*A - 5*B - 9*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(5*A + 5*B + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (4*a^3*(5*A + 20*B + 21*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) - (2*(5*A - 3*C)*sqrt(sec(c + d*x))*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(15*a*d) - (2*(5*A - 5*B - 9*C)*sqrt(sec(c + d*x))*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 9, (4*a^3*(9*A + 5*B - 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(3*A + 5*(B + C))*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) - (4*a^3*(6*A - 5*B - 20*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*(6*A + 5*B)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(15*a*d*sqrt(sec(c + d*x))) - (2*(9*A + 5*B - 5*C)*sqrt(sec(c + d*x))*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 9, (4*a^3*(7*A + 9*B + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(13*A + 21*B + 35*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) - (4*a^3*(41*A + 42*B - 35*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*(6*A + 7*B)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(35*a*d*sec(c + d*x)^(3/2)) + (2*(7*A + 9*B + 5*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 9, (4*a^3*(17*A + 21*B + 27*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^3*(11*A + 13*B + 21*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^3*(32*A + 41*B + 42*C)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*(2*A + 3*B)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(21*a*d*sec(c + d*x)^(5/2)) + (2*(73*A + 99*B + 63*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(315*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(11/2), x, 10, (4*a^3*(15*A + 17*B + 21*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^3*(105*A + 121*B + 143*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(231*d) + (4*a^3*(210*A + 253*B + 264*C)*sin(c + d*x))/(1155*d*sec(c + d*x)^(3/2)) + (4*a^3*(105*A + 121*B + 143*C)*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2)) + (2*(6*A + 11*B)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(99*a*d*sec(c + d*x)^(7/2)) + (2*(105*A + 143*B + 99*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(693*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(13/2), x, 11, (4*a^3*(175*A + 195*B + 221*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(195*d) + (4*a^3*(95*A + 105*B + 121*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(231*d) + (20*a^3*(236*A + 273*B + 286*C)*sin(c + d*x))/(9009*d*sec(c + d*x)^(5/2)) + (4*a^3*(175*A + 195*B + 221*C)*sin(c + d*x))/(585*d*sec(c + d*x)^(3/2)) + (4*a^3*(95*A + 105*B + 121*C)*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^3*sin(c + d*x))/(13*d*sec(c + d*x)^(11/2)) + (2*(6*A + 13*B)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(143*a*d*sec(c + d*x)^(9/2)) + (2*(145*A + 195*B + 143*C)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(1287*d*sec(c + d*x)^(7/2))]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [(sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 9, (-3*(5*A - 5*B + 7*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*a*d) - ((3*A - 5*B + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a*d) + (3*(5*A - 5*B + 7*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*a*d) - ((3*A - 5*B + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a*d) + ((5*A - 5*B + 7*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*a*d) - ((A - B + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 8, ((A - 3*B + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d) + ((3*A - 3*B + 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a*d) - ((A - 3*B + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(a*d) + ((3*A - 3*B + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a*d) - ((A - B + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [(sqrt(sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 7, -(((A - B + 3*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d)) + ((A + B - C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d) + ((A - B + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(a*d) - ((A - B + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))), x, 6, ((3*A - B + C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d) - ((A - B - C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d) - ((A - B + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))), x, 7, -(((3*A - 3*B + C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a*d)) + ((5*A - 3*B + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a*d) + ((5*A - 3*B + 3*C)*sin(c + d*x))/(3*a*d*sqrt(sec(c + d*x))) - ((A - B + C)*sin(c + d*x))/(d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))), x, 8, (3*(7*A - 5*B + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*a*d) - ((5*A - 5*B + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a*d) + ((7*A - 5*B + 5*C)*sin(c + d*x))/(5*a*d*sec(c + d*x)^(3/2)) - ((5*A - 5*B + 3*C)*sin(c + d*x))/(3*a*d*sqrt(sec(c + d*x))) - ((A - B + C)*sin(c + d*x))/(d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(7/2)*(a + a*sec(c + d*x))), x, 9, -((3*(7*A - 7*B + 5*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*a*d)) + (5*(9*A - 7*B + 7*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*a*d) + ((9*A - 7*B + 7*C)*sin(c + d*x))/(7*a*d*sec(c + d*x)^(5/2)) - ((7*A - 7*B + 5*C)*sin(c + d*x))/(5*a*d*sec(c + d*x)^(3/2)) + (5*(9*A - 7*B + 7*C)*sin(c + d*x))/(21*a*d*sqrt(sec(c + d*x))) - ((A - B + C)*sin(c + d*x))/(d*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x)))]

    @test_int [(sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 9, ((A - 4*B + 7*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d) + ((2*A - 5*B + 10*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) - ((A - 4*B + 7*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(a^2*d) + ((2*A - 5*B + 10*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*d) - ((A - 4*B + 7*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 8, ((B - 4*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d) + ((A + 2*B - 5*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) - ((B - 4*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(a^2*d) + ((A + 2*B - 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [(sqrt(sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 7, -(((A - C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d)) + ((2*A + B + 2*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + ((A - C)*sqrt(sec(c + d*x))*sin(c + d*x))/(a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2), x, 7, ((4*A - B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d) - ((5*A - 2*B - C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) - ((5*A - 2*B - C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*(a + a*sec(c + d*x))^2)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2), x, 8, -(((7*A - 4*B + C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d)) + ((10*A - 5*B + 2*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + ((10*A - 5*B + 2*C)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x))) - ((7*A - 4*B + C)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x))*(1 + sec(c + d*x))) - ((A - B + C)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2), x, 9, ((56*A - 35*B + 20*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*a^2*d) - (5*(3*A - 2*B + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + ((56*A - 35*B + 20*C)*sin(c + d*x))/(15*a^2*d*sec(c + d*x)^(3/2)) - (5*(3*A - 2*B + C)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x))) - ((3*A - 2*B + C)*sin(c + d*x))/(a^2*d*sec(c + d*x)^(3/2)*(1 + sec(c + d*x))) - ((A - B + C)*sin(c + d*x))/(3*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2)]

    @test_int [(sec(c + d*x)^(7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 10, ((9*A - 49*B + 119*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((3*A - 13*B + 33*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((9*A - 49*B + 119*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*a^3*d) + ((3*A - 13*B + 33*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(6*a^3*d) - ((A - B + C)*sec(c + d*x)^(9/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((B - 2*C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(3*a*d*(a + a*sec(c + d*x))^2) - ((9*A - 49*B + 119*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(30*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 9, ((A + 9*B - 49*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((A + 3*B - 13*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((A + 9*B - 49*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*a^3*d) - ((A - B + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((2*A + 3*B - 8*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((A + 3*B - 13*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(6*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 8, -((A - B - 9*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((A + B + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((A - B + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((4*A + B - 6*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((A - B - 9*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(sqrt(sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 8, -((9*A + B - C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((3*A + B + C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((A - B + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((6*A - B - 4*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((3*A + B + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(6*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3), x, 8, ((49*A - 9*B - C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) - ((13*A - 3*B - C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((A - B + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((8*A - 3*B - 2*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((13*A - 3*B - C)*sqrt(sec(c + d*x))*sin(c + d*x))/(6*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3), x, 9, -((119*A - 49*B + 9*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((33*A - 13*B + 3*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) + ((33*A - 13*B + 3*C)*sin(c + d*x))/(6*a^3*d*sqrt(sec(c + d*x))) - ((A - B + C)*sin(c + d*x))/(5*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3) - ((2*A - B)*sin(c + d*x))/(3*a*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2) - ((119*A - 49*B + 9*C)*sin(c + d*x))/(30*d*sqrt(sec(c + d*x))*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3), x, 10, (7*(33*A - 17*B + 7*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) - ((63*A - 33*B + 13*C)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) + (7*(33*A - 17*B + 7*C)*sin(c + d*x))/(30*a^3*d*sec(c + d*x)^(3/2)) - ((63*A - 33*B + 13*C)*sin(c + d*x))/(6*a^3*d*sqrt(sec(c + d*x))) - ((A - B + C)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3) - ((12*A - 7*B + 2*C)*sin(c + d*x))/(15*a*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2) - ((63*A - 33*B + 13*C)*sin(c + d*x))/(10*d*sec(c + d*x)^(3/2)*(a^3 + a^3*sec(c + d*x)))]

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

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (sqrt(a)*(48*A + 40*B + 35*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a*(48*A + 40*B + 35*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a*(48*A + 40*B + 35*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a*(8*B + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d)]
    @test_int [sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (sqrt(a)*(8*A + 6*B + 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a*(8*A + 6*B + 5*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a*(6*B + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^(1/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 4, (sqrt(a)*(8*A + 4*B + 3*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a*(4*B + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(1/2), x, 4, (sqrt(a)*(2*B + C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a*(2*A - C)*sqrt(sec(c + d*x))*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (C*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 4, (2*sqrt(a)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a*(A + 3*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 3, (2*a*(7*A + 5*B + 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*(A + 5*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 4, (2*a*(A + 7*B)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*a*(24*A + 28*B + 35*C)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (4*a*(24*A + 28*B + 35*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 5, (2*a*(A + 9*B)*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (2*a*(16*A + 18*B + 21*C)*sin(c + d*x))/(105*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (8*a*(16*A + 18*B + 21*C)*sin(c + d*x))/(315*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a*(16*A + 18*B + 21*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2))]

    @test_int [sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(3/2)*(176*A + 150*B + 133*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^2*(176*A + 150*B + 133*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^2*(176*A + 150*B + 133*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(80*A + 90*B + 67*C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(240*d*sqrt(a + a*sec(c + d*x))) + (a*(10*B + 3*C)*sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d) + (C*sec(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(3/2)*(112*A + 88*B + 75*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^2*(112*A + 88*B + 75*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^2*(48*A + 56*B + 39*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a*(8*B + 3*C)*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d) + (C*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]
    @test_int [sec(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (a^(3/2)*(24*A + 14*B + 11*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^2*(24*A + 30*B + 19*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a*(2*B + C)*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (C*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(1/2), x, 5, (a^(3/2)*(8*A + 12*B + 7*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^2*(8*A - 4*B - 5*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (a*(4*B + 3*C)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (C*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d)]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 5, (a^(3/2)*(2*B + 3*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a^2*(8*A + 6*B - 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) - (a*(2*A - 3*C)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 5, (2*a^(3/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^2*(12*A + 20*B + 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a*(3*A + 5*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 4, (8*a^2*(19*A + 21*B + 35*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(19*A + 21*B + 35*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*(3*A + 7*B)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 5, (2*a^2*(52*A + 72*B + 63*C)*sin(c + d*x))/(315*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*a^2*(136*A + 156*B + 189*C)*sin(c + d*x))/(315*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (4*a^2*(136*A + 156*B + 189*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a*(A + 3*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(21*d*sec(c + d*x)^(5/2)) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(11/2), x, 6, (2*a^2*(84*A + 110*B + 99*C)*sin(c + d*x))/(693*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (2*a^2*(336*A + 374*B + 429*C)*sin(c + d*x))/(1155*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (8*a^2*(336*A + 374*B + 429*C)*sin(c + d*x))/(3465*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^2*(336*A + 374*B + 429*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3465*d*sqrt(a + a*sec(c + d*x))) + (2*a*(3*A + 11*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2)) + (2*A*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]

    @test_int [sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (a^(5/2)*(1304*A + 1132*B + 1015*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(512*d) + (a^3*(1304*A + 1132*B + 1015*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(512*d*sqrt(a + a*sec(c + d*x))) + (a^3*(1304*A + 1132*B + 1015*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(768*d*sqrt(a + a*sec(c + d*x))) + (a^3*(680*A + 628*B + 545*C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(960*d*sqrt(a + a*sec(c + d*x))) + (a^2*(120*A + 156*B + 115*C)*sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(480*d) + (a*(12*B + 5*C)*sec(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(60*d) + (C*sec(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(6*d)]
    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(400*A + 326*B + 283*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^3*(400*A + 326*B + 283*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^3*(1040*A + 950*B + 787*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(960*d*sqrt(a + a*sec(c + d*x))) + (a^2*(80*A + 110*B + 79*C)*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(240*d) + (a*(2*B + C)*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(8*d) + (C*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [sec(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(5/2)*(304*A + 200*B + 163*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^3*(432*A + 392*B + 299*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^2*(16*A + 24*B + 17*C)*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(32*d) + (a*(8*B + 5*C)*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d) + (C*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d)]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(1/2), x, 6, (a^(5/2)*(40*A + 38*B + 25*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^3*(24*A - 54*B - 49*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a^2*(24*A + 42*B + 31*C)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d) + (a*(6*B + 5*C)*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d) + (C*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 6, (a^(5/2)*(8*A + 20*B + 19*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^3*(56*A + 12*B - 27*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) - (a^2*(8*A - 12*B - 21*C)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(12*d) - (a*(4*A - 3*C)*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(6*d) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 6, (a^(5/2)*(2*B + 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a^3*(64*A + 70*B + 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) - (a^2*(16*A + 10*B - 15*C)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d) + (2*a*(A + B)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 6, (2*a^(5/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^3*(160*A + 224*B + 245*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(40*A + 56*B + 35*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*a*(5*A + 7*B)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 5, (64*a^3*(13*A + 15*B + 21*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(13*A + 15*B + 21*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(315*d*sqrt(sec(c + d*x))) + (2*a*(13*A + 15*B + 21*C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(105*d*sec(c + d*x)^(3/2)) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*(5*A + 9*B)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(11/2), x, 6, (2*a^3*(1160*A + 1364*B + 1485*C)*sin(c + d*x))/(3465*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*a^3*(2840*A + 3212*B + 3795*C)*sin(c + d*x))/(3465*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (4*a^3*(2840*A + 3212*B + 3795*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(3465*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(32*A + 44*B + 33*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(231*d*sec(c + d*x)^(5/2)) + (2*a*(5*A + 11*B)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2)) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(13/2), x, 7, (2*a^3*(2224*A + 2522*B + 2717*C)*sin(c + d*x))/(9009*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (2*a^3*(8368*A + 9230*B + 10439*C)*sin(c + d*x))/(15015*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (8*a^3*(8368*A + 9230*B + 10439*C)*sin(c + d*x))/(45045*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^3*(8368*A + 9230*B + 10439*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(45045*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(136*A + 182*B + 143*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(1287*d*sec(c + d*x)^(7/2)) + (2*a*(5*A + 13*B)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(143*d*sec(c + d*x)^(9/2)) + (2*A*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(13*d*sec(c + d*x)^(11/2))]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [(sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 8, -(((8*A - 14*B + 9*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*sqrt(a)*d)) + (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + ((8*A - 2*B + 7*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + ((6*B - C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(7/2)*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 7, ((8*A - 4*B + 7*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*sqrt(a)*d) - (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + ((4*B - C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (C*sec(c + d*x)^(5/2)*sin(c + d*x))/(2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 6, ((2*B - C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) + (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (C*sec(c + d*x)^(3/2)*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(1/2)*sqrt(a + a*sec(c + d*x))), x, 6, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) - (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*A*sqrt(sec(c + d*x))*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))), x, 4, (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*A*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - (2*(A - 3*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))), x, 5, -((sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (2*A*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) - (2*(A - 5*B)*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*(13*A - 5*B + 15*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))), x, 6, (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*A*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) - (2*(A - 7*B)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*(31*A - 7*B + 35*C)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - (2*(43*A - 91*B + 35*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [(sqrt(sec(c + d*x))*(a*A + (A*b + a*B)*sec(c + d*x) + b*B*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 6, ((2*A*b + 2*a*B - b*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) + (sqrt(2)*(a - b)*(A - B)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (b*B*sec(c + d*x)^(3/2)*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]

    @test_int [(sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 8, ((8*A - 12*B + 19*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*a^(3/2)*d) - ((5*A - 9*B + 13*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((2*A - 6*B + 7*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*a*d*sqrt(a + a*sec(c + d*x))) + ((A - B + 2*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 7, ((2*B - 3*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) + ((A - 5*B + 9*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((A - B + 3*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 6, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) + ((3*A + B - 5*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(3/2)), x, 4, -(((7*A - 3*B - C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d)) - ((A - B + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((5*A - B + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)), x, 5, ((11*A - 7*B + 3*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sin(c + d*x))/(2*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((7*A - 3*B + 3*C)*sin(c + d*x))/(6*a*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((19*A - 15*B + 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(6*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)), x, 6, -(((15*A - 11*B + 7*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*a^(3/2)*d)) - ((A - B + C)*sin(c + d*x))/(2*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)) + ((9*A - 5*B + 5*C)*sin(c + d*x))/(10*a*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) - ((39*A - 35*B + 15*C)*sin(c + d*x))/(30*a*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((147*A - 95*B + 75*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(30*a*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [(sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 8, ((2*B - 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) + ((3*A - 43*B + 115*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((A + 7*B - 15*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((3*A - 11*B + 35*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 7, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) + ((5*A + 3*B - 43*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((5*A + 3*B - 11*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 4, ((19*A + 5*B + 3*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((9*A - B - 7*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(5/2)), x, 5, -(((75*A - 19*B - 5*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d)) - ((A - B + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((13*A - 5*B - 3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((49*A - 9*B + C)*sqrt(sec(c + d*x))*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)), x, 6, ((163*A - 75*B + 19*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sin(c + d*x))/(4*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)) - ((17*A - 9*B + C)*sin(c + d*x))/(16*a*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((95*A - 39*B + 15*C)*sin(c + d*x))/(48*a^2*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((299*A - 147*B + 27*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(48*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)), x, 7, -(((283*A - 163*B + 75*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*a^(5/2)*d)) - ((A - B + C)*sin(c + d*x))/(4*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)) - ((21*A - 13*B + 5*C)*sin(c + d*x))/(16*a*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)) + ((157*A - 85*B + 45*C)*sin(c + d*x))/(80*a^2*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) - ((787*A - 475*B + 195*C)*sin(c + d*x))/(240*a^2*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((2671*A - 1495*B + 735*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(240*a^2*d*sqrt(a + a*sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+a*sec(e+f*x))^(m/3)*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^(2/3), x, 10, (3*C*(a + a*sec(c + d*x))^(2/3)*tan(c + d*x))/(5*d) + (3*sqrt(2)*A*AppellF1(7/6, 1/2, 1, 13/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(2/3)*tan(c + d*x))/(7*d*sqrt(1 - sec(c + d*x))) + (3*(5*B + 2*C)*(a + a*sec(c + d*x))^(2/3)*tan(c + d*x))/(10*d*(1 + sec(c + d*x))) - (3^(3/4)*(5*B + 2*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(10*2^(1/3)*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(1/3), x, 9, (3*C*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(1/3)) + (3*sqrt(2)*A*AppellF1(1/6, 1/2, 1, 7/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*tan(c + d*x))/(d*sqrt(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)) - (3^(3/4)*(2*B - C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(2*2^(1/3)*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(4/3), x, 9, -((3*(A - B + C)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^(4/3))) + (3*sqrt(2)*A*AppellF1(1/6, 1/2, 1, 7/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*tan(c + d*x))/(a*d*sqrt(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)) + (3^(3/4)*(A - B - 4*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(5*2^(1/3)*a*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(7/3), x, 10, -((3*(A - B + C)*tan(c + d*x))/(11*d*(a + a*sec(c + d*x))^(7/3))) - (3*(4*A - 4*B - 7*C)*tan(c + d*x))/(55*a^2*d*(1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)) - (3*sqrt(2)*A*AppellF1(-(5/6), 1/2, 1, 1/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*tan(c + d*x))/(5*a^2*d*sqrt(1 - sec(c + d*x))*(1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)) + (3^(3/4)*(4*A - 4*B - 7*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(55*2^(1/3)*a^2*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]

    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^(4/3), x, 12, (3*a*(7*B + 4*C)*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(28*d) + (3*sqrt(2)*a*A*AppellF1(11/6, 1/2, 1, 17/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*(1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(11*d*sqrt(1 - sec(c + d*x))) + (3*C*(a + a*sec(c + d*x))^(4/3)*tan(c + d*x))/(7*d) - (15*(1 + sqrt(3))*a*(7*B + 4*C)*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(28*d*(1 + sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))) + (15*3^(1/4)*a*(7*B + 4*C)*Elliptic.E(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(14*2^(2/3)*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2))) + (5*3^(3/4)*(1 - sqrt(3))*a*(7*B + 4*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(28*2^(2/3)*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^(1/3), x, 11, (3*C*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*d) + (3*sqrt(2)*A*AppellF1(5/6, 1/2, 1, 11/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(5*d*sqrt(1 - sec(c + d*x))) - (3*(1 + sqrt(3))*(4*B + C)*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*d*(1 + sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))) + (3*3^(1/4)*(4*B + C)*Elliptic.E(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(2*2^(2/3)*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2))) + (3^(3/4)*(1 - sqrt(3))*(4*B + C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(4*2^(2/3)*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(2/3), x, 11, -((3*(A - B + C)*tan(c + d*x))/(d*(a + a*sec(c + d*x))^(2/3))) + (3*sqrt(2)*A*AppellF1(5/6, 1/2, 1, 11/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(5*a*d*sqrt(1 - sec(c + d*x))) - (3*(1 + sqrt(3))*(A - B + 2*C)*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(a*d*(1 + sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))) + (3*2^(1/3)*3^(1/4)*(A - B + 2*C)*Elliptic.E(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(a*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2))) + (3^(3/4)*(1 - sqrt(3))*(A - B + 2*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(a + a*sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(2^(2/3)*a*d*(1 - sec(c + d*x))*(1 + sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + a*sec(c + d*x))^(5/3), x, 12, -((3*(A - B + C)*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^(5/3))) - (3*(2*A - 2*B - 5*C)*tan(c + d*x))/(7*a*d*(a + a*sec(c + d*x))^(2/3)) - (3*sqrt(2)*A*AppellF1(-(1/6), 1/2, 1, 5/6, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*tan(c + d*x))/(a*d*sqrt(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(2/3)) - (3*(1 + sqrt(3))*(2*A - 2*B - 5*C)*(1 + sec(c + d*x))^(1/3)*tan(c + d*x))/(7*a*d*(a + a*sec(c + d*x))^(2/3)*(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))) + (3*2^(1/3)*3^(1/4)*(2*A - 2*B - 5*C)*Elliptic.E(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(7*a*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2))) + (3^(3/4)*(1 - sqrt(3))*(2*A - 2*B - 5*C)*Elliptic.F(acos((2^(1/3) - (1 - sqrt(3))*(1 + sec(c + d*x))^(1/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))), (1/4)*(2 + sqrt(3)))*(1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3))*sqrt((2^(2/3) + 2^(1/3)*(1 + sec(c + d*x))^(1/3) + (1 + sec(c + d*x))^(2/3))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)*tan(c + d*x))/(7*2^(2/3)*a*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(2/3)*sqrt(-(((1 + sec(c + d*x))^(1/3)*(2^(1/3) - (1 + sec(c + d*x))^(1/3)))/(2^(1/3) - (1 + sqrt(3))*(1 + sec(c + d*x))^(1/3))^2)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^n*(a+a*sec(e+f*x))^m*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)*when*m*and*n*symbolic=#

    @test_int [sec(c + d*x)^m*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + a*sec(c + d*x))^n, x, 8, (C*sec(c + d*x)^(1 + m)*(a + a*sec(c + d*x))^n*sin(c + d*x))/(d*(1 + m + n)) + (2^(3/2 + n)*(C*n + B*(1 + m + n))*AppellF1(1/2, 1 - m, -(1/2) - n, 3/2, 1 - sec(c + d*x), (1/2)*(1 - sec(c + d*x)))*(1 + sec(c + d*x))^(-(1/2) - n)*(a + a*sec(c + d*x))^n*tan(c + d*x))/(d*(1 + m + n)) + (2^(1/2 + n)*(C*(m - n) + A*(1 + m + n) - B*(1 + m + n))*AppellF1(1/2, 1 - m, 1/2 - n, 3/2, 1 - sec(c + d*x), (1/2)*(1 - sec(c + d*x)))*(1 + sec(c + d*x))^(-(1/2) - n)*(a + a*sec(c + d*x))^n*tan(c + d*x))/(d*(1 + m + n))]

    @test_int [sec(c + d*x)^(-n - 1)*(a + a*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, If(13>=8, (A*(a + a*sec(c + d*x))^n*sin(c + d*x))/(sec(c + d*x)^n*(d*(1 + n))) + ((A*n + B*(1 + n) - C*(1 + n))*HypergeometricFunctions._₂F₁(1/2 - n, -n, 1 - n, -((2*sec(c + d*x))/(1 - sec(c + d*x))))*sec(c + d*x)^(1 - n)*((1 + sec(c + d*x))/(1 - sec(c + d*x)))^(1/2 - n)*(a + a*sec(c + d*x))^n*sin(c + d*x))/(d*n*(1 + n)*(1 + sec(c + d*x))) + (2^(3/2 + n)*C*AppellF1(1/2, 1 + n, -(1/2) - n, 3/2, 1 - sec(c + d*x), (1/2)*(1 - sec(c + d*x)))*(1 + sec(c + d*x))^(-(1/2) - n)*(a + a*sec(c + d*x))^n*tan(c + d*x))/d, (A*(a + a*sec(c + d*x))^n*sin(c + d*x))/(sec(c + d*x)^n*(d*(1 + n))) + ((B - C + A*n + B*n - C*n)*HypergeometricFunctions._₂F₁(1/2 - n, -n, 1 - n, -((2*sec(c + d*x))/(1 - sec(c + d*x))))*sec(c + d*x)^(1 - n)*((1 + sec(c + d*x))/(1 - sec(c + d*x)))^(1/2 - n)*(a + a*sec(c + d*x))^n*sin(c + d*x))/(d*n*(1 + n)*(1 + sec(c + d*x))) + (2^(3/2 + n)*C*AppellF1(1/2, 1 + n, -(1/2) - n, 3/2, 1 - sec(c + d*x), (1/2)*(1 - sec(c + d*x)))*(1 + sec(c + d*x))^(-(1/2) - n)*(a + a*sec(c + d*x))^n*tan(c + d*x))/d)]

    @test_int [sec(c + d*x)^(-n - 1)*(a + a*sec(c + d*x))^n*(A + B*sec(c + d*x) + C*sec(c + d*x)^2) + (((-a)*(B + A*n + B*n) - a*C*(1 + n)*sec(c + d*x))*(a + a*sec(c + d*x))^n)/(sec(c + d*x)^n*(a*(1 + n))), x, 16, (A*(a + a*sec(c + d*x))^n*sin(c + d*x))/(sec(c + d*x)^n*(d*(1 + n)))]

    @test_int [(a + a*sec(c + d*x))^m*(B - C + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (sqrt(2)*(B - C)*AppellF1(3/2 + m, 1/2, 1, 5/2 + m, (1/2)*(1 + sec(c + d*x)), 1 + sec(c + d*x))*(1 + sec(c + d*x))*(a + a*sec(c + d*x))^m*tan(c + d*x))/(d*(3 + 2*m)*sqrt(1 - sec(c + d*x))) + (2^(3/2 + m)*C*HypergeometricFunctions._₂F₁(1/2, -(1/2) - m, 3/2, (1/2)*(1 - sec(c + d*x)))*(1 + sec(c + d*x))^(-(1/2) - m)*(a + a*sec(c + d*x))^m*tan(c + d*x))/d]

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*(a+b*sec(e+f*x))^m*(d*sec(e+f*x))^n*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#
    #==#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^n*(a+b*sec(e+f*x))^m*(A+C*sec(e+f*x)^2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+b*sec(e+f*x))^m*(A+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, (a*(4*A + 3*C)*atanh(sin(c + d*x)))/(8*d) + (b*(5*A + 4*C)*tan(c + d*x))/(5*d) + (a*(4*A + 3*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (a*C*sec(c + d*x)^3*tan(c + d*x))/(4*d) + (b*C*sec(c + d*x)^4*tan(c + d*x))/(5*d) + (b*(5*A + 4*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, (b*(4*A + 3*C)*atanh(sin(c + d*x)))/(8*d) + (a*(3*A + 2*C)*tan(c + d*x))/(3*d) + (b*(4*A + 3*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (a*C*sec(c + d*x)^2*tan(c + d*x))/(3*d) + (b*C*sec(c + d*x)^3*tan(c + d*x))/(4*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 6, (a*(2*A + C)*atanh(sin(c + d*x)))/(2*d) + (b*(3*A + 2*C)*tan(c + d*x))/(3*d) + (a*C*sec(c + d*x)*tan(c + d*x))/(2*d) + (b*C*sec(c + d*x)^2*tan(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, a*A*x + (b*(2*A + C)*atanh(sin(c + d*x)))/(2*d) + (a*C*tan(c + d*x))/d + (b*C*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, A*b*x + (a*C*atanh(sin(c + d*x)))/d + (a*A*sin(c + d*x))/d + (b*C*tan(c + d*x))/d]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, (1/2)*a*(A + 2*C)*x + (b*C*atanh(sin(c + d*x)))/d + (A*b*sin(c + d*x))/d + (a*A*cos(c + d*x)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, (1/2)*b*(A + 2*C)*x + (a*(2*A + 3*C)*sin(c + d*x))/(3*d) + (A*b*cos(c + d*x)*sin(c + d*x))/(2*d) + (a*A*cos(c + d*x)^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, (1/8)*a*(3*A + 4*C)*x + (b*(A + C)*sin(c + d*x))/d + (a*(3*A + 4*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*A*cos(c + d*x)^3*sin(c + d*x))/(4*d) - (A*b*sin(c + d*x)^3)/(3*d)]
    @test_int [cos(c + d*x)^5*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, (1/8)*b*(3*A + 4*C)*x + (a*(4*A + 5*C)*sin(c + d*x))/(5*d) + (b*(3*A + 4*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (A*b*cos(c + d*x)^3*sin(c + d*x))/(4*d) + (a*A*cos(c + d*x)^4*sin(c + d*x))/(5*d) - (a*(4*A + 5*C)*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, (a*b*(4*A + 3*C)*atanh(sin(c + d*x)))/(4*d) + ((a^4*C + 2*a^2*b^2*(5*A + 3*C) + 2*b^4*(5*A + 4*C))*tan(c + d*x))/(15*b^2*d) + (a*(20*A*b^2 + 2*a^2*C + 13*b^2*C)*sec(c + d*x)*tan(c + d*x))/(60*b*d) + ((a^2*C + 2*b^2*(5*A + 4*C))*(a + b*sec(c + d*x))^2*tan(c + d*x))/(30*b^2*d) - (a*C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(10*b^2*d) + (C*sec(c + d*x)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 7, ((4*a^2*(2*A + C) + b^2*(4*A + 3*C))*atanh(sin(c + d*x)))/(8*d) + (a*(12*A*b^2 - a^2*C + 8*b^2*C)*tan(c + d*x))/(6*b*d) - ((2*a^2*C - 3*b^2*(4*A + 3*C))*sec(c + d*x)*tan(c + d*x))/(24*d) - (a*C*(a + b*sec(c + d*x))^2*tan(c + d*x))/(12*b*d) + (C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*b*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, a^2*A*x + (a*b*(2*A + C)*atanh(sin(c + d*x)))/d + ((3*A*b^2 + 2*(a^2 + b^2)*C)*tan(c + d*x))/(3*d) + (a*b*C*sec(c + d*x)*tan(c + d*x))/(3*d) + (C*(a + b*sec(c + d*x))^2*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, 2*a*A*b*x + ((2*A*b^2 + (2*a^2 + b^2)*C)*atanh(sin(c + d*x)))/(2*d) + (A*(a + b*sec(c + d*x))^2*sin(c + d*x))/d - (2*a*b*(A - C)*tan(c + d*x))/d - (b^2*(2*A - C)*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, (1/2)*(2*A*b^2 + a^2*(A + 2*C))*x + (2*a*b*C*atanh(sin(c + d*x)))/d + (a*A*b*sin(c + d*x))/d + (A*cos(c + d*x)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(2*d) - (b^2*(A - 2*C)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, a*b*(A + 2*C)*x + (b^2*C*atanh(sin(c + d*x)))/d + ((2*A*b^2 + a^2*(2*A + 3*C))*sin(c + d*x))/(3*d) + (a*A*b*cos(c + d*x)*sin(c + d*x))/(3*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, (1/8)*(4*b^2*(A + 2*C) + a^2*(3*A + 4*C))*x + (2*a*b*(2*A + 3*C)*sin(c + d*x))/(3*d) + ((2*A*b^2 + a^2*(3*A + 4*C))*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*A*b*cos(c + d*x)^2*sin(c + d*x))/(6*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^2*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, (1/4)*a*b*(3*A + 4*C)*x + ((a^2 + b^2)*(4*A + 5*C)*sin(c + d*x))/(5*d) + (a*b*(3*A + 4*C)*cos(c + d*x)*sin(c + d*x))/(4*d) + (a*A*b*cos(c + d*x)^3*sin(c + d*x))/(10*d) + (A*cos(c + d*x)^4*(a + b*sec(c + d*x))^2*sin(c + d*x))/(5*d) - ((2*A*b^2 + a^2*(4*A + 5*C))*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, (b*(6*a^2*(4*A + 3*C) + b^2*(6*A + 5*C))*atanh(sin(c + d*x)))/(16*d) + (a*(2*a^4*C + 24*b^4*(5*A + 4*C) + a^2*b^2*(30*A + 17*C))*tan(c + d*x))/(60*b^2*d) + ((4*a^4*C + 12*a^2*b^2*(5*A + 3*C) + 15*b^4*(6*A + 5*C))*sec(c + d*x)*tan(c + d*x))/(240*b*d) + (a*(30*A*b^2 + 2*a^2*C + 21*b^2*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(120*b^2*d) + ((2*a^2*C + 5*b^2*(6*A + 5*C))*(a + b*sec(c + d*x))^3*tan(c + d*x))/(120*b^2*d) - (a*C*(a + b*sec(c + d*x))^4*tan(c + d*x))/(15*b^2*d) + (C*sec(c + d*x)*(a + b*sec(c + d*x))^4*tan(c + d*x))/(6*b*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 8, (a*(4*a^2*(2*A + C) + 3*b^2*(4*A + 3*C))*atanh(sin(c + d*x)))/(8*d) - ((3*a^4*C - 4*b^4*(5*A + 4*C) - 4*a^2*b^2*(20*A + 13*C))*tan(c + d*x))/(30*b*d) + (a*(100*A*b^2 - 6*a^2*C + 71*b^2*C)*sec(c + d*x)*tan(c + d*x))/(120*d) - ((3*a^2*C - 4*b^2*(5*A + 4*C))*(a + b*sec(c + d*x))^2*tan(c + d*x))/(60*b*d) - (a*C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(20*b*d) + (C*(a + b*sec(c + d*x))^4*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, a^3*A*x + (b*(12*a^2*(2*A + C) + b^2*(4*A + 3*C))*atanh(sin(c + d*x)))/(8*d) + (a*(6*A*b^2 + (a^2 + 4*b^2)*C)*tan(c + d*x))/(2*d) + (b*(2*a^2*C + b^2*(4*A + 3*C))*sec(c + d*x)*tan(c + d*x))/(8*d) + (a*C*(a + b*sec(c + d*x))^2*tan(c + d*x))/(4*d) + (C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, 3*a^2*A*b*x + (a*(6*A*b^2 + 2*a^2*C + 3*b^2*C)*atanh(sin(c + d*x)))/(2*d) + (A*(a + b*sec(c + d*x))^3*sin(c + d*x))/d - (b*(a^2*(6*A - 8*C) - b^2*(3*A + 2*C))*tan(c + d*x))/(3*d) - (a*b^2*(6*A - 5*C)*sec(c + d*x)*tan(c + d*x))/(6*d) - (b*(3*A - C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/2)*a*(6*A*b^2 + a^2*(A + 2*C))*x + (b*(2*A*b^2 + (6*a^2 + b^2)*C)*atanh(sin(c + d*x)))/(2*d) + (3*A*b*(a + b*sec(c + d*x))^2*sin(c + d*x))/(2*d) + (A*cos(c + d*x)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(2*d) - (3*a*b^2*(3*A - 2*C)*tan(c + d*x))/(2*d) - (b^3*(4*A - C)*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/2)*b*(2*A*b^2 + 3*a^2*(A + 2*C))*x + (3*a*b^2*C*atanh(sin(c + d*x)))/d + (a*(3*A*b^2 + a^2*(2*A + 3*C))*sin(c + d*x))/(3*d) + (A*b*cos(c + d*x)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(2*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^3*sin(c + d*x))/(3*d) - (b^3*(5*A - 6*C)*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/8)*a*(12*b^2*(A + 2*C) + a^2*(3*A + 4*C))*x + (b^3*C*atanh(sin(c + d*x)))/d + (b*(A*b^2 + a^2*(4*A + 6*C))*sin(c + d*x))/(2*d) + (a*(2*A*b^2 + a^2*(3*A + 4*C))*cos(c + d*x)*sin(c + d*x))/(8*d) + (A*b*cos(c + d*x)^2*(a + b*sec(c + d*x))^2*sin(c + d*x))/(4*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^3*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/8)*b*(4*b^2*(A + 2*C) + 3*a^2*(3*A + 4*C))*x + (a*(15*b^2*(2*A + 3*C) + 2*a^2*(4*A + 5*C))*sin(c + d*x))/(15*d) + (3*b*(2*A*b^2 + 5*a^2*(3*A + 4*C))*cos(c + d*x)*sin(c + d*x))/(40*d) + (a*(3*A*b^2 + 2*a^2*(4*A + 5*C))*cos(c + d*x)^2*sin(c + d*x))/(30*d) + (3*A*b*cos(c + d*x)^3*(a + b*sec(c + d*x))^2*sin(c + d*x))/(20*d) + (A*cos(c + d*x)^4*(a + b*sec(c + d*x))^3*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^6*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, (1/16)*a*(6*b^2*(3*A + 4*C) + a^2*(5*A + 6*C))*x + (b*(9*a^2*(4*A + 5*C) + b^2*(11*A + 15*C))*sin(c + d*x))/(15*d) + (a*(6*b^2*(3*A + 4*C) + a^2*(5*A + 6*C))*cos(c + d*x)*sin(c + d*x))/(16*d) + (a*(6*A*b^2 + 5*a^2*(5*A + 6*C))*cos(c + d*x)^3*sin(c + d*x))/(120*d) + (A*b*cos(c + d*x)^4*(a + b*sec(c + d*x))^2*sin(c + d*x))/(10*d) + (A*cos(c + d*x)^5*(a + b*sec(c + d*x))^3*sin(c + d*x))/(6*d) - (b*(A*b^2 + 3*a^2*(4*A + 5*C))*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, (a*b*(b^2*(6*A + 5*C) + a^2*(8*A + 6*C))*atanh(sin(c + d*x)))/(4*d) + ((2*a^6*C + 8*b^6*(7*A + 6*C) + a^4*b^2*(42*A + 23*C) + 8*a^2*b^4*(49*A + 39*C))*tan(c + d*x))/(105*b^2*d) + (a*(4*a^4*C + 12*a^2*b^2*(7*A + 4*C) + b^4*(406*A + 333*C))*sec(c + d*x)*tan(c + d*x))/(420*b*d) + ((2*a^4*C + 8*b^4*(7*A + 6*C) + 3*a^2*b^2*(14*A + 9*C))*(a + b*sec(c + d*x))^2*tan(c + d*x))/(210*b^2*d) + (a*(42*A*b^2 + 2*a^2*C + 31*b^2*C)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(210*b^2*d) + ((a^2*C + 3*b^2*(7*A + 6*C))*(a + b*sec(c + d*x))^4*tan(c + d*x))/(105*b^2*d) - (a*C*(a + b*sec(c + d*x))^5*tan(c + d*x))/(21*b^2*d) + (C*sec(c + d*x)*(a + b*sec(c + d*x))^5*tan(c + d*x))/(7*b*d)]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 9, ((8*a^4*(2*A + C) + 12*a^2*b^2*(4*A + 3*C) + b^4*(6*A + 5*C))*atanh(sin(c + d*x)))/(16*d) - (a*(4*a^4*C - 32*b^4*(5*A + 4*C) - a^2*b^2*(190*A + 121*C))*tan(c + d*x))/(60*b*d) - ((8*a^4*C - 15*b^4*(6*A + 5*C) - 2*a^2*b^2*(130*A + 89*C))*sec(c + d*x)*tan(c + d*x))/(240*d) + (a*(70*A*b^2 - 4*a^2*C + 53*b^2*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(120*b*d) - ((4*a^2*C - 5*b^2*(6*A + 5*C))*(a + b*sec(c + d*x))^3*tan(c + d*x))/(120*b*d) - (a*C*(a + b*sec(c + d*x))^4*tan(c + d*x))/(30*b*d) + (C*(a + b*sec(c + d*x))^5*tan(c + d*x))/(6*b*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, a^4*A*x + (a*b*(4*a^2*(2*A + C) + b^2*(4*A + 3*C))*atanh(sin(c + d*x)))/(2*d) + ((6*a^4*C + 2*b^4*(5*A + 4*C) + a^2*b^2*(85*A + 56*C))*tan(c + d*x))/(15*d) + (a*b*(40*A*b^2 + 6*a^2*C + 29*b^2*C)*sec(c + d*x)*tan(c + d*x))/(30*d) + ((3*a^2*C + b^2*(5*A + 4*C))*(a + b*sec(c + d*x))^2*tan(c + d*x))/(15*d) + (a*C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(5*d) + (C*(a + b*sec(c + d*x))^4*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, 4*a^3*A*b*x + ((8*a^4*C + 24*a^2*b^2*(2*A + C) + b^4*(4*A + 3*C))*atanh(sin(c + d*x)))/(8*d) + (A*(a + b*sec(c + d*x))^4*sin(c + d*x))/d - (a*b*(a^2*(12*A - 19*C) - 8*b^2*(3*A + 2*C))*tan(c + d*x))/(6*d) - (b^2*(a^2*(24*A - 26*C) - 3*b^2*(4*A + 3*C))*sec(c + d*x)*tan(c + d*x))/(24*d) - (a*b*(12*A - 7*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(12*d) - (b*(4*A - C)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, (1/2)*a^2*(12*A*b^2 + a^2*(A + 2*C))*x + (2*a*b*(2*A*b^2 + (2*a^2 + b^2)*C)*atanh(sin(c + d*x)))/d + (2*A*b*(a + b*sec(c + d*x))^3*sin(c + d*x))/d + (A*cos(c + d*x)*(a + b*sec(c + d*x))^4*sin(c + d*x))/(2*d) - (b^2*(a^2*(39*A - 34*C) - 2*b^2*(3*A + 2*C))*tan(c + d*x))/(6*d) - (a*b^3*(9*A - 4*C)*sec(c + d*x)*tan(c + d*x))/(3*d) - (b^2*(15*A - 2*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, 2*a*b*(2*A*b^2 + a^2*(A + 2*C))*x + (b^2*(2*A*b^2 + (12*a^2 + b^2)*C)*atanh(sin(c + d*x)))/(2*d) + ((6*A*b^2 + a^2*(2*A + 3*C))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(3*d) + (2*A*b*cos(c + d*x)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(3*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^4*sin(c + d*x))/(3*d) - (2*a*b*(b^2*(11*A - 6*C) + a^2*(2*A + 3*C))*tan(c + d*x))/(3*d) - (b^2*(3*b^2*(6*A - C) + a^2*(4*A + 6*C))*sec(c + d*x)*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, (1/8)*(8*A*b^4 + 24*a^2*b^2*(A + 2*C) + a^4*(3*A + 4*C))*x + (4*a*b^3*C*atanh(sin(c + d*x)))/d + (a*b*(12*A*b^2 + a^2*(23*A + 36*C))*sin(c + d*x))/(12*d) + ((4*A*b^2 + a^2*(3*A + 4*C))*cos(c + d*x)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(8*d) + (A*b*cos(c + d*x)^2*(a + b*sec(c + d*x))^3*sin(c + d*x))/(3*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^4*sin(c + d*x))/(4*d) - (b^2*(2*b^2*(13*A - 12*C) + 3*a^2*(3*A + 4*C))*tan(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^5*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, (1/2)*a*b*(4*b^2*(A + 2*C) + a^2*(3*A + 4*C))*x + (b^4*C*atanh(sin(c + d*x)))/d + ((6*A*b^4 + 2*a^4*(4*A + 5*C) + a^2*b^2*(56*A + 85*C))*sin(c + d*x))/(15*d) + (a*b*(6*A*b^2 + a^2*(29*A + 40*C))*cos(c + d*x)*sin(c + d*x))/(30*d) + ((3*A*b^2 + a^2*(4*A + 5*C))*cos(c + d*x)^2*(a + b*sec(c + d*x))^2*sin(c + d*x))/(15*d) + (A*b*cos(c + d*x)^3*(a + b*sec(c + d*x))^3*sin(c + d*x))/(5*d) + (A*cos(c + d*x)^4*(a + b*sec(c + d*x))^4*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^6*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, (1/16)*(8*b^4*(A + 2*C) + 12*a^2*b^2*(3*A + 4*C) + a^4*(5*A + 6*C))*x + (4*a*b*(5*b^2*(2*A + 3*C) + 2*a^2*(4*A + 5*C))*sin(c + d*x))/(15*d) + ((24*A*b^4 + 15*a^4*(5*A + 6*C) + 10*a^2*b^2*(49*A + 66*C))*cos(c + d*x)*sin(c + d*x))/(240*d) + (a*b*(4*A*b^2 + a^2*(39*A + 50*C))*cos(c + d*x)^2*sin(c + d*x))/(60*d) + ((12*A*b^2 + 5*a^2*(5*A + 6*C))*cos(c + d*x)^3*(a + b*sec(c + d*x))^2*sin(c + d*x))/(120*d) + (2*A*b*cos(c + d*x)^4*(a + b*sec(c + d*x))^3*sin(c + d*x))/(15*d) + (A*cos(c + d*x)^5*(a + b*sec(c + d*x))^4*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^7*(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, (1/4)*a*b*(2*b^2*(3*A + 4*C) + a^2*(5*A + 6*C))*x + ((12*a^4*(6*A + 7*C) + b^4*(74*A + 105*C) + 3*a^2*b^2*(162*A + 203*C))*sin(c + d*x))/(105*d) + (a*b*(2*b^2*(3*A + 4*C) + a^2*(5*A + 6*C))*cos(c + d*x)*sin(c + d*x))/(4*d) + (a*b*(6*A*b^2 + a^2*(103*A + 126*C))*cos(c + d*x)^3*sin(c + d*x))/(210*d) + ((2*A*b^2 + a^2*(6*A + 7*C))*cos(c + d*x)^4*(a + b*sec(c + d*x))^2*sin(c + d*x))/(35*d) + (2*A*b*cos(c + d*x)^5*(a + b*sec(c + d*x))^3*sin(c + d*x))/(21*d) + (A*cos(c + d*x)^6*(a + b*sec(c + d*x))^4*sin(c + d*x))/(7*d) - ((4*A*b^4 + 4*a^4*(6*A + 7*C) + 3*a^2*b^2*(50*A + 63*C))*sin(c + d*x)^3)/(105*d)]

    @test_int [(a^2 - b^2*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 8, a^5*x + (b*(24*a^4 - 8*a^2*b^2 - 3*b^4)*atanh(sin(c + d*x)))/(8*d) + (a*b^2*(5*a^2 - 4*b^2)*tan(c + d*x))/(2*d) + (b^3*(2*a^2 - 3*b^2)*sec(c + d*x)*tan(c + d*x))/(8*d) - (a*b^2*(a + b*sec(c + d*x))^2*tan(c + d*x))/(4*d) - (b^2*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*d)]
    @test_int [(a^2 - b^2*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 7, a^4*x + (a*b*(2*a^2 - b^2)*atanh(sin(c + d*x)))/d + (b^2*(a^2 - 2*b^2)*tan(c + d*x))/(3*d) - (a*b^3*sec(c + d*x)*tan(c + d*x))/(3*d) - (b^2*(a + b*sec(c + d*x))^2*tan(c + d*x))/(3*d)]
    @test_int [(a^2 - b^2*sec(c + d*x)^2)*(a + b*sec(c + d*x))^1, x, 6, a^3*x + (b*(2*a^2 - b^2)*atanh(sin(c + d*x)))/(2*d) - (a*b^2*tan(c + d*x))/(2*d) - (b^2*(a + b*sec(c + d*x))*tan(c + d*x))/(2*d)]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

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

    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 8, ((2*A*b^2 + (6*a^2 + b^2)*C)*atanh(sin(c + d*x)))/(2*b^4*d) - (2*a*(a^2*A*b^2 - 2*A*b^4 + 3*a^4*C - 4*a^2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^4*(a + b)^(3/2)*d) - (a*(A*b^2 + 3*a^2*C - 2*b^2*C)*tan(c + d*x))/(b^3*(a^2 - b^2)*d) + ((2*A*b^2 + 3*a^2*C - b^2*C)*sec(c + d*x)*tan(c + d*x))/(2*b^2*(a^2 - b^2)*d) - ((A*b^2 + a^2*C)*sec(c + d*x)^2*tan(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 7, -((2*a*C*atanh(sin(c + d*x)))/(b^3*d)) - (2*(A*b^4 - 2*a^4*C + 3*a^2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^3*(a + b)^(3/2)*d) + (C*tan(c + d*x))/(b^2*d) + (a*(A*b^2 + a^2*C)*tan(c + d*x))/(b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 6, (C*atanh(sin(c + d*x)))/(b^2*d) + (2*a*(A*b^2 - a^2*C + 2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^2*(a + b)^(3/2)*d) - ((A*b^2 + a^2*C)*tan(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 5, (A*x)/a^2 - (2*b*(2*a^2*A - A*b^2 + a^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^2*(a - b)^(3/2)*(a + b)^(3/2)*d) + ((A*b^2 + a^2*C)*tan(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 6, -((2*A*b*x)/a^3) + (2*(3*a^2*A*b^2 - 2*A*b^4 + a^4*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^3*(a - b)^(3/2)*(a + b)^(3/2)*d) - ((2*A*b^2 - a^2*(A - C))*sin(c + d*x))/(a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*sin(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 7, ((6*A*b^2 + a^2*(A + 2*C))*x)/(2*a^4) - (2*b*(4*a^2*A*b^2 - 3*A*b^4 + 2*a^4*C - a^2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*(a - b)^(3/2)*(a + b)^(3/2)*d) + (b*(3*A*b^2 - a^2*(2*A - C))*sin(c + d*x))/(a^3*(a^2 - b^2)*d) - ((3*A*b^2 - a^2*(A - 2*C))*cos(c + d*x)*sin(c + d*x))/(2*a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*cos(c + d*x)*sin(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 8, -((b*(4*A*b^2 + a^2*(A + 2*C))*x)/a^5) + (2*b^2*(5*a^2*A*b^2 - 4*A*b^4 + 3*a^4*C - 2*a^2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*(a - b)^(3/2)*(a + b)^(3/2)*d) - ((12*A*b^4 - a^2*b^2*(7*A - 6*C) - a^4*(2*A + 3*C))*sin(c + d*x))/(3*a^4*(a^2 - b^2)*d) + (b*(2*A*b^2 - a^2*(A - C))*cos(c + d*x)*sin(c + d*x))/(a^3*(a^2 - b^2)*d) - ((4*A*b^2 - a^2*(A - 3*C))*cos(c + d*x)^2*sin(c + d*x))/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*cos(c + d*x)^2*sin(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 9, ((2*A*b^2 + (12*a^2 + b^2)*C)*atanh(sin(c + d*x)))/(2*b^5*d) - (a*(6*A*b^6 + a^4*b^2*(2*A - 29*C) - 5*a^2*b^4*(A - 4*C) + 12*a^6*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*b^5*(a + b)^(5/2)*d) - (a*(a^2*b^2*(2*A - 21*C) - b^4*(5*A - 6*C) + 12*a^4*C)*tan(c + d*x))/(2*b^4*(a^2 - b^2)^2*d) + ((a^2*b^2*(A - 10*C) - b^4*(4*A - C) + 6*a^4*C)*sec(c + d*x)*tan(c + d*x))/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 + a^2*C)*sec(c + d*x)^3*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((3*A*b^4 - 4*a^4*C + 7*a^2*b^2*C)*sec(c + d*x)^2*tan(c + d*x))/(2*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 8, -((3*a*C*atanh(sin(c + d*x)))/(b^4*d)) + ((2*A*b^6 + 6*a^6*C - 15*a^4*b^2*C + a^2*b^4*(A + 12*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*b^4*(a + b)^(5/2)*d) + ((A*b^2 + 3*a^2*C - 2*b^2*C)*tan(c + d*x))/(2*b^3*(a^2 - b^2)*d) - ((A*b^2 + a^2*C)*sec(c + d*x)^2*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - (a*(2*A*b^4 - 3*a^4*C + a^2*b^2*(A + 6*C))*tan(c + d*x))/(2*b^3*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 7, (C*atanh(sin(c + d*x)))/(b^3*d) - (a*(3*A*b^4 + (2*a^4 - 5*a^2*b^2 + 6*b^4)*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*b^3*(a + b)^(5/2)*d) + (a*(A*b^2 + a^2*C)*tan(c + d*x))/(2*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((2*A*b^4 - 3*a^4*C + a^2*b^2*(A + 6*C))*tan(c + d*x))/(2*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 6, ((a^2*(2*A + C) + b^2*(A + 2*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*(a + b)^(5/2)*d) - ((A*b^2 + a^2*C)*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - (a*(3*A*b^2 - a^2*C + 4*b^2*C)*tan(c + d*x))/(2*b*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 6, (A*x)/a^3 + (b*(5*a^2*A*b^2 - 2*A*b^4 - 3*a^4*(2*A + C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^3*(a - b)^(5/2)*(a + b)^(5/2)*d) + ((A*b^2 + a^2*C)*tan(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - ((2*A*b^4 - a^4*C - a^2*b^2*(5*A + 2*C))*tan(c + d*x))/(2*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 7, -((3*A*b*x)/a^4) - ((15*a^2*A*b^4 - 6*A*b^6 - 2*a^6*C - a^4*b^2*(12*A + C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*(a - b)^(5/2)*(a + b)^(5/2)*d) - ((11*a^2*A*b^2 - 6*A*b^4 - a^4*(2*A - 3*C))*sin(c + d*x))/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 + a^2*C)*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - ((3*A*b^4 - 2*a^4*C - a^2*b^2*(6*A + C))*sin(c + d*x))/(2*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 8, ((12*A*b^2 + a^2*(A + 2*C))*x)/(2*a^5) - (b*(12*A*b^6 - a^2*b^4*(29*A - 2*C) + 5*a^4*b^2*(4*A - C) + 6*a^6*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*(a - b)^(5/2)*(a + b)^(5/2)*d) - (b*(12*A*b^4 + a^4*(6*A - 5*C) - a^2*b^2*(21*A - 2*C))*sin(c + d*x))/(2*a^4*(a^2 - b^2)^2*d) + ((6*A*b^4 + a^4*(A - 4*C) - a^2*b^2*(10*A - C))*cos(c + d*x)*sin(c + d*x))/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 + a^2*C)*cos(c + d*x)*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((7*a^2*A*b^2 - 4*A*b^4 + 3*a^4*C)*cos(c + d*x)*sin(c + d*x))/(2*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 9, -((4*a*C*atanh(sin(c + d*x)))/(b^5*d)) - ((2*A*b^8 - 8*a^8*C + 28*a^6*b^2*C - 35*a^4*b^4*C + a^2*b^6*(3*A + 20*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*b^5*(a + b)^(7/2)*d) - ((5*A*b^4 - (12*a^4 - 23*a^2*b^2 + 6*b^4)*C)*tan(c + d*x))/(6*b^4*(a^2 - b^2)^2*d) - ((A*b^2 + a^2*C)*sec(c + d*x)^3*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + ((3*A*b^4 - 4*a^4*C + a^2*b^2*(2*A + 9*C))*sec(c + d*x)^2*tan(c + d*x))/(6*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + (a*(2*A*b^6 + 4*a^6*C - 11*a^4*b^2*C + 3*a^2*b^4*(A + 4*C))*tan(c + d*x))/(2*b^4*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^3*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 8, (C*atanh(sin(c + d*x)))/(b^4*d) + (a*(a^2*b^4*(A - 8*C) - 2*a^6*C + 7*a^4*b^2*C + 4*b^6*(A + 2*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*b^4*(a + b)^(7/2)*d) - ((A*b^2 + a^2*C)*sec(c + d*x)^2*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - (a*(2*A*b^4 - 3*a^4*C + a^2*b^2*(3*A + 8*C))*tan(c + d*x))/(6*b^3*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) - ((4*A*b^6 + 9*a^6*C + 2*a^2*b^4*(7*A + 17*C) - a^4*b^2*(3*A + 28*C))*tan(c + d*x))/(6*b^3*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 7, -((b*(b^2*(A + 2*C) + a^2*(4*A + 3*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*(a + b)^(7/2)*d)) + (a*(A*b^2 + a^2*C)*tan(c + d*x))/(3*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + ((3*A*b^4 - 4*a^4*C + a^2*b^2*(2*A + 9*C))*tan(c + d*x))/(6*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + (a*(a^2*b^2*(2*A - 5*C) + 2*a^4*C + b^4*(13*A + 18*C))*tan(c + d*x))/(6*b^2*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 7, (a*(a^2*(2*A + C) + b^2*(3*A + 4*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*(a + b)^(7/2)*d) - ((A*b^2 + a^2*C)*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - (a*(5*A*b^2 - a^2*C + 6*b^2*C)*tan(c + d*x))/(6*b*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + ((a^4*C - 2*b^4*(2*A + 3*C) - a^2*b^2*(11*A + 10*C))*tan(c + d*x))/(6*b*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 7, (A*x)/a^4 - (b*(7*a^2*A*b^4 - 2*A*b^6 - a^4*b^2*(8*A - C) + 4*a^6*(2*A + C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*(a - b)^(7/2)*(a + b)^(7/2)*d) + ((A*b^2 + a^2*C)*tan(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - ((3*A*b^4 - 2*a^4*C - a^2*b^2*(8*A + 3*C))*tan(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) - ((17*a^2*A*b^4 - 6*A*b^6 - 2*a^6*C - 13*a^4*b^2*(2*A + C))*tan(c + d*x))/(6*a^3*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 8, -((4*A*b*x)/a^5) - ((35*a^4*A*b^4 - 28*a^2*A*b^6 + 8*A*b^8 - 2*a^8*C - a^6*b^2*(20*A + 3*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*(a - b)^(7/2)*(a + b)^(7/2)*d) + ((68*a^2*A*b^4 - 24*A*b^6 + a^6*(6*A - 11*C) - a^4*b^2*(65*A + 4*C))*sin(c + d*x))/(6*a^4*(a^2 - b^2)^3*d) + ((A*b^2 + a^2*C)*sin(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - ((4*A*b^4 - 3*a^4*C - a^2*b^2*(9*A + 2*C))*sin(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) - ((11*a^2*A*b^4 - 4*A*b^6 - 2*a^6*C - 3*a^4*b^2*(4*A + C))*sin(c + d*x))/(2*a^3*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 9, ((20*A*b^2 + a^2*(A + 2*C))*x)/(2*a^6) + ((20*A*b^9 - a^2*b^7*(69*A - 2*C) - 8*a^6*b^3*(5*A - C) + 7*a^4*b^5*(12*A - C) - 8*a^8*b*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^6*sqrt(a - b)*sqrt(a + b)*(a^2 - b^2)^3*d) + (b*(60*A*b^6 - a^6*(24*A - 26*C) + a^4*b^2*(146*A - 17*C) - a^2*b^4*(167*A - 6*C))*sin(c + d*x))/(6*a^5*(a^2 - b^2)^3*d) - ((10*A*b^6 - a^6*(A - 6*C) + a^4*b^2*(23*A - 2*C) - a^2*b^4*(27*A - C))*cos(c + d*x)*sin(c + d*x))/(2*a^4*(a^2 - b^2)^3*d) + ((A*b^2 + a^2*C)*cos(c + d*x)*sin(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - ((5*A*b^4 - 4*a^4*C - a^2*b^2*(10*A + C))*cos(c + d*x)*sin(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + ((20*A*b^6 - a^2*b^4*(53*A - 2*C) + 12*a^6*C + a^4*b^2*(48*A + C))*cos(c + d*x)*sin(c + d*x))/(6*a^3*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]

    @test_int [(a^2 - b^2*sec(c + d*x)^2)/(a + b*sec(c + d*x))^1, x, 3, a*x - (b*atanh(sin(c + d*x)))/d]
    @test_int [(a^2 - b^2*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 5, x - (4*b*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*sqrt(a + b)*d)]
    @test_int [(a^2 - b^2*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 6, x/a - (2*b*(3*a^2 - b^2)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a*(a - b)^(3/2)*(a + b)^(3/2)*d) + (2*b^2*tan(c + d*x))/((a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [(a^2 - b^2*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 7, x/a^2 - (2*b*(4*a^4 - 2*a^2*b^2 + b^4)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^2*(a - b)^(5/2)*(a + b)^(5/2)*d) + (b^2*tan(c + d*x))/((a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (b^2*(4*a^2 - b^2)*tan(c + d*x))/(a*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+b*sec(e+f*x))^(m/2)*(A+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 7, (2*(a - b)*sqrt(a + b)*(16*a^4*C + 6*a^2*b^2*(7*A + 4*C) - 21*b^4*(9*A + 7*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^5*d) + (2*(a - b)*sqrt(a + b)*(16*a^3*C + 12*a^2*b*C + 6*a*b^2*(7*A + 6*C) + 21*b^3*(9*A + 7*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^4*d) + (2*a*(21*A*b^2 + 8*a^2*C + 13*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^3*d) - (2*(6*a^2*C - 7*b^2*(9*A + 7*C))*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^2*d) + (2*a*C*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(63*b*d) + (2*C*sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(9*d)]
    @test_int [sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, (-2*a*(a - b)*sqrt(a + b)*(35*A*b^2 + 8*a^2*C + 19*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^4*d) - (2*(a - b)*sqrt(a + b)*(35*A*b^2 + (8*a^2 + 6*a*b + 25*b^2)*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^3*d) + (2*(8*a^2*C + 5*b^2*(7*A + 5*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b^2*d) - (8*a*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*b^2*d) + (2*C*sec(c + d*x)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(7*b*d)]
    @test_int [sec(c + d*x)^1*sqrt(a + b*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 5, (2*(a - b)*sqrt(a + b)*(2*a^2*C - 3*b^2*(5*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^3*d) + (2*(a - b)*sqrt(a + b)*(15*A*b + 2*a*C + 9*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^2*d) - (4*a*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b*d) + (2*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^0*sqrt(a + b*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, (-2*a*(a - b)*sqrt(a + b)*C*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*d) + (2*sqrt(a + b)*(3*A*b - (a - b)*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) - (2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*sqrt(a + b*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, ((a - b)*sqrt(a + b)*(A - 2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) + (sqrt(a + b)*(A*b + 2*(a - b)*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) - (A*b*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d) + (A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 7, (A*(a - b)*sqrt(a + b)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a*d) + (sqrt(a + b)*(A*b + 2*a*(A + 4*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a*d) + (sqrt(a + b)*(A*b^2 - 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^2*d) + (A*b*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*a*d) + (A*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*sqrt(a + b*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 8, -((a - b)*sqrt(a + b)*(3*A*b^2 - 8*a^2*(2*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a^2*b*d) + (sqrt(a + b)*(2*a*A*b - 3*A*b^2 + 8*a^2*(2*A + 3*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a^2*d) - (b*sqrt(a + b)*(A*b^2 + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(8*a^3*d) - ((3*A*b^2 - 8*a^2*(2*A + 3*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*a^2*d) + (A*b*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*a*d) + (A*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*sqrt(a + b*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 9, ((a - b)*sqrt(a + b)*(15*A*b^2 + 4*a^2*(7*A + 12*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a^3*d) - (sqrt(a + b)*(10*a*A*b^2 - 15*A*b^3 - 24*a^3*(3*A + 4*C) - 4*a^2*b*(7*A + 12*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a^3*d) + (sqrt(a + b)*(5*A*b^4 + 8*a^2*b^2*(A + 2*C) - 16*a^4*(3*A + 4*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(64*a^4*d) + (b*(15*A*b^2 + 4*a^2*(7*A + 12*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*a^3*d) - ((5*A*b^2 - 12*a^2*(3*A + 4*C))*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(96*a^2*d) + (A*b*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*a*d) + (A*cos(c + d*x)^3*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d)]

    @test_int [sec(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 8, (4*a*(a - b)*sqrt(a + b)*(8*a^4*C + 3*a^2*b^2*(11*A + 6*C) - b^4*(451*A + 348*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(1155*b^5*d) + (2*(a - b)*sqrt(a + b)*(16*a^4*C + 12*a^3*b*C + 6*a^2*b^2*(11*A + 8*C) - 25*b^4*(11*A + 9*C) + 3*a*b^3*(209*A + 157*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(1155*b^4*d) + (2*(8*a^4*C + 25*b^4*(11*A + 9*C) + a^2*b^2*(33*A + 19*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(1155*b^3*d) + (4*a*(132*A*b^2 - 3*a^2*C + 101*b^2*C)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(1155*b^2*d) + (2*(a^2*C + 3*b^2*(11*A + 9*C))*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(231*b*d) + (2*a*C*sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(33*d) + (2*C*sec(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(11*d)]
    @test_int [sec(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 7, (-2*(a - b)*sqrt(a + b)*(8*a^4*C + 21*b^4*(9*A + 7*C) + 3*a^2*b^2*(21*A + 11*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^4*d) - (2*(a - b)*sqrt(a + b)*(8*a^3*C + 6*a^2*b*C - 21*b^3*(9*A + 7*C) + 3*a*b^2*(21*A + 13*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^3*d) + (2*a*(63*A*b^2 + 8*a^2*C + 39*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^2*d) + (2*(8*a^2*C + 7*b^2*(9*A + 7*C))*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*b^2*d) - (8*a*C*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*b^2*d) + (2*C*sec(c + d*x)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(9*b*d)]
    @test_int [sec(c + d*x)^1*(a + b*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (-4*a*(a - b)*sqrt(a + b)*(70*A*b^2 - 3*a^2*C + 41*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^3*d) + (2*(a - b)*sqrt(a + b)*(105*a*A*b - 35*A*b^2 + 6*a^2*C + 57*a*b*C - 25*b^2*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^2*d) - (2*(6*a^2*C - 5*b^2*(7*A + 5*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b*d) - (4*a*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*b*d) + (2*C*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*b*d)]
    @test_int [sec(c + d*x)^0*(a + b*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 7, (-2*(a - b)*sqrt(a + b)*(a^2*C + b^2*(5*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(5*b^2*d) - (2*sqrt(a + b)*(a^2*C - 2*a*b*(5*A + 2*C) + b^2*(5*A + 3*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(5*b*d) - (2*a*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*a*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*d) + (2*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^1*(a + b*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 7, (a*(a - b)*sqrt(a + b)*(3*A - 8*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) + (sqrt(a + b)*(a*b*(3*A - 8*C) + 6*a^2*C + 2*b^2*(3*A + C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) - (3*A*b*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (A*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/d - (b*(3*A - 2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 7, ((a - b)*sqrt(a + b)*(5*A - 8*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*d) + (sqrt(a + b)*(2*a*A + 5*A*b + 16*a*C - 8*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*d) - (sqrt(a + b)*(3*A*b^2 + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a*d) + (3*A*b*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (A*cos(c + d*x)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(3*A*b^2 + 8*a^2*(2*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a*b*d) + (sqrt(a + b)*(16*a^2*A + 14*a*A*b + 3*A*b^2 + 24*a^2*C + 48*a*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a*d) + (b*sqrt(a + b)*(A*b^2 - 12*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(8*a^2*d) + ((3*A*b^2 + 8*a^2*(2*A + 3*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*a*d) + (A*b*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(a + b*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 9, -((a - b)*sqrt(a + b)*(3*A*b^2 - 4*a^2*(13*A + 20*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(64*a^2*d) + (sqrt(a + b)*(2*a*A*b^2 - 3*A*b^3 + 8*a^3*(3*A + 4*C) + a^2*(52*A*b + 80*b*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(64*a^2*d) - (sqrt(a + b)*(3*A*b^4 + 24*a^2*b^2*(A + 2*C) + 16*a^4*(3*A + 4*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(64*a^3*d) - (b*(3*A*b^2 - 4*a^2*(13*A + 20*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(64*a^2*d) + ((A*b^2 + 4*a^2*(3*A + 4*C))*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(32*a*d) + (A*b*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(8*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]

    @test_int [sec(c + d*x)^3*(a + b*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 9, (2*(a - b)*sqrt(a + b)*(240*a^6*C - 1617*b^6*(13*A + 11*C) + 10*a^4*b^2*(143*A + 76*C) - 3*a^2*b^4*(13299*A + 10223*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(45045*b^5*d) + (2*(a - b)*sqrt(a + b)*(240*a^5*C + 180*a^4*b*C + 1617*b^5*(13*A + 11*C) + 10*a^3*b^2*(143*A + 94*C) + 15*a^2*b^3*(1573*A + 1175*C) - 6*a*b^4*(2717*A + 2174*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(45045*b^4*d) + (2*a*(120*a^4*C + 5*a^2*b^2*(143*A + 79*C) + b^4*(23309*A + 18973*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(45045*b^3*d) - (2*(90*a^4*C - 539*b^4*(13*A + 11*C) - 15*a^2*b^2*(715*A + 543*C))*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(45045*b^2*d) + (2*a*(2717*A*b^2 + 15*a^2*C + 2209*b^2*C)*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(9009*b*d) + (2*(15*a^2*C + 11*b^2*(13*A + 11*C))*sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(1287*d) + (10*a*C*sec(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(143*d) + (2*C*sec(c + d*x)^3*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(13*d)]
    @test_int [sec(c + d*x)^2*(a + b*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 8, (-2*a*(a - b)*sqrt(a + b)*(8*a^4*C + 3*a^2*b^2*(33*A + 17*C) + 3*b^4*(319*A + 247*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(693*b^4*d) - (2*(a - b)*sqrt(a + b)*(8*a^4*C + 6*a^3*b*C + 15*b^4*(11*A + 9*C) + 3*a^2*b^2*(33*A + 19*C) - 6*a*b^3*(132*A + 101*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(693*b^3*d) + (2*(8*a^4*C + 15*b^4*(11*A + 9*C) + 3*a^2*b^2*(33*A + 19*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(693*b^2*d) + (2*a*(99*A*b^2 + 8*a^2*C + 67*b^2*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(693*b^2*d) + (2*(8*a^2*C + 9*b^2*(11*A + 9*C))*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(693*b^2*d) - (8*a*C*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(99*b^2*d) + (2*C*sec(c + d*x)*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(11*b*d)]
    @test_int [sec(c + d*x)^1*(a + b*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (2*(a - b)*sqrt(a + b)*(10*a^4*C - 21*b^4*(9*A + 7*C) - 3*a^2*b^2*(161*A + 93*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^3*d) + (2*(a - b)*sqrt(a + b)*(10*a^3*C + 21*b^3*(9*A + 7*C) + 15*a^2*b*(21*A + 11*C) - 6*a*b^2*(28*A + 19*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^2*d) + (4*a*(84*A*b^2 - 5*a^2*C + 57*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b*d) - (2*(10*a^2*C - 7*b^2*(9*A + 7*C))*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*b*d) - (4*a*C*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*b*d) + (2*C*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(9*b*d)]
    @test_int [sec(c + d*x)^0*(a + b*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 8, (-2*a*(a - b)*sqrt(a + b)*(49*A*b^2 + 3*a^2*C + 29*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(21*b^2*d) - (2*sqrt(a + b)*(3*a^3*C - 9*a^2*b*(7*A + 3*C) - b^3*(7*A + 5*C) + a*b^2*(49*A + 29*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(21*b*d) - (2*a^2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*(3*a^2*C + b^2*(7*A + 5*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(21*d) + (2*a*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(7*d) + (2*C*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^1*(a + b*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(a^2*(15*A - 46*C) - 6*b^2*(5*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b*d) + (sqrt(a + b)*(a^2*b*(15*A - 46*C) + 30*a^3*C - 6*b^3*(5*A + 3*C) + 2*a*b^2*(45*A + 17*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b*d) - (5*a*A*b*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (A*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/d - (a*b*(15*A - 16*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*d) - (b*(5*A - 2*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^2*(a + b*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 8, (a*(a - b)*sqrt(a + b)*(27*A - 56*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(12*d) + (sqrt(a + b)*(a*b*(27*A - 56*C) + 8*b^2*(3*A + C) + 6*a^2*(A + 12*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(12*d) - (sqrt(a + b)*(15*A*b^2 + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*d) + (5*A*b*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d) + (A*cos(c + d*x)*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(2*d) - (b^2*(21*A - 8*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(12*d)]
    @test_int [cos(c + d*x)^3*(a + b*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(3*b^2*(11*A - 16*C) + 8*a^2*(2*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*b*d) + (sqrt(a + b)*(16*a^2*A + 26*a*A*b + 33*A*b^2 + 24*a^2*C + 144*a*b*C - 48*b^2*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*d) - (5*b*sqrt(a + b)*(A*b^2 + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(8*a*d) + ((15*A*b^2 + 8*a^2*(2*A + 3*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + (5*A*b*cos(c + d*x)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(a + b*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 9, ((a - b)*sqrt(a + b)*(15*A*b^2 + 4*a^2*(71*A + 108*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a*d) + (sqrt(a + b)*(15*A*b^3 + 24*a^3*(3*A + 4*C) + 4*a^2*b*(71*A + 108*C) + 2*a*b^2*(59*A + 192*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a*d) + (sqrt(a + b)*(5*A*b^4 - 120*a^2*b^2*(A + 2*C) - 16*a^4*(3*A + 4*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(64*a^2*d) + (b*(15*A*b^2 + 4*a^2*(71*A + 108*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*a*d) + ((5*A*b^2 + 4*a^2*(3*A + 4*C))*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(32*d) + (5*A*b*cos(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d)]

    @test_int [(a + b*sec(c + d*x))^(3/2)*(a^2 - b^2*sec(c + d*x)^2), x, 8, (-2*(a - b)*sqrt(a + b)*(4*a^2 - 3*b^2)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(5*d) + (2*sqrt(a + b)*(10*a^3 - 4*a^2*b - 4*a*b^2 + 3*b^3)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(5*d) - (2*a^3*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d - (2*a*b^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*d) - (2*b^2*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [sqrt(a + b*sec(c + d*x))*(a^2 - b^2*sec(c + d*x)^2), x, 7, (2*a*(a - b)*sqrt(a + b)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*d) + (2*sqrt(a + b)*(3*a^2 + a*b - b^2)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*d) - (2*a^2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d - (2*b^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(sec(c + d*x)^3*(A + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 6, (4*a*(a - b)*sqrt(a + b)*(35*A*b^2 + 24*a^2*C + 22*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^5*d) + (2*sqrt(a + b)*(48*a^3*C - 12*a^2*b*C + 5*b^3*(7*A + 5*C) + 2*a*b^2*(35*A + 22*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^4*d) + (2*(24*a^2*C + 5*b^2*(7*A + 5*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b^3*d) - (12*a*C*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(35*b^2*d) + (2*C*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(7*b*d)]
    @test_int [(sec(c + d*x)^2*(A + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 5, (-2*(a - b)*sqrt(a + b)*(8*a^2*C + 3*b^2*(5*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^4*d) - (2*sqrt(a + b)*(8*a^2*C - 2*a*b*C + 3*b^2*(5*A + 3*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^3*d) - (8*a*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b^2*d) + (2*C*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b*d)]
    @test_int [(sec(c + d*x)^1*(A + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 4, (4*a*(a - b)*sqrt(a + b)*C*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^3*d) + (2*sqrt(a + b)*(3*A*b + (2*a + b)*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*d) + (2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b*d)]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/sqrt(a + b*sec(c + d*x)), x, 5, (-2*(a - b)*sqrt(a + b)*C*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^2*d) - (2*sqrt(a + b)*C*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) - (2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d)]
    @test_int [(cos(c + d*x)^1*(A + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 6, (A*(a - b)*sqrt(a + b)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*d) + (sqrt(a + b)*(A*b + 2*a*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*d) + (A*b*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(a*d)]
    @test_int [(cos(c + d*x)^2*(A + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 7, (-3*A*(a - b)*sqrt(a + b)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^2*d) + (A*(2*a - 3*b)*sqrt(a + b)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^2*d) - (sqrt(a + b)*(3*A*b^2 + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^3*d) - (3*A*b*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*a^2*d) + (A*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*a*d)]
    @test_int [(cos(c + d*x)^3*(A + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 8, ((a - b)*sqrt(a + b)*(15*A*b^2 + 8*a^2*(2*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a^3*b*d) - (sqrt(a + b)*(10*a*A*b - 15*A*b^2 - 8*a^2*(2*A + 3*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a^3*d) + (b*sqrt(a + b)*(5*A*b^2 + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(8*a^4*d) + ((15*A*b^2 + 8*a^2*(2*A + 3*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*a^3*d) - (5*A*b*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*a^2*d) + (A*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*a*d)]

    @test_int [(sec(c + d*x)^3*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 6, (-2*(2*a^2*b^2*(5*A - 4*C) + 16*a^4*C - b^4*(5*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(5*b^5*sqrt(a + b)*d) - (2*(16*a^3*C + 12*a^2*b*C + 2*a*b^2*(5*A + 2*C) + b^3*(5*A + 3*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(5*b^4*sqrt(a + b)*d) - (2*(A*b^2 + a^2*C)*sec(c + d*x)^2*tan(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) - (2*a*(5*A*b^2 + 8*a^2*C - 3*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b^3*(a^2 - b^2)*d) + (2*(5*A*b^2 + 6*a^2*C - b^2*C)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b^2*(a^2 - b^2)*d)]
    @test_int [(sec(c + d*x)^2*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 5, (2*a*(3*A*b^2 + 8*a^2*C - 5*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^4*sqrt(a + b)*d) + (2*(3*A*b^2 + (8*a^2 + 6*a*b + b^2)*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^3*sqrt(a + b)*d) + (2*a*(A*b^2 + a^2*C)*tan(c + d*x))/(b^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b^2*d)]
    @test_int [(sec(c + d*x)^1*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 4, (-2*(A*b^2 + 2*a^2*C - b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^3*sqrt(a + b)*d) + (2*(A*b - (2*a + b)*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^2*sqrt(a + b)*d) - (2*(A*b^2 + a^2*C)*tan(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(3/2), x, 6, (2*(A*b^2 + a^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b^2*sqrt(a + b)*d) - (2*(A*b - a*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*sqrt(a + b)*d) - (2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (2*(A*b^2 + a^2*C)*tan(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^1*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 7, -(((3*A*b^2 - a^2*(A - 2*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*b*sqrt(a + b)*d)) + ((a*A*b + 3*A*b^2 + 2*a^2*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*b*sqrt(a + b)*d) + (3*A*b*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^3*d) + (A*sin(c + d*x))/(a*d*sqrt(a + b*sec(c + d*x))) - (b*(3*A*b^2 - a^2*(A - 2*C))*tan(c + d*x))/(a^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^2*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 8, ((15*A*b^2 - a^2*(7*A - 8*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^3*sqrt(a + b)*d) - ((5*a*A*b + 15*A*b^2 - 2*a^2*(A - 4*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^3*sqrt(a + b)*d) - (sqrt(a + b)*(15*A*b^2 + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^4*d) - (5*A*b*sin(c + d*x))/(4*a^2*d*sqrt(a + b*sec(c + d*x))) + (A*cos(c + d*x)*sin(c + d*x))/(2*a*d*sqrt(a + b*sec(c + d*x))) + (b^2*(15*A*b^2 - a^2*(7*A - 8*C))*tan(c + d*x))/(4*a^3*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]

    @test_int [(sec(c + d*x)^3*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 6, (4*a*(a^2*b^2*(A - 14*C) - b^4*(3*A - 4*C) + 8*a^4*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^5*sqrt(a + b)*(a^2 - b^2)*d) + (2*(2*a^2*b^2*(A - 8*C) + 3*a*b^3*(A - 3*C) + 16*a^4*C + 12*a^3*b*C - b^4*(3*A + C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^4*sqrt(a + b)*(a^2 - b^2)*d) - (2*(A*b^2 + a^2*C)*sec(c + d*x)^2*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (4*a*(2*A*b^4 - 3*a^4*C + 5*a^2*b^2*C)*tan(c + d*x))/(3*b^3*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x))) + (2*(A*b^2 + 2*a^2*C - b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b^3*(a^2 - b^2)*d)]
    @test_int [(sec(c + d*x)^2*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 5, (2*(3*b^4*(A - C) - 8*a^4*C + a^2*b^2*(A + 15*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^4*sqrt(a + b)*(a^2 - b^2)*d) - (2*(3*b^3*(A - C) + 8*a^3*C + 6*a^2*b*C - a*b^2*(A + 9*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^3*sqrt(a + b)*(a^2 - b^2)*d) + (2*a*(A*b^2 + a^2*C)*tan(c + d*x))/(3*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*(3*A*b^4 - 5*a^4*C + a^2*b^2*(A + 9*C))*tan(c + d*x))/(3*b^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^1*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 5, (-4*a*(2*A*b^2 - a^2*C + 3*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*(a - b)*b^3*(a + b)^(3/2)*d) + (2*(2*a^2*C + 3*a*b*(A + C) - b^2*(A + 3*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*sqrt(a + b)*(a^2 - b^2)*d) - (2*(A*b^2 + a^2*C)*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (4*a*(2*A*b^2 - a^2*C + 3*b^2*C)*tan(c + d*x))/(3*b*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(5/2), x, 7, (-2*(3*A*b^4 - a^4*C - a^2*b^2*(7*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^2*b^2*sqrt(a + b)*(a^2 - b^2)*d) - (2*(6*a^2*A*b - a*A*b^2 - 3*A*b^3 - a^3*C + 3*a^2*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^2*(a - b)*b*(a + b)^(3/2)*d) - (2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^3*d) + (2*(A*b^2 + a^2*C)*tan(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (2*(3*A*b^4 - a^4*C - a^2*b^2*(7*A + 3*C))*tan(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^1*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 8, -((26*a^2*A*b^2 - 15*A*b^4 - a^4*(3*A - 8*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^3*(a - b)*b*(a + b)^(3/2)*d) + ((21*a^2*A*b^2 - 5*a*A*b^3 - 15*A*b^4 + a^3*b*(3*A - 2*C) + 6*a^4*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^3*(a - b)*b*(a + b)^(3/2)*d) + (5*A*b*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^4*d) + (A*sin(c + d*x))/(a*d*(a + b*sec(c + d*x))^(3/2)) - (b*(5*A*b^2 - a^2*(3*A - 2*C))*tan(c + d*x))/(3*a^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (b*(26*a^2*A*b^2 - 15*A*b^4 - a^4*(3*A - 8*C))*tan(c + d*x))/(3*a^3*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^2*(A + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 9, -((105*A*b^4 + a^4*(33*A - 56*C) - 2*a^2*b^2*(85*A - 12*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(12*a^4*sqrt(a + b)*(a^2 - b^2)*d) + ((35*a*A*b^3 + 105*A*b^4 + 6*a^4*(A - 8*C) - 3*a^2*b^2*(45*A - 8*C) - a^3*(27*A*b - 8*b*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(12*a^4*sqrt(a + b)*(a^2 - b^2)*d) - (sqrt(a + b)*(35*A*b^2 + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^5*d) - (7*A*b*sin(c + d*x))/(4*a^2*d*(a + b*sec(c + d*x))^(3/2)) + (A*cos(c + d*x)*sin(c + d*x))/(2*a*d*(a + b*sec(c + d*x))^(3/2)) + (b^2*(35*A*b^2 - a^2*(27*A - 8*C))*tan(c + d*x))/(12*a^3*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (b^2*(105*A*b^4 + a^4*(33*A - 56*C) - 2*a^2*b^2*(85*A - 12*C))*tan(c + d*x))/(12*a^4*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]

    @test_int [(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(7/2), x, 8, (-2*(41*a^2*A*b^4 - 15*A*b^6 - 3*a^6*C - 29*a^4*b^2*(2*A + C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*a^3*b^2*sqrt(a + b)*(a^2 - b^2)^2*d) + (2*(36*a^2*A*b^3 - 5*a*A*b^4 - 15*A*b^5 + 3*a^5*C + a^3*b^2*(13*A + 5*C) - 3*a^4*b*(15*A + 8*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*a^3*b*sqrt(a + b)*(a^2 - b^2)^2*d) - (2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^4*d) + (2*(A*b^2 + a^2*C)*tan(c + d*x))/(5*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(5/2)) - (2*(5*A*b^4 - 3*a^4*C - a^2*b^2*(13*A + 5*C))*tan(c + d*x))/(15*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^(3/2)) - (2*(41*a^2*A*b^4 - 15*A*b^6 - 3*a^6*C - 29*a^4*b^2*(2*A + C))*tan(c + d*x))/(15*a^3*(a^2 - b^2)^3*d*sqrt(a + b*sec(c + d*x)))]

    @test_int [(a^2 - b^2*sec(c + d*x)^2)/sqrt(a + b*sec(c + d*x)), x, 7, (2*(a - b)*sqrt(a + b)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*b*sqrt(a + b)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d - (2*a*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d]
    @test_int [(a^2 - b^2*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(3/2), x, 4, (-2*sqrt(a + b)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d - (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d]
    @test_int [(a^2 - b^2*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(5/2), x, 7, (4*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(sqrt(a + b)*d) - (4*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(sqrt(a + b)*d) - (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d) + (4*b^2*tan(c + d*x))/((a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(a^2 - b^2*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(7/2), x, 8, (2*(11*a^2 - 3*b^2)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a*(a - b)*(a + b)^(3/2)*d) - (2*(9*a^2 - 2*a*b - 3*b^2)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a*(a - b)*(a + b)^(3/2)*d) - (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (4*b^2*tan(c + d*x))/(3*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*b^2*(11*a^2 - 3*b^2)*tan(c + d*x))/(3*a*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]

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

    #= ::Subsubsection:: =#
    #=n>0=#

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + b*sec(c + d*x))), x, 8, (2*A*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a*d) - (2*A*b*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^2*d) + (2*(A*b^2 + a^2*C)*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^2*(a + b)*d)]

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

    #= ::Subsubsection:: =#
    #=n>0=#

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))), x, 11, -((2*A*b*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(a*d*sqrt(a + b*sec(c + d*x)))) + (2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + (2*A*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(a*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(a+b*sec(e+f*x))^(n/3)*(A+C*sec(e+f*x)^2)=#

    @test_int [(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^(2/3), x, 8, (sqrt(2)*(a + b)*C*AppellF1(1/2, 1/2, -(5/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(2/3)) - (sqrt(2)*a*C*AppellF1(1/2, 1/2, -(2/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(2/3)) + A*Unintegrable((a + b*sec(c + d*x))^(2/3), x)]
    @test_int [(A + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^(1/3), x, 8, (sqrt(2)*(a + b)*C*AppellF1(1/2, 1/2, -(4/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(1/3)) - (sqrt(2)*a*C*AppellF1(1/2, 1/2, -(1/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(1/3)) + A*Unintegrable((a + b*sec(c + d*x))^(1/3), x)]
    @test_int [(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(1/3), x, 8, (sqrt(2)*C*AppellF1(1/2, 1/2, -(2/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(2/3)) - (sqrt(2)*a*C*AppellF1(1/2, 1/2, 1/3, 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*((a + b*sec(c + d*x))/(a + b))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*(a + b*sec(c + d*x))^(1/3)) + A*Unintegrable(1/(a + b*sec(c + d*x))^(1/3), x)]
    @test_int [(A + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(2/3), x, 8, (sqrt(2)*C*AppellF1(1/2, 1/2, -(1/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(1/3)) - (sqrt(2)*a*C*AppellF1(1/2, 1/2, 2/3, 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*((a + b*sec(c + d*x))/(a + b))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*(a + b*sec(c + d*x))^(2/3)) + A*Unintegrable(1/(a + b*sec(c + d*x))^(2/3), x)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^n*(a+b*sec(e+f*x))^m*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+b*sec(e+f*x))^m*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 8, (3*(b*B + a*C)*atanh(sin(c + d*x)))/(8*d) + ((5*a*B + 4*b*C)*tan(c + d*x))/(5*d) + (3*(b*B + a*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + ((b*B + a*C)*sec(c + d*x)^3*tan(c + d*x))/(4*d) + (b*C*sec(c + d*x)^4*tan(c + d*x))/(5*d) + ((5*a*B + 4*b*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, ((4*a*B + 3*b*C)*atanh(sin(c + d*x)))/(8*d) + ((b*B + a*C)*tan(c + d*x))/d + ((4*a*B + 3*b*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (b*C*sec(c + d*x)^3*tan(c + d*x))/(4*d) + ((b*B + a*C)*tan(c + d*x)^3)/(3*d)]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, ((b*B + a*C)*atanh(sin(c + d*x)))/(2*d) + ((3*a*B + 2*b*C)*tan(c + d*x))/(3*d) + ((b*B + a*C)*sec(c + d*x)*tan(c + d*x))/(2*d) + (b*C*sec(c + d*x)^2*tan(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, ((2*a*B + b*C)*atanh(sin(c + d*x)))/(2*d) + ((b*B + a*C)*tan(c + d*x))/d + (b*C*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, a*B*x + ((b*B + a*C)*atanh(sin(c + d*x)))/d + (b*C*tan(c + d*x))/d]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 4, (b*B + a*C)*x + (b*C*atanh(sin(c + d*x)))/d + (a*B*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, (1/2)*(a*B + 2*b*C)*x + ((b*B + a*C)*sin(c + d*x))/d + (a*B*cos(c + d*x)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 6, (1/2)*(b*B + a*C)*x + ((2*a*B + 3*b*C)*sin(c + d*x))/(3*d) + ((b*B + a*C)*cos(c + d*x)*sin(c + d*x))/(2*d) + (a*B*cos(c + d*x)^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^5*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, (1/8)*(3*a*B + 4*b*C)*x + ((b*B + a*C)*sin(c + d*x))/d + ((3*a*B + 4*b*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*B*cos(c + d*x)^3*sin(c + d*x))/(4*d) - ((b*B + a*C)*sin(c + d*x)^3)/(3*d)]
    @test_int [cos(c + d*x)^6*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 8, (3/8)*(b*B + a*C)*x + ((4*a*B + 5*b*C)*sin(c + d*x))/(5*d) + (3*(b*B + a*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + ((b*B + a*C)*cos(c + d*x)^3*sin(c + d*x))/(4*d) + (a*B*cos(c + d*x)^4*sin(c + d*x))/(5*d) - ((4*a*B + 5*b*C)*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, ((4*a^2*B + 3*b^2*B + 6*a*b*C)*atanh(sin(c + d*x)))/(8*d) + ((4*b^2*C + 5*a*(2*b*B + a*C))*tan(c + d*x))/(5*d) + ((4*a^2*B + 3*b^2*B + 6*a*b*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + (b*(5*b*B + 6*a*C)*sec(c + d*x)^3*tan(c + d*x))/(20*d) + (b*C*sec(c + d*x)^3*(a + b*sec(c + d*x))*tan(c + d*x))/(5*d) + ((4*b^2*C + 5*a*(2*b*B + a*C))*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, ((8*a*b*B + 4*a^2*C + 3*b^2*C)*atanh(sin(c + d*x)))/(8*d) + ((4*a^2*b*B + 4*b^3*B - a^3*C + 8*a*b^2*C)*tan(c + d*x))/(6*b*d) + ((8*a*b*B - 2*a^2*C + 9*b^2*C)*sec(c + d*x)*tan(c + d*x))/(24*d) + ((4*b*B - a*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(12*b*d) + (C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*b*d)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, ((2*a^2*B + b^2*B + 2*a*b*C)*atanh(sin(c + d*x)))/(2*d) + (2*(3*a*b*B + a^2*C + b^2*C)*tan(c + d*x))/(3*d) + (b*(3*b*B + 2*a*C)*sec(c + d*x)*tan(c + d*x))/(6*d) + (C*(a + b*sec(c + d*x))^2*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, a^2*B*x + ((4*a*b*B + 2*a^2*C + b^2*C)*atanh(sin(c + d*x)))/(2*d) + (b*(2*b*B + 3*a*C)*tan(c + d*x))/(2*d) + (b*C*(a + b*sec(c + d*x))*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, a*(2*b*B + a*C)*x + (b*(b*B + 2*a*C)*atanh(sin(c + d*x)))/d + (a^2*B*sin(c + d*x))/d + (b^2*C*tan(c + d*x))/d]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, (1/2)*(a^2*B + 2*b^2*B + 4*a*b*C)*x + (b^2*C*atanh(sin(c + d*x)))/d + (a*(2*b*B + a*C)*sin(c + d*x))/d + (a^2*B*cos(c + d*x)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, (1/2)*(2*a*b*B + a^2*C + 2*b^2*C)*x + ((2*a^2*B + 3*b^2*B + 6*a*b*C)*sin(c + d*x))/(3*d) + (a*(2*b*B + a*C)*cos(c + d*x)*sin(c + d*x))/(2*d) + (a^2*B*cos(c + d*x)^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^5*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, (1/8)*(3*a^2*B + 4*b^2*B + 8*a*b*C)*x + ((2*a*b*B + a^2*C + b^2*C)*sin(c + d*x))/d + ((3*a^2*B + 4*b^2*B + 8*a*b*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a^2*B*cos(c + d*x)^3*sin(c + d*x))/(4*d) - (a*(2*b*B + a*C)*sin(c + d*x)^3)/(3*d)]
    @test_int [cos(c + d*x)^6*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, (1/8)*(6*a*b*B + 3*a^2*C + 4*b^2*C)*x + ((4*a^2*B + 5*b^2*B + 10*a*b*C)*sin(c + d*x))/(5*d) + ((6*a*b*B + 3*a^2*C + 4*b^2*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*(2*b*B + a*C)*cos(c + d*x)^3*sin(c + d*x))/(4*d) + (a^2*B*cos(c + d*x)^4*sin(c + d*x))/(5*d) - ((4*a^2*B + 5*b^2*B + 10*a*b*C)*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, ((8*a^3*B + 18*a*b^2*B + 18*a^2*b*C + 5*b^3*C)*atanh(sin(c + d*x)))/(16*d) + ((15*a^2*b*B + 4*b^3*B + 5*a^3*C + 12*a*b^2*C)*tan(c + d*x))/(5*d) + ((8*a^3*B + 18*a*b^2*B + 18*a^2*b*C + 5*b^3*C)*sec(c + d*x)*tan(c + d*x))/(16*d) + (b*(18*a*b*B + 14*a^2*C + 5*b^2*C)*sec(c + d*x)^3*tan(c + d*x))/(24*d) + (b^2*(3*b*B + 4*a*C)*sec(c + d*x)^4*tan(c + d*x))/(15*d) + (b*C*sec(c + d*x)^3*(a + b*sec(c + d*x))^2*tan(c + d*x))/(6*d) + ((15*a^2*b*B + 4*b^3*B + 5*a^3*C + 12*a*b^2*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, ((12*a^2*b*B + 3*b^3*B + 4*a^3*C + 9*a*b^2*C)*atanh(sin(c + d*x)))/(8*d) + ((15*a^3*b*B + 60*a*b^3*B - 3*a^4*C + 52*a^2*b^2*C + 16*b^4*C)*tan(c + d*x))/(30*b*d) + ((30*a^2*b*B + 45*b^3*B - 6*a^3*C + 71*a*b^2*C)*sec(c + d*x)*tan(c + d*x))/(120*d) + ((15*a*b*B - 3*a^2*C + 16*b^2*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(60*b*d) + ((5*b*B - a*C)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(20*b*d) + (C*(a + b*sec(c + d*x))^4*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, ((8*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 3*b^3*C)*atanh(sin(c + d*x)))/(8*d) + ((16*a^2*b*B + 4*b^3*B + 3*a^3*C + 12*a*b^2*C)*tan(c + d*x))/(6*d) + (b*(20*a*b*B + 6*a^2*C + 9*b^2*C)*sec(c + d*x)*tan(c + d*x))/(24*d) + ((4*b*B + 3*a*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(12*d) + (C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, a^3*B*x + ((6*a^2*b*B + b^3*B + 2*a^3*C + 3*a*b^2*C)*atanh(sin(c + d*x)))/(2*d) + (b*(9*a*b*B + 8*a^2*C + 2*b^2*C)*tan(c + d*x))/(3*d) + (b^2*(3*b*B + 5*a*C)*sec(c + d*x)*tan(c + d*x))/(6*d) + (b*C*(a + b*sec(c + d*x))^2*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, a^2*(3*b*B + a*C)*x + (b*(6*a*b*B + 6*a^2*C + b^2*C)*atanh(sin(c + d*x)))/(2*d) + (a*B*(a + b*sec(c + d*x))^2*sin(c + d*x))/d - (b*(2*a^2*B - b^2*B - 3*a*b*C)*tan(c + d*x))/d - (b^2*(2*a*B - b*C)*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/2)*a*(a^2*B + 6*b^2*B + 6*a*b*C)*x + (b^2*(b*B + 3*a*C)*atanh(sin(c + d*x)))/d + (a^2*(2*b*B + a*C)*sin(c + d*x))/d + (a*B*cos(c + d*x)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(2*d) - (b^2*(a*B - 2*b*C)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/2)*(3*a^2*b*B + 2*b^3*B + a^3*C + 6*a*b^2*C)*x + (b^3*C*atanh(sin(c + d*x)))/d + (a*(2*a^2*B + 8*b^2*B + 9*a*b*C)*sin(c + d*x))/(3*d) + (a^2*(5*b*B + 3*a*C)*cos(c + d*x)*sin(c + d*x))/(6*d) + (a*B*cos(c + d*x)^2*(a + b*sec(c + d*x))^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^5*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/8)*(3*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 8*b^3*C)*x + ((6*a^2*b*B + 3*b^3*B + 2*a^3*C + 9*a*b^2*C)*sin(c + d*x))/(3*d) + (a*(3*a^2*B + 10*b^2*B + 12*a*b*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a^2*(3*b*B + 2*a*C)*cos(c + d*x)^2*sin(c + d*x))/(6*d) + (a*B*cos(c + d*x)^3*(a + b*sec(c + d*x))^2*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^6*(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, (1/8)*(9*a^2*b*B + 4*b^3*B + 3*a^3*C + 12*a*b^2*C)*x + ((4*a^3*B + 14*a*b^2*B + 15*a^2*b*C + 5*b^3*C)*sin(c + d*x))/(5*d) + ((9*a^2*b*B + 4*b^3*B + 3*a^3*C + 12*a*b^2*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a^2*(7*b*B + 5*a*C)*cos(c + d*x)^3*sin(c + d*x))/(20*d) + (a*B*cos(c + d*x)^4*(a + b*sec(c + d*x))^2*sin(c + d*x))/(5*d) - (a*(4*a^2*B + 12*b^2*B + 15*a*b*C)*sin(c + d*x)^3)/(15*d)]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 9, ((2*a^2 + b^2)*(b*B - a*C)*atanh(sin(c + d*x)))/(2*b^4*d) - (2*a^3*(b*B - a*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b^4*sqrt(a + b)*d) - ((3*a*b*B - 3*a^2*C - 2*b^2*C)*tan(c + d*x))/(3*b^3*d) + ((b*B - a*C)*sec(c + d*x)*tan(c + d*x))/(2*b^2*d) + (C*sec(c + d*x)^2*tan(c + d*x))/(3*b*d)]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 8, -(((2*a*b*B - 2*a^2*C - b^2*C)*atanh(sin(c + d*x)))/(2*b^3*d)) + (2*a^2*(b*B - a*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b^3*sqrt(a + b)*d) + ((b*B - a*C)*tan(c + d*x))/(b^2*d) + (C*sec(c + d*x)*tan(c + d*x))/(2*b*d)]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 8, ((b*B - a*C)*atanh(sin(c + d*x)))/(b^2*d) - (2*a*(b*B - a*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b^2*sqrt(a + b)*d) + (C*tan(c + d*x))/(b*d)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 6, (C*atanh(sin(c + d*x)))/(b*d) + (2*(b*B - a*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b*sqrt(a + b)*d)]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 5, (B*x)/a - (2*(b*B - a*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a*sqrt(a - b)*sqrt(a + b)*d)]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 6, -(((b*B - a*C)*x)/a^2) + (2*b*(b*B - a*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^2*sqrt(a - b)*sqrt(a + b)*d) + (B*sin(c + d*x))/(a*d)]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 7, ((a^2*B + 2*b^2*B - 2*a*b*C)*x)/(2*a^3) - (2*b^2*(b*B - a*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^3*sqrt(a - b)*sqrt(a + b)*d) - ((b*B - a*C)*sin(c + d*x))/(a^2*d) + (B*cos(c + d*x)*sin(c + d*x))/(2*a*d)]
    @test_int [cos(c + d*x)^4*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 8, -(((a^2 + 2*b^2)*(b*B - a*C)*x)/(2*a^4)) + (2*b^3*(b*B - a*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*sqrt(a - b)*sqrt(a + b)*d) + ((2*a^2*B + 3*b^2*B - 3*a*b*C)*sin(c + d*x))/(3*a^3*d) - ((b*B - a*C)*cos(c + d*x)*sin(c + d*x))/(2*a^2*d) + (B*cos(c + d*x)^2*sin(c + d*x))/(3*a*d)]

    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 9, -(((4*a*b*B - 6*a^2*C - b^2*C)*atanh(sin(c + d*x)))/(2*b^4*d)) + (2*a^2*(2*a^2*b*B - 3*b^3*B - 3*a^3*C + 4*a*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^4*(a + b)^(3/2)*d) + ((2*a^2*b*B - b^3*B - 3*a^3*C + 2*a*b^2*C)*tan(c + d*x))/(b^3*(a^2 - b^2)*d) - ((2*a*b*B - 3*a^2*C + b^2*C)*sec(c + d*x)*tan(c + d*x))/(2*b^2*(a^2 - b^2)*d) + (a*(b*B - a*C)*sec(c + d*x)^2*tan(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 8, ((b*B - 2*a*C)*atanh(sin(c + d*x)))/(b^3*d) - (2*a*(a^2*b*B - 2*b^3*B - 2*a^3*C + 3*a*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^3*(a + b)^(3/2)*d) + (C*tan(c + d*x))/(b^2*d) - (a^2*(b*B - a*C)*tan(c + d*x))/(b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 7, (C*atanh(sin(c + d*x)))/(b^2*d) - (2*(b^3*B + a^3*C - 2*a*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^2*(a + b)^(3/2)*d) + (a*(b*B - a*C)*tan(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 5, (2*(a*B - b*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*(a + b)^(3/2)*d) - ((b*B - a*C)*tan(c + d*x))/((a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 6, (B*x)/a^2 - (2*(2*a^2*b*B - b^3*B - a^3*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^2*(a - b)^(3/2)*(a + b)^(3/2)*d) + (b*(b*B - a*C)*tan(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 7, -(((2*b*B - a*C)*x)/a^3) + (2*b*(3*a^2*b*B - 2*b^3*B - 2*a^3*C + a*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^3*(a - b)^(3/2)*(a + b)^(3/2)*d) + ((a^2*B - 2*b^2*B + a*b*C)*sin(c + d*x))/(a^2*(a^2 - b^2)*d) + (b*(b*B - a*C)*sin(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 8, ((a^2*B + 6*b^2*B - 4*a*b*C)*x)/(2*a^4) - (2*b^2*(4*a^2*b*B - 3*b^3*B - 3*a^3*C + 2*a*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*(a - b)^(3/2)*(a + b)^(3/2)*d) - ((2*a^2*b*B - 3*b^3*B - a^3*C + 2*a*b^2*C)*sin(c + d*x))/(a^3*(a^2 - b^2)*d) + ((a^2*B - 3*b^2*B + 2*a*b*C)*cos(c + d*x)*sin(c + d*x))/(2*a^2*(a^2 - b^2)*d) + (b*(b*B - a*C)*cos(c + d*x)*sin(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]

    @test_int [sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 9, ((b*B - 3*a*C)*atanh(sin(c + d*x)))/(b^4*d) - (a*(2*a^4*b*B - 5*a^2*b^3*B + 6*b^5*B - 6*a^5*C + 15*a^3*b^2*C - 12*a*b^4*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*b^4*(a + b)^(5/2)*d) - ((a*b*B - 3*a^2*C + 2*b^2*C)*tan(c + d*x))/(2*b^3*(a^2 - b^2)*d) + (a*(b*B - a*C)*sec(c + d*x)^2*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - (a^2*(a^2*b*B - 4*b^3*B - 3*a^3*C + 6*a*b^2*C)*tan(c + d*x))/(2*b^3*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 8, (C*atanh(sin(c + d*x)))/(b^3*d) + ((a^2*b^3*B + 2*b^5*B - 2*a^5*C + 5*a^3*b^2*C - 6*a*b^4*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*b^3*(a + b)^(5/2)*d) - (a^2*(b*B - a*C)*tan(c + d*x))/(2*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (a*(a^2*b*B - 4*b^3*B - 3*a^3*C + 6*a*b^2*C)*tan(c + d*x))/(2*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 7, -(((3*a*b*B - a^2*C - 2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*(a + b)^(5/2)*d)) + (a*(b*B - a*C)*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((a^2*b*B + 2*b^3*B + a^3*C - 4*a*b^2*C)*tan(c + d*x))/(2*b*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 6, ((2*a^2*B + b^2*B - 3*a*b*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*(a + b)^(5/2)*d) - ((b*B - a*C)*tan(c + d*x))/(2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - ((3*a*b*B - a^2*C - 2*b^2*C)*tan(c + d*x))/(2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 7, (B*x)/a^3 - ((6*a^4*b*B - 5*a^2*b^3*B + 2*b^5*B - 2*a^5*C - a^3*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^3*(a - b)^(5/2)*(a + b)^(5/2)*d) + (b*(b*B - a*C)*tan(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (b*(5*a^2*b*B - 2*b^3*B - 3*a^3*C)*tan(c + d*x))/(2*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 8, -(((3*b*B - a*C)*x)/a^4) + (b*(12*a^4*b*B - 15*a^2*b^3*B + 6*b^5*B - 6*a^5*C + 5*a^3*b^2*C - 2*a*b^4*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*(a - b)^(5/2)*(a + b)^(5/2)*d) + ((2*a^4*B - 11*a^2*b^2*B + 6*b^4*B + 5*a^3*b*C - 2*a*b^3*C)*sin(c + d*x))/(2*a^3*(a^2 - b^2)^2*d) + (b*(b*B - a*C)*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (b*(6*a^2*b*B - 3*b^3*B - 4*a^3*C + a*b^2*C)*sin(c + d*x))/(2*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+b*sec(e+f*x))^(m/2)*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (-2*(a - b)*sqrt(a + b)*(24*a^3*b*B + 57*a*b^3*B - 16*a^4*C - 24*a^2*b^2*C + 147*b^4*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^5*d) - (2*(a - b)*sqrt(a + b)*(3*b^3*(25*B - 49*C) + 18*a*b^2*(B - 2*C) + 12*a^2*b*(2*B - C) - 16*a^3*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^4*d) - (2*(12*a^2*b*B - 75*b^3*B - 8*a^3*C - 13*a*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^3*d) + (2*(9*a*b*B - 6*a^2*C + 49*b^2*C)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^2*d) + (2*(9*b*B + a*C)*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(63*b*d) + (2*C*sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(9*d)]
    @test_int [sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*(a - b)*sqrt(a + b)*(14*a^2*b*B - 63*b^3*B - 8*a^3*C - 19*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^4*d) + (2*(a - b)*sqrt(a + b)*(b^2*(63*B - 25*C) + 2*a*b*(7*B - 3*C) - 8*a^2*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^3*d) + (2*(7*a*b*B - 4*a^2*C + 25*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b^2*d) + (2*(7*b*B + a*C)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(35*b*d) + (2*C*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(7*d)]
    @test_int [sec(c + d*x)^1*sqrt(a + b*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (-2*(a - b)*sqrt(a + b)*(5*a*b*B - 2*a^2*C + 9*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^3*d) - (2*(a - b)*sqrt(a + b)*(5*b*B - 2*a*C - 9*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^2*d) + (2*(5*b*B - 2*a*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b*d) + (2*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^0*sqrt(a + b*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (-2*(a - b)*sqrt(a + b)*(3*b*B + a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*d) + (2*(a - b)*sqrt(a + b)*(3*B - C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) + (2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*sqrt(a + b*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (-2*(a - b)*sqrt(a + b)*C*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) + (2*sqrt(a + b)*(b*(B - C) + a*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) - (2*sqrt(a + b)*B*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d]
    @test_int [cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, ((a - b)*sqrt(a + b)*B*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) + (sqrt(a + b)*(B + 2*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d - (sqrt(a + b)*(b*B + 2*a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d) + (B*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^3*sqrt(a + b*sec(c + d*x))*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(b*B + 4*a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a*b*d) + (sqrt(a + b)*(b*B + 2*a*(B + 2*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a*d) - (sqrt(a + b)*(4*a^2*B - b^2*B + 4*a*b*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^2*d) + ((b*B + 4*a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*a*d) + (B*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d)]

    @test_int [sec(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, -((2*(a - b)*sqrt(a + b)*(88*a^4*b*B + 363*a^2*b^3*B + 1617*b^5*B - 48*a^5*C - 108*a^3*b^2*C + 2088*a*b^4*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3465*b^5*d)) - (2*(a - b)*sqrt(a + b)*(3*a*b^3*(143*B - 471*C) - 3*b^4*(539*B - 225*C) + 6*a^2*b^2*(11*B - 24*C) + 4*a^3*b*(22*B - 9*C) - 48*a^4*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3465*b^4*d) + (2*(88*a^3*b*B + 429*a*b^3*B - 48*a^4*C - 144*a^2*b^2*C + 675*b^4*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3465*b^3*d) + (2*(88*a^2*b*B + 539*b^3*B - 48*a^3*C - 204*a*b^2*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(3465*b^3*d) - (2*(44*a*b*B - 24*a^2*C - 81*b^2*C)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(693*b^3*d) + (2*(11*b*B - 6*a*C)*sec(c + d*x)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(99*b^2*d) + (2*C*sec(c + d*x)^2*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(11*b*d)]
    @test_int [sec(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (2*(a - b)*sqrt(a + b)*(18*a^3*b*B - 246*a*b^3*B - 8*a^4*C - 33*a^2*b^2*C - 147*b^4*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^4*d) - (2*(a - b)*sqrt(a + b)*(3*b^3*(25*B - 49*C) - 3*a*b^2*(57*B - 13*C) - 6*a^2*b*(3*B - C) + 8*a^3*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^3*d) - (2*(18*a^2*b*B - 75*b^3*B - 8*a^3*C - 39*a*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^2*d) - (2*(18*a*b*B - 8*a^2*C - 49*b^2*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*b^2*d) + (2*(9*b*B - 4*a*C)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*b^2*d) + (2*C*sec(c + d*x)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(9*b*d)]
    @test_int [sec(c + d*x)^1*(a + b*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (-2*(a - b)*sqrt(a + b)*(21*a^2*b*B + 63*b^3*B - 6*a^3*C + 82*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^3*d) - (2*(a - b)*sqrt(a + b)*(a*b*(21*B - 57*C) - b^2*(63*B - 25*C) - 6*a^2*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^2*d) + (2*(21*a*b*B - 6*a^2*C + 25*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b*d) + (2*(7*b*B - 2*a*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*b*d) + (2*C*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*b*d)]
    @test_int [sec(c + d*x)^0*(a + b*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (-2*(a - b)*sqrt(a + b)*(20*a*b*B + 3*a^2*C + 9*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^2*d) + (2*(a - b)*sqrt(a + b)*(15*a*B - 5*b*B - 3*a*C + 9*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b*d) + (2*(5*b*B + 3*a*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^1*(a + b*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (-2*(a - b)*sqrt(a + b)*(3*b*B + 4*a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) + (2*sqrt(a + b)*(a*b*(6*B - 4*C) - b^2*(3*B - C) + 3*a^2*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) - (2*a*sqrt(a + b)*B*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*b*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, ((a - b)*sqrt(a + b)*(a*B - 2*b*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) + (sqrt(a + b)*(2*b*(B - C) + a*(B + 4*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d - (sqrt(a + b)*(3*b*B + 2*a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (a*B*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(5*b*B + 4*a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*b*d) + (sqrt(a + b)*(2*a*B + 5*b*B + 4*a*C + 8*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*d) - (sqrt(a + b)*(4*a^2*B + 3*b^2*B + 12*a*b*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a*d) + ((5*b*B + 4*a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*B*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(a + b*sec(c + d*x))^(3/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, ((a - b)*sqrt(a + b)*(16*a^2*B + 3*b^2*B + 30*a*b*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a*b*d) + (sqrt(a + b)*(16*a^2*B + 14*a*b*B + 3*b^2*B + 12*a^2*C + 30*a*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a*d) - (sqrt(a + b)*(12*a^2*b*B - b^3*B + 8*a^3*C + 6*a*b^2*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(8*a^2*d) + ((16*a^2*B + 3*b^2*B + 30*a*b*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*a*d) + ((7*b*B + 6*a*C)*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*d) + (a*B*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d)]

    @test_int [sec(c + d*x)^2*(a + b*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (2*(a - b)*sqrt(a + b)*(110*a^4*b*B - 3069*a^2*b^3*B - 1617*b^5*B - 40*a^5*C - 255*a^3*b^2*C - 3705*a*b^4*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3465*b^4*d) - (2*(a - b)*sqrt(a + b)*(6*a*b^3*(209*B - 505*C) - 3*b^4*(539*B - 225*C) - a^3*b*(110*B - 30*C) - 15*a^2*b^2*(121*B - 19*C) + 40*a^4*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3465*b^3*d) - (2*(110*a^3*b*B - 1254*a*b^3*B - 40*a^4*C - 285*a^2*b^2*C - 675*b^4*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3465*b^2*d) - (2*(110*a^2*b*B - 539*b^3*B - 40*a^3*C - 335*a*b^2*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(3465*b^2*d) - (2*(22*a*b*B - 8*a^2*C - 81*b^2*C)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(693*b^2*d) + (2*(11*b*B - 4*a*C)*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(99*b^2*d) + (2*C*sec(c + d*x)*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(11*b*d)]
    @test_int [sec(c + d*x)^1*(a + b*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (-2*(a - b)*sqrt(a + b)*(45*a^3*b*B + 435*a*b^3*B - 10*a^4*C + 279*a^2*b^2*C + 147*b^4*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^3*d) - (2*(a - b)*sqrt(a + b)*(3*b^3*(25*B - 49*C) - 6*a*b^2*(60*B - 19*C) + 15*a^2*b*(3*B - 11*C) - 10*a^3*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^2*d) + (2*(45*a^2*b*B + 75*b^3*B - 10*a^3*C + 114*a*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b*d) + (2*(45*a*b*B - 10*a^2*C + 49*b^2*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*b*d) + (2*(9*b*B - 2*a*C)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*b*d) + (2*C*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(9*b*d)]
    @test_int [sec(c + d*x)^0*(a + b*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (-2*(a - b)*sqrt(a + b)*(161*a^2*b*B + 63*b^3*B + 15*a^3*C + 145*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^2*d) + (2*(a - b)*sqrt(a + b)*(b^2*(63*B - 25*C) - 8*a*b*(7*B - 15*C) + 15*a^2*(7*B - C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b*d) + (2*(56*a*b*B + 15*a^2*C + 25*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*(7*b*B + 5*a*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*C*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^1*(a + b*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (-2*(a - b)*sqrt(a + b)*(35*a*b*B + 23*a^2*C + 9*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b*d) + (2*sqrt(a + b)*(a^2*b*(45*B - 23*C) - a*b^2*(35*B - 17*C) + b^3*(5*B - 9*C) + 15*a^3*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b*d) - (2*a^2*sqrt(a + b)*B*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*b*(5*b*B + 8*a*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*b*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^2*(a + b*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(3*a^2*B - 6*b^2*B - 14*a*b*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) + (sqrt(a + b)*(2*a*b*(9*B - 7*C) - 2*b^2*(3*B - C) + 3*a^2*(B + 6*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*d) - (a*sqrt(a + b)*(5*b*B + 2*a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (a*B*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/d - (b*(3*a*B - 2*b*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^3*(a + b*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(9*a*b*B + 4*a^2*C - 8*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*b*d) + (sqrt(a + b)*(8*b^2*(B - C) + 2*a^2*(B + 2*C) + 3*a*b*(3*B + 8*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*d) - (sqrt(a + b)*(4*a^2*B + 15*b^2*B + 20*a*b*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*d) + (a*(7*b*B + 4*a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*B*cos(c + d*x)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^4*(a + b*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, ((a - b)*sqrt(a + b)*(16*a^2*B + 33*b^2*B + 54*a*b*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*b*d) + (sqrt(a + b)*(4*a^2*(4*B + 3*C) + 3*b^2*(11*B + 16*C) + a*b*(26*B + 54*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*d) - (sqrt(a + b)*(20*a^2*b*B + 5*b^3*B + 8*a^3*C + 30*a*b^2*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(8*a*d) + ((16*a^2*B + 33*b^2*B + 54*a*b*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + (a*(3*b*B + 2*a*C)*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*B*cos(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^5*(a + b*sec(c + d*x))^(5/2)*(B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, ((a - b)*sqrt(a + b)*(284*a^2*b*B + 15*b^3*B + 128*a^3*C + 264*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a*b*d) + (sqrt(a + b)*(15*b^3*B + 8*a^3*(9*B + 16*C) + 4*a^2*b*(71*B + 52*C) + 2*a*b^2*(59*B + 132*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a*d) - (sqrt(a + b)*(48*a^4*B + 120*a^2*b^2*B - 5*b^4*B + 160*a^3*b*C + 40*a*b^3*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(64*a^2*d) + ((284*a^2*b*B + 15*b^3*B + 128*a^3*C + 264*a*b^2*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*a*d) + ((36*a^2*B + 59*b^2*B + 104*a*b*C)*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(96*d) + (a*(11*b*B + 8*a*C)*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + (a*B*cos(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 7, (-2*(a - b)*sqrt(a + b)*(56*a^2*b*B + 63*b^3*B - 48*a^3*C - 44*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^5*d) - (2*sqrt(a + b)*(b^3*(63*B - 25*C) - 48*a^3*C + 4*a^2*b*(14*B + 3*C) - 2*a*b^2*(7*B + 22*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^4*d) - (2*(28*a*b*B - 24*a^2*C - 25*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b^3*d) + (2*(7*b*B - 6*a*C)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(35*b^2*d) + (2*C*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(7*b*d)]
    @test_int [(sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 6, (2*(a - b)*sqrt(a + b)*(10*a*b*B - 8*a^2*C - 9*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^4*d) + (2*sqrt(a + b)*(b^2*(5*B - 9*C) - 8*a^2*C + 2*a*b*(5*B + C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^3*d) + (2*(5*b*B - 4*a*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b^2*d) + (2*C*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b*d)]
    @test_int [(sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 5, (-2*(a - b)*sqrt(a + b)*(3*b*B - 2*a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^3*d) - (2*sqrt(a + b)*(3*b*B - 2*a*C - b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*d) + (2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b*d)]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + b*sec(c + d*x)), x, 4, (-2*(a - b)*sqrt(a + b)*C*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^2*d) + (2*sqrt(a + b)*(B - C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d)]
    @test_int [(cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 4, (2*sqrt(a + b)*C*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) - (2*sqrt(a + b)*B*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d)]
    @test_int [(cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 7, ((a - b)*sqrt(a + b)*B*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*d) + (sqrt(a + b)*B*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d) + (sqrt(a + b)*(b*B - 2*a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (B*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(a*d)]

    @test_int [(sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 7, (2*(40*a^3*b*B - 25*a*b^3*B - 48*a^4*C + 24*a^2*b^2*C + 9*b^4*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^5*sqrt(a + b)*d) + (2*(b^3*(5*B - 9*C) + 4*a^2*b*(10*B - 9*C) + 6*a*b^2*(5*B - 2*C) - 48*a^3*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^4*sqrt(a + b)*d) + (2*a*(b*B - a*C)*sec(c + d*x)^2*tan(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(20*a^2*b*B - 5*b^3*B - 24*a^3*C + 9*a*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b^3*(a^2 - b^2)*d) - (2*(5*a*b*B - 6*a^2*C + b^2*C)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b^2*(a^2 - b^2)*d)]
    @test_int [(sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 6, (-2*(6*a^2*b*B - 3*b^3*B - 8*a^3*C + 5*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^4*sqrt(a + b)*d) - (2*(2*a + b)*(3*b*B - 4*a*C - b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^3*sqrt(a + b)*d) - (2*a^2*(b*B - a*C)*tan(c + d*x))/(b^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b^2*d)]
    @test_int [(sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 5, (2*(a*b*B - 2*a^2*C + b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^3*sqrt(a + b)*d) + (2*(b*(B - C) - 2*a*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^2*sqrt(a + b)*d) + (2*a*(b*B - a*C)*tan(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(3/2), x, 5, (-2*(b*B - a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^2*sqrt(a + b)*d) + (2*(B + C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*sqrt(a + b)*d) - (2*(b*B - a*C)*tan(c + d*x))/((a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 7, (2*(b*B - a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*sqrt(a + b)*d) - (2*(b*B - a*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*sqrt(a + b)*d) - (2*sqrt(a + b)*B*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (2*b*(b*B - a*C)*tan(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 8, ((a^2*B - 3*b^2*B + 2*a*b*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*b*sqrt(a + b)*d) + ((3*b*B + a*(B - 2*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*sqrt(a + b)*d) + (sqrt(a + b)*(3*b*B - 2*a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^3*d) + (B*sin(c + d*x))/(a*d*sqrt(a + b*sec(c + d*x))) + (b*(a^2*B - 3*b^2*B + 2*a*b*C)*tan(c + d*x))/(a^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]

    @test_int [(sec(c + d*x)^3*(B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 7, (-2*(8*a^4*b*B - 15*a^2*b^3*B + 3*b^5*B - 16*a^5*C + 28*a^3*b^2*C - 8*a*b^4*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*(a - b)*b^5*(a + b)^(3/2)*d) - (2*(a^3*b*(8*B - 12*C) - 9*a*b^3*(B - C) - b^4*(3*B - C) - 16*a^4*C + 2*a^2*b^2*(3*B + 8*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^4*sqrt(a + b)*(a^2 - b^2)*d) + (2*a*(b*B - a*C)*sec(c + d*x)^2*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (2*a^2*(3*a^2*b*B - 7*b^3*B - 6*a^3*C + 10*a*b^2*C)*tan(c + d*x))/(3*b^3*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x))) - (2*(a*b*B - 2*a^2*C + b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b^3*(a^2 - b^2)*d)]
    @test_int [(sec(c + d*x)^2*(B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 6, (2*(2*a^3*b*B - 6*a*b^3*B - 8*a^4*C + 15*a^2*b^2*C - 3*b^4*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*(a - b)*b^4*(a + b)^(3/2)*d) + (2*(2*a^2*b*(B - 3*C) - 3*b^3*(B - C) - 8*a^3*C + 3*a*b^2*(B + 3*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^3*sqrt(a + b)*(a^2 - b^2)*d) - (2*a^2*(b*B - a*C)*tan(c + d*x))/(3*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*a*(2*a^2*b*B - 6*b^3*B - 5*a^3*C + 9*a*b^2*C)*tan(c + d*x))/(3*b^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 6, (2*(a^2*b*B + 3*b^3*B + 2*a^3*C - 6*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*(a - b)*b^3*(a + b)^(3/2)*d) + (2*(2*a^2*C - 3*b^2*(B + C) + a*b*(B + 3*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*sqrt(a + b)*(a^2 - b^2)*d) + (2*a*(b*B - a*C)*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*(a^2*b*B + 3*b^3*B + 2*a^3*C - 6*a*b^2*C)*tan(c + d*x))/(3*b*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(5/2), x, 6, (-2*(4*a*b*B - a^2*C - 3*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*(a - b)*b^2*(a + b)^(3/2)*d) + (2*(3*a*B - b*B + a*C - 3*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*(a - b)*b*(a + b)^(3/2)*d) - (2*(b*B - a*C)*tan(c + d*x))/(3*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (2*(4*a*b*B - a^2*C - 3*b^2*C)*tan(c + d*x))/(3*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^1*(B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 8, (2*(7*a^2*b*B - 3*b^3*B - 4*a^3*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^2*(a - b)*b*(a + b)^(3/2)*d) - (2*(6*a^2*b*B - a*b^2*B - 3*b^3*B - 3*a^3*C + a^2*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^2*(a - b)*b*(a + b)^(3/2)*d) - (2*sqrt(a + b)*B*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^3*d) + (2*b*(b*B - a*C)*tan(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*b*(7*a^2*b*B - 3*b^3*B - 4*a^3*C)*tan(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]

    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(7/2), x, 7, (-2*(23*a^2*b*B + 9*b^3*B - 3*a^3*C - 29*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*(a - b)^2*b^2*(a + b)^(5/2)*d) + (2*(3*a^2*(5*B + C) - 8*a*b*(B + 3*C) + b^2*(9*B + 5*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b*sqrt(a + b)*(a^2 - b^2)^2*d) - (2*(b*B - a*C)*tan(c + d*x))/(5*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(5/2)) - (2*(8*a*b*B - 3*a^2*C - 5*b^2*C)*tan(c + d*x))/(15*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^(3/2)) - (2*(23*a^2*b*B + 9*b^3*B - 3*a^3*C - 29*a*b^2*C)*tan(c + d*x))/(15*(a^2 - b^2)^3*d*sqrt(a + b*sec(c + d*x)))]

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

    #= ::Subsubsection:: =#
    #=n>0=#

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + b*sec(c + d*x))), x, 6, (2*B*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a*d) - (2*(b*B - a*C)*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a*(a + b)*d)]

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

    #= ::Subsubsection:: =#
    #=n>0=#

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))), x, 8, (2*B*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + (2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+b*sec(e+f*x))^(m/3)*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^(2/3), x, 8, (sqrt(2)*(a + b)*C*AppellF1(1/2, 1/2, -(5/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(2/3)) + (sqrt(2)*(b*B - a*C)*AppellF1(1/2, 1/2, -(2/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(2/3))]
    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^(1/3), x, 8, (sqrt(2)*(a + b)*C*AppellF1(1/2, 1/2, -(4/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(1/3)) + (sqrt(2)*(b*B - a*C)*AppellF1(1/2, 1/2, -(1/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(1/3))]
    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(1/3), x, 8, (sqrt(2)*C*AppellF1(1/2, 1/2, -(2/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(2/3)) + (sqrt(2)*(b*B - a*C)*AppellF1(1/2, 1/2, 1/3, 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*((a + b*sec(c + d*x))/(a + b))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*(a + b*sec(c + d*x))^(1/3))]
    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(2/3), x, 8, (sqrt(2)*C*AppellF1(1/2, 1/2, -(1/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(1/3)) + (sqrt(2)*(b*B - a*C)*AppellF1(1/2, 1/2, 2/3, 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*((a + b*sec(c + d*x))/(a + b))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*(a + b*sec(c + d*x))^(2/3))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*sec(e+f*x))^n*(a+b*sec(e+f*x))^m*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+b*sec(e+f*x))^m*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, ((4*a*A + 3*b*B + 3*a*C)*atanh(sin(c + d*x)))/(8*d) + ((5*A*b + 5*a*B + 4*b*C)*tan(c + d*x))/(5*d) + ((4*a*A + 3*b*B + 3*a*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + ((b*B + a*C)*sec(c + d*x)^3*tan(c + d*x))/(4*d) + (b*C*sec(c + d*x)^4*tan(c + d*x))/(5*d) + ((5*A*b + 5*a*B + 4*b*C)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, ((4*A*b + 4*a*B + 3*b*C)*atanh(sin(c + d*x)))/(8*d) + ((3*a*A + 2*b*B + 2*a*C)*tan(c + d*x))/(3*d) + ((4*A*b + 4*a*B + 3*b*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + ((b*B + a*C)*sec(c + d*x)^2*tan(c + d*x))/(3*d) + (b*C*sec(c + d*x)^3*tan(c + d*x))/(4*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 6, ((b*B + a*(2*A + C))*atanh(sin(c + d*x)))/(2*d) + ((3*A*b + 3*a*B + 2*b*C)*tan(c + d*x))/(3*d) + ((b*B + a*C)*sec(c + d*x)*tan(c + d*x))/(2*d) + (b*C*sec(c + d*x)^2*tan(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, a*A*x + ((2*A*b + 2*a*B + b*C)*atanh(sin(c + d*x)))/(2*d) + ((b*B + a*C)*tan(c + d*x))/d + (b*C*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, (A*b + a*B)*x + ((b*B + a*C)*atanh(sin(c + d*x)))/d + (a*A*sin(c + d*x))/d + (b*C*tan(c + d*x))/d]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, (1/2)*(2*b*B + a*(A + 2*C))*x + (b*C*atanh(sin(c + d*x)))/d + ((A*b + a*B)*sin(c + d*x))/d + (a*A*cos(c + d*x)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 5, (1/2)*(A*b + a*B + 2*b*C)*x + ((2*a*A + 3*b*B + 3*a*C)*sin(c + d*x))/(3*d) + ((A*b + a*B)*cos(c + d*x)*sin(c + d*x))/(2*d) + (a*A*cos(c + d*x)^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, (1/8)*(3*a*A + 4*b*B + 4*a*C)*x + ((A*b + a*B + b*C)*sin(c + d*x))/d + ((3*a*A + 4*b*B + 4*a*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*A*cos(c + d*x)^3*sin(c + d*x))/(4*d) - ((A*b + a*B)*sin(c + d*x)^3)/(3*d)]
    @test_int [cos(c + d*x)^5*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, (1/8)*(3*A*b + 3*a*B + 4*b*C)*x + ((4*a*A + 5*b*B + 5*a*C)*sin(c + d*x))/(5*d) + ((3*A*b + 3*a*B + 4*b*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + ((A*b + a*B)*cos(c + d*x)^3*sin(c + d*x))/(4*d) + (a*A*cos(c + d*x)^4*sin(c + d*x))/(5*d) - ((4*a*A + 5*b*B + 5*a*C)*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, ((8*a*A*b + 4*a^2*B + 3*b^2*B + 6*a*b*C)*atanh(sin(c + d*x)))/(8*d) + ((20*a*b*B + 5*a^2*(3*A + 2*C) + 2*b^2*(5*A + 4*C))*tan(c + d*x))/(15*d) + ((8*a*A*b + 4*a^2*B + 3*b^2*B + 6*a*b*C)*sec(c + d*x)*tan(c + d*x))/(8*d) + ((5*A*b^2 + 10*a*b*B + 2*a^2*C + 4*b^2*C)*sec(c + d*x)^2*tan(c + d*x))/(15*d) + (b*(5*b*B + 2*a*C)*sec(c + d*x)^3*tan(c + d*x))/(20*d) + (C*sec(c + d*x)^2*(a + b*sec(c + d*x))^2*tan(c + d*x))/(5*d), ((8*a*A*b + 4*a^2*B + 3*b^2*B + 6*a*b*C)*atanh(sin(c + d*x)))/(8*d) - ((5*a^3*b*B - 40*a*b^3*B - 2*a^4*C - 4*a^2*b^2*(5*A + 3*C) - 4*b^4*(5*A + 4*C))*tan(c + d*x))/(30*b^2*d) - ((10*a^2*b*B - 45*b^3*B - 4*a^3*C - 2*a*b^2*(20*A + 13*C))*sec(c + d*x)*tan(c + d*x))/(120*b*d) + ((20*A*b^2 - 5*a*b*B + 2*a^2*C + 16*b^2*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(60*b^2*d) + ((5*b*B - 2*a*C)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(20*b^2*d) + (C*sec(c + d*x)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 7, ((8*a*b*B + 4*a^2*(2*A + C) + b^2*(4*A + 3*C))*atanh(sin(c + d*x)))/(8*d) + ((4*a^2*b*B + 4*b^3*B - a^3*C + 4*a*b^2*(3*A + 2*C))*tan(c + d*x))/(6*b*d) + ((12*A*b^2 + 8*a*b*B - 2*a^2*C + 9*b^2*C)*sec(c + d*x)*tan(c + d*x))/(24*d) + ((4*b*B - a*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(12*b*d) + (C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*b*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, a^2*A*x + ((2*a^2*B + b^2*B + 2*a*b*(2*A + C))*atanh(sin(c + d*x)))/(2*d) + ((3*A*b^2 + 6*a*b*B + 2*a^2*C + 2*b^2*C)*tan(c + d*x))/(3*d) + (b*(3*b*B + 2*a*C)*sec(c + d*x)*tan(c + d*x))/(6*d) + (C*(a + b*sec(c + d*x))^2*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, a*(2*A*b + a*B)*x + ((2*A*b^2 + 4*a*b*B + 2*a^2*C + b^2*C)*atanh(sin(c + d*x)))/(2*d) + (A*(a + b*sec(c + d*x))^2*sin(c + d*x))/d - (b*(2*a*A - b*B - 2*a*C)*tan(c + d*x))/d - (b^2*(2*A - C)*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, (1/2)*(2*A*b^2 + 4*a*b*B + a^2*(A + 2*C))*x + (b*(b*B + 2*a*C)*atanh(sin(c + d*x)))/d + (a*(A*b + a*B)*sin(c + d*x))/d + (A*cos(c + d*x)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(2*d) - (b^2*(A - 2*C)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, (1/2)*(a^2*B + 2*b^2*B + 2*a*b*(A + 2*C))*x + (b^2*C*atanh(sin(c + d*x)))/d + ((2*A*b^2 + 6*a*b*B + a^2*(2*A + 3*C))*sin(c + d*x))/(3*d) + (a*(2*A*b + 3*a*B)*cos(c + d*x)*sin(c + d*x))/(6*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^2*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 6, (1/8)*(8*a*b*B + 4*b^2*(A + 2*C) + a^2*(3*A + 4*C))*x + ((4*a*A*b + 2*a^2*B + 3*b^2*B + 6*a*b*C)*sin(c + d*x))/(3*d) + ((2*A*b^2 + 8*a*b*B + a^2*(3*A + 4*C))*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*(A*b + 2*a*B)*cos(c + d*x)^2*sin(c + d*x))/(6*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^2*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, (1/8)*(6*a*A*b + 3*a^2*B + 4*b^2*B + 8*a*b*C)*x + ((10*a*b*B + a^2*(4*A + 5*C) + b^2*(4*A + 5*C))*sin(c + d*x))/(5*d) + ((6*a*A*b + 3*a^2*B + 4*b^2*B + 8*a*b*C)*cos(c + d*x)*sin(c + d*x))/(8*d) + (a*(2*A*b + 5*a*B)*cos(c + d*x)^3*sin(c + d*x))/(20*d) + (A*cos(c + d*x)^4*(a + b*sec(c + d*x))^2*sin(c + d*x))/(5*d) - ((2*A*b^2 + 10*a*b*B + a^2*(4*A + 5*C))*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, ((8*a^3*B + 18*a*b^2*B + 6*a^2*b*(4*A + 3*C) + b^3*(6*A + 5*C))*atanh(sin(c + d*x)))/(16*d) - ((6*a^4*b*B - 104*a^2*b^3*B - 32*b^5*B - 2*a^5*C - 24*a*b^4*(5*A + 4*C) - a^3*b^2*(30*A + 17*C))*tan(c + d*x))/(60*b^2*d) - ((12*a^3*b*B - 142*a*b^3*B - 4*a^4*C - 12*a^2*b^2*(5*A + 3*C) - 15*b^4*(6*A + 5*C))*sec(c + d*x)*tan(c + d*x))/(240*b*d) - ((6*a^2*b*B - 32*b^3*B - 2*a^3*C - 3*a*b^2*(10*A + 7*C))*(a + b*sec(c + d*x))^2*tan(c + d*x))/(120*b^2*d) + ((30*A*b^2 - 6*a*b*B + 2*a^2*C + 25*b^2*C)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(120*b^2*d) + ((3*b*B - a*C)*(a + b*sec(c + d*x))^4*tan(c + d*x))/(15*b^2*d) + (C*sec(c + d*x)*(a + b*sec(c + d*x))^4*tan(c + d*x))/(6*b*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 8, ((12*a^2*b*B + 3*b^3*B + 4*a^3*(2*A + C) + 3*a*b^2*(4*A + 3*C))*atanh(sin(c + d*x)))/(8*d) + ((15*a^3*b*B + 60*a*b^3*B - 3*a^4*C + 4*b^4*(5*A + 4*C) + 4*a^2*b^2*(20*A + 13*C))*tan(c + d*x))/(30*b*d) + ((30*a^2*b*B + 45*b^3*B - 6*a^3*C + a*b^2*(100*A + 71*C))*sec(c + d*x)*tan(c + d*x))/(120*d) + ((4*b^2*(5*A + 4*C) + 3*a*(5*b*B - a*C))*(a + b*sec(c + d*x))^2*tan(c + d*x))/(60*b*d) + ((5*b*B - a*C)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(20*b*d) + (C*(a + b*sec(c + d*x))^4*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, a^3*A*x + ((8*a^3*B + 12*a*b^2*B + 12*a^2*b*(2*A + C) + b^3*(4*A + 3*C))*atanh(sin(c + d*x)))/(8*d) + ((16*a^2*b*B + 4*b^3*B + 3*a^3*C + 6*a*b^2*(3*A + 2*C))*tan(c + d*x))/(6*d) + (b*(12*A*b^2 + 20*a*b*B + 6*a^2*C + 9*b^2*C)*sec(c + d*x)*tan(c + d*x))/(24*d) + ((4*b*B + 3*a*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(12*d) + (C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, a^2*(3*A*b + a*B)*x + ((6*a^2*b*B + b^3*B + 2*a^3*C + 3*a*b^2*(2*A + C))*atanh(sin(c + d*x)))/(2*d) + (A*(a + b*sec(c + d*x))^3*sin(c + d*x))/d + (b*(9*a*b*B - a^2*(6*A - 8*C) + b^2*(3*A + 2*C))*tan(c + d*x))/(3*d) - (b^2*(6*a*A - 3*b*B - 5*a*C)*sec(c + d*x)*tan(c + d*x))/(6*d) - (b*(3*A - C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/2)*a*(6*A*b^2 + 6*a*b*B + a^2*(A + 2*C))*x + (b*(2*A*b^2 + 6*a*b*B + 6*a^2*C + b^2*C)*atanh(sin(c + d*x)))/(2*d) + ((3*A*b + 2*a*B)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(2*d) + (A*cos(c + d*x)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(2*d) - (b*(9*a*A*b + 4*a^2*B - 2*b^2*B - 6*a*b*C)*tan(c + d*x))/(2*d) - (b^2*(4*A*b + 2*a*B - b*C)*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/2)*(2*A*b^3 + a^3*B + 6*a*b^2*B + 3*a^2*b*(A + 2*C))*x + (b^2*(b*B + 3*a*C)*atanh(sin(c + d*x)))/d + (a*(3*A*b^2 + 6*a*b*B + a^2*(2*A + 3*C))*sin(c + d*x))/(3*d) + ((A*b + a*B)*cos(c + d*x)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(2*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^3*sin(c + d*x))/(3*d) - (b^2*(5*A*b + 3*a*B - 6*b*C)*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/8)*(12*a^2*b*B + 8*b^3*B + 12*a*b^2*(A + 2*C) + a^3*(3*A + 4*C))*x + (b^3*C*atanh(sin(c + d*x)))/d + ((3*A*b^3 + 4*a^3*B + 16*a*b^2*B + 6*a^2*b*(2*A + 3*C))*sin(c + d*x))/(6*d) + (a*(6*A*b^2 + 20*a*b*B + 3*a^2*(3*A + 4*C))*cos(c + d*x)*sin(c + d*x))/(24*d) + ((3*A*b + 4*a*B)*cos(c + d*x)^2*(a + b*sec(c + d*x))^2*sin(c + d*x))/(12*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^3*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 7, (1/8)*(3*a^3*B + 12*a*b^2*B + 4*b^3*(A + 2*C) + 3*a^2*b*(3*A + 4*C))*x + ((30*a^2*b*B + 15*b^3*B + 15*a*b^2*(2*A + 3*C) + 2*a^3*(4*A + 5*C))*sin(c + d*x))/(15*d) + ((6*A*b^3 + 15*a^3*B + 50*a*b^2*B + 15*a^2*b*(3*A + 4*C))*cos(c + d*x)*sin(c + d*x))/(40*d) + (a*(3*A*b^2 + 15*a*b*B + 2*a^2*(4*A + 5*C))*cos(c + d*x)^2*sin(c + d*x))/(30*d) + ((3*A*b + 5*a*B)*cos(c + d*x)^3*(a + b*sec(c + d*x))^2*sin(c + d*x))/(20*d) + (A*cos(c + d*x)^4*(a + b*sec(c + d*x))^3*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^6*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, (1/16)*(18*a^2*b*B + 8*b^3*B + 6*a*b^2*(3*A + 4*C) + a^3*(5*A + 6*C))*x + ((12*a^3*B + 42*a*b^2*B + 9*a^2*b*(4*A + 5*C) + b^3*(11*A + 15*C))*sin(c + d*x))/(15*d) + ((18*a^2*b*B + 8*b^3*B + 6*a*b^2*(3*A + 4*C) + a^3*(5*A + 6*C))*cos(c + d*x)*sin(c + d*x))/(16*d) + (a*(6*A*b^2 + 42*a*b*B + 5*a^2*(5*A + 6*C))*cos(c + d*x)^3*sin(c + d*x))/(120*d) + ((A*b + 2*a*B)*cos(c + d*x)^4*(a + b*sec(c + d*x))^2*sin(c + d*x))/(10*d) + (A*cos(c + d*x)^5*(a + b*sec(c + d*x))^3*sin(c + d*x))/(6*d) - ((A*b^3 + 4*a^3*B + 12*a*b^2*B + 3*a^2*b*(4*A + 5*C))*sin(c + d*x)^3)/(15*d)]

    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, ((8*a^4*B + 36*a^2*b^2*B + 5*b^4*B + 8*a^3*b*(4*A + 3*C) + 4*a*b^3*(6*A + 5*C))*atanh(sin(c + d*x)))/(16*d) - ((28*a^5*b*B - 847*a^3*b^3*B - 896*a*b^5*B - 8*a^6*C - 32*b^6*(7*A + 6*C) - 4*a^4*b^2*(42*A + 23*C) - 32*a^2*b^4*(49*A + 39*C))*tan(c + d*x))/(420*b^2*d) - ((56*a^4*b*B - 1246*a^2*b^3*B - 525*b^5*B - 16*a^5*C - 48*a^3*b^2*(7*A + 4*C) - 4*a*b^4*(406*A + 333*C))*sec(c + d*x)*tan(c + d*x))/(1680*b*d) - ((28*a^3*b*B - 371*a*b^3*B - 8*a^4*C - 32*b^4*(7*A + 6*C) - 12*a^2*b^2*(14*A + 9*C))*(a + b*sec(c + d*x))^2*tan(c + d*x))/(840*b^2*d) - ((28*a^2*b*B - 175*b^3*B - 8*a^3*C - 4*a*b^2*(42*A + 31*C))*(a + b*sec(c + d*x))^3*tan(c + d*x))/(840*b^2*d) + ((42*A*b^2 - 7*a*b*B + 2*a^2*C + 36*b^2*C)*(a + b*sec(c + d*x))^4*tan(c + d*x))/(210*b^2*d) + ((7*b*B - 2*a*C)*(a + b*sec(c + d*x))^5*tan(c + d*x))/(42*b^2*d) + (C*sec(c + d*x)*(a + b*sec(c + d*x))^5*tan(c + d*x))/(7*b*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 9, ((32*a^3*b*B + 24*a*b^3*B + 8*a^4*(2*A + C) + 12*a^2*b^2*(4*A + 3*C) + b^4*(6*A + 5*C))*atanh(sin(c + d*x)))/(16*d) + ((24*a^4*b*B + 224*a^2*b^3*B + 32*b^5*B - 4*a^5*C + 32*a*b^4*(5*A + 4*C) + a^3*b^2*(190*A + 121*C))*tan(c + d*x))/(60*b*d) + ((48*a^3*b*B + 232*a*b^3*B - 8*a^4*C + 15*b^4*(6*A + 5*C) + 2*a^2*b^2*(130*A + 89*C))*sec(c + d*x)*tan(c + d*x))/(240*d) + ((24*a^2*b*B + 32*b^3*B - 4*a^3*C + a*b^2*(70*A + 53*C))*(a + b*sec(c + d*x))^2*tan(c + d*x))/(120*b*d) + ((5*b^2*(6*A + 5*C) + 4*a*(6*b*B - a*C))*(a + b*sec(c + d*x))^3*tan(c + d*x))/(120*b*d) + ((6*b*B - a*C)*(a + b*sec(c + d*x))^4*tan(c + d*x))/(30*b*d) + (C*(a + b*sec(c + d*x))^5*tan(c + d*x))/(6*b*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, a^4*A*x + ((8*a^4*B + 24*a^2*b^2*B + 3*b^4*B + 16*a^3*b*(2*A + C) + 4*a*b^3*(4*A + 3*C))*atanh(sin(c + d*x)))/(8*d) + ((95*a^3*b*B + 80*a*b^3*B + 12*a^4*C + 4*b^4*(5*A + 4*C) + 2*a^2*b^2*(85*A + 56*C))*tan(c + d*x))/(30*d) + (b*(130*a^2*b*B + 45*b^3*B + 24*a^3*C + 4*a*b^2*(40*A + 29*C))*sec(c + d*x)*tan(c + d*x))/(120*d) + ((20*A*b^2 + 35*a*b*B + 12*a^2*C + 16*b^2*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(60*d) + ((5*b*B + 4*a*C)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(20*d) + (C*(a + b*sec(c + d*x))^4*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, a^3*(4*A*b + a*B)*x + ((32*a^3*b*B + 16*a*b^3*B + 8*a^4*C + 24*a^2*b^2*(2*A + C) + b^4*(4*A + 3*C))*atanh(sin(c + d*x)))/(8*d) + (A*(a + b*sec(c + d*x))^4*sin(c + d*x))/d + (b*(34*a^2*b*B + 4*b^3*B - a^3*(12*A - 19*C) + 8*a*b^2*(3*A + 2*C))*tan(c + d*x))/(6*d) + (b^2*(32*a*b*B - a^2*(24*A - 26*C) + 3*b^2*(4*A + 3*C))*sec(c + d*x)*tan(c + d*x))/(24*d) - (b*(12*a*A - 4*b*B - 7*a*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(12*d) - (b*(4*A - C)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, (1/2)*a^2*(12*A*b^2 + 8*a*b*B + a^2*(A + 2*C))*x + (b*(12*a^2*b*B + b^3*B + 8*a^3*C + 4*a*b^2*(2*A + C))*atanh(sin(c + d*x)))/(2*d) + ((2*A*b + a*B)*(a + b*sec(c + d*x))^3*sin(c + d*x))/d + (A*cos(c + d*x)*(a + b*sec(c + d*x))^4*sin(c + d*x))/(2*d) - (b*(12*a^3*B - 24*a*b^2*B + a^2*b*(39*A - 34*C) - 2*b^3*(3*A + 2*C))*tan(c + d*x))/(6*d) - (b^2*(6*a^2*B - 3*b^2*B + 2*a*b*(9*A - 4*C))*sec(c + d*x)*tan(c + d*x))/(6*d) - (b*(15*A*b + 6*a*B - 2*b*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, (1/2)*a*(8*A*b^3 + a^3*B + 12*a*b^2*B + 4*a^2*b*(A + 2*C))*x + (b^2*(2*A*b^2 + 8*a*b*B + 12*a^2*C + b^2*C)*atanh(sin(c + d*x)))/(2*d) + ((12*A*b^2 + 15*a*b*B + a^2*(4*A + 6*C))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(6*d) + ((4*A*b + 3*a*B)*cos(c + d*x)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(6*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^4*sin(c + d*x))/(3*d) - (b*(39*a^2*b*B - 6*b^3*B + 4*a*b^2*(11*A - 6*C) + 4*a^3*(2*A + 3*C))*tan(c + d*x))/(6*d) - (b^2*(18*a*b*B + 3*b^2*(6*A - C) + a^2*(4*A + 6*C))*sec(c + d*x)*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, (1/8)*(8*A*b^4 + 16*a^3*b*B + 32*a*b^3*B + 24*a^2*b^2*(A + 2*C) + a^4*(3*A + 4*C))*x + (b^3*(b*B + 4*a*C)*atanh(sin(c + d*x)))/d + (a*(12*A*b^3 + 8*a^3*B + 36*a*b^2*B + a^2*b*(23*A + 36*C))*sin(c + d*x))/(12*d) + ((4*A*b^2 + 8*a*b*B + a^2*(3*A + 4*C))*cos(c + d*x)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(8*d) + ((A*b + a*B)*cos(c + d*x)^2*(a + b*sec(c + d*x))^3*sin(c + d*x))/(3*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^4*sin(c + d*x))/(4*d) - (b^2*(32*a*b*B + 2*b^2*(13*A - 12*C) + 3*a^2*(3*A + 4*C))*tan(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^5*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, (1/8)*(3*a^4*B + 24*a^2*b^2*B + 8*b^4*B + 16*a*b^3*(A + 2*C) + 4*a^3*b*(3*A + 4*C))*x + (b^4*C*atanh(sin(c + d*x)))/d + ((12*A*b^4 + 80*a^3*b*B + 95*a*b^3*B + 4*a^4*(4*A + 5*C) + 2*a^2*b^2*(56*A + 85*C))*sin(c + d*x))/(30*d) + (a*(24*A*b^3 + 45*a^3*B + 130*a*b^2*B + 4*a^2*b*(29*A + 40*C))*cos(c + d*x)*sin(c + d*x))/(120*d) + ((12*A*b^2 + 35*a*b*B + 4*a^2*(4*A + 5*C))*cos(c + d*x)^2*(a + b*sec(c + d*x))^2*sin(c + d*x))/(60*d) + ((4*A*b + 5*a*B)*cos(c + d*x)^3*(a + b*sec(c + d*x))^3*sin(c + d*x))/(20*d) + (A*cos(c + d*x)^4*(a + b*sec(c + d*x))^4*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^6*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 8, (1/16)*(24*a^3*b*B + 32*a*b^3*B + 8*b^4*(A + 2*C) + 12*a^2*b^2*(3*A + 4*C) + a^4*(5*A + 6*C))*x + ((8*a^4*B + 60*a^2*b^2*B + 15*b^4*B + 20*a*b^3*(2*A + 3*C) + 8*a^3*b*(4*A + 5*C))*sin(c + d*x))/(15*d) + ((24*A*b^4 + 360*a^3*b*B + 336*a*b^3*B + 15*a^4*(5*A + 6*C) + 10*a^2*b^2*(49*A + 66*C))*cos(c + d*x)*sin(c + d*x))/(240*d) + (a*(4*A*b^3 + 16*a^3*B + 36*a*b^2*B + a^2*b*(39*A + 50*C))*cos(c + d*x)^2*sin(c + d*x))/(60*d) + ((12*A*b^2 + 48*a*b*B + 5*a^2*(5*A + 6*C))*cos(c + d*x)^3*(a + b*sec(c + d*x))^2*sin(c + d*x))/(120*d) + ((2*A*b + 3*a*B)*cos(c + d*x)^4*(a + b*sec(c + d*x))^3*sin(c + d*x))/(15*d) + (A*cos(c + d*x)^5*(a + b*sec(c + d*x))^4*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^7*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, (1/16)*(5*a^4*B + 36*a^2*b^2*B + 8*b^4*B + 8*a*b^3*(3*A + 4*C) + 4*a^3*b*(5*A + 6*C))*x + ((336*a^3*b*B + 371*a*b^3*B + 12*a^4*(6*A + 7*C) + b^4*(74*A + 105*C) + 3*a^2*b^2*(162*A + 203*C))*sin(c + d*x))/(105*d) + ((5*a^4*B + 36*a^2*b^2*B + 8*b^4*B + 8*a*b^3*(3*A + 4*C) + 4*a^3*b*(5*A + 6*C))*cos(c + d*x)*sin(c + d*x))/(16*d) + (a*(24*A*b^3 + 175*a^3*B + 336*a*b^2*B + a^2*(412*A*b + 504*b*C))*cos(c + d*x)^3*sin(c + d*x))/(840*d) + ((4*A*b^2 + 21*a*b*B + 2*a^2*(6*A + 7*C))*cos(c + d*x)^4*(a + b*sec(c + d*x))^2*sin(c + d*x))/(70*d) + ((4*A*b + 7*a*B)*cos(c + d*x)^5*(a + b*sec(c + d*x))^3*sin(c + d*x))/(42*d) + (A*cos(c + d*x)^6*(a + b*sec(c + d*x))^4*sin(c + d*x))/(7*d) - ((4*A*b^4 + 112*a^3*b*B + 91*a*b^3*B + 4*a^4*(6*A + 7*C) + 3*a^2*b^2*(50*A + 63*C))*sin(c + d*x)^3)/(105*d)]

    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 8, a^4*(b*B - a*C)*x + (b*(32*a^3*b*B + 16*a*b^3*B - 24*a^4*C + 8*a^2*b^2*C + 3*b^4*C)*atanh(sin(c + d*x)))/(8*d) + (b^2*(34*a^2*b*B + 4*b^3*B - 15*a^3*C + 12*a*b^2*C)*tan(c + d*x))/(6*d) + (b^3*(32*a*b*B - 6*a^2*C + 9*b^2*C)*sec(c + d*x)*tan(c + d*x))/(24*d) + (b^2*(4*b*B + 3*a*C)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(12*d) + (b^2*C*(a + b*sec(c + d*x))^3*tan(c + d*x))/(4*d)]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 7, a^3*(b*B - a*C)*x + (b*(6*a^2*b*B + b^3*B - 4*a^3*C + 2*a*b^2*C)*atanh(sin(c + d*x)))/(2*d) + (b^2*(9*a*b*B - a^2*C + 2*b^2*C)*tan(c + d*x))/(3*d) + (b^3*(3*b*B + 2*a*C)*sec(c + d*x)*tan(c + d*x))/(6*d) + (b^2*C*(a + b*sec(c + d*x))^2*tan(c + d*x))/(3*d)]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^1, x, 6, a^2*(b*B - a*C)*x + (b*(4*a*b*B - 2*a^2*C + b^2*C)*atanh(sin(c + d*x)))/(2*d) + (b^2*(2*b*B + a*C)*tan(c + d*x))/(2*d) + (b^2*C*(a + b*sec(c + d*x))*tan(c + d*x))/(2*d)]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 8, ((2*a^2*b*B + b^3*B - 2*a^3*C - a*b^2*(2*A + C))*atanh(sin(c + d*x)))/(2*b^4*d) + (2*a^2*(A*b^2 - a*(b*B - a*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b^4*sqrt(a + b)*d) + ((3*A*b^2 - 3*a*b*B + 3*a^2*C + 2*b^2*C)*tan(c + d*x))/(3*b^3*d) + ((b*B - a*C)*sec(c + d*x)*tan(c + d*x))/(2*b^2*d) + (C*sec(c + d*x)^2*tan(c + d*x))/(3*b*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 7, ((b^2*(2*A + C) - 2*a*(b*B - a*C))*atanh(sin(c + d*x)))/(2*b^3*d) - (2*a*(A*b^2 - a*(b*B - a*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b^3*sqrt(a + b)*d) + ((b*B - a*C)*tan(c + d*x))/(b^2*d) + (C*sec(c + d*x)*tan(c + d*x))/(2*b*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 6, ((b*B - a*C)*atanh(sin(c + d*x)))/(b^2*d) + (2*(A*b^2 - a*(b*B - a*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b^2*sqrt(a + b)*d) + (C*tan(c + d*x))/(b*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 6, (A*x)/a + (C*atanh(sin(c + d*x)))/(b*d) - (2*(A*b^2 - a*(b*B - a*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a*sqrt(a - b)*b*sqrt(a + b)*d)]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 5, -(((A*b - a*B)*x)/a^2) + (2*(A*b^2 - a*(b*B - a*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^2*sqrt(a - b)*sqrt(a + b)*d) + (A*sin(c + d*x))/(a*d)]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 6, ((2*A*b^2 - 2*a*b*B + a^2*(A + 2*C))*x)/(2*a^3) - (2*b*(A*b^2 - a*(b*B - a*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^3*sqrt(a - b)*sqrt(a + b)*d) - ((A*b - a*B)*sin(c + d*x))/(a^2*d) + (A*cos(c + d*x)*sin(c + d*x))/(2*a*d)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 7, -(((2*A*b^3 - a^3*B - 2*a*b^2*B + a^2*b*(A + 2*C))*x)/(2*a^4)) + (2*b^2*(A*b^2 - a*(b*B - a*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*sqrt(a - b)*sqrt(a + b)*d) + ((3*A*b^2 - 3*a*b*B + a^2*(2*A + 3*C))*sin(c + d*x))/(3*a^3*d) - ((A*b - a*B)*cos(c + d*x)*sin(c + d*x))/(2*a^2*d) + (A*cos(c + d*x)^2*sin(c + d*x))/(3*a*d)]
    @test_int [cos(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 8, ((8*A*b^4 - 4*a^3*b*B - 8*a*b^3*B + 4*a^2*b^2*(A + 2*C) + a^4*(3*A + 4*C))*x)/(8*a^5) - (2*b^3*(A*b^2 - a*(b*B - a*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*sqrt(a - b)*sqrt(a + b)*d) - ((3*A*b^3 - 2*a^3*B - 3*a*b^2*B + a^2*b*(2*A + 3*C))*sin(c + d*x))/(3*a^4*d) + ((4*A*b^2 - 4*a*b*B + a^2*(3*A + 4*C))*cos(c + d*x)*sin(c + d*x))/(8*a^3*d) - ((A*b - a*B)*cos(c + d*x)^2*sin(c + d*x))/(3*a^2*d) + (A*cos(c + d*x)^3*sin(c + d*x))/(4*a*d)]

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 9, ((6*a^2*b*B + b^3*B - 8*a^3*C - 2*a*b^2*(2*A + C))*atanh(sin(c + d*x)))/(2*b^5*d) + (2*a^2*(2*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 4*a*b^3*B + 4*a^4*C - 5*a^2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^5*(a + b)^(3/2)*d) - ((9*a^3*b*B - 6*a*b^3*B - a^2*b^2*(6*A - 7*C) - 12*a^4*C + b^4*(3*A + 2*C))*tan(c + d*x))/(3*b^4*(a^2 - b^2)*d) + ((3*a^2*b*B - b^3*B - 2*a*b^2*(A - C) - 4*a^3*C)*sec(c + d*x)*tan(c + d*x))/(2*b^3*(a^2 - b^2)*d) + ((3*A*b^2 - 3*a*b*B + 4*a^2*C - b^2*C)*sec(c + d*x)^2*tan(c + d*x))/(3*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^3*tan(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 8, ((2*A*b^2 - 4*a*b*B + 6*a^2*C + b^2*C)*atanh(sin(c + d*x)))/(2*b^4*d) - (2*a*(a^2*A*b^2 - 2*A*b^4 - 2*a^3*b*B + 3*a*b^3*B + 3*a^4*C - 4*a^2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^4*(a + b)^(3/2)*d) + ((2*a^2*b*B - b^3*B - a*b^2*(A - 2*C) - 3*a^3*C)*tan(c + d*x))/(b^3*(a^2 - b^2)*d) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*sec(c + d*x)*tan(c + d*x))/(2*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^2*tan(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 7, ((b*B - 2*a*C)*atanh(sin(c + d*x)))/(b^3*d) - (2*(A*b^4 + a^3*b*B - 2*a*b^3*B - 2*a^4*C + 3*a^2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^3*(a + b)^(3/2)*d) + (C*tan(c + d*x))/(b^2*d) + (a*(A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 6, (C*atanh(sin(c + d*x)))/(b^2*d) + (2*(a*A*b^2 - b^3*B - a^3*C + 2*a*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^2*(a + b)^(3/2)*d) - ((A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 5, (A*x)/a^2 - (2*(2*a^2*A*b - A*b^3 - a^3*B + a^2*b*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^2*(a - b)^(3/2)*(a + b)^(3/2)*d) + ((A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 6, -(((2*A*b - a*B)*x)/a^3) + (2*(3*a^2*A*b^2 - 2*A*b^4 - 2*a^3*b*B + a*b^3*B + a^4*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^3*(a - b)^(3/2)*(a + b)^(3/2)*d) - ((2*A*b^2 - a*b*B - a^2*(A - C))*sin(c + d*x))/(a^2*(a^2 - b^2)*d) + ((A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 7, ((6*A*b^2 - 4*a*b*B + a^2*(A + 2*C))*x)/(2*a^4) - (2*b*(4*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 2*a*b^3*B + 2*a^4*C - a^2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*(a - b)^(3/2)*(a + b)^(3/2)*d) + ((3*A*b^3 + a^3*B - 2*a*b^2*B - a^2*b*(2*A - C))*sin(c + d*x))/(a^3*(a^2 - b^2)*d) - ((3*A*b^2 - 2*a*b*B - a^2*(A - 2*C))*cos(c + d*x)*sin(c + d*x))/(2*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*(b*B - a*C))*cos(c + d*x)*sin(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 8, -(((8*A*b^3 - a^3*B - 6*a*b^2*B + 2*a^2*b*(A + 2*C))*x)/(2*a^5)) + (2*b^2*(5*a^2*A*b^2 - 4*A*b^4 - 4*a^3*b*B + 3*a*b^3*B + 3*a^4*C - 2*a^2*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*(a - b)^(3/2)*(a + b)^(3/2)*d) - ((12*A*b^4 + 6*a^3*b*B - 9*a*b^3*B - a^2*b^2*(7*A - 6*C) - a^4*(2*A + 3*C))*sin(c + d*x))/(3*a^4*(a^2 - b^2)*d) + ((4*A*b^3 + a^3*B - 3*a*b^2*B - 2*a^2*b*(A - C))*cos(c + d*x)*sin(c + d*x))/(2*a^3*(a^2 - b^2)*d) - ((4*A*b^2 - 3*a*b*B - a^2*(A - 3*C))*cos(c + d*x)^2*sin(c + d*x))/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*(b*B - a*C))*cos(c + d*x)^2*sin(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 9, ((2*A*b^2 - 6*a*b*B + 12*a^2*C + b^2*C)*atanh(sin(c + d*x)))/(2*b^5*d) - (a*(6*A*b^6 - 6*a^5*b*B + 15*a^3*b^3*B - 12*a*b^5*B + a^4*b^2*(2*A - 29*C) - 5*a^2*b^4*(A - 4*C) + 12*a^6*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*b^5*(a + b)^(5/2)*d) + ((6*a^4*b*B - 11*a^2*b^3*B + 2*b^5*B - a^3*b^2*(2*A - 21*C) + a*b^4*(5*A - 6*C) - 12*a^5*C)*tan(c + d*x))/(2*b^4*(a^2 - b^2)^2*d) - ((3*a^3*b*B - 6*a*b^3*B - a^2*b^2*(A - 10*C) + b^4*(4*A - C) - 6*a^4*C)*sec(c + d*x)*tan(c + d*x))/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^3*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((3*A*b^4 + a*(2*a^2*b*B - 5*b^3*B - 4*a^3*C + 7*a*b^2*C))*sec(c + d*x)^2*tan(c + d*x))/(2*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 8, ((b*B - 3*a*C)*atanh(sin(c + d*x)))/(b^4*d) + ((2*A*b^6 - 2*a^5*b*B + 5*a^3*b^3*B - 6*a*b^5*B + 6*a^6*C - 15*a^4*b^2*C + a^2*b^4*(A + 12*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*b^4*(a + b)^(5/2)*d) + ((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*tan(c + d*x))/(2*b^3*(a^2 - b^2)*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^2*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - (a*(2*A*b^4 + a^3*b*B - 4*a*b^3*B - 3*a^4*C + a^2*b^2*(A + 6*C))*tan(c + d*x))/(2*b^3*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 7, (C*atanh(sin(c + d*x)))/(b^3*d) + ((a^2*b^3*B + 2*b^5*B - 2*a^5*C + 5*a^3*b^2*C - 3*a*b^4*(A + 2*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*b^3*(a + b)^(5/2)*d) + (a*(A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(2*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((2*A*b^4 + a^3*b*B - 4*a*b^3*B - 3*a^4*C + a^2*b^2*(A + 6*C))*tan(c + d*x))/(2*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 6, -(((3*a*b*B - a^2*(2*A + C) - b^2*(A + 2*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*(a + b)^(5/2)*d)) - ((A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((a^2*b*B + 2*b^3*B + a^3*C - a*b^2*(3*A + 4*C))*tan(c + d*x))/(2*b*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 6, (A*x)/a^3 + ((5*a^2*A*b^3 - 2*A*b^5 + 2*a^5*B + a^3*b^2*B - 3*a^4*b*(2*A + C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^3*(a - b)^(5/2)*(a + b)^(5/2)*d) + ((A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - ((2*A*b^4 + 3*a^3*b*B - a^4*C - a^2*b^2*(5*A + 2*C))*tan(c + d*x))/(2*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 7, -(((3*A*b - a*B)*x)/a^4) - ((15*a^2*A*b^4 - 6*A*b^6 + 6*a^5*b*B - 5*a^3*b^3*B + 2*a*b^5*B - 2*a^6*C - a^4*b^2*(12*A + C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*(a - b)^(5/2)*(a + b)^(5/2)*d) - ((11*a^2*A*b^2 - 6*A*b^4 - 5*a^3*b*B + 2*a*b^3*B - a^4*(2*A - 3*C))*sin(c + d*x))/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - ((3*A*b^4 + 4*a^3*b*B - a*b^3*B - 2*a^4*C - a^2*b^2*(6*A + C))*sin(c + d*x))/(2*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 8, ((12*A*b^2 - 6*a*b*B + a^2*(A + 2*C))*x)/(2*a^5) - (b*(12*A*b^6 - 12*a^5*b*B + 15*a^3*b^3*B - 6*a*b^5*B - a^2*b^4*(29*A - 2*C) + 5*a^4*b^2*(4*A - C) + 6*a^6*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*(a - b)^(5/2)*(a + b)^(5/2)*d) - ((12*A*b^5 - 2*a^5*B + 11*a^3*b^2*B - 6*a*b^4*B + a^4*b*(6*A - 5*C) - a^2*b^3*(21*A - 2*C))*sin(c + d*x))/(2*a^4*(a^2 - b^2)^2*d) + ((6*A*b^4 + 6*a^3*b*B - 3*a*b^3*B + a^4*(A - 4*C) - a^2*b^2*(10*A - C))*cos(c + d*x)*sin(c + d*x))/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*(b*B - a*C))*cos(c + d*x)*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((7*a^2*A*b^2 - 4*A*b^4 - 5*a^3*b*B + 2*a*b^3*B + 3*a^4*C)*cos(c + d*x)*sin(c + d*x))/(2*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 9, ((b*B - 4*a*C)*atanh(sin(c + d*x)))/(b^5*d) - ((2*A*b^8 + 2*a^7*b*B - 7*a^5*b^3*B + 8*a^3*b^5*B - 8*a*b^7*B - 8*a^8*C + 28*a^6*b^2*C - 35*a^4*b^4*C + a^2*b^6*(3*A + 20*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*b^5*(a + b)^(7/2)*d) - ((5*A*b^4 + 3*a^3*b*B - 8*a*b^3*B - 12*a^4*C + 23*a^2*b^2*C - 6*b^4*C)*tan(c + d*x))/(6*b^4*(a^2 - b^2)^2*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^3*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + ((3*A*b^4 + a^3*b*B - 6*a*b^3*B - 4*a^4*C + a^2*b^2*(2*A + 9*C))*sec(c + d*x)^2*tan(c + d*x))/(6*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + (a*(2*A*b^6 - a^5*b*B + 2*a^3*b^3*B - 6*a*b^5*B + 4*a^6*C - 11*a^4*b^2*C + 3*a^2*b^4*(A + 4*C))*tan(c + d*x))/(2*b^4*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 8, (C*atanh(sin(c + d*x)))/(b^4*d) - ((3*a^2*b^5*B + 2*b^7*B - a^3*b^4*(A - 8*C) + 2*a^7*C - 7*a^5*b^2*C - 4*a*b^6*(A + 2*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*b^4*(a + b)^(7/2)*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^2*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - (a*(2*A*b^4 - 5*a*b^3*B - 3*a^4*C + a^2*b^2*(3*A + 8*C))*tan(c + d*x))/(6*b^3*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) - ((4*A*b^6 + a^3*b^3*B - 16*a*b^5*B + 9*a^6*C + 2*a^2*b^4*(7*A + 17*C) - a^4*b^2*(3*A + 28*C))*tan(c + d*x))/(6*b^3*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 7, ((a^3*B + 4*a*b^2*B - b^3*(A + 2*C) - a^2*b*(4*A + 3*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*(a + b)^(7/2)*d) + (a*(A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(3*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + ((3*A*b^4 + a^3*b*B - 6*a*b^3*B - 4*a^4*C + a^2*b^2*(2*A + 9*C))*tan(c + d*x))/(6*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + ((a^4*b*B - 10*a^2*b^3*B - 6*b^5*B + a^3*b^2*(2*A - 5*C) + 2*a^5*C + a*b^4*(13*A + 18*C))*tan(c + d*x))/(6*b^2*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 7, -(((4*a^2*b*B + b^3*B - a^3*(2*A + C) - a*b^2*(3*A + 4*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*(a + b)^(7/2)*d)) - ((A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + ((2*a^2*b*B + 3*b^3*B + a^3*C - a*b^2*(5*A + 6*C))*tan(c + d*x))/(6*b*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + ((2*a^3*b*B + 13*a*b^3*B + a^4*C - 2*b^4*(2*A + 3*C) - a^2*b^2*(11*A + 10*C))*tan(c + d*x))/(6*b*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 7, (A*x)/a^4 - ((7*a^2*A*b^5 - 2*A*b^7 - 2*a^7*B - 3*a^5*b^2*B - a^4*b^3*(8*A - C) + 4*a^6*b*(2*A + C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*(a - b)^(7/2)*(a + b)^(7/2)*d) + ((A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - ((3*A*b^4 + 5*a^3*b*B - 2*a^4*C - a^2*b^2*(8*A + 3*C))*tan(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) - ((17*a^2*A*b^4 - 6*A*b^6 + 11*a^5*b*B + 4*a^3*b^3*B - 2*a^6*C - 13*a^4*b^2*(2*A + C))*tan(c + d*x))/(6*a^3*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 8, -(((4*A*b - a*B)*x)/a^5) - ((35*a^4*A*b^4 - 28*a^2*A*b^6 + 8*A*b^8 + 8*a^7*b*B - 8*a^5*b^3*B + 7*a^3*b^5*B - 2*a*b^7*B - 2*a^8*C - a^6*b^2*(20*A + 3*C))*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*(a - b)^(7/2)*(a + b)^(7/2)*d) + ((68*a^2*A*b^4 - 24*A*b^6 + 26*a^5*b*B - 17*a^3*b^3*B + 6*a*b^5*B + a^6*(6*A - 11*C) - a^4*b^2*(65*A + 4*C))*sin(c + d*x))/(6*a^4*(a^2 - b^2)^3*d) + ((A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - ((4*A*b^4 + 6*a^3*b*B - a*b^3*B - 3*a^4*C - a^2*b^2*(9*A + 2*C))*sin(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) - ((11*a^2*A*b^4 - 4*A*b^6 + 6*a^5*b*B - 2*a^3*b^3*B + a*b^5*B - 2*a^6*C - 3*a^4*b^2*(4*A + C))*sin(c + d*x))/(2*a^3*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 9, ((20*A*b^2 - 8*a*b*B + a^2*(A + 2*C))*x)/(2*a^6) + (b*(20*A*b^8 + 20*a^7*b*B - 35*a^5*b^3*B + 28*a^3*b^5*B - 8*a*b^7*B - a^2*b^6*(69*A - 2*C) - 8*a^6*b^2*(5*A - C) + 7*a^4*b^4*(12*A - C) - 8*a^8*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^6*sqrt(a - b)*sqrt(a + b)*(a^2 - b^2)^3*d) + ((60*A*b^7 + 6*a^7*B - 65*a^5*b^2*B + 68*a^3*b^4*B - 24*a*b^6*B + a^4*b^3*(146*A - 17*C) - a^2*b^5*(167*A - 6*C) - a^6*(24*A*b - 26*b*C))*sin(c + d*x))/(6*a^5*(a^2 - b^2)^3*d) - ((10*A*b^6 - 12*a^5*b*B + 11*a^3*b^3*B - 4*a*b^5*B - a^6*(A - 6*C) + a^4*b^2*(23*A - 2*C) - a^2*b^4*(27*A - C))*cos(c + d*x)*sin(c + d*x))/(2*a^4*(a^2 - b^2)^3*d) + ((A*b^2 - a*(b*B - a*C))*cos(c + d*x)*sin(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - ((5*A*b^4 + 7*a^3*b*B - 2*a*b^3*B - 4*a^4*C - a^2*b^2*(10*A + C))*cos(c + d*x)*sin(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + ((20*A*b^6 - 27*a^5*b*B + 20*a^3*b^3*B - 8*a*b^5*B - a^2*b^4*(53*A - 2*C) + 12*a^6*C + a^4*b^2*(48*A + C))*cos(c + d*x)*sin(c + d*x))/(6*a^3*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]

    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^1, x, 3, (b*B - a*C)*x + (b*C*atanh(sin(c + d*x)))/d]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 5, ((b*B - a*C)*x)/a - (2*b*(b*B - 2*a*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a*sqrt(a - b)*sqrt(a + b)*d)]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 6, ((b*B - a*C)*x)/a^2 - (2*b*(2*a^2*b*B - b^3*B - 3*a^3*C + a*b^2*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^2*(a - b)^(3/2)*(a + b)^(3/2)*d) + (b^2*(b*B - 2*a*C)*tan(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^4, x, 7, ((b*B - a*C)*x)/a^3 - (b*(6*a^4*b*B - 5*a^2*b^3*B + 2*b^5*B - 8*a^5*C + 4*a^3*b^2*C - 2*a*b^4*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^3*(a - b)^(5/2)*(a + b)^(5/2)*d) + (b^2*(b*B - 2*a*C)*tan(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (b^2*(5*a^2*b*B - 2*b^3*B - 8*a^3*C + 2*a*b^2*C)*tan(c + d*x))/(2*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^5, x, 8, ((b*B - a*C)*x)/a^4 - (b*(8*a^6*b*B - 8*a^4*b^3*B + 7*a^2*b^5*B - 2*b^7*B - 10*a^7*C + 5*a^5*b^2*C - 7*a^3*b^4*C + 2*a*b^6*C)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^4*(a - b)^(7/2)*(a + b)^(7/2)*d) + (b^2*(b*B - 2*a*C)*tan(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + (b^2*(8*a^2*b*B - 3*b^3*B - 13*a^3*C + 3*a*b^2*C)*tan(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + (b^2*(26*a^4*b*B - 17*a^2*b^3*B + 6*b^5*B - 37*a^5*C + 13*a^3*b^2*C - 6*a*b^4*C)*tan(c + d*x))/(6*a^3*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]

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

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (-2*(a - b)*sqrt(a + b)*(24*a^3*b*B + 57*a*b^3*B - 16*a^4*C - 6*a^2*b^2*(7*A + 4*C) + 21*b^4*(9*A + 7*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^5*d) - (2*(a - b)*sqrt(a + b)*(12*a^2*b*(2*B - C) - 16*a^3*C - 6*a*b^2*(7*A - 3*B + 6*C) - 3*b^3*(63*A - 25*B + 49*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^4*d) - (2*(12*a^2*b*B - 75*b^3*B - 8*a^3*C - a*b^2*(21*A + 13*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^3*d) + (2*(63*A*b^2 + 9*a*b*B - 6*a^2*C + 49*b^2*C)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^2*d) + (2*(9*b*B + a*C)*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(63*b*d) + (2*C*sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(9*d)]
    @test_int [sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*(a - b)*sqrt(a + b)*(14*a^2*b*B - 63*b^3*B - 8*a^3*C - a*b^2*(35*A + 19*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^4*d) - (2*(a - b)*sqrt(a + b)*(35*A*b^2 - b^2*(63*B - 25*C) + 8*a^2*C - a*(14*b*B - 6*b*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^3*d) + (2*(35*A*b^2 - 14*a*b*B + 8*a^2*C + 25*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b^2*d) + (2*(7*b*B - 4*a*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*b^2*d) + (2*C*sec(c + d*x)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(7*b*d)]
    @test_int [sec(c + d*x)^1*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (-2*(a - b)*sqrt(a + b)*(3*b^2*(5*A + 3*C) + a*(5*b*B - 2*a*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^3*d) + (2*(a - b)*sqrt(a + b)*(15*A*b - 5*b*B + 2*a*C + 9*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^2*d) + (2*(5*b*B - 2*a*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b*d) + (2*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^0*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (-2*(a - b)*sqrt(a + b)*(3*b*B + a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*d) + (2*sqrt(a + b)*(3*A*b + (a - b)*(3*B - C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) - (2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, ((a - b)*sqrt(a + b)*(A - 2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) + (sqrt(a + b)*(A*b + 2*b*B + 2*a*C - 2*b*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) - (sqrt(a + b)*(A*b + 2*a*B)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d) + (A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, ((a - b)*sqrt(a + b)*(A*b + 4*a*B)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a*b*d) + (sqrt(a + b)*(A*b + 2*a*(A + 2*B + 4*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a*d) + (sqrt(a + b)*(A*b^2 - 4*a*b*B - 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^2*d) + ((A*b + 4*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*a*d) + (A*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, -((a - b)*sqrt(a + b)*(3*A*b^2 - 6*a*b*B - 8*a^2*(2*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a^2*b*d) - (sqrt(a + b)*(3*A*b^2 - 2*a*b*(A + 3*B) - 4*a^2*(4*A + 3*B + 6*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a^2*d) - (sqrt(a + b)*(A*b^3 + 8*a^3*B - 2*a*b^2*B + 4*a^2*b*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(8*a^3*d) - ((3*A*b^2 - 6*a*b*B - 8*a^2*(2*A + 3*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*a^2*d) + ((A*b + 6*a*B)*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*a*d) + (A*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d)]

    @test_int [sec(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (-2*(a - b)*sqrt(a + b)*(88*a^4*b*B + 363*a^2*b^3*B + 1617*b^5*B - 48*a^5*C - 18*a^3*b^2*(11*A + 6*C) + 6*a*b^4*(451*A + 348*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3465*b^5*d) - (2*(a - b)*sqrt(a + b)*(4*a^3*b*(22*B - 9*C) - 48*a^4*C - 6*a^2*b^2*(33*A - 11*B + 24*C) + 3*b^4*(275*A - 539*B + 225*C) - 3*a*b^3*(627*A - 143*B + 471*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3465*b^4*d) - (2*(44*a^3*b*B - 968*a*b^3*B - 24*a^4*C - 75*b^4*(11*A + 9*C) - 3*a^2*b^2*(33*A + 19*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3465*b^3*d) + (2*(33*a^2*b*B + 539*b^3*B - 18*a^3*C + 6*a*b^2*(132*A + 101*C))*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3465*b^2*d) + (2*(99*A*b^2 + 110*a*b*B + 3*a^2*C + 81*b^2*C)*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(693*b*d) + (2*(11*b*B + 3*a*C)*sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(99*d) + (2*C*sec(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(11*d)]
    @test_int [sec(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*(a - b)*sqrt(a + b)*(18*a^3*b*B - 246*a*b^3*B - 8*a^4*C - 21*b^4*(9*A + 7*C) - 3*a^2*b^2*(21*A + 11*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^4*d) + (2*(a - b)*sqrt(a + b)*(6*a^2*b*(3*B - C) - 8*a^3*C - 3*a*b^2*(21*A - 57*B + 13*C) + 3*b^3*(63*A - 25*B + 49*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^3*d) - (2*(18*a^2*b*B - 75*b^3*B - 8*a^3*C - 3*a*b^2*(21*A + 13*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^2*d) + (2*(63*A*b^2 - 18*a*b*B + 8*a^2*C + 49*b^2*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*b^2*d) + (2*(9*b*B - 4*a*C)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*b^2*d) + (2*C*sec(c + d*x)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(9*b*d)]
    @test_int [sec(c + d*x)^1*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (-2*(a - b)*sqrt(a + b)*(21*a^2*b*B + 63*b^3*B - 6*a^3*C + 2*a*b^2*(70*A + 41*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^3*d) + (2*(a - b)*sqrt(a + b)*(6*a^2*C + 3*a*b*(35*A - 7*B + 19*C) - b^2*(35*A - 63*B + 25*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^2*d) + (2*(35*A*b^2 + 21*a*b*B - 6*a^2*C + 25*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b*d) + (2*(7*b*B - 2*a*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*b*d) + (2*C*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*b*d)]
    @test_int [sec(c + d*x)^0*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (-2*(a - b)*sqrt(a + b)*(15*A*b^2 + 20*a*b*B + 3*a^2*C + 9*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^2*d) + (2*sqrt(a + b)*(3*a^2*(5*B - C) + 2*a*b*(15*A - 10*B + 6*C) - b^2*(15*A - 5*B + 9*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b*d) - (2*a*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*(5*b*B + 3*a*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^1*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, ((a - b)*sqrt(a + b)*(3*a*A - 6*b*B - 8*a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) + (sqrt(a + b)*(a*b*(3*A + 12*B - 8*C) + 6*a^2*C + 2*b^2*(3*A - 3*B + C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b*d) - (sqrt(a + b)*(3*A*b + 2*a*B)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (A*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/d - (b*(3*A - 2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, ((a - b)*sqrt(a + b)*(5*A*b + 4*a*B - 8*b*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*b*d) + (sqrt(a + b)*(b*(5*A + 8*B - 8*C) + 2*a*(A + 2*B + 8*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*d) - (sqrt(a + b)*(3*A*b^2 + 12*a*b*B + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a*d) + ((3*A*b + 4*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (A*cos(c + d*x)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(3*A*b^2 + 30*a*b*B + 8*a^2*(2*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a*b*d) + (sqrt(a + b)*(3*A*b^2 + 4*a^2*(4*A + 3*B + 6*C) + 2*a*b*(7*A + 15*B + 24*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*a*d) + (sqrt(a + b)*(A*b^3 - 8*a^3*B - 6*a*b^2*B - 12*a^2*b*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(8*a^2*d) + ((3*A*b^2 + 30*a*b*B + 8*a^2*(2*A + 3*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*a*d) + ((A*b + 2*a*B)*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, -((a - b)*sqrt(a + b)*(9*A*b^3 - 128*a^3*B - 24*a*b^2*B - 12*a^2*b*(13*A + 20*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a^2*b*d) - (sqrt(a + b)*(9*A*b^3 - 6*a*b^2*(A + 4*B) - 8*a^3*(9*A + 16*B + 12*C) - 4*a^2*b*(39*A + 28*B + 60*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a^2*d) - (sqrt(a + b)*(3*A*b^4 + 96*a^3*b*B - 8*a*b^3*B + 24*a^2*b^2*(A + 2*C) + 16*a^4*(3*A + 4*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(64*a^3*d) - ((9*A*b^3 - 128*a^3*B - 24*a*b^2*B - 12*a^2*b*(13*A + 20*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*a^2*d) + ((3*A*b^2 + 56*a*b*B + 12*a^2*(3*A + 4*C))*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(96*a*d) + ((3*A*b + 8*a*B)*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]

    @test_int [sec(c + d*x)^2*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (2*(a - b)*sqrt(a + b)*(110*a^4*b*B - 3069*a^2*b^3*B - 1617*b^5*B - 40*a^5*C - 15*a^3*b^2*(33*A + 17*C) - 15*a*b^4*(319*A + 247*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3465*b^4*d) + (2*(a - b)*sqrt(a + b)*(10*a^3*b*(11*B - 3*C) - 40*a^4*C - 15*a^2*b^2*(33*A - 121*B + 19*C) - 3*b^4*(275*A - 539*B + 225*C) + 6*a*b^3*(660*A - 209*B + 505*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3465*b^3*d) - (2*(110*a^3*b*B - 1254*a*b^3*B - 40*a^4*C - 75*b^4*(11*A + 9*C) - 15*a^2*b^2*(33*A + 19*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3465*b^2*d) - (2*(110*a^2*b*B - 539*b^3*B - 40*a^3*C - 5*a*b^2*(99*A + 67*C))*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(3465*b^2*d) + (2*(99*A*b^2 - 22*a*b*B + 8*a^2*C + 81*b^2*C)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(693*b^2*d) + (2*(11*b*B - 4*a*C)*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(99*b^2*d) + (2*C*sec(c + d*x)*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(11*b*d)]
    @test_int [sec(c + d*x)^1*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (-2*(a - b)*sqrt(a + b)*(45*a^3*b*B + 435*a*b^3*B - 10*a^4*C + 21*b^4*(9*A + 7*C) + 3*a^2*b^2*(161*A + 93*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^3*d) + (2*(a - b)*sqrt(a + b)*(10*a^3*C + 15*a^2*b*(21*A - 3*B + 11*C) - 6*a*b^2*(28*A - 60*B + 19*C) + 3*b^3*(63*A - 25*B + 49*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(315*b^2*d) + (2*(45*a^2*b*B + 75*b^3*B - 10*a^3*C + 6*a*b^2*(28*A + 19*C))*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b*d) + (2*(63*A*b^2 + 45*a*b*B - 10*a^2*C + 49*b^2*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*b*d) + (2*(9*b*B - 2*a*C)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*b*d) + (2*C*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(9*b*d)]
    @test_int [sec(c + d*x)^0*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (-2*(a - b)*sqrt(a + b)*(161*a^2*b*B + 63*b^3*B + 15*a^3*C + 5*a*b^2*(49*A + 29*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^2*d) + (2*sqrt(a + b)*(15*a^3*(7*B - C) + b^3*(35*A - 63*B + 25*C) + a^2*b*(315*A - 161*B + 135*C) - a*b^2*(245*A - 119*B + 145*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b*d) - (2*a^2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*(35*A*b^2 + 56*a*b*B + 15*a^2*C + 25*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*(7*b*B + 5*a*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*C*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^1*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, -((a - b)*sqrt(a + b)*(70*a*b*B - a^2*(15*A - 46*C) + 6*b^2*(5*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b*d) + (sqrt(a + b)*(a^2*b*(15*A + 90*B - 46*C) + 30*a^3*C - 2*b^3*(15*A - 5*B + 9*C) + 2*a*b^2*(45*A - 35*B + 17*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b*d) - (a*sqrt(a + b)*(5*A*b + 2*a*B)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (A*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/d - (b*(15*a*A - 10*b*B - 16*a*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*d) - (b*(5*A - 2*C)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^2*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(12*a^2*B - 24*b^2*B + a*b*(27*A - 56*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(12*b*d) + (sqrt(a + b)*(a*b*(27*A + 72*B - 56*C) + 8*b^2*(3*A - 3*B + C) + 6*a^2*(A + 2*(B + 6*C)))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(12*d) - (sqrt(a + b)*(15*A*b^2 + 20*a*b*B + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*d) + ((5*A*b + 4*a*B)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d) + (A*cos(c + d*x)*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(2*d) - (b*(21*A*b + 12*a*B - 8*b*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(12*d)]
    @test_int [cos(c + d*x)^3*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, ((a - b)*sqrt(a + b)*(54*a*b*B + 3*b^2*(11*A - 16*C) + 8*a^2*(2*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*b*d) + (sqrt(a + b)*(3*b^2*(11*A + 16*(B - C)) + 4*a^2*(4*A + 3*B + 6*C) + 2*a*b*(13*A + 27*B + 72*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(24*d) - (sqrt(a + b)*(5*A*b^3 + 8*a^3*B + 30*a*b^2*B + 20*a^2*b*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(8*a*d) + ((15*A*b^2 + 42*a*b*B + 8*a^2*(2*A + 3*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + ((5*A*b + 6*a*B)*cos(c + d*x)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d) + (A*cos(c + d*x)^2*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^4*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, ((a - b)*sqrt(a + b)*(15*A*b^3 + 128*a^3*B + 264*a*b^2*B + 4*a^2*b*(71*A + 108*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a*b*d) + (sqrt(a + b)*(15*A*b^3 + 8*a^3*(9*A + 16*B + 12*C) + 4*a^2*b*(71*A + 52*B + 108*C) + 2*a*b^2*(59*A + 132*B + 192*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(192*a*d) + (sqrt(a + b)*(5*A*b^4 - 160*a^3*b*B - 40*a*b^3*B - 120*a^2*b^2*(A + 2*C) - 16*a^4*(3*A + 4*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(64*a^2*d) + ((15*A*b^3 + 128*a^3*B + 264*a*b^2*B + 4*a^2*b*(71*A + 108*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*a*d) + ((5*A*b^2 + 24*a*b*B + 4*a^2*(3*A + 4*C))*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(32*d) + ((5*A*b + 8*a*B)*cos(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d) + (A*cos(c + d*x)^3*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d)]
    @test_int [cos(c + d*x)^5*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, -((a - b)*sqrt(a + b)*(45*A*b^4 - 2840*a^3*b*B - 150*a*b^3*B - 256*a^4*(4*A + 5*C) - 12*a^2*b^2*(141*A + 220*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(1920*a^2*b*d) - (sqrt(a + b)*(45*A*b^4 - 30*a*b^3*(A + 5*B) - 16*a^4*(64*A + 45*B + 80*C) - 8*a^3*b*(193*A + 355*B + 260*C) - 4*a^2*b^2*(423*A + 295*B + 660*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(1920*a^2*d) - (sqrt(a + b)*(3*A*b^5 + 96*a^5*B + 240*a^3*b^2*B - 10*a*b^4*B + 40*a^2*b^3*(A + 2*C) + 80*a^4*b*(3*A + 4*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(128*a^3*d) - ((45*A*b^4 - 2840*a^3*b*B - 150*a*b^3*B - 256*a^4*(4*A + 5*C) - 12*a^2*b^2*(141*A + 220*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(1920*a^2*d) + ((15*A*b^3 + 360*a^3*B + 590*a*b^2*B + 4*a^2*b*(193*A + 260*C))*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(960*a*d) + ((15*A*b^2 + 110*a*b*B + 16*a^2*(4*A + 5*C))*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(240*d) + ((A*b + 2*a*B)*cos(c + d*x)^3*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(8*d) + (A*cos(c + d*x)^4*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d)]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 6, (-2*(a - b)*sqrt(a + b)*(56*a^2*b*B + 63*b^3*B - 48*a^3*C - 2*a*b^2*(35*A + 22*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^5*d) + (2*sqrt(a + b)*(48*a^3*C - 4*a^2*b*(14*B + 3*C) + 2*a*b^2*(35*A + 7*B + 22*C) + b^3*(35*A - 63*B + 25*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(105*b^4*d) + (2*(35*A*b^2 - 28*a*b*B + 24*a^2*C + 25*b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b^3*d) + (2*(7*b*B - 6*a*C)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(35*b^2*d) + (2*C*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(7*b*d)]
    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 5, (-2*(a - b)*sqrt(a + b)*(15*A*b^2 - 10*a*b*B + 8*a^2*C + 9*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^4*d) - (2*sqrt(a + b)*(15*A*b^2 - b^2*(5*B - 9*C) + 8*a^2*C - 2*a*b*(5*B + C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^3*d) + (2*(5*b*B - 4*a*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b^2*d) + (2*C*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b*d)]
    @test_int [(sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 4, (-2*(a - b)*sqrt(a + b)*(3*b*B - 2*a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^3*d) + (2*sqrt(a + b)*(3*A*b - b*(3*B - C) + 2*a*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*d) + (2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(a + b*sec(c + d*x)), x, 5, (-2*(a - b)*sqrt(a + b)*C*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^2*d) + (2*sqrt(a + b)*(B - C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) - (2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d)]
    @test_int [(cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 6, (A*(a - b)*sqrt(a + b)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*d) + (sqrt(a + b)*(A*b + 2*a*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*d) + (sqrt(a + b)*(A*b - 2*a*B)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(a*d)]
    @test_int [(cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 7, -((a - b)*sqrt(a + b)*(3*A*b - 4*a*B)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^2*b*d) - (sqrt(a + b)*(3*A*b - 2*a*(A + 2*B))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^2*d) - (sqrt(a + b)*(3*A*b^2 - 4*a*b*B + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^3*d) - ((3*A*b - 4*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*a^2*d) + (A*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*a*d)]

    @test_int [(sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 6, (2*(40*a^3*b*B - 25*a*b^3*B - 6*a^2*b^2*(5*A - 4*C) - 48*a^4*C + 3*b^4*(5*A + 3*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^5*sqrt(a + b)*d) + (2*(a^2*b*(40*B - 36*C) - 48*a^3*C - 6*a*b^2*(5*A - 5*B + 2*C) - b^3*(15*A - 5*B + 9*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^4*sqrt(a + b)*d) - (2*(A*b^2 - a*(b*B - a*C))*sec(c + d*x)^2*tan(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(20*a^2*b*B - 5*b^3*B - 3*a*b^2*(5*A - 3*C) - 24*a^3*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b^3*(a^2 - b^2)*d) + (2*(5*A*b^2 - 5*a*b*B + 6*a^2*C - b^2*C)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b^2*(a^2 - b^2)*d)]
    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 5, (-2*(6*a^2*b*B - 3*b^3*B - a*b^2*(3*A - 5*C) - 8*a^3*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^4*sqrt(a + b)*d) + (2*(3*A*b^2 - (2*a + b)*(b*(3*B - C) - 4*a*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^3*sqrt(a + b)*d) + (2*a*(A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(b^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b^2*d)]
    @test_int [(sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 4, (-2*(A*b^2 - a*b*B + 2*a^2*C - b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^3*sqrt(a + b)*d) + (2*(A*b + b*(B - C) - 2*a*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^2*sqrt(a + b)*d) - (2*(A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(3/2), x, 6, (2*(A*b^2 - a*(b*B - a*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b^2*sqrt(a + b)*d) - (2*(A*b - a*(B + C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*sqrt(a + b)*d) - (2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (2*(A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 7, -(((3*A*b^2 - 2*a*b*B - a^2*(A - 2*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*b*sqrt(a + b)*d)) + ((3*A*b^2 + a*b*(A - 2*B) + 2*a^2*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*b*sqrt(a + b)*d) + (sqrt(a + b)*(3*A*b - 2*a*B)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^3*d) + (A*sin(c + d*x))/(a*d*sqrt(a + b*sec(c + d*x))) - (b*(3*A*b^2 - 2*a*b*B - a^2*(A - 2*C))*tan(c + d*x))/(a^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 8, ((15*A*b^3 + 4*a^3*B - 12*a*b^2*B - a^2*(7*A*b - 8*b*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^3*b*sqrt(a + b)*d) - ((15*A*b^2 + a*b*(5*A - 12*B) - 2*a^2*(A + 2*B - 4*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^3*sqrt(a + b)*d) - (sqrt(a + b)*(15*A*b^2 - 12*a*b*B + 4*a^2*(A + 2*C))*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(4*a^4*d) - ((5*A*b - 4*a*B)*sin(c + d*x))/(4*a^2*d*sqrt(a + b*sec(c + d*x))) + (A*cos(c + d*x)*sin(c + d*x))/(2*a*d*sqrt(a + b*sec(c + d*x))) + (b*(15*A*b^3 + 4*a^3*B - 12*a*b^2*B - a^2*(7*A*b - 8*b*C))*tan(c + d*x))/(4*a^3*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]

    @test_int [(sec(c + d*x)^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 6, (-2*(8*a^4*b*B - 15*a^2*b^3*B + 3*b^5*B - 2*a^3*b^2*(A - 14*C) + 2*a*b^4*(3*A - 4*C) - 16*a^5*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^5*sqrt(a + b)*(a^2 - b^2)*d) - (2*(a^3*b*(8*B - 12*C) - 2*a^2*b^2*(A - 3*B - 8*C) - 3*a*b^3*(A + 3*B - 3*C) - 16*a^4*C + b^4*(3*A - 3*B + C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^4*sqrt(a + b)*(a^2 - b^2)*d) - (2*(A*b^2 - a*(b*B - a*C))*sec(c + d*x)^2*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (2*a*(4*A*b^4 + a*(3*a^2*b*B - 7*b^3*B - 6*a^3*C + 10*a*b^2*C))*tan(c + d*x))/(3*b^3*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x))) + (2*(A*b^2 - a*b*B + 2*a^2*C - b^2*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b^3*(a^2 - b^2)*d)]
    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 5, (2*(2*a^3*b*B - 6*a*b^3*B + 3*b^4*(A - C) - 8*a^4*C + a^2*b^2*(A + 15*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^4*sqrt(a + b)*(a^2 - b^2)*d) + (2*(2*a^2*b*(B - 3*C) - 3*b^3*(A + B - C) - 8*a^3*C + a*b^2*(A + 3*B + 9*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^3*sqrt(a + b)*(a^2 - b^2)*d) + (2*a*(A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(3*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*(3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 5*a^4*C + a^2*b^2*(A + 9*C))*tan(c + d*x))/(3*b^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 5, (-2*(4*a*A*b^2 - a^2*b*B - 3*b^3*B - 2*a^3*C + 6*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*(a - b)*b^3*(a + b)^(3/2)*d) + (2*(2*a^2*C + a*b*(3*A + B + 3*C) - b^2*(A + 3*(B + C)))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*sqrt(a + b)*(a^2 - b^2)*d) - (2*(A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*(a^2*b*B + 3*b^3*B + 2*a^3*C - 2*a*b^2*(2*A + 3*C))*tan(c + d*x))/(3*b*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(5/2), x, 7, (2*(7*a^2*A*b^2 - 3*A*b^4 - 4*a^3*b*B + a^4*C + 3*a^2*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^2*(a - b)*b^2*(a + b)^(3/2)*d) + (2*(a*A*b^2 + 3*A*b^3 + a^3*(3*B + C) - a^2*b*(6*A + B + 3*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^2*b*sqrt(a + b)*(a^2 - b^2)*d) - (2*A*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^3*d) + (2*(A*b^2 - a*(b*B - a*C))*tan(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (2*(3*A*b^4 + 4*a^3*b*B - a^4*C - a^2*b^2*(7*A + 3*C))*tan(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^1*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 8, -((26*a^2*A*b^2 - 15*A*b^4 - 14*a^3*b*B + 6*a*b^3*B - a^4*(3*A - 8*C))*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^3*(a - b)*b*(a + b)^(3/2)*d) - ((15*A*b^4 + a*b^3*(5*A - 6*B) - a^2*b^2*(21*A + 2*B) - 6*a^4*C - a^3*b*(3*A - 2*(6*B + C)))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^3*b*sqrt(a + b)*(a^2 - b^2)*d) + (sqrt(a + b)*(5*A*b - 2*a*B)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^4*d) + (A*sin(c + d*x))/(a*d*(a + b*sec(c + d*x))^(3/2)) - (b*(5*A*b^2 - 2*a*b*B - a^2*(3*A - 2*C))*tan(c + d*x))/(3*a^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (b*(26*a^2*A*b^2 - 15*A*b^4 - 14*a^3*b*B + 6*a*b^3*B - a^4*(3*A - 8*C))*tan(c + d*x))/(3*a^3*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]

    @test_int [(a + b*sec(c + d*x))^(3/2)*(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2), x, 8, (-2*(a - b)*sqrt(a + b)*(35*a*b*B - 12*a^2*C + 9*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*d) - (2*sqrt(a + b)*(a*b^2*(35*B - 12*C) - b^3*(5*B - 9*C) + 30*a^3*C - 3*a^2*b*(15*B + 4*C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*d) - (2*a^2*sqrt(a + b)*(b*B - a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*b^2*(5*b*B + 3*a*C)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*b^2*C*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [sqrt(a + b*sec(c + d*x))*(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2), x, 7, (-2*(a - b)*sqrt(a + b)*(3*b*B + a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*d) - (2*sqrt(a + b)*(b^2*(3*B - C) - a*b*(6*B - C) + 3*a^2*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*d) - (2*a*sqrt(a + b)*(b*B - a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*b^2*C*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)/sqrt(a + b*sec(c + d*x)), x, 6, (-2*(a - b)*sqrt(a + b)*C*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*b*sqrt(a + b)*(B - C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d - (2*sqrt(a + b)*(b*B - a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(3/2), x, 4, (2*sqrt(a + b)*C*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d - (2*sqrt(a + b)*(b*B - a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d)]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(5/2), x, 7, (2*(b*B - 2*a*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*sqrt(a + b)*d) - (2*(b*B - 2*a*C)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*sqrt(a + b)*d) - (2*sqrt(a + b)*(b*B - a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (2*b^2*(b*B - 2*a*C)*tan(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(7/2), x, 8, (2*(7*a^2*b*B - 3*b^3*B - 11*a^3*C + 3*a*b^2*C)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^2*(a - b)*(a + b)^(3/2)*d) + (2*(3*b^3*B + a*b^2*(B - 3*C) + 9*a^3*C - 2*a^2*b*(3*B + C))*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a^2*sqrt(a + b)*(a^2 - b^2)*d) - (2*sqrt(a + b)*(b*B - a*C)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^3*d) + (2*b^2*(b*B - 2*a*C)*tan(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*b^2*(7*a^2*b*B - 3*b^3*B - 11*a^3*C + 3*a*b^2*C)*tan(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]

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

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 10, -((2*(9*A*b + 9*a*B + 7*b*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d)) + (2*(7*a*A + 5*b*B + 5*a*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*(9*A*b + 9*a*B + 7*b*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*(7*a*A + 5*b*B + 5*a*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*(9*A*b + 9*a*B + 7*b*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(45*d) + (2*(b*B + a*C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(7*d) + (2*b*C*sec(c + d*x)^(9/2)*sin(c + d*x))/(9*d)]
    @test_int [sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 9, -((2*(5*a*A + 3*b*B + 3*a*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*(7*A*b + 7*a*B + 5*b*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*(5*a*A + 3*b*B + 3*a*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*(7*A*b + 7*a*B + 5*b*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*(b*B + a*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d) + (2*b*C*sec(c + d*x)^(7/2)*sin(c + d*x))/(7*d)]
    @test_int [sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 8, -((2*(5*A*b + 5*a*B + 3*b*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*(b*B + a*(3*A + C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*(5*A*b + 5*a*B + 3*b*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*(b*B + a*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d) + (2*b*C*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [sec(c + d*x)^(-1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, -((2*(b*B - a*(A - C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d) + (2*(3*A*b + 3*a*B + b*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*(b*B + a*C)*sqrt(sec(c + d*x))*sin(c + d*x))/d + (2*b*C*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^(-3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, (2*(A*b + a*B - b*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*(3*b*B + a*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*A*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) + (2*b*C*sqrt(sec(c + d*x))*sin(c + d*x))/d]
    @test_int [sec(c + d*x)^(-5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 7, (2*(3*a*A + 5*b*B + 5*a*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(A*b + a*B + 3*b*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*A*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*(A*b + a*B)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 8, (2*(3*A*b + 3*a*B + 5*b*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(5*a*A + 7*b*B + 7*a*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*A*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*(A*b + a*B)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*(5*a*A + 7*b*B + 7*a*C)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-9/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 9, (2*(7*a*A + 9*b*B + 9*a*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*(5*A*b + 5*a*B + 7*b*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*A*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*(A*b + a*B)*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*(7*a*A + 9*b*B + 9*a*C)*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (2*(5*A*b + 5*a*B + 7*b*C)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-11/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x)), x, 10, (2*(7*A*b + 7*a*B + 9*b*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (10*(9*a*A + 11*b*B + 11*a*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(231*d) + (2*a*A*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2)) + (2*(A*b + a*B)*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*(9*a*A + 11*b*B + 11*a*C)*sin(c + d*x))/(77*d*sec(c + d*x)^(5/2)) + (2*(7*A*b + 7*a*B + 9*b*C)*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (10*(9*a*A + 11*b*B + 11*a*C)*sin(c + d*x))/(231*d*sqrt(sec(c + d*x)))]

    @test_int [sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 10, -((2*(18*a*b*B + 3*a^2*(5*A + 3*C) + b^2*(9*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*(18*a*b*B + 3*a^2*(5*A + 3*C) + b^2*(9*A + 7*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*(9*A*b^2 + 18*a*b*B + 4*a^2*C + 7*b^2*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(45*d) + (2*b*(9*b*B + 4*a*C)*sec(c + d*x)^(7/2)*sin(c + d*x))/(63*d) + (2*C*sec(c + d*x)^(5/2)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(9*d)]
    @test_int [sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 9, -((2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*(14*a*b*B + 7*a^2*(3*A + C) + b^2*(7*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*(7*A*b^2 + 14*a*b*B + 4*a^2*C + 5*b^2*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*b*(7*b*B + 4*a*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(35*d) + (2*C*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(7*d)]
    @test_int [sec(c + d*x)^(-1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, -((2*(10*a*b*B - 5*a^2*(A - C) + b^2*(5*A + 3*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*(3*a^2*B + b^2*B + 2*a*b*(3*A + C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*(5*A*b^2 + 10*a*b*B + 4*a^2*C + 3*b^2*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*b*(5*b*B + 4*a*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(15*d) + (2*C*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(5*d)]
    @test_int [sec(c + d*x)^(-3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, (2*(a^2*B - b^2*B + 2*a*b*(A - C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*(6*a*b*B + b^2*(3*A + C) + a^2*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*b*(3*b*B - 2*a*(A - 3*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d) - (2*b^2*(A - C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d) + (2*A*(a + b*sec(c + d*x))^2*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, (2*(10*a*b*B + 5*b^2*(A - C) + a^2*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(a^2*B + 3*b^2*B + 2*a*b*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*(4*A*b + 5*a*B)*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))) - (2*b^2*(A - 5*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*A*(a + b*sec(c + d*x))^2*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [sec(c + d*x)^(-7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 8, (2*(6*a*A*b + 3*a^2*B + 5*b^2*B + 10*a*b*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(14*a*b*B + 7*b^2*(A + 3*C) + a^2*(5*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*(4*A*b + 7*a*B)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)) + (2*(4*A*b^2 + 14*a*b*B + a^2*(5*A + 7*C))*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*A*(a + b*sec(c + d*x))^2*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [sec(c + d*x)^(-9/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^2, x, 9, (2*(18*a*b*B + 3*b^2*(3*A + 5*C) + a^2*(7*A + 9*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*(4*A*b + 9*a*B)*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2)) + (2*(4*A*b^2 + 18*a*b*B + a^2*(7*A + 9*C))*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*A*(a + b*sec(c + d*x))^2*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2))]

    @test_int [sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 10, -((2*(15*a^3*B + 27*a*b^2*B + 9*a^2*b*(5*A + 3*C) + b^3*(9*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d)) + (2*(21*a^2*b*B + 5*b^3*B + 7*a^3*(3*A + C) + 3*a*b^2*(7*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*(15*a^3*B + 27*a*b^2*B + 9*a^2*b*(5*A + 3*C) + b^3*(9*A + 7*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*(54*a^2*b*B + 15*b^3*B + 8*a^3*C + 9*a*b^2*(7*A + 5*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(63*d) + (2*b*(63*A*b^2 + 99*a*b*B + 24*a^2*C + 49*b^2*C)*sec(c + d*x)^(5/2)*sin(c + d*x))/(315*d) + (2*(3*b*B + 2*a*C)*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(21*d) + (2*C*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(9*d)]
    @test_int [sec(c + d*x)^(-1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, -((2*(15*a^2*b*B + 3*b^3*B - 5*a^3*(A - C) + 3*a*b^2*(5*A + 3*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*(21*a^3*B + 21*a*b^2*B + 21*a^2*b*(3*A + C) + b^3*(7*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*(98*a^2*b*B + 21*b^3*B + 24*a^3*C + 21*a*b^2*(5*A + 3*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(35*d) + (2*b*(35*A*b^2 + 63*a*b*B + 24*a^2*C + 25*b^2*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*(7*b*B + 6*a*C)*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(35*d) + (2*C*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^3*sin(c + d*x))/(7*d)]
    @test_int [sec(c + d*x)^(-3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, (2*(5*a^3*B - 15*a*b^2*B + 15*a^2*b*(A - C) - b^3*(5*A + 3*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(9*a^2*b*B + b^3*B + 3*a*b^2*(3*A + C) + a^3*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*b*(45*a*b*B - a^2*(10*A - 42*C) + 3*b^2*(5*A + 3*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) - (2*b^2*(5*a*A - 5*b*B - 9*a*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(15*d) - (2*b*(5*A - 3*C)*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(15*d) + (2*A*(a + b*sec(c + d*x))^3*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, (2*(15*a^2*b*B - 5*b^3*B + 15*a*b^2*(A - C) + a^3*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(a^3*B + 9*a*b^2*B + b^3*(3*A + C) + 3*a^2*b*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) - (2*b*(10*a^2*B - 15*b^2*B + 3*a*b*(7*A - 15*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) - (2*b^2*(9*A*b + 5*a*B - 5*b*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(15*d) + (2*(6*A*b + 5*a*B)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))) + (2*A*(a + b*sec(c + d*x))^3*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [sec(c + d*x)^(-7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, (2*(3*a^3*B + 15*a*b^2*B + 5*b^3*(A - C) + 3*a^2*b*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(21*a^2*b*B + 21*b^3*B + 21*a*b^2*(A + 3*C) + a^3*(5*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*(24*A*b^2 + 63*a*b*B + 5*a^2*(5*A + 7*C))*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) - (2*b^2*(11*A*b + 7*a*B - 35*b*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(35*d) + (2*(6*A*b + 7*a*B)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)) + (2*A*(a + b*sec(c + d*x))^3*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [sec(c + d*x)^(-9/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 9, (2*(27*a^2*b*B + 15*b^3*B + 9*a*b^2*(3*A + 5*C) + a^3*(7*A + 9*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*(5*a^3*B + 21*a*b^2*B + 7*b^3*(A + 3*C) + 3*a^2*b*(5*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*(24*A*b^2 + 99*a*b*B + 7*a^2*(7*A + 9*C))*sin(c + d*x))/(315*d*sec(c + d*x)^(3/2)) + (2*(8*A*b^3 + 15*a^3*B + 54*a*b^2*B + 9*a^2*b*(5*A + 7*C))*sin(c + d*x))/(63*d*sqrt(sec(c + d*x))) + (2*(2*A*b + 3*a*B)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(21*d*sec(c + d*x)^(5/2)) + (2*A*(a + b*sec(c + d*x))^3*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2))]
    @test_int [sec(c + d*x)^(-11/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^3, x, 10, (2*(7*a^3*B + 27*a*b^2*B + 3*b^3*(3*A + 5*C) + 3*a^2*b*(7*A + 9*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*(165*a^2*b*B + 77*b^3*B + 33*a*b^2*(5*A + 7*C) + 5*a^3*(9*A + 11*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(231*d) + (2*a*(24*A*b^2 + 143*a*b*B + 9*a^2*(9*A + 11*C))*sin(c + d*x))/(693*d*sec(c + d*x)^(5/2)) + (2*(24*A*b^3 + 77*a^3*B + 242*a*b^2*B + 33*a^2*b*(7*A + 9*C))*sin(c + d*x))/(495*d*sec(c + d*x)^(3/2)) + (2*(165*a^2*b*B + 77*b^3*B + 33*a*b^2*(5*A + 7*C) + 5*a^3*(9*A + 11*C))*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*(6*A*b + 11*a*B)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2)) + (2*A*(a + b*sec(c + d*x))^3*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]

    @test_int [sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 11, -((2*(15*a^4*B + 54*a^2*b^2*B + 7*b^4*B + 12*a^3*b*(5*A + 3*C) + 4*a*b^3*(9*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d)) + (2*(308*a^3*b*B + 220*a*b^3*B + 77*a^4*(3*A + C) + 66*a^2*b^2*(7*A + 5*C) + 5*b^4*(11*A + 9*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(231*d) + (2*(15*a^4*B + 54*a^2*b^2*B + 7*b^4*B + 12*a^3*b*(5*A + 3*C) + 4*a*b^3*(9*A + 7*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*(682*a^3*b*B + 660*a*b^3*B + 64*a^4*C + 15*b^4*(11*A + 9*C) + 9*a^2*b^2*(143*A + 101*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(693*d) + (2*b*(1353*a^2*b*B + 539*b^3*B + 192*a^3*C + 2*a*b^2*(891*A + 673*C))*sec(c + d*x)^(5/2)*sin(c + d*x))/(3465*d) + (2*(33*A*b^2 + 55*a*b*B + 16*a^2*C + 27*b^2*C)*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(231*d) + (2*(11*b*B + 8*a*C)*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(99*d) + (2*C*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^4*sin(c + d*x))/(11*d)]
    @test_int [sec(c + d*x)^(-1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, -((2*(60*a^3*b*B + 36*a*b^3*B - 15*a^4*(A - C) + 18*a^2*b^2*(5*A + 3*C) + b^4*(9*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d)) + (2*(21*a^4*B + 42*a^2*b^2*B + 5*b^4*B + 28*a^3*b*(3*A + C) + 4*a*b^3*(7*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*(1098*a^3*b*B + 756*a*b^3*B + 192*a^4*C + 21*b^4*(9*A + 7*C) + 7*a^2*b^2*(261*A + 155*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(315*d) + (2*b*(261*a^2*b*B + 75*b^3*B + 64*a^3*C + 2*a*b^2*(147*A + 101*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(315*d) + (2*(63*A*b^2 + 117*a*b*B + 48*a^2*C + 49*b^2*C)*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(315*d) + (2*(9*b*B + 8*a*C)*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^3*sin(c + d*x))/(63*d) + (2*C*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^4*sin(c + d*x))/(9*d)]
    @test_int [sec(c + d*x)^(-3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, (2*(5*a^4*B - 30*a^2*b^2*B - 3*b^4*B + 20*a^3*b*(A - C) - 4*a*b^3*(5*A + 3*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(84*a^3*b*B + 28*a*b^3*B + 42*a^2*b^2*(3*A + C) + 7*a^4*(A + 3*C) + b^4*(7*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*b*(609*a^2*b*B + 63*b^3*B - a^3*(70*A - 366*C) + 84*a*b^2*(5*A + 3*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d) + (2*b^2*(98*a*b*B - a^2*(35*A - 87*C) + 5*b^2*(7*A + 5*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(105*d) - (2*b*(35*a*A - 21*b*B - 39*a*C)*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(105*d) - (2*b*(7*A - 3*C)*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^3*sin(c + d*x))/(21*d) + (2*A*(a + b*sec(c + d*x))^4*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, (2*(20*a^3*b*B - 20*a*b^3*B + 30*a^2*b^2*(A - C) - b^4*(5*A + 3*C) + a^4*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(a^4*B + 18*a^2*b^2*B + b^4*B + 4*a*b^3*(3*A + C) + 4*a^3*b*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) - (2*b*(10*a^3*B - 60*a*b^2*B + a^2*b*(31*A - 87*C) - 3*b^3*(5*A + 3*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) - (2*b^2*(5*a^2*B - 5*b^2*B + 14*a*b*(A - C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(15*d) - (2*b*(11*A*b + 5*a*B - 3*b*C)*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(15*d) + (2*(8*A*b + 5*a*B)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))) + (2*A*(a + b*sec(c + d*x))^4*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [sec(c + d*x)^(-7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, (2*(3*a^4*B + 30*a^2*b^2*B - 5*b^4*B + 20*a*b^3*(A - C) + 4*a^3*b*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(28*a^3*b*B + 84*a*b^3*B + 7*b^4*(3*A + C) + 42*a^2*b^2*(A + 3*C) + a^4*(5*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) - (2*b*(217*a^2*b*B - 105*b^3*B + 12*a*b^2*(19*A - 35*C) + 10*a^3*(5*A + 7*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d) - (2*b^2*(98*a*b*B + b^2*(87*A - 35*C) + 5*a^2*(5*A + 7*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*(48*A*b^2 + 77*a*b*B + 5*a^2*(5*A + 7*C))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*(8*A*b + 7*a*B)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)) + (2*A*(a + b*sec(c + d*x))^4*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [sec(c + d*x)^(-9/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, (2*(36*a^3*b*B + 60*a*b^3*B + 15*b^4*(A - C) + 18*a^2*b^2*(3*A + 5*C) + a^4*(7*A + 9*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*(5*a^4*B + 42*a^2*b^2*B + 21*b^4*B + 28*a*b^3*(A + 3*C) + 4*a^3*b*(5*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a*(64*A*b^3 + 75*a^3*B + 261*a*b^2*B + a^2*(202*A*b + 294*b*C))*sin(c + d*x))/(315*d*sqrt(sec(c + d*x))) - (2*b^2*(162*a*b*B + 3*b^2*(41*A - 105*C) + 7*a^2*(7*A + 9*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(315*d) + (2*(48*A*b^2 + 117*a*b*B + 7*a^2*(7*A + 9*C))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(315*d*sec(c + d*x)^(3/2)) + (2*(8*A*b + 9*a*B)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2)) + (2*A*(a + b*sec(c + d*x))^4*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2))]
    @test_int [sec(c + d*x)^(-11/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 10, (2*(7*a^4*B + 54*a^2*b^2*B + 15*b^4*B + 12*a*b^3*(3*A + 5*C) + 4*a^3*b*(7*A + 9*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*(220*a^3*b*B + 308*a*b^3*B + 77*b^4*(A + 3*C) + 66*a^2*b^2*(5*A + 7*C) + 5*a^4*(9*A + 11*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(231*d) + (2*a*(192*A*b^3 + 539*a^3*B + 1353*a*b^2*B + 2*a^2*b*(673*A + 891*C))*sin(c + d*x))/(3465*d*sec(c + d*x)^(3/2)) + (2*(64*A*b^4 + 660*a^3*b*B + 682*a*b^3*B + 15*a^4*(9*A + 11*C) + 9*a^2*b^2*(101*A + 143*C))*sin(c + d*x))/(693*d*sqrt(sec(c + d*x))) + (2*(16*A*b^2 + 55*a*b*B + 3*a^2*(9*A + 11*C))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(231*d*sec(c + d*x)^(5/2)) + (2*(8*A*b + 11*a*B)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2)) + (2*A*(a + b*sec(c + d*x))^4*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]
    @test_int [sec(c + d*x)^(-13/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^4, x, 11, (2*(364*a^3*b*B + 468*a*b^3*B + 39*b^4*(3*A + 5*C) + 78*a^2*b^2*(7*A + 9*C) + a^4*(77*A + 91*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(195*d) + (2*(45*a^4*B + 330*a^2*b^2*B + 77*b^4*B + 44*a*b^3*(5*A + 7*C) + 20*a^3*b*(9*A + 11*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(231*d) + (2*a*(192*A*b^3 + 1053*a^3*B + 2171*a*b^2*B + a^2*(2518*A*b + 3146*b*C))*sin(c + d*x))/(9009*d*sec(c + d*x)^(5/2)) + (2*(192*A*b^4 + 4004*a^3*b*B + 3458*a*b^3*B + 77*a^4*(11*A + 13*C) + 11*a^2*b^2*(491*A + 637*C))*sin(c + d*x))/(6435*d*sec(c + d*x)^(3/2)) + (2*(45*a^4*B + 330*a^2*b^2*B + 77*b^4*B + 44*a*b^3*(5*A + 7*C) + 20*a^3*b*(9*A + 11*C))*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*(48*A*b^2 + 221*a*b*B + 11*a^2*(11*A + 13*C))*(a + b*sec(c + d*x))^2*sin(c + d*x))/(1287*d*sec(c + d*x)^(7/2)) + (2*(8*A*b + 13*a*B)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(143*d*sec(c + d*x)^(9/2)) + (2*A*(a + b*sec(c + d*x))^4*sin(c + d*x))/(13*d*sec(c + d*x)^(11/2))]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 11, -((2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*b^3*d)) + (2*(b*B - a*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*b^2*d) - (2*a*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(b^3*(a + b)*d) + (2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*b^3*d) + (2*(b*B - a*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*b^2*d) + (2*C*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 10, -((2*(b*B - a*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(b^2*d)) + (2*C*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*b*d) + (2*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(b^2*(a + b)*d) + (2*(b*B - a*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(b^2*d) + (2*C*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*b*d)]
    @test_int [sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 9, -((2*C*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(b*d)) + (2*A*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a*d) - (2*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a*b*(a + b)*d) + (2*C*sqrt(sec(c + d*x))*sin(c + d*x))/(b*d)]
    @test_int [sec(c + d*x)^(-1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 8, (2*A*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a*d) - (2*(A*b - a*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^2*d) + (2*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^2*(a + b)*d)]
    @test_int [sec(c + d*x)^(-3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 9, -((2*(A*b - a*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^2*d)) + (2*(3*A*b^2 - 3*a*b*B + a^2*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*a^3*d) - (2*b*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^3*(a + b)*d) + (2*A*sin(c + d*x))/(3*a*d*sqrt(sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 10, (2*(5*A*b^2 - 5*a*b*B + a^2*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*a^3*d) - (2*(3*A*b^3 - a^3*B - 3*a*b^2*B + a^2*b*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*a^4*d) + (2*b^2*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^4*(a + b)*d) + (2*A*sin(c + d*x))/(5*a*d*sec(c + d*x)^(3/2)) - (2*(A*b - a*B)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x)), x, 11, -((2*(5*A*b^3 - 3*a^3*B - 5*a*b^2*B + a^2*b*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*a^4*d)) + (2*(21*A*b^4 - 7*a^3*b*B - 21*a*b^3*B + 7*a^2*b^2*(A + 3*C) + a^4*(5*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*a^5*d) - (2*b^3*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^5*(a + b)*d) + (2*A*sin(c + d*x))/(7*a*d*sec(c + d*x)^(5/2)) - (2*(A*b - a*B)*sin(c + d*x))/(5*a^2*d*sec(c + d*x)^(3/2)) + (2*(7*A*b^2 - 7*a*b*B + a^2*(5*A + 7*C))*sin(c + d*x))/(21*a^3*d*sqrt(sec(c + d*x)))]

    @test_int [sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 11, -(((3*a^2*b*B - 2*b^3*B - a*b^2*(A - 4*C) - 5*a^3*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(b^3*(a^2 - b^2)*d)) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*b^2*(a^2 - b^2)*d) - ((3*A*b^4 + 3*a^3*b*B - 5*a*b^3*B - a^2*b^2*(A - 7*C) - 5*a^4*C)*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/((a - b)*b^3*(a + b)^2*d) + ((3*a^2*b*B - 2*b^3*B - a*b^2*(A - 4*C) - 5*a^3*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(b^3*(a^2 - b^2)*d) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^(5/2)*sin(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 10, -(((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(b^2*(a^2 - b^2)*d)) - ((A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a*b*(a^2 - b^2)*d) + ((A*b^4 + a^3*b*B - 3*a*b^3*B - 3*a^4*C + a^2*b^2*(A + 5*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a*(a - b)*b^2*(a + b)^2*d) + ((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(b^2*(a^2 - b^2)*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 9, ((A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a*b*(a^2 - b^2)*d) - ((A*b^2 + a*b*B - a^2*(2*A + C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^2*(a^2 - b^2)*d) + ((A*b^4 + a^3*b*B + a*b^3*B + a^4*C - 3*a^2*b^2*(A + C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^2*(a - b)*b*(a + b)^2*d) - ((A*b^2 - a*(b*B - a*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 9, -(((3*A*b^2 - a*b*B - a^2*(2*A - C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^2*(a^2 - b^2)*d)) + ((3*A*b^3 + 2*a^3*B - a*b^2*B - a^2*b*(4*A + C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^3*(a^2 - b^2)*d) - ((3*A*b^4 + 3*a^3*b*B - a*b^3*B - a^4*C - a^2*b^2*(5*A + C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^3*(a - b)*(a + b)^2*d) + ((A*b^2 - a*(b*B - a*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 10, ((5*A*b^3 + 2*a^3*B - 3*a*b^2*B - a^2*b*(4*A - C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^3*(a^2 - b^2)*d) - ((15*A*b^4 + 12*a^3*b*B - 9*a*b^3*B - a^2*b^2*(16*A - 3*C) - 2*a^4*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*a^4*(a^2 - b^2)*d) + (b*(5*A*b^4 + 5*a^3*b*B - 3*a*b^3*B - a^2*b^2*(7*A - C) - 3*a^4*C)*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^4*(a - b)*(a + b)^2*d) - ((5*A*b^2 - 3*a*b*B - a^2*(2*A - 3*C))*sin(c + d*x))/(3*a^2*(a^2 - b^2)*d*sqrt(sec(c + d*x))) + ((A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(a*(a^2 - b^2)*d*sqrt(sec(c + d*x))*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^2, x, 11, -(((35*A*b^4 + 20*a^3*b*B - 25*a*b^3*B - 3*a^2*b^2*(8*A - 5*C) - 2*a^4*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*a^4*(a^2 - b^2)*d)) + ((21*A*b^5 + 2*a^5*B + 16*a^3*b^2*B - 15*a*b^4*B - a^2*b^3*(20*A - 9*C) - 4*a^4*b*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*a^5*(a^2 - b^2)*d) - (b^2*(7*A*b^4 + 7*a^3*b*B - 5*a*b^3*B - 3*a^2*b^2*(3*A - C) - 5*a^4*C)*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(a^5*(a - b)*(a + b)^2*d) - ((7*A*b^2 - 5*a*b*B - a^2*(2*A - 5*C))*sin(c + d*x))/(5*a^2*(a^2 - b^2)*d*sec(c + d*x)^(3/2)) + ((7*A*b^3 + 2*a^3*B - 5*a*b^2*B - a^2*(4*A*b - 3*b*C))*sin(c + d*x))/(3*a^3*(a^2 - b^2)*d*sqrt(sec(c + d*x))) + ((A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(a*(a^2 - b^2)*d*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x)))]

    @test_int [sec(c + d*x)^(7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 12, -(((15*a^4*b*B - 29*a^2*b^3*B + 8*b^5*B - a^3*b^2*(3*A - 65*C) + 3*a*b^4*(3*A - 8*C) - 35*a^5*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*b^4*(a^2 - b^2)^2*d)) - ((15*a^3*b*B - 33*a*b^3*B - a^2*b^2*(3*A - 61*C) + b^4*(21*A - 8*C) - 35*a^4*C)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(12*b^3*(a^2 - b^2)^2*d) + ((15*A*b^6 - 15*a^5*b*B + 38*a^3*b^3*B - 35*a*b^5*B + a^4*b^2*(3*A - 86*C) - 3*a^2*b^4*(2*A - 21*C) + 35*a^6*C)*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*(a - b)^2*b^4*(a + b)^3*d) + ((15*a^4*b*B - 29*a^2*b^3*B + 8*b^5*B - a^3*b^2*(3*A - 65*C) + 3*a*b^4*(3*A - 8*C) - 35*a^5*C)*sqrt(sec(c + d*x))*sin(c + d*x))/(4*b^4*(a^2 - b^2)^2*d) - ((15*a^3*b*B - 33*a*b^3*B - a^2*b^2*(3*A - 61*C) + b^4*(21*A - 8*C) - 35*a^4*C)*sec(c + d*x)^(3/2)*sin(c + d*x))/(12*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^(7/2)*sin(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 7*a^4*C + a^2*b^2*(A + 13*C))*sec(c + d*x)^(5/2)*sin(c + d*x))/(4*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 11, ((3*a^3*b*B - 9*a*b^3*B + b^4*(5*A - 8*C) - 15*a^4*C + a^2*b^2*(A + 29*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*b^3*(a^2 - b^2)^2*d) + ((3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + a^2*b^2*(3*A + 11*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a*b^2*(a^2 - b^2)^2*d) - ((3*A*b^6 - 3*a^5*b*B + 6*a^3*b^3*B - 15*a*b^5*B + 15*a^6*C + 5*a^2*b^4*(2*A + 7*C) - a^4*b^2*(A + 38*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a*(a - b)^2*b^3*(a + b)^3*d) - ((3*a^3*b*B - 9*a*b^3*B + b^4*(5*A - 8*C) - 15*a^4*C + a^2*b^2*(A + 29*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(4*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^(5/2)*sin(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + a^2*b^2*(3*A + 11*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 10, -(((A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + a^2*b^2*(5*A + 9*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a*b^2*(a^2 - b^2)^2*d)) + ((A*b^4 + 3*a^3*b*B + 3*a*b^3*B + a^4*C - 7*a^2*b^2*(A + C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^2*b*(a^2 - b^2)^2*d) - ((A*b^6 - a^5*b*B + 10*a^3*b^3*B + 3*a*b^5*B - 3*a^4*b^2*(A - 2*C) - 3*a^6*C - 5*a^2*b^4*(2*A + 3*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^2*(a - b)^2*b^2*(a + b)^3*d) - ((A*b^2 - a*(b*B - a*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + a^2*b^2*(5*A + 9*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(4*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 10, -(((3*A*b^4 + 5*a^3*b*B + a*b^3*B - a^4*C - a^2*b^2*(9*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^2*b*(a^2 - b^2)^2*d)) + ((3*A*b^4 - 7*a^3*b*B + a*b^3*B - a^2*b^2*(5*A - 3*C) + a^4*(8*A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^3*(a^2 - b^2)^2*d) - ((3*A*b^6 - 3*a^5*b*B - 10*a^3*b^3*B + a*b^5*B - 3*a^2*b^4*(2*A - C) - a^6*C + 5*a^4*b^2*(3*A + 2*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^3*(a - b)^2*b*(a + b)^3*d) - ((A*b^2 - a*(b*B - a*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((A*b^4 + 3*a^3*b*B + 3*a*b^3*B + a^4*C - 7*a^2*b^2*(A + C))*sqrt(sec(c + d*x))*sin(c + d*x))/(4*a*b*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 10, ((15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B + a^4*(8*A - 5*C) - a^2*b^2*(29*A + C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^3*(a^2 - b^2)^2*d) - ((15*A*b^5 - 8*a^5*B + 5*a^3*b^2*B - 3*a*b^4*B - a^2*b^3*(33*A + C) + a^4*b*(24*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^4*(a^2 - b^2)^2*d) + ((15*A*b^6 - 15*a^5*b*B + 6*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C - a^2*b^4*(38*A + C) + 5*a^4*b^2*(7*A + 2*C))*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^4*(a - b)^2*(a + b)^3*d) + ((A*b^2 - a*(b*B - a*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - ((5*A*b^4 + 7*a^3*b*B - a*b^3*B - 3*a^4*C - a^2*b^2*(11*A + 3*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(4*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^(-3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^3, x, 11, -(((35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B + 3*a^4*b*(8*A - 3*C) - a^2*b^3*(65*A - 3*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^4*(a^2 - b^2)^2*d)) + ((105*A*b^6 - 72*a^5*b*B + 99*a^3*b^3*B - 45*a*b^5*B + a^4*b^2*(128*A - 15*C) - a^2*b^4*(223*A - 9*C) + 8*a^6*(A + 3*C))*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(12*a^5*(a^2 - b^2)^2*d) - (b*(35*A*b^6 - 35*a^5*b*B + 38*a^3*b^3*B - 15*a*b^5*B - a^2*b^4*(86*A - 3*C) + 3*a^4*b^2*(21*A - 2*C) + 15*a^6*C)*sqrt(cos(c + d*x))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(4*a^5*(a - b)^2*(a + b)^3*d) + ((35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B + a^4*(8*A - 21*C) - a^2*b^2*(61*A - 3*C))*sin(c + d*x))/(12*a^3*(a^2 - b^2)^2*d*sqrt(sec(c + d*x))) + ((A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(2*a*(a^2 - b^2)*d*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^2) - ((7*A*b^4 + 9*a^3*b*B - 3*a*b^3*B - 5*a^4*C - a^2*b^2*(13*A + C))*sin(c + d*x))/(4*a^2*(a^2 - b^2)^2*d*sqrt(sec(c + d*x))*(a + b*sec(c + d*x)))]

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

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 14, ((24*A*b^2 + 18*a*b*B - a^2*C + 16*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(24*b*d*sqrt(a + b*sec(c + d*x))) - ((2*a^2*b*B - 8*b^3*B - a^3*C - 4*a*b^2*(2*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(8*b^2*d*sqrt(a + b*sec(c + d*x))) - ((24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(24*b^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + ((24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*b^2*d) + ((6*b*B + a*C)*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*b*d) + (C*sec(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 13, ((8*a*A + 4*b*B + 3*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(4*d*sqrt(a + b*sec(c + d*x))) + ((8*A*b^2 + 4*a*b*B - a^2*C + 4*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(4*b*d*sqrt(a + b*sec(c + d*x))) - ((4*b*B + a*C)*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(4*b*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + ((4*b*B + a*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*b*d) + (C*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 12, ((2*a*B + b*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + ((2*b*B + a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + ((2*A - C)*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (C*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 12, (-2*(A*b^2 - a^2*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3*a*d*sqrt(a + b*sec(c + d*x))) + (2*b*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + (2*(A*b + 3*a*B)*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 9, (-2*(a^2 - b^2)*(2*A*b - 5*a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(15*a^2*d*sqrt(a + b*sec(c + d*x))) - (2*(2*A*b^2 - 5*a*b*B - 3*a^2*(3*A + 5*C))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*(A*b + 5*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a*d*sqrt(sec(c + d*x)))]
    @test_int [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 10, (2*(a^2 - b^2)*(25*a^2*A + 8*A*b^2 - 14*a*b*B + 35*a^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(105*a^3*d*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^3 + 63*a^3*B - 14*a*b^2*B + a^2*b*(19*A + 35*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(105*a^3*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*(A*b + 7*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(35*a*d*sec(c + d*x)^(3/2)) - (2*(4*A*b^2 - 7*a*b*B - 5*a^2*(5*A + 7*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*a^2*d*sqrt(sec(c + d*x)))]
    @test_int [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 11, (-2*(a^2 - b^2)*(16*A*b^3 - 75*a^3*B - 24*a*b^2*B + 6*a^2*b*(6*A + 7*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(315*a^4*d*sqrt(a + b*sec(c + d*x))) - (2*(16*A*b^4 - 57*a^3*b*B - 24*a*b^3*B + 6*a^2*b^2*(4*A + 7*C) - 21*a^4*(7*A + 9*C))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(315*a^4*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*(A*b + 9*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(63*a*d*sec(c + d*x)^(5/2)) - (2*(6*A*b^2 - 9*a*b*B - 7*a^2*(7*A + 9*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a^2*d*sec(c + d*x)^(3/2)) + (2*(8*A*b^3 + 75*a^3*B - 12*a*b^2*B + a^2*b*(13*A + 21*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a^3*d*sqrt(sec(c + d*x)))]

    @test_int [sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 15, ((136*a^2*b*B + 128*b^3*B - 3*a^3*C + 12*a*b^2*(28*A + 19*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(192*b*d*sqrt(a + b*sec(c + d*x))) - ((8*a^3*b*B - 96*a*b^3*B - 3*a^4*C - 24*a^2*b^2*(2*A + C) - 16*b^4*(4*A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(64*b^2*d*sqrt(a + b*sec(c + d*x))) - ((24*a^2*b*B + 128*b^3*B - 9*a^3*C + 12*a*b^2*(20*A + 13*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(192*b^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + ((24*a^2*b*B + 128*b^3*B - 9*a^3*C + 12*a*b^2*(20*A + 13*C))*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*b^2*d) + ((48*A*b^2 + 56*a*b*B + 3*a^2*C + 36*b^2*C)*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(96*b*d) + ((8*b*B + 3*a*C)*sec(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + (C*sec(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]
    @test_int [sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 14, ((42*a*b*B + 8*b^2*(3*A + 2*C) + a^2*(48*A + 17*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(24*d*sqrt(a + b*sec(c + d*x))) + ((6*a^2*b*B + 8*b^3*B - a^3*C + 12*a*b^2*(2*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(8*b*d*sqrt(a + b*sec(c + d*x))) - ((24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(24*b*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + ((24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*b*d) + ((2*b*B + a*C)*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (C*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 13, ((8*a^2*B + 4*b^2*B + a*b*(8*A + 7*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(4*d*sqrt(a + b*sec(c + d*x))) + ((8*A*b^2 + 12*a*b*B + 3*a^2*C + 4*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(4*d*sqrt(a + b*sec(c + d*x))) + ((8*a*A - 4*b*B - 5*a*C)*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(4*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + ((4*b*B + 3*a*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (C*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d)]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 13, ((6*a*b*B - b^2*(2*A - 3*C) + 2*a^2*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3*d*sqrt(a + b*sec(c + d*x))) + (b*(2*b*B + 3*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + ((8*A*b + 6*a*B - 3*b*C)*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) - (b*(2*A - 3*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d) + (2*A*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 13, -((2*(3*A*b^3 - 5*a^3*B + 5*a*b^2*B - 3*a^2*b*(A + 5*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(15*a*d*sqrt(a + b*sec(c + d*x)))) + (2*b^2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + (2*(3*A*b^2 + 20*a*b*B + 3*a^2*(3*A + 5*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(3*A*b + 5*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))) + (2*A*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 10, (2*(a^2 - b^2)*(25*a^2*A - 6*A*b^2 + 21*a*b*B + 35*a^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(105*a^2*d*sqrt(a + b*sec(c + d*x))) - (2*(6*A*b^3 - 63*a^3*B - 21*a*b^2*B - 2*a^2*b*(41*A + 70*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(105*a^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(3*A*b + 7*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)) + (2*(3*A*b^2 + 42*a*b*B + 5*a^2*(5*A + 7*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*a*d*sqrt(sec(c + d*x))) + (2*A*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 11, (2*(a^2 - b^2)*(8*A*b^3 + 75*a^3*B - 18*a*b^2*B + a^2*(39*A*b + 63*b*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(315*a^3*d*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B + 21*a^4*(7*A + 9*C) + 3*a^2*b^2*(11*A + 21*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(315*a^3*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(A*b + 3*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(21*d*sec(c + d*x)^(5/2)) + (2*(3*A*b^2 + 72*a*b*B + 7*a^2*(7*A + 9*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a*d*sec(c + d*x)^(3/2)) - (2*(4*A*b^3 - 75*a^3*B - 9*a*b^2*B - 2*a^2*b*(44*A + 63*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a^2*d*sqrt(sec(c + d*x))) + (2*A*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2))]

    @test_int [sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 15, ((472*a^2*b*B + 128*b^3*B + 4*a*b^2*(132*A + 89*C) + a^3*(384*A + 133*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(192*d*sqrt(a + b*sec(c + d*x))) + ((40*a^3*b*B + 160*a*b^3*B - 5*a^4*C + 120*a^2*b^2*(2*A + C) + 16*b^4*(4*A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(64*b*d*sqrt(a + b*sec(c + d*x))) - ((264*a^2*b*B + 128*b^3*B + 15*a^3*C + 4*a*b^2*(108*A + 71*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(192*b*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + ((264*a^2*b*B + 128*b^3*B + 15*a^3*C + 4*a*b^2*(108*A + 71*C))*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*b*d) + ((16*A*b^2 + 24*a*b*B + 5*a^2*C + 12*b^2*C)*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(32*d) + ((8*b*B + 5*a*C)*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d) + (C*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d)]
    @test_int [((a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(sec(c + d*x)), x, 14, ((48*a^3*B + 66*a*b^2*B + 8*b^3*(3*A + 2*C) + a^2*b*(96*A + 59*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(24*d*sqrt(a + b*sec(c + d*x))) + ((30*a^2*b*B + 8*b^3*B + 5*a^3*C + 20*a*b^2*(2*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(8*d*sqrt(a + b*sec(c + d*x))) - ((54*a*b*B - a^2*(48*A - 33*C) + 8*b^2*(3*A + 2*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(24*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + ((24*A*b^2 + 42*a*b*B + 15*a^2*C + 16*b^2*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + ((6*b*B + 5*a*C)*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d) + (C*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [((a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(3/2), x, 14, ((48*a^2*b*B + 12*b^3*B + 8*a^3*(A + 3*C) + a*b^2*(16*A + 33*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(12*d*sqrt(a + b*sec(c + d*x))) + (b*(8*A*b^2 + 20*a*b*B + 15*a^2*C + 4*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(4*d*sqrt(a + b*sec(c + d*x))) + ((24*a^2*B - 12*b^2*B + a*b*(56*A - 27*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(12*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) - (b*(8*a*A - 12*b*B - 21*a*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*d) - (b*(4*A - 3*C)*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(6*d) + (2*A*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(5/2), x, 14, ((10*a^3*B + 20*a*b^2*B - b^3*(16*A - 15*C) + 4*a^2*b*(4*A + 15*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(15*d*sqrt(a + b*sec(c + d*x))) + (b^2*(2*b*B + 5*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + ((70*a*b*B + b^2*(46*A - 15*C) + 6*a^2*(3*A + 5*C))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) - (b*(16*A*b + 10*a*B - 15*b*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*d) + (2*(A*b + a*B)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) + (2*A*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [((a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(7/2), x, 14, (-2*(15*A*b^4 - 56*a^3*b*B + 56*a*b^3*B + 10*a^2*b^2*(A - 7*C) - 5*a^4*(5*A + 7*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(105*a*d*sqrt(a + b*sec(c + d*x))) + (2*b^3*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + (2*(15*A*b^3 + 63*a^3*B + 161*a*b^2*B + 5*a^2*b*(29*A + 49*C))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(105*a*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(15*A*b^2 + 56*a*b*B + 5*a^2*(5*A + 7*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*(5*A*b + 7*a*B)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)) + (2*A*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [((a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(9/2), x, 11, (-2*(a^2 - b^2)*(10*A*b^3 - 75*a^3*B - 45*a*b^2*B - 6*a^2*b*(19*A + 28*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(315*a^2*d*sqrt(a + b*sec(c + d*x))) - (2*(10*A*b^4 - 435*a^3*b*B - 45*a*b^3*B - 21*a^4*(7*A + 9*C) - 3*a^2*b^2*(93*A + 161*C))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(315*a^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(15*A*b^2 + 90*a*b*B + 7*a^2*(7*A + 9*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*d*sec(c + d*x)^(3/2)) + (2*(5*A*b^3 + 75*a^3*B + 135*a*b^2*B + a^2*b*(163*A + 231*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a*d*sqrt(sec(c + d*x))) + (2*(5*A*b + 9*a*B)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2)) + (2*A*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2))]
    @test_int [((a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sec(c + d*x)^(11/2), x, 12, (2*(a^2 - b^2)*(40*A*b^4 + 1254*a^3*b*B - 110*a*b^3*B + 75*a^4*(9*A + 11*C) + 15*a^2*b^2*(19*A + 33*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3465*a^3*d*sqrt(a + b*sec(c + d*x))) + (2*(40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B + 15*a^2*b^3*(17*A + 33*C) + 15*a^4*b*(247*A + 319*C))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3465*a^3*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(5*A*b^2 + 44*a*b*B + 3*a^2*(9*A + 11*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(231*d*sec(c + d*x)^(5/2)) + (2*(15*A*b^3 + 539*a^3*B + 825*a*b^2*B + 5*a^2*b*(229*A + 297*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3465*a*d*sec(c + d*x)^(3/2)) - (2*(20*A*b^4 - 1793*a^3*b*B - 55*a*b^3*B - 75*a^4*(9*A + 11*C) - 5*a^2*b^2*(205*A + 297*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3465*a^2*d*sqrt(sec(c + d*x))) + (2*(5*A*b + 11*a*B)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2)) + (2*A*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 13, ((4*b*B - a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(4*b*d*sqrt(a + b*sec(c + d*x))) + ((8*A*b^2 - 4*a*b*B + 3*a^2*C + 4*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(4*b^2*d*sqrt(a + b*sec(c + d*x))) - ((4*b*B - 3*a*C)*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(4*b^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + ((4*b*B - 3*a*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*b^2*d) + (C*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*b*d)]
    @test_int [(sqrt(sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 12, ((2*A + C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + ((2*b*B - a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(b*d*sqrt(a + b*sec(c + d*x))) - (C*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(b*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (C*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(b*d)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))), x, 11, (-2*(A*b - a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(a*d*sqrt(a + b*sec(c + d*x))) + (2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + (2*A*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(a*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))), x, 8, (2*(2*A*b^2 - 3*a*b*B + a^2*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3*a^2*d*sqrt(a + b*sec(c + d*x))) - (2*(2*A*b - 3*a*B)*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*a*d*sqrt(sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))), x, 9, (-2*(8*A*b^3 - 5*a^3*B - 10*a*b^2*B + a^2*b*(7*A + 15*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(15*a^3*d*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^2 - 10*a*b*B + 3*a^2*(3*A + 5*C))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a^3*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(5*a*d*sec(c + d*x)^(3/2)) - (2*(4*A*b - 5*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a^2*d*sqrt(sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(7/2)*sqrt(a + b*sec(c + d*x))), x, 10, (2*(48*A*b^4 - 49*a^3*b*B - 56*a*b^3*B + 5*a^4*(5*A + 7*C) + 2*a^2*b^2*(16*A + 35*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(105*a^4*d*sqrt(a + b*sec(c + d*x))) - (2*(48*A*b^3 - 63*a^3*B - 56*a*b^2*B + a^2*(44*A*b + 70*b*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(105*a^4*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(7*a*d*sec(c + d*x)^(5/2)) - (2*(6*A*b - 7*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(35*a^2*d*sec(c + d*x)^(3/2)) + (2*(24*A*b^2 - 28*a*b*B + 5*a^2*(5*A + 7*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*a^3*d*sqrt(sec(c + d*x)))]

    @test_int [(sqrt(sec(c + d*x))*(a*A + (A*b + a*B)*sec(c + d*x) + b*B*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 13, ((2*a*A + b*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) + ((2*A*b + a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(d*sqrt(a + b*sec(c + d*x))) - (B*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (B*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/d]

    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 13, (C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(b*d*sqrt(a + b*sec(c + d*x))) + ((2*b*B - 3*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(b^2*d*sqrt(a + b*sec(c + d*x))) - ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(b^2*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) - (2*(A*b^2 - a*(b*B - a*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(b^2*(a^2 - b^2)*d)]
    @test_int [(sqrt(sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 12, (2*A*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(a*d*sqrt(a + b*sec(c + d*x))) + (2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(b*d*sqrt(a + b*sec(c + d*x))) + (2*(A*b^2 - a*(b*B - a*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(a*b*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) - (2*(A*b^2 - a*(b*B - a*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(3/2)), x, 8, -((2*(2*A*b - a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(a^2*d*sqrt(a + b*sec(c + d*x)))) - (2*(2*A*b^2 - a*b*B - a^2*(A - C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(a^2*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(A*b^2 - a*(b*B - a*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)), x, 9, (2*(8*A*b^2 - 6*a*b*B + a^2*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3*a^3*d*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^3 + 3*a^3*B - 6*a*b^2*B - a^2*(5*A*b - 3*b*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^3*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(a*(a^2 - b^2)*d*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))) - (2*(4*A*b^2 - 3*a*b*B - a^2*(A - 3*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*a^2*(a^2 - b^2)*d*sqrt(sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(3/2)), x, 10, -((2*(48*A*b^3 - 5*a^3*B - 40*a*b^2*B + 6*a^2*b*(2*A + 5*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(15*a^4*d*sqrt(a + b*sec(c + d*x)))) - (2*(48*A*b^4 + 25*a^3*b*B - 40*a*b^3*B - 6*a^2*b^2*(4*A - 5*C) - 3*a^4*(3*A + 5*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a^4*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(a*(a^2 - b^2)*d*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))) - (2*(6*A*b^2 - 5*a*b*B - a^2*(A - 5*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(5*a^2*(a^2 - b^2)*d*sec(c + d*x)^(3/2)) + (2*(24*A*b^3 + 5*a^3*B - 20*a*b^2*B - a^2*(9*A*b - 15*b*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a^3*(a^2 - b^2)*d*sqrt(sec(c + d*x)))]

    @test_int [(sec(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 14, ((2*A*b^2 - 2*a*b*B + 5*a^2*C - 3*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3*b^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + ((2*b*B - 5*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(b^3*d*sqrt(a + b*sec(c + d*x))) + ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*b^3*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) - (2*(A*b^2 - a*(b*B - a*C))*sec(c + d*x)^(5/2)*sin(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*(3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 5*a^4*C + a^2*b^2*(A + 9*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*b^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x))) - ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*b^3*(a^2 - b^2)^2*d)]
    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 13, -((2*(A*b^2 - a*(b*B - a*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3*a*b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))) + (2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(b^2*d*sqrt(a + b*sec(c + d*x))) - (2*(A*b^4 - 4*a*b^3*B - 3*a^4*C + a^2*b^2*(3*A + 7*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a*b^2*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) - (2*(A*b^2 - a*(b*B - a*C))*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*(A*b^4 - 4*a*b^3*B - 3*a^4*C + a^2*b^2*(3*A + 7*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(3*b^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(sqrt(sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 9, -((2*(2*A*b^2 + a*b*B - a^2*(3*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3*a^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))) - (2*(2*A*b^3 + 3*a^3*B + a*b^2*B - 2*a^2*b*(3*A + 2*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^2*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) - (2*(A*b^2 - a*(b*B - a*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*(A*b^4 + 2*a^3*b*B + 2*a*b^3*B + a^4*C - 5*a^2*b^2*(A + C))*sqrt(sec(c + d*x))*sin(c + d*x))/(3*a*b*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(5/2)), x, 9, (2*(8*A*b^3 + 3*a^3*B - 2*a*b^2*B - a^2*b*(9*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3*a^3*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B + 3*a^4*(A - C) - a^2*b^2*(15*A + C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^3*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(A*b^2 - a*(b*B - a*C))*sqrt(sec(c + d*x))*sin(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (2*(4*A*b^4 + 5*a^3*b*B - a*b^3*B - 2*a^4*C - 2*a^2*b^2*(4*A + C))*sqrt(sec(c + d*x))*sin(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(5/2)), x, 10, -((2*(16*A*b^4 + 9*a^3*b*B - 8*a*b^3*B - 2*a^2*b^2*(8*A - C) - a^4*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(3*a^4*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))) - (2*(16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 2*a^2*b^3*(14*A - C) + a^4*(8*A*b - 6*b*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^4*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(3*a*(a^2 - b^2)*d*sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(3/2)) + (2*(10*a^2*A*b^2 - 6*A*b^4 - 7*a^3*b*B + 3*a*b^3*B + 4*a^4*C)*sin(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B + a^4*(A - 5*C) - a^2*b^2*(13*A - C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*a^3*(a^2 - b^2)^2*d*sqrt(sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sec(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(5/2)), x, 11, (2*(128*A*b^5 + 5*a^5*B + 80*a^3*b^2*B - 80*a*b^4*B - 4*a^2*b^3*(29*A - 10*C) - a^4*b*(17*A + 45*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(sec(c + d*x)))/(15*a^5*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(128*A*b^6 - 40*a^5*b*B + 140*a^3*b^3*B - 80*a*b^5*B + 5*a^4*b^2*(11*A - 15*C) - 4*a^2*b^4*(53*A - 10*C) + 3*a^6*(3*A + 5*C))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a^5*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(3*a*(a^2 - b^2)*d*sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)) - (2*(8*A*b^4 + 9*a^3*b*B - 5*a*b^3*B - 2*a^2*b^2*(6*A - C) - 6*a^4*C)*sin(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))) + (2*(48*A*b^4 + 50*a^3*b*B - 30*a*b^3*B + a^4*(3*A - 35*C) - a^2*b^2*(71*A - 15*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a^3*(a^2 - b^2)^2*d*sec(c + d*x)^(3/2)) - (2*(64*A*b^5 - 5*a^5*B + 65*a^3*b^2*B - 40*a*b^4*B + 2*a^4*b*(7*A - 20*C) - 2*a^2*b^3*(49*A - 10*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a^4*(a^2 - b^2)^2*d*sqrt(sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(e+f*x)^n*(a+b*sec(e+f*x))^(m/3)*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^(2/3), x, 8, (sqrt(2)*(a + b)*C*AppellF1(1/2, 1/2, -(5/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(2/3)) + (sqrt(2)*(b*B - a*C)*AppellF1(1/2, 1/2, -(2/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(2/3)) + A*Unintegrable((a + b*sec(c + d*x))^(2/3), x)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)*(a + b*sec(c + d*x))^(1/3), x, 8, (sqrt(2)*(a + b)*C*AppellF1(1/2, 1/2, -(4/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(1/3)) + (sqrt(2)*(b*B - a*C)*AppellF1(1/2, 1/2, -(1/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(1/3)) + A*Unintegrable((a + b*sec(c + d*x))^(1/3), x)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(1/3), x, 8, (sqrt(2)*C*AppellF1(1/2, 1/2, -(2/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(2/3)) + (sqrt(2)*(b*B - a*C)*AppellF1(1/2, 1/2, 1/3, 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*((a + b*sec(c + d*x))/(a + b))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*(a + b*sec(c + d*x))^(1/3)) + A*Unintegrable(1/(a + b*sec(c + d*x))^(1/3), x)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(a + b*sec(c + d*x))^(2/3), x, 8, (sqrt(2)*C*AppellF1(1/2, 1/2, -(1/3), 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^(1/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*((a + b*sec(c + d*x))/(a + b))^(1/3)) + (sqrt(2)*(b*B - a*C)*AppellF1(1/2, 1/2, 2/3, 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*((a + b*sec(c + d*x))/(a + b))^(2/3)*tan(c + d*x))/(b*d*sqrt(1 + sec(c + d*x))*(a + b*sec(c + d*x))^(2/3)) + A*Unintegrable(1/(a + b*sec(c + d*x))^(2/3), x)]

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

    @test_int [(a + b*sec(c + d*x))^m*(a*b*B - a^2*C + b^2*B*sec(c + d*x) + b^2*C*sec(c + d*x)^2), x, 5, (sqrt(2)*b*(a + b)*C*AppellF1(1/2, 1/2, -1 - m, 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^m*tan(c + d*x))/(((a + b*sec(c + d*x))/(a + b))^m*(d*sqrt(1 + sec(c + d*x)))) + (b*B - a*C)*Unintegrable((a + b*sec(c + d*x))^(1 + m), x)]

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*(a+a*sec(e+f*x))^m*(d*cos(e+f*x))^n*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^n*(a+a*sec(e+f*x))^m*(A+C*sec(e+f*x)^2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^(n/2)*(a+a*sec(e+f*x))^m*(A+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=n>=0=#

    @test_int [(A + C*sec(c + d*x)^2)*cos(c + d*x)^(9/2), x, 4, (2*(7*A + 9*C)*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (2*(7*A + 9*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(45*d) + (2*A*cos(c + d*x)^(7/2)*sin(c + d*x))/(9*d)]
    @test_int [(A + C*sec(c + d*x)^2)*cos(c + d*x)^(7/2), x, 4, (2*(5*A + 7*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*(5*A + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d)]
    @test_int [(A + C*sec(c + d*x)^2)*cos(c + d*x)^(5/2), x, 3, (2*(3*A + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [(A + C*sec(c + d*x)^2)*cos(c + d*x)^(3/2), x, 3, (2*(A + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*A*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [(A + C*sec(c + d*x)^2)*cos(c + d*x)^(1/2), x, 3, (2*(A - C)*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*C*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/cos(c + d*x)^(1/2), x, 3, (2*(3*A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*C*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2))]
    @test_int [(A + C*sec(c + d*x)^2)/cos(c + d*x)^(3/2), x, 4, -((2*(5*A + 3*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*C*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*(5*A + 3*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/cos(c + d*x)^(5/2), x, 4, (2*(7*A + 5*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*C*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (2*(7*A + 5*C)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2))]

    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 8, (2*a*(7*A + 9*C)*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (2*a*(5*A + 7*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a*(5*A + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a*(7*A + 9*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(45*d) + (2*a*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d) + (2*a*A*cos(c + d*x)^(7/2)*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 7, (2*a*(3*A + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*a*(5*A + 7*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a*(5*A + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d) + (2*a*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, (2*a*(3*A + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*a*(A + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*A*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*a*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, (2*a*(A - C)*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*a*(A + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*C*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*a*A*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, (2*a*(A - C)*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*a*(3*A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*C*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*a*C*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 7, -((2*a*(5*A + 3*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*a*(3*A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*C*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*a*C*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*a*(5*A + 3*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 8, -((2*a*(5*A + 3*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*a*(7*A + 5*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a*C*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (2*a*C*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*a*(7*A + 5*C)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2)) + (2*a*(5*A + 3*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]

    @test_int [cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2), x, 10, (4*a^2*(7*A + 9*C)*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (8*a^2*(25*A + 33*C)*Elliptic.F((1/2)*(c + d*x), 2))/(231*d) + (8*a^2*(25*A + 33*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(231*d) + (4*a^2*(7*A + 9*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(45*d) + (2*a^2*(89*A + 99*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(693*d) + (2*A*cos(c + d*x)^(5/2)*(a + a*cos(c + d*x))^2*sin(c + d*x))/(11*d) + (8*A*cos(c + d*x)^(5/2)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(99*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2), x, 9, (16*a^2*(2*A + 3*C)*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (4*a^2*(5*A + 7*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (4*a^2*(5*A + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a^2*(19*A + 21*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*A*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^2*sin(c + d*x))/(9*d) + (8*A*cos(c + d*x)^(3/2)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(63*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2), x, 8, (4*a^2*(3*A + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (8*a^2*(3*A + 7*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a^2*(33*A + 35*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*A*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^2*sin(c + d*x))/(7*d) + (8*A*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(35*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2), x, 8, (16*a^2*A*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (4*a^2*(A + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a^2*(7*A - 15*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*(A - 5*C)*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2), x, 8, (4*a^2*(A - C)*Elliptic.E((1/2)*(c + d*x), 2))/d + (8*a^2*(A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a^2*(A - 5*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (8*C*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(3*d*sqrt(cos(c + d*x)))]
    @test_int [sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2), x, 8, -((16*a^2*C*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (4*a^2*(3*A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a^2*(15*A + 17*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (8*C*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(15*d*cos(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 9, -((4*a^2*(5*A + 3*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (8*a^2*(7*A + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a^2*(35*A + 33*C)*sin(c + d*x))/(105*d*cos(c + d*x)^(3/2)) + (4*a^2*(5*A + 3*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (8*C*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(35*d*cos(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 10, -((16*a^2*(3*A + 2*C)*Elliptic.E((1/2)*(c + d*x), 2))/(15*d)) + (4*a^2*(7*A + 5*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a^2*(21*A + 19*C)*sin(c + d*x))/(105*d*cos(c + d*x)^(5/2)) + (4*a^2*(7*A + 5*C)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2)) + (16*a^2*(3*A + 2*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(9*d*cos(c + d*x)^(9/2)) + (8*C*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(63*d*cos(c + d*x)^(7/2))]

    @test_int [cos(c + d*x)^(13/2)*(a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2), x, 11, (4*a^3*(175*A + 221*C)*Elliptic.E((1/2)*(c + d*x), 2))/(195*d) + (4*a^3*(95*A + 121*C)*Elliptic.F((1/2)*(c + d*x), 2))/(231*d) + (4*a^3*(95*A + 121*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(231*d) + (4*a^3*(175*A + 221*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(585*d) + (40*a^3*(118*A + 143*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(9009*d) + (2*A*cos(c + d*x)^(5/2)*(a + a*cos(c + d*x))^3*sin(c + d*x))/(13*d) + (12*A*cos(c + d*x)^(5/2)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(143*a*d) + (2*(145*A + 143*C)*cos(c + d*x)^(5/2)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(1287*d)]
    @test_int [cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2), x, 10, (4*a^3*(5*A + 7*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (4*a^3*(105*A + 143*C)*Elliptic.F((1/2)*(c + d*x), 2))/(231*d) + (4*a^3*(105*A + 143*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(231*d) + (8*a^3*(35*A + 44*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(385*d) + (2*A*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^3*sin(c + d*x))/(11*d) + (4*A*cos(c + d*x)^(3/2)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(33*a*d) + (2*(35*A + 33*C)*cos(c + d*x)^(3/2)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(231*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2), x, 9, (4*a^3*(17*A + 27*C)*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (4*a^3*(11*A + 21*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (8*a^3*(16*A + 21*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*A*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^3*sin(c + d*x))/(9*d) + (4*A*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(21*a*d) + (2*(73*A + 63*C)*sqrt(cos(c + d*x))*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(315*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2), x, 9, (4*a^3*(7*A + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (4*a^3*(13*A + 35*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (4*a^3*(41*A - 35*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*(A - 7*C)*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(7*a*d) + (2*(11*A - 35*C)*sqrt(cos(c + d*x))*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(35*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2), x, 9, (4*a^3*(9*A - 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (4*a^3*(3*A + 5*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (8*a^3*(3*A - 10*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (4*C*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(a*d*sqrt(cos(c + d*x))) + (2*(3*A - 35*C)*sqrt(cos(c + d*x))*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2), x, 9, (4*a^3*(5*A - 9*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (4*a^3*(5*A + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) - (4*a^3*(5*A + 21*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (4*C*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(5*a*d*cos(c + d*x)^(3/2)) + (2*(5*A + 11*C)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]
    @test_int [sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2), x, 9, -((4*a^3*(5*A + 7*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (4*a^3*(35*A + 13*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (8*a^3*(70*A + 53*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (12*C*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(35*a*d*cos(c + d*x)^(5/2)) + (2*(5*A + 7*C)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(15*d*cos(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 10, -((4*a^3*(27*A + 17*C)*Elliptic.E((1/2)*(c + d*x), 2))/(15*d)) + (4*a^3*(21*A + 11*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (8*a^3*(21*A + 16*C)*sin(c + d*x))/(105*d*cos(c + d*x)^(3/2)) + (4*a^3*(27*A + 17*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(9*d*cos(c + d*x)^(9/2)) + (4*C*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(21*a*d*cos(c + d*x)^(7/2)) + (2*(63*A + 73*C)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(315*d*cos(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^3*(A + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 11, -((4*a^3*(7*A + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (4*a^3*(143*A + 105*C)*Elliptic.F((1/2)*(c + d*x), 2))/(231*d) + (8*a^3*(44*A + 35*C)*sin(c + d*x))/(385*d*cos(c + d*x)^(5/2)) + (4*a^3*(143*A + 105*C)*sin(c + d*x))/(231*d*cos(c + d*x)^(3/2)) + (4*a^3*(7*A + 5*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(11*d*cos(c + d*x)^(11/2)) + (4*C*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(33*a*d*cos(c + d*x)^(9/2)) + (2*(33*A + 35*C)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(231*d*cos(c + d*x)^(7/2))]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(cos(c + d*x)^(7/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 8, -((3*(7*A + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*a*d)) + (5*(9*A + 7*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*a*d) + (5*(9*A + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*a*d) - ((7*A + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*a*d) + ((9*A + 7*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*a*d) - ((A + C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(cos(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 7, (3*(7*A + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*a*d) - ((5*A + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a*d) - ((5*A + 3*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a*d) + ((7*A + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*a*d) - ((A + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 6, -(((3*A + C)*Elliptic.E((1/2)*(c + d*x), 2))/(a*d)) + ((5*A + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a*d) + ((5*A + 3*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a*d) - ((A + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(sqrt(cos(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 5, ((3*A + C)*Elliptic.E((1/2)*(c + d*x), 2))/(a*d) - ((A - C)*Elliptic.F((1/2)*(c + d*x), 2))/(a*d) - ((A + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))), x, 6, -(((A + 3*C)*Elliptic.E((1/2)*(c + d*x), 2))/(a*d)) + ((A - C)*Elliptic.F((1/2)*(c + d*x), 2))/(a*d) + ((A + 3*C)*sin(c + d*x))/(a*d*sqrt(cos(c + d*x))) - ((A + C)*sin(c + d*x))/(d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))), x, 7, ((A + 3*C)*Elliptic.E((1/2)*(c + d*x), 2))/(a*d) + ((3*A + 5*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a*d) + ((3*A + 5*C)*sin(c + d*x))/(3*a*d*cos(c + d*x)^(3/2)) - ((A + 3*C)*sin(c + d*x))/(a*d*sqrt(cos(c + d*x))) - ((A + C)*sin(c + d*x))/(d*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))), x, 8, -((3*(5*A + 7*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*a*d)) - ((3*A + 5*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a*d) + ((5*A + 7*C)*sin(c + d*x))/(5*a*d*cos(c + d*x)^(5/2)) - ((3*A + 5*C)*sin(c + d*x))/(3*a*d*cos(c + d*x)^(3/2)) + (3*(5*A + 7*C)*sin(c + d*x))/(5*a*d*sqrt(cos(c + d*x))) - ((A + C)*sin(c + d*x))/(d*cos(c + d*x)^(5/2)*(a + a*cos(c + d*x)))]

    @test_int [(cos(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 8, (4*(14*A + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*a^2*d) - (5*(3*A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) - (5*(3*A + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d) + (4*(14*A + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15*a^2*d) - ((3*A + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(a^2*d*(1 + cos(c + d*x))) - ((A + C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(3*d*(a + a*cos(c + d*x))^2)]
    @test_int [(cos(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 7, -(((7*A + C)*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d)) + (2*(5*A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) + (2*(5*A + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d) - ((7*A + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*d*(1 + cos(c + d*x))) - ((A + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(3*d*(a + a*cos(c + d*x))^2)]
    @test_int [(sqrt(cos(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 6, (4*A*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d) - ((5*A - C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) - ((5*A - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d*(1 + cos(c + d*x))) - ((A + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(3*d*(a + a*cos(c + d*x))^2)]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^2), x, 6, -(((A - C)*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d)) + (2*(A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) + ((A - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(a^2*d*(1 + cos(c + d*x))) - ((A + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d*(a + a*cos(c + d*x))^2)]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2), x, 7, -((4*C*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d)) + ((A - 5*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) + (4*C*sin(c + d*x))/(a^2*d*sqrt(cos(c + d*x))) + ((A - 5*C)*sin(c + d*x))/(3*a^2*d*sqrt(cos(c + d*x))*(1 + cos(c + d*x))) - ((A + C)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^2)]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2), x, 8, ((A + 7*C)*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d) + (2*(A + 5*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) + (2*(A + 5*C)*sin(c + d*x))/(3*a^2*d*cos(c + d*x)^(3/2)) - ((A + 7*C)*sin(c + d*x))/(a^2*d*sqrt(cos(c + d*x))) - ((A + 7*C)*sin(c + d*x))/(3*a^2*d*cos(c + d*x)^(3/2)*(1 + cos(c + d*x))) - ((A + C)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^2)]

    @test_int [(cos(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 9, (7*(33*A + 7*C)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d) - ((63*A + 13*C)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) - ((63*A + 13*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(6*a^3*d) + (7*(33*A + 7*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(30*a^3*d) - ((A + C)*cos(c + d*x)^(9/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - (2*(6*A + C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) - ((63*A + 13*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(10*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 8, -(((119*A + 9*C)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d)) + ((11*A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(2*a^3*d) + ((11*A + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(2*a^3*d) - ((A + C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - (2*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(3*a*d*(a + a*cos(c + d*x))^2) - ((119*A + 9*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(30*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(sqrt(cos(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 7, ((49*A - C)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d) - ((13*A - C)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) - ((A + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - (2*(4*A - C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) - ((13*A - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(6*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^3), x, 7, -(((9*A - C)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d)) + ((3*A + C)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) - ((A + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - (2*(3*A - 2*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) + ((9*A - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(10*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3), x, 7, -(((A - 9*C)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d)) + ((A + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) - ((A + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) + (2*(2*A - 3*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) + ((A - 9*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(10*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3), x, 8, ((A - 49*C)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d) + ((A - 13*C)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) - ((A - 49*C)*sin(c + d*x))/(10*a^3*d*sqrt(cos(c + d*x))) - ((A + C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^3) + (2*(A - 4*C)*sin(c + d*x))/(15*a*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^2) + ((A - 13*C)*sin(c + d*x))/(6*d*sqrt(cos(c + d*x))*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^3), x, 9, ((9*A + 119*C)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d) + ((A + 11*C)*Elliptic.F((1/2)*(c + d*x), 2))/(2*a^3*d) + ((A + 11*C)*sin(c + d*x))/(2*a^3*d*cos(c + d*x)^(3/2)) - ((9*A + 119*C)*sin(c + d*x))/(10*a^3*d*sqrt(cos(c + d*x))) - ((A + C)*sin(c + d*x))/(5*d*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^3) - (2*C*sin(c + d*x))/(3*a*d*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^2) - ((9*A + 119*C)*sin(c + d*x))/(30*d*cos(c + d*x)^(3/2)*(a^3 + a^3*cos(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^(n/2)*(a+a*sec(e+f*x))^(m/2)*(A+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [cos(c + d*x)^(9/2)*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 6, (16*a*(16*A + 21*C)*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (8*a*(16*A + 21*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a*(16*A + 21*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) + (2*A*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 5, (4*a*(24*A + 35*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a*(24*A + 35*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*d*sqrt(a + a*sec(c + d*x))) + (2*A*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 4, (2*a*(7*A + 15*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 5, (2*sqrt(a)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (2*a*A*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2), x, 5, (sqrt(a)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (a*(2*A - C)*sin(c + d*x))/(d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 5, (sqrt(a)*(8*A + 3*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*d) + (a*C*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d*cos(c + d*x)^(3/2))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 6, (sqrt(a)*(8*A + 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(8*d) + (a*C*sin(c + d*x))/(12*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a*(8*A + 5*C)*sin(c + d*x))/(8*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d*cos(c + d*x)^(5/2))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + C*sec(c + d*x)^2))/cos(c + d*x)^(5/2), x, 7, (sqrt(a)*(48*A + 35*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(64*d) + (a*C*sin(c + d*x))/(24*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + (a*(48*A + 35*C)*sin(c + d*x))/(96*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a*(48*A + 35*C)*sin(c + d*x))/(64*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d*cos(c + d*x)^(7/2))]

    @test_int [cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 7, (16*a^2*(112*A + 143*C)*sin(c + d*x))/(1155*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (8*a^2*(112*A + 143*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(1155*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(112*A + 143*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(385*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(28*A + 33*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(231*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(33*d) + (2*A*cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(11*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (4*a^2*(136*A + 189*C)*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a^2*(136*A + 189*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(52*A + 63*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(21*d) + (2*A*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 5, (8*a^2*(19*A + 35*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a*(19*A + 35*C)*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(105*d) + (6*A*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(35*d) + (2*A*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (2*a^(3/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (2*a^2*(4*A + 5*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a*A*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(5*d) + (2*A*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (3*a^(3/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (a^2*(8*A - 3*C)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - (a*(2*A - 3*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))) + (2*A*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2), x, 6, (a^(3/2)*(8*A + 7*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*d) + (a^2*(8*A - 5*C)*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (3*a*C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))) + (C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d*sqrt(cos(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 6, (a^(3/2)*(24*A + 11*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(8*d) + (a^2*(24*A + 19*C)*sin(c + d*x))/(24*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a*C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)) + (C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 7, (a^(3/2)*(112*A + 75*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(64*d) + (a^2*(16*A + 13*C)*sin(c + d*x))/(32*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(112*A + 75*C)*sin(c + d*x))/(64*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a*C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(8*d*cos(c + d*x)^(5/2)) + (C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d*cos(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + C*sec(c + d*x)^2))/cos(c + d*x)^(5/2), x, 8, (a^(3/2)*(176*A + 133*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(128*d) + (a^2*(80*A + 67*C)*sin(c + d*x))/(240*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(176*A + 133*C)*sin(c + d*x))/(192*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(176*A + 133*C)*sin(c + d*x))/(128*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (3*a*C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d*cos(c + d*x)^(7/2)) + (C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d*cos(c + d*x)^(7/2))]

    @test_int [cos(c + d*x)^(13/2)*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 8, (16*a^3*(8368*A + 10439*C)*sin(c + d*x))/(45045*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (8*a^3*(8368*A + 10439*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(45045*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(8368*A + 10439*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15015*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(2224*A + 2717*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(9009*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(136*A + 143*C)*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(1287*d) + (10*a*A*cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(143*d) + (2*A*cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(13*d)]
    @test_int [cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (4*a^3*(568*A + 759*C)*sin(c + d*x))/(693*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a^3*(568*A + 759*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(232*A + 297*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(32*A + 33*C)*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(231*d) + (10*a*A*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(99*d) + (2*A*cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(11*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 6, (64*a^3*(13*A + 21*C)*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^2*(13*A + 21*C)*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(315*d) + (2*a*(13*A + 21*C)*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(105*d) + (10*A*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(63*d) + (2*A*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (2*a^(5/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (2*a^3*(32*A + 49*C)*sin(c + d*x))/(21*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a^2*(8*A + 7*C)*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(21*d) + (2*a*A*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(7*d) + (2*A*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (5*a^(5/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (a^3*(64*A + 15*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - (a^2*(16*A - 15*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*a*A*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d) + (2*A*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(8*A + 19*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*d) + (a^3*(56*A - 27*C)*sin(c + d*x))/(12*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - (a^2*(8*A - 21*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(12*d*sqrt(cos(c + d*x))) - (a*(4*A - 3*C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(6*d*sqrt(cos(c + d*x))) + (2*A*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2), x, 7, (5*a^(5/2)*(8*A + 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(8*d) + (a^3*(24*A - 49*C)*sin(c + d*x))/(24*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (a^2*(24*A + 31*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d*sqrt(cos(c + d*x))) + (5*a*C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d*sqrt(cos(c + d*x))) + (C*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 7, (a^(5/2)*(304*A + 163*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(64*d) + (a^3*(432*A + 299*C)*sin(c + d*x))/(192*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(16*A + 17*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(32*d*cos(c + d*x)^(3/2)) + (5*a*C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d*cos(c + d*x)^(3/2)) + (C*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 8, (a^(5/2)*(400*A + 283*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(128*d) + (a^3*(1040*A + 787*C)*sin(c + d*x))/(960*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^3*(400*A + 283*C)*sin(c + d*x))/(128*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(80*A + 79*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(240*d*cos(c + d*x)^(5/2)) + (a*C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(8*d*cos(c + d*x)^(5/2)) + (C*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + C*sec(c + d*x)^2))/cos(c + d*x)^(5/2), x, 9, (a^(5/2)*(1304*A + 1015*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(512*d) + (a^3*(136*A + 109*C)*sin(c + d*x))/(192*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + (a^3*(1304*A + 1015*C)*sin(c + d*x))/(768*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^3*(1304*A + 1015*C)*sin(c + d*x))/(512*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(24*A + 23*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(96*d*cos(c + d*x)^(7/2)) + (a*C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d*cos(c + d*x)^(7/2)) + (C*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(6*d*cos(c + d*x)^(7/2))]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(cos(c + d*x)^(7/2)*(A + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 7, (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) - (2*(43*A + 35*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*(31*A + 35*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) - (2*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*d*sqrt(a + a*sec(c + d*x))) + (2*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 6, -((sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d)) + (2*(13*A + 15*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - (2*A*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 5, (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) - (2*A*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(cos(c + d*x))*(A + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 7, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) - (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (2*A*sin(c + d*x))/(d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))), x, 7, -((C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d)) + (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (C*sin(c + d*x))/(d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))), x, 8, ((8*A + 7*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*sqrt(a)*d) - (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (C*sin(c + d*x))/(2*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) - (C*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))), x, 9, -(((8*A + 9*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(8*sqrt(a)*d)) + (sqrt(2)*(A + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (C*sin(c + d*x))/(3*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) - (C*sin(c + d*x))/(12*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + ((8*A + 7*C)*sin(c + d*x))/(8*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]

    @test_int [(cos(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 7, -(((15*A + 7*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d)) - ((A + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((49*A + 25*C)*sin(c + d*x))/(10*a*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((13*A + 5*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(10*a*d*sqrt(a + a*sec(c + d*x))) + ((9*A + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(10*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 6, ((11*A + 3*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((19*A + 3*C)*sin(c + d*x))/(6*a*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((7*A + 3*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(6*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(cos(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 5, -(((7*A - C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d)) - ((A + C)*sin(c + d*x))/(2*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((5*A + C)*sin(c + d*x))/(2*a*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)), x, 7, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(a^(3/2)*d) + ((3*A - 5*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sin(c + d*x))/(2*d*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)), x, 8, -((3*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(a^(3/2)*d)) + ((A + 9*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sin(c + d*x))/(2*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)) + ((A + 3*C)*sin(c + d*x))/(2*a*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)), x, 9, ((8*A + 19*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*a^(3/2)*d) - ((5*A + 13*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d) - ((A + C)*sin(c + d*x))/(2*d*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)) + ((A + 2*C)*sin(c + d*x))/(2*a*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) - ((2*A + 7*C)*sin(c + d*x))/(4*a*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]

    @test_int [(cos(c + d*x)^(5/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 8, -(((283*A + 75*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d)) - ((A + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((21*A + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((2671*A + 735*C)*sin(c + d*x))/(240*a^2*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((787*A + 195*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(240*a^2*d*sqrt(a + a*sec(c + d*x))) + ((157*A + 45*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(80*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 7, ((163*A + 19*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((17*A + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((299*A + 27*C)*sin(c + d*x))/(48*a^2*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (5*(19*A + 3*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(48*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(cos(c + d*x))*(A + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 6, -((5*(15*A - C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d)) - ((A + C)*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)) - ((13*A - 3*C)*sin(c + d*x))/(16*a*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((49*A + C)*sin(c + d*x))/(16*a^2*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)), x, 5, ((19*A + 3*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)) - ((9*A - 7*C)*sin(c + d*x))/(16*a*d*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)), x, 8, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(a^(5/2)*d) + ((5*A - 43*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sin(c + d*x))/(4*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)) + ((5*A - 11*C)*sin(c + d*x))/(16*a*d*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)), x, 9, -((5*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(a^(5/2)*d)) + ((3*A + 115*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d) - ((A + C)*sin(c + d*x))/(4*d*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)) + ((A - 15*C)*sin(c + d*x))/(16*a*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)) + ((3*A + 35*C)*sin(c + d*x))/(16*a^2*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^n*(a+a*sec(e+f*x))^m*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^(n/2)*(a+a*sec(e+f*x))^m*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Subsubsection::Closed:: =#
    #=n>=0=#

    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)*cos(c + d*x)^(9/2), x, 7, (6*C*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (10*B*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (10*B*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*C*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d) + (2*B*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d)]
    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)*cos(c + d*x)^(7/2), x, 6, (6*B*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*C*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*C*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*B*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)*cos(c + d*x)^(5/2), x, 5, (2*C*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*B*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*B*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)*cos(c + d*x)^(3/2), x, 4, (2*B*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*C*Elliptic.F((1/2)*(c + d*x), 2))/d]
    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)*cos(c + d*x)^(1/2), x, 5, -((2*C*Elliptic.E((1/2)*(c + d*x), 2))/d) + (2*B*Elliptic.F((1/2)*(c + d*x), 2))/d + (2*C*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)/cos(c + d*x)^(1/2), x, 6, -((2*B*Elliptic.E((1/2)*(c + d*x), 2))/d) + (2*C*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*C*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*B*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(B*sec(c + d*x) + C*sec(c + d*x)^2)/cos(c + d*x)^(3/2), x, 7, -((6*C*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*B*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*C*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*B*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (6*C*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]

    #= ::Subsubsection:: =#
    #=n<0=#

    #= ::Subsection:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^(n/2)*(a+a*sec(e+f*x))^(m/2)*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^n*(a+a*sec(e+f*x))^m*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

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

    #= ::Subsubsection::Closed:: =#
    #=n>=0=#

    @test_int [cos(c + d*x)^(7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (6*B*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(5*A + 7*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*(5*A + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*B*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d) + (2*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*(3*A + 5*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (2*B*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*B*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (2*B*Elliptic.E((c + d*x)/2, 2))/d + (2*(A + 3*C)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*A*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (2*(A - C)*Elliptic.E((c + d*x)/2, 2))/d + (2*B*Elliptic.F((c + d*x)/2, 2))/d + (2*C*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(cos(c + d*x)), x, 6, (-2*B*Elliptic.E((c + d*x)/2, 2))/d + (2*(3*A + C)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*C*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*B*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/cos(c + d*x)^(3/2), x, 7, (-2*(5*A + 3*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (2*B*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*C*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*B*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*(5*A + 3*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/cos(c + d*x)^(5/2), x, 8, (-6*B*Elliptic.E((c + d*x)/2, 2))/(5*d) + (2*(7*A + 5*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (2*C*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (2*B*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*(7*A + 5*C)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2)) + (6*B*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]

    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (2*a*(7*A + 9*(B + C))*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (2*a*(5*(A + B) + 7*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a*(5*(A + B) + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a*(7*A + 9*(B + C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(45*d) + (2*a*(A + B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d) + (2*a*A*cos(c + d*x)^(7/2)*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*a*(3*(A + B) + 5*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*a*(5*A + 7*(B + C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a*(5*A + 7*(B + C))*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a*(A + B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d) + (2*a*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*a*(3*A + 5*(B + C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*a*(A + B + 3*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*(A + B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*a*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*a*(A + B - C)*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*a*(A + 3*(B + C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*C*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*a*A*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*a*(A - B - C)*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*a*(3*A + 3*B + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*C*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*a*(B + C)*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/sqrt(cos(c + d*x)), x, 7, -((2*a*(5*A + 5*B + 3*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*a*(3*A + B + C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*C*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*a*(B + C)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*a*(5*A + 5*B + 3*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]
    @test_int [(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/cos(c + d*x)^(3/2), x, 8, -((2*a*(5*A + 3*(B + C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*a*(7*A + 7*B + 5*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a*C*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (2*a*(B + C)*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*a*(7*A + 7*B + 5*C)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2)) + (2*a*(5*A + 3*(B + C))*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]

    @test_int [cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (4*a^2*(7*A + 8*B + 9*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (4*a^2*(50*A + 55*B + 66*C)*Elliptic.F((c + d*x)/2, 2))/(231*d) + (4*a^2*(50*A + 55*B + 66*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(231*d) + (4*a^2*(7*A + 8*B + 9*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(45*d) + (2*a^2*(89*A + 121*B + 99*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(693*d) + (2*A*cos(c + d*x)^(5/2)*(a + a*cos(c + d*x))^2*sin(c + d*x))/(11*d) + (2*(4*A + 11*B)*cos(c + d*x)^(5/2)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(99*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (4*a^2*(8*A + 9*B + 12*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (4*a^2*(5*A + 6*B + 7*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (4*a^2*(5*A + 6*B + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a^2*(19*A + 27*B + 21*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*A*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^2*sin(c + d*x))/(9*d) + (2*(4*A + 9*B)*cos(c + d*x)^(3/2)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(63*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (4*a^2*(3*A + 4*B + 5*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (4*a^2*(6*A + 7*B + 14*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (2*a^2*(33*A + 49*B + 35*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*A*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^2*sin(c + d*x))/(7*d) + (2*(4*A + 7*B)*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(35*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (4*a^2*(4*A + 5*B)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (4*a^2*(A + 2*B + 3*C)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*a^2*(7*A + 5*B - 15*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*(A - 5*C)*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (4*a^2*(A - C)*Elliptic.E((c + d*x)/2, 2))/d + (4*a^2*(2*A + 3*B + 2*C)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*a^2*(A - 3*B - 5*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*(3*B + 4*C)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(3*d*sqrt(cos(c + d*x)))]
    @test_int [cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (-4*a^2*(5*B + 4*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (4*a^2*(3*A + 2*B + C)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*a^2*(15*A + 25*B + 17*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*(5*B + 4*C)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(15*d*cos(c + d*x)^(3/2))]
    @test_int [(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/cos(c + d*x)^(1/2), x, 9, (-4*a^2*(5*A + 4*B + 3*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (4*a^2*(14*A + 7*B + 6*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (2*a^2*(35*A + 49*B + 33*C)*sin(c + d*x))/(105*d*cos(c + d*x)^(3/2)) + (4*a^2*(5*A + 4*B + 3*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (2*(7*B + 4*C)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(35*d*cos(c + d*x)^(5/2))]
    @test_int [(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/cos(c + d*x)^(3/2), x, 10, (-4*a^2*(12*A + 9*B + 8*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (4*a^2*(7*A + 6*B + 5*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (2*a^2*(21*A + 27*B + 19*C)*sin(c + d*x))/(105*d*cos(c + d*x)^(5/2)) + (4*a^2*(7*A + 6*B + 5*C)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2)) + (4*a^2*(12*A + 9*B + 8*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^2*sin(c + d*x))/(9*d*cos(c + d*x)^(9/2)) + (2*(9*B + 4*C)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(63*d*cos(c + d*x)^(7/2))]

    @test_int [cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (4*a^3*(15*A + 17*B + 21*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (4*a^3*(105*A + 121*B + 143*C)*Elliptic.F((c + d*x)/2, 2))/(231*d) + (4*a^3*(105*A + 121*B + 143*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(231*d) + (4*a^3*(210*A + 253*B + 264*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(1155*d) + (2*A*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^3*sin(c + d*x))/(11*d) + (2*(6*A + 11*B)*cos(c + d*x)^(3/2)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(99*a*d) + (2*(105*A + 143*B + 99*C)*cos(c + d*x)^(3/2)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(693*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (4*a^3*(17*A + 21*B + 27*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (4*a^3*(11*A + 13*B + 21*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (4*a^3*(32*A + 41*B + 42*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*A*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^3*sin(c + d*x))/(9*d) + (2*(2*A + 3*B)*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(21*a*d) + (2*(73*A + 99*B + 63*C)*sqrt(cos(c + d*x))*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(315*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (4*a^3*(7*A + 9*B + 5*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (4*a^3*(13*A + 21*B + 35*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (4*a^3*(41*A + 42*B - 35*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*(A - 7*C)*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(7*a*d) + (2*(11*A + 7*B - 35*C)*sqrt(cos(c + d*x))*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(35*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (4*a^3*(9*A + 5*B - 5*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (4*a^3*(3*A + 5*(B + C))*Elliptic.F((c + d*x)/2, 2))/(3*d) + (4*a^3*(6*A - 5*B - 20*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*(B + 2*C)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(a*d*sqrt(cos(c + d*x))) + (2*(3*A - 15*B - 35*C)*sqrt(cos(c + d*x))*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (4*a^3*(5*A - 5*B - 9*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (4*a^3*(5*A + 5*B + 3*C)*Elliptic.F((c + d*x)/2, 2))/(3*d) - (4*a^3*(5*A + 20*B + 21*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*(5*B + 6*C)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(15*a*d*cos(c + d*x)^(3/2)) + (2*(15*A + 35*B + 33*C)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(15*d*sqrt(cos(c + d*x)))]
    @test_int [cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (-4*a^3*(5*A + 9*B + 7*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (4*a^3*(35*A + 21*B + 13*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (4*a^3*(140*A + 147*B + 106*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (2*(7*B + 6*C)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(35*a*d*cos(c + d*x)^(5/2)) + (2*(5*A + 9*B + 7*C)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(15*d*cos(c + d*x)^(3/2))]
    @test_int [(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/cos(c + d*x)^(1/2), x, 10, (-4*a^3*(27*A + 21*B + 17*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (4*a^3*(21*A + 13*B + 11*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (4*a^3*(42*A + 41*B + 32*C)*sin(c + d*x))/(105*d*cos(c + d*x)^(3/2)) + (4*a^3*(27*A + 21*B + 17*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^3*sin(c + d*x))/(9*d*cos(c + d*x)^(9/2)) + (2*(3*B + 2*C)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(21*a*d*cos(c + d*x)^(7/2)) + (2*(63*A + 99*B + 73*C)*(a^3 + a^3*cos(c + d*x))*sin(c + d*x))/(315*d*cos(c + d*x)^(5/2))]

    @test_int [cos(c + d*x)^(13/2)*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 11, (8*a^4*(185*A + 208*B + 247*C)*Elliptic.E((c + d*x)/2, 2))/(195*d) + (8*a^4*(100*A + 113*B + 132*C)*Elliptic.F((c + d*x)/2, 2))/(231*d) + (8*a^4*(100*A + 113*B + 132*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(231*d) + (4*a^4*(5255*A + 6019*B + 6721*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15015*d) + (2*a*(8*A + 13*B)*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^3*sin(c + d*x))/(143*d) + (2*A*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^4*sin(c + d*x))/(13*d) + (2*(13*A + 17*B + 11*C)*cos(c + d*x)^(3/2)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(99*d) + (4*(1355*A + 1612*B + 1573*C)*cos(c + d*x)^(3/2)*(a^4 + a^4*cos(c + d*x))*sin(c + d*x))/(9009*d)]
    @test_int [cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (8*a^4*(16*A + 19*B + 24*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (8*a^4*(113*A + 132*B + 187*C)*Elliptic.F((c + d*x)/2, 2))/(231*d) + (4*a^4*(667*A + 803*B + 913*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(1155*d) + (2*a*(8*A + 11*B)*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^3*sin(c + d*x))/(99*d) + (2*A*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^4*sin(c + d*x))/(11*d) + (2*(43*A + 55*B + 33*C)*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(231*d) + (4*(769*A + 946*B + 891*C)*sqrt(cos(c + d*x))*(a^4 + a^4*cos(c + d*x))*sin(c + d*x))/(3465*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (8*a^4*(19*A + 24*B + 21*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (8*a^4*(12*A + 17*B + 28*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (4*a^4*(73*A + 83*B + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*a*(A - 9*C)*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^3*sin(c + d*x))/(9*d) + (2*C*(a + a*cos(c + d*x))^4*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*(5*A + 3*B - 21*C)*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(21*d) + (4*(86*A + 81*B - 126*C)*sqrt(cos(c + d*x))*(a^4 + a^4*cos(c + d*x))*sin(c + d*x))/(315*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (8*a^4*(8*A + 7*B)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (8*a^4*(17*A + 28*B + 35*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (4*a^4*(83*A + 7*B - 175*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*a*(3*B + 8*C)*(a + a*cos(c + d*x))^3*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))) + (2*C*(a + a*cos(c + d*x))^4*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*(A - 7*B - 21*C)*sqrt(cos(c + d*x))*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(7*d) + (4*(27*A - 42*B - 175*C)*sqrt(cos(c + d*x))*(a^4 + a^4*cos(c + d*x))*sin(c + d*x))/(105*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (56*a^4*(A - C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (8*a^4*(4*A + 5*B + 4*C)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (4*a^4*(A - 25*B - 41*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*a*(5*B + 8*C)*(a + a*cos(c + d*x))^3*sin(c + d*x))/(15*d*cos(c + d*x)^(3/2)) + (2*C*(a + a*cos(c + d*x))^4*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*(5*A + 15*B + 19*C)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))) - (4*(6*A + 25*B + 34*C)*sqrt(cos(c + d*x))*(a^4 + a^4*cos(c + d*x))*sin(c + d*x))/(15*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (-8*a^4*(7*B + 8*C)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (8*a^4*(35*A + 28*B + 17*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) - (4*a^4*(175*A + 287*B + 253*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*a*(7*B + 8*C)*(a + a*cos(c + d*x))^3*sin(c + d*x))/(35*d*cos(c + d*x)^(5/2)) + (2*C*(a + a*cos(c + d*x))^4*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (2*(35*A + 77*B + 73*C)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(105*d*cos(c + d*x)^(3/2)) + (4*(175*A + 238*B + 197*C)*(a^4 + a^4*cos(c + d*x))*sin(c + d*x))/(105*d*sqrt(cos(c + d*x)))]
    @test_int [cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (-8*a^4*(21*A + 24*B + 19*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (8*a^4*(28*A + 17*B + 12*C)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (4*a^4*(287*A + 253*B + 193*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))) + (2*a*(9*B + 8*C)*(a + a*cos(c + d*x))^3*sin(c + d*x))/(63*d*cos(c + d*x)^(7/2)) + (2*C*(a + a*cos(c + d*x))^4*sin(c + d*x))/(9*d*cos(c + d*x)^(9/2)) + (2*(63*A + 117*B + 97*C)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(315*d*cos(c + d*x)^(5/2)) + (4*(21*A + 24*B + 19*C)*(a^4 + a^4*cos(c + d*x))*sin(c + d*x))/(45*d*cos(c + d*x)^(3/2))]
    @test_int [(a + a*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/cos(c + d*x)^(1/2), x, 11, (-8*a^4*(24*A + 19*B + 16*C)*Elliptic.E((c + d*x)/2, 2))/(15*d) + (8*a^4*(187*A + 132*B + 113*C)*Elliptic.F((c + d*x)/2, 2))/(231*d) + (4*a^4*(913*A + 803*B + 667*C)*sin(c + d*x))/(1155*d*cos(c + d*x)^(3/2)) + (8*a^4*(24*A + 19*B + 16*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*a*(11*B + 8*C)*(a + a*cos(c + d*x))^3*sin(c + d*x))/(99*d*cos(c + d*x)^(9/2)) + (2*C*(a + a*cos(c + d*x))^4*sin(c + d*x))/(11*d*cos(c + d*x)^(11/2)) + (2*(33*A + 55*B + 43*C)*(a^2 + a^2*cos(c + d*x))^2*sin(c + d*x))/(231*d*cos(c + d*x)^(7/2)) + (4*(891*A + 946*B + 769*C)*(a^4 + a^4*cos(c + d*x))*sin(c + d*x))/(3465*d*cos(c + d*x)^(5/2))]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(cos(c + d*x)^(7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 8, (-3*(7*A - 7*B + 5*C)*Elliptic.E((c + d*x)/2, 2))/(5*a*d) + (5*(9*A - 7*B + 7*C)*Elliptic.F((c + d*x)/2, 2))/(21*a*d) + (5*(9*A - 7*B + 7*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*a*d) - ((7*A - 7*B + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*a*d) + ((9*A - 7*B + 7*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*a*d) - ((A - B + C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 7, (3*(7*A - 5*B + 5*C)*Elliptic.E((c + d*x)/2, 2))/(5*a*d) - ((5*A - 5*B + 3*C)*Elliptic.F((c + d*x)/2, 2))/(3*a*d) - ((5*A - 5*B + 3*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a*d) + ((7*A - 5*B + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*a*d) - ((A - B + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 6, -(((3*A - 3*B + C)*Elliptic.E((c + d*x)/2, 2))/(a*d)) + ((5*A - 3*B + 3*C)*Elliptic.F((c + d*x)/2, 2))/(3*a*d) + ((5*A - 3*B + 3*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a*d) - ((A - B + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(cos(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x)), x, 5, ((3*A - B + C)*Elliptic.E((c + d*x)/2, 2))/(a*d) - ((A - B - C)*Elliptic.F((c + d*x)/2, 2))/(a*d) - ((A - B + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))), x, 6, -(((A - B + 3*C)*Elliptic.E((c + d*x)/2, 2))/(a*d)) + ((A + B - C)*Elliptic.F((c + d*x)/2, 2))/(a*d) + ((A - B + 3*C)*sin(c + d*x))/(a*d*sqrt(cos(c + d*x))) - ((A - B + C)*sin(c + d*x))/(d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))), x, 7, ((A - 3*B + 3*C)*Elliptic.E((c + d*x)/2, 2))/(a*d) + ((3*A - 3*B + 5*C)*Elliptic.F((c + d*x)/2, 2))/(3*a*d) + ((3*A - 3*B + 5*C)*sin(c + d*x))/(3*a*d*cos(c + d*x)^(3/2)) - ((A - 3*B + 3*C)*sin(c + d*x))/(a*d*sqrt(cos(c + d*x))) - ((A - B + C)*sin(c + d*x))/(d*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))), x, 8, (-3*(5*A - 5*B + 7*C)*Elliptic.E((c + d*x)/2, 2))/(5*a*d) - ((3*A - 5*B + 5*C)*Elliptic.F((c + d*x)/2, 2))/(3*a*d) + ((5*A - 5*B + 7*C)*sin(c + d*x))/(5*a*d*cos(c + d*x)^(5/2)) - ((3*A - 5*B + 5*C)*sin(c + d*x))/(3*a*d*cos(c + d*x)^(3/2)) + (3*(5*A - 5*B + 7*C)*sin(c + d*x))/(5*a*d*sqrt(cos(c + d*x))) - ((A - B + C)*sin(c + d*x))/(d*cos(c + d*x)^(5/2)*(a + a*cos(c + d*x)))]

    @test_int [(cos(c + d*x)^(7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 9, (-7*(11*A - 8*B + 5*C)*Elliptic.E((c + d*x)/2, 2))/(5*a^2*d) + (5*(30*A - 21*B + 14*C)*Elliptic.F((c + d*x)/2, 2))/(21*a^2*d) + (5*(30*A - 21*B + 14*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*a^2*d) - (7*(11*A - 8*B + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15*a^2*d) + ((30*A - 21*B + 14*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*a^2*d) - ((11*A - 8*B + 5*C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(3*a^2*d*(1 + cos(c + d*x))) - ((A - B + C)*cos(c + d*x)^(9/2)*sin(c + d*x))/(3*d*(a + a*cos(c + d*x))^2)]
    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 8, ((56*A - 35*B + 20*C)*Elliptic.E((c + d*x)/2, 2))/(5*a^2*d) - (5*(3*A - 2*B + C)*Elliptic.F((c + d*x)/2, 2))/(3*a^2*d) - (5*(3*A - 2*B + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d) + ((56*A - 35*B + 20*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15*a^2*d) - ((3*A - 2*B + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(a^2*d*(1 + cos(c + d*x))) - ((A - B + C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(3*d*(a + a*cos(c + d*x))^2)]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 7, -(((7*A - 4*B + C)*Elliptic.E((c + d*x)/2, 2))/(a^2*d)) + ((10*A - 5*B + 2*C)*Elliptic.F((c + d*x)/2, 2))/(3*a^2*d) + ((10*A - 5*B + 2*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d) - ((7*A - 4*B + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*d*(1 + cos(c + d*x))) - ((A - B + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(3*d*(a + a*cos(c + d*x))^2)]
    @test_int [(cos(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^2, x, 6, ((4*A - B)*Elliptic.E((c + d*x)/2, 2))/(a^2*d) - ((5*A - 2*B - C)*Elliptic.F((c + d*x)/2, 2))/(3*a^2*d) - ((5*A - 2*B - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d*(1 + cos(c + d*x))) - ((A - B + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(3*d*(a + a*cos(c + d*x))^2)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^2), x, 6, -(((A - C)*Elliptic.E((c + d*x)/2, 2))/(a^2*d)) + ((2*A + B + 2*C)*Elliptic.F((c + d*x)/2, 2))/(3*a^2*d) + ((A - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(a^2*d*(1 + cos(c + d*x))) - ((A - B + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d*(a + a*cos(c + d*x))^2)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2), x, 7, ((B - 4*C)*Elliptic.E((c + d*x)/2, 2))/(a^2*d) + ((A + 2*B - 5*C)*Elliptic.F((c + d*x)/2, 2))/(3*a^2*d) - ((B - 4*C)*sin(c + d*x))/(a^2*d*sqrt(cos(c + d*x))) + ((A + 2*B - 5*C)*sin(c + d*x))/(3*a^2*d*sqrt(cos(c + d*x))*(1 + cos(c + d*x))) - ((A - B + C)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^2)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2), x, 8, ((A - 4*B + 7*C)*Elliptic.E((c + d*x)/2, 2))/(a^2*d) + ((2*A - 5*B + 10*C)*Elliptic.F((c + d*x)/2, 2))/(3*a^2*d) + ((2*A - 5*B + 10*C)*sin(c + d*x))/(3*a^2*d*cos(c + d*x)^(3/2)) - ((A - 4*B + 7*C)*sin(c + d*x))/(a^2*d*sqrt(cos(c + d*x))) - ((A - 4*B + 7*C)*sin(c + d*x))/(3*a^2*d*cos(c + d*x)^(3/2)*(1 + cos(c + d*x))) - ((A - B + C)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^2)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^2), x, 9, -((20*A - 35*B + 56*C)*Elliptic.E((c + d*x)/2, 2))/(5*a^2*d) - (5*(A - 2*B + 3*C)*Elliptic.F((c + d*x)/2, 2))/(3*a^2*d) + ((20*A - 35*B + 56*C)*sin(c + d*x))/(15*a^2*d*cos(c + d*x)^(5/2)) - (5*(A - 2*B + 3*C)*sin(c + d*x))/(3*a^2*d*cos(c + d*x)^(3/2)) + ((20*A - 35*B + 56*C)*sin(c + d*x))/(5*a^2*d*sqrt(cos(c + d*x))) - ((A - 2*B + 3*C)*sin(c + d*x))/(a^2*d*cos(c + d*x)^(5/2)*(1 + cos(c + d*x))) - ((A - B + C)*sin(c + d*x))/(3*d*cos(c + d*x)^(5/2)*(a + a*cos(c + d*x))^2)]

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 9, (7*(33*A - 17*B + 7*C)*Elliptic.E((c + d*x)/2, 2))/(10*a^3*d) - ((63*A - 33*B + 13*C)*Elliptic.F((c + d*x)/2, 2))/(6*a^3*d) - ((63*A - 33*B + 13*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(6*a^3*d) + (7*(33*A - 17*B + 7*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(30*a^3*d) - ((A - B + C)*cos(c + d*x)^(9/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - ((12*A - 7*B + 2*C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) - ((63*A - 33*B + 13*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(10*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 8, -((119*A - 49*B + 9*C)*Elliptic.E((c + d*x)/2, 2))/(10*a^3*d) + ((33*A - 13*B + 3*C)*Elliptic.F((c + d*x)/2, 2))/(6*a^3*d) + ((33*A - 13*B + 3*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(6*a^3*d) - ((A - B + C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - ((2*A - B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(3*a*d*(a + a*cos(c + d*x))^2) - ((119*A - 49*B + 9*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(30*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(cos(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^3, x, 7, ((49*A - 9*B - C)*Elliptic.E((c + d*x)/2, 2))/(10*a^3*d) - ((13*A - 3*B - C)*Elliptic.F((c + d*x)/2, 2))/(6*a^3*d) - ((A - B + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - ((8*A - 3*B - 2*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) - ((13*A - 3*B - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(6*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^3), x, 7, -((9*A + B - C)*Elliptic.E((c + d*x)/2, 2))/(10*a^3*d) + ((3*A + B + C)*Elliptic.F((c + d*x)/2, 2))/(6*a^3*d) - ((A - B + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - ((6*A - B - 4*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) + ((9*A + B - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(10*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3), x, 7, -((A - B - 9*C)*Elliptic.E((c + d*x)/2, 2))/(10*a^3*d) + ((A + B + 3*C)*Elliptic.F((c + d*x)/2, 2))/(6*a^3*d) - ((A - B + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) + ((4*A + B - 6*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) + ((A - B - 9*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(10*d*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3), x, 8, ((A + 9*B - 49*C)*Elliptic.E((c + d*x)/2, 2))/(10*a^3*d) + ((A + 3*B - 13*C)*Elliptic.F((c + d*x)/2, 2))/(6*a^3*d) - ((A + 9*B - 49*C)*sin(c + d*x))/(10*a^3*d*sqrt(cos(c + d*x))) - ((A - B + C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^3) + ((2*A + 3*B - 8*C)*sin(c + d*x))/(15*a*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^2) + ((A + 3*B - 13*C)*sin(c + d*x))/(6*d*sqrt(cos(c + d*x))*(a^3 + a^3*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^3), x, 9, ((9*A - 49*B + 119*C)*Elliptic.E((c + d*x)/2, 2))/(10*a^3*d) + ((3*A - 13*B + 33*C)*Elliptic.F((c + d*x)/2, 2))/(6*a^3*d) + ((3*A - 13*B + 33*C)*sin(c + d*x))/(6*a^3*d*cos(c + d*x)^(3/2)) - ((9*A - 49*B + 119*C)*sin(c + d*x))/(10*a^3*d*sqrt(cos(c + d*x))) - ((A - B + C)*sin(c + d*x))/(5*d*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^3) + ((B - 2*C)*sin(c + d*x))/(3*a*d*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x))^2) - ((9*A - 49*B + 119*C)*sin(c + d*x))/(30*d*cos(c + d*x)^(3/2)*(a^3 + a^3*cos(c + d*x)))]

    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^4, x, 9, -((176*A - 57*B + 8*C)*Elliptic.E((c + d*x)/2, 2))/(10*a^4*d) + ((339*A - 108*B + 17*C)*Elliptic.F((c + d*x)/2, 2))/(42*a^4*d) + ((339*A - 108*B + 17*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(42*a^4*d) - ((43*A - 15*B + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(42*a^4*d*(1 + cos(c + d*x))^2) - ((176*A - 57*B + 8*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(30*a^4*d*(1 + cos(c + d*x))) - ((A - B + C)*cos(c + d*x)^(9/2)*sin(c + d*x))/(7*d*(a + a*cos(c + d*x))^4) - ((13*A - 6*B - C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(35*a*d*(a + a*cos(c + d*x))^3)]
    @test_int [(cos(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^4, x, 8, ((57*A - 8*B - C)*Elliptic.E((c + d*x)/2, 2))/(10*a^4*d) - ((108*A - 17*B - 4*C)*Elliptic.F((c + d*x)/2, 2))/(42*a^4*d) - ((141*A - 29*B - 13*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(210*a^4*d*(1 + cos(c + d*x))^2) - ((108*A - 17*B - 4*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(42*a^4*d*(1 + cos(c + d*x))) - ((A - B + C)*cos(c + d*x)^(7/2)*sin(c + d*x))/(7*d*(a + a*cos(c + d*x))^4) - ((11*A - 4*B - 3*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(35*a*d*(a + a*cos(c + d*x))^3)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^4), x, 8, -((8*A + B)*Elliptic.E((c + d*x)/2, 2))/(10*a^4*d) + ((17*A + 4*B + 3*C)*Elliptic.F((c + d*x)/2, 2))/(42*a^4*d) - ((83*A + B - 15*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(210*a^4*d*(1 + cos(c + d*x))^2) + ((8*A + B)*sqrt(cos(c + d*x))*sin(c + d*x))/(10*a^4*d*(1 + cos(c + d*x))) - ((A - B + C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d*(a + a*cos(c + d*x))^4) - ((9*A - 2*B - 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*a*d*(a + a*cos(c + d*x))^3)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^4), x, 8, -((A - C)*Elliptic.E((c + d*x)/2, 2))/(10*a^4*d) + ((4*A + 3*B + 4*C)*Elliptic.F((c + d*x)/2, 2))/(42*a^4*d) + ((41*A + 15*B - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(210*a^4*d*(1 + cos(c + d*x))^2) + ((A - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(10*a^4*d*(1 + cos(c + d*x))) - ((A - B + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(7*d*(a + a*cos(c + d*x))^4) - ((A - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(5*a*d*(a + a*cos(c + d*x))^3)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^4), x, 8, ((B + 8*C)*Elliptic.E((c + d*x)/2, 2))/(10*a^4*d) + ((3*A + 4*B + 17*C)*Elliptic.F((c + d*x)/2, 2))/(42*a^4*d) + ((15*A - B - 83*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(210*a^4*d*(1 + cos(c + d*x))^2) - ((B + 8*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(10*a^4*d*(1 + cos(c + d*x))) - ((A - B + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(7*d*(a + a*cos(c + d*x))^4) + ((5*A + 2*B - 9*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(35*a*d*(a + a*cos(c + d*x))^3)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^4), x, 9, ((A + 8*B - 57*C)*Elliptic.E((c + d*x)/2, 2))/(10*a^4*d) + ((4*A + 17*B - 108*C)*Elliptic.F((c + d*x)/2, 2))/(42*a^4*d) - ((A + 8*B - 57*C)*sin(c + d*x))/(10*a^4*d*sqrt(cos(c + d*x))) + ((13*A + 29*B - 141*C)*sin(c + d*x))/(210*a^4*d*sqrt(cos(c + d*x))*(1 + cos(c + d*x))^2) + ((4*A + 17*B - 108*C)*sin(c + d*x))/(42*a^4*d*sqrt(cos(c + d*x))*(1 + cos(c + d*x))) - ((A - B + C)*sin(c + d*x))/(7*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^4) + ((3*A + 4*B - 11*C)*sin(c + d*x))/(35*a*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^3)]

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

    #= ::Subsubsection::Closed:: =#
    #=n>0=#

    @test_int [cos(c + d*x)^(9/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (16*a*(16*A + 18*B + 21*C)*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (8*a*(16*A + 18*B + 21*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a*(16*A + 18*B + 21*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(A + 9*B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) + (2*A*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (4*a*(24*A + 28*B + 35*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a*(24*A + 28*B + 35*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(A + 7*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*d*sqrt(a + a*sec(c + d*x))) + (2*A*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 4, (2*a*(7*A + 5*B + 15*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*(A + 5*B)*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (2*sqrt(a)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (2*a*(A + 3*B)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^(1/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (sqrt(a)*(2*B + C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (a*(2*A - C)*sin(c + d*x))/(d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(1/2), x, 5, (sqrt(a)*(8*A + 4*B + 3*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*d) + (a*(4*B + C)*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d*cos(c + d*x)^(3/2))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 6, (sqrt(a)*(8*A + 6*B + 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(8*d) + (a*(6*B + C)*sin(c + d*x))/(12*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a*(8*A + 6*B + 5*C)*sin(c + d*x))/(8*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d*cos(c + d*x)^(5/2))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(5/2), x, 7, (sqrt(a)*(48*A + 40*B + 35*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(64*d) + (a*(8*B + C)*sin(c + d*x))/(24*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + (a*(48*A + 40*B + 35*C)*sin(c + d*x))/(96*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a*(48*A + 40*B + 35*C)*sin(c + d*x))/(64*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (C*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d*cos(c + d*x)^(7/2))]

    @test_int [cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (16*a^2*(336*A + 374*B + 429*C)*sin(c + d*x))/(3465*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (8*a^2*(336*A + 374*B + 429*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3465*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(336*A + 374*B + 429*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(1155*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(84*A + 110*B + 99*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a*(3*A + 11*B)*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(99*d) + (2*A*cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(11*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (4*a^2*(136*A + 156*B + 189*C)*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a^2*(136*A + 156*B + 189*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(52*A + 72*B + 63*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a*(A + 3*B)*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(21*d) + (2*A*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 5, (8*a^2*(19*A + 21*B + 35*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a*(19*A + 21*B + 35*C)*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(105*d) + (2*(3*A + 7*B)*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(35*d) + (2*A*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*a^(3/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (2*a^2*(12*A + 20*B + 15*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a*(3*A + 5*B)*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(3/2)*(2*B + 3*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (a^2*(8*A + 6*B - 3*C)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - (a*(2*A - 3*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))) + (2*A*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (a^(3/2)*(8*A + 12*B + 7*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*d) + (a^2*(8*A - 4*B - 5*C)*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (a*(4*B + 3*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))) + (C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d*sqrt(cos(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(1/2), x, 6, (a^(3/2)*(24*A + 14*B + 11*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(8*d) + (a^2*(24*A + 30*B + 19*C)*sin(c + d*x))/(24*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a*(2*B + C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)) + (C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 7, (a^(3/2)*(112*A + 88*B + 75*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(64*d) + (a^2*(48*A + 56*B + 39*C)*sin(c + d*x))/(96*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(112*A + 88*B + 75*C)*sin(c + d*x))/(64*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a*(8*B + 3*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d*cos(c + d*x)^(5/2)) + (C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d*cos(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(5/2), x, 8, (a^(3/2)*(176*A + 150*B + 133*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(128*d) + (a^2*(80*A + 90*B + 67*C)*sin(c + d*x))/(240*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(176*A + 150*B + 133*C)*sin(c + d*x))/(192*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(176*A + 150*B + 133*C)*sin(c + d*x))/(128*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a*(10*B + 3*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d*cos(c + d*x)^(7/2)) + (C*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d*cos(c + d*x)^(7/2))]

    @test_int [cos(c + d*x)^(13/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (16*a^3*(8368*A + 9230*B + 10439*C)*sin(c + d*x))/(45045*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (8*a^3*(8368*A + 9230*B + 10439*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(45045*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(8368*A + 9230*B + 10439*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15015*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(2224*A + 2522*B + 2717*C)*cos(c + d*x)^(5/2)*sin(c + d*x))/(9009*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(136*A + 182*B + 143*C)*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(1287*d) + (2*a*(5*A + 13*B)*cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(143*d) + (2*A*cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(13*d)]
    @test_int [cos(c + d*x)^(11/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (4*a^3*(2840*A + 3212*B + 3795*C)*sin(c + d*x))/(3465*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a^3*(2840*A + 3212*B + 3795*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3465*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(1160*A + 1364*B + 1485*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(3465*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(32*A + 44*B + 33*C)*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(231*d) + (2*a*(5*A + 11*B)*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(99*d) + (2*A*cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(11*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (64*a^3*(13*A + 15*B + 21*C)*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^2*(13*A + 15*B + 21*C)*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(315*d) + (2*a*(13*A + 15*B + 21*C)*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(105*d) + (2*(5*A + 9*B)*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(63*d) + (2*A*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*a^(5/2)*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (2*a^3*(160*A + 224*B + 245*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a^2*(40*A + 56*B + 35*C)*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(105*d) + (2*a*(5*A + 7*B)*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(35*d) + (2*A*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(2*B + 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/d + (a^3*(64*A + 70*B + 15*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - (a^2*(16*A + 10*B - 15*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*a*(A + B)*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d) + (2*A*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(8*A + 20*B + 19*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*d) + (a^3*(56*A + 12*B - 27*C)*sin(c + d*x))/(12*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - (a^2*(8*A - 12*B - 21*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(12*d*sqrt(cos(c + d*x))) - (a*(4*A - 3*C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(6*d*sqrt(cos(c + d*x))) + (2*A*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (a^(5/2)*(40*A + 38*B + 25*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(8*d) + (a^3*(24*A - 54*B - 49*C)*sin(c + d*x))/(24*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (a^2*(24*A + 42*B + 31*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d*sqrt(cos(c + d*x))) + (a*(6*B + 5*C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d*sqrt(cos(c + d*x))) + (C*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(1/2), x, 7, (a^(5/2)*(304*A + 200*B + 163*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(64*d) + (a^3*(432*A + 392*B + 299*C)*sin(c + d*x))/(192*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(16*A + 24*B + 17*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(32*d*cos(c + d*x)^(3/2)) + (a*(8*B + 5*C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d*cos(c + d*x)^(3/2)) + (C*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 8, (a^(5/2)*(400*A + 326*B + 283*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(128*d) + (a^3*(1040*A + 950*B + 787*C)*sin(c + d*x))/(960*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^3*(400*A + 326*B + 283*C)*sin(c + d*x))/(128*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(80*A + 110*B + 79*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(240*d*cos(c + d*x)^(5/2)) + (a*(2*B + C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(8*d*cos(c + d*x)^(5/2)) + (C*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(5/2), x, 9, (a^(5/2)*(1304*A + 1132*B + 1015*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(512*d) + (a^3*(680*A + 628*B + 545*C)*sin(c + d*x))/(960*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + (a^3*(1304*A + 1132*B + 1015*C)*sin(c + d*x))/(768*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^3*(1304*A + 1132*B + 1015*C)*sin(c + d*x))/(512*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(120*A + 156*B + 115*C)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(480*d*cos(c + d*x)^(7/2)) + (a*(12*B + 5*C)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(60*d*cos(c + d*x)^(7/2)) + (C*(a + a*sec(c + d*x))^(5/2)*sin(c + d*x))/(6*d*cos(c + d*x)^(7/2))]

    #= ::Subsubsection::Closed:: =#
    #=n<0=#

    @test_int [(cos(c + d*x)^(7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 7, (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) - (2*(43*A - 91*B + 35*C)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*(31*A - 7*B + 35*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) - (2*(A - 7*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*d*sqrt(a + a*sec(c + d*x))) + (2*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 6, -((sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d)) + (2*(13*A - 5*B + 15*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - (2*(A - 5*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 5, (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) - (2*(A - 3*B)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*A*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 7, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) - (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (2*A*sin(c + d*x))/(d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(1/2)*sqrt(a + a*sec(c + d*x))), x, 7, ((2*B - C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (C*sin(c + d*x))/(d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))), x, 8, ((8*A - 4*B + 7*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*sqrt(a)*d) - (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (C*sin(c + d*x))/(2*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + ((4*B - C)*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))), x, 9, -(((8*A - 14*B + 9*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(8*sqrt(a)*d)) + (sqrt(2)*(A - B + C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (C*sin(c + d*x))/(3*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + ((6*B - C)*sin(c + d*x))/(12*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + ((8*A - 2*B + 7*C)*sin(c + d*x))/(8*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]

    @test_int [(sqrt(cos(c + d*x))*(a*A + (A*b + a*B)*sec(c + d*x) + b*B*sec(c + d*x)^2))/sqrt(a + a*sec(c + d*x)), x, 7, (2*b*B*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) - (sqrt(2)*(a - b)*(A - B)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(sqrt(a)*d) + (2*a*A*sin(c + d*x))/(d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x)))]

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 7, -(((15*A - 11*B + 7*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d)) - ((A - B + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((147*A - 95*B + 75*C)*sin(c + d*x))/(30*a*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((39*A - 35*B + 15*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(30*a*d*sqrt(a + a*sec(c + d*x))) + ((9*A - 5*B + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(10*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 6, ((11*A - 7*B + 3*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((19*A - 15*B + 3*C)*sin(c + d*x))/(6*a*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((7*A - 3*B + 3*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(6*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(3/2), x, 5, -(((7*A - 3*B - C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d)) - ((A - B + C)*sin(c + d*x))/(2*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((5*A - B + C)*sin(c + d*x))/(2*a*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(3/2)), x, 7, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(a^(3/2)*d) + ((3*A + B - 5*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sin(c + d*x))/(2*d*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)), x, 8, ((2*B - 3*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(a^(3/2)*d) + ((A - 5*B + 9*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sin(c + d*x))/(2*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)) + ((A - B + 3*C)*sin(c + d*x))/(2*a*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)), x, 9, ((8*A - 12*B + 19*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(4*a^(3/2)*d) - ((5*A - 9*B + 13*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(2*sqrt(2)*a^(3/2)*d) - ((A - B + C)*sin(c + d*x))/(2*d*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)) + ((A - B + 2*C)*sin(c + d*x))/(2*a*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) - ((2*A - 6*B + 7*C)*sin(c + d*x))/(4*a*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 8, -(((283*A - 163*B + 75*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d)) - ((A - B + C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((21*A - 13*B + 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((2671*A - 1495*B + 735*C)*sin(c + d*x))/(240*a^2*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((787*A - 475*B + 195*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(240*a^2*d*sqrt(a + a*sec(c + d*x))) + ((157*A - 85*B + 45*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(80*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 7, ((163*A - 75*B + 19*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((17*A - 9*B + C)*sqrt(cos(c + d*x))*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((299*A - 147*B + 27*C)*sin(c + d*x))/(48*a^2*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((95*A - 39*B + 15*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(48*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(cos(c + d*x)^(1/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + a*sec(c + d*x))^(5/2), x, 6, -(((75*A - 19*B - 5*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d)) - ((A - B + C)*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)) - ((13*A - 5*B - 3*C)*sin(c + d*x))/(16*a*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((49*A - 9*B + C)*sin(c + d*x))/(16*a^2*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(1/2)*(a + a*sec(c + d*x))^(5/2)), x, 5, ((19*A + 5*B + 3*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)) - ((9*A - B - 7*C)*sin(c + d*x))/(16*a*d*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)), x, 8, (2*C*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(a^(5/2)*d) + ((5*A + 3*B - 43*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sin(c + d*x))/(4*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)) + ((5*A + 3*B - 11*C)*sin(c + d*x))/(16*a*d*cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)), x, 9, ((2*B - 5*C)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x)))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(a^(5/2)*d) + ((3*A - 43*B + 115*C)*atanh((sqrt(a)*sqrt(sec(c + d*x))*sin(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x))))*sqrt(cos(c + d*x))*sqrt(sec(c + d*x)))/(16*sqrt(2)*a^(5/2)*d) - ((A - B + C)*sin(c + d*x))/(4*d*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)) + ((A + 7*B - 15*C)*sin(c + d*x))/(16*a*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)) + ((3*A - 11*B + 35*C)*sin(c + d*x))/(16*a^2*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*(a+b*sec(e+f*x))^m*(d*cos(e+f*x))^n*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Section:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^n*(a+b*sec(e+f*x))^m*(A+C*sec(e+f*x)^2)=#

    #= ::Section:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^n*(a+b*sec(e+f*x))^m*(B*sec(e+f*x)+C*sec(e+f*x)^2)=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(d*cos(e+f*x))^n*(a+b*sec(e+f*x))^m*(A+B*sec(e+f*x)+C*sec(e+f*x)^2)=#

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

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [cos(c + d*x)^(9/2)*(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (2*(7*a*A + 9*b*B + 9*a*C)*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (2*(5*A*b + 5*a*B + 7*b*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*(5*A*b + 5*a*B + 7*b*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*(7*a*A + 9*b*B + 9*a*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(45*d) + (2*(A*b + a*B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d) + (2*a*A*cos(c + d*x)^(7/2)*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*(3*A*b + 3*a*B + 5*b*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(5*a*A + 7*b*B + 7*a*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*(5*a*A + 7*b*B + 7*a*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*(A*b + a*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d) + (2*a*A*cos(c + d*x)^(5/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*(3*a*A + 5*b*B + 5*a*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(A*b + a*B + 3*b*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*(A*b + a*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*a*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, (2*(A*b + a*B - b*C)*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*(3*b*B + a*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*b*C*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*a*A*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^(1/2)*(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 6, -((2*(b*B - a*(A - C))*Elliptic.E((1/2)*(c + d*x), 2))/d) + (2*(3*A*b + 3*a*B + b*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*b*C*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*(b*B + a*C)*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(1/2), x, 7, -((2*(5*A*b + 5*a*B + 3*b*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*(b*B + a*(3*A + C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*b*C*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*(b*B + a*C)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*(5*A*b + 5*a*B + 3*b*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 8, -((2*(5*a*A + 3*b*B + 3*a*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*(7*A*b + 7*a*B + 5*b*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*b*C*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (2*(b*B + a*C)*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*(7*A*b + 7*a*B + 5*b*C)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2)) + (2*(5*a*A + 3*b*B + 3*a*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]

    @test_int [cos(c + d*x)^(9/2)*(a + b*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (2*(18*a*b*B + 3*b^2*(3*A + 5*C) + a^2*(7*A + 9*C))*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*(4*A*b^2 + 18*a*b*B + a^2*(7*A + 9*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(45*d) + (2*a*(4*A*b + 9*a*B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(63*d) + (2*A*cos(c + d*x)^(3/2)*(b + a*cos(c + d*x))^2*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*(6*a*A*b + 3*a^2*B + 5*b^2*B + 10*a*b*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(14*a*b*B + 7*b^2*(A + 3*C) + a^2*(5*A + 7*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*(4*A*b^2 + 14*a*b*B + a^2*(5*A + 7*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a*(4*A*b + 7*a*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*d) + (2*A*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^2*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*(10*a*b*B + 5*b^2*(A - C) + a^2*(3*A + 5*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(a^2*B + 3*b^2*B + 2*a*b*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*(2*A*b + a*B - 6*b*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*a^2*(A - 5*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d) + (2*C*(b + a*cos(c + d*x))^2*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, (2*(a^2*B - b^2*B + 2*a*b*(A - C))*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*(6*a*b*B + b^2*(3*A + C) + a^2*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*b*(3*b*B + 4*a*C)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))) + (2*a^2*(A - C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*C*(b + a*cos(c + d*x))^2*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2))]
    @test_int [sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 7, -((2*(10*a*b*B - 5*a^2*(A - C) + b^2*(5*A + 3*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*(3*a^2*B + b^2*B + 2*a*b*(3*A + C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*b*(5*b*B + 4*a*C)*sin(c + d*x))/(15*d*cos(c + d*x)^(3/2)) + (2*(5*A*b^2 + 10*a*b*B + 4*a^2*C + 3*b^2*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))) + (2*C*(b + a*cos(c + d*x))^2*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2))]
    @test_int [((a + b*sec(c + d*x))^2*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 8, -((2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*(14*a*b*B + 7*a^2*(3*A + C) + b^2*(7*A + 5*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*b*(7*b*B + 4*a*C)*sin(c + d*x))/(35*d*cos(c + d*x)^(5/2)) + (2*(7*A*b^2 + 14*a*b*B + 4*a^2*C + 5*b^2*C)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2)) + (2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))) + (2*C*(b + a*cos(c + d*x))^2*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2))]

    @test_int [cos(c + d*x)^(11/2)*(a + b*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (2*(7*a^3*B + 27*a*b^2*B + 3*b^3*(3*A + 5*C) + 3*a^2*b*(7*A + 9*C))*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (2*(165*a^2*b*B + 77*b^3*B + 33*a*b^2*(5*A + 7*C) + 5*a^3*(9*A + 11*C))*Elliptic.F((1/2)*(c + d*x), 2))/(231*d) + (2*(165*a^2*b*B + 77*b^3*B + 33*a*b^2*(5*A + 7*C) + 5*a^3*(9*A + 11*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(231*d) + (2*(24*A*b^3 + 77*a^3*B + 242*a*b^2*B + 33*a^2*b*(7*A + 9*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(495*d) + (2*a*(24*A*b^2 + 143*a*b*B + 9*a^2*(9*A + 11*C))*cos(c + d*x)^(5/2)*sin(c + d*x))/(693*d) + (2*(6*A*b + 11*a*B)*cos(c + d*x)^(3/2)*(b + a*cos(c + d*x))^2*sin(c + d*x))/(99*d) + (2*A*cos(c + d*x)^(3/2)*(b + a*cos(c + d*x))^3*sin(c + d*x))/(11*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + b*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (2*(27*a^2*b*B + 15*b^3*B + 9*a*b^2*(3*A + 5*C) + a^3*(7*A + 9*C))*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (2*(5*a^3*B + 21*a*b^2*B + 7*b^3*(A + 3*C) + 3*a^2*b*(5*A + 7*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*(8*A*b^3 + 15*a^3*B + 54*a*b^2*B + 9*a^2*b*(5*A + 7*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(63*d) + (2*a*(24*A*b^2 + 99*a*b*B + 7*a^2*(7*A + 9*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(315*d) + (2*(2*A*b + 3*a*B)*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^2*sin(c + d*x))/(21*d) + (2*A*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^3*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (2*(3*a^3*B + 15*a*b^2*B + 5*b^3*(A - C) + 3*a^2*b*(3*A + 5*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(21*a^2*b*B + 21*b^3*B + 21*a*b^2*(A + 3*C) + a^3*(5*A + 7*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a*(21*a*b*B + 6*b^2*(3*A - 7*C) + a^2*(5*A + 7*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a^2*(11*A*b + 7*a*B - 35*b*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*d) + (2*a*(A - 7*C)*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^2*sin(c + d*x))/(7*d) + (2*C*(b + a*cos(c + d*x))^3*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (2*(15*a^2*b*B - 5*b^3*B + 15*a*b^2*(A - C) + a^3*(3*A + 5*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(a^3*B + 9*a*b^2*B + b^3*(3*A + C) + 3*a^2*b*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*(a^2*B - 6*b^2*B + 3*a*b*(A - 5*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*a^2*(3*a*A - 15*b*B - 35*a*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15*d) + (2*(b*B + 2*a*C)*(b + a*cos(c + d*x))^2*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*C*(b + a*cos(c + d*x))^3*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2))]
    @test_int [cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, (2*(5*a^3*B - 15*a*b^2*B + 15*a^2*b*(A - C) - b^3*(5*A + 3*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(9*a^2*b*B + b^3*B + 3*a*b^2*(3*A + C) + a^3*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*b*(15*A*b^2 + 35*a*b*B + 24*a^2*C + 9*b^2*C)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*a^2*(5*a*A - 5*b*B - 9*a*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*(5*b*B + 6*a*C)*(b + a*cos(c + d*x))^2*sin(c + d*x))/(15*d*cos(c + d*x)^(3/2)) + (2*C*(b + a*cos(c + d*x))^3*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2))]
    @test_int [sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 8, -((2*(15*a^2*b*B + 3*b^3*B - 5*a^3*(A - C) + 3*a*b^2*(5*A + 3*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*(21*a^3*B + 21*a*b^2*B + 21*a^2*b*(3*A + C) + b^3*(7*A + 5*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*b*(35*A*b^2 + 63*a*b*B + 24*a^2*C + 25*b^2*C)*sin(c + d*x))/(105*d*cos(c + d*x)^(3/2)) + (2*(98*a^2*b*B + 21*b^3*B + 24*a^3*C + 21*a*b^2*(5*A + 3*C))*sin(c + d*x))/(35*d*sqrt(cos(c + d*x))) + (2*(7*b*B + 6*a*C)*(b + a*cos(c + d*x))^2*sin(c + d*x))/(35*d*cos(c + d*x)^(5/2)) + (2*C*(b + a*cos(c + d*x))^3*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2))]
    @test_int [((a + b*sec(c + d*x))^3*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 9, -((2*(15*a^3*B + 27*a*b^2*B + 9*a^2*b*(5*A + 3*C) + b^3*(9*A + 7*C))*Elliptic.E((1/2)*(c + d*x), 2))/(15*d)) + (2*(21*a^2*b*B + 5*b^3*B + 7*a^3*(3*A + C) + 3*a*b^2*(7*A + 5*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*b*(63*A*b^2 + 99*a*b*B + 24*a^2*C + 49*b^2*C)*sin(c + d*x))/(315*d*cos(c + d*x)^(5/2)) + (2*(54*a^2*b*B + 15*b^3*B + 8*a^3*C + 9*a*b^2*(7*A + 5*C))*sin(c + d*x))/(63*d*cos(c + d*x)^(3/2)) + (2*(15*a^3*B + 27*a*b^2*B + 9*a^2*b*(5*A + 3*C) + b^3*(9*A + 7*C))*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*(3*b*B + 2*a*C)*(b + a*cos(c + d*x))^2*sin(c + d*x))/(21*d*cos(c + d*x)^(7/2)) + (2*C*(b + a*cos(c + d*x))^3*sin(c + d*x))/(9*d*cos(c + d*x)^(9/2))]

    @test_int [cos(c + d*x)^(11/2)*(a + b*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (2*(7*a^4*B + 54*a^2*b^2*B + 15*b^4*B + 12*a*b^3*(3*A + 5*C) + 4*a^3*b*(7*A + 9*C))*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (2*(220*a^3*b*B + 308*a*b^3*B + 77*b^4*(A + 3*C) + 66*a^2*b^2*(5*A + 7*C) + 5*a^4*(9*A + 11*C))*Elliptic.F((1/2)*(c + d*x), 2))/(231*d) + (2*(64*A*b^4 + 660*a^3*b*B + 682*a*b^3*B + 15*a^4*(9*A + 11*C) + 9*a^2*b^2*(101*A + 143*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(693*d) + (2*a*(192*A*b^3 + 539*a^3*B + 1353*a*b^2*B + 2*a^2*b*(673*A + 891*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(3465*d) + (2*(16*A*b^2 + 55*a*b*B + 3*a^2*(9*A + 11*C))*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^2*sin(c + d*x))/(231*d) + (2*(8*A*b + 11*a*B)*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^3*sin(c + d*x))/(99*d) + (2*A*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^4*sin(c + d*x))/(11*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + b*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (2*(36*a^3*b*B + 60*a*b^3*B + 15*b^4*(A - C) + 18*a^2*b^2*(3*A + 5*C) + a^4*(7*A + 9*C))*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (2*(5*a^4*B + 42*a^2*b^2*B + 21*b^4*B + 28*a*b^3*(A + 3*C) + 4*a^3*b*(5*A + 7*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a*(15*a^3*B + 117*a*b^2*B + 2*b^3*(31*A - 63*C) + 12*a^2*b*(5*A + 7*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(63*d) + (2*a^2*(162*a*b*B + 3*b^2*(41*A - 105*C) + 7*a^2*(7*A + 9*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(315*d) + (2*a*(5*A*b + 3*a*B - 21*b*C)*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^2*sin(c + d*x))/(21*d) + (2*a*(A - 9*C)*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^3*sin(c + d*x))/(9*d) + (2*C*(b + a*cos(c + d*x))^4*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (2*(3*a^4*B + 30*a^2*b^2*B - 5*b^4*B + 20*a*b^3*(A - C) + 4*a^3*b*(3*A + 5*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(28*a^3*b*B + 84*a*b^3*B + 7*b^4*(3*A + C) + 42*a^2*b^2*(A + 3*C) + a^4*(5*A + 7*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a*(28*a^2*b*B - 42*b^3*B + 3*a*b^2*(13*A - 49*C) + a^3*(5*A + 7*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a^2*(54*a*A*b + 21*a^2*B - 105*b^2*B - 350*a*b*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*a*(a*A - 7*b*B - 21*a*C)*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^2*sin(c + d*x))/(7*d) + (2*(3*b*B + 8*a*C)*(b + a*cos(c + d*x))^3*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))) + (2*C*(b + a*cos(c + d*x))^4*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2))]
    @test_int [cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (2*(20*a^3*b*B - 20*a*b^3*B + 30*a^2*b^2*(A - C) - b^4*(5*A + 3*C) + a^4*(3*A + 5*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(a^4*B + 18*a^2*b^2*B + b^4*B + 4*a*b^3*(3*A + C) + 4*a^3*b*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*(5*a^3*B - 105*a*b^2*B + 4*a^2*b*(5*A - 33*C) - 6*b^3*(5*A + 3*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) - (2*a^2*(50*a*b*B - a^2*(3*A - 59*C) + 3*b^2*(5*A + 3*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(15*d) + (2*(5*A*b^2 + 15*a*b*B + 16*a^2*C + 3*b^2*C)*(b + a*cos(c + d*x))^2*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))) + (2*(5*b*B + 8*a*C)*(b + a*cos(c + d*x))^3*sin(c + d*x))/(15*d*cos(c + d*x)^(3/2)) + (2*C*(b + a*cos(c + d*x))^4*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2))]
    @test_int [cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, (2*(5*a^4*B - 30*a^2*b^2*B - 3*b^4*B + 20*a^3*b*(A - C) - 4*a*b^3*(5*A + 3*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(84*a^3*b*B + 28*a*b^3*B + 42*a^2*b^2*(3*A + C) + 7*a^4*(A + 3*C) + b^4*(7*A + 5*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*b*(413*a^2*b*B + 63*b^3*B + 192*a^3*C + 2*a*b^2*(175*A + 101*C))*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))) - (2*a^2*(98*a*b*B - a^2*(35*A - 87*C) + 5*b^2*(7*A + 5*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d) + (2*(35*A*b^2 + 77*a*b*B + 48*a^2*C + 25*b^2*C)*(b + a*cos(c + d*x))^2*sin(c + d*x))/(105*d*cos(c + d*x)^(3/2)) + (2*(7*b*B + 8*a*C)*(b + a*cos(c + d*x))^3*sin(c + d*x))/(35*d*cos(c + d*x)^(5/2)) + (2*C*(b + a*cos(c + d*x))^4*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2))]
    @test_int [sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^4*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 9, -((2*(60*a^3*b*B + 36*a*b^3*B - 15*a^4*(A - C) + 18*a^2*b^2*(5*A + 3*C) + b^4*(9*A + 7*C))*Elliptic.E((1/2)*(c + d*x), 2))/(15*d)) + (2*(21*a^4*B + 42*a^2*b^2*B + 5*b^4*B + 28*a^3*b*(3*A + C) + 4*a*b^3*(7*A + 5*C))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*b*(261*a^2*b*B + 75*b^3*B + 64*a^3*C + 2*a*b^2*(147*A + 101*C))*sin(c + d*x))/(315*d*cos(c + d*x)^(3/2)) + (2*(1098*a^3*b*B + 756*a*b^3*B + 192*a^4*C + 21*b^4*(9*A + 7*C) + 7*a^2*b^2*(261*A + 155*C))*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))) + (2*(63*A*b^2 + 117*a*b*B + 48*a^2*C + 49*b^2*C)*(b + a*cos(c + d*x))^2*sin(c + d*x))/(315*d*cos(c + d*x)^(5/2)) + (2*(9*b*B + 8*a*C)*(b + a*cos(c + d*x))^3*sin(c + d*x))/(63*d*cos(c + d*x)^(7/2)) + (2*C*(b + a*cos(c + d*x))^4*sin(c + d*x))/(9*d*cos(c + d*x)^(9/2))]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x)), x, 8, (2*(5*A*b^2 - 5*a*b*B + a^2*(3*A + 5*C))*Elliptic.E((1/2)*(c + d*x), 2))/(5*a^3*d) - (2*(3*A*b^3 - a^3*B - 3*a*b^2*B + a^2*b*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^4*d) + (2*b^2*(A*b^2 - a*(b*B - a*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(a^4*(a + b)*d) - (2*(A*b - a*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d) + (2*A*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*a*d)]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x)), x, 7, -((2*(A*b - a*B)*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d)) + (2*(3*A*b^2 - 3*a*b*B + a^2*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^3*d) - (2*b*(A*b^2 - a*(b*B - a*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(a^3*(a + b)*d) + (2*A*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a*d)]
    @test_int [(sqrt(cos(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x)), x, 6, (2*A*Elliptic.E((1/2)*(c + d*x), 2))/(a*d) - (2*(A*b - a*B)*Elliptic.F((1/2)*(c + d*x), 2))/(a^2*d) + (2*(A*b^2 - a*(b*B - a*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(a^2*(a + b)*d)]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + b*sec(c + d*x))), x, 7, -((2*C*Elliptic.E((1/2)*(c + d*x), 2))/(b*d)) + (2*A*Elliptic.F((1/2)*(c + d*x), 2))/(a*d) - (2*(A*b^2 - a*(b*B - a*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(a*b*(a + b)*d) + (2*C*sin(c + d*x))/(b*d*sqrt(cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))), x, 8, -((2*(b*B - a*C)*Elliptic.E((1/2)*(c + d*x), 2))/(b^2*d)) + (2*C*Elliptic.F((1/2)*(c + d*x), 2))/(3*b*d) + (2*(A*b^2 - a*(b*B - a*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(b^2*(a + b)*d) + (2*C*sin(c + d*x))/(3*b*d*cos(c + d*x)^(3/2)) + (2*(b*B - a*C)*sin(c + d*x))/(b^2*d*sqrt(cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))), x, 9, -((2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*Elliptic.E((1/2)*(c + d*x), 2))/(5*b^3*d)) + (2*(b*B - a*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*b^2*d) - (2*a*(A*b^2 - a*(b*B - a*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(b^3*(a + b)*d) + (2*C*sin(c + d*x))/(5*b*d*cos(c + d*x)^(5/2)) + (2*(b*B - a*C)*sin(c + d*x))/(3*b^2*d*cos(c + d*x)^(3/2)) + (2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*sin(c + d*x))/(5*b^3*d*sqrt(cos(c + d*x)))]

    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^2, x, 8, ((5*A*b^3 + 2*a^3*B - 3*a*b^2*B - a^2*b*(4*A - C))*Elliptic.E((1/2)*(c + d*x), 2))/(a^3*(a^2 - b^2)*d) - ((15*A*b^4 + 12*a^3*b*B - 9*a*b^3*B - a^2*b^2*(16*A - 3*C) - 2*a^4*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^4*(a^2 - b^2)*d) + (b*(5*A*b^4 + 5*a^3*b*B - 3*a*b^3*B - a^2*b^2*(7*A - C) - 3*a^4*C)*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(a^4*(a - b)*(a + b)^2*d) - ((5*A*b^2 - 3*a*b*B - a^2*(2*A - 3*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*(b*B - a*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(a*(a^2 - b^2)*d*(b + a*cos(c + d*x)))]
    @test_int [(sqrt(cos(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^2, x, 7, -(((3*A*b^2 - a*b*B - a^2*(2*A - C))*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*(a^2 - b^2)*d)) + ((3*A*b^3 + 2*a^3*B - a*b^2*B - a^2*b*(4*A + C))*Elliptic.F((1/2)*(c + d*x), 2))/(a^3*(a^2 - b^2)*d) - ((3*A*b^4 + 3*a^3*b*B - a*b^3*B - a^4*C - a^2*b^2*(5*A + C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(a^3*(a - b)*(a + b)^2*d) + ((A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(a*(a^2 - b^2)*d*(b + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^2), x, 7, ((A*b^2 - a*(b*B - a*C))*Elliptic.E((1/2)*(c + d*x), 2))/(a*b*(a^2 - b^2)*d) - ((A*b^2 + a*b*B - a^2*(2*A + C))*Elliptic.F((1/2)*(c + d*x), 2))/(a^2*(a^2 - b^2)*d) + ((A*b^4 + a^3*b*B + a*b^3*B + a^4*C - 3*a^2*b^2*(A + C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(a^2*(a - b)*b*(a + b)^2*d) - ((A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(b*(a^2 - b^2)*d*(b + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^2), x, 8, -(((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*Elliptic.E((1/2)*(c + d*x), 2))/(b^2*(a^2 - b^2)*d)) - ((A*b^2 - a*(b*B - a*C))*Elliptic.F((1/2)*(c + d*x), 2))/(a*b*(a^2 - b^2)*d) + ((A*b^4 + a^3*b*B - 3*a*b^3*B - 3*a^4*C + a^2*b^2*(A + 5*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(a*b^2*(a + b)*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*sin(c + d*x))/(b^2*(a^2 - b^2)*d*sqrt(cos(c + d*x))) - ((A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(b*(a^2 - b^2)*d*sqrt(cos(c + d*x))*(b + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^2), x, 9, -(((3*a^2*b*B - 2*b^3*B - a*b^2*(A - 4*C) - 5*a^3*C)*Elliptic.E((1/2)*(c + d*x), 2))/(b^3*(a^2 - b^2)*d)) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*Elliptic.F((1/2)*(c + d*x), 2))/(3*b^2*(a^2 - b^2)*d) - ((3*A*b^4 + 3*a^3*b*B - 5*a*b^3*B - a^2*b^2*(A - 7*C) - 5*a^4*C)*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/((a - b)*b^3*(a + b)^2*d) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*sin(c + d*x))/(3*b^2*(a^2 - b^2)*d*cos(c + d*x)^(3/2)) + ((3*a^2*b*B - 2*b^3*B - a*b^2*(A - 4*C) - 5*a^3*C)*sin(c + d*x))/(b^3*(a^2 - b^2)*d*sqrt(cos(c + d*x))) - ((A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(b*(a^2 - b^2)*d*cos(c + d*x)^(3/2)*(b + a*cos(c + d*x)))]

    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^3, x, 9, -(((35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B - a^2*b^3*(65*A - 3*C) + a^4*(24*A*b - 9*b*C))*Elliptic.E((1/2)*(c + d*x), 2))/(4*a^4*(a^2 - b^2)^2*d)) + ((105*A*b^6 - 72*a^5*b*B + 99*a^3*b^3*B - 45*a*b^5*B + a^4*b^2*(128*A - 15*C) - a^2*b^4*(223*A - 9*C) + 8*a^6*(A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(12*a^5*(a^2 - b^2)^2*d) - (b*(35*A*b^6 - 35*a^5*b*B + 38*a^3*b^3*B - 15*a*b^5*B - a^2*b^4*(86*A - 3*C) + 3*a^4*b^2*(21*A - 2*C) + 15*a^6*C)*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(4*a^5*(a - b)^2*(a + b)^3*d) + ((35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B + a^4*(8*A - 21*C) - a^2*b^2*(61*A - 3*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(12*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*(b*B - a*C))*cos(c + d*x)^(5/2)*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(b + a*cos(c + d*x))^2) - ((7*A*b^4 + 9*a^3*b*B - 3*a*b^3*B - 5*a^4*C - a^2*b^2*(13*A + C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(4*a^2*(a^2 - b^2)^2*d*(b + a*cos(c + d*x)))]
    @test_int [(sqrt(cos(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^3, x, 8, ((15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B + a^4*(8*A - 5*C) - a^2*b^2*(29*A + C))*Elliptic.E((1/2)*(c + d*x), 2))/(4*a^3*(a^2 - b^2)^2*d) - ((15*A*b^5 - 8*a^5*B + 5*a^3*b^2*B - 3*a*b^4*B - a^2*b^3*(33*A + C) + a^4*b*(24*A + 7*C))*Elliptic.F((1/2)*(c + d*x), 2))/(4*a^4*(a^2 - b^2)^2*d) + ((15*A*b^6 - 15*a^5*b*B + 6*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C - a^2*b^4*(38*A + C) + 5*a^4*b^2*(7*A + 2*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(4*a^4*(a - b)^2*(a + b)^3*d) + ((A*b^2 - a*(b*B - a*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(b + a*cos(c + d*x))^2) - ((5*A*b^4 + 7*a^3*b*B - a*b^3*B - 3*a^4*C - a^2*b^2*(11*A + 3*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(4*a^2*(a^2 - b^2)^2*d*(b + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^3), x, 8, -(((3*A*b^4 + 5*a^3*b*B + a*b^3*B - a^4*C - a^2*b^2*(9*A + 5*C))*Elliptic.E((1/2)*(c + d*x), 2))/(4*a^2*b*(a^2 - b^2)^2*d)) + ((3*A*b^4 - 7*a^3*b*B + a*b^3*B - a^2*b^2*(5*A - 3*C) + a^4*(8*A + 3*C))*Elliptic.F((1/2)*(c + d*x), 2))/(4*a^3*(a^2 - b^2)^2*d) - ((3*A*b^6 - 3*a^5*b*B - 10*a^3*b^3*B + a*b^5*B - 3*a^2*b^4*(2*A - C) - a^6*C + 5*a^4*b^2*(3*A + 2*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(4*a^3*(a - b)^2*b*(a + b)^3*d) + ((A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(b + a*cos(c + d*x))^2) + ((3*A*b^4 + 5*a^3*b*B + a*b^3*B - a^4*C - a^2*b^2*(9*A + 5*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(4*a*b*(a^2 - b^2)^2*d*(b + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^3), x, 8, -(((A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + a^2*b^2*(5*A + 9*C))*Elliptic.E((1/2)*(c + d*x), 2))/(4*a*b^2*(a^2 - b^2)^2*d)) + ((A*b^4 + 3*a^3*b*B + 3*a*b^3*B + a^4*C - 7*a^2*b^2*(A + C))*Elliptic.F((1/2)*(c + d*x), 2))/(4*a^2*b*(a^2 - b^2)^2*d) - ((A*b^6 - a^5*b*B + 10*a^3*b^3*B + 3*a*b^5*B - 3*a^4*b^2*(A - 2*C) - 3*a^6*C - 5*a^2*b^4*(2*A + 3*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(4*a^2*(a - b)^2*b^2*(a + b)^3*d) - ((A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(2*b*(a^2 - b^2)*d*(b + a*cos(c + d*x))^2) + ((A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + a^2*b^2*(5*A + 9*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(4*b^2*(a^2 - b^2)^2*d*(b + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^3), x, 9, ((3*a^3*b*B - 9*a*b^3*B + b^4*(5*A - 8*C) - 15*a^4*C + a^2*b^2*(A + 29*C))*Elliptic.E((1/2)*(c + d*x), 2))/(4*b^3*(a^2 - b^2)^2*d) + ((3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + a^2*b^2*(3*A + 11*C))*Elliptic.F((1/2)*(c + d*x), 2))/(4*a*b^2*(a^2 - b^2)^2*d) - ((3*A*b^6 - 3*a^5*b*B + 6*a^3*b^3*B - 15*a*b^5*B + 15*a^6*C + 5*a^2*b^4*(2*A + 7*C) - a^4*b^2*(A + 38*C))*Elliptic.Pi((2*a)/(a + b), (1/2)*(c + d*x), 2))/(4*a*(a - b)^2*b^3*(a + b)^3*d) - ((3*a^3*b*B - 9*a*b^3*B + b^4*(5*A - 8*C) - 15*a^4*C + a^2*b^2*(A + 29*C))*sin(c + d*x))/(4*b^3*(a^2 - b^2)^2*d*sqrt(cos(c + d*x))) - ((A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(2*b*(a^2 - b^2)*d*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))^2) + ((3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + a^2*b^2*(3*A + 11*C))*sin(c + d*x))/(4*b^2*(a^2 - b^2)^2*d*sqrt(cos(c + d*x))*(b + a*cos(c + d*x)))]

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

    #= ::Subsubsection::Closed:: =#
    #=m>0=#

    @test_int [cos(c + d*x)^(9/2)*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 12, (-2*(a^2 - b^2)*(16*A*b^3 - 75*a^3*B - 24*a*b^2*B + 6*a^2*b*(6*A + 7*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(315*a^4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (2*(16*A*b^4 - 57*a^3*b*B - 24*a*b^3*B + 6*a^2*b^2*(4*A + 7*C) - 21*a^4*(7*A + 9*C))*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(315*a^4*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(8*A*b^3 + 75*a^3*B - 12*a*b^2*B + a^2*b*(13*A + 21*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a^3*d) - (2*(6*A*b^2 - 9*a*b*B - 7*a^2*(7*A + 9*C))*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a^2*d) + (2*(A*b + 9*a*B)*cos(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(63*a*d) + (2*A*cos(c + d*x)^(7/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 11, (2*(a^2 - b^2)*(25*a^2*A + 8*A*b^2 - 14*a*b*B + 35*a^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(105*a^3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^3 + 63*a^3*B - 14*a*b^2*B + a^2*b*(19*A + 35*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(105*a^3*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(4*A*b^2 - 7*a*b*B - 5*a^2*(5*A + 7*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*a^2*d) + (2*(A*b + 7*a*B)*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(35*a*d) + (2*A*cos(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 10, (-2*(a^2 - b^2)*(2*A*b - 5*a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(15*a^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (2*(2*A*b^2 - 5*a*b*B - 3*a^2*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(A*b + 5*a*B)*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a*d) + (2*A*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 13, (-2*(A*b^2 - a^2*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(3*a*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*b*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(A*b + 3*a*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*A*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 13, ((2*a*B + b*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((2*b*B + a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((2*A - C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(d*sqrt((b + a*cos(c + d*x))/(a + b))) + (C*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 14, ((8*a*A + 4*b*B + 3*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((8*A*b^2 + 4*a*b*B - a^2*C + 4*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(4*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((4*b*B + a*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(4*b*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (C*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d*cos(c + d*x)^(3/2)) + ((4*b*B + a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*b*d*sqrt(cos(c + d*x)))]
    @test_int [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 15, ((24*A*b^2 + 18*a*b*B - a^2*C + 16*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(24*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((2*a^2*b*B - 8*b^3*B - a^3*C - 4*a*b^2*(2*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(8*b^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(24*b^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (C*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d*cos(c + d*x)^(5/2)) + ((6*b*B + a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*b*d*cos(c + d*x)^(3/2)) + ((24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*b^2*d*sqrt(cos(c + d*x)))]

    @test_int [cos(c + d*x)^(9/2)*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 12, (2*(a^2 - b^2)*(8*A*b^3 + 75*a^3*B - 18*a*b^2*B + a^2*(39*A*b + 63*b*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(315*a^3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B + 21*a^4*(7*A + 9*C) + 3*a^2*b^2*(11*A + 21*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(315*a^3*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(4*A*b^3 - 75*a^3*B - 9*a*b^2*B - 2*a^2*b*(44*A + 63*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a^2*d) + (2*(3*A*b^2 + 72*a*b*B + 7*a^2*(7*A + 9*C))*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a*d) + (2*(A*b + 3*a*B)*cos(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(21*d) + (2*A*cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 11, (2*(a^2 - b^2)*(25*a^2*A - 6*A*b^2 + 21*a*b*B + 35*a^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(105*a^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (2*(6*A*b^3 - 63*a^3*B - 21*a*b^2*B - 2*a^2*b*(41*A + 70*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(105*a^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(3*A*b^2 + 42*a*b*B + 5*a^2*(5*A + 7*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*a*d) + (2*(3*A*b + 7*a*B)*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(35*d) + (2*A*cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 14, (-2*(3*A*b^3 - 5*a^3*B + 5*a*b^2*B - 3*a^2*b*(A + 5*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(15*a*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*b^2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(3*A*b^2 + 20*a*b*B + 3*a^2*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(3*A*b + 5*a*B)*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*d) + (2*A*cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 14, ((6*a*b*B - b^2*(2*A - 3*C) + 2*a^2*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (b*(2*b*B + 3*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((8*A*b + 6*a*B - 3*b*C)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (b*(2*A - 3*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))) + (2*A*sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 14, ((8*a^2*B + 4*b^2*B + a*b*(8*A + 7*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((8*A*b^2 + 12*a*b*B + 3*a^2*C + 4*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((8*a*A - 4*b*B - 5*a*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(4*d*sqrt((b + a*cos(c + d*x))/(a + b))) + ((4*b*B + 3*a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))) + (C*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(2*d*sqrt(cos(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 15, ((42*a*b*B + 8*b^2*(3*A + 2*C) + a^2*(48*A + 17*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(24*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((6*a^2*b*B + 8*b^3*B - a^3*C + 12*a*b^2*(2*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(8*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(24*b*d*sqrt((b + a*cos(c + d*x))/(a + b))) + ((2*b*B + a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)) + ((24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*b*d*sqrt(cos(c + d*x))) + (C*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2))]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 16, ((136*a^2*b*B + 128*b^3*B - 3*a^3*C + 12*a*b^2*(28*A + 19*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(192*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((8*a^3*b*B - 96*a*b^3*B - 3*a^4*C - 24*a^2*b^2*(2*A + C) - 16*b^4*(4*A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(64*b^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((24*a^2*b*B + 128*b^3*B - 9*a^3*C + 12*a*b^2*(20*A + 13*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(192*b^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + ((8*b*B + 3*a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d*cos(c + d*x)^(5/2)) + ((48*A*b^2 + 56*a*b*B + 3*a^2*C + 36*b^2*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(96*b*d*cos(c + d*x)^(3/2)) + ((24*a^2*b*B + 128*b^3*B - 9*a^3*C + 12*a*b^2*(20*A + 13*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*b^2*d*sqrt(cos(c + d*x))) + (C*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d*cos(c + d*x)^(5/2))]

    @test_int [cos(c + d*x)^(11/2)*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 13, (2*(a^2 - b^2)*(40*A*b^4 + 1254*a^3*b*B - 110*a*b^3*B + 75*a^4*(9*A + 11*C) + 15*a^2*b^2*(19*A + 33*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(3465*a^3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B + 15*a^2*b^3*(17*A + 33*C) + 15*a^4*b*(247*A + 319*C))*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3465*a^3*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(20*A*b^4 - 1793*a^3*b*B - 55*a*b^3*B - 75*a^4*(9*A + 11*C) - 5*a^2*b^2*(205*A + 297*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3465*a^2*d) + (2*(15*A*b^3 + 539*a^3*B + 825*a*b^2*B + 5*a^2*b*(229*A + 297*C))*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3465*a*d) + (2*(5*A*b^2 + 44*a*b*B + 3*a^2*(9*A + 11*C))*cos(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(231*d) + (2*(5*A*b + 11*a*B)*cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(99*d) + (2*A*cos(c + d*x)^(9/2)*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(11*d)]
    @test_int [cos(c + d*x)^(9/2)*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 12, (-2*(a^2 - b^2)*(10*A*b^3 - 75*a^3*B - 45*a*b^2*B - 6*a^2*b*(19*A + 28*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(315*a^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (2*(10*A*b^4 - 435*a^3*b*B - 45*a*b^3*B - 21*a^4*(7*A + 9*C) - 3*a^2*b^2*(93*A + 161*C))*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(315*a^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(5*A*b^3 + 75*a^3*B + 135*a*b^2*B + a^2*b*(163*A + 231*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a*d) + (2*(15*A*b^2 + 90*a*b*B + 7*a^2*(7*A + 9*C))*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*d) + (2*(5*A*b + 9*a*B)*cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(63*d) + (2*A*cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 15, (-2*(15*A*b^4 - 56*a^3*b*B + 56*a*b^3*B + 10*a^2*b^2*(A - 7*C) - 5*a^4*(5*A + 7*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(105*a*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*b^3*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(15*A*b^3 + 63*a^3*B + 161*a*b^2*B + 5*a^2*b*(29*A + 49*C))*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(105*a*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(15*A*b^2 + 56*a*b*B + 5*a^2*(5*A + 7*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*d) + (2*(5*A*b + 7*a*B)*cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(35*d) + (2*A*cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 15, ((10*a^3*B + 20*a*b^2*B - b^3*(16*A - 15*C) + 4*a^2*b*(4*A + 15*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(15*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (b^2*(2*b*B + 5*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((70*a*b*B + b^2*(46*A - 15*C) + 6*a^2*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (b*(16*A*b + 10*a*B - 15*b*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))) + (2*(A*b + a*B)*sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d) + (2*A*cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 15, ((48*a^2*b*B + 12*b^3*B + 8*a^3*(A + 3*C) + a*b^2*(16*A + 33*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(12*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (b*(8*A*b^2 + 20*a*b*B + 15*a^2*C + 4*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((24*a^2*B - 12*b^2*B + a*b*(56*A - 27*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(12*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (b*(8*a*A - 12*b*B - 21*a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*d*sqrt(cos(c + d*x))) - (b*(4*A - 3*C)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(6*d*sqrt(cos(c + d*x))) + (2*A*sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2), x, 15, ((48*a^3*B + 66*a*b^2*B + 8*b^3*(3*A + 2*C) + a^2*b*(96*A + 59*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(24*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((30*a^2*b*B + 8*b^3*B + 5*a^3*C + 20*a*b^2*(2*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(8*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((54*a*b*B - a^2*(48*A - 33*C) + 8*b^2*(3*A + 2*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(24*d*sqrt((b + a*cos(c + d*x))/(a + b))) + ((24*A*b^2 + 42*a*b*B + 15*a^2*C + 16*b^2*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d*sqrt(cos(c + d*x))) + ((6*b*B + 5*a*C)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(12*d*sqrt(cos(c + d*x))) + (C*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(cos(c + d*x)), x, 16, ((472*a^2*b*B + 128*b^3*B + 4*a*b^2*(132*A + 89*C) + a^3*(384*A + 133*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(192*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((40*a^3*b*B + 160*a*b^3*B - 5*a^4*C + 120*a^2*b^2*(2*A + C) + 16*b^4*(4*A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(64*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((264*a^2*b*B + 128*b^3*B + 15*a^3*C + 4*a*b^2*(108*A + 71*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(192*b*d*sqrt((b + a*cos(c + d*x))/(a + b))) + ((16*A*b^2 + 24*a*b*B + 5*a^2*C + 12*b^2*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(32*d*cos(c + d*x)^(3/2)) + ((264*a^2*b*B + 128*b^3*B + 15*a^3*C + 4*a*b^2*(108*A + 71*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*b*d*sqrt(cos(c + d*x))) + ((8*b*B + 5*a*C)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(24*d*cos(c + d*x)^(3/2)) + (C*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2))]
    @test_int [((a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/cos(c + d*x)^(3/2), x, 17, ((1330*a^3*b*B + 3560*a*b^3*B - 15*a^4*C + 256*b^4*(5*A + 4*C) + 4*a^2*b^2*(1180*A + 809*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(1920*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((10*a^4*b*B - 240*a^2*b^3*B - 96*b^5*B - 3*a^5*C - 40*a^3*b^2*(2*A + C) - 80*a*b^4*(4*A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(128*b^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 256*b^4*(5*A + 4*C) + 12*a^2*b^2*(220*A + 141*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(1920*b^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + ((80*A*b^2 + 110*a*b*B + 15*a^2*C + 64*b^2*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(240*d*cos(c + d*x)^(5/2)) + ((590*a^2*b*B + 360*b^3*B + 15*a^3*C + 4*a*b^2*(260*A + 193*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(960*b*d*cos(c + d*x)^(3/2)) + ((150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 256*b^4*(5*A + 4*C) + 12*a^2*b^2*(220*A + 141*C))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(1920*b^2*d*sqrt(cos(c + d*x))) + ((2*b*B + a*C)*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(8*d*cos(c + d*x)^(5/2)) + (C*(a + b*sec(c + d*x))^(5/2)*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2))]

    #= ::Subsubsection::Closed:: =#
    #=m<0=#

    @test_int [(cos(c + d*x)^(7/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 11, (2*(48*A*b^4 - 49*a^3*b*B - 56*a*b^3*B + 5*a^4*(5*A + 7*C) + 2*a^2*b^2*(16*A + 35*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(105*a^4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (2*(48*A*b^3 - 63*a^3*B - 56*a*b^2*B + a^2*(44*A*b + 70*b*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(105*a^4*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(24*A*b^2 - 28*a*b*B + 5*a^2*(5*A + 7*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*a^3*d) - (2*(6*A*b - 7*a*B)*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(35*a^2*d) + (2*A*cos(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(7*a*d)]
    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 10, (-2*(8*A*b^3 - 5*a^3*B - 10*a*b^2*B + a^2*b*(7*A + 15*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(15*a^3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^2 - 10*a*b*B + 3*a^2*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a^3*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(4*A*b - 5*a*B)*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a^2*d) + (2*A*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(5*a*d)]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 9, (2*(2*A*b^2 - 3*a*b*B + a^2*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(3*a^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (2*(2*A*b - 3*a*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*A*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*a*d)]
    @test_int [(sqrt(cos(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 12, (-2*(A*b - a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(a*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*A*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(a*d*sqrt((b + a*cos(c + d*x))/(a + b)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))), x, 13, ((2*A + C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((2*b*B - a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (C*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(b*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (C*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(b*d*sqrt(cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))), x, 14, ((4*b*B - a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(4*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((8*A*b^2 - 4*a*b*B + 3*a^2*C + 4*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(4*b^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((4*b*B - 3*a*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(4*b^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (C*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*b*d*cos(c + d*x)^(3/2)) + ((4*b*B - 3*a*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*b^2*d*sqrt(cos(c + d*x)))]

    @test_int [(sqrt(cos(c + d*x))*(a*A + (A*b + a*B)*sec(c + d*x) + b*B*sec(c + d*x)^2))/sqrt(a + b*sec(c + d*x)), x, 13, (2*a*B*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*b*B*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*A*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(d*sqrt((b + a*cos(c + d*x))/(a + b)))]

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 11, -((2*(48*A*b^3 - 5*a^3*B - 40*a*b^2*B + 6*a^2*b*(2*A + 5*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(15*a^4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))) - (2*(48*A*b^4 + 25*a^3*b*B - 40*a*b^3*B - 6*a^2*b^2*(4*A - 5*C) - 3*a^4*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a^4*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(A*b^2 - a*(b*B - a*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(24*A*b^3 + 5*a^3*B - 20*a*b^2*B - a^2*(9*A*b - 15*b*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a^3*(a^2 - b^2)*d) - (2*(6*A*b^2 - 5*a*b*B - a^2*(A - 5*C))*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(5*a^2*(a^2 - b^2)*d)]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 10, (2*(8*A*b^2 - 6*a*b*B + a^2*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(3*a^3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^3 + 3*a^3*B - 6*a*b^2*B - a^2*(5*A*b - 3*b*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^3*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) - (2*(4*A*b^2 - 3*a*b*B - a^2*(A - 3*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*a^2*(a^2 - b^2)*d)]
    @test_int [(sqrt(cos(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(3/2), x, 9, -((2*(2*A*b - a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(a^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))) - (2*(2*A*b^2 - a*b*B - a^2*(A - C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(a^2*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(a*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(3/2)), x, 13, (2*A*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(a*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(a*b*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(b*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)), x, 14, (C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((2*b*B - 3*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(b^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(b^2*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(b*(a^2 - b^2)*d*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(b^2*(a^2 - b^2)*d*sqrt(cos(c + d*x)))]

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 12, (2*(128*A*b^5 + 5*a^5*B + 80*a^3*b^2*B - 80*a*b^4*B - 4*a^2*b^3*(29*A - 10*C) - a^4*b*(17*A + 45*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(15*a^5*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(128*A*b^6 - 40*a^5*b*B + 140*a^3*b^3*B - 80*a*b^5*B + 5*a^4*b^2*(11*A - 15*C) - 4*a^2*b^4*(53*A - 10*C) + 3*a^6*(3*A + 5*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(15*a^5*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(A*b^2 - a*(b*B - a*C))*cos(c + d*x)^(3/2)*sin(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (2*(8*A*b^4 + 9*a^3*b*B - 5*a*b^3*B - 2*a^2*b^2*(6*A - C) - 6*a^4*C)*cos(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x))) - (2*(64*A*b^5 - 5*a^5*B + 65*a^3*b^2*B - 40*a*b^4*B + 2*a^4*b*(7*A - 20*C) - 2*a^2*b^3*(49*A - 10*C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a^4*(a^2 - b^2)^2*d) + (2*(48*A*b^4 + 50*a^3*b*B - 30*a*b^3*B + a^4*(3*A - 35*C) - a^2*b^2*(71*A - 15*C))*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*a^3*(a^2 - b^2)^2*d)]
    @test_int [(cos(c + d*x)^(3/2)*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 11, -((2*(16*A*b^4 + 9*a^3*b*B - 8*a*b^3*B - 2*a^2*b^2*(8*A - C) - a^4*(A + 3*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(3*a^4*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))) - (2*(16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 2*a^2*b^3*(14*A - C) + a^4*(8*A*b - 6*b*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^4*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(A*b^2 - a*(b*B - a*C))*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*(10*a^2*A*b^2 - 6*A*b^4 - 7*a^3*b*B + 3*a*b^3*B + 4*a^4*C)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B + a^4*(A - 5*C) - a^2*b^2*(13*A - C))*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*a^3*(a^2 - b^2)^2*d)]
    @test_int [(sqrt(cos(c + d*x))*(A + B*sec(c + d*x) + C*sec(c + d*x)^2))/(a + b*sec(c + d*x))^(5/2), x, 10, (2*(8*A*b^3 + 3*a^3*B - 2*a*b^2*B - a^2*b*(9*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(3*a^3*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B + 3*a^4*(A - C) - a^2*b^2*(15*A + C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^3*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(3*a*(a^2 - b^2)*d*sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(3/2)) - (2*(4*A*b^4 + 5*a^3*b*B - a*b^3*B - 2*a^4*C - 2*a^2*b^2*(4*A + C))*sin(c + d*x))/(3*a^2*(a^2 - b^2)^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(5/2)), x, 10, -((2*(2*A*b^2 + a*b*B - a^2*(3*A + C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(3*a^2*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))) - (2*(2*A*b^3 + 3*a^3*B + a*b^2*B - 2*a^2*b*(3*A + 2*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a^2*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(3*b*(a^2 - b^2)*d*sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(3/2)) + (2*(A*b^4 + 2*a^3*b*B + 2*a*b^3*B + a^4*C - 5*a^2*b^2*(A + C))*sin(c + d*x))/(3*a*b*(a^2 - b^2)^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(5/2)), x, 14, -((2*(A*b^2 - a*(b*B - a*C))*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(3*a*b*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))) + (2*C*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(b^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (2*(A*b^4 - 4*a*b^3*B - 3*a^4*C + a^2*b^2*(3*A + 7*C))*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a*b^2*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(3*b*(a^2 - b^2)*d*cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)) + (2*(A*b^4 - 4*a*b^3*B - 3*a^4*C + a^2*b^2*(3*A + 7*C))*sin(c + d*x))/(3*b^2*(a^2 - b^2)^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x) + C*sec(c + d*x)^2)/(cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(5/2)), x, 15, ((2*A*b^2 - 2*a*b*B + 5*a^2*C - 3*b^2*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((1/2)*(c + d*x), (2*a)/(a + b)))/(3*b^2*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((2*b*B - 5*a*C)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (1/2)*(c + d*x), (2*a)/(a + b)))/(b^3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*b^3*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(A*b^2 - a*(b*B - a*C))*sin(c + d*x))/(3*b*(a^2 - b^2)*d*cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(3/2)) + (2*(3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 5*a^4*C + a^2*b^2*(A + 9*C))*sin(c + d*x))/(3*b^2*(a^2 - b^2)^2*d*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))) - ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*b^3*(a^2 - b^2)^2*d*sqrt(cos(c + d*x)))]
    end

test/4 Trig functions/4.5 Secant/4.5.4.2 (a+b sec)^m (d sec)^n (A+B sec+C sec^2).jl