text:
@testset "4.5.3.1 (a+b sec)^m (d sec)^n (A+B sec)" begin
    (A, B, a, b, c, d, e, f, m, n, x, ) = @variables A B a b c d e f 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))=#

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

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

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

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

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

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

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

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(A+B*sec(c+d*x))*(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)), x, 6, (3*A*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*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))]
    @test_int [sec(c + d*x)*(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x)), x, 6, (3*A*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*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))]
    @test_int [(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x)), x, 5, -((3*A*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*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))]
    @test_int [cos(c + d*x)*(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x)), x, 6, -((3*A*b^2*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*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))]
    @test_int [cos(c + d*x)^2*(b*sec(c + d*x))^(2/3)*(A + B*sec(c + d*x)), x, 6, -((3*A*b^3*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*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))]

    @test_int [sec(c + d*x)^2*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x)), x, 6, (3*A*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*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))]
    @test_int [sec(c + d*x)*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x)), x, 6, (3*A*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*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))]
    @test_int [(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x)), x, 5, (3*A*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*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))]
    @test_int [cos(c + d*x)*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x)), x, 6, -((3*A*b^2*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*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))]
    @test_int [cos(c + d*x)^2*(b*sec(c + d*x))^(4/3)*(A + B*sec(c + d*x)), x, 6, -((3*A*b^3*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))]

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

    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x)))/(b*sec(c + d*x))^(2/3), x, 6, (3*A*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*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))]
    @test_int [(sec(c + d*x)*(A + B*sec(c + d*x)))/(b*sec(c + d*x))^(2/3), x, 6, -((3*A*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*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))]
    @test_int [(A + B*sec(c + d*x))/(b*sec(c + d*x))^(2/3), x, 5, -((3*A*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*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))]
    @test_int [(sec(c + d*x)*(A + B*sec(c + d*x)))/(b*sec(c + d*x))^(2/3), x, 6, -((3*A*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*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))]
    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x)))/(b*sec(c + d*x))^(2/3), x, 6, (3*A*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*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))]

    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x)))/(b*sec(c + d*x))^(4/3), x, 6, -((3*A*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*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))]
    @test_int [(sec(c + d*x)*(A + B*sec(c + d*x)))/(b*sec(c + d*x))^(4/3), x, 6, -((3*A*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*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))]
    @test_int [(A + B*sec(c + d*x))/(b*sec(c + d*x))^(4/3), x, 5, -((3*A*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*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))]
    @test_int [(sec(c + d*x)*(A + B*sec(c + d*x)))/(b*sec(c + d*x))^(4/3), x, 6, -((3*A*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*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))]
    @test_int [(sec(c + d*x)^2*(A + B*sec(c + d*x)))/(b*sec(c + d*x))^(4/3), x, 6, -((3*A*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*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))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(A+B*sec(c+d*x))*(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)), x, 6, (3*A*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*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)), x, 6, -((3*A*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)*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)), x, 6, -((3*A*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)*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)))/(b*sec(c + d*x))^(1/3), x, 6, -((3*A*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)*(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)))/(b*sec(c + d*x))^(2/3), x, 6, -((3*A*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)*(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)))/(b*sec(c + d*x))^(4/3), x, 6, -((3*A*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 - 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))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*sec(c+d*x)^m*(A+B*sec(c+d*x))*(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)), x, 6, -((A*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)*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)), x, 6, (A*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)) + (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))]
    @test_int [sec(c + d*x)*(b*sec(c + d*x))^n*(A + B*sec(c + d*x)), x, 6, (A*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)) + (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))]
    @test_int [(b*sec(c + d*x))^n*(A + B*sec(c + d*x)), x, 5, -((A*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*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))]
    @test_int [cos(c + d*x)*(b*sec(c + d*x))^n*(A + B*sec(c + d*x)), x, 6, -((A*b^2*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*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))]
    @test_int [cos(c + d*x)^2*(b*sec(c + d*x))^n*(A + B*sec(c + d*x)), x, 6, -((A*b^3*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^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))]

    @test_int [sec(c + d*x)^(3/2)*(b*sec(c + d*x))^n*(A + B*sec(c + d*x)), x, 6, (2*A*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*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)), x, 6, -((2*A*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*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)))/sqrt(sec(c + d*x)), x, 6, -((2*A*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*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)))/sec(c + d*x)^(3/2), x, 6, -((2*A*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*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))]

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

    #= ::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))=#

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

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

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

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

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

    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 14, (7*a^4*(8*A + 7*B)*atanh(sin(c + d*x)))/(16*d) + (4*a^4*(8*A + 7*B)*tan(c + d*x))/(5*d) + (27*a^4*(8*A + 7*B)*sec(c + d*x)*tan(c + d*x))/(80*d) + (a^4*(8*A + 7*B)*sec(c + d*x)^3*tan(c + d*x))/(40*d) + ((6*A - B)*(a + a*sec(c + d*x))^4*tan(c + d*x))/(30*d) + (B*(a + a*sec(c + d*x))^5*tan(c + d*x))/(6*a*d) + (2*a^4*(8*A + 7*B)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 13, (7*a^4*(5*A + 4*B)*atanh(sin(c + d*x)))/(8*d) + (8*a^4*(5*A + 4*B)*tan(c + d*x))/(5*d) + (27*a^4*(5*A + 4*B)*sec(c + d*x)*tan(c + d*x))/(40*d) + (a^4*(5*A + 4*B)*sec(c + d*x)^3*tan(c + d*x))/(20*d) + (B*(a + a*sec(c + d*x))^4*tan(c + d*x))/(5*d) + (4*a^4*(5*A + 4*B)*tan(c + d*x)^3)/(15*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 7, a^4*A*x + (a^4*(48*A + 35*B)*atanh(sin(c + d*x)))/(8*d) + (5*a^4*(8*A + 7*B)*tan(c + d*x))/(8*d) + (a*B*(a + a*sec(c + d*x))^3*tan(c + d*x))/(4*d) + ((4*A + 7*B)*(a^2 + a^2*sec(c + d*x))^2*tan(c + d*x))/(12*d) + ((32*A + 35*B)*(a^4 + a^4*sec(c + d*x))*tan(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 6, a^4*(4*A + B)*x + (a^4*(13*A + 12*B)*atanh(sin(c + d*x)))/(2*d) - (5*a^4*(A + 2*B)*sin(c + d*x))/(2*d) + (a*B*(a + a*sec(c + d*x))^3*sin(c + d*x))/(3*d) + ((A + 2*B)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*d) + ((9*A + 11*B)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 6, (1/2)*a^4*(13*A + 8*B)*x + (a^4*(8*A + 13*B)*atanh(sin(c + d*x)))/(2*d) + (5*a^4*(A - B)*sin(c + d*x))/(2*d) + (a*A*cos(c + d*x)*(a + a*sec(c + d*x))^3*sin(c + d*x))/(2*d) - ((A - B)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*d) + ((A + 6*B)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 6, (1/2)*a^4*(12*A + 13*B)*x + (a^4*(A + 4*B)*atanh(sin(c + d*x)))/d + (5*a^4*(2*A + B)*sin(c + d*x))/(2*d) + (a*A*cos(c + d*x)^2*(a + a*sec(c + d*x))^3*sin(c + d*x))/(3*d) + ((2*A + B)*cos(c + d*x)*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(2*d) - ((8*A - 3*B)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 6, (1/8)*a^4*(35*A + 48*B)*x + (a^4*B*atanh(sin(c + d*x)))/d + (5*a^4*(7*A + 8*B)*sin(c + d*x))/(8*d) + (a*A*cos(c + d*x)^3*(a + a*sec(c + d*x))^3*sin(c + d*x))/(4*d) + ((7*A + 4*B)*cos(c + d*x)^2*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(12*d) + ((35*A + 32*B)*cos(c + d*x)*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(24*d)]
    @test_int [cos(c + d*x)^5*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 11, (7/8)*a^4*(4*A + 5*B)*x + (8*a^4*(4*A + 5*B)*sin(c + d*x))/(5*d) + (27*a^4*(4*A + 5*B)*cos(c + d*x)*sin(c + d*x))/(40*d) + (a^4*(4*A + 5*B)*cos(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) - (4*a^4*(4*A + 5*B)*sin(c + d*x)^3)/(15*d)]
    @test_int [cos(c + d*x)^6*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 8, (7/16)*a^4*(7*A + 8*B)*x + (a^4*(72*A + 83*B)*sin(c + d*x))/(15*d) + (7*a^4*(7*A + 8*B)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^4*(159*A + 176*B)*cos(c + d*x)^2*sin(c + d*x))/(120*d) + (a*A*cos(c + d*x)^5*(a + a*sec(c + d*x))^3*sin(c + d*x))/(6*d) + ((3*A + 2*B)*cos(c + d*x)^4*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(10*d) + ((73*A + 72*B)*cos(c + d*x)^3*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(120*d)]
    @test_int [cos(c + d*x)^7*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^4, x, 9, (1/16)*a^4*(44*A + 49*B)*x + (a^4*(227*A + 252*B)*sin(c + d*x))/(35*d) + (a^4*(44*A + 49*B)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^4*(276*A + 301*B)*cos(c + d*x)^3*sin(c + d*x))/(280*d) + (a*A*cos(c + d*x)^6*(a + a*sec(c + d*x))^3*sin(c + d*x))/(7*d) + ((10*A + 7*B)*cos(c + d*x)^5*(a^2 + a^2*sec(c + d*x))^2*sin(c + d*x))/(42*d) + (7*(A + B)*cos(c + d*x)^4*(a^4 + a^4*sec(c + d*x))*sin(c + d*x))/(15*d) - (a^4*(227*A + 252*B)*sin(c + d*x)^3)/(105*d)]

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

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x))/(a + a*sec(c + d*x)), x, 6, (3*(A - B)*atanh(sin(c + d*x)))/(2*a*d) - ((3*A - 4*B)*tan(c + d*x))/(a*d) + (3*(A - B)*sec(c + d*x)*tan(c + d*x))/(2*a*d) + ((A - B)*sec(c + d*x)^3*tan(c + d*x))/(d*(a + a*sec(c + d*x))) - ((3*A - 4*B)*tan(c + d*x)^3)/(3*a*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x))/(a + a*sec(c + d*x)), x, 6, -(((2*A - 3*B)*atanh(sin(c + d*x)))/(2*a*d)) + (2*(A - B)*tan(c + d*x))/(a*d) - ((2*A - 3*B)*sec(c + d*x)*tan(c + d*x))/(2*a*d) + ((A - B)*sec(c + d*x)^2*tan(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/(a + a*sec(c + d*x)), x, 5, ((A - B)*atanh(sin(c + d*x)))/(a*d) + (B*tan(c + d*x))/(a*d) - ((A - B)*tan(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))/(a + a*sec(c + d*x)), x, 3, (B*atanh(sin(c + d*x)))/(a*d) + ((A - B)*tan(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))/(a + a*sec(c + d*x)), x, 2, (A*x)/a - ((A - B)*tan(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x))/(a + a*sec(c + d*x)), x, 4, -(((A - B)*x)/a) + ((2*A - B)*sin(c + d*x))/(a*d) - ((A - B)*sin(c + d*x))/(d*(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x))/(a + a*sec(c + d*x)), x, 5, ((3*A - 2*B)*x)/(2*a) - (2*(A - B)*sin(c + d*x))/(a*d) + ((3*A - 2*B)*cos(c + d*x)*sin(c + d*x))/(2*a*d) - ((A - B)*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))/(a + a*sec(c + d*x)), x, 6, -((3*(A - B)*x)/(2*a)) + ((4*A - 3*B)*sin(c + d*x))/(a*d) - (3*(A - B)*cos(c + d*x)*sin(c + d*x))/(2*a*d) - ((A - B)*cos(c + d*x)^2*sin(c + d*x))/(d*(a + a*sec(c + d*x))) - ((4*A - 3*B)*sin(c + d*x)^3)/(3*a*d)]

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

    @test_int [sec(c + d*x)^5*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^3, x, 8, -(((6*A - 13*B)*atanh(sin(c + d*x)))/(2*a^3*d)) + (8*(9*A - 19*B)*tan(c + d*x))/(15*a^3*d) - ((6*A - 13*B)*sec(c + d*x)*tan(c + d*x))/(2*a^3*d) + ((A - B)*sec(c + d*x)^4*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((6*A - 11*B)*sec(c + d*x)^3*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + (4*(9*A - 19*B)*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)^4*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^3, x, 7, ((A - 3*B)*atanh(sin(c + d*x)))/(a^3*d) - ((7*A - 27*B)*tan(c + d*x))/(15*a^3*d) + ((A - B)*sec(c + d*x)^3*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((4*A - 9*B)*sec(c + d*x)^2*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((A - 3*B)*tan(c + d*x))/(d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^3, x, 5, (B*atanh(sin(c + d*x)))/(a^3*d) + ((A - B)*sec(c + d*x)^2*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((2*A - 7*B)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((4*A - 29*B)*tan(c + d*x))/(15*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^3, x, 3, -(((A - B)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3)) + ((3*A - 8*B)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((3*A + 7*B)*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))/(a + a*sec(c + d*x))^3, x, 3, ((A - B)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((2*A + 3*B)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((2*A + 3*B)*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))/(a + a*sec(c + d*x))^3, x, 4, (A*x)/a^3 - ((A - B)*tan(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((7*A - 2*B)*tan(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - (2*(11*A - B)*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))/(a + a*sec(c + d*x))^3, x, 6, -(((3*A - B)*x)/a^3) + (2*(36*A - 11*B)*sin(c + d*x))/(15*a^3*d) - ((A - B)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((9*A - 4*B)*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))/(a + a*sec(c + d*x))^3, x, 7, ((13*A - 6*B)*x)/(2*a^3) - (8*(19*A - 9*B)*sin(c + d*x))/(15*a^3*d) + ((13*A - 6*B)*cos(c + d*x)*sin(c + d*x))/(2*a^3*d) - ((A - B)*cos(c + d*x)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((11*A - 6*B)*cos(c + d*x)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - (4*(19*A - 9*B)*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))/(a + a*sec(c + d*x))^3, x, 8, -(((23*A - 13*B)*x)/(2*a^3)) + (4*(34*A - 19*B)*sin(c + d*x))/(5*a^3*d) - ((23*A - 13*B)*cos(c + d*x)*sin(c + d*x))/(2*a^3*d) - ((A - B)*cos(c + d*x)^2*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((13*A - 8*B)*cos(c + d*x)^2*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((23*A - 13*B)*cos(c + d*x)^2*sin(c + d*x))/(3*d*(a^3 + a^3*sec(c + d*x))) - (4*(34*A - 19*B)*sin(c + d*x)^3)/(15*a^3*d)]

    @test_int [sec(c + d*x)^6*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^4, x, 9, -(((8*A - 21*B)*atanh(sin(c + d*x)))/(2*a^4*d)) + (8*(83*A - 216*B)*tan(c + d*x))/(105*a^4*d) - ((8*A - 21*B)*sec(c + d*x)*tan(c + d*x))/(2*a^4*d) + ((52*A - 129*B)*sec(c + d*x)^3*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) + (4*(83*A - 216*B)*sec(c + d*x)^2*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) + ((A - B)*sec(c + d*x)^5*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) + ((A - 2*B)*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)^5*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^4, x, 8, ((A - 4*B)*atanh(sin(c + d*x)))/(a^4*d) - ((55*A - 244*B)*tan(c + d*x))/(105*a^4*d) + ((25*A - 88*B)*sec(c + d*x)^2*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - ((A - 4*B)*tan(c + d*x))/(a^4*d*(1 + sec(c + d*x))) + ((A - B)*sec(c + d*x)^4*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) + ((5*A - 12*B)*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)^4*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^4, x, 6, (B*atanh(sin(c + d*x)))/(a^4*d) - ((6*A - 55*B)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) + ((12*A - 215*B)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) + ((A - B)*sec(c + d*x)^3*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) + ((3*A - 10*B)*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)^3*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^4, x, 4, -(((A - B)*sec(c + d*x)^3*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4)) + ((4*A + 3*B)*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3) - (8*(4*A + 3*B)*tan(c + d*x))/(105*d*(a^2 + a^2*sec(c + d*x))^2) + ((4*A + 3*B)*tan(c + d*x))/(15*d*(a^4 + a^4*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^4, x, 4, -(((A - B)*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4)) + ((4*A - 11*B)*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3) + ((8*A + 13*B)*tan(c + d*x))/(105*d*(a^2 + a^2*sec(c + d*x))^2) + ((8*A + 13*B)*tan(c + d*x))/(105*d*(a^4 + a^4*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^4, x, 4, ((A - B)*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) + ((3*A + 4*B)*tan(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3) + (2*(3*A + 4*B)*tan(c + d*x))/(105*d*(a^2 + a^2*sec(c + d*x))^2) + (2*(3*A + 4*B)*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))/(a + a*sec(c + d*x))^4, x, 5, (A*x)/a^4 - ((55*A - 6*B)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (2*(80*A - 3*B)*tan(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A - B)*tan(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - ((10*A - 3*B)*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))/(a + a*sec(c + d*x))^4, x, 7, -(((4*A - B)*x)/a^4) + (8*(83*A - 20*B)*sin(c + d*x))/(105*a^4*d) - ((88*A - 25*B)*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)*sin(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - ((12*A - 5*B)*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))/(a + a*sec(c + d*x))^4, x, 8, ((21*A - 8*B)*x)/(2*a^4) - (8*(216*A - 83*B)*sin(c + d*x))/(105*a^4*d) + ((21*A - 8*B)*cos(c + d*x)*sin(c + d*x))/(2*a^4*d) - ((129*A - 52*B)*cos(c + d*x)*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - (4*(216*A - 83*B)*cos(c + d*x)*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))) - ((A - B)*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)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^4, x, 9, -(((44*A - 21*B)*x)/(2*a^4)) + (8*(227*A - 108*B)*sin(c + d*x))/(35*a^4*d) - ((44*A - 21*B)*cos(c + d*x)*sin(c + d*x))/(2*a^4*d) - ((178*A - 87*B)*cos(c + d*x)^2*sin(c + d*x))/(105*a^4*d*(1 + sec(c + d*x))^2) - ((44*A - 21*B)*cos(c + d*x)^2*sin(c + d*x))/(3*a^4*d*(1 + sec(c + d*x))) - ((A - B)*cos(c + d*x)^2*sin(c + d*x))/(7*d*(a + a*sec(c + d*x))^4) - ((16*A - 9*B)*cos(c + d*x)^2*sin(c + d*x))/(35*a*d*(a + a*sec(c + d*x))^3) - (8*(227*A - 108*B)*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+B*sec(e+f*x))=#

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

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(1/2), x, 5, (4*a*(9*A + 8*B)*tan(c + d*x))/(45*d*sqrt(a + a*sec(c + d*x))) + (2*a*(9*A + 8*B)*sec(c + d*x)^3*tan(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) + (2*a*B*sec(c + d*x)^4*tan(c + d*x))/(9*d*sqrt(a + a*sec(c + d*x))) - (8*(9*A + 8*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (4*(9*A + 8*B)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*a*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(1/2), x, 4, (2*a*(7*A + 6*B)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a*B*sec(c + d*x)^3*tan(c + d*x))/(7*d*sqrt(a + a*sec(c + d*x))) - (4*(7*A + 6*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*(7*A + 6*B)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*a*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(1/2), x, 3, (2*a*(5*A + 7*B)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*(5*A - 2*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*B*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*a*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(1/2), x, 2, (2*a*(3*A + B)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*B*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(1/2), x, 4, (2*sqrt(a)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a*B*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))*(a + a*sec(c + d*x))^(1/2), x, 3, (sqrt(a)*(A + 2*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a*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))*(a + a*sec(c + d*x))^(1/2), x, 4, (sqrt(a)*(3*A + 4*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a*(3*A + 4*B)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (a*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))*(a + a*sec(c + d*x))^(1/2), x, 5, (sqrt(a)*(5*A + 6*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a*(5*A + 6*B)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a*(5*A + 6*B)*cos(c + d*x)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (a*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))*(a + a*sec(c + d*x))^(1/2), x, 6, (5*sqrt(a)*(7*A + 8*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (5*a*(7*A + 8*B)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (5*a*(7*A + 8*B)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a*(7*A + 8*B)*cos(c + d*x)^2*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a*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)^3*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(3/2), x, 5, (2*a^2*(39*A + 34*B)*tan(c + d*x))/(45*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(9*A + 10*B)*sec(c + d*x)^3*tan(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) - (4*a*(39*A + 34*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*a*B*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(9*d) + (2*(39*A + 34*B)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(3/2), x, 4, (8*a^2*(21*A + 19*B)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(21*A + 19*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*(7*A - 2*B)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*B*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*a*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(3/2), x, 3, (8*a^2*(5*A + 3*B)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a*(5*A + 3*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*B*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(3/2), x, 5, (2*a^(3/2)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^2*(3*A + 4*B)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*a*B*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(3/2), x, 4, (a^(3/2)*(3*A + 2*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a^2*(A - 2*B)*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (2*a*B*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(3/2), x, 4, (a^(3/2)*(7*A + 12*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^2*(5*A + 4*B)*sin(c + d*x))/(4*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))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(3/2), x, 5, (a^(3/2)*(11*A + 14*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^2*(11*A + 14*B)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a^2*(7*A + 6*B)*cos(c + d*x)*sin(c + d*x))/(12*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))/(3*d)]
    @test_int [cos(c + d*x)^4*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(3/2), x, 6, (a^(3/2)*(75*A + 88*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^2*(75*A + 88*B)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^2*(75*A + 88*B)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a^2*(9*A + 8*B)*cos(c + d*x)^2*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a*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 + B*sec(c + d*x))*(a + a*sec(c + d*x))^(5/2), x, 6, (2*a^3*(803*A + 710*B)*tan(c + d*x))/(495*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(209*A + 194*B)*sec(c + d*x)^3*tan(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) - (4*a^2*(803*A + 710*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3465*d) + (2*a^2*(11*A + 14*B)*sec(c + d*x)^3*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(99*d) + (2*a*(803*A + 710*B)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(1155*d) + (2*a*B*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 + B*sec(c + d*x))*(a + a*sec(c + d*x))^(5/2), x, 5, (64*a^3*(15*A + 13*B)*tan(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(15*A + 13*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(315*d) + (2*a*(15*A + 13*B)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(105*d) + (2*(9*A - 2*B)*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*d) + (2*B*(a + a*sec(c + d*x))^(7/2)*tan(c + d*x))/(9*a*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(5/2), x, 4, (64*a^3*(7*A + 5*B)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(7*A + 5*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*a*(7*A + 5*B)*(a + a*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*B*(a + a*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(5/2), x, 6, (2*a^(5/2)*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^3*(35*A + 32*B)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(5*A + 8*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*a*B*(a + a*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))*(a + a*sec(c + d*x))^(5/2), x, 5, (a^(5/2)*(5*A + 2*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d - (a^3*(3*A + 14*B)*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(A + 2*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/d + (2*a*B*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^2*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(5/2), x, 5, (a^(5/2)*(19*A + 20*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^3*(9*A - 4*B)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) - (a^2*(A - 4*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d) + (a*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 + B*sec(c + d*x))*(a + a*sec(c + d*x))^(5/2), x, 5, (a^(5/2)*(25*A + 38*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^3*(49*A + 54*B)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a^2*(3*A + 2*B)*cos(c + d*x)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*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 + B*sec(c + d*x))*(a + a*sec(c + d*x))^(5/2), x, 6, (a^(5/2)*(163*A + 200*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^3*(163*A + 200*B)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^3*(95*A + 104*B)*cos(c + d*x)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a^2*(11*A + 8*B)*cos(c + d*x)^2*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d) + (a*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 + B*sec(c + d*x))*(a + a*sec(c + d*x))^(5/2), x, 7, (a^(5/2)*(283*A + 326*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^3*(283*A + 326*B)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^3*(283*A + 326*B)*cos(c + d*x)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^3*(157*A + 170*B)*cos(c + d*x)^2*sin(c + d*x))/(240*d*sqrt(a + a*sec(c + d*x))) + (a^2*(13*A + 10*B)*cos(c + d*x)^3*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d) + (a*A*cos(c + d*x)^4*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*d)]

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

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(1/2), x, 6, -((sqrt(2)*(A - B)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (4*(49*A - 37*B)*tan(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*(7*A - B)*sec(c + d*x)^2*tan(c + d*x))/(35*d*sqrt(a + a*sec(c + d*x))) + (2*B*sec(c + d*x)^3*tan(c + d*x))/(7*d*sqrt(a + a*sec(c + d*x))) - (2*(7*A - 31*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(105*a*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(1/2), x, 5, (sqrt(2)*(A - B)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) - (4*(5*A - 7*B)*tan(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*B*sec(c + d*x)^2*tan(c + d*x))/(5*d*sqrt(a + a*sec(c + d*x))) + (2*(5*A - B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(15*a*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(1/2), x, 4, -((sqrt(2)*(A - B)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d)) + (2*(3*A - 2*B)*tan(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*B*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(3*a*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(1/2), x, 3, (sqrt(2)*(A - B)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + (2*B*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(1/2), x, 5, (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) - (sqrt(2)*(A - B)*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)^1*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(1/2), 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)*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))/(a + a*sec(c + d*x))^(1/2), x, 7, ((7*A - 4*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*sqrt(a)*d) - (sqrt(2)*(A - B)*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))/(a + a*sec(c + d*x))^(1/2), x, 8, -(((9*A - 14*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*sqrt(a)*d)) + (sqrt(2)*(A - B)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(a)*d) + ((7*A - 2*B)*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 [sec(c + d*x)^4*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(3/2), x, 6, ((11*A - 15*B)*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)*sec(c + d*x)^3*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((65*A - 93*B)*tan(c + d*x))/(15*a*d*sqrt(a + a*sec(c + d*x))) - ((5*A - 9*B)*sec(c + d*x)^2*tan(c + d*x))/(10*a*d*sqrt(a + a*sec(c + d*x))) + ((35*A - 39*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(30*a^2*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(3/2), x, 5, -(((7*A - 11*B)*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)*sec(c + d*x)^2*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((9*A - 13*B)*tan(c + d*x))/(3*a*d*sqrt(a + a*sec(c + d*x))) - ((3*A - 7*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(6*a^2*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(3/2), x, 4, ((3*A - 7*B)*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)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + (2*B*tan(c + d*x))/(a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(3/2), x, 3, ((A + 3*B)*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)*tan(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))/(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)*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)*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))/(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)*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)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((3*A - B)*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))/(a + a*sec(c + d*x))^(3/2), x, 8, ((19*A - 12*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*a^(3/2)*d) - ((13*A - 9*B)*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)*cos(c + d*x)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((7*A - 6*B)*sin(c + d*x))/(4*a*d*sqrt(a + a*sec(c + d*x))) + ((2*A - B)*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))/(a + a*sec(c + d*x))^(3/2), x, 9, -(((47*A - 38*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*a^(3/2)*d)) + ((17*A - 13*B)*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)*cos(c + d*x)^2*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + (7*(3*A - 2*B)*sin(c + d*x))/(8*a*d*sqrt(a + a*sec(c + d*x))) - ((13*A - 12*B)*cos(c + d*x)*sin(c + d*x))/(12*a*d*sqrt(a + a*sec(c + d*x))) + ((5*A - 3*B)*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))/(a + a*sec(c + d*x))^(5/2), x, 6, -(((75*A - 163*B)*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)*sec(c + d*x)^3*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((9*A - 17*B)*sec(c + d*x)^2*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((93*A - 197*B)*tan(c + d*x))/(24*a^2*d*sqrt(a + a*sec(c + d*x))) - ((39*A - 95*B)*sqrt(a + a*sec(c + d*x))*tan(c + d*x))/(48*a^3*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(5/2), x, 5, ((19*A - 75*B)*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)*sec(c + d*x)^2*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((5*A - 13*B)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((A - 9*B)*tan(c + d*x))/(4*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(5/2), x, 4, ((5*A + 19*B)*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)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((5*A - 13*B)*tan(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(5/2), x, 4, ((3*A + 5*B)*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)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((3*A + 5*B)*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))/(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)*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)*tan(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((11*A - 3*B)*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))/(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)*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)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((15*A - 7*B)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((35*A - 11*B)*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))/(a + a*sec(c + d*x))^(5/2), x, 9, ((39*A - 20*B)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*a^(5/2)*d) - ((219*A - 115*B)*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)*cos(c + d*x)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((19*A - 11*B)*cos(c + d*x)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - (7*(9*A - 5*B)*sin(c + d*x))/(16*a^2*d*sqrt(a + a*sec(c + d*x))) + ((31*A - 15*B)*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*sec(e+f*x)^n*(a - a*sec(e+f*x))^(m/2)*(A+A*sec(e+f*x))=#

    @test_int [sec(c + d*x)^0*(A + A*sec(c + d*x))/(a - a*sec(c + d*x))^(1/2), x, 5, (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(sqrt(a)*d) - (2*sqrt(2)*A*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)^1*(A + A*sec(c + d*x))/(a - a*sec(c + d*x))^(1/2), x, 6, (3*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(sqrt(a)*d) - (2*sqrt(2)*A*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 + A*sec(c + d*x))/(a - a*sec(c + d*x))^(1/2), x, 7, (11*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(4*sqrt(a)*d) - (2*sqrt(2)*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(sqrt(a)*d) + (5*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 + A*sec(c + d*x))/(a - a*sec(c + d*x))^(1/2), x, 8, (23*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(8*sqrt(a)*d) - (2*sqrt(2)*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(sqrt(a)*d) + (9*A*sin(c + d*x))/(8*d*sqrt(a - a*sec(c + d*x))) + (7*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 [sec(c + d*x)^0*(A + A*sec(c + d*x))/(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) - (3*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(sqrt(2)*a^(3/2)*d) - (A*tan(c + d*x))/(d*(a - a*sec(c + d*x))^(3/2)), (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(a^(3/2)*d) - (3*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(sqrt(2)*a^(3/2)*d) + (A*csc((1/2)*(c + d*x))^2*sin(c + d*x))/(2*a*d*sqrt(a - a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + A*sec(c + d*x))/(a - a*sec(c + d*x))^(3/2), x, 7, (5*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(a^(3/2)*d) - (7*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(sqrt(2)*a^(3/2)*d) - (A*sin(c + d*x))/(d*(a - a*sec(c + d*x))^(3/2)) + (2*A*sin(c + d*x))/(a*d*sqrt(a - a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + A*sec(c + d*x))/(a - a*sec(c + d*x))^(3/2), x, 8, (31*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(4*a^(3/2)*d) - (11*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(sqrt(2)*a^(3/2)*d) - (A*cos(c + d*x)*sin(c + d*x))/(d*(a - a*sec(c + d*x))^(3/2)) + (13*A*sin(c + d*x))/(4*a*d*sqrt(a - a*sec(c + d*x))) + (3*A*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 + A*sec(c + d*x))/(a - a*sec(c + d*x))^(3/2), x, 9, (85*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(8*a^(3/2)*d) - (15*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(sqrt(2)*a^(3/2)*d) - (A*cos(c + d*x)^2*sin(c + d*x))/(d*(a - a*sec(c + d*x))^(3/2)) + (35*A*sin(c + d*x))/(8*a*d*sqrt(a - a*sec(c + d*x))) + (25*A*cos(c + d*x)*sin(c + d*x))/(12*a*d*sqrt(a - a*sec(c + d*x))) + (4*A*cos(c + d*x)^2*sin(c + d*x))/(3*a*d*sqrt(a - a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^0*(A + A*sec(c + d*x))/(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) - (23*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(8*sqrt(2)*a^(5/2)*d) - (A*tan(c + d*x))/(2*d*(a - a*sec(c + d*x))^(5/2)) - (7*A*tan(c + d*x))/(8*a*d*(a - a*sec(c + d*x))^(3/2)), (2*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(a^(5/2)*d) - (23*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(8*sqrt(2)*a^(5/2)*d) + (7*A*csc((1/2)*(c + d*x))^2*sin(c + d*x))/(16*a^2*d*sqrt(a - a*sec(c + d*x))) - (A*cos(c + d*x)*csc((1/2)*(c + d*x))^4*sin(c + d*x))/(8*a^2*d*sqrt(a - a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^1*(A + A*sec(c + d*x))/(a - a*sec(c + d*x))^(5/2), x, 8, (7*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(a^(5/2)*d) - (79*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(8*sqrt(2)*a^(5/2)*d) - (A*sin(c + d*x))/(2*d*(a - a*sec(c + d*x))^(5/2)) - (11*A*sin(c + d*x))/(8*a*d*(a - a*sec(c + d*x))^(3/2)) + (23*A*sin(c + d*x))/(8*a^2*d*sqrt(a - a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^2*(A + A*sec(c + d*x))/(a - a*sec(c + d*x))^(5/2), x, 9, (59*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(4*a^(5/2)*d) - (167*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(8*sqrt(2)*a^(5/2)*d) - (A*cos(c + d*x)*sin(c + d*x))/(2*d*(a - a*sec(c + d*x))^(5/2)) - (15*A*cos(c + d*x)*sin(c + d*x))/(8*a*d*(a - a*sec(c + d*x))^(3/2)) + (49*A*sin(c + d*x))/(8*a^2*d*sqrt(a - a*sec(c + d*x))) + (23*A*cos(c + d*x)*sin(c + d*x))/(8*a^2*d*sqrt(a - a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + A*sec(c + d*x))/(a - a*sec(c + d*x))^(5/2), x, 10, (203*A*atan((sqrt(a)*tan(c + d*x))/sqrt(a - a*sec(c + d*x))))/(8*a^(5/2)*d) - (287*A*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a - a*sec(c + d*x)))))/(8*sqrt(2)*a^(5/2)*d) - (A*cos(c + d*x)^2*sin(c + d*x))/(2*d*(a - a*sec(c + d*x))^(5/2)) - (19*A*cos(c + d*x)^2*sin(c + d*x))/(8*a*d*(a - a*sec(c + d*x))^(3/2)) + (21*A*sin(c + d*x))/(2*a^2*d*sqrt(a - a*sec(c + d*x))) + (119*A*cos(c + d*x)*sin(c + d*x))/(24*a^2*d*sqrt(a - a*sec(c + d*x))) + (77*A*cos(c + d*x)^2*sin(c + d*x))/(24*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))=#

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

    @test_int [sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 9, (-6*a*(A + B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (2*a*(7*A + 5*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (6*a*(A + B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a*(7*A + 5*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*a*(A + B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d) + (2*a*B*sec(c + d*x)^(7/2)*sin(c + d*x))/(7*d)]
    @test_int [sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 8, (-2*a*(5*A + 3*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (2*a*(A + B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*(5*A + 3*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a*(A + B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d) + (2*a*B*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 7, (-2*a*(A + B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/d + (2*a*(3*A + B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*(A + B)*sqrt(sec(c + d*x))*sin(c + d*x))/d + (2*a*B*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)))/sqrt(sec(c + d*x)), x, 6, (2*a*(A - B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/d + (2*a*(A + B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/d + (2*a*B*sqrt(sec(c + d*x))*sin(c + d*x))/d]
    @test_int [((a + a*sec(c + d*x))*(A + B*sec(c + d*x)))/sec(c + d*x)^(3/2), x, 6, (2*a*(A + B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/d + (2*a*(A + 3*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a*A*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)))/sec(c + d*x)^(5/2), x, 7, (2*a*(3*A + 5*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (2*a*(A + B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 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)))/sec(c + d*x)^(7/2), x, 8, (6*a*(A + B)*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)*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)*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)), x, 9, (-4*a^2*(4*A + 3*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^2*(7*A + 6*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^2*(4*A + 3*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (4*a^2*(7*A + 6*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*a^2*(7*A + 9*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(35*d) + (2*B*sec(c + d*x)^(5/2)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(7*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)), x, 8, (-4*a^2*(5*A + 4*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^2*(2*A + B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (4*a^2*(5*A + 4*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a^2*(5*A + 7*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(15*d) + (2*B*sec(c + d*x)^(3/2)*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(5*d)]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)))/sqrt(sec(c + d*x)), x, 7, (-4*a^2*B*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/d + (4*a^2*(3*A + 2*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a^2*(3*A + 5*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d) + (2*B*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)))/sec(c + d*x)^(3/2), x, 7, (4*a^2*A*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)*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)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d) + (2*A*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(sec(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)))/sec(c + d*x)^(5/2), x, 7, (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)*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)*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))) + (2*A*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)))/sec(c + d*x)^(7/2), x, 8, (4*a^2*(3*A + 4*B)*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)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a^2*(9*A + 7*B)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)) + (4*a^2*(6*A + 7*B)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*A*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)))/sec(c + d*x)^(9/2), x, 9, (4*a^2*(8*A + 9*B)*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)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a^2*(11*A + 9*B)*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2)) + (4*a^2*(8*A + 9*B)*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (4*a^2*(5*A + 6*B)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*A*(a^2 + a^2*sec(c + d*x))*sin(c + d*x))/(9*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)), x, 10, (-4*a^3*(21*A + 17*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(15*d) + (4*a^3*(13*A + 11*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^3*(21*A + 17*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (4*a^3*(13*A + 11*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (4*a^3*(24*A + 23*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(105*d) + (2*a*B*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2*sin(c + d*x))/(9*d) + (2*(9*A + 13*B)*sec(c + d*x)^(5/2)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(63*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3*(A + B*sec(c + d*x)), x, 9, (-4*a^3*(9*A + 7*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(5*d) + (4*a^3*(21*A + 13*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^3*(9*A + 7*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (4*a^3*(42*A + 41*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(105*d) + (2*a*B*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2*sin(c + d*x))/(7*d) + (2*(7*A + 11*B)*sec(c + d*x)^(3/2)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(35*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x)))/sqrt(sec(c + d*x)), x, 8, (-4*a^3*(5*A + 9*B)*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*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (4*a^3*(20*A + 21*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*a*B*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^2*sin(c + d*x))/(5*d) + (2*(5*A + 9*B)*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)))/sec(c + d*x)^(3/2), x, 8, (4*a^3*(A - B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/d + (20*a^3*(A + B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*d) + (4*a^3*(A + 4*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d) + (2*a*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(3*d*sqrt(sec(c + d*x))) - (2*(A - B)*sqrt(sec(c + d*x))*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x)))/sec(c + d*x)^(5/2), x, 8, (4*a^3*(9*A + 5*B)*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)*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)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*a*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*(9*A + 5*B)*(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)))/sec(c + d*x)^(7/2), x, 8, (4*a^3*(7*A + 9*B)*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)*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)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*a*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*(11*A + 7*B)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x)))/sec(c + d*x)^(9/2), x, 9, (4*a^3*(17*A + 21*B)*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)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(21*d) + (4*a^3*(23*A + 24*B)*sin(c + d*x))/(105*d*sec(c + d*x)^(3/2)) + (4*a^3*(11*A + 13*B)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*a*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*(13*A + 9*B)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^3*(A + B*sec(c + d*x)))/sec(c + d*x)^(11/2), x, 10, (4*a^3*(15*A + 17*B)*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)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(231*d) + (20*a^3*(21*A + 22*B)*sin(c + d*x))/(693*d*sec(c + d*x)^(5/2)) + (4*a^3*(15*A + 17*B)*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (4*a^3*(105*A + 121*B)*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*a*A*(a + a*sec(c + d*x))^2*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2)) + (2*(15*A + 11*B)*(a^3 + a^3*sec(c + d*x))*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2))]

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

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

    @test_int [(sec(c + d*x)^(7/2)*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x))^2, x, 9, -(((4*A - 7*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)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + ((4*A - 7*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(a^2*d) - (5*(A - 2*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*d) + ((4*A - 7*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) + ((A - B)*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)^(5/2)*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x))^2, x, 8, ((A - 4*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d) + ((2*A - 5*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) - ((A - 4*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(a^2*d) + ((2*A - 5*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) + ((A - B)*sec(c + d*x)^(5/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)))/(a + a*sec(c + d*x))^2, x, 7, (B*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d) + ((A + 2*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) - (B*sqrt(sec(c + d*x))*sin(c + d*x))/(a^2*d*(1 + sec(c + d*x))) + ((A - B)*sec(c + d*x)^(3/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)))/(a + a*sec(c + d*x))^2, x, 7, -((A*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d)) + ((2*A + B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + ((2*A + B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) + ((A - B)*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))/(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)*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)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*a^2*d*(1 + sec(c + d*x))) - ((A - B)*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))/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2), x, 8, -(((7*A - 4*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(a^2*d)) + (5*(2*A - B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + (5*(2*A - B)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x))) - ((7*A - 4*B)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x))*(1 + sec(c + d*x))) - ((A - B)*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))/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2), x, 9, (7*(8*A - 5*B)*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)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(3*a^2*d) + (7*(8*A - 5*B)*sin(c + d*x))/(15*a^2*d*sec(c + d*x)^(3/2)) - (5*(3*A - 2*B)*sin(c + d*x))/(3*a^2*d*sqrt(sec(c + d*x))) - ((3*A - 2*B)*sin(c + d*x))/(a^2*d*sec(c + d*x)^(3/2)*(1 + sec(c + d*x))) - ((A - B)*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)^(9/2)*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x))^3, x, 10, (-7*(7*A - 17*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) - ((13*A - 33*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) + (7*(7*A - 17*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*a^3*d) - ((13*A - 33*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(6*a^3*d) + ((A - B)*sec(c + d*x)^(9/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((A - 2*B)*sec(c + d*x)^(7/2)*sin(c + d*x))/(3*a*d*(a + a*sec(c + d*x))^2) + (7*(7*A - 17*B)*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)^(7/2)*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x))^3, x, 9, ((9*A - 49*B)*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)*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)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*a^3*d) + ((A - B)*sec(c + d*x)^(7/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((3*A - 8*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((3*A - 13*B)*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)^(5/2)*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x))^3, x, 8, ((A + 9*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((A + 3*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) + ((A - B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((A - 6*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((A + 9*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(10*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x))^3, x, 8, -((A - B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((A + B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) + ((A - B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((A + 4*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((A + B)*sqrt(sec(c + d*x))*sin(c + d*x))/(6*d*(a^3 + a^3*sec(c + d*x)))]
    @test_int [(sqrt(sec(c + d*x))*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x))^3, x, 8, -((9*A + B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) + ((3*A + B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) + ((A - B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) + ((3*A + 2*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) + ((3*A + B)*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))/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^3), x, 8, ((49*A - 9*B)*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)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(6*a^3*d) - ((A - B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d*(a + a*sec(c + d*x))^3) - ((8*A - 3*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*sec(c + d*x))^2) - ((13*A - 3*B)*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))/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3), x, 9, (-7*(17*A - 7*B)*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)*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)*sin(c + d*x))/(6*a^3*d*sqrt(sec(c + d*x))) - ((A - B)*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) - (7*(17*A - 7*B)*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))/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3), x, 10, (7*(33*A - 17*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(10*a^3*d) - ((21*A - 11*B)*sqrt(cos(c + d*x))*Elliptic.F((c + d*x)/2, 2)*sqrt(sec(c + d*x)))/(2*a^3*d) + (7*(33*A - 17*B)*sin(c + d*x))/(30*a^3*d*sec(c + d*x)^(3/2)) - ((21*A - 11*B)*sin(c + d*x))/(2*a^3*d*sqrt(sec(c + d*x))) - ((A - B)*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3) - ((12*A - 7*B)*sin(c + d*x))/(15*a*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2) - (3*(21*A - 11*B)*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))=#

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

    @test_int [sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 5, (sqrt(a)*(6*A + 5*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a*(6*A + 5*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a*(6*A + 5*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (a*B*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)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 4, (sqrt(a)*(4*A + 3*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a*(4*A + 3*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (a*B*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))*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 3, (sqrt(a)*(2*A + B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a*B*sec(c + d*x)^(3/2)*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)))/sqrt(sec(c + d*x)), x, 3, (2*sqrt(a)*B*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))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)))/sec(c + d*x)^(3/2), x, 2, (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)))/sec(c + d*x)^(5/2), x, 3, (2*a*A*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*a*(4*A + 5*B)*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (4*a*(4*A + 5*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)))/sec(c + d*x)^(7/2), x, 4, (2*a*A*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (2*a*(6*A + 7*B)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (8*a*(6*A + 7*B)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a*(6*A + 7*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 6, (a^(3/2)*(88*A + 75*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^2*(88*A + 75*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^2*(88*A + 75*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a^2*(8*A + 9*B)*sec(c + d*x)^(7/2)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a*B*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)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 5, (a^(3/2)*(14*A + 11*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^2*(14*A + 11*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(8*d*sqrt(a + a*sec(c + d*x))) + (a^2*(6*A + 7*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(12*d*sqrt(a + a*sec(c + d*x))) + (a*B*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 4, (a^(3/2)*(12*A + 7*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^2*(4*A + 5*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (a*B*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x))/sqrt(sec(c + d*x)), x, 4, (a^(3/2)*(2*A + 3*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a^2*(2*A - B)*sqrt(sec(c + d*x))*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (a*B*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x))/sec(c + d*x)^(3/2), x, 4, (2*a^(3/2)*B*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^2*(4*A + 3*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*sqrt(a + a*sec(c + d*x))*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))/sec(c + d*x)^(5/2), x, 3, (8*a^2*(3*A + 5*B)*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))/sec(c + d*x)^(7/2), x, 4, (2*a^2*(8*A + 7*B)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*a^2*(52*A + 63*B)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (4*a^2*(52*A + 63*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2))]
    @test_int [(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x))/sec(c + d*x)^(9/2), x, 5, (2*a^2*(10*A + 9*B)*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (2*a^2*(34*A + 39*B)*sin(c + d*x))/(105*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (8*a^2*(34*A + 39*B)*sin(c + d*x))/(315*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^2*(34*A + 39*B)*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))/(9*d*sec(c + d*x)^(7/2))]

    @test_int [sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x)), x, 7, (a^(5/2)*(326*A + 283*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(128*d) + (a^3*(326*A + 283*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(128*d*sqrt(a + a*sec(c + d*x))) + (a^3*(326*A + 283*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(192*d*sqrt(a + a*sec(c + d*x))) + (a^3*(170*A + 157*B)*sec(c + d*x)^(7/2)*sin(c + d*x))/(240*d*sqrt(a + a*sec(c + d*x))) + (a^2*(10*A + 13*B)*sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d) + (a*B*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))^(5/2)*(A + B*sec(c + d*x)), x, 6, (a^(5/2)*(200*A + 163*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(64*d) + (a^3*(200*A + 163*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(64*d*sqrt(a + a*sec(c + d*x))) + (a^3*(104*A + 95*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(96*d*sqrt(a + a*sec(c + d*x))) + (a^2*(8*A + 11*B)*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d) + (a*B*sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d)]
    @test_int [sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x)), x, 5, (a^(5/2)*(38*A + 25*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(8*d) + (a^3*(54*A + 49*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(24*d*sqrt(a + a*sec(c + d*x))) + (a^2*(2*A + 3*B)*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*B*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))^(5/2)*(A + B*sec(c + d*x))/sqrt(sec(c + d*x)), x, 5, (a^(5/2)*(20*A + 19*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*d) + (a^3*(4*A - 9*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (a^2*(4*A + 7*B)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*B*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))^(5/2)*(A + B*sec(c + d*x))/sec(c + d*x)^(3/2), x, 5, (a^(5/2)*(2*A + 5*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (a^3*(14*A + 3*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(a + a*sec(c + d*x))) - (a^2*(2*A - 3*B)*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d) + (2*a*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))^(5/2)*(A + B*sec(c + d*x))/sec(c + d*x)^(5/2), x, 5, (2*a^(5/2)*B*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^3*(32*A + 35*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(8*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 + 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))^(5/2)*(A + B*sec(c + d*x))/sec(c + d*x)^(7/2), x, 4, (64*a^3*(5*A + 7*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (16*a^2*(5*A + 7*B)*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))/sec(c + d*x)^(9/2), x, 5, (2*a^3*(124*A + 135*B)*sin(c + d*x))/(315*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (2*a^3*(292*A + 345*B)*sin(c + d*x))/(315*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (4*a^3*(292*A + 345*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(4*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 + 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))^(5/2)*(A + B*sec(c + d*x))/sec(c + d*x)^(11/2), x, 6, (2*a^3*(194*A + 209*B)*sin(c + d*x))/(693*d*sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (2*a^3*(710*A + 803*B)*sin(c + d*x))/(1155*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (8*a^3*(710*A + 803*B)*sin(c + d*x))/(3465*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^3*(710*A + 803*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3465*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(14*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 + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]

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

    @test_int [sec(c + d*x)^(5/2)*(A + B*sec(c + d*x))/sqrt(a + a*sec(c + d*x)), x, 7, -(((4*A - 7*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*sqrt(a)*d)) + (sqrt(2)*(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) + ((4*A - B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*sqrt(a + a*sec(c + d*x))) + (B*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)^(3/2)*(A + B*sec(c + d*x))/sqrt(a + a*sec(c + d*x)), x, 6, ((2*A - B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) - (sqrt(2)*(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*sec(c + d*x)^(3/2)*sin(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [sqrt(sec(c + d*x))*(A + B*sec(c + d*x))/sqrt(a + a*sec(c + d*x)), x, 5, (2*B*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) + (sqrt(2)*(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)]
    @test_int [(A + B*sec(c + d*x))/(sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))), x, 3, -((sqrt(2)*(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)) + (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))/(sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))), x, 4, (sqrt(2)*(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) + (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))/(sec(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))), x, 5, -((sqrt(2)*(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)) + (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)*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))/(sec(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))), x, 6, (sqrt(2)*(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) + (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)*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - (2*(43*A - 91*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sec(c + d*x)^(7/2)*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(3/2), x, 8, -(((12*A - 19*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(4*a^(3/2)*d)) + ((9*A - 13*B)*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)*sec(c + d*x)^(7/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((6*A - 7*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*a*d*sqrt(a + a*sec(c + d*x))) - ((A - 2*B)*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)^(5/2)*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(3/2), x, 7, ((2*A - 3*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) - ((5*A - 9*B)*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)*sec(c + d*x)^(5/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((A - 3*B)*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)^(3/2)*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(3/2), x, 6, (2*B*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) + ((A - 5*B)*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)*sec(c + d*x)^(3/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [sqrt(sec(c + d*x))*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(3/2), x, 3, ((3*A + B)*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)*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))/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)), x, 4, -(((7*A - 3*B)*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)*sqrt(sec(c + d*x))*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((5*A - B)*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))/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)), x, 5, ((11*A - 7*B)*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)*sin(c + d*x))/(2*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((7*A - 3*B)*sin(c + d*x))/(6*a*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((19*A - 15*B)*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))/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)), x, 6, -(((15*A - 11*B)*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)*sin(c + d*x))/(2*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)) + ((9*A - 5*B)*sin(c + d*x))/(10*a*d*sec(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) - ((39*A - 35*B)*sin(c + d*x))/(30*a*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((147*A - 95*B)*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)^(7/2)*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(5/2), x, 8, ((2*A - 5*B)*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) - ((43*A - 115*B)*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)*sec(c + d*x)^(7/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((7*A - 15*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((11*A - 35*B)*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)^(5/2)*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(5/2), x, 7, (2*B*asinh((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) + ((3*A - 43*B)*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)*sec(c + d*x)^(5/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((3*A - 11*B)*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)^(3/2)*(A + B*sec(c + d*x))/(a + a*sec(c + d*x))^(5/2), x, 4, ((5*A + 3*B)*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)*sec(c + d*x)^(5/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((5*A + 3*B)*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 + B*sec(c + d*x))/(a + a*sec(c + d*x))^(5/2), x, 5, ((19*A + 5*B)*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)*sec(c + d*x)^(3/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((9*A - B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)), ((19*A + 5*B)*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)*sqrt(sec(c + d*x))*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) + ((5*A + 3*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((9*A - B)*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))/(sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)), x, 5, -(((75*A - 19*B)*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)*sqrt(sec(c + d*x))*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((13*A - 5*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) + ((49*A - 9*B)*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))/(sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)), x, 6, ((163*A - 75*B)*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)*sin(c + d*x))/(4*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)) - ((17*A - 9*B)*sin(c + d*x))/(16*a*d*sqrt(sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((95*A - 39*B)*sin(c + d*x))/(48*a^2*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((299*A - 147*B)*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))/(sec(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)), x, 7, -(((283*A - 163*B)*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)*sin(c + d*x))/(4*d*sec(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)) - ((21*A - 13*B)*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)*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)*sin(c + d*x))/(240*a^2*d*sqrt(sec(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((2671*A - 1495*B)*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))=#

    @test_int [(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^(2/3), x, 9, (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*B*(a + a*sec(c + d*x))^(2/3)*tan(c + d*x))/(2*d*(1 + sec(c + d*x))) - (3^(3/4)*B*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))/(2*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))/(a + a*sec(c + d*x))^(1/3), x, 8, (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)*B*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^(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))/(a + a*sec(c + d*x))^(4/3), x, 9, (3*B*tan(c + d*x))/(5*a*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*d*sqrt(1 - sec(c + d*x))*(1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1/3)) - (3^(3/4)*B*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))*(a + a*sec(c + d*x))^(4/3), x, 11, (3*a*B*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(4*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))) - (15*(1 + sqrt(3))*a*B*(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))) + (15*3^(1/4)*a*B*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))) + (5*3^(3/4)*(1 - sqrt(3))*a*B*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))*(a + a*sec(c + d*x))^(1/3), x, 10, (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))*B*(a + a*sec(c + d*x))^(1/3)*tan(c + d*x))/(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)*B*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))/(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))*B*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)*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))/(a + a*sec(c + d*x))^(2/3), x, 11, (3*B*tan(c + d*x))/(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))/(d*sqrt(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(2/3)) + (3*(1 + sqrt(3))*B*(1 + sec(c + d*x))^(1/3)*tan(c + d*x))/(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)*B*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))/(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))*B*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))/(2^(2/3)*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))*with*m*and/or*n*symbolic=#

    @test_int [(c*sec(e + f*x))^n*(a + a*sec(e + f*x))^m*(A + B*sec(e + f*x)), x, 7, -((B*AppellF1(n, 1/2, -(1/2) - m, 1 + n, sec(e + f*x), -sec(e + f*x))*(c*sec(e + f*x))^n*(1 + sec(e + f*x))^(-(1/2) - m)*(a + a*sec(e + f*x))^m*tan(e + f*x))/(f*n*sqrt(1 - sec(e + f*x)))) - ((A - B)*AppellF1(n, 1/2, 1/2 - m, 1 + n, sec(e + f*x), -sec(e + f*x))*(c*sec(e + f*x))^n*(1 + sec(e + f*x))^(-(1/2) - m)*(a + a*sec(e + f*x))^m*tan(e + f*x))/(f*n*sqrt(1 - sec(e + f*x)))]

    @test_int [sec(c + d*x)^(-1 - n)*(A + B*sec(c + d*x))*(a + a*sec(c + d*x))^n, x, 4, (A*(a + a*sec(c + d*x))^n*sin(c + d*x))/(sec(c + d*x)^n*(d*(1 + n))) + ((B + A*n + B*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)))]

    #= ::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))=#

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

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

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

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

    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))*(a + b*sec(c + d*x))^4, x, 9, ((32*a^3*A*b + 24*a*A*b^3 + 8*a^4*B + 36*a^2*b^2*B + 5*b^4*B)*atanh(sin(c + d*x)))/(16*d) + ((24*a^4*A*b + 224*a^2*A*b^3 + 32*A*b^5 - 4*a^5*B + 121*a^3*b^2*B + 128*a*b^4*B)*tan(c + d*x))/(60*b*d) + ((48*a^3*A*b + 232*a*A*b^3 - 8*a^4*B + 178*a^2*b^2*B + 75*b^4*B)*sec(c + d*x)*tan(c + d*x))/(240*d) + ((24*a^2*A*b + 32*A*b^3 - 4*a^3*B + 53*a*b^2*B)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(120*b*d) + ((24*a*A*b - 4*a^2*B + 25*b^2*B)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(120*b*d) + ((6*A*b - a*B)*(a + b*sec(c + d*x))^4*tan(c + d*x))/(30*b*d) + (B*(a + b*sec(c + d*x))^5*tan(c + d*x))/(6*b*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))*(a + b*sec(c + d*x))^4, x, 8, ((8*a^4*A + 24*a^2*A*b^2 + 3*A*b^4 + 16*a^3*b*B + 12*a*b^3*B)*atanh(sin(c + d*x)))/(8*d) + ((95*a^3*A*b + 80*a*A*b^3 + 12*a^4*B + 112*a^2*b^2*B + 16*b^4*B)*tan(c + d*x))/(30*d) + (b*(130*a^2*A*b + 45*A*b^3 + 24*a^3*B + 116*a*b^2*B)*sec(c + d*x)*tan(c + d*x))/(120*d) + ((35*a*A*b + 12*a^2*B + 16*b^2*B)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(60*d) + ((5*A*b + 4*a*B)*(a + b*sec(c + d*x))^3*tan(c + d*x))/(20*d) + (B*(a + b*sec(c + d*x))^4*tan(c + d*x))/(5*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))*(a + b*sec(c + d*x))^4, x, 7, a^4*A*x + ((32*a^3*A*b + 16*a*A*b^3 + 8*a^4*B + 24*a^2*b^2*B + 3*b^4*B)*atanh(sin(c + d*x)))/(8*d) + (b*(34*a^2*A*b + 4*A*b^3 + 19*a^3*B + 16*a*b^2*B)*tan(c + d*x))/(6*d) + (b^2*(32*a*A*b + 26*a^2*B + 9*b^2*B)*sec(c + d*x)*tan(c + d*x))/(24*d) + (b*(4*A*b + 7*a*B)*(a + b*sec(c + d*x))^2*tan(c + d*x))/(12*d) + (b*B*(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))*(a + b*sec(c + d*x))^4, x, 7, a^3*(4*A*b + a*B)*x + (b*(12*a^2*A*b + A*b^3 + 8*a^3*B + 4*a*b^2*B)*atanh(sin(c + d*x)))/(2*d) + (a*A*(a + b*sec(c + d*x))^3*sin(c + d*x))/d - (b*(6*a^3*A - 12*a*A*b^2 - 17*a^2*b*B - 2*b^3*B)*tan(c + d*x))/(3*d) - (b^2*(6*a^2*A - 3*A*b^2 - 8*a*b*B)*sec(c + d*x)*tan(c + d*x))/(6*d) - (b*(3*a*A - b*B)*(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))*(a + b*sec(c + d*x))^4, x, 7, (1/2)*a^2*(a^2*A + 12*A*b^2 + 8*a*b*B)*x + (b^2*(8*a*A*b + 12*a^2*B + b^2*B)*atanh(sin(c + d*x)))/(2*d) + (a*(5*A*b + 2*a*B)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(2*d) + (a*A*cos(c + d*x)*(a + b*sec(c + d*x))^3*sin(c + d*x))/(2*d) - (b*(13*a^2*A*b - 2*A*b^3 + 4*a^3*B - 8*a*b^2*B)*tan(c + d*x))/(2*d) - (b^2*(6*a*A*b + 2*a^2*B - b^2*B)*sec(c + d*x)*tan(c + d*x))/(2*d)]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x))*(a + b*sec(c + d*x))^4, x, 7, (1/2)*a*(4*a^2*A*b + 8*A*b^3 + a^3*B + 12*a*b^2*B)*x + (b^3*(A*b + 4*a*B)*atanh(sin(c + d*x)))/d + (a^2*(2*a^2*A + 9*A*b^2 + 9*a*b*B)*sin(c + d*x))/(3*d) + (a*(2*A*b + a*B)*cos(c + d*x)*(a + b*sec(c + d*x))^2*sin(c + d*x))/(2*d) + (a*A*cos(c + d*x)^2*(a + b*sec(c + d*x))^3*sin(c + d*x))/(3*d) - (b^2*(8*a*A*b + 3*a^2*B - 6*b^2*B)*tan(c + d*x))/(6*d)]
    @test_int [cos(c + d*x)^4*(A + B*sec(c + d*x))*(a + b*sec(c + d*x))^4, x, 7, (1/8)*(3*a^4*A + 24*a^2*A*b^2 + 8*A*b^4 + 16*a^3*b*B + 32*a*b^3*B)*x + (b^4*B*atanh(sin(c + d*x)))/d + (a*(16*a^2*A*b + 19*A*b^3 + 4*a^3*B + 34*a*b^2*B)*sin(c + d*x))/(6*d) + (a^2*(9*a^2*A + 26*A*b^2 + 32*a*b*B)*cos(c + d*x)*sin(c + d*x))/(24*d) + (a*(7*A*b + 4*a*B)*cos(c + d*x)^2*(a + b*sec(c + d*x))^2*sin(c + d*x))/(12*d) + (a*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))*(a + b*sec(c + d*x))^4, x, 7, (1/8)*(12*a^3*A*b + 16*a*A*b^3 + 3*a^4*B + 24*a^2*b^2*B + 8*b^4*B)*x + ((8*a^4*A + 60*a^2*A*b^2 + 15*A*b^4 + 40*a^3*b*B + 60*a*b^3*B)*sin(c + d*x))/(15*d) + (a*(60*a^2*A*b + 56*A*b^3 + 15*a^3*B + 110*a*b^2*B)*cos(c + d*x)*sin(c + d*x))/(40*d) + (a^2*(8*a^2*A + 18*A*b^2 + 25*a*b*B)*cos(c + d*x)^2*sin(c + d*x))/(30*d) + (a*(8*A*b + 5*a*B)*cos(c + d*x)^3*(a + b*sec(c + d*x))^2*sin(c + d*x))/(20*d) + (a*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))*(a + b*sec(c + d*x))^4, x, 9, (1/16)*(5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B)*x + ((48*a^3*A*b + 53*a*A*b^3 + 12*a^4*B + 87*a^2*b^2*B + 15*b^4*B)*sin(c + d*x))/(15*d) + ((5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B)*cos(c + d*x)*sin(c + d*x))/(16*d) + (a^2*(25*a^2*A + 48*A*b^2 + 72*a*b*B)*cos(c + d*x)^3*sin(c + d*x))/(120*d) + (a*(3*A*b + 2*a*B)*cos(c + d*x)^4*(a + b*sec(c + d*x))^2*sin(c + d*x))/(10*d) + (a*A*cos(c + d*x)^5*(a + b*sec(c + d*x))^3*sin(c + d*x))/(6*d) - (a*(16*a^2*A*b + 13*A*b^3 + 4*a^3*B + 27*a*b^2*B)*sin(c + d*x)^3)/(15*d)]

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

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x))/(a + b*sec(c + d*x)), x, 8, ((2*a^2 + b^2)*(A*b - a*B)*atanh(sin(c + d*x)))/(2*b^4*d) - (2*a^3*(A*b - a*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b^4*sqrt(a + b)*d) - ((3*a*A*b - 3*a^2*B - 2*b^2*B)*tan(c + d*x))/(3*b^3*d) + ((A*b - a*B)*sec(c + d*x)*tan(c + d*x))/(2*b^2*d) + (B*sec(c + d*x)^2*tan(c + d*x))/(3*b*d)]
    @test_int [sec(c + d*x)^3*(A + B*sec(c + d*x))/(a + b*sec(c + d*x)), x, 7, -(((2*a*A*b - 2*a^2*B - b^2*B)*atanh(sin(c + d*x)))/(2*b^3*d)) + (2*a^2*(A*b - a*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b^3*sqrt(a + b)*d) + ((A*b - a*B)*tan(c + d*x))/(b^2*d) + (B*sec(c + d*x)*tan(c + d*x))/(2*b*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/(a + b*sec(c + d*x)), x, 7, ((A*b - a*B)*atanh(sin(c + d*x)))/(b^2*d) - (2*a*(A*b - a*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b^2*sqrt(a + b)*d) + (B*tan(c + d*x))/(b*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))/(a + b*sec(c + d*x)), x, 5, (B*atanh(sin(c + d*x)))/(b*d) + (2*(A*b - a*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(sqrt(a - b)*b*sqrt(a + b)*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))/(a + b*sec(c + d*x)), x, 4, (A*x)/a - (2*(A*b - a*B)*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)^1*(A + B*sec(c + d*x))/(a + b*sec(c + d*x)), x, 5, -(((A*b - a*B)*x)/a^2) + (2*b*(A*b - a*B)*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))/(a + b*sec(c + d*x)), x, 6, ((a^2*A + 2*A*b^2 - 2*a*b*B)*x)/(2*a^3) - (2*b^2*(A*b - a*B)*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))/(a + b*sec(c + d*x)), x, 7, -(((a^2 + 2*b^2)*(A*b - a*B)*x)/(2*a^4)) + (2*b^3*(A*b - a*B)*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*A + 3*A*b^2 - 3*a*b*B)*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))/(a + b*sec(c + d*x)), x, 8, ((3*a^4*A + 4*a^2*A*b^2 + 8*A*b^4 - 4*a^3*b*B - 8*a*b^3*B)*x)/(8*a^5) - (2*b^4*(A*b - a*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*sqrt(a - b)*sqrt(a + b)*d) - ((2*a^2 + 3*b^2)*(A*b - a*B)*sin(c + d*x))/(3*a^4*d) + ((3*a^2*A + 4*A*b^2 - 4*a*b*B)*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))/(a + b*sec(c + d*x))^2, x, 8, -(((4*a*A*b - 6*a^2*B - b^2*B)*atanh(sin(c + d*x)))/(2*b^4*d)) + (2*a^2*(2*a^2*A*b - 3*A*b^3 - 3*a^3*B + 4*a*b^2*B)*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*A*b - A*b^3 - 3*a^3*B + 2*a*b^2*B)*tan(c + d*x))/(b^3*(a^2 - b^2)*d) - ((2*a*A*b - 3*a^2*B + b^2*B)*sec(c + d*x)*tan(c + d*x))/(2*b^2*(a^2 - b^2)*d) + (a*(A*b - a*B)*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)^3*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^2, x, 7, ((A*b - 2*a*B)*atanh(sin(c + d*x)))/(b^3*d) - (2*a*(a^2*A*b - 2*A*b^3 - 2*a^3*B + 3*a*b^2*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*b^3*(a + b)^(3/2)*d) + (B*tan(c + d*x))/(b^2*d) - (a^2*(A*b - a*B)*tan(c + d*x))/(b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^2, x, 6, (B*atanh(sin(c + d*x)))/(b^2*d) - (2*(A*b^3 + a^3*B - 2*a*b^2*B)*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*(A*b - a*B)*tan(c + d*x))/(b*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^2, x, 5, (2*(a*A - b*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(3/2)*(a + b)^(3/2)*d) - ((A*b - a*B)*tan(c + d*x))/((a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))/(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)*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*(A*b - a*B)*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))/(a + b*sec(c + d*x))^2, x, 6, -(((2*A*b - a*B)*x)/a^3) + (2*b*(3*a^2*A*b - 2*A*b^3 - 2*a^3*B + a*b^2*B)*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*A - 2*A*b^2 + a*b*B)*sin(c + d*x))/(a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*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))/(a + b*sec(c + d*x))^2, x, 7, ((a^2*A + 6*A*b^2 - 4*a*b*B)*x)/(2*a^4) - (2*b^2*(4*a^2*A*b - 3*A*b^3 - 3*a^3*B + 2*a*b^2*B)*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*A*b - 3*A*b^3 - a^3*B + 2*a*b^2*B)*sin(c + d*x))/(a^3*(a^2 - b^2)*d) + ((a^2*A - 3*A*b^2 + 2*a*b*B)*cos(c + d*x)*sin(c + d*x))/(2*a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*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))/(a + b*sec(c + d*x))^2, x, 8, -(((2*a^2*A*b + 8*A*b^3 - a^3*B - 6*a*b^2*B)*x)/(2*a^5)) + (2*b^3*(5*a^2*A*b - 4*A*b^3 - 4*a^3*B + 3*a*b^2*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*(a - b)^(3/2)*(a + b)^(3/2)*d) + ((2*a^4*A + 7*a^2*A*b^2 - 12*A*b^4 - 6*a^3*b*B + 9*a*b^3*B)*sin(c + d*x))/(3*a^4*(a^2 - b^2)*d) - ((2*a^2*A*b - 4*A*b^3 - a^3*B + 3*a*b^2*B)*cos(c + d*x)*sin(c + d*x))/(2*a^3*(a^2 - b^2)*d) + ((a^2*A - 4*A*b^2 + 3*a*b*B)*cos(c + d*x)^2*sin(c + d*x))/(3*a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*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)^5*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^3, x, 9, -(((6*a*A*b - 12*a^2*B - b^2*B)*atanh(sin(c + d*x)))/(2*b^5*d)) + (a^2*(6*a^4*A*b - 15*a^2*A*b^3 + 12*A*b^5 - 12*a^5*B + 29*a^3*b^2*B - 20*a*b^4*B)*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*A*b - 11*a^2*A*b^3 + 2*A*b^5 - 12*a^5*B + 21*a^3*b^2*B - 6*a*b^4*B)*tan(c + d*x))/(2*b^4*(a^2 - b^2)^2*d) - ((3*a^3*A*b - 6*a*A*b^3 - 6*a^4*B + 10*a^2*b^2*B - b^4*B)*sec(c + d*x)*tan(c + d*x))/(2*b^3*(a^2 - b^2)^2*d) + (a*(A*b - a*B)*sec(c + d*x)^3*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (a*(2*a^2*A*b - 5*A*b^3 - 4*a^3*B + 7*a*b^2*B)*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)^4*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^3, x, 8, ((A*b - 3*a*B)*atanh(sin(c + d*x)))/(b^4*d) - (a*(2*a^4*A*b - 5*a^2*A*b^3 + 6*A*b^5 - 6*a^5*B + 15*a^3*b^2*B - 12*a*b^4*B)*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*A*b - 3*a^2*B + 2*b^2*B)*tan(c + d*x))/(2*b^3*(a^2 - b^2)*d) + (a*(A*b - a*B)*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*A*b - 4*A*b^3 - 3*a^3*B + 6*a*b^2*B)*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)^3*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^3, x, 7, (B*atanh(sin(c + d*x)))/(b^3*d) + ((a^2*A*b^3 + 2*A*b^5 - 2*a^5*B + 5*a^3*b^2*B - 6*a*b^4*B)*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*(A*b - a*B)*tan(c + d*x))/(2*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (a*(a^2*A*b - 4*A*b^3 - 3*a^3*B + 6*a*b^2*B)*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)^2*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^3, x, 6, -(((3*a*A*b - a^2*B - 2*b^2*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*(a + b)^(5/2)*d)) + (a*(A*b - a*B)*tan(c + d*x))/(2*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + ((a^2*A*b + 2*A*b^3 + a^3*B - 4*a*b^2*B)*tan(c + d*x))/(2*b*(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))/(a + b*sec(c + d*x))^3, x, 6, ((2*a^2*A + A*b^2 - 3*a*b*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(5/2)*(a + b)^(5/2)*d) - ((A*b - a*B)*tan(c + d*x))/(2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) - ((3*a*A*b - a^2*B - 2*b^2*B)*tan(c + d*x))/(2*(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))/(a + b*sec(c + d*x))^3, x, 6, (A*x)/a^3 - ((6*a^4*A*b - 5*a^2*A*b^3 + 2*A*b^5 - 2*a^5*B - a^3*b^2*B)*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*(A*b - a*B)*tan(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (b*(5*a^2*A*b - 2*A*b^3 - 3*a^3*B)*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))/(a + b*sec(c + d*x))^3, x, 7, -(((3*A*b - a*B)*x)/a^4) + (b*(12*a^4*A*b - 15*a^2*A*b^3 + 6*A*b^5 - 6*a^5*B + 5*a^3*b^2*B - 2*a*b^4*B)*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*A - 11*a^2*A*b^2 + 6*A*b^4 + 5*a^3*b*B - 2*a*b^3*B)*sin(c + d*x))/(2*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (b*(6*a^2*A*b - 3*A*b^3 - 4*a^3*B + a*b^2*B)*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))/(a + b*sec(c + d*x))^3, x, 8, ((a^2*A + 12*A*b^2 - 6*a*b*B)*x)/(2*a^5) - (b^2*(20*a^4*A*b - 29*a^2*A*b^3 + 12*A*b^5 - 12*a^5*B + 15*a^3*b^2*B - 6*a*b^4*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*(a - b)^(5/2)*(a + b)^(5/2)*d) - ((6*a^4*A*b - 21*a^2*A*b^3 + 12*A*b^5 - 2*a^5*B + 11*a^3*b^2*B - 6*a*b^4*B)*sin(c + d*x))/(2*a^4*(a^2 - b^2)^2*d) + ((a^4*A - 10*a^2*A*b^2 + 6*A*b^4 + 6*a^3*b*B - 3*a*b^3*B)*cos(c + d*x)*sin(c + d*x))/(2*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*cos(c + d*x)*sin(c + d*x))/(2*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^2) + (b*(7*a^2*A*b - 4*A*b^3 - 5*a^3*B + 2*a*b^2*B)*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)^5*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^4, x, 9, ((A*b - 4*a*B)*atanh(sin(c + d*x)))/(b^5*d) - (a*(2*a^6*A*b - 7*a^4*A*b^3 + 8*a^2*A*b^5 - 8*A*b^7 - 8*a^7*B + 28*a^5*b^2*B - 35*a^3*b^4*B + 20*a*b^6*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*b^5*(a + b)^(7/2)*d) - ((3*a^3*A*b - 8*a*A*b^3 - 12*a^4*B + 23*a^2*b^2*B - 6*b^4*B)*tan(c + d*x))/(6*b^4*(a^2 - b^2)^2*d) + (a*(A*b - a*B)*sec(c + d*x)^3*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + (a*(a^2*A*b - 6*A*b^3 - 4*a^3*B + 9*a*b^2*B)*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^4*A*b - 2*a^2*A*b^3 + 6*A*b^5 - 4*a^5*B + 11*a^3*b^2*B - 12*a*b^4*B)*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)^4*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^4, x, 8, (B*atanh(sin(c + d*x)))/(b^4*d) - ((3*a^2*A*b^5 + 2*A*b^7 + 2*a^7*B - 7*a^5*b^2*B + 8*a^3*b^4*B - 8*a*b^6*B)*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*(A*b - a*B)*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*(5*A*b^3 + 3*a^3*B - 8*a*b^2*B)*tan(c + d*x))/(6*b^3*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) - (a*(a^2*A*b^3 - 16*A*b^5 + 9*a^5*B - 28*a^3*b^2*B + 34*a*b^4*B)*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)^3*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^4, x, 7, ((a^3*A + 4*a*A*b^2 - 3*a^2*b*B - 2*b^3*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*(a + b)^(7/2)*d) - (a^2*(A*b - a*B)*tan(c + d*x))/(3*b^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + (a*(a^2*A*b - 6*A*b^3 - 4*a^3*B + 9*a*b^2*B)*tan(c + d*x))/(6*b^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + ((a^4*A*b - 10*a^2*A*b^3 - 6*A*b^5 + 2*a^5*B - 5*a^3*b^2*B + 18*a*b^4*B)*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)^2*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^4, x, 7, -(((4*a^2*A*b + A*b^3 - a^3*B - 4*a*b^2*B)*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 - a*B)*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + ((2*a^2*A*b + 3*A*b^3 + a^3*B - 6*a*b^2*B)*tan(c + d*x))/(6*b*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + ((2*a^3*A*b + 13*a*A*b^3 + a^4*B - 10*a^2*b^2*B - 6*b^4*B)*tan(c + d*x))/(6*b*(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))/(a + b*sec(c + d*x))^4, x, 7, ((2*a^3*A + 3*a*A*b^2 - 4*a^2*b*B - b^3*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/((a - b)^(7/2)*(a + b)^(7/2)*d) - ((A*b - a*B)*tan(c + d*x))/(3*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) - ((5*a*A*b - 2*a^2*B - 3*b^2*B)*tan(c + d*x))/(6*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) - ((11*a^2*A*b + 4*A*b^3 - 2*a^3*B - 13*a*b^2*B)*tan(c + d*x))/(6*(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))/(a + b*sec(c + d*x))^4, x, 7, (A*x)/a^4 - ((8*a^6*A*b - 8*a^4*A*b^3 + 7*a^2*A*b^5 - 2*A*b^7 - 2*a^7*B - 3*a^5*b^2*B)*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*(A*b - a*B)*tan(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + (b*(8*a^2*A*b - 3*A*b^3 - 5*a^3*B)*tan(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + (b*(26*a^4*A*b - 17*a^2*A*b^3 + 6*A*b^5 - 11*a^5*B - 4*a^3*b^2*B)*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))/(a + b*sec(c + d*x))^4, x, 8, -(((4*A*b - a*B)*x)/a^5) + (b*(20*a^6*A*b - 35*a^4*A*b^3 + 28*a^2*A*b^5 - 8*A*b^7 - 8*a^7*B + 8*a^5*b^2*B - 7*a^3*b^4*B + 2*a*b^6*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^5*(a - b)^(7/2)*(a + b)^(7/2)*d) + ((6*a^6*A - 65*a^4*A*b^2 + 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)*sin(c + d*x))/(6*a^4*(a^2 - b^2)^3*d) + (b*(A*b - a*B)*sin(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + (b*(9*a^2*A*b - 4*A*b^3 - 6*a^3*B + a*b^2*B)*sin(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + (b*(12*a^4*A*b - 11*a^2*A*b^3 + 4*A*b^5 - 6*a^5*B + 2*a^3*b^2*B - a*b^4*B)*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))/(a + b*sec(c + d*x))^4, x, 9, ((a^2*A + 20*A*b^2 - 8*a*b*B)*x)/(2*a^6) - (b^2*(40*a^6*A*b - 84*a^4*A*b^3 + 69*a^2*A*b^5 - 20*A*b^7 - 20*a^7*B + 35*a^5*b^2*B - 28*a^3*b^4*B + 8*a*b^6*B)*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^6*(a - b)^(7/2)*(a + b)^(7/2)*d) - ((24*a^6*A*b - 146*a^4*A*b^3 + 167*a^2*A*b^5 - 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)*sin(c + d*x))/(6*a^5*(a^2 - b^2)^3*d) + ((a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A*b^6 + 12*a^5*b*B - 11*a^3*b^3*B + 4*a*b^5*B)*cos(c + d*x)*sin(c + d*x))/(2*a^4*(a^2 - b^2)^3*d) + (b*(A*b - a*B)*cos(c + d*x)*sin(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^3) + (b*(10*a^2*A*b - 5*A*b^3 - 7*a^3*B + 2*a*b^2*B)*cos(c + d*x)*sin(c + d*x))/(6*a^2*(a^2 - b^2)^2*d*(a + b*sec(c + d*x))^2) + (b*(48*a^4*A*b - 53*a^2*A*b^3 + 20*A*b^5 - 27*a^5*B + 20*a^3*b^2*B - 8*a*b^4*B)*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 [(b*B/a + B*sec(c + d*x))/(a + b*sec(c + d*x)), x, 4, (b*B*x)/a^2 + (2*sqrt(a - b)*sqrt(a + b)*B*atanh((sqrt(a - b)*tan((1/2)*(c + d*x)))/sqrt(a + b)))/(a^2*d)]
    @test_int [(a*B/b + B*sec(c + d*x))/(a + b*sec(c + d*x)), x, 2, (B*x)/b]

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

    #= ::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))=#

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

    @test_int [sec(c + d*x)^4*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)), x, 7, (-2*(a - b)*sqrt(a + b)*(24*a^3*A*b + 57*a*A*b^3 - 16*a^4*B - 24*a^2*b^2*B + 147*b^4*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))))/(315*b^5*d) - (2*(a - b)*sqrt(a + b)*(3*b^3*(25*A - 49*B) + 18*a*b^2*(A - 2*B) + 12*a^2*b*(2*A - B) - 16*a^3*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))))/(315*b^4*d) - (2*(12*a^2*A*b - 75*A*b^3 - 8*a^3*B - 13*a*b^2*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^3*d) + (2*(9*a*A*b - 6*a^2*B + 49*b^2*B)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^2*d) + (2*(9*A*b + a*B)*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(63*b*d) + (2*B*sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(9*d)]
    @test_int [sec(c + d*x)^3*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)), x, 6, (2*(a - b)*sqrt(a + b)*(14*a^2*A*b - 63*A*b^3 - 8*a^3*B - 19*a*b^2*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))))/(105*b^4*d) + (2*(a - b)*sqrt(a + b)*(b^2*(63*A - 25*B) + 2*a*b*(7*A - 3*B) - 8*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))))/(105*b^3*d) + (2*(7*a*A*b - 4*a^2*B + 25*b^2*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b^2*d) + (2*(7*A*b + a*B)*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(35*b*d) + (2*B*sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(7*d)]
    @test_int [sec(c + d*x)^2*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)), x, 5, (-2*(a - b)*sqrt(a + b)*(5*a*A*b - 2*a^2*B + 9*b^2*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))))/(15*b^3*d) - (2*(a - b)*sqrt(a + b)*(5*A*b - 2*a*B - 9*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))))/(15*b^2*d) + (2*(5*A*b - 2*a*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b*d) + (2*B*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^1*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)), x, 4, (-2*(a - b)*sqrt(a + b)*(3*A*b + 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*b^2*d) + (2*(a - b)*sqrt(a + b)*(3*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))))/(3*b*d) + (2*B*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^0*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)), x, 5, (-2*(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) + (2*sqrt(a + b)*(A*b + (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))))/(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 [cos(c + d*x)^1*sqrt(a + b*sec(c + d*x))*(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))))/(b*d) + (sqrt(a + b)*(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))))/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)), 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))*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*A - A*b^2 + 4*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))))/(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)), x, 8, ((a - b)*sqrt(a + b)*(16*a^2*A - 3*A*b^2 + 6*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))))/(24*a^2*b*d) + (sqrt(a + b)*(2*a + b)*(8*a*A - 3*A*b + 6*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))))/(24*a^2*d) - (sqrt(a + b)*(4*a^2*A*b + A*b^3 + 8*a^3*B - 2*a*b^2*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))))/(8*a^3*d) + ((16*a^2*A - 3*A*b^2 + 6*a*b*B)*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)), x, 7, (2*(a - b)*sqrt(a + b)*(18*a^3*A*b - 246*a*A*b^3 - 8*a^4*B - 33*a^2*b^2*B - 147*b^4*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))))/(315*b^4*d) - (2*(a - b)*sqrt(a + b)*(3*b^3*(25*A - 49*B) - 3*a*b^2*(57*A - 13*B) - 6*a^2*b*(3*A - B) + 8*a^3*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))))/(315*b^3*d) - (2*(18*a^2*A*b - 75*A*b^3 - 8*a^3*B - 39*a*b^2*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b^2*d) - (2*(18*a*A*b - 8*a^2*B - 49*b^2*B)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*b^2*d) + (2*(9*A*b - 4*a*B)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*b^2*d) + (2*B*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)^2*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 6, (-2*(a - b)*sqrt(a + b)*(21*a^2*A*b + 63*A*b^3 - 6*a^3*B + 82*a*b^2*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))))/(105*b^3*d) + (2*(a - b)*sqrt(a + b)*(b^2*(63*A - 25*B) + 6*a^2*B - a*(21*A*b - 57*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))))/(105*b^2*d) + (2*(21*a*A*b - 6*a^2*B + 25*b^2*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*b*d) + (2*(7*A*b - 2*a*B)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*b*d) + (2*B*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*b*d)]
    @test_int [sec(c + d*x)^1*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 5, (-2*(a - b)*sqrt(a + b)*(20*a*A*b + 3*a^2*B + 9*b^2*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))))/(15*b^2*d) + (2*(a - b)*sqrt(a + b)*(15*a*A - 5*A*b - 3*a*B + 9*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))))/(15*b*d) + (2*(5*A*b + 3*a*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*B*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(5*d)]
    @test_int [sec(c + d*x)^0*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 6, (-2*(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))))/(3*b*d) - (2*sqrt(a + b)*(b^2*(3*A - B) - 3*a^2*B - a*(6*A*b - 4*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))))/(3*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*b*B*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [cos(c + d*x)^1*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 6, ((a - b)*sqrt(a + b)*(a*A - 2*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)*(2*b*(A - B) + a*(A + 4*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 - (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*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [cos(c + d*x)^2*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 7, ((a - b)*sqrt(a + b)*(5*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*b*d) + (sqrt(a + b)*(2*a*A + 5*A*b + 4*a*B + 8*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))))/(4*d) - (sqrt(a + b)*(4*a^2*A + 3*A*b^2 + 12*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))))/(4*a*d) + ((5*A*b + 4*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*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*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 8, ((a - b)*sqrt(a + b)*(16*a^2*A + 3*A*b^2 + 30*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))))/(24*a*b*d) + (sqrt(a + b)*(16*a^2*A + 14*a*A*b + 3*A*b^2 + 12*a^2*B + 30*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))))/(24*a*d) - (sqrt(a + b)*(12*a^2*A*b - A*b^3 + 8*a^3*B + 6*a*b^2*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))))/(8*a^2*d) + ((16*a^2*A + 3*A*b^2 + 30*a*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*a*d) + ((7*A*b + 6*a*B)*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*d) + (a*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))^(5/2)*(A + B*sec(c + d*x)), x, 8, (2*(a - b)*sqrt(a + b)*(110*a^4*A*b - 3069*a^2*A*b^3 - 1617*A*b^5 - 40*a^5*B - 255*a^3*b^2*B - 3705*a*b^4*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))))/(3465*b^4*d) - (2*(a - b)*sqrt(a + b)*(6*a*b^3*(209*A - 505*B) - 3*b^4*(539*A - 225*B) - 15*a^2*b^2*(121*A - 19*B) + 40*a^4*B - a^3*(110*A*b - 30*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))))/(3465*b^3*d) - (2*(110*a^3*A*b - 1254*a*A*b^3 - 40*a^4*B - 285*a^2*b^2*B - 675*b^4*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3465*b^2*d) - (2*(110*a^2*A*b - 539*A*b^3 - 40*a^3*B - 335*a*b^2*B)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(3465*b^2*d) - (2*(22*a*A*b - 8*a^2*B - 81*b^2*B)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(693*b^2*d) + (2*(11*A*b - 4*a*B)*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(99*b^2*d) + (2*B*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)^2*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x)), x, 7, (-2*(a - b)*sqrt(a + b)*(45*a^3*A*b + 435*a*A*b^3 - 10*a^4*B + 279*a^2*b^2*B + 147*b^4*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))))/(315*b^3*d) - (2*(a - b)*sqrt(a + b)*(3*b^3*(25*A - 49*B) - 6*a*b^2*(60*A - 19*B) + 15*a^2*b*(3*A - 11*B) - 10*a^3*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))))/(315*b^2*d) + (2*(45*a^2*A*b + 75*A*b^3 - 10*a^3*B + 114*a*b^2*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(315*b*d) + (2*(45*a*A*b - 10*a^2*B + 49*b^2*B)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(315*b*d) + (2*(9*A*b - 2*a*B)*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(63*b*d) + (2*B*(a + b*sec(c + d*x))^(7/2)*tan(c + d*x))/(9*b*d)]
    @test_int [sec(c + d*x)^1*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x)), x, 6, (-2*(a - b)*sqrt(a + b)*(161*a^2*A*b + 63*A*b^3 + 15*a^3*B + 145*a*b^2*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))))/(105*b^2*d) + (2*(a - b)*sqrt(a + b)*(b^2*(63*A - 25*B) - 8*a*b*(7*A - 15*B) + 15*a^2*(7*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))))/(105*b*d) + (2*(56*a*A*b + 15*a^2*B + 25*b^2*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(105*d) + (2*(7*A*b + 5*a*B)*(a + b*sec(c + d*x))^(3/2)*tan(c + d*x))/(35*d) + (2*B*(a + b*sec(c + d*x))^(5/2)*tan(c + d*x))/(7*d)]
    @test_int [sec(c + d*x)^0*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x)), x, 7, (-2*(a - b)*sqrt(a + b)*(35*a*A*b + 23*a^2*B + 9*b^2*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))))/(15*b*d) + (2*sqrt(a + b)*(a^2*b*(45*A - 23*B) - a*b^2*(35*A - 17*B) + b^3*(5*A - 9*B) + 15*a^3*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))))/(15*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*b*(5*A*b + 8*a*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*d) + (2*b*B*(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))^(5/2)*(A + B*sec(c + d*x)), x, 7, ((a - b)*sqrt(a + b)*(3*a^2*A - 6*A*b^2 - 14*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))))/(3*b*d) + (sqrt(a + b)*(2*a*b*(9*A - 7*B) - 2*b^2*(3*A - B) + 3*a^2*(A + 6*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))))/(3*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*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/d - (b*(3*a*A - 2*b*B)*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))^(5/2)*(A + B*sec(c + d*x)), x, 7, ((a - b)*sqrt(a + b)*(9*a*A*b + 4*a^2*B - 8*b^2*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*b*d) + (sqrt(a + b)*(8*b^2*(A - B) + 2*a^2*(A + 2*B) + 3*a*b*(3*A + 8*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*d) - (sqrt(a + b)*(4*a^2*A + 15*A*b^2 + 20*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))))/(4*d) + (a*(7*A*b + 4*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*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))^(5/2)*(A + B*sec(c + d*x)), x, 8, ((a - b)*sqrt(a + b)*(16*a^2*A + 33*A*b^2 + 54*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))))/(24*b*d) + (sqrt(a + b)*(16*a^2*A + 26*a*A*b + 33*A*b^2 + 12*a^2*B + 54*a*b*B + 48*b^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))))/(24*d) - (sqrt(a + b)*(20*a^2*A*b + 5*A*b^3 + 8*a^3*B + 30*a*b^2*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))))/(8*a*d) + ((16*a^2*A + 33*A*b^2 + 54*a*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + (a*(3*A*b + 2*a*B)*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (a*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))^(5/2)*(A + B*sec(c + d*x)), x, 9, ((a - b)*sqrt(a + b)*(284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*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))))/(192*a*b*d) + (sqrt(a + b)*(15*A*b^3 + 8*a^3*(9*A + 16*B) + 4*a^2*b*(71*A + 52*B) + 2*a*b^2*(59*A + 132*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))))/(192*a*d) - (sqrt(a + b)*(48*a^4*A + 120*a^2*A*b^2 - 5*A*b^4 + 160*a^3*b*B + 40*a*b^3*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))))/(64*a^2*d) + ((284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*a*d) + ((36*a^2*A + 59*A*b^2 + 104*a*b*B)*cos(c + d*x)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(96*d) + (a*(11*A*b + 8*a*B)*cos(c + d*x)^2*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + (a*A*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*(A + B*sec(c + d*x))/sqrt(a + b*sec(c + d*x)), x, 5, (2*(a - b)*sqrt(a + b)*(10*a*A*b - 8*a^2*B - 9*b^2*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))))/(15*b^4*d) + (2*sqrt(a + b)*(b^2*(5*A - 9*B) - 8*a^2*B + 2*a*b*(5*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))))/(15*b^3*d) + (2*(5*A*b - 4*a*B)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b^2*d) + (2*B*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/sqrt(a + b*sec(c + d*x)), x, 4, (-2*(a - b)*sqrt(a + b)*(3*A*b - 2*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*b^3*d) - (2*sqrt(a + b)*(3*A*b - (2*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))))/(3*b^2*d) + (2*B*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b*d)]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))/sqrt(a + b*sec(c + d*x)), x, 3, (-2*(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^2*d) + (2*sqrt(a + b)*(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))))/(b*d)]
    @test_int [sec(c + d*x)^0*(A + B*sec(c + d*x))/sqrt(a + b*sec(c + d*x)), x, 3, (2*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))))/(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))/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) + (A*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))))/(a*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))/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)*(4*a^2*A + 3*A*b^2 - 4*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))))/(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 [cos(c + d*x)^3*(A + B*sec(c + d*x))/sqrt(a + b*sec(c + d*x)), x, 8, ((a - b)*sqrt(a + b)*(16*a^2*A + 15*A*b^2 - 18*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))))/(24*a^3*b*d) + (sqrt(a + b)*(16*a^2*A - 10*a*A*b + 15*A*b^2 + 12*a^2*B - 18*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))))/(24*a^3*d) + (sqrt(a + b)*(4*a^2*A*b + 5*A*b^3 - 8*a^3*B - 6*a*b^2*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))))/(8*a^4*d) + ((16*a^2*A + 15*A*b^2 - 18*a*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*a^3*d) - ((5*A*b - 6*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 + B*sec(c + d*x))/(a + b*sec(c + d*x))^(3/2), x, 5, -((2*(6*a^2*A*b - 3*A*b^3 - 8*a^3*B + 5*a*b^2*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*b^4*sqrt(a + b)*d)) - (2*(2*a + b)*(3*A*b - (4*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))))/(3*b^3*sqrt(a + b)*d) - (2*a^2*(A*b - a*B)*tan(c + d*x))/(b^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*B*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b^2*d)]
    @test_int [sec(c + d*x)^2*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^(3/2), x, 4, (2*(a*A*b - 2*a^2*B + b^2*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^3*sqrt(a + b)*d) + (2*(A*b - (2*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))))/(b^2*sqrt(a + b)*d) + (2*a*(A*b - a*B)*tan(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [sec(c + d*x)^1*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^(3/2), x, 4, (-2*(A*b - 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))))/(b^2*sqrt(a + b)*d) + (2*(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))))/(b*sqrt(a + b)*d) - (2*(A*b - a*B)*tan(c + d*x))/((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))/(a + b*sec(c + d*x))^(3/2), x, 6, (2*(A*b - 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*sqrt(a + b)*d) - (2*(A*b - 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))))/(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*b*(A*b - a*B)*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))/(a + b*sec(c + d*x))^(3/2), x, 7, ((a^2*A - 3*A*b^2 + 2*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^2*b*sqrt(a + b)*d) + ((3*A*b + 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))))/(a^2*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*(a^2*A - 3*A*b^2 + 2*a*b*B)*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))/(a + b*sec(c + d*x))^(3/2), x, 8, -((7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*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^3*b*sqrt(a + b)*d) - ((15*A*b^2 + a*b*(5*A - 12*B) - 2*a^2*(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^3*sqrt(a + b)*d) - (sqrt(a + b)*(4*a^2*A + 15*A*b^2 - 12*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))))/(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*(7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*B)*tan(c + d*x))/(4*a^3*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [cos(c + d*x)^3*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^(3/2), x, 9, ((16*a^4*A + 41*a^2*A*b^2 - 105*A*b^4 - 42*a^3*b*B + 90*a*b^3*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))))/(24*a^4*b*sqrt(a + b)*d) + ((105*A*b^3 + 5*a*b^2*(7*A - 18*B) + 4*a^3*(4*A + 3*B) - 6*a^2*b*(A + 5*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))))/(24*a^4*sqrt(a + b)*d) + (sqrt(a + b)*(12*a^2*A*b + 35*A*b^3 - 8*a^3*B - 30*a*b^2*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))))/(8*a^5*d) + ((16*a^2*A + 35*A*b^2 - 30*a*b*B)*sin(c + d*x))/(24*a^3*d*sqrt(a + b*sec(c + d*x))) - ((7*A*b - 6*a*B)*cos(c + d*x)*sin(c + d*x))/(12*a^2*d*sqrt(a + b*sec(c + d*x))) + (A*cos(c + d*x)^2*sin(c + d*x))/(3*a*d*sqrt(a + b*sec(c + d*x))) + (b*(16*a^4*A + 41*a^2*A*b^2 - 105*A*b^4 - 42*a^3*b*B + 90*a*b^3*B)*tan(c + d*x))/(24*a^4*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]

    @test_int [sec(c + d*x)^4*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^(5/2), x, 6, (-2*(8*a^4*A*b - 15*a^2*A*b^3 + 3*A*b^5 - 16*a^5*B + 28*a^3*b^2*B - 8*a*b^4*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*(a - b)*b^5*(a + b)^(3/2)*d) + (2*(9*a*b^3*(A - B) + b^4*(3*A - B) + 16*a^4*B - 2*a^2*b^2*(3*A + 8*B) - a^3*(8*A*b - 12*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))))/(3*b^4*sqrt(a + b)*(a^2 - b^2)*d) + (2*a*(A*b - a*B)*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*A*b - 7*A*b^3 - 6*a^3*B + 10*a*b^2*B)*tan(c + d*x))/(3*b^3*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x))) - (2*(a*A*b - 2*a^2*B + b^2*B)*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)^3*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^(5/2), x, 5, (2*(2*a^3*A*b - 6*a*A*b^3 - 8*a^4*B + 15*a^2*b^2*B - 3*b^4*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*(a - b)*b^4*(a + b)^(3/2)*d) + (2*(2*a^2*b*(A - 3*B) - 3*b^3*(A - B) - 8*a^3*B + 3*a*b^2*(A + 3*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))))/(3*b^3*sqrt(a + b)*(a^2 - b^2)*d) - (2*a^2*(A*b - a*B)*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*A*b - 6*A*b^3 - 5*a^3*B + 9*a*b^2*B)*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)^2*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^(5/2), x, 5, (2*(a^2*A*b + 3*A*b^3 + 2*a^3*B - 6*a*b^2*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*(a - b)*b^3*(a + b)^(3/2)*d) + (2*(2*a^2*B - 3*b^2*(A + B) + a*b*(A + 3*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))))/(3*b^2*sqrt(a + b)*(a^2 - b^2)*d) + (2*a*(A*b - a*B)*tan(c + d*x))/(3*b*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*(a^2*A*b + 3*A*b^3 + 2*a^3*B - 6*a*b^2*B)*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)^1*(A + B*sec(c + d*x))/(a + b*sec(c + d*x))^(5/2), x, 5, (-2*(4*a*A*b - a^2*B - 3*b^2*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*(a - b)*b^2*(a + b)^(3/2)*d) + (2*(3*a*A - A*b + a*B - 3*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))))/(3*(a - b)*b*(a + b)^(3/2)*d) - (2*(A*b - a*B)*tan(c + d*x))/(3*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (2*(4*a*A*b - a^2*B - 3*b^2*B)*tan(c + d*x))/(3*(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))/(a + b*sec(c + d*x))^(5/2), x, 7, (2*(7*a^2*A*b - 3*A*b^3 - 4*a^3*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*a^2*(a - b)*b*(a + b)^(3/2)*d) - (2*(6*a^2*A*b - a*A*b^2 - 3*A*b^3 - 3*a^3*B + a^2*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))))/(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*b*(A*b - a*B)*tan(c + d*x))/(3*a*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*b*(7*a^2*A*b - 3*A*b^3 - 4*a^3*B)*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))/(a + b*sec(c + d*x))^(5/2), x, 8, ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*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*a^3*(a - b)*b*(a + b)^(3/2)*d) - ((15*A*b^3 + a*b^2*(5*A - 6*B) - 3*a^3*(A - 4*B) - a^2*b*(21*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))))/(3*a^3*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*(3*a^2*A - 5*A*b^2 + 2*a*b*B)*tan(c + d*x))/(3*a^2*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (b*(3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*B)*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 + B*sec(c + d*x))/(a + b*sec(c + d*x))^(5/2), x, 9, -((33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*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))))/(12*a^4*(a - b)*b*(a + b)^(3/2)*d) + ((105*A*b^4 + 5*a*b^3*(7*A - 12*B) + 6*a^4*(A + 2*B) - 5*a^2*b^2*(27*A + 4*B) - a^3*(27*A*b - 84*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))))/(12*a^4*sqrt(a + b)*(a^2 - b^2)*d) - (sqrt(a + b)*(4*a^2*A + 35*A*b^2 - 20*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))))/(4*a^5*d) - ((7*A*b - 4*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*(27*a^2*A*b - 35*A*b^3 - 12*a^3*B + 20*a*b^2*B)*tan(c + d*x))/(12*a^3*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (b*(33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*B)*tan(c + d*x))/(12*a^4*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]

    @test_int [(sec(e + f*x)*(A + A*sec(e + f*x)))/sqrt(a + b*sec(e + f*x)), x, 1, (-2*A*(a - b)*sqrt(a + b)*cot(e + f*x)*Elliptic.E(asin(sqrt(a + b*sec(e + f*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(e + f*x)))/(a + b))*sqrt(-((b*(1 + sec(e + f*x)))/(a - b))))/(b^2*f)]
    @test_int [(sec(e + f*x)*(A - A*sec(e + f*x)))/sqrt(a + b*sec(e + f*x)), x, 1, (2*A*sqrt(a - b)*(a + b)*cot(e + f*x)*Elliptic.E(asin(sqrt(a + b*sec(e + f*x))/sqrt(a - b)), (a - b)/(a + b))*sqrt((b*(1 - sec(e + f*x)))/(a + b))*sqrt(-((b*(1 + sec(e + f*x)))/(a - b))))/(b^2*f)]

    #= ::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))=#

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

    @test_int [sec(c + d*x)^(3/2)*(A + B*sec(c + d*x))*(a + b*sec(c + d*x)), x, 8, -((2*(5*a*A + 3*b*B)*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)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*(5*a*A + 3*b*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*(A*b + a*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d) + (2*b*B*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))*(a + b*sec(c + d*x)), x, 7, -((2*(A*b + a*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d) + (2*(3*a*A + b*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*(A*b + a*B)*sqrt(sec(c + d*x))*sin(c + d*x))/d + (2*b*B*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d)]
    @test_int [sec(c + d*x)^(-1/2)*(A + B*sec(c + d*x))*(a + b*sec(c + d*x)), x, 6, (2*(a*A - b*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*(A*b + a*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*b*B*sqrt(sec(c + d*x))*sin(c + d*x))/d]
    @test_int [sec(c + d*x)^(-3/2)*(A + B*sec(c + d*x))*(a + b*sec(c + d*x)), x, 6, (2*(A*b + a*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*(a*A + 3*b*B)*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)))]
    @test_int [sec(c + d*x)^(-5/2)*(A + B*sec(c + d*x))*(a + b*sec(c + d*x)), x, 7, (2*(3*a*A + 5*b*B)*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)*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))*(a + b*sec(c + d*x)), x, 8, (6*(A*b + a*B)*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)*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)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x)))]

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

    @test_int [sec(c + d*x)^(3/2)*(A + B*sec(c + d*x))*(a + b*sec(c + d*x))^3, x, 10, -((2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d)) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(15*d) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*b*(27*a*A*b + 22*a^2*B + 7*b^2*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(45*d) + (2*b^2*(9*A*b + 13*a*B)*sec(c + d*x)^(7/2)*sin(c + d*x))/(63*d) + (2*b*B*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))*(a + b*sec(c + d*x))^3, x, 9, -((2*(15*a^2*A*b + 3*A*b^3 + 5*a^3*B + 9*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d)) + (2*(21*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 5*b^3*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*(15*a^2*A*b + 3*A*b^3 + 5*a^3*B + 9*a*b^2*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*b*(21*a*A*b + 18*a^2*B + 5*b^2*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(21*d) + (2*b^2*(7*A*b + 11*a*B)*sec(c + d*x)^(5/2)*sin(c + d*x))/(35*d) + (2*b*B*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))*(a + b*sec(c + d*x))^3, x, 8, (2*(5*a^3*A - 15*a*A*b^2 - 15*a^2*b*B - 3*b^3*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(9*a^2*A*b + A*b^3 + 3*a^3*B + 3*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*b*(15*a*A*b + 14*a^2*B + 3*b^2*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*b^2*(5*A*b + 9*a*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(15*d) + (2*b*B*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))*(a + b*sec(c + d*x))^3, x, 8, (2*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/d + (2*(a^3*A + 9*a*A*b^2 + 9*a^2*b*B + b^3*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) - (2*b*(2*a^2*A - 3*A*b^2 - 9*a*b*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*d) - (2*b^2*(a*A - b*B)*sec(c + d*x)^(3/2)*sin(c + d*x))/(3*d) + (2*a*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))*(a + b*sec(c + d*x))^3, x, 8, (2*(3*a^3*A + 15*a*A*b^2 + 15*a^2*b*B - 5*b^3*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(3*a^2*A*b + 3*A*b^3 + a^3*B + 9*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(3*d) + (2*a^2*(9*A*b + 5*a*B)*sin(c + d*x))/(15*d*sqrt(sec(c + d*x))) - (2*b^2*(a*A - 5*b*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(5*d) + (2*a*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))*(a + b*sec(c + d*x))^3, x, 8, (2*(9*a^2*A*b + 5*A*b^3 + 3*a^3*B + 15*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(5*d) + (2*(5*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 21*b^3*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a^2*(11*A*b + 7*a*B)*sin(c + d*x))/(35*d*sec(c + d*x)^(3/2)) + (2*a*(5*a^2*A + 18*A*b^2 + 21*a*b*B)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*a*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))*(a + b*sec(c + d*x))^3, x, 9, (2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(21*d) + (2*a^2*(13*A*b + 9*a*B)*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2)) + (2*a*(7*a^2*A + 22*A*b^2 + 27*a*b*B)*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B)*sin(c + d*x))/(21*d*sqrt(sec(c + d*x))) + (2*a*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)^(-11/2)*(A + B*sec(c + d*x))*(a + b*sec(c + d*x))^3, x, 10, (2*(21*a^2*A*b + 9*A*b^3 + 7*a^3*B + 27*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(15*d) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B)*sqrt(cos(c + d*x))*Elliptic.F((1/2)*(c + d*x), 2)*sqrt(sec(c + d*x)))/(231*d) + (2*a^2*(15*A*b + 11*a*B)*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2)) + (2*a*(9*a^2*A + 26*A*b^2 + 33*a*b*B)*sin(c + d*x))/(77*d*sec(c + d*x)^(5/2)) + (2*(21*a^2*A*b + 9*A*b^3 + 7*a^3*B + 27*a*b^2*B)*sin(c + d*x))/(45*d*sec(c + d*x)^(3/2)) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B)*sin(c + d*x))/(231*d*sqrt(sec(c + d*x))) + (2*a*A*(a + b*sec(c + d*x))^2*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]

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

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

    #= ::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)), x, 13, ((4*A*b + 3*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)))/(4*d*sqrt(a + b*sec(c + d*x))) + ((4*a*A*b - a^2*B + 4*b^2*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)))/(4*b*d*sqrt(a + b*sec(c + d*x))) - ((4*A*b + a*B)*Elliptic.E((c + d*x)/2, (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*A*b + a*B)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*b*d) + (B*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)), x, 12, ((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 [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)))/sqrt(sec(c + d*x)), x, 11, (2*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)))/(d*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))*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)))/(d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x)))]
    @test_int [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)))/sec(c + d*x)^(3/2), x, 8, (2*A*(a^2 - b^2)*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*(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)))/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*(9*a^2*A - 2*A*b^2 + 5*a*b*B)*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)))/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)*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^3*d*sqrt(a + b*sec(c + d*x))) + (2*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B)*Elliptic.E((c + d*x)/2, (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*(25*a^2*A - 4*A*b^2 + 7*a*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*a^2*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)), x, 14, ((42*a*A*b + 17*a^2*B + 16*b^2*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)))/(24*d*sqrt(a + b*sec(c + d*x))) + ((6*a^2*A*b + 8*A*b^3 - a^3*B + 12*a*b^2*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)))/(8*b*d*sqrt(a + b*sec(c + d*x))) - ((30*a*A*b + 3*a^2*B + 16*b^2*B)*Elliptic.E((c + d*x)/2, (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))) + ((30*a*A*b + 3*a^2*B + 16*b^2*B)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*b*d) + ((6*A*b + 7*a*B)*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*d) + (b*B*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))*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 13, ((8*a^2*A + 4*A*b^2 + 7*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)))/(4*d*sqrt(a + b*sec(c + d*x))) + ((12*a*A*b + 3*a^2*B + 4*b^2*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)))/(4*d*sqrt(a + b*sec(c + d*x))) - ((4*A*b + 5*a*B)*Elliptic.E((c + d*x)/2, (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*A*b + 5*a*B)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (b*B*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d)]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)))/sqrt(sec(c + d*x)), x, 12, ((2*a*A*b + 2*a^2*B + b^2*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))) + (b*(2*A*b + 3*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))) + ((2*a*A - b*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*B*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/d]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)))/sec(c + d*x)^(3/2), x, 12, (2*(a^2*A - A*b^2 + 3*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)))/(3*d*sqrt(a + b*sec(c + d*x))) + (2*b^2*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))) + (2*(4*A*b + 3*a*B)*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))*sqrt(sec(c + d*x))) + (2*a*A*sqrt(a + b*sec(c + d*x))*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)))/sec(c + d*x)^(5/2), x, 9, (2*(a^2 - b^2)*(3*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*d*sqrt(a + b*sec(c + d*x))) + (2*(9*a^2*A + 3*A*b^2 + 20*a*b*B)*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))*sqrt(sec(c + d*x))) + (2*a*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(5*d*sec(c + d*x)^(3/2)) + (2*(6*A*b + 5*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(15*d*sqrt(sec(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)))/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)*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^2*d*sqrt(a + b*sec(c + d*x))) + (2*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B)*Elliptic.E((c + d*x)/2, (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*a*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(7*d*sec(c + d*x)^(5/2)) + (2*(8*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*(25*a^2*A + 3*A*b^2 + 42*a*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*a*d*sqrt(sec(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)))/sec(c + d*x)^(9/2), x, 11, (2*(a^2 - b^2)*(39*a^2*A*b + 8*A*b^3 + 75*a^3*B - 18*a*b^2*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)))/(315*a^3*d*sqrt(a + b*sec(c + d*x))) + (2*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B)*Elliptic.E((c + d*x)/2, (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*A*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(9*d*sec(c + d*x)^(7/2)) + (2*(10*A*b + 9*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(63*d*sec(c + d*x)^(5/2)) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a*d*sec(c + d*x)^(3/2)) + (2*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a^2*d*sqrt(sec(c + d*x)))]

    @test_int [sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x)), x, 15, ((472*a^2*A*b + 128*A*b^3 + 133*a^3*B + 356*a*b^2*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)))/(192*d*sqrt(a + b*sec(c + d*x))) + ((40*a^3*A*b + 160*a*A*b^3 - 5*a^4*B + 120*a^2*b^2*B + 48*b^4*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)))/(64*b*d*sqrt(a + b*sec(c + d*x))) - ((264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*Elliptic.E((c + d*x)/2, (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*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*b*d) + ((104*a*A*b + 59*a^2*B + 36*b^2*B)*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(96*d) + (b*(8*A*b + 11*a*B)*sec(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + (b*B*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))^(5/2)*(A + B*sec(c + d*x)), x, 14, ((48*a^3*A + 66*a*A*b^2 + 59*a^2*b*B + 16*b^3*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)))/(24*d*sqrt(a + b*sec(c + d*x))) + ((30*a^2*A*b + 8*A*b^3 + 5*a^3*B + 20*a*b^2*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)))/(8*d*sqrt(a + b*sec(c + d*x))) - ((54*a*A*b + 33*a^2*B + 16*b^2*B)*Elliptic.E((c + d*x)/2, (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))) + ((54*a*A*b + 33*a^2*B + 16*b^2*B)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d) + (b*(2*A*b + 3*a*B)*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (b*B*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))^(5/2)*(A + B*sec(c + d*x)))/sqrt(sec(c + d*x)), x, 13, ((16*a^2*A*b + 4*A*b^3 + 8*a^3*B + 11*a*b^2*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)))/(4*d*sqrt(a + b*sec(c + d*x))) + (b*(20*a*A*b + 15*a^2*B + 4*b^2*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)))/(4*d*sqrt(a + b*sec(c + d*x))) + ((8*a^2*A - 4*A*b^2 - 9*a*b*B)*Elliptic.E((c + d*x)/2, (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))) + (b*(4*A*b + 7*a*B)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d) + (b*B*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))^(5/2)*(A + B*sec(c + d*x)))/sec(c + d*x)^(3/2), x, 13, ((2*a^3*A + 4*a*A*b^2 + 12*a^2*b*B + 3*b^3*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)))/(3*d*sqrt(a + b*sec(c + d*x))) + (b^2*(2*A*b + 5*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))) + ((14*a*A*b + 6*a^2*B - 3*b^2*B)*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))*sqrt(sec(c + d*x))) - (b*(2*a*A - 3*b*B)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d) + (2*a*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))^(5/2)*(A + B*sec(c + d*x)))/sec(c + d*x)^(5/2), x, 13, (2*(8*a^2*A*b - 8*A*b^3 + 5*a^3*B + 10*a*b^2*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*d*sqrt(a + b*sec(c + d*x))) + (2*b^3*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))) + (2*(9*a^2*A + 23*A*b^2 + 35*a*b*B)*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))) + (2*a*(8*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*(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))^(5/2)*(A + B*sec(c + d*x)))/sec(c + d*x)^(7/2), x, 10, (2*(a^2 - b^2)*(25*a^2*A + 15*A*b^2 + 56*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)))/(105*a*d*sqrt(a + b*sec(c + d*x))) + (2*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B)*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*a*(10*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*(25*a^2*A + 45*A*b^2 + 77*a*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*d*sqrt(sec(c + d*x))) + (2*a*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))^(5/2)*(A + B*sec(c + d*x)))/sec(c + d*x)^(9/2), x, 11, (2*(a^2 - b^2)*(114*a^2*A*b - 10*A*b^3 + 75*a^3*B + 45*a*b^2*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)))/(315*a^2*d*sqrt(a + b*sec(c + d*x))) + (2*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B)*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*a*(4*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*(49*a^2*A + 75*A*b^2 + 135*a*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*d*sec(c + d*x)^(3/2)) + (2*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a*d*sqrt(sec(c + d*x))) + (2*a*A*(a + b*sec(c + d*x))^(3/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)))/sec(c + d*x)^(11/2), x, 12, (2*(a^2 - b^2)*(675*a^4*A + 285*a^2*A*b^2 + 40*A*b^4 + 1254*a^3*b*B - 110*a*b^3*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)))/(3465*a^3*d*sqrt(a + b*sec(c + d*x))) + (2*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B)*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*a*(14*A*b + 11*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(99*d*sec(c + d*x)^(7/2)) + (2*(81*a^2*A + 113*A*b^2 + 209*a*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(693*d*sec(c + d*x)^(5/2)) + (2*(1145*a^2*A*b + 15*A*b^3 + 539*a^3*B + 825*a*b^2*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3465*a*d*sec(c + d*x)^(3/2)) + (2*(675*a^4*A + 1025*a^2*A*b^2 - 20*A*b^4 + 1793*a^3*b*B + 55*a*b^3*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3465*a^2*d*sqrt(sec(c + d*x))) + (2*a*A*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(11*d*sec(c + d*x)^(9/2))]

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

    @test_int [(sec(c + d*x)^(5/2)*(A + B*sec(c + d*x)))/sqrt(a + b*sec(c + d*x)), x, 13, ((4*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)))/(4*b*d*sqrt(a + b*sec(c + d*x))) - ((4*a*A*b - 3*a^2*B - 4*b^2*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)))/(4*b^2*d*sqrt(a + b*sec(c + d*x))) - ((4*A*b - 3*a*B)*Elliptic.E((c + d*x)/2, (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*A*b - 3*a*B)*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*b^2*d) + (B*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*b*d)]
    @test_int [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x)))/sqrt(a + b*sec(c + d*x)), x, 12, (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)))/(b*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)))/(b*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))/(b*d)]
    @test_int [(sqrt(sec(c + d*x))*(A + B*sec(c + d*x)))/sqrt(a + b*sec(c + d*x)), x, 7, (2*A*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*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)))]
    @test_int [(A + B*sec(c + d*x))/(sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))), x, 7, (-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*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))/(sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))), x, 8, (2*(a^2*A + 2*A*b^2 - 3*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)))/(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))/(sec(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))), x, 9, (-2*(7*a^2*A*b + 8*A*b^3 - 5*a^3*B - 10*a*b^2*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^3*d*sqrt(a + b*sec(c + d*x))) + (2*(9*a^2*A + 8*A*b^2 - 10*a*b*B)*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 [(sec(c + d*x)^(5/2)*(A + B*sec(c + d*x)))/(a + b*sec(c + d*x))^(3/2), x, 13, (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)))/(b*d*sqrt(a + b*sec(c + d*x))) + ((2*A*b - 3*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)))/(b^2*d*sqrt(a + b*sec(c + d*x))) + ((2*a*A*b - 3*a^2*B + b^2*B)*Elliptic.E((c + d*x)/2, (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*(A*b - a*B)*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*A*b - 3*a^2*B + b^2*B)*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 [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x)))/(a + b*sec(c + d*x))^(3/2), x, 9, (2*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)))/(b*d*sqrt(a + b*sec(c + d*x))) - (2*(A*b - a*B)*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(b*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*a*(A*b - a*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(sqrt(sec(c + d*x))*(A + B*sec(c + d*x)))/(a + b*sec(c + d*x))^(3/2), x, 8, (2*A*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*(A*b - a*B)*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(a*(a^2 - b^2)*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) - (2*(A*b - a*B)*sqrt(sec(c + d*x))*sin(c + d*x))/((a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x))/(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((c + d*x)/2, (2*a)/(a + b))*sqrt(sec(c + d*x)))/(a^2*d*sqrt(a + b*sec(c + d*x))) + (2*(a^2*A - 2*A*b^2 + a*b*B)*Elliptic.E((c + d*x)/2, (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*b*(A*b - a*B)*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))/(sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(3/2)), x, 9, (2*(a^2*A + 8*A*b^2 - 6*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)))/(3*a^3*d*sqrt(a + b*sec(c + d*x))) - (2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Elliptic.E((c + d*x)/2, (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*b*(A*b - a*B)*sin(c + d*x))/(a*(a^2 - b^2)*d*sqrt(sec(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(a^2*A - 4*A*b^2 + 3*a*b*B)*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))/(sec(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(3/2)), x, 10, (-2*(12*a^2*A*b + 48*A*b^3 - 5*a^3*B - 40*a*b^2*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^4*d*sqrt(a + b*sec(c + d*x))) + (2*(9*a^4*A + 24*a^2*A*b^2 - 48*A*b^4 - 25*a^3*b*B + 40*a*b^3*B)*Elliptic.E((c + d*x)/2, (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*b*(A*b - a*B)*sin(c + d*x))/(a*(a^2 - b^2)*d*sec(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))) + (2*(a^2*A - 6*A*b^2 + 5*a*b*B)*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*(9*a^2*A*b - 24*A*b^3 - 5*a^3*B + 20*a*b^2*B)*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)))/(a + b*sec(c + d*x))^(5/2), x, 13, (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)))/(3*b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*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)))/(b^2*d*sqrt(a + b*sec(c + d*x))) + (2*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*b^2*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*a*(A*b - a*B)*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*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*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 [(sec(c + d*x)^(3/2)*(A + B*sec(c + d*x)))/(a + b*sec(c + d*x))^(5/2), x, 9, (-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)))/(3*a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) - (2*(3*a^2*A + A*b^2 - 4*a*b*B)*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*a*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))*sqrt(sec(c + d*x))) + (2*a*(A*b - a*B)*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*(2*a^2*A*b + 2*A*b^3 + a^3*B - 5*a*b^2*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*b*(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)))/(a + b*sec(c + d*x))^(5/2), x, 9, (2*(3*a^2*A - 2*A*b^2 - 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)))/(3*a^2*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B)*Elliptic.E((c + d*x)/2, (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 - a*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*(a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) - (2*(5*a^2*A*b - A*b^3 - 2*a^3*B - 2*a*b^2*B)*sqrt(sec(c + d*x))*sin(c + d*x))/(3*a*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [(A + B*sec(c + d*x))/(sqrt(sec(c + d*x))*(a + b*sec(c + d*x))^(5/2)), x, 9, (-2*(9*a^2*A*b - 8*A*b^3 - 3*a^3*B + 2*a*b^2*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)))/(3*a^3*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B)*Elliptic.E((c + d*x)/2, (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*b*(A*b - a*B)*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*b*(8*a^2*A*b - 4*A*b^3 - 5*a^3*B + a*b^2*B)*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))/(sec(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(5/2)), x, 10, (2*(a^4*A + 16*a^2*A*b^2 - 16*A*b^4 - 9*a^3*b*B + 8*a*b^3*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)))/(3*a^4*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) - (2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B)*Elliptic.E((c + d*x)/2, (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*b*(A*b - a*B)*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*b*(10*a^2*A*b - 6*A*b^3 - 7*a^3*B + 3*a*b^2*B)*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*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B)*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))/(sec(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(5/2)), x, 11, (-2*(17*a^4*A*b + 116*a^2*A*b^3 - 128*A*b^5 - 5*a^5*B - 80*a^3*b^2*B + 80*a*b^4*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^5*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(9*a^6*A + 55*a^4*A*b^2 - 212*a^2*A*b^4 + 128*A*b^6 - 40*a^5*b*B + 140*a^3*b^3*B - 80*a*b^5*B)*Elliptic.E((c + d*x)/2, (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*b*(A*b - a*B)*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*b*(12*a^2*A*b - 8*A*b^3 - 9*a^3*B + 5*a*b^2*B)*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*(3*a^4*A - 71*a^2*A*b^2 + 48*A*b^4 + 50*a^3*b*B - 30*a*b^3*B)*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*(14*a^4*A*b - 98*a^2*A*b^3 + 64*A*b^5 - 5*a^5*B + 65*a^3*b^2*B - 40*a*b^4*B)*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))=#

    @test_int [(A + B*sec(c + d*x))*(a + b*sec(c + d*x))^(2/3), x, 4, (sqrt(2)*B*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))/(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))*(a + b*sec(c + d*x))^(1/3), x, 4, (sqrt(2)*B*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))/(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))/(a + b*sec(c + d*x))^(1/3), x, 4, (sqrt(2)*B*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))/(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))/(a + b*sec(c + d*x))^(2/3), x, 4, (sqrt(2)*B*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))/(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))*with*m*and/or*n*symbolic=#

    @test_int [(c*sec(e + f*x))^n*(a + b*sec(e + f*x))^m*(A + B*sec(e + f*x)), x, 0, Unintegrable((c*sec(e + f*x))^n*(a + b*sec(e + f*x))^m*(A + B*sec(e + f*x)), x)]

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

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

    #= ::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))=#

    #= ::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))=#

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

    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 8, (6*a*(A + B)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (2*a*(5*A + 7*B)*Elliptic.F((c + d*x)/2, 2))/(21*d) + (2*a*(5*A + 7*B)*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)), x, 7, (2*a*(3*A + 5*B)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (2*a*(A + B)*Elliptic.F((c + d*x)/2, 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)), x, 6, (2*a*(A + B)*Elliptic.E((c + d*x)/2, 2))/d + (2*a*(A + 3*B)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (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)), x, 6, (2*a*(A - B)*Elliptic.E((c + d*x)/2, 2))/d + (2*a*(A + B)*Elliptic.F((c + d*x)/2, 2))/d + (2*a*B*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))*(A + B*sec(c + d*x)))/sqrt(cos(c + d*x)), x, 7, (-2*a*(A + B)*Elliptic.E((c + d*x)/2, 2))/d + (2*a*(3*A + B)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*a*B*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*a*(A + B)*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))*(A + B*sec(c + d*x)))/cos(c + d*x)^(3/2), x, 8, (-2*a*(5*A + 3*B)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (2*a*(A + B)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*a*B*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*a*(A + B)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*a*(5*A + 3*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))^2*(A + B*sec(c + d*x)), x, 9, (4*a^2*(8*A + 9*B)*Elliptic.E((1/2)*(c + d*x), 2))/(15*d) + (4*a^2*(5*A + 6*B)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (4*a^2*(5*A + 6*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (4*a^2*(8*A + 9*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(45*d) + (2*a^2*(11*A + 9*B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(63*d) + (2*A*cos(c + d*x)^(5/2)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)), x, 8, (4*a^2*(3*A + 4*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (4*a^2*(6*A + 7*B)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (4*a^2*(6*A + 7*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a^2*(9*A + 7*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*d) + (2*A*cos(c + d*x)^(3/2)*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)), x, 7, (4*a^2*(4*A + 5*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (4*a^2*(A + 2*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a^2*(7*A + 5*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*A*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)), x, 7, (4*a^2*A*Elliptic.E((1/2)*(c + d*x), 2))/d + (4*a^2*(2*A + 3*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a^2*(A - 3*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*d) + (2*B*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)), x, 7, -((4*a^2*B*Elliptic.E((1/2)*(c + d*x), 2))/d) + (4*a^2*(3*A + 2*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a^2*(3*A + 5*B)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))) + (2*B*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)))/sqrt(cos(c + d*x)), x, 8, -((4*a^2*(5*A + 4*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (4*a^2*(2*A + B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a^2*(5*A + 7*B)*sin(c + d*x))/(15*d*cos(c + d*x)^(3/2)) + (4*a^2*(5*A + 4*B)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))) + (2*B*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^2*(A + B*sec(c + d*x)))/cos(c + d*x)^(3/2), x, 9, -((4*a^2*(4*A + 3*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (4*a^2*(7*A + 6*B)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*a^2*(7*A + 9*B)*sin(c + d*x))/(35*d*cos(c + d*x)^(5/2)) + (4*a^2*(7*A + 6*B)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2)) + (4*a^2*(4*A + 3*B)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))) + (2*B*(a^2 + a^2*cos(c + d*x))*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2))]

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

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x)), x, 7, (3*(7*A - 5*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*a*d) - (5*(A - B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a*d) - (5*(A - B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a*d) + ((7*A - 5*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*a*d) - ((A - B)*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)))/(a + a*sec(c + d*x)), x, 6, -((3*(A - B)*Elliptic.E((1/2)*(c + d*x), 2))/(a*d)) + ((5*A - 3*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a*d) + ((5*A - 3*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a*d) - ((A - B)*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 + B*sec(c + d*x)))/(a + a*sec(c + d*x)), x, 5, ((3*A - B)*Elliptic.E((1/2)*(c + d*x), 2))/(a*d) - ((A - B)*Elliptic.F((1/2)*(c + d*x), 2))/(a*d) - ((A - B)*sqrt(cos(c + d*x))*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x))/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))), x, 5, -(((A - B)*Elliptic.E((1/2)*(c + d*x), 2))/(a*d)) + ((A + B)*Elliptic.F((1/2)*(c + d*x), 2))/(a*d) + ((A - B)*sqrt(cos(c + d*x))*sin(c + d*x))/(d*(a + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x))/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))), x, 6, ((A - 3*B)*Elliptic.E((1/2)*(c + d*x), 2))/(a*d) + ((A - B)*Elliptic.F((1/2)*(c + d*x), 2))/(a*d) - ((A - 3*B)*sin(c + d*x))/(a*d*sqrt(cos(c + d*x))) + ((A - B)*sin(c + d*x))/(d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x)))]
    @test_int [(A + B*sec(c + d*x))/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))), x, 7, -((3*(A - B)*Elliptic.E((1/2)*(c + d*x), 2))/(a*d)) - ((3*A - 5*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a*d) - ((3*A - 5*B)*sin(c + d*x))/(3*a*d*cos(c + d*x)^(3/2)) + (3*(A - B)*sin(c + d*x))/(a*d*sqrt(cos(c + d*x))) + ((A - B)*sin(c + d*x))/(d*cos(c + d*x)^(3/2)*(a + a*cos(c + d*x)))]

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x))^2, x, 8, (7*(8*A - 5*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*a^2*d) - (5*(3*A - 2*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) - (5*(3*A - 2*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d) + (7*(8*A - 5*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15*a^2*d) - ((3*A - 2*B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(a^2*d*(1 + cos(c + d*x))) - ((A - B)*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)))/(a + a*sec(c + d*x))^2, x, 7, -(((7*A - 4*B)*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d)) + (5*(2*A - B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) + (5*(2*A - B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d) - ((7*A - 4*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(3*a^2*d*(1 + cos(c + d*x))) - ((A - B)*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 + B*sec(c + d*x)))/(a + a*sec(c + d*x))^2, x, 6, ((4*A - B)*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d) - ((5*A - 2*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) - ((5*A - 2*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3*a^2*d*(1 + cos(c + d*x))) - ((A - B)*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))/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^2), x, 6, -((A*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d)) + ((2*A + B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) + (A*sqrt(cos(c + d*x))*sin(c + d*x))/(a^2*d*(1 + cos(c + d*x))) - ((A - B)*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))/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^2), x, 6, (B*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d) + ((A + 2*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) - (B*sqrt(cos(c + d*x))*sin(c + d*x))/(a^2*d*(1 + cos(c + d*x))) + ((A - B)*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))/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^2), x, 7, ((A - 4*B)*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d) + ((2*A - 5*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) - ((A - 4*B)*sin(c + d*x))/(a^2*d*sqrt(cos(c + d*x))) + ((2*A - 5*B)*sin(c + d*x))/(3*a^2*d*sqrt(cos(c + d*x))*(1 + cos(c + d*x))) + ((A - B)*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))/(cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^2), x, 8, -(((4*A - 7*B)*Elliptic.E((1/2)*(c + d*x), 2))/(a^2*d)) - (5*(A - 2*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*a^2*d) - (5*(A - 2*B)*sin(c + d*x))/(3*a^2*d*cos(c + d*x)^(3/2)) + ((4*A - 7*B)*sin(c + d*x))/(a^2*d*sqrt(cos(c + d*x))) + ((4*A - 7*B)*sin(c + d*x))/(3*a^2*d*cos(c + d*x)^(3/2)*(1 + cos(c + d*x))) + ((A - B)*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)^(3/2)*(A + B*sec(c + d*x)))/(a + a*sec(c + d*x))^3, x, 8, -((7*(17*A - 7*B)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d)) + ((33*A - 13*B)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) + ((33*A - 13*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(6*a^3*d) - ((A - B)*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) - (7*(17*A - 7*B)*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 + B*sec(c + d*x)))/(a + a*sec(c + d*x))^3, x, 7, ((49*A - 9*B)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d) - ((13*A - 3*B)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) - ((A - B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - ((8*A - 3*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) - ((13*A - 3*B)*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))/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^3), x, 7, -(((9*A + B)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d)) + ((3*A + B)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) - ((A - B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) - ((6*A - B)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) + ((9*A + B)*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))/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^3), x, 7, -(((A - B)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d)) + ((A + B)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) - ((A - B)*sqrt(cos(c + d*x))*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) + ((4*A + B)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) + ((A - B)*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))/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^3), x, 7, ((A + 9*B)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d) + ((A + 3*B)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) + ((A - B)*sqrt(cos(c + d*x))*sin(c + d*x))/(5*d*(a + a*cos(c + d*x))^3) + ((A - 6*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*a*d*(a + a*cos(c + d*x))^2) - ((A + 9*B)*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))/(cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^3), x, 8, ((9*A - 49*B)*Elliptic.E((1/2)*(c + d*x), 2))/(10*a^3*d) + ((3*A - 13*B)*Elliptic.F((1/2)*(c + d*x), 2))/(6*a^3*d) - ((9*A - 49*B)*sin(c + d*x))/(10*a^3*d*sqrt(cos(c + d*x))) + ((A - B)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^3) + ((3*A - 8*B)*sin(c + d*x))/(15*a*d*sqrt(cos(c + d*x))*(a + a*cos(c + d*x))^2) + ((3*A - 13*B)*sin(c + d*x))/(6*d*sqrt(cos(c + d*x))*(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+B*sec(e+f*x))=#

    #= ::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)), x, 6, (32*a*(8*A + 9*B)*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a*(8*A + 9*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (4*a*(8*A + 9*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(8*A + 9*B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(63*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*cos(c + d*x)^(7/2)*sin(c + d*x))/(9*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 5, (16*a*(6*A + 7*B)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (8*a*(6*A + 7*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a*(6*A + 7*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*d*sqrt(a + a*sec(c + d*x))) + (2*a*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)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 4, (4*a*(4*A + 5*B)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a*(4*A + 5*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d*sqrt(a + a*sec(c + d*x))) + (2*a*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)*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 3, (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 [sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)), x, 4, (2*sqrt(a)*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)))/d + (2*a*A*sin(c + d*x))/(d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)))/sqrt(cos(c + d*x)), x, 4, (sqrt(a)*(2*A + 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)))/d + (a*B*sin(c + d*x))/(d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)))/cos(c + d*x)^(3/2), x, 5, (sqrt(a)*(4*A + 3*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)))/(4*d) + (a*B*sin(c + d*x))/(2*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a*(4*A + 3*B)*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x)))]
    @test_int [(sqrt(a + a*sec(c + d*x))*(A + B*sec(c + d*x)))/cos(c + d*x)^(5/2), x, 6, (sqrt(a)*(6*A + 5*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)))/(8*d) + (a*B*sin(c + d*x))/(3*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + (a*(6*A + 5*B)*sin(c + d*x))/(12*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a*(6*A + 5*B)*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)^(11/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 7, (32*a^2*(168*A + 187*B)*sin(c + d*x))/(3465*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^2*(168*A + 187*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3465*d*sqrt(a + a*sec(c + d*x))) + (4*a^2*(168*A + 187*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(1155*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(168*A + 187*B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(12*A + 11*B)*cos(c + d*x)^(7/2)*sin(c + d*x))/(99*d*sqrt(a + a*sec(c + d*x))) + (2*a*A*cos(c + d*x)^(9/2)*sqrt(a + a*sec(c + d*x))*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)), x, 6, (16*a^2*(34*A + 39*B)*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (8*a^2*(34*A + 39*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(34*A + 39*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(10*A + 9*B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(63*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))/(9*d)]
    @test_int [cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 5, (4*a^2*(52*A + 63*B)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a^2*(52*A + 63*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(105*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(8*A + 7*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*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))/(7*d)]
    @test_int [cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 4, (8*a^2*(3*A + 5*B)*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)), x, 5, (2*a^(3/2)*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)))/d + (2*a^2*(4*A + 3*B)*sin(c + d*x))/(3*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))/(3*d)]
    @test_int [sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 5, (a^(3/2)*(2*A + 3*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)))/d + (a^2*(2*A - B)*sin(c + d*x))/(d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (a*B*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)))/sqrt(cos(c + d*x)), x, 5, (a^(3/2)*(12*A + 7*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)))/(4*d) + (a^2*(4*A + 5*B)*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a*B*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(2*d*cos(c + d*x)^(3/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)))/cos(c + d*x)^(3/2), x, 6, (a^(3/2)*(14*A + 11*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)))/(8*d) + (a^2*(6*A + 7*B)*sin(c + d*x))/(12*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(14*A + 11*B)*sin(c + d*x))/(8*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a*B*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*d*cos(c + d*x)^(5/2))]
    @test_int [((a + a*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)))/cos(c + d*x)^(5/2), x, 7, (a^(3/2)*(88*A + 75*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)))/(64*d) + (a^2*(8*A + 9*B)*sin(c + d*x))/(24*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(88*A + 75*B)*sin(c + d*x))/(96*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(88*A + 75*B)*sin(c + d*x))/(64*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a*B*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))^(5/2)*(A + B*sec(c + d*x)), x, 7, (16*a^3*(710*A + 803*B)*sin(c + d*x))/(3465*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (8*a^3*(710*A + 803*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(3465*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(710*A + 803*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(1155*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(194*A + 209*B)*cos(c + d*x)^(5/2)*sin(c + d*x))/(693*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(14*A + 11*B)*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(99*d) + (2*a*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))^(5/2)*(A + B*sec(c + d*x)), x, 6, (4*a^3*(292*A + 345*B)*sin(c + d*x))/(315*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a^3*(292*A + 345*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a^3*(124*A + 135*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(315*d*sqrt(a + a*sec(c + d*x))) + (2*a^2*(4*A + 3*B)*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(21*d) + (2*a*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))^(5/2)*(A + B*sec(c + d*x)), x, 5, (64*a^3*(5*A + 7*B)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (16*a^2*(5*A + 7*B)*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)), x, 6, (2*a^(5/2)*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)))/d + (2*a^3*(32*A + 35*B)*sin(c + d*x))/(15*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*a^2*(8*A + 5*B)*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(15*d) + (2*a*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))^(5/2)*(A + B*sec(c + d*x)), x, 6, (a^(5/2)*(2*A + 5*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)))/d + (a^3*(14*A + 3*B)*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - (a^2*(2*A - 3*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(3*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)]
    @test_int [sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x)), x, 6, (a^(5/2)*(20*A + 19*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)))/(4*d) + (a^3*(4*A - 9*B)*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (a^2*(4*A + 7*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))) + (a*B*(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))^(5/2)*(A + B*sec(c + d*x)))/sqrt(cos(c + d*x)), x, 6, (a^(5/2)*(38*A + 25*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)))/(8*d) + (a^3*(54*A + 49*B)*sin(c + d*x))/(24*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(2*A + 3*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)) + (a*B*(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))^(5/2)*(A + B*sec(c + d*x)))/cos(c + d*x)^(3/2), x, 7, (a^(5/2)*(200*A + 163*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)))/(64*d) + (a^3*(104*A + 95*B)*sin(c + d*x))/(96*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^3*(200*A + 163*B)*sin(c + d*x))/(64*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(8*A + 11*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(24*d*cos(c + d*x)^(5/2)) + (a*B*(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))^(5/2)*(A + B*sec(c + d*x)))/cos(c + d*x)^(5/2), x, 8, (a^(5/2)*(326*A + 283*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)))/(128*d) + (a^3*(170*A + 157*B)*sin(c + d*x))/(240*d*cos(c + d*x)^(7/2)*sqrt(a + a*sec(c + d*x))) + (a^3*(326*A + 283*B)*sin(c + d*x))/(192*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + (a^3*(326*A + 283*B)*sin(c + d*x))/(128*d*cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))) + (a^2*(10*A + 13*B)*sqrt(a + a*sec(c + d*x))*sin(c + d*x))/(40*d*cos(c + d*x)^(7/2)) + (a*B*(a + a*sec(c + d*x))^(3/2)*sin(c + d*x))/(5*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)))/sqrt(a + a*sec(c + d*x)), x, 7, (sqrt(2)*(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*(43*A - 91*B)*sin(c + d*x))/(105*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + (2*(31*A - 7*B)*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)))/sqrt(a + a*sec(c + d*x)), x, 6, -((sqrt(2)*(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*(13*A - 5*B)*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)))/sqrt(a + a*sec(c + d*x)), x, 5, (sqrt(2)*(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 - 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 [(sqrt(cos(c + d*x))*(A + B*sec(c + d*x)))/sqrt(a + a*sec(c + d*x)), x, 4, -((sqrt(2)*(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*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))/(sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))), x, 6, (2*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)*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)]
    @test_int [(A + B*sec(c + d*x))/(cos(c + d*x)^(3/2)*sqrt(a + a*sec(c + d*x))), x, 7, ((2*A - 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)*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) + (B*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))/(cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))), x, 8, -(((4*A - 7*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)))/(4*sqrt(a)*d)) + (sqrt(2)*(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) + (B*sin(c + d*x))/(2*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + ((4*A - B)*sin(c + d*x))/(4*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)))/(a + a*sec(c + d*x))^(3/2), x, 7, -(((15*A - 11*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)))/(2*sqrt(2)*a^(3/2)*d)) - ((A - B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) + ((147*A - 95*B)*sin(c + d*x))/(30*a*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((39*A - 35*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(30*a*d*sqrt(a + a*sec(c + d*x))) + ((9*A - 5*B)*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)))/(a + a*sec(c + d*x))^(3/2), x, 6, ((11*A - 7*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)))/(2*sqrt(2)*a^(3/2)*d) - ((A - B)*sqrt(cos(c + d*x))*sin(c + d*x))/(2*d*(a + a*sec(c + d*x))^(3/2)) - ((19*A - 15*B)*sin(c + d*x))/(6*a*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((7*A - 3*B)*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 + B*sec(c + d*x)))/(a + a*sec(c + d*x))^(3/2), x, 5, -(((7*A - 3*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)))/(2*sqrt(2)*a^(3/2)*d)) - ((A - B)*sin(c + d*x))/(2*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((5*A - B)*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))/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)), x, 4, ((3*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)))/(2*sqrt(2)*a^(3/2)*d) - ((A - B)*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))/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(3/2)), x, 7, (2*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)))/(a^(3/2)*d) + ((A - 5*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)))/(2*sqrt(2)*a^(3/2)*d) + ((A - B)*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))/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)), x, 8, ((2*A - 3*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)))/(a^(3/2)*d) - ((5*A - 9*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)))/(2*sqrt(2)*a^(3/2)*d) + ((A - B)*sin(c + d*x))/(2*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)) - ((A - 3*B)*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))/(cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)), x, 9, -(((12*A - 19*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)))/(4*a^(3/2)*d)) + ((9*A - 13*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)))/(2*sqrt(2)*a^(3/2)*d) + ((A - B)*sin(c + d*x))/(2*d*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(3/2)) - ((A - 2*B)*sin(c + d*x))/(2*a*d*cos(c + d*x)^(5/2)*sqrt(a + a*sec(c + d*x))) + ((6*A - 7*B)*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)))/(a + a*sec(c + d*x))^(5/2), x, 8, -(((283*A - 163*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)))/(16*sqrt(2)*a^(5/2)*d)) - ((A - B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((21*A - 13*B)*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)*sin(c + d*x))/(240*a^2*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) - ((787*A - 475*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(240*a^2*d*sqrt(a + a*sec(c + d*x))) + ((157*A - 85*B)*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)))/(a + a*sec(c + d*x))^(5/2), x, 7, ((163*A - 75*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)))/(16*sqrt(2)*a^(5/2)*d) - ((A - B)*sqrt(cos(c + d*x))*sin(c + d*x))/(4*d*(a + a*sec(c + d*x))^(5/2)) - ((17*A - 9*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(16*a*d*(a + a*sec(c + d*x))^(3/2)) - ((299*A - 147*B)*sin(c + d*x))/(48*a^2*d*sqrt(cos(c + d*x))*sqrt(a + a*sec(c + d*x))) + ((95*A - 39*B)*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 + B*sec(c + d*x)))/(a + a*sec(c + d*x))^(5/2), x, 6, -(((75*A - 19*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)))/(16*sqrt(2)*a^(5/2)*d)) - ((A - B)*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)) - ((13*A - 5*B)*sin(c + d*x))/(16*a*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + ((49*A - 9*B)*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))/(sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)), x, 6, ((19*A + 5*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)))/(16*sqrt(2)*a^(5/2)*d) + ((A - B)*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(5/2)) + ((5*A + 3*B)*sin(c + d*x))/(16*a*d*sqrt(cos(c + d*x))*(a + a*sec(c + d*x))^(3/2)) - ((9*A - B)*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))/(cos(c + d*x)^(3/2)*(a + a*sec(c + d*x))^(5/2)), x, 5, ((5*A + 3*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)))/(16*sqrt(2)*a^(5/2)*d) - ((A - B)*sin(c + d*x))/(4*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)) + ((5*A + 3*B)*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))/(cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)), x, 8, (2*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)))/(a^(5/2)*d) + ((3*A - 43*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)))/(16*sqrt(2)*a^(5/2)*d) + ((A - B)*sin(c + d*x))/(4*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(5/2)) + ((3*A - 11*B)*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))/(cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)), x, 9, ((2*A - 5*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)))/(a^(5/2)*d) - ((43*A - 115*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)))/(16*sqrt(2)*a^(5/2)*d) + ((A - B)*sin(c + d*x))/(4*d*cos(c + d*x)^(7/2)*(a + a*sec(c + d*x))^(5/2)) + ((7*A - 15*B)*sin(c + d*x))/(16*a*d*cos(c + d*x)^(5/2)*(a + a*sec(c + d*x))^(3/2)) - ((11*A - 35*B)*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+b*sec(e+f*x))^m*(A+B*sec(e+f*x))=#

    #= ::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))=#

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

    @test_int [cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))*(A + B*sec(c + d*x)), x, 8, (6*(A*b + a*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(5*a*A + 7*b*B)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*(5*a*A + 7*b*B)*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)), x, 7, (2*(3*a*A + 5*b*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(A*b + a*B)*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)), x, 6, (2*(A*b + a*B)*Elliptic.E((c + d*x)/2, 2))/d + (2*(a*A + 3*b*B)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (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)), x, 6, (2*(a*A - b*B)*Elliptic.E((c + d*x)/2, 2))/d + (2*(A*b + a*B)*Elliptic.F((c + d*x)/2, 2))/d + (2*b*B*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(a + b*sec(c + d*x))*(A + B*sec(c + d*x))/cos(c + d*x)^(1/2), x, 7, (-2*(A*b + a*B)*Elliptic.E((c + d*x)/2, 2))/d + (2*(3*a*A + b*B)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*b*B*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*(A*b + a*B)*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(a + b*sec(c + d*x))*(A + B*sec(c + d*x))/cos(c + d*x)^(3/2), x, 8, (-2*(5*a*A + 3*b*B)*Elliptic.E((c + d*x)/2, 2))/(5*d) + (2*(A*b + a*B)*Elliptic.F((c + d*x)/2, 2))/(3*d) + (2*b*B*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*(A*b + a*B)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*(5*a*A + 3*b*B)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]

    @test_int [cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^2*(A + B*sec(c + d*x)), x, 7, (2*(6*a*A*b + 3*a^2*B + 5*b^2*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(5*a^2*A + 7*b*(A*b + 2*a*B))*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*(5*a^2*A + 7*b*(A*b + 2*a*B))*sqrt(cos(c + d*x))*sin(c + d*x))/(21*d) + (2*a*(9*A*b + 7*a*B)*cos(c + d*x)^(3/2)*sin(c + d*x))/(35*d) + (2*a*A*cos(c + d*x)^(3/2)*(b + a*cos(c + d*x))*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)), x, 6, (2*(3*a^2*A + 5*b*(A*b + 2*a*B))*Elliptic.E((1/2)*(c + d*x), 2))/(5*d) + (2*(2*a*A*b + a^2*B + 3*b^2*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*a*(7*A*b + 5*a*B)*sqrt(cos(c + d*x))*sin(c + d*x))/(15*d) + (2*a*A*sqrt(cos(c + d*x))*(b + a*cos(c + d*x))*sin(c + d*x))/(5*d)]
    @test_int [cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^2*(A + B*sec(c + d*x)), x, 6, (2*(2*a*A*b + a^2*B - b^2*B)*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*(a^2*A + 3*A*b^2 + 6*a*b*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*b^2*B*sin(c + d*x))/(d*sqrt(cos(c + d*x))) + (2*a^2*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))^2*(A + B*sec(c + d*x)), x, 6, (2*(a^2*A - A*b^2 - 2*a*b*B)*Elliptic.E((1/2)*(c + d*x), 2))/d + (2*(6*a*A*b + 3*a^2*B + b^2*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*b^2*B*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*b*(A*b + 2*a*B)*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [(a + b*sec(c + d*x))^2*(A + B*sec(c + d*x))/cos(c + d*x)^(1/2), x, 7, -((2*(10*a*A*b + 5*a^2*B + 3*b^2*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*(3*a^2*A + A*b^2 + 2*a*b*B)*Elliptic.F((1/2)*(c + d*x), 2))/(3*d) + (2*b^2*B*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*b*(A*b + 2*a*B)*sin(c + d*x))/(3*d*cos(c + d*x)^(3/2)) + (2*(10*a*A*b + 5*a^2*B + 3*b^2*B)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]
    @test_int [(a + b*sec(c + d*x))^2*(A + B*sec(c + d*x))/cos(c + d*x)^(3/2), x, 8, -((2*(5*a^2*A + 3*A*b^2 + 6*a*b*B)*Elliptic.E((1/2)*(c + d*x), 2))/(5*d)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*Elliptic.F((1/2)*(c + d*x), 2))/(21*d) + (2*b^2*B*sin(c + d*x))/(7*d*cos(c + d*x)^(7/2)) + (2*b*(A*b + 2*a*B)*sin(c + d*x))/(5*d*cos(c + d*x)^(5/2)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*sin(c + d*x))/(21*d*cos(c + d*x)^(3/2)) + (2*(5*a^2*A + 3*A*b^2 + 6*a*b*B)*sin(c + d*x))/(5*d*sqrt(cos(c + d*x)))]

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

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

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

    @test_int [cos(c + d*x)^(7/2)*sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)), x, 11, (2*(a^2 - b^2)*(25*a^2*A + 8*A*b^2 - 14*a*b*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(105*a^3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (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*(25*a^2*A - 4*A*b^2 + 7*a*b*B)*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)), 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*(9*a^2*A - 2*A*b^2 + 5*a*b*B)*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)), x, 9, (2*A*(a^2 - b^2)*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*(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)), x, 12, (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 [(sqrt(a + b*sec(c + d*x))*(A + B*sec(c + d*x)))/sqrt(cos(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)))/(d*sqrt(cos(c + d*x))*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)))/(d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (B*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))) + (B*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)))/cos(c + d*x)^(3/2), x, 14, ((4*A*b + 3*a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((4*a*A*b - a^2*B + 4*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(4*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((4*A*b + a*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(4*b*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (B*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d*cos(c + d*x)^(3/2)) + ((4*A*b + a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*b*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)), x, 12, (2*(a^2 - b^2)*(39*a^2*A*b + 8*A*b^3 + 75*a^3*B - 18*a*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(315*a^3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (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*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B)*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a^2*d) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B)*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a*d) + (2*(10*A*b + 9*a*B)*cos(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(63*d) + (2*a*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)*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 11, (2*(a^2 - b^2)*(25*a^2*A - 6*A*b^2 + 21*a*b*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(105*a^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (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*(25*a^2*A + 3*A*b^2 + 42*a*b*B)*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*a*d) + (2*(8*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*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)*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 10, (2*(a^2 - b^2)*(3*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*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(9*a^2*A + 3*A*b^2 + 20*a*b*B)*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*(6*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*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)*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 13, (2*(a^2*A - A*b^2 + 3*a*b*B)*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))) + (2*b^2*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*(4*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*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*a*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))*(a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)), x, 13, ((2*a*A*b + 2*a^2*B + b^2*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))) + (b*(2*A*b + 3*a*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*A - b*B)*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))) + (b*B*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(d*sqrt(cos(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)))/sqrt(cos(c + d*x)), x, 14, ((8*a^2*A + 4*A*b^2 + 7*a*b*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((12*a*A*b + 3*a^2*B + 4*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((4*A*b + 5*a*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(4*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (b*B*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*d*cos(c + d*x)^(3/2)) + ((4*A*b + 5*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d*sqrt(cos(c + d*x)))]
    @test_int [((a + b*sec(c + d*x))^(3/2)*(A + B*sec(c + d*x)))/cos(c + d*x)^(3/2), x, 15, ((42*a*A*b + 17*a^2*B + 16*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(24*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((6*a^2*A*b + 8*A*b^3 - a^3*B + 12*a*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(8*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((30*a*A*b + 3*a^2*B + 16*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(24*b*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (b*B*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d*cos(c + d*x)^(5/2)) + ((6*A*b + 7*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(12*d*cos(c + d*x)^(3/2)) + ((30*a*A*b + 3*a^2*B + 16*b^2*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*b*d*sqrt(cos(c + d*x)))]

    @test_int [cos(c + d*x)^(11/2)*(a + b*sec(c + d*x))^(5/2)*(A + B*sec(c + d*x)), x, 13, (2*(a^2 - b^2)*(675*a^4*A + 285*a^2*A*b^2 + 40*A*b^4 + 1254*a^3*b*B - 110*a*b^3*B)*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*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B)*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*(675*a^4*A + 1025*a^2*A*b^2 - 20*A*b^4 + 1793*a^3*b*B + 55*a*b^3*B)*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3465*a^2*d) + (2*(1145*a^2*A*b + 15*A*b^3 + 539*a^3*B + 825*a*b^2*B)*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3465*a*d) + (2*(81*a^2*A + 113*A*b^2 + 209*a*b*B)*cos(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(693*d) + (2*a*(14*A*b + 11*a*B)*cos(c + d*x)^(7/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(99*d) + (2*a*A*cos(c + d*x)^(9/2)*(a + b*sec(c + d*x))^(3/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)), x, 12, (2*(a^2 - b^2)*(114*a^2*A*b - 10*A*b^3 + 75*a^3*B + 45*a*b^2*B)*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*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B)*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*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B)*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*a*d) + (2*(49*a^2*A + 75*A*b^2 + 135*a*b*B)*cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(315*d) + (2*a*(4*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*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))^(5/2)*(A + B*sec(c + d*x)), x, 11, (2*(a^2 - b^2)*(25*a^2*A + 15*A*b^2 + 56*a*b*B)*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*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B)*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*(25*a^2*A + 45*A*b^2 + 77*a*b*B)*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(105*d) + (2*a*(10*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*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))^(5/2)*(A + B*sec(c + d*x)), x, 14, (2*(8*a^2*A*b - 8*A*b^3 + 5*a^3*B + 10*a*b^2*B)*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))) + (2*b^3*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*(9*a^2*A + 23*A*b^2 + 35*a*b*B)*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))) + (2*a*(8*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*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))^(5/2)*(A + B*sec(c + d*x)), x, 14, ((2*a^3*A + 4*a*A*b^2 + 12*a^2*b*B + 3*b^3*B)*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*(2*A*b + 5*a*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))) + ((14*a*A*b + 6*a^2*B - 3*b^2*B)*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*A - 3*b*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(3*d*sqrt(cos(c + d*x))) + (2*a*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))^(5/2)*(A + B*sec(c + d*x)), x, 14, ((16*a^2*A*b + 4*A*b^3 + 8*a^3*B + 11*a*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (b*(20*a*A*b + 15*a^2*B + 4*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(4*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((8*a^2*A - 4*A*b^2 - 9*a*b*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(4*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (b*(4*A*b + 7*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d*sqrt(cos(c + d*x))) + (b*B*(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))^(5/2)*(A + B*sec(c + d*x)))/sqrt(cos(c + d*x)), x, 15, ((48*a^3*A + 66*a*A*b^2 + 59*a^2*b*B + 16*b^3*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(24*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((30*a^2*A*b + 8*A*b^3 + 5*a^3*B + 20*a*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(8*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((54*a*A*b + 33*a^2*B + 16*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(24*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (b*(2*A*b + 3*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*d*cos(c + d*x)^(3/2)) + ((54*a*A*b + 33*a^2*B + 16*b^2*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d*sqrt(cos(c + d*x))) + (b*B*(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))^(5/2)*(A + B*sec(c + d*x)))/cos(c + d*x)^(3/2), x, 16, ((472*a^2*A*b + 128*A*b^3 + 133*a^3*B + 356*a*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(192*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((40*a^3*A*b + 160*a*A*b^3 - 5*a^4*B + 120*a^2*b^2*B + 48*b^4*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(64*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(192*b*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (b*(8*A*b + 11*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(24*d*cos(c + d*x)^(5/2)) + ((104*a*A*b + 59*a^2*B + 36*b^2*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(96*d*cos(c + d*x)^(3/2)) + ((264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(192*b*d*sqrt(cos(c + d*x))) + (b*B*(a + b*sec(c + d*x))^(3/2)*sin(c + d*x))/(4*d*cos(c + d*x)^(5/2))]

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

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x)))/sqrt(a + b*sec(c + d*x)), x, 10, (-2*(7*a^2*A*b + 8*A*b^3 - 5*a^3*B - 10*a*b^2*B)*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*(9*a^2*A + 8*A*b^2 - 10*a*b*B)*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)))/sqrt(a + b*sec(c + d*x)), x, 9, (2*(a^2*A + 2*A*b^2 - 3*a*b*B)*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)))/sqrt(a + b*sec(c + d*x)), x, 8, (-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*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))/(sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))), x, 8, (2*A*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*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)))]
    @test_int [(A + B*sec(c + d*x))/(cos(c + d*x)^(3/2)*sqrt(a + b*sec(c + d*x))), x, 13, (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*A*b - a*B)*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))) - (B*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))) + (B*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))/(cos(c + d*x)^(5/2)*sqrt(a + b*sec(c + d*x))), x, 14, ((4*A*b - a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(4*b*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((4*a*A*b - 3*a^2*B - 4*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(4*b^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - ((4*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)))/(4*b^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (B*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(2*b*d*cos(c + d*x)^(3/2)) + ((4*A*b - 3*a*B)*sqrt(a + b*sec(c + d*x))*sin(c + d*x))/(4*b^2*d*sqrt(cos(c + d*x)))]

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

    @test_int [(cos(c + d*x)^(5/2)*(A + B*sec(c + d*x)))/(a + b*sec(c + d*x))^(5/2), x, 12, (-2*(17*a^4*A*b + 116*a^2*A*b^3 - 128*A*b^5 - 5*a^5*B - 80*a^3*b^2*B + 80*a*b^4*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (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*(9*a^6*A + 55*a^4*A*b^2 - 212*a^2*A*b^4 + 128*A*b^6 - 40*a^5*b*B + 140*a^3*b^3*B - 80*a*b^5*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (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*b*(A*b - a*B)*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*b*(12*a^2*A*b - 8*A*b^3 - 9*a^3*B + 5*a*b^2*B)*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*(14*a^4*A*b - 98*a^2*A*b^3 + 64*A*b^5 - 5*a^5*B + 65*a^3*b^2*B - 40*a*b^4*B)*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*(3*a^4*A - 71*a^2*A*b^2 + 48*A*b^4 + 50*a^3*b*B - 30*a*b^3*B)*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)))/(a + b*sec(c + d*x))^(5/2), x, 11, (2*(a^4*A + 16*a^2*A*b^2 - 16*A*b^4 - 9*a^3*b*B + 8*a*b^3*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (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*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*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^4*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*b*(A*b - a*B)*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*b*(10*a^2*A*b - 6*A*b^3 - 7*a^3*B + 3*a*b^2*B)*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*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B)*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)))/(a + b*sec(c + d*x))^(5/2), x, 10, (-2*(9*a^2*A*b - 8*A*b^3 - 3*a^3*B + 2*a*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (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*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*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^3*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*b*(A*b - a*B)*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*b*(8*a^2*A*b - 4*A*b^3 - 5*a^3*B + a*b^2*B)*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))/(sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(5/2)), x, 10, (2*(3*a^2*A - 2*A*b^2 - a*b*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (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*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*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*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) - (2*(A*b - a*B)*sin(c + d*x))/(3*(a^2 - b^2)*d*sqrt(cos(c + d*x))*(a + b*sec(c + d*x))^(3/2)) - (2*(5*a^2*A*b - A*b^3 - 2*a^3*B - 2*a*b^2*B)*sin(c + d*x))/(3*a*(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))/(cos(c + d*x)^(3/2)*(a + b*sec(c + d*x))^(5/2)), x, 10, (-2*(A*b - a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(3*a*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) - (2*(3*a^2*A + A*b^2 - 4*a*b*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*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*a*(A*b - a*B)*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*(2*a^2*A*b + 2*A*b^3 + a^3*B - 5*a*b^2*B)*sin(c + d*x))/(3*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))/(cos(c + d*x)^(5/2)*(a + b*sec(c + d*x))^(5/2)), x, 14, (2*(A*b - a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (2*a)/(a + b)))/(3*b*(a^2 - b^2)*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*B*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(b^2*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + (2*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (2*a)/(a + b))*sqrt(a + b*sec(c + d*x)))/(3*b^2*(a^2 - b^2)^2*d*sqrt((b + a*cos(c + d*x))/(a + b))) + (2*a*(A*b - a*B)*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*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*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))/(cos(c + d*x)^(7/2)*(a + b*sec(c + d*x))^(5/2)), x, 15, -((2*a*A*b - 5*a^2*B + 3*b^2*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.F((c + d*x)/2, (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*A*b - 5*a*B)*sqrt((b + a*cos(c + d*x))/(a + b))*Elliptic.Pi(2, (c + d*x)/2, (2*a)/(a + b)))/(b^3*d*sqrt(cos(c + d*x))*sqrt(a + b*sec(c + d*x))) + ((6*a^3*A*b - 14*a*A*b^3 - 15*a^4*B + 26*a^2*b^2*B - 3*b^4*B)*sqrt(cos(c + d*x))*Elliptic.E((c + d*x)/2, (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*(A*b - a*B)*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*a*(2*a^2*A*b - 6*A*b^3 - 5*a^3*B + 9*a*b^2*B)*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))) - ((6*a^3*A*b - 14*a*A*b^3 - 15*a^4*B + 26*a^2*b^2*B - 3*b^4*B)*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

max_stars_repo_path: test/4 Trig functions/4.5 Secant/4.5.3.1 (a+b sec)^m (d sec)^n (A+B sec).jl