text:
@testset "4.5.1.4 (d tan)^n (a+b sec)^m" begin
    (a, b, c, d, e, f, m, n, x, ) = @variables a b c d e f m n x

    #= ::Package:: =#

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

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

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

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

    @test_int [tan(c + d*x)^9*(a + a*sec(c + d*x)), x, 3, -((a*log(cos(c + d*x)))/d) + (a*sec(c + d*x))/d - (2*a*sec(c + d*x)^2)/d - (4*a*sec(c + d*x)^3)/(3*d) + (3*a*sec(c + d*x)^4)/(2*d) + (6*a*sec(c + d*x)^5)/(5*d) - (2*a*sec(c + d*x)^6)/(3*d) - (4*a*sec(c + d*x)^7)/(7*d) + (a*sec(c + d*x)^8)/(8*d) + (a*sec(c + d*x)^9)/(9*d)]
    @test_int [tan(c + d*x)^7*(a + a*sec(c + d*x)), x, 3, (a*log(cos(c + d*x)))/d - (a*sec(c + d*x))/d + (3*a*sec(c + d*x)^2)/(2*d) + (a*sec(c + d*x)^3)/d - (3*a*sec(c + d*x)^4)/(4*d) - (3*a*sec(c + d*x)^5)/(5*d) + (a*sec(c + d*x)^6)/(6*d) + (a*sec(c + d*x)^7)/(7*d)]
    @test_int [tan(c + d*x)^5*(a + a*sec(c + d*x)), x, 3, -((a*log(cos(c + d*x)))/d) + (a*sec(c + d*x))/d - (a*sec(c + d*x)^2)/d - (2*a*sec(c + d*x)^3)/(3*d) + (a*sec(c + d*x)^4)/(4*d) + (a*sec(c + d*x)^5)/(5*d)]
    @test_int [tan(c + d*x)^3*(a + a*sec(c + d*x)), x, 3, (a*log(cos(c + d*x)))/d - (a*sec(c + d*x))/d + (a*sec(c + d*x)^2)/(2*d) + (a*sec(c + d*x)^3)/(3*d)]
    @test_int [tan(c + d*x)^1*(a + a*sec(c + d*x)), x, 3, -((a*log(cos(c + d*x)))/d) + (a*sec(c + d*x))/d]
    @test_int [cot(c + d*x)^1*(a + a*sec(c + d*x)), x, 2, (a*log(1 - cos(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + a*sec(c + d*x)), x, 3, -(a/(2*d*(1 - cos(c + d*x)))) - (3*a*log(1 - cos(c + d*x)))/(4*d) - (a*log(1 + cos(c + d*x)))/(4*d)]
    @test_int [cot(c + d*x)^5*(a + a*sec(c + d*x)), x, 3, -(a/(8*d*(1 - cos(c + d*x))^2)) + (3*a)/(4*d*(1 - cos(c + d*x))) + a/(8*d*(1 + cos(c + d*x))) + (11*a*log(1 - cos(c + d*x)))/(16*d) + (5*a*log(1 + cos(c + d*x)))/(16*d)]
    @test_int [cot(c + d*x)^7*(a + a*sec(c + d*x)), x, 3, -(a/(24*d*(1 - cos(c + d*x))^3)) + (9*a)/(32*d*(1 - cos(c + d*x))^2) - (15*a)/(16*d*(1 - cos(c + d*x))) + a/(32*d*(1 + cos(c + d*x))^2) - a/(4*d*(1 + cos(c + d*x))) - (21*a*log(1 - cos(c + d*x)))/(32*d) - (11*a*log(1 + cos(c + d*x)))/(32*d)]

    @test_int [tan(c + d*x)^8*(a + a*sec(c + d*x)), x, 6, a*x + (35*a*atanh(sin(c + d*x)))/(128*d) - ((128*a + 35*a*sec(c + d*x))*tan(c + d*x))/(128*d) + ((64*a + 35*a*sec(c + d*x))*tan(c + d*x)^3)/(192*d) - ((48*a + 35*a*sec(c + d*x))*tan(c + d*x)^5)/(240*d) + ((8*a + 7*a*sec(c + d*x))*tan(c + d*x)^7)/(56*d)]
    @test_int [tan(c + d*x)^6*(a + a*sec(c + d*x)), x, 5, (-a)*x - (5*a*atanh(sin(c + d*x)))/(16*d) + ((16*a + 5*a*sec(c + d*x))*tan(c + d*x))/(16*d) - ((8*a + 5*a*sec(c + d*x))*tan(c + d*x)^3)/(24*d) + ((6*a + 5*a*sec(c + d*x))*tan(c + d*x)^5)/(30*d)]
    @test_int [tan(c + d*x)^4*(a + a*sec(c + d*x)), x, 4, a*x + (3*a*atanh(sin(c + d*x)))/(8*d) - ((8*a + 3*a*sec(c + d*x))*tan(c + d*x))/(8*d) + ((4*a + 3*a*sec(c + d*x))*tan(c + d*x)^3)/(12*d)]
    @test_int [tan(c + d*x)^2*(a + a*sec(c + d*x)), x, 3, (-a)*x - (a*atanh(sin(c + d*x)))/(2*d) + ((2*a + a*sec(c + d*x))*tan(c + d*x))/(2*d)]
    @test_int [cot(c + d*x)^2*(a + a*sec(c + d*x)), x, 2, (-a)*x - (cot(c + d*x)*(a + a*sec(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*(a + a*sec(c + d*x)), x, 3, a*x - (cot(c + d*x)^3*(a + a*sec(c + d*x)))/(3*d) + (cot(c + d*x)*(3*a + 2*a*sec(c + d*x)))/(3*d)]
    @test_int [cot(c + d*x)^6*(a + a*sec(c + d*x)), x, 4, (-a)*x - (cot(c + d*x)^5*(a + a*sec(c + d*x)))/(5*d) + (cot(c + d*x)^3*(5*a + 4*a*sec(c + d*x)))/(15*d) - (cot(c + d*x)*(15*a + 8*a*sec(c + d*x)))/(15*d)]
    @test_int [cot(c + d*x)^8*(a + a*sec(c + d*x)), x, 5, a*x - (cot(c + d*x)^7*(a + a*sec(c + d*x)))/(7*d) + (cot(c + d*x)^5*(7*a + 6*a*sec(c + d*x)))/(35*d) + (cot(c + d*x)*(35*a + 16*a*sec(c + d*x)))/(35*d) - (cot(c + d*x)^3*(35*a + 24*a*sec(c + d*x)))/(105*d)]
    @test_int [cot(c + d*x)^10*(a + a*sec(c + d*x)), x, 6, (-a)*x - (cot(c + d*x)^9*(a + a*sec(c + d*x)))/(9*d) + (cot(c + d*x)^7*(9*a + 8*a*sec(c + d*x)))/(63*d) - (cot(c + d*x)^5*(21*a + 16*a*sec(c + d*x)))/(105*d) + (cot(c + d*x)^3*(105*a + 64*a*sec(c + d*x)))/(315*d) - (cot(c + d*x)*(315*a + 128*a*sec(c + d*x)))/(315*d)]

    @test_int [tan(c + d*x)^9*(a + a*sec(c + d*x))^2, x, 3, -((a^2*log(cos(c + d*x)))/d) + (2*a^2*sec(c + d*x))/d - (3*a^2*sec(c + d*x)^2)/(2*d) - (8*a^2*sec(c + d*x)^3)/(3*d) + (a^2*sec(c + d*x)^4)/(2*d) + (12*a^2*sec(c + d*x)^5)/(5*d) + (a^2*sec(c + d*x)^6)/(3*d) - (8*a^2*sec(c + d*x)^7)/(7*d) - (3*a^2*sec(c + d*x)^8)/(8*d) + (2*a^2*sec(c + d*x)^9)/(9*d) + (a^2*sec(c + d*x)^10)/(10*d)]
    @test_int [tan(c + d*x)^7*(a + a*sec(c + d*x))^2, x, 3, (a^2*log(cos(c + d*x)))/d - (2*a^2*sec(c + d*x))/d + (a^2*sec(c + d*x)^2)/d + (2*a^2*sec(c + d*x)^3)/d - (6*a^2*sec(c + d*x)^5)/(5*d) - (a^2*sec(c + d*x)^6)/(3*d) + (2*a^2*sec(c + d*x)^7)/(7*d) + (a^2*sec(c + d*x)^8)/(8*d)]
    @test_int [tan(c + d*x)^5*(a + a*sec(c + d*x))^2, x, 3, -((a^2*log(cos(c + d*x)))/d) + (2*a^2*sec(c + d*x))/d - (a^2*sec(c + d*x)^2)/(2*d) - (4*a^2*sec(c + d*x)^3)/(3*d) - (a^2*sec(c + d*x)^4)/(4*d) + (2*a^2*sec(c + d*x)^5)/(5*d) + (a^2*sec(c + d*x)^6)/(6*d)]
    @test_int [tan(c + d*x)^3*(a + a*sec(c + d*x))^2, x, 3, (a^2*log(cos(c + d*x)))/d - (2*a^2*sec(c + d*x))/d + (2*a^2*sec(c + d*x)^3)/(3*d) + (a^2*sec(c + d*x)^4)/(4*d)]
    @test_int [tan(c + d*x)^1*(a + a*sec(c + d*x))^2, x, 3, -((a^2*log(cos(c + d*x)))/d) + (2*a^2*sec(c + d*x))/d + (a^2*sec(c + d*x)^2)/(2*d)]
    @test_int [cot(c + d*x)^1*(a + a*sec(c + d*x))^2, x, 3, (2*a^2*log(1 - cos(c + d*x)))/d - (a^2*log(cos(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + a*sec(c + d*x))^2, x, 3, -(a^2/(d*(1 - cos(c + d*x)))) - (a^2*log(1 - cos(c + d*x)))/d]
    @test_int [cot(c + d*x)^5*(a + a*sec(c + d*x))^2, x, 3, -(a^2/(4*d*(1 - cos(c + d*x))^2)) + (5*a^2)/(4*d*(1 - cos(c + d*x))) + (7*a^2*log(1 - cos(c + d*x)))/(8*d) + (a^2*log(1 + cos(c + d*x)))/(8*d)]
    @test_int [cot(c + d*x)^7*(a + a*sec(c + d*x))^2, x, 3, -(a^2/(12*d*(1 - cos(c + d*x))^3)) + a^2/(2*d*(1 - cos(c + d*x))^2) - (23*a^2)/(16*d*(1 - cos(c + d*x))) - a^2/(16*d*(1 + cos(c + d*x))) - (13*a^2*log(1 - cos(c + d*x)))/(16*d) - (3*a^2*log(1 + cos(c + d*x)))/(16*d)]
    @test_int [cot(c + d*x)^9*(a + a*sec(c + d*x))^2, x, 3, -(a^2/(32*d*(1 - cos(c + d*x))^4)) + (11*a^2)/(48*d*(1 - cos(c + d*x))^3) - (3*a^2)/(4*d*(1 - cos(c + d*x))^2) + (51*a^2)/(32*d*(1 - cos(c + d*x))) - a^2/(64*d*(1 + cos(c + d*x))^2) + (9*a^2)/(64*d*(1 + cos(c + d*x))) + (99*a^2*log(1 - cos(c + d*x)))/(128*d) + (29*a^2*log(1 + cos(c + d*x)))/(128*d)]

    @test_int [tan(c + d*x)^6*(a + a*sec(c + d*x))^2, x, 12, (-a^2)*x - (5*a^2*atanh(sin(c + d*x)))/(8*d) + (a^2*tan(c + d*x))/d + (5*a^2*sec(c + d*x)*tan(c + d*x))/(8*d) - (a^2*tan(c + d*x)^3)/(3*d) - (5*a^2*sec(c + d*x)*tan(c + d*x)^3)/(12*d) + (a^2*tan(c + d*x)^5)/(5*d) + (a^2*sec(c + d*x)*tan(c + d*x)^5)/(3*d) + (a^2*tan(c + d*x)^7)/(7*d)]
    @test_int [tan(c + d*x)^4*(a + a*sec(c + d*x))^2, x, 10, a^2*x + (3*a^2*atanh(sin(c + d*x)))/(4*d) - (a^2*tan(c + d*x))/d - (3*a^2*sec(c + d*x)*tan(c + d*x))/(4*d) + (a^2*tan(c + d*x)^3)/(3*d) + (a^2*sec(c + d*x)*tan(c + d*x)^3)/(2*d) + (a^2*tan(c + d*x)^5)/(5*d)]
    @test_int [tan(c + d*x)^2*(a + a*sec(c + d*x))^2, x, 8, (-a^2)*x - (a^2*atanh(sin(c + d*x)))/d + (a^2*tan(c + d*x))/d + (a^2*sec(c + d*x)*tan(c + d*x))/d + (a^2*tan(c + d*x)^3)/(3*d)]
    @test_int [cot(c + d*x)^2*(a + a*sec(c + d*x))^2, x, 8, (-a^2)*x - (2*a^2*cot(c + d*x))/d - (2*a^2*csc(c + d*x))/d]
    @test_int [cot(c + d*x)^4*(a + a*sec(c + d*x))^2, x, 9, a^2*x + (a^2*cot(c + d*x))/d - (2*a^2*cot(c + d*x)^3)/(3*d) + (2*a^2*csc(c + d*x))/d - (2*a^2*csc(c + d*x)^3)/(3*d)]
    @test_int [cot(c + d*x)^6*(a + a*sec(c + d*x))^2, x, 11, (-a^2)*x - (a^2*cot(c + d*x))/d + (a^2*cot(c + d*x)^3)/(3*d) - (2*a^2*cot(c + d*x)^5)/(5*d) - (2*a^2*csc(c + d*x))/d + (4*a^2*csc(c + d*x)^3)/(3*d) - (2*a^2*csc(c + d*x)^5)/(5*d)]
    @test_int [cot(c + d*x)^8*(a + a*sec(c + d*x))^2, x, 12, a^2*x + (a^2*cot(c + d*x))/d - (a^2*cot(c + d*x)^3)/(3*d) + (a^2*cot(c + d*x)^5)/(5*d) - (2*a^2*cot(c + d*x)^7)/(7*d) + (2*a^2*csc(c + d*x))/d - (2*a^2*csc(c + d*x)^3)/d + (6*a^2*csc(c + d*x)^5)/(5*d) - (2*a^2*csc(c + d*x)^7)/(7*d)]
    @test_int [cot(c + d*x)^10*(a + a*sec(c + d*x))^2, x, 13, (-a^2)*x - (a^2*cot(c + d*x))/d + (a^2*cot(c + d*x)^3)/(3*d) - (a^2*cot(c + d*x)^5)/(5*d) + (a^2*cot(c + d*x)^7)/(7*d) - (2*a^2*cot(c + d*x)^9)/(9*d) - (2*a^2*csc(c + d*x))/d + (8*a^2*csc(c + d*x)^3)/(3*d) - (12*a^2*csc(c + d*x)^5)/(5*d) + (8*a^2*csc(c + d*x)^7)/(7*d) - (2*a^2*csc(c + d*x)^9)/(9*d)]

    @test_int [tan(c + d*x)^9*(a + a*sec(c + d*x))^3, x, 3, -((a^3*log(cos(c + d*x)))/d) + (3*a^3*sec(c + d*x))/d - (a^3*sec(c + d*x)^2)/(2*d) - (11*a^3*sec(c + d*x)^3)/(3*d) - (3*a^3*sec(c + d*x)^4)/(2*d) + (14*a^3*sec(c + d*x)^5)/(5*d) + (7*a^3*sec(c + d*x)^6)/(3*d) - (6*a^3*sec(c + d*x)^7)/(7*d) - (11*a^3*sec(c + d*x)^8)/(8*d) - (a^3*sec(c + d*x)^9)/(9*d) + (3*a^3*sec(c + d*x)^10)/(10*d) + (a^3*sec(c + d*x)^11)/(11*d)]
    @test_int [tan(c + d*x)^7*(a + a*sec(c + d*x))^3, x, 3, (a^3*log(cos(c + d*x)))/d - (3*a^3*sec(c + d*x))/d + (8*a^3*sec(c + d*x)^3)/(3*d) + (3*a^3*sec(c + d*x)^4)/(2*d) - (6*a^3*sec(c + d*x)^5)/(5*d) - (4*a^3*sec(c + d*x)^6)/(3*d) + (3*a^3*sec(c + d*x)^8)/(8*d) + (a^3*sec(c + d*x)^9)/(9*d)]
    @test_int [tan(c + d*x)^5*(a + a*sec(c + d*x))^3, x, 3, -((a^3*log(cos(c + d*x)))/d) + (3*a^3*sec(c + d*x))/d + (a^3*sec(c + d*x)^2)/(2*d) - (5*a^3*sec(c + d*x)^3)/(3*d) - (5*a^3*sec(c + d*x)^4)/(4*d) + (a^3*sec(c + d*x)^5)/(5*d) + (a^3*sec(c + d*x)^6)/(2*d) + (a^3*sec(c + d*x)^7)/(7*d)]
    @test_int [tan(c + d*x)^3*(a + a*sec(c + d*x))^3, x, 3, (a^3*log(cos(c + d*x)))/d - (3*a^3*sec(c + d*x))/d - (a^3*sec(c + d*x)^2)/d + (2*a^3*sec(c + d*x)^3)/(3*d) + (3*a^3*sec(c + d*x)^4)/(4*d) + (a^3*sec(c + d*x)^5)/(5*d)]
    @test_int [tan(c + d*x)^1*(a + a*sec(c + d*x))^3, x, 3, -((a^3*log(cos(c + d*x)))/d) + (3*a^3*sec(c + d*x))/d + (3*a^3*sec(c + d*x)^2)/(2*d) + (a^3*sec(c + d*x)^3)/(3*d)]
    @test_int [cot(c + d*x)^1*(a + a*sec(c + d*x))^3, x, 3, (4*a^3*log(1 - cos(c + d*x)))/d - (3*a^3*log(cos(c + d*x)))/d + (a^3*sec(c + d*x))/d]
    @test_int [cot(c + d*x)^3*(a + a*sec(c + d*x))^3, x, 3, -((2*a^3)/(d*(1 - cos(c + d*x)))) - (a^3*log(1 - cos(c + d*x)))/d]
    @test_int [cot(c + d*x)^5*(a + a*sec(c + d*x))^3, x, 3, -(a^3/(2*d*(1 - cos(c + d*x))^2)) + (2*a^3)/(d*(1 - cos(c + d*x))) + (a^3*log(1 - cos(c + d*x)))/d]
    @test_int [cot(c + d*x)^7*(a + a*sec(c + d*x))^3, x, 3, -(a^3/(6*d*(1 - cos(c + d*x))^3)) + (7*a^3)/(8*d*(1 - cos(c + d*x))^2) - (17*a^3)/(8*d*(1 - cos(c + d*x))) - (15*a^3*log(1 - cos(c + d*x)))/(16*d) - (a^3*log(1 + cos(c + d*x)))/(16*d)]
    @test_int [cot(c + d*x)^9*(a + a*sec(c + d*x))^3, x, 3, -(a^3/(16*d*(1 - cos(c + d*x))^4)) + (5*a^3)/(12*d*(1 - cos(c + d*x))^3) - (39*a^3)/(32*d*(1 - cos(c + d*x))^2) + (9*a^3)/(4*d*(1 - cos(c + d*x))) + a^3/(32*d*(1 + cos(c + d*x))) + (57*a^3*log(1 - cos(c + d*x)))/(64*d) + (7*a^3*log(1 + cos(c + d*x)))/(64*d)]

    @test_int [tan(c + d*x)^6*(a + a*sec(c + d*x))^3, x, 17, (-a^3)*x - (125*a^3*atanh(sin(c + d*x)))/(128*d) + (a^3*tan(c + d*x))/d + (115*a^3*sec(c + d*x)*tan(c + d*x))/(128*d) + (5*a^3*sec(c + d*x)^3*tan(c + d*x))/(64*d) - (a^3*tan(c + d*x)^3)/(3*d) - (5*a^3*sec(c + d*x)*tan(c + d*x)^3)/(8*d) - (5*a^3*sec(c + d*x)^3*tan(c + d*x)^3)/(48*d) + (a^3*tan(c + d*x)^5)/(5*d) + (a^3*sec(c + d*x)*tan(c + d*x)^5)/(2*d) + (a^3*sec(c + d*x)^3*tan(c + d*x)^5)/(8*d) + (3*a^3*tan(c + d*x)^7)/(7*d)]
    @test_int [tan(c + d*x)^4*(a + a*sec(c + d*x))^3, x, 14, a^3*x + (19*a^3*atanh(sin(c + d*x)))/(16*d) - (a^3*tan(c + d*x))/d - (17*a^3*sec(c + d*x)*tan(c + d*x))/(16*d) - (a^3*sec(c + d*x)^3*tan(c + d*x))/(8*d) + (a^3*tan(c + d*x)^3)/(3*d) + (3*a^3*sec(c + d*x)*tan(c + d*x)^3)/(4*d) + (a^3*sec(c + d*x)^3*tan(c + d*x)^3)/(6*d) + (3*a^3*tan(c + d*x)^5)/(5*d)]
    @test_int [tan(c + d*x)^2*(a + a*sec(c + d*x))^3, x, 11, (-a^3)*x - (13*a^3*atanh(sin(c + d*x)))/(8*d) + (a^3*tan(c + d*x))/d + (11*a^3*sec(c + d*x)*tan(c + d*x))/(8*d) + (a^3*sec(c + d*x)^3*tan(c + d*x))/(4*d) + (a^3*tan(c + d*x)^3)/d]
    @test_int [cot(c + d*x)^2*(a + a*sec(c + d*x))^3, x, 11, (-a^3)*x + (a^3*atanh(sin(c + d*x)))/d - (4*a^3*cot(c + d*x))/d - (4*a^3*csc(c + d*x))/d]
    @test_int [cot(c + d*x)^4*(a + a*sec(c + d*x))^3, x, 11, a^3*x + (a^3*cot(c + d*x))/d - (4*a^3*cot(c + d*x)^3)/(3*d) + (3*a^3*csc(c + d*x))/d - (4*a^3*csc(c + d*x)^3)/(3*d)]
    @test_int [cot(c + d*x)^6*(a + a*sec(c + d*x))^3, x, 14, (-a^3)*x - (a^3*cot(c + d*x))/d + (a^3*cot(c + d*x)^3)/(3*d) - (4*a^3*cot(c + d*x)^5)/(5*d) - (3*a^3*csc(c + d*x))/d + (7*a^3*csc(c + d*x)^3)/(3*d) - (4*a^3*csc(c + d*x)^5)/(5*d)]
    @test_int [cot(c + d*x)^8*(a + a*sec(c + d*x))^3, x, 15, a^3*x + (a^3*cot(c + d*x))/d - (a^3*cot(c + d*x)^3)/(3*d) + (a^3*cot(c + d*x)^5)/(5*d) - (4*a^3*cot(c + d*x)^7)/(7*d) + (3*a^3*csc(c + d*x))/d - (10*a^3*csc(c + d*x)^3)/(3*d) + (11*a^3*csc(c + d*x)^5)/(5*d) - (4*a^3*csc(c + d*x)^7)/(7*d)]
    @test_int [cot(c + d*x)^10*(a + a*sec(c + d*x))^3, x, 16, (-a^3)*x - (a^3*cot(c + d*x))/d + (a^3*cot(c + d*x)^3)/(3*d) - (a^3*cot(c + d*x)^5)/(5*d) + (a^3*cot(c + d*x)^7)/(7*d) - (4*a^3*cot(c + d*x)^9)/(9*d) - (3*a^3*csc(c + d*x))/d + (13*a^3*csc(c + d*x)^3)/(3*d) - (21*a^3*csc(c + d*x)^5)/(5*d) + (15*a^3*csc(c + d*x)^7)/(7*d) - (4*a^3*csc(c + d*x)^9)/(9*d)]
    @test_int [cot(c + d*x)^12*(a + a*sec(c + d*x))^3, x, 17, a^3*x + (a^3*cot(c + d*x))/d - (a^3*cot(c + d*x)^3)/(3*d) + (a^3*cot(c + d*x)^5)/(5*d) - (a^3*cot(c + d*x)^7)/(7*d) + (a^3*cot(c + d*x)^9)/(9*d) - (4*a^3*cot(c + d*x)^11)/(11*d) + (3*a^3*csc(c + d*x))/d - (16*a^3*csc(c + d*x)^3)/(3*d) + (34*a^3*csc(c + d*x)^5)/(5*d) - (36*a^3*csc(c + d*x)^7)/(7*d) + (19*a^3*csc(c + d*x)^9)/(9*d) - (4*a^3*csc(c + d*x)^11)/(11*d)]

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

    @test_int [tan(c + d*x)^9/(a + a*sec(c + d*x)), x, 3, -(log(cos(c + d*x))/(a*d)) - sec(c + d*x)/(a*d) - (3*sec(c + d*x)^2)/(2*a*d) + sec(c + d*x)^3/(a*d) + (3*sec(c + d*x)^4)/(4*a*d) - (3*sec(c + d*x)^5)/(5*a*d) - sec(c + d*x)^6/(6*a*d) + sec(c + d*x)^7/(7*a*d)]
    @test_int [tan(c + d*x)^7/(a + a*sec(c + d*x)), x, 3, log(cos(c + d*x))/(a*d) + sec(c + d*x)/(a*d) + sec(c + d*x)^2/(a*d) - (2*sec(c + d*x)^3)/(3*a*d) - sec(c + d*x)^4/(4*a*d) + sec(c + d*x)^5/(5*a*d)]
    @test_int [tan(c + d*x)^5/(a + a*sec(c + d*x)), x, 3, -(log(cos(c + d*x))/(a*d)) - sec(c + d*x)/(a*d) - sec(c + d*x)^2/(2*a*d) + sec(c + d*x)^3/(3*a*d)]
    @test_int [tan(c + d*x)^3/(a + a*sec(c + d*x)), x, 3, log(cos(c + d*x))/(a*d) + sec(c + d*x)/(a*d)]
    @test_int [tan(c + d*x)^1/(a + a*sec(c + d*x)), x, 2, -(log(1 + cos(c + d*x))/(a*d))]
    @test_int [cot(c + d*x)^1/(a + a*sec(c + d*x)), x, 3, 1/(2*a*d*(1 + cos(c + d*x))) + log(1 - cos(c + d*x))/(4*a*d) + (3*log(1 + cos(c + d*x)))/(4*a*d)]
    @test_int [cot(c + d*x)^3/(a + a*sec(c + d*x)), x, 3, -(1/(8*a*d*(1 - cos(c + d*x)))) + 1/(8*a*d*(1 + cos(c + d*x))^2) - 3/(4*a*d*(1 + cos(c + d*x))) - (5*log(1 - cos(c + d*x)))/(16*a*d) - (11*log(1 + cos(c + d*x)))/(16*a*d)]
    @test_int [cot(c + d*x)^5/(a + a*sec(c + d*x)), x, 3, -(1/(32*a*d*(1 - cos(c + d*x))^2)) + 1/(4*a*d*(1 - cos(c + d*x))) + 1/(24*a*d*(1 + cos(c + d*x))^3) - 9/(32*a*d*(1 + cos(c + d*x))^2) + 15/(16*a*d*(1 + cos(c + d*x))) + (11*log(1 - cos(c + d*x)))/(32*a*d) + (21*log(1 + cos(c + d*x)))/(32*a*d)]

    @test_int [tan(c + d*x)^8/(a + a*sec(c + d*x)), x, 6, x/a - (5*atanh(sin(c + d*x)))/(16*a*d) - ((16 - 5*sec(c + d*x))*tan(c + d*x))/(16*a*d) + ((8 - 5*sec(c + d*x))*tan(c + d*x)^3)/(24*a*d) - ((6 - 5*sec(c + d*x))*tan(c + d*x)^5)/(30*a*d)]
    @test_int [tan(c + d*x)^6/(a + a*sec(c + d*x)), x, 5, -(x/a) + (3*atanh(sin(c + d*x)))/(8*a*d) + ((8 - 3*sec(c + d*x))*tan(c + d*x))/(8*a*d) - ((4 - 3*sec(c + d*x))*tan(c + d*x)^3)/(12*a*d)]
    @test_int [tan(c + d*x)^4/(a + a*sec(c + d*x)), x, 4, x/a - atanh(sin(c + d*x))/(2*a*d) - ((2 - sec(c + d*x))*tan(c + d*x))/(2*a*d)]
    @test_int [tan(c + d*x)^2/(a + a*sec(c + d*x)), x, 3, -(x/a) + atanh(sin(c + d*x))/(a*d)]
    @test_int [cot(c + d*x)^2/(a + a*sec(c + d*x)), x, 4, -(x/a) - (cot(c + d*x)*(3 - 2*sec(c + d*x)))/(3*a*d) + (cot(c + d*x)^3*(1 - sec(c + d*x)))/(3*a*d)]
    @test_int [cot(c + d*x)^4/(a + a*sec(c + d*x)), x, 5, x/a + (cot(c + d*x)*(15 - 8*sec(c + d*x)))/(15*a*d) - (cot(c + d*x)^3*(5 - 4*sec(c + d*x)))/(15*a*d) + (cot(c + d*x)^5*(1 - sec(c + d*x)))/(5*a*d)]
    @test_int [cot(c + d*x)^6/(a + a*sec(c + d*x)), x, 6, -(x/a) + (cot(c + d*x)^3*(35 - 24*sec(c + d*x)))/(105*a*d) - (cot(c + d*x)*(35 - 16*sec(c + d*x)))/(35*a*d) - (cot(c + d*x)^5*(7 - 6*sec(c + d*x)))/(35*a*d) + (cot(c + d*x)^7*(1 - sec(c + d*x)))/(7*a*d)]

    @test_int [tan(c + d*x)^9/(a + a*sec(c + d*x))^2, x, 3, -(log(cos(c + d*x))/(a^2*d)) - (2*sec(c + d*x))/(a^2*d) - sec(c + d*x)^2/(2*a^2*d) + (4*sec(c + d*x)^3)/(3*a^2*d) - sec(c + d*x)^4/(4*a^2*d) - (2*sec(c + d*x)^5)/(5*a^2*d) + sec(c + d*x)^6/(6*a^2*d)]
    @test_int [tan(c + d*x)^7/(a + a*sec(c + d*x))^2, x, 3, log(cos(c + d*x))/(a^2*d) + (2*sec(c + d*x))/(a^2*d) - (2*sec(c + d*x)^3)/(3*a^2*d) + sec(c + d*x)^4/(4*a^2*d)]
    @test_int [tan(c + d*x)^5/(a + a*sec(c + d*x))^2, x, 3, -(log(cos(c + d*x))/(a^2*d)) - (2*sec(c + d*x))/(a^2*d) + sec(c + d*x)^2/(2*a^2*d)]
    @test_int [tan(c + d*x)^3/(a + a*sec(c + d*x))^2, x, 3, -(log(cos(c + d*x))/(a^2*d)) + (2*log(1 + cos(c + d*x)))/(a^2*d)]
    @test_int [tan(c + d*x)^1/(a + a*sec(c + d*x))^2, x, 3, -(1/(a^2*d*(1 + cos(c + d*x)))) - log(1 + cos(c + d*x))/(a^2*d)]
    @test_int [cot(c + d*x)^1/(a + a*sec(c + d*x))^2, x, 3, -(1/(4*a^2*d*(1 + cos(c + d*x))^2)) + 5/(4*a^2*d*(1 + cos(c + d*x))) + log(1 - cos(c + d*x))/(8*a^2*d) + (7*log(1 + cos(c + d*x)))/(8*a^2*d)]
    @test_int [cot(c + d*x)^3/(a + a*sec(c + d*x))^2, x, 3, -(1/(16*a^2*d*(1 - cos(c + d*x)))) - 1/(12*a^2*d*(1 + cos(c + d*x))^3) + 1/(2*a^2*d*(1 + cos(c + d*x))^2) - 23/(16*a^2*d*(1 + cos(c + d*x))) - (3*log(1 - cos(c + d*x)))/(16*a^2*d) - (13*log(1 + cos(c + d*x)))/(16*a^2*d)]
    @test_int [cot(c + d*x)^5/(a + a*sec(c + d*x))^2, x, 3, -(1/(64*a^2*d*(1 - cos(c + d*x))^2)) + 9/(64*a^2*d*(1 - cos(c + d*x))) - 1/(32*a^2*d*(1 + cos(c + d*x))^4) + 11/(48*a^2*d*(1 + cos(c + d*x))^3) - 3/(4*a^2*d*(1 + cos(c + d*x))^2) + 51/(32*a^2*d*(1 + cos(c + d*x))) + (29*log(1 - cos(c + d*x)))/(128*a^2*d) + (99*log(1 + cos(c + d*x)))/(128*a^2*d)]

    @test_int [tan(c + d*x)^8/(a + a*sec(c + d*x))^2, x, 11, x/a^2 - (3*atanh(sin(c + d*x)))/(4*a^2*d) - tan(c + d*x)/(a^2*d) + (3*sec(c + d*x)*tan(c + d*x))/(4*a^2*d) + tan(c + d*x)^3/(3*a^2*d) - (sec(c + d*x)*tan(c + d*x)^3)/(2*a^2*d) + tan(c + d*x)^5/(5*a^2*d)]
    @test_int [tan(c + d*x)^6/(a + a*sec(c + d*x))^2, x, 9, -(x/a^2) + atanh(sin(c + d*x))/(a^2*d) + tan(c + d*x)/(a^2*d) - (sec(c + d*x)*tan(c + d*x))/(a^2*d) + tan(c + d*x)^3/(3*a^2*d)]
    @test_int [tan(c + d*x)^4/(a + a*sec(c + d*x))^2, x, 5, x/a^2 - (2*atanh(sin(c + d*x)))/(a^2*d) + tan(c + d*x)/(a^2*d)]
    @test_int [tan(c + d*x)^2/(a + a*sec(c + d*x))^2, x, 9, -(x/a^2) + (2*tan(c + d*x))/(a*d*(a + a*sec(c + d*x))), -(x/a^2) - (2*cot(c + d*x))/(a^2*d) + (2*csc(c + d*x))/(a^2*d)]
    @test_int [cot(c + d*x)^2/(a + a*sec(c + d*x))^2, x, 12, -(x/a^2) - cot(c + d*x)/(a^2*d) + cot(c + d*x)^3/(3*a^2*d) - (2*cot(c + d*x)^5)/(5*a^2*d) + (2*csc(c + d*x))/(a^2*d) - (4*csc(c + d*x)^3)/(3*a^2*d) + (2*csc(c + d*x)^5)/(5*a^2*d)]
    @test_int [cot(c + d*x)^4/(a + a*sec(c + d*x))^2, x, 13, x/a^2 + cot(c + d*x)/(a^2*d) - cot(c + d*x)^3/(3*a^2*d) + cot(c + d*x)^5/(5*a^2*d) - (2*cot(c + d*x)^7)/(7*a^2*d) - (2*csc(c + d*x))/(a^2*d) + (2*csc(c + d*x)^3)/(a^2*d) - (6*csc(c + d*x)^5)/(5*a^2*d) + (2*csc(c + d*x)^7)/(7*a^2*d)]
    @test_int [cot(c + d*x)^6/(a + a*sec(c + d*x))^2, x, 14, -(x/a^2) - cot(c + d*x)/(a^2*d) + cot(c + d*x)^3/(3*a^2*d) - cot(c + d*x)^5/(5*a^2*d) + cot(c + d*x)^7/(7*a^2*d) - (2*cot(c + d*x)^9)/(9*a^2*d) + (2*csc(c + d*x))/(a^2*d) - (8*csc(c + d*x)^3)/(3*a^2*d) + (12*csc(c + d*x)^5)/(5*a^2*d) - (8*csc(c + d*x)^7)/(7*a^2*d) + (2*csc(c + d*x)^9)/(9*a^2*d)]

    @test_int [tan(c + d*x)^11/(a + a*sec(c + d*x))^3, x, 3, log(cos(c + d*x))/(a^3*d) + (3*sec(c + d*x))/(a^3*d) - sec(c + d*x)^2/(2*a^3*d) - (5*sec(c + d*x)^3)/(3*a^3*d) + (5*sec(c + d*x)^4)/(4*a^3*d) + sec(c + d*x)^5/(5*a^3*d) - sec(c + d*x)^6/(2*a^3*d) + sec(c + d*x)^7/(7*a^3*d)]
    @test_int [tan(c + d*x)^9/(a + a*sec(c + d*x))^3, x, 3, -(log(cos(c + d*x))/(a^3*d)) - (3*sec(c + d*x))/(a^3*d) + sec(c + d*x)^2/(a^3*d) + (2*sec(c + d*x)^3)/(3*a^3*d) - (3*sec(c + d*x)^4)/(4*a^3*d) + sec(c + d*x)^5/(5*a^3*d)]
    @test_int [tan(c + d*x)^7/(a + a*sec(c + d*x))^3, x, 3, log(cos(c + d*x))/(a^3*d) + (3*sec(c + d*x))/(a^3*d) - (3*sec(c + d*x)^2)/(2*a^3*d) + sec(c + d*x)^3/(3*a^3*d)]
    @test_int [tan(c + d*x)^5/(a + a*sec(c + d*x))^3, x, 3, (3*log(cos(c + d*x)))/(a^3*d) - (4*log(1 + cos(c + d*x)))/(a^3*d) + sec(c + d*x)/(a^3*d)]
    @test_int [tan(c + d*x)^3/(a + a*sec(c + d*x))^3, x, 3, 2/(a^3*d*(1 + cos(c + d*x))) + log(1 + cos(c + d*x))/(a^3*d)]
    @test_int [tan(c + d*x)^1/(a + a*sec(c + d*x))^3, x, 3, 1/(2*a^3*d*(1 + cos(c + d*x))^2) - 2/(a^3*d*(1 + cos(c + d*x))) - log(1 + cos(c + d*x))/(a^3*d)]
    @test_int [cot(c + d*x)^1/(a + a*sec(c + d*x))^3, x, 3, 1/(6*a^3*d*(1 + cos(c + d*x))^3) - 7/(8*a^3*d*(1 + cos(c + d*x))^2) + 17/(8*a^3*d*(1 + cos(c + d*x))) + log(1 - cos(c + d*x))/(16*a^3*d) + (15*log(1 + cos(c + d*x)))/(16*a^3*d)]
    @test_int [cot(c + d*x)^3/(a + a*sec(c + d*x))^3, x, 3, -(1/(32*a^3*d*(1 - cos(c + d*x)))) + 1/(16*a^3*d*(1 + cos(c + d*x))^4) - 5/(12*a^3*d*(1 + cos(c + d*x))^3) + 39/(32*a^3*d*(1 + cos(c + d*x))^2) - 9/(4*a^3*d*(1 + cos(c + d*x))) - (7*log(1 - cos(c + d*x)))/(64*a^3*d) - (57*log(1 + cos(c + d*x)))/(64*a^3*d)]
    @test_int [cot(c + d*x)^5/(a + a*sec(c + d*x))^3, x, 3, -(1/(128*a^3*d*(1 - cos(c + d*x))^2)) + 5/(64*a^3*d*(1 - cos(c + d*x))) + 1/(40*a^3*d*(1 + cos(c + d*x))^5) - 13/(64*a^3*d*(1 + cos(c + d*x))^4) + 35/(48*a^3*d*(1 + cos(c + d*x))^3) - 99/(64*a^3*d*(1 + cos(c + d*x))^2) + 303/(128*a^3*d*(1 + cos(c + d*x))) + (37*log(1 - cos(c + d*x)))/(256*a^3*d) + (219*log(1 + cos(c + d*x)))/(256*a^3*d)]

    @test_int [tan(c + d*x)^12/(a + a*sec(c + d*x))^3, x, 18, x/a^3 - (125*atanh(sin(c + d*x)))/(128*a^3*d) - tan(c + d*x)/(a^3*d) + (115*sec(c + d*x)*tan(c + d*x))/(128*a^3*d) + (5*sec(c + d*x)^3*tan(c + d*x))/(64*a^3*d) + tan(c + d*x)^3/(3*a^3*d) - (5*sec(c + d*x)*tan(c + d*x)^3)/(8*a^3*d) - (5*sec(c + d*x)^3*tan(c + d*x)^3)/(48*a^3*d) - tan(c + d*x)^5/(5*a^3*d) + (sec(c + d*x)*tan(c + d*x)^5)/(2*a^3*d) + (sec(c + d*x)^3*tan(c + d*x)^5)/(8*a^3*d) - (3*tan(c + d*x)^7)/(7*a^3*d)]
    @test_int [tan(c + d*x)^10/(a + a*sec(c + d*x))^3, x, 15, -(x/a^3) + (19*atanh(sin(c + d*x)))/(16*a^3*d) + tan(c + d*x)/(a^3*d) - (17*sec(c + d*x)*tan(c + d*x))/(16*a^3*d) - (sec(c + d*x)^3*tan(c + d*x))/(8*a^3*d) - tan(c + d*x)^3/(3*a^3*d) + (3*sec(c + d*x)*tan(c + d*x)^3)/(4*a^3*d) + (sec(c + d*x)^3*tan(c + d*x)^3)/(6*a^3*d) - (3*tan(c + d*x)^5)/(5*a^3*d)]
    @test_int [tan(c + d*x)^8/(a + a*sec(c + d*x))^3, x, 12, x/a^3 - (13*atanh(sin(c + d*x)))/(8*a^3*d) - tan(c + d*x)/(a^3*d) + (11*sec(c + d*x)*tan(c + d*x))/(8*a^3*d) + (sec(c + d*x)^3*tan(c + d*x))/(4*a^3*d) - tan(c + d*x)^3/(a^3*d)]
    @test_int [tan(c + d*x)^6/(a + a*sec(c + d*x))^3, x, 6, -(x/a^3) + (7*atanh(sin(c + d*x)))/(2*a^3*d) - (5*tan(c + d*x))/(2*a^3*d) - ((1 - sec(c + d*x))*tan(c + d*x))/(2*a^3*d)]
    @test_int [tan(c + d*x)^4/(a + a*sec(c + d*x))^3, x, 12, x/a^3 + atanh(sin(c + d*x))/(a^3*d) - (4*tan(c + d*x))/(a^2*d*(a + a*sec(c + d*x))), x/a^3 + atanh(sin(c + d*x))/(a^3*d) + (4*cot(c + d*x))/(a^3*d) - (4*csc(c + d*x))/(a^3*d)]
    @test_int [tan(c + d*x)^2/(a + a*sec(c + d*x))^3, x, 12, -(x/a^3) + (2*tan(c + d*x))/(a^2*d*(a + a*sec(c + d*x))) - tan(c + d*x)^3/(3*d*(a + a*sec(c + d*x))^3), -(x/a^3) - cot(c + d*x)/(a^3*d) + (4*cot(c + d*x)^3)/(3*a^3*d) + (3*csc(c + d*x))/(a^3*d) - (4*csc(c + d*x)^3)/(3*a^3*d)]
    @test_int [cot(c + d*x)^2/(a + a*sec(c + d*x))^3, x, 16, -(x/a^3) - cot(c + d*x)/(a^3*d) + cot(c + d*x)^3/(3*a^3*d) - cot(c + d*x)^5/(5*a^3*d) + (4*cot(c + d*x)^7)/(7*a^3*d) + (3*csc(c + d*x))/(a^3*d) - (10*csc(c + d*x)^3)/(3*a^3*d) + (11*csc(c + d*x)^5)/(5*a^3*d) - (4*csc(c + d*x)^7)/(7*a^3*d)]
    @test_int [cot(c + d*x)^4/(a + a*sec(c + d*x))^3, x, 17, x/a^3 + cot(c + d*x)/(a^3*d) - cot(c + d*x)^3/(3*a^3*d) + cot(c + d*x)^5/(5*a^3*d) - cot(c + d*x)^7/(7*a^3*d) + (4*cot(c + d*x)^9)/(9*a^3*d) - (3*csc(c + d*x))/(a^3*d) + (13*csc(c + d*x)^3)/(3*a^3*d) - (21*csc(c + d*x)^5)/(5*a^3*d) + (15*csc(c + d*x)^7)/(7*a^3*d) - (4*csc(c + d*x)^9)/(9*a^3*d)]
    @test_int [cot(c + d*x)^6/(a + a*sec(c + d*x))^3, x, 18, -(x/a^3) - cot(c + d*x)/(a^3*d) + cot(c + d*x)^3/(3*a^3*d) - cot(c + d*x)^5/(5*a^3*d) + cot(c + d*x)^7/(7*a^3*d) - cot(c + d*x)^9/(9*a^3*d) + (4*cot(c + d*x)^11)/(11*a^3*d) + (3*csc(c + d*x))/(a^3*d) - (16*csc(c + d*x)^3)/(3*a^3*d) + (34*csc(c + d*x)^5)/(5*a^3*d) - (36*csc(c + d*x)^7)/(7*a^3*d) + (19*csc(c + d*x)^9)/(9*a^3*d) - (4*csc(c + d*x)^11)/(11*a^3*d)]

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

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

    @test_int [(a + a*sec(c + d*x))*(e*tan(c + d*x))^(5/2), x, 17, (a*e^(5/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) - (a*e^(5/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) - (a*e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) + (a*e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) + (6*a*e^2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(5*d*sqrt(sin(2*c + 2*d*x))) - (6*a*e*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(5*d) + (2*e*(5*a + 3*a*sec(c + d*x))*(e*tan(c + d*x))^(3/2))/(15*d)]
    @test_int [(a + a*sec(c + d*x))*(e*tan(c + d*x))^(3/2), x, 16, (a*e^(3/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) - (a*e^(3/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) + (a*e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) - (a*e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) - (a*e^2*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*d*sqrt(e*tan(c + d*x))) + (2*e*(3*a + a*sec(c + d*x))*sqrt(e*tan(c + d*x)))/(3*d)]
    @test_int [(a + a*sec(c + d*x))*sqrt(e*tan(c + d*x)), x, 16, -((a*sqrt(e)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d)) + (a*sqrt(e)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) + (a*sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) - (a*sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) - (2*a*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(d*sqrt(sin(2*c + 2*d*x))) + (2*a*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(d*e)]
    @test_int [(a + a*sec(c + d*x))/sqrt(e*tan(c + d*x)), x, 15, -((a*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*sqrt(e))) + (a*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*sqrt(e)) - (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*sqrt(e)) + (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*sqrt(e)) + (a*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(d*sqrt(e*tan(c + d*x)))]
    @test_int [(a + a*sec(c + d*x))/(e*tan(c + d*x))^(3/2), x, 17, (a*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(3/2)) - (a*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(3/2)) - (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(3/2)) + (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(3/2)) - (2*(a + a*sec(c + d*x)))/(d*e*sqrt(e*tan(c + d*x))) - (2*a*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(d*e^2*sqrt(sin(2*c + 2*d*x))) + (2*a*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(d*e^3)]
    @test_int [(a + a*sec(c + d*x))/(e*tan(c + d*x))^(5/2), x, 16, (a*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(5/2)) - (a*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(5/2)) + (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(5/2)) - (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(5/2)) - (2*(a + a*sec(c + d*x)))/(3*d*e*(e*tan(c + d*x))^(3/2)) - (a*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*d*e^2*sqrt(e*tan(c + d*x)))]
    @test_int [(a + a*sec(c + d*x))/(e*tan(c + d*x))^(7/2), x, 18, -((a*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(7/2))) + (a*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(7/2)) + (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(7/2)) - (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(7/2)) - (2*(a + a*sec(c + d*x)))/(5*d*e*(e*tan(c + d*x))^(5/2)) + (2*(5*a + 3*a*sec(c + d*x)))/(5*d*e^3*sqrt(e*tan(c + d*x))) + (6*a*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(5*d*e^4*sqrt(sin(2*c + 2*d*x))) - (6*a*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(5*d*e^5)]

    @test_int [(a + a*sec(c + d*x))^2*(e*tan(c + d*x))^(5/2), x, 21, (a^2*e^(5/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) - (a^2*e^(5/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) - (a^2*e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) + (a^2*e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) + (12*a^2*e^2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(5*d*sqrt(sin(2*c + 2*d*x))) + (2*a^2*e*(e*tan(c + d*x))^(3/2))/(3*d) - (12*a^2*e*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(5*d) + (4*a^2*e*sec(c + d*x)*(e*tan(c + d*x))^(3/2))/(5*d) + (2*a^2*(e*tan(c + d*x))^(7/2))/(7*d*e)]
    @test_int [(a + a*sec(c + d*x))^2*(e*tan(c + d*x))^(3/2), x, 20, (a^2*e^(3/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) - (a^2*e^(3/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) + (a^2*e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) - (a^2*e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) - (2*a^2*e^2*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*d*sqrt(e*tan(c + d*x))) + (2*a^2*e*sqrt(e*tan(c + d*x)))/d + (4*a^2*e*sec(c + d*x)*sqrt(e*tan(c + d*x)))/(3*d) + (2*a^2*(e*tan(c + d*x))^(5/2))/(5*d*e)]
    @test_int [(a + a*sec(c + d*x))^2*sqrt(e*tan(c + d*x)), x, 19, -((a^2*sqrt(e)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d)) + (a^2*sqrt(e)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d) + (a^2*sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) - (a^2*sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d) - (4*a^2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(d*sqrt(sin(2*c + 2*d*x))) + (2*a^2*(e*tan(c + d*x))^(3/2))/(3*d*e) + (4*a^2*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(d*e)]
    @test_int [(a + a*sec(c + d*x))^2/sqrt(e*tan(c + d*x)), x, 18, -((a^2*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*sqrt(e))) + (a^2*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*sqrt(e)) - (a^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*sqrt(e)) + (a^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*sqrt(e)) + (2*a^2*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(d*sqrt(e*tan(c + d*x))) + (2*a^2*sqrt(e*tan(c + d*x)))/(d*e)]
    @test_int [(a + a*sec(c + d*x))^2/(e*tan(c + d*x))^(3/2), x, 20, (a^2*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(3/2)) - (a^2*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(3/2)) - (a^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(3/2)) + (a^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(3/2)) - (4*a^2)/(d*e*sqrt(e*tan(c + d*x))) - (4*a^2*cos(c + d*x))/(d*e*sqrt(e*tan(c + d*x))) - (4*a^2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(d*e^2*sqrt(sin(2*c + 2*d*x)))]
    @test_int [(a + a*sec(c + d*x))^2/(e*tan(c + d*x))^(5/2), x, 20, (a^2*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(5/2)) - (a^2*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(5/2)) + (a^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(5/2)) - (a^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(5/2)) - (4*a^2)/(3*d*e*(e*tan(c + d*x))^(3/2)) - (4*a^2*sec(c + d*x))/(3*d*e*(e*tan(c + d*x))^(3/2)) - (2*a^2*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*d*e^2*sqrt(e*tan(c + d*x)))]
    @test_int [(a + a*sec(c + d*x))^2/(e*tan(c + d*x))^(7/2), x, 22, -((a^2*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(7/2))) + (a^2*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*d*e^(7/2)) + (a^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(7/2)) - (a^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*d*e^(7/2)) - (4*a^2)/(5*d*e*(e*tan(c + d*x))^(5/2)) - (4*a^2*sec(c + d*x))/(5*d*e*(e*tan(c + d*x))^(5/2)) + (2*a^2)/(d*e^3*sqrt(e*tan(c + d*x))) + (12*a^2*cos(c + d*x))/(5*d*e^3*sqrt(e*tan(c + d*x))) + (12*a^2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(5*d*e^4*sqrt(sin(2*c + 2*d*x)))]

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

    @test_int [(e*tan(c + d*x))^(11/2)/(a + a*sec(c + d*x)), x, 18, (e^(11/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) - (e^(11/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) + (e^(11/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) - (e^(11/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) + (5*e^6*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(21*a*d*sqrt(e*tan(c + d*x))) + (2*e^5*(21 - 5*sec(c + d*x))*sqrt(e*tan(c + d*x)))/(21*a*d) - (2*e^3*(7 - 5*sec(c + d*x))*(e*tan(c + d*x))^(5/2))/(35*a*d)]
    @test_int [(e*tan(c + d*x))^(9/2)/(a + a*sec(c + d*x)), x, 18, -((e^(9/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d)) + (e^(9/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) + (e^(9/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) - (e^(9/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) + (6*e^4*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(5*a*d*sqrt(sin(2*c + 2*d*x))) - (6*e^3*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(5*a*d) - (2*e^3*(5 - 3*sec(c + d*x))*(e*tan(c + d*x))^(3/2))/(15*a*d)]
    @test_int [(e*tan(c + d*x))^(7/2)/(a + a*sec(c + d*x)), x, 17, -((e^(7/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d)) + (e^(7/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) - (e^(7/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) + (e^(7/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) - (e^4*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*a*d*sqrt(e*tan(c + d*x))) - (2*e^3*(3 - sec(c + d*x))*sqrt(e*tan(c + d*x)))/(3*a*d)]
    @test_int [(e*tan(c + d*x))^(5/2)/(a + a*sec(c + d*x)), x, 17, (e^(5/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) - (e^(5/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) - (e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) + (e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) - (2*e^2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(a*d*sqrt(sin(2*c + 2*d*x))) + (2*e*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(a*d)]
    @test_int [(e*tan(c + d*x))^(3/2)/(a + a*sec(c + d*x)), x, 16, (e^(3/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) - (e^(3/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) + (e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) - (e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) + (e^2*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(a*d*sqrt(e*tan(c + d*x)))]
    @test_int [sqrt(e*tan(c + d*x))/(a + a*sec(c + d*x)), x, 18, -((sqrt(e)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d)) + (sqrt(e)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) + (sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) - (sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) + (2*e*(1 - sec(c + d*x)))/(a*d*sqrt(e*tan(c + d*x))) - (2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(a*d*sqrt(sin(2*c + 2*d*x))) + (2*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(a*d*e)]
    @test_int [1/((a + a*sec(c + d*x))*sqrt(e*tan(c + d*x))), x, 17, -(atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a*d*sqrt(e))) + atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a*d*sqrt(e)) - log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a*d*sqrt(e)) + log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a*d*sqrt(e)) + (2*e*(1 - sec(c + d*x)))/(3*a*d*(e*tan(c + d*x))^(3/2)) - (Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*a*d*sqrt(e*tan(c + d*x)))]
    @test_int [1/((a + a*sec(c + d*x))*(e*tan(c + d*x))^(3/2)), x, 19, atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a*d*e^(3/2)) - atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a*d*e^(3/2)) - log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a*d*e^(3/2)) + log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a*d*e^(3/2)) + (2*e*(1 - sec(c + d*x)))/(5*a*d*(e*tan(c + d*x))^(5/2)) - (2*(5 - 3*sec(c + d*x)))/(5*a*d*e*sqrt(e*tan(c + d*x))) + (6*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(5*a*d*e^2*sqrt(sin(2*c + 2*d*x))) - (6*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(5*a*d*e^3)]
    @test_int [1/((a + a*sec(c + d*x))*(e*tan(c + d*x))^(5/2)), x, 18, atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a*d*e^(5/2)) - atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a*d*e^(5/2)) + log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a*d*e^(5/2)) - log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a*d*e^(5/2)) + (2*e*(1 - sec(c + d*x)))/(7*a*d*(e*tan(c + d*x))^(7/2)) - (2*(7 - 5*sec(c + d*x)))/(21*a*d*e*(e*tan(c + d*x))^(3/2)) + (5*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(21*a*d*e^2*sqrt(e*tan(c + d*x)))]

    @test_int [(e*tan(c + d*x))^(13/2)/(a + a*sec(c + d*x))^2, x, 22, (e^(13/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) - (e^(13/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) - (e^(13/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) + (e^(13/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) - (12*e^6*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(5*a^2*d*sqrt(sin(2*c + 2*d*x))) + (2*e^5*(e*tan(c + d*x))^(3/2))/(3*a^2*d) + (12*e^5*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(5*a^2*d) - (4*e^5*sec(c + d*x)*(e*tan(c + d*x))^(3/2))/(5*a^2*d) + (2*e^3*(e*tan(c + d*x))^(7/2))/(7*a^2*d)]
    @test_int [(e*tan(c + d*x))^(11/2)/(a + a*sec(c + d*x))^2, x, 21, (e^(11/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) - (e^(11/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) + (e^(11/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) - (e^(11/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) + (2*e^6*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*a^2*d*sqrt(e*tan(c + d*x))) + (2*e^5*sqrt(e*tan(c + d*x)))/(a^2*d) - (4*e^5*sec(c + d*x)*sqrt(e*tan(c + d*x)))/(3*a^2*d) + (2*e^3*(e*tan(c + d*x))^(5/2))/(5*a^2*d)]
    @test_int [(e*tan(c + d*x))^(9/2)/(a + a*sec(c + d*x))^2, x, 20, -((e^(9/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d)) + (e^(9/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) + (e^(9/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) - (e^(9/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) + (4*e^4*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(a^2*d*sqrt(sin(2*c + 2*d*x))) + (2*e^3*(e*tan(c + d*x))^(3/2))/(3*a^2*d) - (4*e^3*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(a^2*d)]
    @test_int [(e*tan(c + d*x))^(7/2)/(a + a*sec(c + d*x))^2, x, 19, -((e^(7/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d)) + (e^(7/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) - (e^(7/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) + (e^(7/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) - (2*e^4*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(a^2*d*sqrt(e*tan(c + d*x))) + (2*e^3*sqrt(e*tan(c + d*x)))/(a^2*d)]
    @test_int [(e*tan(c + d*x))^(5/2)/(a + a*sec(c + d*x))^2, x, 21, (e^(5/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) - (e^(5/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) - (e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) + (e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) - (4*e^3)/(a^2*d*sqrt(e*tan(c + d*x))) + (4*e^3*cos(c + d*x))/(a^2*d*sqrt(e*tan(c + d*x))) + (4*e^2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(a^2*d*sqrt(sin(2*c + 2*d*x)))]
    @test_int [(e*tan(c + d*x))^(3/2)/(a + a*sec(c + d*x))^2, x, 21, (e^(3/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) - (e^(3/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) + (e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) - (e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) - (4*e^3)/(3*a^2*d*(e*tan(c + d*x))^(3/2)) + (4*e^3*sec(c + d*x))/(3*a^2*d*(e*tan(c + d*x))^(3/2)) + (2*e^2*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*a^2*d*sqrt(e*tan(c + d*x)))]
    @test_int [sqrt(e*tan(c + d*x))/(a + a*sec(c + d*x))^2, x, 23, -((sqrt(e)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d)) + (sqrt(e)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a^2*d) + (sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) - (sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a^2*d) - (4*e^3)/(5*a^2*d*(e*tan(c + d*x))^(5/2)) + (4*e^3*sec(c + d*x))/(5*a^2*d*(e*tan(c + d*x))^(5/2)) + (2*e)/(a^2*d*sqrt(e*tan(c + d*x))) - (12*e*cos(c + d*x))/(5*a^2*d*sqrt(e*tan(c + d*x))) - (12*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(5*a^2*d*sqrt(sin(2*c + 2*d*x)))]
    @test_int [1/((a + a*sec(c + d*x))^2*sqrt(e*tan(c + d*x))), x, 23, -(atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a^2*d*sqrt(e))) + atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a^2*d*sqrt(e)) - log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a^2*d*sqrt(e)) + log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a^2*d*sqrt(e)) - (4*e^3)/(7*a^2*d*(e*tan(c + d*x))^(7/2)) + (4*e^3*sec(c + d*x))/(7*a^2*d*(e*tan(c + d*x))^(7/2)) + (2*e)/(3*a^2*d*(e*tan(c + d*x))^(3/2)) - (20*e*sec(c + d*x))/(21*a^2*d*(e*tan(c + d*x))^(3/2)) - (10*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(21*a^2*d*sqrt(e*tan(c + d*x)))]

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

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

    @test_int [sqrt(a + a*sec(c + d*x))*tan(c + d*x)^5, x, 8, (-2*sqrt(a)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d + (2*sqrt(a + a*sec(c + d*x)))/d + (2*(a + a*sec(c + d*x))^(3/2))/(3*a*d) + (2*(a + a*sec(c + d*x))^(5/2))/(5*a^2*d) - (6*(a + a*sec(c + d*x))^(7/2))/(7*a^3*d) + (2*(a + a*sec(c + d*x))^(9/2))/(9*a^4*d)]
    @test_int [sqrt(a + a*sec(c + d*x))*tan(c + d*x)^3, x, 6, (2*sqrt(a)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d - (2*sqrt(a + a*sec(c + d*x)))/d - (2*(a + a*sec(c + d*x))^(3/2))/(3*a*d) + (2*(a + a*sec(c + d*x))^(5/2))/(5*a^2*d)]
    @test_int [sqrt(a + a*sec(c + d*x))*tan(c + d*x), x, 4, (-2*sqrt(a)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d + (2*sqrt(a + a*sec(c + d*x)))/d]
    @test_int [cot(c + d*x)*sqrt(a + a*sec(c + d*x)), x, 6, (2*sqrt(a)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d - (sqrt(2)*sqrt(a)*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/d]
    @test_int [cot(c + d*x)^3*sqrt(a + a*sec(c + d*x)), x, 8, -((2*sqrt(a)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d) + (7*sqrt(a)*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(4*sqrt(2)*d) + a/(4*d*sqrt(a + a*sec(c + d*x))) + a/(2*d*(1 - sec(c + d*x))*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)^5*sqrt(a + a*sec(c + d*x)), x, 10, (2*sqrt(a)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d - (107*sqrt(a)*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(64*sqrt(2)*d) + (43*a^2)/(96*d*(a + a*sec(c + d*x))^(3/2)) - a^2/(4*d*(1 - sec(c + d*x))^2*(a + a*sec(c + d*x))^(3/2)) - (15*a^2)/(16*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)) - (21*a)/(64*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [sqrt(a + a*sec(c + d*x))*tan(c + d*x)^6, x, 4, -((2*sqrt(a)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (2*a*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) - (2*a^2*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (2*a^3*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2)) + (2*a^4*tan(c + d*x)^7)/(d*(a + a*sec(c + d*x))^(7/2)) + (10*a^5*tan(c + d*x)^9)/(9*d*(a + a*sec(c + d*x))^(9/2)) + (2*a^6*tan(c + d*x)^11)/(11*d*(a + a*sec(c + d*x))^(11/2))]
    @test_int [sqrt(a + a*sec(c + d*x))*tan(c + d*x)^4, x, 4, (2*sqrt(a)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d - (2*a*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (2*a^2*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (6*a^3*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2)) + (2*a^4*tan(c + d*x)^7)/(7*d*(a + a*sec(c + d*x))^(7/2))]
    @test_int [sqrt(a + a*sec(c + d*x))*tan(c + d*x)^2, x, 4, -((2*sqrt(a)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (2*a*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (2*a^2*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [cot(c + d*x)^2*sqrt(a + a*sec(c + d*x)), x, 5, -((2*sqrt(a)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (sqrt(a)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(2)*d) - (cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*sqrt(a + a*sec(c + d*x)), x, 7, (2*sqrt(a)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d - (9*sqrt(a)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(8*sqrt(2)*d) + (7*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(8*d) + (cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(12*a*d) - (cos(c + d*x)*cot(c + d*x)^3*sec((1/2)*(c + d*x))^2*(a + a*sec(c + d*x))^(3/2))/(4*a*d)]
    @test_int [cot(c + d*x)^6*sqrt(a + a*sec(c + d*x)), x, 9, -((2*sqrt(a)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (151*sqrt(a)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(128*sqrt(2)*d) - (105*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(128*d) - (23*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(192*a*d) + (87*cot(c + d*x)^5*(a + a*sec(c + d*x))^(5/2))/(160*a^2*d) - (17*cos(c + d*x)*cot(c + d*x)^5*sec((1/2)*(c + d*x))^2*(a + a*sec(c + d*x))^(5/2))/(32*a^2*d) - (cos(c + d*x)^2*cot(c + d*x)^5*sec((1/2)*(c + d*x))^4*(a + a*sec(c + d*x))^(5/2))/(16*a^2*d)]

    @test_int [(a + a*sec(c + d*x))^(3/2)*tan(c + d*x)^5, x, 9, (-2*a^(3/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d + (2*a*sqrt(a + a*sec(c + d*x)))/d + (2*(a + a*sec(c + d*x))^(3/2))/(3*d) + (2*(a + a*sec(c + d*x))^(5/2))/(5*a*d) + (2*(a + a*sec(c + d*x))^(7/2))/(7*a^2*d) - (2*(a + a*sec(c + d*x))^(9/2))/(3*a^3*d) + (2*(a + a*sec(c + d*x))^(11/2))/(11*a^4*d)]
    @test_int [(a + a*sec(c + d*x))^(3/2)*tan(c + d*x)^3, x, 7, (2*a^(3/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d - (2*a*sqrt(a + a*sec(c + d*x)))/d - (2*(a + a*sec(c + d*x))^(3/2))/(3*d) - (2*(a + a*sec(c + d*x))^(5/2))/(5*a*d) + (2*(a + a*sec(c + d*x))^(7/2))/(7*a^2*d)]
    @test_int [(a + a*sec(c + d*x))^(3/2)*tan(c + d*x), x, 5, (-2*a^(3/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d + (2*a*sqrt(a + a*sec(c + d*x)))/d + (2*(a + a*sec(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)*(a + a*sec(c + d*x))^(3/2), x, 6, (2*a^(3/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d - (2*sqrt(2)*a^(3/2)*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/d]
    @test_int [cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2), x, 7, (-2*a^(3/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d + (5*a^(3/2)*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(2*sqrt(2)*d) + (a*sqrt(a + a*sec(c + d*x)))/(2*d*(1 - sec(c + d*x)))]
    @test_int [cot(c + d*x)^5*(a + a*sec(c + d*x))^(3/2), x, 9, (2*a^(3/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d - (71*a^(3/2)*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(32*sqrt(2)*d) + (7*a^2)/(32*d*sqrt(a + a*sec(c + d*x))) - a^2/(4*d*(1 - sec(c + d*x))^2*sqrt(a + a*sec(c + d*x))) - (13*a^2)/(16*d*(1 - sec(c + d*x))*sqrt(a + a*sec(c + d*x)))]

    @test_int [(a + a*sec(c + d*x))^(3/2)*tan(c + d*x)^6, x, 4, -((2*a^(3/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (2*a^2*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) - (2*a^3*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (2*a^4*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2)) + (30*a^5*tan(c + d*x)^7)/(7*d*(a + a*sec(c + d*x))^(7/2)) + (34*a^6*tan(c + d*x)^9)/(9*d*(a + a*sec(c + d*x))^(9/2)) + (14*a^7*tan(c + d*x)^11)/(11*d*(a + a*sec(c + d*x))^(11/2)) + (2*a^8*tan(c + d*x)^13)/(13*d*(a + a*sec(c + d*x))^(13/2))]
    @test_int [(a + a*sec(c + d*x))^(3/2)*tan(c + d*x)^4, x, 4, (2*a^(3/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d - (2*a^2*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (2*a^3*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (14*a^4*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2)) + (10*a^5*tan(c + d*x)^7)/(7*d*(a + a*sec(c + d*x))^(7/2)) + (2*a^6*tan(c + d*x)^9)/(9*d*(a + a*sec(c + d*x))^(9/2))]
    @test_int [(a + a*sec(c + d*x))^(3/2)*tan(c + d*x)^2, x, 4, -((2*a^(3/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (2*a^2*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (2*a^3*tan(c + d*x)^3)/(d*(a + a*sec(c + d*x))^(3/2)) + (2*a^4*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2))]
    @test_int [cot(c + d*x)^2*(a + a*sec(c + d*x))^(3/2), x, 3, -((2*a^(3/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) - (2*a*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*(a + a*sec(c + d*x))^(3/2), x, 6, (2*a^(3/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d - (a^(3/2)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(2*sqrt(2)*d) + (3*a*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(2*d) - (cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)^6*(a + a*sec(c + d*x))^(3/2), x, 8, -((2*a^(3/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (11*a^(3/2)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(16*sqrt(2)*d) - (21*a*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(16*d) + (5*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(24*d) + (3*cot(c + d*x)^5*(a + a*sec(c + d*x))^(5/2))/(20*a*d) - (cos(c + d*x)*cot(c + d*x)^5*sec((1/2)*(c + d*x))^2*(a + a*sec(c + d*x))^(5/2))/(4*a*d)]

    @test_int [(a + a*sec(c + d*x))^(5/2)*tan(c + d*x)^5, x, 10, (-2*a^(5/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d + (2*a^2*sqrt(a + a*sec(c + d*x)))/d + (2*a*(a + a*sec(c + d*x))^(3/2))/(3*d) + (2*(a + a*sec(c + d*x))^(5/2))/(5*d) + (2*(a + a*sec(c + d*x))^(7/2))/(7*a*d) + (2*(a + a*sec(c + d*x))^(9/2))/(9*a^2*d) - (6*(a + a*sec(c + d*x))^(11/2))/(11*a^3*d) + (2*(a + a*sec(c + d*x))^(13/2))/(13*a^4*d)]
    @test_int [(a + a*sec(c + d*x))^(5/2)*tan(c + d*x)^3, x, 8, (2*a^(5/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d - (2*a^2*sqrt(a + a*sec(c + d*x)))/d - (2*a*(a + a*sec(c + d*x))^(3/2))/(3*d) - (2*(a + a*sec(c + d*x))^(5/2))/(5*d) - (2*(a + a*sec(c + d*x))^(7/2))/(7*a*d) + (2*(a + a*sec(c + d*x))^(9/2))/(9*a^2*d)]
    @test_int [(a + a*sec(c + d*x))^(5/2)*tan(c + d*x), x, 6, (-2*a^(5/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d + (2*a^2*sqrt(a + a*sec(c + d*x)))/d + (2*a*(a + a*sec(c + d*x))^(3/2))/(3*d) + (2*(a + a*sec(c + d*x))^(5/2))/(5*d)]
    @test_int [cot(c + d*x)*(a + a*sec(c + d*x))^(5/2), x, 7, (2*a^(5/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d - (4*sqrt(2)*a^(5/2)*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/d + (2*a^2*sqrt(a + a*sec(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + a*sec(c + d*x))^(5/2), x, 7, (-2*a^(5/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d + (3*a^(5/2)*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(sqrt(2)*d) + (a^2*sqrt(a + a*sec(c + d*x)))/(d*(1 - sec(c + d*x)))]
    @test_int [cot(c + d*x)^5*(a + a*sec(c + d*x))^(5/2), x, 8, (2*a^(5/2)*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/d - (43*a^(5/2)*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(16*sqrt(2)*d) - (a^2*sqrt(a + a*sec(c + d*x)))/(4*d*(1 - sec(c + d*x))^2) - (11*a^2*sqrt(a + a*sec(c + d*x)))/(16*d*(1 - sec(c + d*x)))]

    @test_int [(a + a*sec(c + d*x))^(5/2)*tan(c + d*x)^6, x, 4, -((2*a^(5/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (2*a^3*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) - (2*a^4*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (2*a^5*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2)) + (62*a^6*tan(c + d*x)^7)/(7*d*(a + a*sec(c + d*x))^(7/2)) + (98*a^7*tan(c + d*x)^9)/(9*d*(a + a*sec(c + d*x))^(9/2)) + (62*a^8*tan(c + d*x)^11)/(11*d*(a + a*sec(c + d*x))^(11/2)) + (18*a^9*tan(c + d*x)^13)/(13*d*(a + a*sec(c + d*x))^(13/2)) + (2*a^10*tan(c + d*x)^15)/(15*d*(a + a*sec(c + d*x))^(15/2))]
    @test_int [(a + a*sec(c + d*x))^(5/2)*tan(c + d*x)^4, x, 4, (2*a^(5/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d - (2*a^3*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (2*a^4*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (6*a^5*tan(c + d*x)^5)/(d*(a + a*sec(c + d*x))^(5/2)) + (34*a^6*tan(c + d*x)^7)/(7*d*(a + a*sec(c + d*x))^(7/2)) + (14*a^7*tan(c + d*x)^9)/(9*d*(a + a*sec(c + d*x))^(9/2)) + (2*a^8*tan(c + d*x)^11)/(11*d*(a + a*sec(c + d*x))^(11/2))]
    @test_int [(a + a*sec(c + d*x))^(5/2)*tan(c + d*x)^2, x, 4, -((2*a^(5/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (2*a^3*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (14*a^4*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (2*a^5*tan(c + d*x)^5)/(d*(a + a*sec(c + d*x))^(5/2)) + (2*a^6*tan(c + d*x)^7)/(7*d*(a + a*sec(c + d*x))^(7/2))]
    @test_int [cot(c + d*x)^2*(a + a*sec(c + d*x))^(5/2), x, 3, -((2*a^(5/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) - (4*a^2*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*(a + a*sec(c + d*x))^(5/2), x, 4, (2*a^(5/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d + (2*a^2*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/d - (2*a*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)^6*(a + a*sec(c + d*x))^(5/2), x, 7, -((2*a^(5/2)*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/d) + (a^(5/2)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(4*sqrt(2)*d) - (7*a^2*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(4*d) + (a*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(2*d) - (cot(c + d*x)^5*(a + a*sec(c + d*x))^(5/2))/(5*d)]

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

    @test_int [tan(c + d*x)^5/sqrt(a + a*sec(c + d*x)), x, 7, (-2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(sqrt(a)*d) + (2*sqrt(a + a*sec(c + d*x)))/(a*d) + (2*(a + a*sec(c + d*x))^(3/2))/(3*a^2*d) - (6*(a + a*sec(c + d*x))^(5/2))/(5*a^3*d) + (2*(a + a*sec(c + d*x))^(7/2))/(7*a^4*d)]
    @test_int [tan(c + d*x)^3/sqrt(a + a*sec(c + d*x)), x, 5, (2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(sqrt(a)*d) - (2*sqrt(a + a*sec(c + d*x)))/(a*d) + (2*(a + a*sec(c + d*x))^(3/2))/(3*a^2*d)]
    @test_int [tan(c + d*x)/sqrt(a + a*sec(c + d*x)), x, 3, (-2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(sqrt(a)*d)]
    @test_int [cot(c + d*x)/sqrt(a + a*sec(c + d*x)), x, 7, (2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(sqrt(a)*d) - atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a)))/(sqrt(2)*sqrt(a)*d) - 1/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)^3/sqrt(a + a*sec(c + d*x)), x, 9, -((2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(sqrt(a)*d)) + (9*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(8*sqrt(2)*sqrt(a)*d) - a/(12*d*(a + a*sec(c + d*x))^(3/2)) + a/(2*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(3/2)) + 7/(8*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)^5/sqrt(a + a*sec(c + d*x)), x, 11, (2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(sqrt(a)*d) - (151*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(128*sqrt(2)*sqrt(a)*d) + (87*a^2)/(160*d*(a + a*sec(c + d*x))^(5/2)) - a^2/(4*d*(1 - sec(c + d*x))^2*(a + a*sec(c + d*x))^(5/2)) - (17*a^2)/(16*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)) + (23*a)/(192*d*(a + a*sec(c + d*x))^(3/2)) - 105/(128*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [tan(c + d*x)^6/sqrt(a + a*sec(c + d*x)), x, 4, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d)) + (2*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) - (2*a*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (2*a^2*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2)) + (6*a^3*tan(c + d*x)^7)/(7*d*(a + a*sec(c + d*x))^(7/2)) + (2*a^4*tan(c + d*x)^9)/(9*d*(a + a*sec(c + d*x))^(9/2))]
    @test_int [tan(c + d*x)^4/sqrt(a + a*sec(c + d*x)), x, 5, (2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) - (2*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x))) + (2*a*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (2*a^2*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2))]
    @test_int [tan(c + d*x)^2/sqrt(a + a*sec(c + d*x)), x, 3, (-2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) + (2*tan(c + d*x))/(d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)^2/sqrt(a + a*sec(c + d*x)), x, 6, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d)) + (7*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(4*sqrt(2)*sqrt(a)*d) - (cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(4*a*d) - (cos(c + d*x)*cot(c + d*x)*sec((1/2)*(c + d*x))^2*sqrt(a + a*sec(c + d*x)))/(4*a*d)]
    @test_int [cot(c + d*x)^4/sqrt(a + a*sec(c + d*x)), x, 8, (2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d) - (107*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(64*sqrt(2)*sqrt(a)*d) + (21*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(64*a*d) + (43*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(96*a^2*d) - (15*cos(c + d*x)*cot(c + d*x)^3*sec((1/2)*(c + d*x))^2*(a + a*sec(c + d*x))^(3/2))/(32*a^2*d) - (cos(c + d*x)^2*cot(c + d*x)^3*sec((1/2)*(c + d*x))^4*(a + a*sec(c + d*x))^(3/2))/(16*a^2*d)]
    @test_int [cot(c + d*x)^6/sqrt(a + a*sec(c + d*x)), x, 10, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(sqrt(a)*d)) + (835*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(512*sqrt(2)*sqrt(a)*d) - (189*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(512*a*d) - (323*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(768*a^2*d) + (579*cot(c + d*x)^5*(a + a*sec(c + d*x))^(5/2))/(640*a^3*d) - (101*cos(c + d*x)*cot(c + d*x)^5*sec((1/2)*(c + d*x))^2*(a + a*sec(c + d*x))^(5/2))/(128*a^3*d) - (23*cos(c + d*x)^2*cot(c + d*x)^5*sec((1/2)*(c + d*x))^4*(a + a*sec(c + d*x))^(5/2))/(192*a^3*d) - (cos(c + d*x)^3*cot(c + d*x)^5*sec((1/2)*(c + d*x))^6*(a + a*sec(c + d*x))^(5/2))/(48*a^3*d)]

    @test_int [tan(c + d*x)^5/(a + a*sec(c + d*x))^(3/2), x, 6, (-2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(3/2)*d) + (2*sqrt(a + a*sec(c + d*x)))/(a^2*d) - (2*(a + a*sec(c + d*x))^(3/2))/(a^3*d) + (2*(a + a*sec(c + d*x))^(5/2))/(5*a^4*d)]
    @test_int [tan(c + d*x)^3/(a + a*sec(c + d*x))^(3/2), x, 4, (2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(3/2)*d) + (2*sqrt(a + a*sec(c + d*x)))/(a^2*d)]
    @test_int [tan(c + d*x)/(a + a*sec(c + d*x))^(3/2), x, 4, (-2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(3/2)*d) + 2/(a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)/(a + a*sec(c + d*x))^(3/2), x, 8, (2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(3/2)*d) - atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a)))/(2*sqrt(2)*a^(3/2)*d) - 1/(3*d*(a + a*sec(c + d*x))^(3/2)) - 3/(2*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)^3/(a + a*sec(c + d*x))^(3/2), x, 10, -((2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(3/2)*d)) + (11*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(16*sqrt(2)*a^(3/2)*d) - (3*a)/(20*d*(a + a*sec(c + d*x))^(5/2)) + a/(2*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(5/2)) + 5/(24*d*(a + a*sec(c + d*x))^(3/2)) + 21/(16*a*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)^5/(a + a*sec(c + d*x))^(3/2), x, 12, (2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(3/2)*d) - (203*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(256*sqrt(2)*a^(3/2)*d) + (139*a^2)/(224*d*(a + a*sec(c + d*x))^(7/2)) - a^2/(4*d*(1 - sec(c + d*x))^2*(a + a*sec(c + d*x))^(7/2)) - (19*a^2)/(16*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(7/2)) + (15*a)/(64*d*(a + a*sec(c + d*x))^(5/2)) - 53/(384*d*(a + a*sec(c + d*x))^(3/2)) - 309/(256*a*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [tan(c + d*x)^6/(a + a*sec(c + d*x))^(3/2), x, 5, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d)) + (2*tan(c + d*x))/(a*d*sqrt(a + a*sec(c + d*x))) - (2*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2)) + (2*a*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2)) + (2*a^2*tan(c + d*x)^7)/(7*d*(a + a*sec(c + d*x))^(7/2))]
    @test_int [tan(c + d*x)^4/(a + a*sec(c + d*x))^(3/2), x, 4, (2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) - (2*tan(c + d*x))/(a*d*sqrt(a + a*sec(c + d*x))) + (2*tan(c + d*x)^3)/(3*d*(a + a*sec(c + d*x))^(3/2))]
    @test_int [tan(c + d*x)^2/(a + a*sec(c + d*x))^(3/2), x, 4, (-2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) + (2*sqrt(2)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(a^(3/2)*d)]
    @test_int [cot(c + d*x)^2/(a + a*sec(c + d*x))^(3/2), x, 7, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d)) + (71*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(32*sqrt(2)*a^(3/2)*d) + (7*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(32*a^2*d) - (13*cos(c + d*x)*cot(c + d*x)*sec((1/2)*(c + d*x))^2*sqrt(a + a*sec(c + d*x)))/(32*a^2*d) - (cos(c + d*x)^2*cot(c + d*x)*sec((1/2)*(c + d*x))^4*sqrt(a + a*sec(c + d*x)))/(16*a^2*d)]
    @test_int [cot(c + d*x)^4/(a + a*sec(c + d*x))^(3/2), x, 9, (2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d) - (533*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(256*sqrt(2)*a^(3/2)*d) - (21*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(256*a^2*d) + (277*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(384*a^3*d) - (81*cos(c + d*x)*cot(c + d*x)^3*sec((1/2)*(c + d*x))^2*(a + a*sec(c + d*x))^(3/2))/(128*a^3*d) - (7*cos(c + d*x)^2*cot(c + d*x)^3*sec((1/2)*(c + d*x))^4*(a + a*sec(c + d*x))^(3/2))/(64*a^3*d) - (cos(c + d*x)^3*cot(c + d*x)^3*sec((1/2)*(c + d*x))^6*(a + a*sec(c + d*x))^(3/2))/(48*a^3*d)]
    @test_int [cot(c + d*x)^6/(a + a*sec(c + d*x))^(3/2), x, 11, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(3/2)*d)) + (16363*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(8192*sqrt(2)*a^(3/2)*d) - (21*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(8192*a^2*d) - (8171*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(12288*a^3*d) + (12267*cot(c + d*x)^5*(a + a*sec(c + d*x))^(5/2))/(10240*a^4*d) - (2045*cos(c + d*x)*cot(c + d*x)^5*sec((1/2)*(c + d*x))^2*(a + a*sec(c + d*x))^(5/2))/(2048*a^4*d) - (511*cos(c + d*x)^2*cot(c + d*x)^5*sec((1/2)*(c + d*x))^4*(a + a*sec(c + d*x))^(5/2))/(3072*a^4*d) - (29*cos(c + d*x)^3*cot(c + d*x)^5*sec((1/2)*(c + d*x))^6*(a + a*sec(c + d*x))^(5/2))/(768*a^4*d) - (cos(c + d*x)^4*cot(c + d*x)^5*sec((1/2)*(c + d*x))^8*(a + a*sec(c + d*x))^(5/2))/(128*a^4*d)]

    @test_int [tan(c + d*x)^5/(a + a*sec(c + d*x))^(5/2), x, 5, (-2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(5/2)*d) - (6*sqrt(a + a*sec(c + d*x)))/(a^3*d) + (2*(a + a*sec(c + d*x))^(3/2))/(3*a^4*d)]
    @test_int [tan(c + d*x)^3/(a + a*sec(c + d*x))^(5/2), x, 4, (2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(5/2)*d) - 4/(a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [tan(c + d*x)/(a + a*sec(c + d*x))^(5/2), x, 5, (-2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(5/2)*d) + 2/(3*a*d*(a + a*sec(c + d*x))^(3/2)) + 2/(a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)/(a + a*sec(c + d*x))^(5/2), x, 9, (2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(5/2)*d) - atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a)))/(4*sqrt(2)*a^(5/2)*d) - 1/(5*d*(a + a*sec(c + d*x))^(5/2)) - 1/(2*a*d*(a + a*sec(c + d*x))^(3/2)) - 7/(4*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)^3/(a + a*sec(c + d*x))^(5/2), x, 11, -((2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(5/2)*d)) + (13*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(32*sqrt(2)*a^(5/2)*d) - (5*a)/(28*d*(a + a*sec(c + d*x))^(7/2)) + a/(2*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(7/2)) + 3/(40*d*(a + a*sec(c + d*x))^(5/2)) + 19/(48*a*d*(a + a*sec(c + d*x))^(3/2)) + 51/(32*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)^5/(a + a*sec(c + d*x))^(5/2), x, 13, (2*atanh(sqrt(a + a*sec(c + d*x))/sqrt(a)))/(a^(5/2)*d) - (263*atanh(sqrt(a + a*sec(c + d*x))/(sqrt(2)*sqrt(a))))/(512*sqrt(2)*a^(5/2)*d) + (199*a^2)/(288*d*(a + a*sec(c + d*x))^(9/2)) - a^2/(4*d*(1 - sec(c + d*x))^2*(a + a*sec(c + d*x))^(9/2)) - (21*a^2)/(16*d*(1 - sec(c + d*x))*(a + a*sec(c + d*x))^(9/2)) + (135*a)/(448*d*(a + a*sec(c + d*x))^(7/2)) + 7/(640*d*(a + a*sec(c + d*x))^(5/2)) - 83/(256*a*d*(a + a*sec(c + d*x))^(3/2)) - 761/(512*a^2*d*sqrt(a + a*sec(c + d*x)))]

    @test_int [tan(c + d*x)^6/(a + a*sec(c + d*x))^(5/2), x, 4, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d)) + (2*tan(c + d*x))/(a^2*d*sqrt(a + a*sec(c + d*x))) - (2*tan(c + d*x)^3)/(3*a*d*(a + a*sec(c + d*x))^(3/2)) + (2*tan(c + d*x)^5)/(5*d*(a + a*sec(c + d*x))^(5/2))]
    @test_int [tan(c + d*x)^4/(a + a*sec(c + d*x))^(5/2), x, 5, (2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) - (4*sqrt(2)*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(a^(5/2)*d) + (2*tan(c + d*x))/(a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [tan(c + d*x)^2/(a + a*sec(c + d*x))^(5/2), x, 5, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d)) + (3*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(sqrt(2)*a^(5/2)*d) + (sec((1/2)*(c + d*x))^2*sin(c + d*x))/(2*a^2*d*sqrt(a + a*sec(c + d*x)))]
    @test_int [cot(c + d*x)^2/(a + a*sec(c + d*x))^(5/2), x, 8, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d)) + (319*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(128*sqrt(2)*a^(5/2)*d) + (63*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(128*a^3*d) - (191*cos(c + d*x)*cot(c + d*x)*sec((1/2)*(c + d*x))^2*sqrt(a + a*sec(c + d*x)))/(384*a^3*d) - (19*cos(c + d*x)^2*cot(c + d*x)*sec((1/2)*(c + d*x))^4*sqrt(a + a*sec(c + d*x)))/(192*a^3*d) - (cos(c + d*x)^3*cot(c + d*x)*sec((1/2)*(c + d*x))^6*sqrt(a + a*sec(c + d*x)))/(48*a^3*d)]
    @test_int [cot(c + d*x)^4/(a + a*sec(c + d*x))^(5/2), x, 10, (2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d) - (9683*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(4096*sqrt(2)*a^(5/2)*d) - (1491*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(4096*a^3*d) + (5587*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(6144*a^4*d) - (1527*cos(c + d*x)*cot(c + d*x)^3*sec((1/2)*(c + d*x))^2*(a + a*sec(c + d*x))^(3/2))/(2048*a^4*d) - (145*cos(c + d*x)^2*cot(c + d*x)^3*sec((1/2)*(c + d*x))^4*(a + a*sec(c + d*x))^(3/2))/(1024*a^4*d) - (9*cos(c + d*x)^3*cot(c + d*x)^3*sec((1/2)*(c + d*x))^6*(a + a*sec(c + d*x))^(3/2))/(256*a^4*d) - (cos(c + d*x)^4*cot(c + d*x)^3*sec((1/2)*(c + d*x))^8*(a + a*sec(c + d*x))^(3/2))/(128*a^4*d)]
    @test_int [cot(c + d*x)^6/(a + a*sec(c + d*x))^(5/2), x, 12, -((2*atan((sqrt(a)*tan(c + d*x))/sqrt(a + a*sec(c + d*x))))/(a^(5/2)*d)) + (74461*atan((sqrt(a)*tan(c + d*x))/(sqrt(2)*sqrt(a + a*sec(c + d*x)))))/(32768*sqrt(2)*a^(5/2)*d) + (8925*cot(c + d*x)*sqrt(a + a*sec(c + d*x)))/(32768*a^3*d) - (41693*cot(c + d*x)^3*(a + a*sec(c + d*x))^(3/2))/(49152*a^4*d) + (58077*cot(c + d*x)^5*(a + a*sec(c + d*x))^(5/2))/(40960*a^5*d) - (9467*cos(c + d*x)*cot(c + d*x)^5*sec((1/2)*(c + d*x))^2*(a + a*sec(c + d*x))^(5/2))/(8192*a^5*d) - (2473*cos(c + d*x)^2*cot(c + d*x)^5*sec((1/2)*(c + d*x))^4*(a + a*sec(c + d*x))^(5/2))/(12288*a^5*d) - (155*cos(c + d*x)^3*cot(c + d*x)^5*sec((1/2)*(c + d*x))^6*(a + a*sec(c + d*x))^(5/2))/(3072*a^5*d) - (7*cos(c + d*x)^4*cot(c + d*x)^5*sec((1/2)*(c + d*x))^8*(a + a*sec(c + d*x))^(5/2))/(512*a^5*d) - (cos(c + d*x)^5*cot(c + d*x)^5*sec((1/2)*(c + d*x))^10*(a + a*sec(c + d*x))^(5/2))/(320*a^5*d)]

    @test_int [tan(e + f*x)^2/(a + a*sec(e + f*x))^(9/2), x, -7, -((2*atan((sqrt(a)*tan(e + f*x))/sqrt(a + a*sec(e + f*x))))/(a^(9/2)*f)) + (91*atan((sqrt(a)*tan(e + f*x))/(sqrt(2)*sqrt(a + a*sec(e + f*x)))))/(32*sqrt(2)*a^(9/2)*f) + tan(e + f*x)/(3*a*f*(a + a*sec(e + f*x))^(7/2)) + (11*tan(e + f*x))/(24*a^2*f*(a + a*sec(e + f*x))^(5/2)) + (27*tan(e + f*x))/(32*a^3*f*(a + a*sec(e + f*x))^(3/2))]

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

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

    @test_int [(e*tan(c + d*x))^m*(a + a*sec(c + d*x))^3, x, 8, (3*a^3*(e*tan(c + d*x))^(1 + m))/(d*e*(1 + m)) + (a^3*HypergeometricFunctions._₂F₁(1, (1 + m)/2, (3 + m)/2, -tan(c + d*x)^2)*(e*tan(c + d*x))^(1 + m))/(d*e*(1 + m)) + (3*a^3*(cos(c + d*x)^2)^((2 + m)/2)*HypergeometricFunctions._₂F₁((1 + m)/2, (2 + m)/2, (3 + m)/2, sin(c + d*x)^2)*sec(c + d*x)*(e*tan(c + d*x))^(1 + m))/(d*e*(1 + m)) + (a^3*(cos(c + d*x)^2)^((4 + m)/2)*HypergeometricFunctions._₂F₁((1 + m)/2, (4 + m)/2, (3 + m)/2, sin(c + d*x)^2)*sec(c + d*x)^3*(e*tan(c + d*x))^(1 + m))/(d*e*(1 + m))]
    @test_int [(e*tan(c + d*x))^m*(a + a*sec(c + d*x))^2, x, 7, (a^2*(e*tan(c + d*x))^(1 + m))/(d*e*(1 + m)) + (a^2*HypergeometricFunctions._₂F₁(1, (1 + m)/2, (3 + m)/2, -tan(c + d*x)^2)*(e*tan(c + d*x))^(1 + m))/(d*e*(1 + m)) + (2*a^2*(cos(c + d*x)^2)^((2 + m)/2)*HypergeometricFunctions._₂F₁((1 + m)/2, (2 + m)/2, (3 + m)/2, sin(c + d*x)^2)*sec(c + d*x)*(e*tan(c + d*x))^(1 + m))/(d*e*(1 + m))]
    @test_int [(e*tan(c + d*x))^m*(a + a*sec(c + d*x))^1, x, 4, (a*HypergeometricFunctions._₂F₁(1, (1 + m)/2, (3 + m)/2, -tan(c + d*x)^2)*(e*tan(c + d*x))^(1 + m))/(d*e*(1 + m)) + (a*(cos(c + d*x)^2)^((2 + m)/2)*HypergeometricFunctions._₂F₁((1 + m)/2, (2 + m)/2, (3 + m)/2, sin(c + d*x)^2)*sec(c + d*x)*(e*tan(c + d*x))^(1 + m))/(d*e*(1 + m))]
    @test_int [(e*tan(c + d*x))^m/(a + a*sec(c + d*x))^1, x, 5, (e*HypergeometricFunctions._₂F₁(1, (1/2)*(-1 + m), (1 + m)/2, -tan(c + d*x)^2)*(e*tan(c + d*x))^(-1 + m))/(a*d*(1 - m)) - (e*(cos(c + d*x)^2)^(m/2)*HypergeometricFunctions._₂F₁((1/2)*(-1 + m), m/2, (1 + m)/2, sin(c + d*x)^2)*sec(c + d*x)*(e*tan(c + d*x))^(-1 + m))/(a*d*(1 - m))]
    @test_int [(e*tan(c + d*x))^m/(a + a*sec(c + d*x))^2, x, 8, -((e^3*(e*tan(c + d*x))^(-3 + m))/(a^2*d*(3 - m))) - (e^3*HypergeometricFunctions._₂F₁(1, (1/2)*(-3 + m), (1/2)*(-1 + m), -tan(c + d*x)^2)*(e*tan(c + d*x))^(-3 + m))/(a^2*d*(3 - m)) + (2*e^3*(cos(c + d*x)^2)^((1/2)*(-2 + m))*HypergeometricFunctions._₂F₁((1/2)*(-3 + m), (1/2)*(-2 + m), (1/2)*(-1 + m), sin(c + d*x)^2)*sec(c + d*x)*(e*tan(c + d*x))^(-3 + m))/(a^2*d*(3 - m))]
    @test_int [(e*tan(c + d*x))^m/(a + a*sec(c + d*x))^3, x, 9, (3*e^5*(e*tan(c + d*x))^(-5 + m))/(a^3*d*(5 - m)) + (e^5*HypergeometricFunctions._₂F₁(1, (1/2)*(-5 + m), (1/2)*(-3 + m), -tan(c + d*x)^2)*(e*tan(c + d*x))^(-5 + m))/(a^3*d*(5 - m)) - (3*e^5*(cos(c + d*x)^2)^((1/2)*(-4 + m))*HypergeometricFunctions._₂F₁((1/2)*(-5 + m), (1/2)*(-4 + m), (1/2)*(-3 + m), sin(c + d*x)^2)*sec(c + d*x)*(e*tan(c + d*x))^(-5 + m))/(a^3*d*(5 - m)) - (e^5*(cos(c + d*x)^2)^((1/2)*(-2 + m))*HypergeometricFunctions._₂F₁((1/2)*(-5 + m), (1/2)*(-2 + m), (1/2)*(-3 + m), sin(c + d*x)^2)*sec(c + d*x)^3*(e*tan(c + d*x))^(-5 + m))/(a^3*d*(5 - m))]

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

    @test_int [tan(c + d*x)^7*(a + a*sec(c + d*x))^n, x, 4, (7*(a + a*sec(c + d*x))^(4 + n))/(a^4*d*(4 + n)) + (HypergeometricFunctions._₂F₁(1, 4 + n, 5 + n, 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(4 + n))/(a^4*d*(4 + n)) - (5*(a + a*sec(c + d*x))^(5 + n))/(a^5*d*(5 + n)) + (a + a*sec(c + d*x))^(6 + n)/(a^6*d*(6 + n))]
    @test_int [tan(c + d*x)^5*(a + a*sec(c + d*x))^n, x, 4, -((3*(a + a*sec(c + d*x))^(3 + n))/(a^3*d*(3 + n))) - (HypergeometricFunctions._₂F₁(1, 3 + n, 4 + n, 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(3 + n))/(a^3*d*(3 + n)) + (a + a*sec(c + d*x))^(4 + n)/(a^4*d*(4 + n))]
    @test_int [tan(c + d*x)^3*(a + a*sec(c + d*x))^n, x, 3, (a + a*sec(c + d*x))^(2 + n)/(a^2*d*(2 + n)) + (HypergeometricFunctions._₂F₁(1, 2 + n, 3 + n, 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(2 + n))/(a^2*d*(2 + n))]
    @test_int [tan(c + d*x)^1*(a + a*sec(c + d*x))^n, x, 2, -((HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(1 + n))/(a*d*(1 + n)))]
    @test_int [cot(c + d*x)^1*(a + a*sec(c + d*x))^n, x, 4, -((HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 + sec(c + d*x)))*(a + a*sec(c + d*x))^n)/(2*d*n)) + (HypergeometricFunctions._₂F₁(1, n, 1 + n, 1 + sec(c + d*x))*(a + a*sec(c + d*x))^n)/(d*n)]
    @test_int [cot(c + d*x)^3*(a + a*sec(c + d*x))^n, x, 5, -((a*(4 - n)*HypergeometricFunctions._₂F₁(1, -1 + n, n, (1/2)*(1 + sec(c + d*x)))*(a + a*sec(c + d*x))^(-1 + n))/(4*d*(1 - n))) + (a*HypergeometricFunctions._₂F₁(1, -1 + n, n, 1 + sec(c + d*x))*(a + a*sec(c + d*x))^(-1 + n))/(d*(1 - n)) + (a*(a + a*sec(c + d*x))^(-1 + n))/(2*d*(1 - sec(c + d*x)))]

    @test_int [tan(c + d*x)^4*(a + a*sec(c + d*x))^n, x, 1, (2^(5 + n)*AppellF1(5/2, 4 + n, 1, 7/2, -((a - a*sec(c + d*x))/(a + a*sec(c + d*x))), (a - a*sec(c + d*x))/(a + a*sec(c + d*x)))*(1/(1 + sec(c + d*x)))^(5 + n)*(a + a*sec(c + d*x))^n*tan(c + d*x)^5)/(5*d)]
    @test_int [tan(c + d*x)^2*(a + a*sec(c + d*x))^n, x, 1, (2^(3 + n)*AppellF1(3/2, 2 + n, 1, 5/2, -((a - a*sec(c + d*x))/(a + a*sec(c + d*x))), (a - a*sec(c + d*x))/(a + a*sec(c + d*x)))*(1/(1 + sec(c + d*x)))^(3 + n)*(a + a*sec(c + d*x))^n*tan(c + d*x)^3)/(3*d)]
    @test_int [cot(c + d*x)^2*(a + a*sec(c + d*x))^n, x, 1, -((2^(-1 + n)*AppellF1(-(1/2), -2 + n, 1, 1/2, -((a - a*sec(c + d*x))/(a + a*sec(c + d*x))), (a - a*sec(c + d*x))/(a + a*sec(c + d*x)))*cot(c + d*x)*(1/(1 + sec(c + d*x)))^(-1 + n)*(a + a*sec(c + d*x))^n)/d)]
    @test_int [cot(c + d*x)^4*(a + a*sec(c + d*x))^n, x, 1, -((2^(-3 + n)*AppellF1(-(3/2), -4 + n, 1, -(1/2), -((a - a*sec(c + d*x))/(a + a*sec(c + d*x))), (a - a*sec(c + d*x))/(a + a*sec(c + d*x)))*cot(c + d*x)^3*(1/(1 + sec(c + d*x)))^(-3 + n)*(a + a*sec(c + d*x))^n)/(3*d))]

    @test_int [tan(c + d*x)^(3/2)*(a + a*sec(c + d*x))^n, x, 1, (1/(5*d))*(2^(7/2 + n)*AppellF1(5/4, 3/2 + n, 1, 9/4, -((a - a*sec(c + d*x))/(a + a*sec(c + d*x))), (a - a*sec(c + d*x))/(a + a*sec(c + d*x)))*(1/(1 + sec(c + d*x)))^(5/2 + n)*(a + a*sec(c + d*x))^n*tan(c + d*x)^(5/2))]
    @test_int [tan(c + d*x)^(1/2)*(a + a*sec(c + d*x))^n, x, 1, (1/(3*d))*(2^(5/2 + n)*AppellF1(3/4, 1/2 + n, 1, 7/4, -((a - a*sec(c + d*x))/(a + a*sec(c + d*x))), (a - a*sec(c + d*x))/(a + a*sec(c + d*x)))*(1/(1 + sec(c + d*x)))^(3/2 + n)*(a + a*sec(c + d*x))^n*tan(c + d*x)^(3/2))]
    @test_int [1/tan(c + d*x)^(1/2)*(a + a*sec(c + d*x))^n, x, 1, (1/d)*(2^(3/2 + n)*AppellF1(1/4, -(1/2) + n, 1, 5/4, -((a - a*sec(c + d*x))/(a + a*sec(c + d*x))), (a - a*sec(c + d*x))/(a + a*sec(c + d*x)))*(1/(1 + sec(c + d*x)))^(1/2 + n)*(a + a*sec(c + d*x))^n*sqrt(tan(c + d*x)))]
    @test_int [1/tan(c + d*x)^(3/2)*(a + a*sec(c + d*x))^n, x, 1, -((2^(1/2 + n)*AppellF1(-(1/4), -(3/2) + n, 1, 3/4, -((a - a*sec(c + d*x))/(a + a*sec(c + d*x))), (a - a*sec(c + d*x))/(a + a*sec(c + d*x)))*(1/(1 + sec(c + d*x)))^(-(1/2) + n)*(a + a*sec(c + d*x))^n)/(d*sqrt(tan(c + d*x))))]

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

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

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

    @test_int [(e*cot(c + d*x))^(5/2)*(a + a*sec(c + d*x)), x, 17, -((2*(e*cot(c + d*x))^(5/2)*(a + a*sec(c + d*x))*tan(c + d*x))/(3*d)) - (a*(e*cot(c + d*x))^(5/2)*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x))*tan(c + d*x)^2)/(3*d) + (a*atan(1 - sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2))/(sqrt(2)*d) - (a*atan(1 + sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2))/(sqrt(2)*d) + (a*(e*cot(c + d*x))^(5/2)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(5/2))/(2*sqrt(2)*d) - (a*(e*cot(c + d*x))^(5/2)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(5/2))/(2*sqrt(2)*d)]
    @test_int [(e*cot(c + d*x))^(3/2)*(a + a*sec(c + d*x)), x, 18, -((2*(e*cot(c + d*x))^(3/2)*(a + a*sec(c + d*x))*tan(c + d*x))/d) - (2*a*(e*cot(c + d*x))^(3/2)*Elliptic.E(c - pi/4 + d*x, 2)*sin(c + d*x)*tan(c + d*x))/(d*sqrt(sin(2*c + 2*d*x))) + (a*atan(1 - sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2))/(sqrt(2)*d) - (a*atan(1 + sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2))/(sqrt(2)*d) - (a*(e*cot(c + d*x))^(3/2)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(3/2))/(2*sqrt(2)*d) + (a*(e*cot(c + d*x))^(3/2)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(3/2))/(2*sqrt(2)*d) + (2*a*(e*cot(c + d*x))^(3/2)*sin(c + d*x)*tan(c + d*x)^2)/d]
    @test_int [sqrt(e*cot(c + d*x))*(a + a*sec(c + d*x)), x, 16, (a*sqrt(e*cot(c + d*x))*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/d - (a*atan(1 - sqrt(2)*sqrt(tan(c + d*x)))*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(2)*d) + (a*atan(1 + sqrt(2)*sqrt(tan(c + d*x)))*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(2)*d) - (a*sqrt(e*cot(c + d*x))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*sqrt(tan(c + d*x)))/(2*sqrt(2)*d) + (a*sqrt(e*cot(c + d*x))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*sqrt(tan(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [(a + a*sec(c + d*x))/sqrt(e*cot(c + d*x)), x, 17, (2*a*sin(c + d*x))/(d*sqrt(e*cot(c + d*x))) - (2*a*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2))/(d*sqrt(e*cot(c + d*x))*sqrt(sin(2*c + 2*d*x))) - (a*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) + (a*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) + (a*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) - (a*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x)))]
    @test_int [(a + a*sec(c + d*x))/(e*cot(c + d*x))^(3/2), x, 17, (2*cot(c + d*x)*(3*a + a*sec(c + d*x)))/(3*d*(e*cot(c + d*x))^(3/2)) - (a*cot(c + d*x)*csc(c + d*x)*Elliptic.F(c - pi/4 + d*x, 2)*sqrt(sin(2*c + 2*d*x)))/(3*d*(e*cot(c + d*x))^(3/2)) + (a*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) - (a*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) + (a*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) - (a*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2))]

    @test_int [(e*cot(c + d*x))^(5/2)*(a + a*sec(c + d*x))^2, x, 21, -((4*a^2*(e*cot(c + d*x))^(5/2)*tan(c + d*x))/(3*d)) - (4*a^2*(e*cot(c + d*x))^(5/2)*sec(c + d*x)*tan(c + d*x))/(3*d) - (2*a^2*(e*cot(c + d*x))^(5/2)*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x))*tan(c + d*x)^2)/(3*d) + (a^2*atan(1 - sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2))/(sqrt(2)*d) - (a^2*atan(1 + sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2))/(sqrt(2)*d) + (a^2*(e*cot(c + d*x))^(5/2)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(5/2))/(2*sqrt(2)*d) - (a^2*(e*cot(c + d*x))^(5/2)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(5/2))/(2*sqrt(2)*d)]
    @test_int [(e*cot(c + d*x))^(3/2)*(a + a*sec(c + d*x))^2, x, 21, -((4*a^2*(e*cot(c + d*x))^(3/2)*sin(c + d*x))/d) - (4*a^2*(e*cot(c + d*x))^(3/2)*tan(c + d*x))/d - (4*a^2*(e*cot(c + d*x))^(3/2)*Elliptic.E(c - pi/4 + d*x, 2)*sin(c + d*x)*tan(c + d*x))/(d*sqrt(sin(2*c + 2*d*x))) + (a^2*atan(1 - sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2))/(sqrt(2)*d) - (a^2*atan(1 + sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2))/(sqrt(2)*d) - (a^2*(e*cot(c + d*x))^(3/2)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(3/2))/(2*sqrt(2)*d) + (a^2*(e*cot(c + d*x))^(3/2)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(3/2))/(2*sqrt(2)*d)]
    @test_int [sqrt(e*cot(c + d*x))*(a + a*sec(c + d*x))^2, x, 19, (2*a^2*sqrt(e*cot(c + d*x))*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/d - (a^2*atan(1 - sqrt(2)*sqrt(tan(c + d*x)))*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(2)*d) + (a^2*atan(1 + sqrt(2)*sqrt(tan(c + d*x)))*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(2)*d) - (a^2*sqrt(e*cot(c + d*x))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*sqrt(tan(c + d*x)))/(2*sqrt(2)*d) + (a^2*sqrt(e*cot(c + d*x))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*sqrt(tan(c + d*x)))/(2*sqrt(2)*d) + (2*a^2*sqrt(e*cot(c + d*x))*tan(c + d*x))/d]
    @test_int [(a + a*sec(c + d*x))^2/sqrt(e*cot(c + d*x)), x, 20, (4*a^2*sin(c + d*x))/(d*sqrt(e*cot(c + d*x))) - (4*a^2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2))/(d*sqrt(e*cot(c + d*x))*sqrt(sin(2*c + 2*d*x))) - (a^2*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) + (a^2*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) + (a^2*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) - (a^2*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) + (2*a^2*tan(c + d*x))/(3*d*sqrt(e*cot(c + d*x)))]
    @test_int [(a + a*sec(c + d*x))^2/(e*cot(c + d*x))^(3/2), x, 21, (2*a^2*cot(c + d*x))/(d*(e*cot(c + d*x))^(3/2)) + (4*a^2*csc(c + d*x))/(3*d*(e*cot(c + d*x))^(3/2)) - (2*a^2*cot(c + d*x)*csc(c + d*x)*Elliptic.F(c - pi/4 + d*x, 2)*sqrt(sin(2*c + 2*d*x)))/(3*d*(e*cot(c + d*x))^(3/2)) + (a^2*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) - (a^2*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) + (a^2*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) - (a^2*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) + (2*a^2*tan(c + d*x))/(5*d*(e*cot(c + d*x))^(3/2))]

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

    @test_int [(e*cot(c + d*x))^(3/2)/(a + a*sec(c + d*x)), x, 20, (2*cot(c + d*x)*(e*cot(c + d*x))^(3/2)*(1 - sec(c + d*x)))/(5*a*d) - (2*(e*cot(c + d*x))^(3/2)*(5 - 3*sec(c + d*x))*tan(c + d*x))/(5*a*d) + (6*(e*cot(c + d*x))^(3/2)*Elliptic.E(c - pi/4 + d*x, 2)*sin(c + d*x)*tan(c + d*x))/(5*a*d*sqrt(sin(2*c + 2*d*x))) + (atan(1 - sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2))/(sqrt(2)*a*d) - (atan(1 + sqrt(2)*sqrt(tan(c + d*x)))*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2))/(sqrt(2)*a*d) - ((e*cot(c + d*x))^(3/2)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(3/2))/(2*sqrt(2)*a*d) + ((e*cot(c + d*x))^(3/2)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*tan(c + d*x)^(3/2))/(2*sqrt(2)*a*d) - (6*(e*cot(c + d*x))^(3/2)*sin(c + d*x)*tan(c + d*x)^2)/(5*a*d)]
    @test_int [sqrt(e*cot(c + d*x))/(a + a*sec(c + d*x)), x, 18, (2*cot(c + d*x)*sqrt(e*cot(c + d*x))*(1 - sec(c + d*x)))/(3*a*d) - (sqrt(e*cot(c + d*x))*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*a*d) - (atan(1 - sqrt(2)*sqrt(tan(c + d*x)))*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(2)*a*d) + (atan(1 + sqrt(2)*sqrt(tan(c + d*x)))*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(2)*a*d) - (sqrt(e*cot(c + d*x))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*sqrt(tan(c + d*x)))/(2*sqrt(2)*a*d) + (sqrt(e*cot(c + d*x))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))*sqrt(tan(c + d*x)))/(2*sqrt(2)*a*d)]
    @test_int [1/(sqrt(e*cot(c + d*x))*(a + a*sec(c + d*x))), x, 19, (2*cot(c + d*x)*(1 - sec(c + d*x)))/(a*d*sqrt(e*cot(c + d*x))) + (2*sin(c + d*x))/(a*d*sqrt(e*cot(c + d*x))) - (2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2))/(a*d*sqrt(e*cot(c + d*x))*sqrt(sin(2*c + 2*d*x))) - atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) + atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) + log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) - log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x)))]
    @test_int [1/((e*cot(c + d*x))^(3/2)*(a + a*sec(c + d*x))), x, 17, (cot(c + d*x)*csc(c + d*x)*Elliptic.F(c - pi/4 + d*x, 2)*sqrt(sin(2*c + 2*d*x)))/(a*d*(e*cot(c + d*x))^(3/2)) + atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) - atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) + log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) - log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2))]
    @test_int [1/((e*cot(c + d*x))^(5/2)*(a + a*sec(c + d*x))), x, 18, (2*cos(c + d*x)*cot(c + d*x))/(a*d*(e*cot(c + d*x))^(5/2)) - (2*cos(c + d*x)*cot(c + d*x)^2*Elliptic.E(c - pi/4 + d*x, 2))/(a*d*(e*cot(c + d*x))^(5/2)*sqrt(sin(2*c + 2*d*x))) + atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2)) - atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2)) - log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2)) + log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2))]
    @test_int [1/((e*cot(c + d*x))^(7/2)*(a + a*sec(c + d*x))), x, 18, -((2*cot(c + d*x)^3*(3 - sec(c + d*x)))/(3*a*d*(e*cot(c + d*x))^(7/2))) - (cot(c + d*x)^3*csc(c + d*x)*Elliptic.F(c - pi/4 + d*x, 2)*sqrt(sin(2*c + 2*d*x)))/(3*a*d*(e*cot(c + d*x))^(7/2)) - atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*(e*cot(c + d*x))^(7/2)*tan(c + d*x)^(7/2)) + atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*(e*cot(c + d*x))^(7/2)*tan(c + d*x)^(7/2)) - log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*(e*cot(c + d*x))^(7/2)*tan(c + d*x)^(7/2)) + log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*(e*cot(c + d*x))^(7/2)*tan(c + d*x)^(7/2))]
    @test_int [1/((e*cot(c + d*x))^(9/2)*(a + a*sec(c + d*x))), x, 19, -((6*cos(c + d*x)*cot(c + d*x)^3)/(5*a*d*(e*cot(c + d*x))^(9/2))) - (2*cot(c + d*x)^3*(5 - 3*sec(c + d*x)))/(15*a*d*(e*cot(c + d*x))^(9/2)) + (6*cos(c + d*x)*cot(c + d*x)^4*Elliptic.E(c - pi/4 + d*x, 2))/(5*a*d*(e*cot(c + d*x))^(9/2)*sqrt(sin(2*c + 2*d*x))) - atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*(e*cot(c + d*x))^(9/2)*tan(c + d*x)^(9/2)) + atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a*d*(e*cot(c + d*x))^(9/2)*tan(c + d*x)^(9/2)) + log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*(e*cot(c + d*x))^(9/2)*tan(c + d*x)^(9/2)) - log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a*d*(e*cot(c + d*x))^(9/2)*tan(c + d*x)^(9/2))]

    @test_int [1/(sqrt(e*cot(c + d*x))*(a + a*sec(c + d*x))^2), x, 24, (2*cot(c + d*x))/(a^2*d*sqrt(e*cot(c + d*x))) - (12*cos(c + d*x)*cot(c + d*x))/(5*a^2*d*sqrt(e*cot(c + d*x))) - (4*cot(c + d*x)^3)/(5*a^2*d*sqrt(e*cot(c + d*x))) + (4*cot(c + d*x)^2*csc(c + d*x))/(5*a^2*d*sqrt(e*cot(c + d*x))) - (12*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2))/(5*a^2*d*sqrt(e*cot(c + d*x))*sqrt(sin(2*c + 2*d*x))) - atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) + atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) + log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x))) - log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*sqrt(e*cot(c + d*x))*sqrt(tan(c + d*x)))]
    @test_int [1/((e*cot(c + d*x))^(3/2)*(a + a*sec(c + d*x))^2), x, 22, -((4*cot(c + d*x)^3)/(3*a^2*d*(e*cot(c + d*x))^(3/2))) + (4*cot(c + d*x)^2*csc(c + d*x))/(3*a^2*d*(e*cot(c + d*x))^(3/2)) + (2*cot(c + d*x)*csc(c + d*x)*Elliptic.F(c - pi/4 + d*x, 2)*sqrt(sin(2*c + 2*d*x)))/(3*a^2*d*(e*cot(c + d*x))^(3/2)) + atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) - atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) + log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2)) - log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(3/2)*tan(c + d*x)^(3/2))]
    @test_int [1/((e*cot(c + d*x))^(5/2)*(a + a*sec(c + d*x))^2), x, 22, -((4*cot(c + d*x)^3)/(a^2*d*(e*cot(c + d*x))^(5/2))) + (4*cos(c + d*x)*cot(c + d*x)^3)/(a^2*d*(e*cot(c + d*x))^(5/2)) + (4*cos(c + d*x)*cot(c + d*x)^2*Elliptic.E(c - pi/4 + d*x, 2))/(a^2*d*(e*cot(c + d*x))^(5/2)*sqrt(sin(2*c + 2*d*x))) + atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2)) - atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2)) - log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2)) + log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(5/2)*tan(c + d*x)^(5/2))]
    @test_int [1/((e*cot(c + d*x))^(7/2)*(a + a*sec(c + d*x))^2), x, 20, (2*cot(c + d*x)^3)/(a^2*d*(e*cot(c + d*x))^(7/2)) - (2*cot(c + d*x)^3*csc(c + d*x)*Elliptic.F(c - pi/4 + d*x, 2)*sqrt(sin(2*c + 2*d*x)))/(a^2*d*(e*cot(c + d*x))^(7/2)) - atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(7/2)*tan(c + d*x)^(7/2)) + atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(7/2)*tan(c + d*x)^(7/2)) - log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(7/2)*tan(c + d*x)^(7/2)) + log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(7/2)*tan(c + d*x)^(7/2))]
    @test_int [1/((e*cot(c + d*x))^(9/2)*(a + a*sec(c + d*x))^2), x, 21, (2*cot(c + d*x)^3)/(3*a^2*d*(e*cot(c + d*x))^(9/2)) - (4*cos(c + d*x)*cot(c + d*x)^3)/(a^2*d*(e*cot(c + d*x))^(9/2)) + (4*cos(c + d*x)*cot(c + d*x)^4*Elliptic.E(c - pi/4 + d*x, 2))/(a^2*d*(e*cot(c + d*x))^(9/2)*sqrt(sin(2*c + 2*d*x))) - atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(9/2)*tan(c + d*x)^(9/2)) + atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(9/2)*tan(c + d*x)^(9/2)) + log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(9/2)*tan(c + d*x)^(9/2)) - log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(9/2)*tan(c + d*x)^(9/2))]
    @test_int [1/((e*cot(c + d*x))^(11/2)*(a + a*sec(c + d*x))^2), x, 22, (2*cot(c + d*x)^3)/(5*a^2*d*(e*cot(c + d*x))^(11/2)) + (2*cot(c + d*x)^5)/(a^2*d*(e*cot(c + d*x))^(11/2)) - (4*cot(c + d*x)^4*csc(c + d*x))/(3*a^2*d*(e*cot(c + d*x))^(11/2)) + (2*cot(c + d*x)^5*csc(c + d*x)*Elliptic.F(c - pi/4 + d*x, 2)*sqrt(sin(2*c + 2*d*x)))/(3*a^2*d*(e*cot(c + d*x))^(11/2)) + atan(1 - sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(11/2)*tan(c + d*x)^(11/2)) - atan(1 + sqrt(2)*sqrt(tan(c + d*x)))/(sqrt(2)*a^2*d*(e*cot(c + d*x))^(11/2)*tan(c + d*x)^(11/2)) + log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(11/2)*tan(c + d*x)^(11/2)) - log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x))/(2*sqrt(2)*a^2*d*(e*cot(c + d*x))^(11/2)*tan(c + d*x)^(11/2))]

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

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

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

    @test_int [(a + b*sec(c + d*x))*tan(c + d*x)^7, x, 7, (a*log(cos(c + d*x)))/d - (16*b*sec(c + d*x))/(35*d) + ((35*a + 16*b*sec(c + d*x))*tan(c + d*x)^2)/(70*d) - ((35*a + 24*b*sec(c + d*x))*tan(c + d*x)^4)/(140*d) + ((7*a + 6*b*sec(c + d*x))*tan(c + d*x)^6)/(42*d)]
    @test_int [(a + b*sec(c + d*x))*tan(c + d*x)^5, x, 6, -((a*log(cos(c + d*x)))/d) + (8*b*sec(c + d*x))/(15*d) - ((15*a + 8*b*sec(c + d*x))*tan(c + d*x)^2)/(30*d) + ((5*a + 4*b*sec(c + d*x))*tan(c + d*x)^4)/(20*d)]
    @test_int [(a + b*sec(c + d*x))*tan(c + d*x)^3, x, 5, (a*log(cos(c + d*x)))/d - (2*b*sec(c + d*x))/(3*d) + ((3*a + 2*b*sec(c + d*x))*tan(c + d*x)^2)/(6*d)]
    @test_int [(a + b*sec(c + d*x))*tan(c + d*x)^1, x, 4, -((a*log(cos(c + d*x)))/d) + (b*sec(c + d*x))/d]
    @test_int [cot(c + d*x)^1*(a + b*sec(c + d*x)), x, 5, ((a + b)*log(1 - cos(c + d*x)))/(2*d) + ((a - b)*log(1 + cos(c + d*x)))/(2*d)]
    @test_int [cot(c + d*x)^3*(a + b*sec(c + d*x)), x, 6, -(((2*a + b)*log(1 - cos(c + d*x)))/(4*d)) - ((2*a - b)*log(1 + cos(c + d*x)))/(4*d) - (cot(c + d*x)^2*(a + b*sec(c + d*x)))/(2*d)]
    @test_int [cot(c + d*x)^5*(a + b*sec(c + d*x)), x, 7, ((8*a + 3*b)*log(1 - cos(c + d*x)))/(16*d) + ((8*a - 3*b)*log(1 + cos(c + d*x)))/(16*d) - (cot(c + d*x)^4*(a + b*sec(c + d*x)))/(4*d) + (cot(c + d*x)^2*(4*a + 3*b*sec(c + d*x)))/(8*d)]
    @test_int [cot(c + d*x)^7*(a + b*sec(c + d*x)), x, 8, -(((16*a + 5*b)*log(1 - cos(c + d*x)))/(32*d)) - ((16*a - 5*b)*log(1 + cos(c + d*x)))/(32*d) - (cot(c + d*x)^6*(a + b*sec(c + d*x)))/(6*d) + (cot(c + d*x)^4*(6*a + 5*b*sec(c + d*x)))/(24*d) - (cot(c + d*x)^2*(8*a + 5*b*sec(c + d*x)))/(16*d)]

    @test_int [(a + b*sec(c + d*x))*tan(c + d*x)^6, x, 5, (-a)*x - (5*b*atanh(sin(c + d*x)))/(16*d) + ((16*a + 5*b*sec(c + d*x))*tan(c + d*x))/(16*d) - ((8*a + 5*b*sec(c + d*x))*tan(c + d*x)^3)/(24*d) + ((6*a + 5*b*sec(c + d*x))*tan(c + d*x)^5)/(30*d)]
    @test_int [(a + b*sec(c + d*x))*tan(c + d*x)^4, x, 4, a*x + (3*b*atanh(sin(c + d*x)))/(8*d) - ((8*a + 3*b*sec(c + d*x))*tan(c + d*x))/(8*d) + ((4*a + 3*b*sec(c + d*x))*tan(c + d*x)^3)/(12*d)]
    @test_int [(a + b*sec(c + d*x))*tan(c + d*x)^2, x, 3, (-a)*x - (b*atanh(sin(c + d*x)))/(2*d) + ((2*a + b*sec(c + d*x))*tan(c + d*x))/(2*d)]
    @test_int [cot(c + d*x)^2*(a + b*sec(c + d*x)), x, 2, (-a)*x - (cot(c + d*x)*(a + b*sec(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*(a + b*sec(c + d*x)), x, 3, a*x - (cot(c + d*x)^3*(a + b*sec(c + d*x)))/(3*d) + (cot(c + d*x)*(3*a + 2*b*sec(c + d*x)))/(3*d)]
    @test_int [cot(c + d*x)^6*(a + b*sec(c + d*x)), x, 4, (-a)*x - (cot(c + d*x)^5*(a + b*sec(c + d*x)))/(5*d) + (cot(c + d*x)^3*(5*a + 4*b*sec(c + d*x)))/(15*d) - (cot(c + d*x)*(15*a + 8*b*sec(c + d*x)))/(15*d)]
    @test_int [cot(c + d*x)^8*(a + b*sec(c + d*x)), x, 5, a*x - (cot(c + d*x)^7*(a + b*sec(c + d*x)))/(7*d) + (cot(c + d*x)^5*(7*a + 6*b*sec(c + d*x)))/(35*d) + (cot(c + d*x)*(35*a + 16*b*sec(c + d*x)))/(35*d) - (cot(c + d*x)^3*(35*a + 24*b*sec(c + d*x)))/(105*d)]

    @test_int [(a + b*sec(c + d*x))^2*tan(c + d*x)^9, x, 3, -((a^2*log(cos(c + d*x)))/d) + (2*a*b*sec(c + d*x))/d - (2*a^2*sec(c + d*x)^2)/d - (8*a*b*sec(c + d*x)^3)/(3*d) + (3*a^2*sec(c + d*x)^4)/(2*d) + (12*a*b*sec(c + d*x)^5)/(5*d) - (2*a^2*sec(c + d*x)^6)/(3*d) - (8*a*b*sec(c + d*x)^7)/(7*d) + (a^2*sec(c + d*x)^8)/(8*d) + (2*a*b*sec(c + d*x)^9)/(9*d) + (b^2*tan(c + d*x)^10)/(10*d), -((a^2*log(cos(c + d*x)))/d) + (2*a*b*sec(c + d*x))/d - ((4*a^2 - b^2)*sec(c + d*x)^2)/(2*d) - (8*a*b*sec(c + d*x)^3)/(3*d) + ((3*a^2 - 2*b^2)*sec(c + d*x)^4)/(2*d) + (12*a*b*sec(c + d*x)^5)/(5*d) - ((2*a^2 - 3*b^2)*sec(c + d*x)^6)/(3*d) - (8*a*b*sec(c + d*x)^7)/(7*d) + ((a^2 - 4*b^2)*sec(c + d*x)^8)/(8*d) + (2*a*b*sec(c + d*x)^9)/(9*d) + (b^2*sec(c + d*x)^10)/(10*d)]
    @test_int [(a + b*sec(c + d*x))^2*tan(c + d*x)^7, x, 3, (a^2*log(cos(c + d*x)))/d - (2*a*b*sec(c + d*x))/d + (3*a^2*sec(c + d*x)^2)/(2*d) + (2*a*b*sec(c + d*x)^3)/d - (3*a^2*sec(c + d*x)^4)/(4*d) - (6*a*b*sec(c + d*x)^5)/(5*d) + (a^2*sec(c + d*x)^6)/(6*d) + (2*a*b*sec(c + d*x)^7)/(7*d) + (b^2*tan(c + d*x)^8)/(8*d), (a^2*log(cos(c + d*x)))/d - (2*a*b*sec(c + d*x))/d + ((3*a^2 - b^2)*sec(c + d*x)^2)/(2*d) + (2*a*b*sec(c + d*x)^3)/d - (3*(a^2 - b^2)*sec(c + d*x)^4)/(4*d) - (6*a*b*sec(c + d*x)^5)/(5*d) + ((a^2 - 3*b^2)*sec(c + d*x)^6)/(6*d) + (2*a*b*sec(c + d*x)^7)/(7*d) + (b^2*sec(c + d*x)^8)/(8*d)]
    @test_int [(a + b*sec(c + d*x))^2*tan(c + d*x)^5, x, 3, -((a^2*log(cos(c + d*x)))/d) + (2*a*b*sec(c + d*x))/d - (a^2*sec(c + d*x)^2)/d - (4*a*b*sec(c + d*x)^3)/(3*d) + (a^2*sec(c + d*x)^4)/(4*d) + (2*a*b*sec(c + d*x)^5)/(5*d) + (b^2*tan(c + d*x)^6)/(6*d), -((a^2*log(cos(c + d*x)))/d) + (2*a*b*sec(c + d*x))/d - ((2*a^2 - b^2)*sec(c + d*x)^2)/(2*d) - (4*a*b*sec(c + d*x)^3)/(3*d) + ((a^2 - 2*b^2)*sec(c + d*x)^4)/(4*d) + (2*a*b*sec(c + d*x)^5)/(5*d) + (b^2*sec(c + d*x)^6)/(6*d)]
    @test_int [(a + b*sec(c + d*x))^2*tan(c + d*x)^3, x, 3, (a^2*log(cos(c + d*x)))/d - (2*a*b*sec(c + d*x))/d + ((a^2 - b^2)*sec(c + d*x)^2)/(2*d) + (2*a*b*sec(c + d*x)^3)/(3*d) + (b^2*sec(c + d*x)^4)/(4*d)]
    @test_int [(a + b*sec(c + d*x))^2*tan(c + d*x)^1, x, 3, -((a^2*log(cos(c + d*x)))/d) + (2*a*b*sec(c + d*x))/d + (b^2*sec(c + d*x)^2)/(2*d)]
    @test_int [cot(c + d*x)^1*(a + b*sec(c + d*x))^2, x, 3, (a^2*log(cos(c + d*x)))/d + ((a + b)^2*log(1 - sec(c + d*x)))/(2*d) + ((a - b)^2*log(1 + sec(c + d*x)))/(2*d)]
    @test_int [cot(c + d*x)^3*(a + b*sec(c + d*x))^2, x, 4, -((a^2*log(cos(c + d*x)))/d) - (a*(a + b)*log(1 - sec(c + d*x)))/(2*d) - (a*(a - b)*log(1 + sec(c + d*x)))/(2*d) - (cot(c + d*x)^2*(a^2 + b^2 + 2*a*b*sec(c + d*x)))/(2*d)]
    @test_int [cot(c + d*x)^5*(a + b*sec(c + d*x))^2, x, 5, (a^2*log(cos(c + d*x)))/d + (a*(4*a + 3*b)*log(1 - sec(c + d*x)))/(8*d) + (a*(4*a - 3*b)*log(1 + sec(c + d*x)))/(8*d) + (a*cot(c + d*x)^2*(2*a + 3*b*sec(c + d*x)))/(4*d) - (cot(c + d*x)^4*(a^2 + b^2 + 2*a*b*sec(c + d*x)))/(4*d)]

    @test_int [(a + b*sec(c + d*x))^2*tan(c + d*x)^6, x, 12, (-a^2)*x - (5*a*b*atanh(sin(c + d*x)))/(8*d) + (a^2*tan(c + d*x))/d + (5*a*b*sec(c + d*x)*tan(c + d*x))/(8*d) - (a^2*tan(c + d*x)^3)/(3*d) - (5*a*b*sec(c + d*x)*tan(c + d*x)^3)/(12*d) + (a^2*tan(c + d*x)^5)/(5*d) + (a*b*sec(c + d*x)*tan(c + d*x)^5)/(3*d) + (b^2*tan(c + d*x)^7)/(7*d)]
    @test_int [(a + b*sec(c + d*x))^2*tan(c + d*x)^4, x, 10, a^2*x + (3*a*b*atanh(sin(c + d*x)))/(4*d) - (a^2*tan(c + d*x))/d - (3*a*b*sec(c + d*x)*tan(c + d*x))/(4*d) + (a^2*tan(c + d*x)^3)/(3*d) + (a*b*sec(c + d*x)*tan(c + d*x)^3)/(2*d) + (b^2*tan(c + d*x)^5)/(5*d)]
    @test_int [(a + b*sec(c + d*x))^2*tan(c + d*x)^2, x, 8, (-a^2)*x - (a*b*atanh(sin(c + d*x)))/d + (a^2*tan(c + d*x))/d + (a*b*sec(c + d*x)*tan(c + d*x))/d + (b^2*tan(c + d*x)^3)/(3*d)]
    @test_int [cot(c + d*x)^2*(a + b*sec(c + d*x))^2, x, 8, (-a^2)*x - (a^2*cot(c + d*x))/d - (b^2*cot(c + d*x))/d - (2*a*b*csc(c + d*x))/d]
    @test_int [cot(c + d*x)^4*(a + b*sec(c + d*x))^2, x, 9, a^2*x + (a^2*cot(c + d*x))/d - (a^2*cot(c + d*x)^3)/(3*d) - (b^2*cot(c + d*x)^3)/(3*d) + (2*a*b*csc(c + d*x))/d - (2*a*b*csc(c + d*x)^3)/(3*d)]
    @test_int [cot(c + d*x)^6*(a + b*sec(c + d*x))^2, x, 11, (-a^2)*x - (a^2*cot(c + d*x))/d + (a^2*cot(c + d*x)^3)/(3*d) - (a^2*cot(c + d*x)^5)/(5*d) - (b^2*cot(c + d*x)^5)/(5*d) - (2*a*b*csc(c + d*x))/d + (4*a*b*csc(c + d*x)^3)/(3*d) - (2*a*b*csc(c + d*x)^5)/(5*d)]
    @test_int [cot(c + d*x)^8*(a + b*sec(c + d*x))^2, x, 12, a^2*x + (a^2*cot(c + d*x))/d - (a^2*cot(c + d*x)^3)/(3*d) + (a^2*cot(c + d*x)^5)/(5*d) - (a^2*cot(c + d*x)^7)/(7*d) - (b^2*cot(c + d*x)^7)/(7*d) + (2*a*b*csc(c + d*x))/d - (2*a*b*csc(c + d*x)^3)/d + (6*a*b*csc(c + d*x)^5)/(5*d) - (2*a*b*csc(c + d*x)^7)/(7*d)]

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

    @test_int [tan(c + d*x)^9/(a + b*sec(c + d*x)), x, 3, -(log(cos(c + d*x))/(a*d)) - ((a^2 - b^2)^4*log(a + b*sec(c + d*x)))/(a*b^8*d) + ((a^6 - 4*a^4*b^2 + 6*a^2*b^4 - 4*b^6)*sec(c + d*x))/(b^7*d) - (a*(a^4 - 4*a^2*b^2 + 6*b^4)*sec(c + d*x)^2)/(2*b^6*d) + ((a^4 - 4*a^2*b^2 + 6*b^4)*sec(c + d*x)^3)/(3*b^5*d) - (a*(a^2 - 4*b^2)*sec(c + d*x)^4)/(4*b^4*d) + ((a^2 - 4*b^2)*sec(c + d*x)^5)/(5*b^3*d) - (a*sec(c + d*x)^6)/(6*b^2*d) + sec(c + d*x)^7/(7*b*d)]
    @test_int [tan(c + d*x)^7/(a + b*sec(c + d*x)), x, 3, log(cos(c + d*x))/(a*d) - ((a^2 - b^2)^3*log(a + b*sec(c + d*x)))/(a*b^6*d) + ((a^4 - 3*a^2*b^2 + 3*b^4)*sec(c + d*x))/(b^5*d) - (a*(a^2 - 3*b^2)*sec(c + d*x)^2)/(2*b^4*d) + ((a^2 - 3*b^2)*sec(c + d*x)^3)/(3*b^3*d) - (a*sec(c + d*x)^4)/(4*b^2*d) + sec(c + d*x)^5/(5*b*d)]
    @test_int [tan(c + d*x)^5/(a + b*sec(c + d*x)), x, 3, -(log(cos(c + d*x))/(a*d)) - ((a^2 - b^2)^2*log(a + b*sec(c + d*x)))/(a*b^4*d) + ((a^2 - 2*b^2)*sec(c + d*x))/(b^3*d) - (a*sec(c + d*x)^2)/(2*b^2*d) + sec(c + d*x)^3/(3*b*d)]
    @test_int [tan(c + d*x)^3/(a + b*sec(c + d*x)), x, 3, log(cos(c + d*x))/(a*d) - ((a^2 - b^2)*log(a + b*sec(c + d*x)))/(a*b^2*d) + sec(c + d*x)/(b*d)]
    @test_int [tan(c + d*x)^1/(a + b*sec(c + d*x)), x, 4, -(log(cos(c + d*x))/(a*d)) - log(a + b*sec(c + d*x))/(a*d)]
    @test_int [cot(c + d*x)^1/(a + b*sec(c + d*x)), x, 3, log(cos(c + d*x))/(a*d) + log(1 - sec(c + d*x))/(2*(a + b)*d) + log(1 + sec(c + d*x))/(2*(a - b)*d) - (b^2*log(a + b*sec(c + d*x)))/(a*(a^2 - b^2)*d)]
    @test_int [cot(c + d*x)^3/(a + b*sec(c + d*x)), x, 3, -(log(cos(c + d*x))/(a*d)) - ((2*a + 3*b)*log(1 - sec(c + d*x)))/(4*(a + b)^2*d) - ((2*a - 3*b)*log(1 + sec(c + d*x)))/(4*(a - b)^2*d) - (b^4*log(a + b*sec(c + d*x)))/(a*(a^2 - b^2)^2*d) + 1/(4*(a + b)*d*(1 - sec(c + d*x))) + 1/(4*(a - b)*d*(1 + sec(c + d*x)))]
    @test_int [cot(c + d*x)^5/(a + b*sec(c + d*x)), x, 3, log(cos(c + d*x))/(a*d) + ((8*a^2 + 21*a*b + 15*b^2)*log(1 - sec(c + d*x)))/(16*(a + b)^3*d) + ((8*a^2 - 21*a*b + 15*b^2)*log(1 + sec(c + d*x)))/(16*(a - b)^3*d) - (b^6*log(a + b*sec(c + d*x)))/(a*(a^2 - b^2)^3*d) - 1/(16*(a + b)*d*(1 - sec(c + d*x))^2) - (5*a + 7*b)/(16*(a + b)^2*d*(1 - sec(c + d*x))) - 1/(16*(a - b)*d*(1 + sec(c + d*x))^2) - (5*a - 7*b)/(16*(a - b)^2*d*(1 + sec(c + d*x)))]

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

    @test_int [tan(c + d*x)^9/(a + b*sec(c + d*x))^2, x, 3, -(log(cos(c + d*x))/(a^2*d)) + ((a^2 - b^2)^3*(7*a^2 + b^2)*log(a + b*sec(c + d*x)))/(a^2*b^8*d) - (2*a*(3*a^4 - 8*a^2*b^2 + 6*b^4)*sec(c + d*x))/(b^7*d) + ((5*a^4 - 12*a^2*b^2 + 6*b^4)*sec(c + d*x)^2)/(2*b^6*d) - (4*a*(a^2 - 2*b^2)*sec(c + d*x)^3)/(3*b^5*d) + ((3*a^2 - 4*b^2)*sec(c + d*x)^4)/(4*b^4*d) - (2*a*sec(c + d*x)^5)/(5*b^3*d) + sec(c + d*x)^6/(6*b^2*d) + (a^2 - b^2)^4/(a*b^8*d*(a + b*sec(c + d*x)))]
    @test_int [tan(c + d*x)^7/(a + b*sec(c + d*x))^2, x, 3, log(cos(c + d*x))/(a^2*d) + ((a^2 - b^2)^2*(5*a^2 + b^2)*log(a + b*sec(c + d*x)))/(a^2*b^6*d) - (2*a*(2*a^2 - 3*b^2)*sec(c + d*x))/(b^5*d) + (3*(a^2 - b^2)*sec(c + d*x)^2)/(2*b^4*d) - (2*a*sec(c + d*x)^3)/(3*b^3*d) + sec(c + d*x)^4/(4*b^2*d) + (a^2 - b^2)^3/(a*b^6*d*(a + b*sec(c + d*x)))]
    @test_int [tan(c + d*x)^5/(a + b*sec(c + d*x))^2, x, 3, -(log(cos(c + d*x))/(a^2*d)) + ((a^2 - b^2)*(3*a^2 + b^2)*log(a + b*sec(c + d*x)))/(a^2*b^4*d) - (2*a*sec(c + d*x))/(b^3*d) + sec(c + d*x)^2/(2*b^2*d) + (a^2 - b^2)^2/(a*b^4*d*(a + b*sec(c + d*x)))]
    @test_int [tan(c + d*x)^3/(a + b*sec(c + d*x))^2, x, 3, log(cos(c + d*x))/(a^2*d) + ((a^2 + b^2)*log(a + b*sec(c + d*x)))/(a^2*b^2*d) + (a^2 - b^2)/(a*b^2*d*(a + b*sec(c + d*x)))]
    @test_int [tan(c + d*x)^1/(a + b*sec(c + d*x))^2, x, 3, -(log(cos(c + d*x))/(a^2*d)) - log(a + b*sec(c + d*x))/(a^2*d) + 1/(a*d*(a + b*sec(c + d*x)))]
    @test_int [cot(c + d*x)^1/(a + b*sec(c + d*x))^2, x, 3, log(cos(c + d*x))/(a^2*d) + log(1 - sec(c + d*x))/(2*(a + b)^2*d) + log(1 + sec(c + d*x))/(2*(a - b)^2*d) - (b^2*(3*a^2 - b^2)*log(a + b*sec(c + d*x)))/(a^2*(a^2 - b^2)^2*d) + b^2/(a*(a^2 - b^2)*d*(a + b*sec(c + d*x)))]
    @test_int [cot(c + d*x)^3/(a + b*sec(c + d*x))^2, x, 3, -(log(cos(c + d*x))/(a^2*d)) - ((a + 2*b)*log(1 - sec(c + d*x)))/(2*(a + b)^3*d) - ((a - 2*b)*log(1 + sec(c + d*x)))/(2*(a - b)^3*d) - (b^4*(5*a^2 - b^2)*log(a + b*sec(c + d*x)))/(a^2*(a^2 - b^2)^3*d) + 1/(4*(a + b)^2*d*(1 - sec(c + d*x))) + 1/(4*(a - b)^2*d*(1 + sec(c + d*x))) + b^4/(a*(a^2 - b^2)^2*d*(a + b*sec(c + d*x)))]
    @test_int [cot(c + d*x)^5/(a + b*sec(c + d*x))^2, x, 3, log(cos(c + d*x))/(a^2*d) + ((4*a^2 + 13*a*b + 12*b^2)*log(1 - sec(c + d*x)))/(8*(a + b)^4*d) + ((4*a^2 - 13*a*b + 12*b^2)*log(1 + sec(c + d*x)))/(8*(a - b)^4*d) - (b^6*(7*a^2 - b^2)*log(a + b*sec(c + d*x)))/(a^2*(a^2 - b^2)^4*d) - 1/(16*(a + b)^2*d*(1 - sec(c + d*x))^2) - (5*a + 9*b)/(16*(a + b)^3*d*(1 - sec(c + d*x))) - 1/(16*(a - b)^2*d*(1 + sec(c + d*x))^2) - (5*a - 9*b)/(16*(a - b)^3*d*(1 + sec(c + d*x))) + b^6/(a*(a^2 - b^2)^3*d*(a + b*sec(c + d*x)))]

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

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

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

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

    @test_int [(e*tan(c + d*x))^(5/2)/(a + b*sec(c + d*x)), x, 38, (a*e^(5/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*b^2*d) - ((a^2 - b^2)*e^(5/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*b^2*d) - (a*e^(5/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*b^2*d) + ((a^2 - b^2)*e^(5/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*b^2*d) - (a*e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*b^2*d) + ((a^2 - b^2)*e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*b^2*d) + (a*e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*b^2*d) - ((a^2 - b^2)*e^(5/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*b^2*d) + (2*sqrt(2)*sqrt(a - b)*sqrt(a + b)*e^2*sqrt(cos(c + d*x))*Elliptic.Pi(-(sqrt(a - b)/sqrt(a + b)), asin(sqrt(sin(c + d*x))/sqrt(1 + cos(c + d*x))), -1)*sqrt(e*tan(c + d*x)))/(a*b*d*sqrt(sin(c + d*x))) - (2*sqrt(2)*sqrt(a - b)*sqrt(a + b)*e^2*sqrt(cos(c + d*x))*Elliptic.Pi(sqrt(a - b)/sqrt(a + b), asin(sqrt(sin(c + d*x))/sqrt(1 + cos(c + d*x))), -1)*sqrt(e*tan(c + d*x)))/(a*b*d*sqrt(sin(c + d*x))) - (2*e^2*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/(b*d*sqrt(sin(2*c + 2*d*x))) + (2*e*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/(b*d)]
    @test_int [(e*tan(c + d*x))^(3/2)/(a + b*sec(c + d*x)), x, 35, (a*e^(3/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*b^2*d) - ((a^2 - b^2)*e^(3/2)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*b^2*d) - (a*e^(3/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*b^2*d) + ((a^2 - b^2)*e^(3/2)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*b^2*d) + (a*e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*b^2*d) - ((a^2 - b^2)*e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*b^2*d) - (a*e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*b^2*d) + ((a^2 - b^2)*e^(3/2)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*b^2*d) - (2*sqrt(2)*sqrt(a^2 - b^2)*e^2*Elliptic.Pi(b/(a - sqrt(a^2 - b^2)), asin(sqrt(-cos(c + d*x))/sqrt(1 + sin(c + d*x))), -1)*sqrt(sin(c + d*x)))/(a*b*d*sqrt(-cos(c + d*x))*sqrt(e*tan(c + d*x))) + (2*sqrt(2)*sqrt(a^2 - b^2)*e^2*Elliptic.Pi(b/(a + sqrt(a^2 - b^2)), asin(sqrt(-cos(c + d*x))/sqrt(1 + sin(c + d*x))), -1)*sqrt(sin(c + d*x)))/(a*b*d*sqrt(-cos(c + d*x))*sqrt(e*tan(c + d*x))) + (e^2*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(b*d*sqrt(e*tan(c + d*x)))]
    @test_int [(e*tan(c + d*x))^(1/2)/(a + b*sec(c + d*x)), x, 21, -((sqrt(e)*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d)) + (sqrt(e)*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*d) + (sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) - (sqrt(e)*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*d) + (2*sqrt(2)*b*sqrt(cos(c + d*x))*Elliptic.Pi(-(sqrt(a - b)/sqrt(a + b)), asin(sqrt(sin(c + d*x))/sqrt(1 + cos(c + d*x))), -1)*sqrt(e*tan(c + d*x)))/(a*sqrt(a - b)*sqrt(a + b)*d*sqrt(sin(c + d*x))) - (2*sqrt(2)*b*sqrt(cos(c + d*x))*Elliptic.Pi(sqrt(a - b)/sqrt(a + b), asin(sqrt(sin(c + d*x))/sqrt(1 + cos(c + d*x))), -1)*sqrt(e*tan(c + d*x)))/(a*sqrt(a - b)*sqrt(a + b)*d*sqrt(sin(c + d*x)))]
    @test_int [1/(e*tan(c + d*x))^(1/2)/(a + b*sec(c + d*x)), x, 19, -(atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a*d*sqrt(e))) + atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e))/(sqrt(2)*a*d*sqrt(e)) - log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a*d*sqrt(e)) + log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x)))/(2*sqrt(2)*a*d*sqrt(e)) - (2*sqrt(2)*b*Elliptic.Pi(b/(a - sqrt(a^2 - b^2)), asin(sqrt(-cos(c + d*x))/sqrt(1 + sin(c + d*x))), -1)*sqrt(sin(c + d*x)))/(a*sqrt(a^2 - b^2)*d*sqrt(-cos(c + d*x))*sqrt(e*tan(c + d*x))) + (2*sqrt(2)*b*Elliptic.Pi(b/(a + sqrt(a^2 - b^2)), asin(sqrt(-cos(c + d*x))/sqrt(1 + sin(c + d*x))), -1)*sqrt(sin(c + d*x)))/(a*sqrt(a^2 - b^2)*d*sqrt(-cos(c + d*x))*sqrt(e*tan(c + d*x)))]
    @test_int [1/(e*tan(c + d*x))^(3/2)/(a + b*sec(c + d*x)), x, 39, (a*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*(a^2 - b^2)*d*e^(3/2)) - (b^2*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*(a^2 - b^2)*d*e^(3/2)) - (a*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*(a^2 - b^2)*d*e^(3/2)) + (b^2*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*(a^2 - b^2)*d*e^(3/2)) - (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*(a^2 - b^2)*d*e^(3/2)) + (b^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*(a^2 - b^2)*d*e^(3/2)) + (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*(a^2 - b^2)*d*e^(3/2)) - (b^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*(a^2 - b^2)*d*e^(3/2)) - (2*(a - b*sec(c + d*x)))/((a^2 - b^2)*d*e*sqrt(e*tan(c + d*x))) + (2*sqrt(2)*b^3*sqrt(cos(c + d*x))*Elliptic.Pi(-(sqrt(a - b)/sqrt(a + b)), asin(sqrt(sin(c + d*x))/sqrt(1 + cos(c + d*x))), -1)*sqrt(e*tan(c + d*x)))/(a*(a - b)^(3/2)*(a + b)^(3/2)*d*e^2*sqrt(sin(c + d*x))) - (2*sqrt(2)*b^3*sqrt(cos(c + d*x))*Elliptic.Pi(sqrt(a - b)/sqrt(a + b), asin(sqrt(sin(c + d*x))/sqrt(1 + cos(c + d*x))), -1)*sqrt(e*tan(c + d*x)))/(a*(a - b)^(3/2)*(a + b)^(3/2)*d*e^2*sqrt(sin(c + d*x))) + (2*b*cos(c + d*x)*Elliptic.E(c - pi/4 + d*x, 2)*sqrt(e*tan(c + d*x)))/((a^2 - b^2)*d*e^2*sqrt(sin(2*c + 2*d*x))) - (2*b*cos(c + d*x)*(e*tan(c + d*x))^(3/2))/((a^2 - b^2)*d*e^3)]
    @test_int [1/(e*tan(c + d*x))^(5/2)/(a + b*sec(c + d*x)), x, 36, (a*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*(a^2 - b^2)*d*e^(5/2)) - (b^2*atan(1 - (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*(a^2 - b^2)*d*e^(5/2)) - (a*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*(a^2 - b^2)*d*e^(5/2)) + (b^2*atan(1 + (sqrt(2)*sqrt(e*tan(c + d*x)))/sqrt(e)))/(sqrt(2)*a*(a^2 - b^2)*d*e^(5/2)) + (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*(a^2 - b^2)*d*e^(5/2)) - (b^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) - sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*(a^2 - b^2)*d*e^(5/2)) - (a*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*(a^2 - b^2)*d*e^(5/2)) + (b^2*log(sqrt(e) + sqrt(e)*tan(c + d*x) + sqrt(2)*sqrt(e*tan(c + d*x))))/(2*sqrt(2)*a*(a^2 - b^2)*d*e^(5/2)) - (2*(a - b*sec(c + d*x)))/(3*(a^2 - b^2)*d*e*(e*tan(c + d*x))^(3/2)) - (2*sqrt(2)*b^3*Elliptic.Pi(b/(a - sqrt(a^2 - b^2)), asin(sqrt(-cos(c + d*x))/sqrt(1 + sin(c + d*x))), -1)*sqrt(sin(c + d*x)))/(a*(a^2 - b^2)^(3/2)*d*e^2*sqrt(-cos(c + d*x))*sqrt(e*tan(c + d*x))) + (2*sqrt(2)*b^3*Elliptic.Pi(b/(a + sqrt(a^2 - b^2)), asin(sqrt(-cos(c + d*x))/sqrt(1 + sin(c + d*x))), -1)*sqrt(sin(c + d*x)))/(a*(a^2 - b^2)^(3/2)*d*e^2*sqrt(-cos(c + d*x))*sqrt(e*tan(c + d*x))) + (b*Elliptic.F(c - pi/4 + d*x, 2)*sec(c + d*x)*sqrt(sin(2*c + 2*d*x)))/(3*(a^2 - b^2)*d*e^2*sqrt(e*tan(c + d*x)))]

    #= Mathematica*indicates*these*have*a*closed-form*antiderivative*in*terms*of*Elliptic.Pi. =#
    #= [(e*tan(c + d*x))^(5/2)/(a + b*sec(c + d*x))^2, x, 21, 0]
    @test_int [(e*tan(c + d*x))^(3/2)/(a + b*sec(c + d*x))^2, x, 20, 0]
    @test_int [(e*tan(c + d*x))^(1/2)/(a + b*sec(c + d*x))^2, x, 9, 0]
    @test_int [1/(e*tan(c + d*x))^(1/2)/(a + b*sec(c + d*x))^2, x, 9, 0]
    @test_int [1/(e*tan(c + d*x))^(3/2)/(a + b*sec(c + d*x))^2, x, 22, 0]
    @test_int [1/(e*tan(c + d*x))^(5/2)/(a + b*sec(c + d*x))^2, x, 22, 0] =#

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

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

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

    @test_int [tan(c + d*x)^2*sqrt(a + b*sec(c + d*x)), x, 7, -((2*a*(a - b)*sqrt(a + b)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^2*d)) - (2*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))))/(3*b*d) + (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d + (2*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*d)]
    @test_int [tan(c + d*x)^0*sqrt(a + b*sec(c + d*x)), x, 1, -((2*cot(c + d*x)*Elliptic.Pi(a/(a + b), asin(sqrt(a + b)/sqrt(a + b*sec(c + d*x))), (a - b)/(a + b))*sqrt(-((b*(1 - sec(c + d*x)))/(a + b*sec(c + d*x))))*sqrt((b*(1 + sec(c + d*x)))/(a + b*sec(c + d*x)))*(a + b*sec(c + d*x)))/(sqrt(a + b)*d))]
    @test_int [cot(c + d*x)^2*sqrt(a + b*sec(c + d*x)), x, 5, (sqrt(a + b)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/d - (cot(c + d*x)*sqrt(a + b*sec(c + d*x)))/d + (2*cot(c + d*x)*Elliptic.Pi(a/(a + b), asin(sqrt(a + b)/sqrt(a + b*sec(c + d*x))), (a - b)/(a + b))*sqrt(-((b*(1 - sec(c + d*x)))/(a + b*sec(c + d*x))))*sqrt((b*(1 + sec(c + d*x)))/(a + b*sec(c + d*x)))*(a + b*sec(c + d*x)))/(sqrt(a + b)*d)]

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

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

    @test_int [tan(c + d*x)^4/sqrt(a + b*sec(c + d*x)), x, 11, -((2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d)) - (2*(a - b)*sqrt(a + b)*(8*a^2 - 21*b^2)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt(-((b*(-1 + sec(c + d*x)))/(a + b)))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^4*d) + (2*sqrt(a + b)*(-8*a^2 + 2*a*b + 21*b^2)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt(-((b*(-1 + sec(c + d*x)))/(a + b)))*sqrt((b*(1 + sec(c + d*x)))/(-a + b)))/(15*b^3*d) - (8*a*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b^2*d) + (2*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b*d), (4*(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^2*d) - (2*(a - b)*sqrt(a + b)*(8*a^2 + 9*b^2)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^4*d) + (4*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))))/(b*d) - (2*sqrt(a + b)*(8*a^2 - 2*a*b + 9*b^2)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(15*b^3*d) - (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d) - (8*a*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(15*b^2*d) + (2*sec(c + d*x)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(5*b*d)]
    @test_int [tan(c + d*x)^2/sqrt(a + b*sec(c + d*x)), x, 6, -((2*(a - b)*sqrt(a + b)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b^2*d)) - (2*sqrt(a + b)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*d) + (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d)]
    @test_int [tan(c + d*x)^0/sqrt(a + b*sec(c + d*x)), x, 1, -((2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d))]
    @test_int [cot(c + d*x)^2/sqrt(a + b*sec(c + d*x)), x, 9, (cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(sqrt(a + b)*d) - (cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(sqrt(a + b)*d) + (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*d) - cot(c + d*x)/(d*sqrt(a + b*sec(c + d*x))) + (b^2*tan(c + d*x))/((a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]

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

    @test_int [tan(c + d*x)^4/(a + b*sec(c + d*x))^(3/2), x, 17, (2*(8*a^4 - 11*a^2*b^2 + 3*b^4)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt(-((b*(-1 + sec(c + d*x)))/(a + b)))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a*b^4*sqrt(a + b)*d) + (2*(2*a + b)*(4*a^2 + a*b - 3*b^2)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt(-((b*(-1 + sec(c + d*x)))/(a + b)))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*a*b^3*sqrt(a + b)*d) - (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) - (4*a*tan(c + d*x))/((a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*b^2*tan(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) - (2*a^2*sec(c + d*x)*tan(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(4*a^2 - b^2)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b^2*(a^2 - b^2)*d), (2*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*sqrt(a + b)*d) - (4*a*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*(8*a^2 - 5*b^2)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(3*b^4*sqrt(a + b)*d) - (2*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*sqrt(a + b)*d) - (4*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(b*sqrt(a + b)*d) + (2*(2*a + b)*(4*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^3*sqrt(a + b)*d) - (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) - (4*a*tan(c + d*x))/((a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*b^2*tan(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) - (2*a^2*sec(c + d*x)*tan(c + d*x))/(b*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x))) + (2*(4*a^2 - b^2)*sqrt(a + b*sec(c + d*x))*tan(c + d*x))/(3*b^2*(a^2 - b^2)*d)]
    @test_int [tan(c + d*x)^2/(a + b*sec(c + d*x))^(3/2), x, 7, (2*(a - b)*sqrt(a + b)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b^2*d) + (2*sqrt(a + b)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*b*d) + (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (2*tan(c + d*x))/(a*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [tan(c + d*x)^0/(a + b*sec(c + d*x))^(3/2), x, 6, (2*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*sqrt(a + b)*d) - (2*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*sqrt(a + b)*d) - (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) + (2*b^2*tan(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]
    @test_int [cot(c + d*x)^2/(a + b*sec(c + d*x))^(3/2), x, 14, (2*(a^2 + b^2)*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt(-((b*(-1 + sec(c + d*x)))/(a + b)))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*(a - b)*(a + b)^(3/2)*d) - ((a^2 - a*b + 2*b^2)*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt(-((b*(-1 + sec(c + d*x)))/(a + b)))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*(a - b)*(a + b)^(3/2)*d) + (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) - cot(c + d*x)/(d*(a + b*sec(c + d*x))^(3/2)) + (b^2*tan(c + d*x))/((a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (2*b^2*(a^2 + b^2)*tan(c + d*x))/(a*(a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x))), (4*a*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)*(a + b)^(3/2)*d) - (2*cot(c + d*x)*Elliptic.E(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*sqrt(a + b)*d) - ((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))))/((a - b)*(a + b)^(3/2)*d) + (2*cot(c + d*x)*Elliptic.F(asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a*sqrt(a + b)*d) + (2*sqrt(a + b)*cot(c + d*x)*Elliptic.Pi((a + b)/a, asin(sqrt(a + b*sec(c + d*x))/sqrt(a + b)), (a + b)/(a - b))*sqrt((b*(1 - sec(c + d*x)))/(a + b))*sqrt(-((b*(1 + sec(c + d*x)))/(a - b))))/(a^2*d) - cot(c + d*x)/(d*(a + b*sec(c + d*x))^(3/2)) + (b^2*tan(c + d*x))/((a^2 - b^2)*d*(a + b*sec(c + d*x))^(3/2)) + (4*a*b^2*tan(c + d*x))/((a^2 - b^2)^2*d*sqrt(a + b*sec(c + d*x))) - (2*b^2*tan(c + d*x))/(a*(a^2 - b^2)*d*sqrt(a + b*sec(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d*tan(e+f*x))^n*(a+b*sec(e+f*x))^m*with*n*symbolic=#

    @test_int [(d*tan(e + f*x))^n*(a + b*sec(e + f*x))^3, x, 8, (3*a*b^2*(d*tan(e + f*x))^(1 + n))/(d*f*(1 + n)) + (a^3*HypergeometricFunctions._₂F₁(1, (1 + n)/2, (3 + n)/2, -tan(e + f*x)^2)*(d*tan(e + f*x))^(1 + n))/(d*f*(1 + n)) + (3*a^2*b*(cos(e + f*x)^2)^((2 + n)/2)*HypergeometricFunctions._₂F₁((1 + n)/2, (2 + n)/2, (3 + n)/2, sin(e + f*x)^2)*sec(e + f*x)*(d*tan(e + f*x))^(1 + n))/(d*f*(1 + n)) + (b^3*(cos(e + f*x)^2)^((4 + n)/2)*HypergeometricFunctions._₂F₁((1 + n)/2, (4 + n)/2, (3 + n)/2, sin(e + f*x)^2)*sec(e + f*x)^3*(d*tan(e + f*x))^(1 + n))/(d*f*(1 + n))]
    @test_int [(d*tan(e + f*x))^n*(a + b*sec(e + f*x))^2, x, 7, (b^2*(d*tan(e + f*x))^(1 + n))/(d*f*(1 + n)) + (a^2*HypergeometricFunctions._₂F₁(1, (1 + n)/2, (3 + n)/2, -tan(e + f*x)^2)*(d*tan(e + f*x))^(1 + n))/(d*f*(1 + n)) + (2*a*b*(cos(e + f*x)^2)^((2 + n)/2)*HypergeometricFunctions._₂F₁((1 + n)/2, (2 + n)/2, (3 + n)/2, sin(e + f*x)^2)*sec(e + f*x)*(d*tan(e + f*x))^(1 + n))/(d*f*(1 + n))]
    @test_int [(d*tan(e + f*x))^n*(a + b*sec(e + f*x))^1, x, 4, (a*HypergeometricFunctions._₂F₁(1, (1 + n)/2, (3 + n)/2, -tan(e + f*x)^2)*(d*tan(e + f*x))^(1 + n))/(d*f*(1 + n)) + (b*(cos(e + f*x)^2)^((2 + n)/2)*HypergeometricFunctions._₂F₁((1 + n)/2, (2 + n)/2, (3 + n)/2, sin(e + f*x)^2)*sec(e + f*x)*(d*tan(e + f*x))^(1 + n))/(d*f*(1 + n))]
    @test_int [(d*tan(e + f*x))^n/(a + b*sec(e + f*x))^1, x, -1, (d*AppellF1(1 - n, (1 - n)/2, (1 - n)/2, 2 - n, (a + b)/(a + b*sec(e + f*x)), (a - b)/(a + b*sec(e + f*x)))*(-((b*(1 - sec(e + f*x)))/(a + b*sec(e + f*x))))^((1 - n)/2)*((b*(1 + sec(e + f*x)))/(a + b*sec(e + f*x)))^((1 - n)/2)*(d*tan(e + f*x))^(-1 + n)*(-tan(e + f*x)^2)^((1 - n)/2 + (1/2)*(-1 + n)))/(a*f*(1 - n)) - (d*HypergeometricFunctions._₂F₁(1, (1 + n)/2, (3 + n)/2, -tan(e + f*x)^2)*(d*tan(e + f*x))^(-1 + n)*(-tan(e + f*x)^2)^((1 - n)/2 + (1 + n)/2))/(a*f*(1 + n))]
    #= [(d*tan(e + f*x))^n/(a + b*sec(e + f*x))^2, x, 0, 0] =#

    @test_int [(e*tan(c + d*x))^m*(a + b*sec(c + d*x))^(3/2), x, 0, Unintegrable((a + b*sec(c + d*x))^(3/2)*(e*tan(c + d*x))^m, x)]
    @test_int [(e*tan(c + d*x))^m*(a + b*sec(c + d*x))^(1/2), x, 0, Unintegrable(sqrt(a + b*sec(c + d*x))*(e*tan(c + d*x))^m, x)]
    @test_int [(e*tan(c + d*x))^m/(a + b*sec(c + d*x))^(1/2), x, 0, Unintegrable((e*tan(c + d*x))^m/sqrt(a + b*sec(c + d*x)), x)]
    @test_int [(e*tan(c + d*x))^m/(a + b*sec(c + d*x))^(3/2), x, 0, Unintegrable((e*tan(c + d*x))^m/(a + b*sec(c + d*x))^(3/2), x)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d*tan(e+f*x))^n*(a+b*sec(e+f*x))^m*with*m*symbolic=#

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

    @test_int [tan(c + d*x)^5*(a + b*sec(c + d*x))^n, x, 5, -((a*(a^2 - 2*b^2)*(a + b*sec(c + d*x))^(1 + n))/(b^4*d*(1 + n))) - (HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, 1 + (b*sec(c + d*x))/a)*(a + b*sec(c + d*x))^(1 + n))/(a*d*(1 + n)) + ((3*a^2 - 2*b^2)*(a + b*sec(c + d*x))^(2 + n))/(b^4*d*(2 + n)) - (3*a*(a + b*sec(c + d*x))^(3 + n))/(b^4*d*(3 + n)) + (a + b*sec(c + d*x))^(4 + n)/(b^4*d*(4 + n))]
    @test_int [tan(c + d*x)^3*(a + b*sec(c + d*x))^n, x, 4, -((a*(a + b*sec(c + d*x))^(1 + n))/(b^2*d*(1 + n))) + (HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, 1 + (b*sec(c + d*x))/a)*(a + b*sec(c + d*x))^(1 + n))/(a*d*(1 + n)) + (a + b*sec(c + d*x))^(2 + n)/(b^2*d*(2 + n))]
    @test_int [tan(c + d*x)^1*(a + b*sec(c + d*x))^n, x, 2, -((HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, 1 + (b*sec(c + d*x))/a)*(a + b*sec(c + d*x))^(1 + n))/(a*d*(1 + n)))]
    @test_int [cot(c + d*x)^1*(a + b*sec(c + d*x))^n, x, 8, -((HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, (a + b*sec(c + d*x))/(a - b))*(a + b*sec(c + d*x))^(1 + n))/(2*(a - b)*d*(1 + n))) - (HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, (a + b*sec(c + d*x))/(a + b))*(a + b*sec(c + d*x))^(1 + n))/(2*(a + b)*d*(1 + n)) + (HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, 1 + (b*sec(c + d*x))/a)*(a + b*sec(c + d*x))^(1 + n))/(a*d*(1 + n))]
    @test_int [cot(c + d*x)^3*(a + b*sec(c + d*x))^n, x, 10, (HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, (a + b*sec(c + d*x))/(a - b))*(a + b*sec(c + d*x))^(1 + n))/(2*(a - b)*d*(1 + n)) + (HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, (a + b*sec(c + d*x))/(a + b))*(a + b*sec(c + d*x))^(1 + n))/(2*(a + b)*d*(1 + n)) - (HypergeometricFunctions._₂F₁(1, 1 + n, 2 + n, 1 + (b*sec(c + d*x))/a)*(a + b*sec(c + d*x))^(1 + n))/(a*d*(1 + n)) - (b*HypergeometricFunctions._₂F₁(2, 1 + n, 2 + n, (a + b*sec(c + d*x))/(a - b))*(a + b*sec(c + d*x))^(1 + n))/(4*(a - b)^2*d*(1 + n)) + (b*HypergeometricFunctions._₂F₁(2, 1 + n, 2 + n, (a + b*sec(c + d*x))/(a + b))*(a + b*sec(c + d*x))^(1 + n))/(4*(a + b)^2*d*(1 + n))]

    @test_int [tan(c + d*x)^4*(a + b*sec(c + d*x))^n, x, 0, Unintegrable((a + b*sec(c + d*x))^n*tan(c + d*x)^4, x)]
    @test_int [tan(c + d*x)^2*(a + b*sec(c + d*x))^n, x, 9, (sqrt(2)*(a + b)*AppellF1(1/2, 1/2, -1 - n, 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^n*tan(c + d*x))/(((a + b*sec(c + d*x))/(a + b))^n*(b*d*sqrt(1 + sec(c + d*x)))) - (sqrt(2)*a*AppellF1(1/2, 1/2, -n, 3/2, (1/2)*(1 - sec(c + d*x)), (b*(1 - sec(c + d*x)))/(a + b))*(a + b*sec(c + d*x))^n*tan(c + d*x))/(((a + b*sec(c + d*x))/(a + b))^n*(b*d*sqrt(1 + sec(c + d*x)))) - Unintegrable((a + b*sec(c + d*x))^n, x)]
    @test_int [cot(c + d*x)^2*(a + b*sec(c + d*x))^n, x, 0, Unintegrable(cot(c + d*x)^2*(a + b*sec(c + d*x))^n, x)]
    @test_int [cot(c + d*x)^4*(a + b*sec(c + d*x))^n, x, 0, Unintegrable(cot(c + d*x)^4*(a + b*sec(c + d*x))^n, x)]

    @test_int [tan(c + d*x)^(3/2)*(a + b*sec(c + d*x))^n, x, 0, Unintegrable((a + b*sec(c + d*x))^n*tan(c + d*x)^(3/2), x)]
    @test_int [tan(c + d*x)^(1/2)*(a + b*sec(c + d*x))^n, x, 0, Unintegrable((a + b*sec(c + d*x))^n*sqrt(tan(c + d*x)), x)]
    @test_int [1/tan(c + d*x)^(1/2)*(a + b*sec(c + d*x))^n, x, 0, Unintegrable((a + b*sec(c + d*x))^n/sqrt(tan(c + d*x)), x)]
    @test_int [1/tan(c + d*x)^(3/2)*(a + b*sec(c + d*x))^n, x, 0, Unintegrable((a + b*sec(c + d*x))^n/tan(c + d*x)^(3/2), x)]

    #= ::Section:: =#
    #=Integrands*of*the*form*(d*cot(e+f*x))^m*(a+b*sec(e+f*x))^m=#
    end

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