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

    #= ::Package:: =#

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

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

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*tan(c+d*x)^m*(A+B*tan(c+d*x))*(a+i*a*tan(c+d*x))^n=#

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

    @test_int [tan(c + d*x)^2*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 4, -(a*(A - im*B)*x) + (a*(im*A + B)*log(cos(c + d*x)))/d + (a*(A - im*B)*tan(c + d*x))/d + (a*(im*A + B)*tan(c + d*x)^2)/(2*d) + ((im/3)*a*B*tan(c + d*x)^3)/d]
    @test_int [tan(c + d*x)^1*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 3, -(a*(im*A + B)*x) - (a*(A - im*B)*log(cos(c + d*x)))/d + (a*(im*A + B)*tan(c + d*x))/d + ((im/2)*a*B*tan(c + d*x)^2)/d]
    @test_int [tan(c + d*x)^0*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 2, a*(A - im*B)*x - (a*(im*A + B)*log(cos(c + d*x)))/d + im*a*B*tan(c + d*x)/d]
    @test_int [cot(c + d*x)^1*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 4, a*(im*A + B)*x - (im*a*B*log(cos(c + d*x)))/d + (a*A*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^2*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 3, -(a*(A - im*B)*x) - (a*A*cot(c + d*x))/d + (a*(im*A + B)*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 4, -(a*(im*A + B)*x) - (a*(im*A + B)*cot(c + d*x))/d - (a*A*cot(c + d*x)^2)/(2*d) - (a*(A - im*B)*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 5, a*(A - im*B)*x + (a*(A - im*B)*cot(c + d*x))/d - (a*(im*A + B)*cot(c + d*x)^2)/(2*d) - (a*A*cot(c + d*x)^3)/(3*d) - (a*(im*A + B)*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^5*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 6, a*(im*A + B)*x + (a*(im*A + B)*cot(c + d*x))/d + (a*(A - im*B)*cot(c + d*x)^2)/(2*d) - (a*(im*A + B)*cot(c + d*x)^3)/(3*d) - (a*A*cot(c + d*x)^4)/(4*d) + (a*(A - im*B)*log(sin(c + d*x)))/d]

    @test_int [tan(c + d*x)^2*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, -2*a^2*(A - im*B)*x + (2*a^2*(im*A + B)*log(cos(c + d*x)))/d + (2*a^2*(A - im*B)*tan(c + d*x))/d + (a^2*(im*A + B)*tan(c + d*x)^2)/d - (a^2*(4*A - (5*im)*B)*tan(c + d*x)^3)/(12*d) + ((im/4)*B*tan(c + d*x)^3*(a^2 + im*a^2*tan(c + d*x)))/d]
    @test_int [tan(c + d*x)*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 4, -2*a^2*(im*A + B)*x - (2*a^2*(A - im*B)*log(cos(c + d*x)))/d + (a^2*(im*A + B)*tan(c + d*x))/d + (A*(a + im*a*tan(c + d*x))^2)/(2*d) - ((im/3)*B*(a + im*a*tan(c + d*x))^3)/(a*d)]
    @test_int [(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 3, 2*a^2*(A - im*B)*x - (2*a^2*(im*A + B)*log(cos(c + d*x)))/d - (a^2*(A - im*B)*tan(c + d*x))/d + (B*(a + im*a*tan(c + d*x))^2)/(2*d)]
    @test_int [cot(c + d*x)*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, 2*a^2*(im*A + B)*x + (a^2*(A - (2*im)*B)*log(cos(c + d*x)))/d + (a^2*A*log(sin(c + d*x)))/d + (im*B*(a^2 + im*a^2*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^2*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, -2*a^2*(A - im*B)*x + (a^2*B*log(cos(c + d*x)))/d + (a^2*((2*im)*A + B)*log(sin(c + d*x)))/d - (A*cot(c + d*x)*(a^2 + im*a^2*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 4, -2*a^2*(im*A + B)*x - (a^2*((3*im)*A + 2*B)*cot(c + d*x))/(2*d) - (2*a^2*(A - im*B)*log(sin(c + d*x)))/d - (A*cot(c + d*x)^2*(a^2 + im*a^2*tan(c + d*x)))/(2*d)]
    @test_int [cot(c + d*x)^4*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, 2*a^2*(A - im*B)*x + (2*a^2*(A - im*B)*cot(c + d*x))/d - (a^2*((4*im)*A + 3*B)*cot(c + d*x)^2)/(6*d) - (2*a^2*(im*A + B)*log(sin(c + d*x)))/d - (A*cot(c + d*x)^3*(a^2 + im*a^2*tan(c + d*x)))/(3*d)]
    @test_int [cot(c + d*x)^5*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 6, 2*a^2*(im*A + B)*x + (2*a^2*(im*A + B)*cot(c + d*x))/d + (a^2*(A - im*B)*cot(c + d*x)^2)/d - (a^2*((5*im)*A + 4*B)*cot(c + d*x)^3)/(12*d) + (2*a^2*(A - im*B)*log(sin(c + d*x)))/d - (A*cot(c + d*x)^4*(a^2 + im*a^2*tan(c + d*x)))/(4*d)]

    @test_int [tan(c + d*x)^2*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, -4*a^3*(A - im*B)*x + (4*a^3*(im*A + B)*log(cos(c + d*x)))/d + (4*a^3*(A - im*B)*tan(c + d*x))/d + (2*a^3*(im*A + B)*tan(c + d*x)^2)/d - (a^3*(45*A - (47*im)*B)*tan(c + d*x)^3)/(60*d) + ((im/5)*a*B*tan(c + d*x)^3*(a + im*a*tan(c + d*x))^2)/d - ((5*A - (7*im)*B)*tan(c + d*x)^3*(a^3 + im*a^3*tan(c + d*x)))/(20*d)]
    @test_int [tan(c + d*x)*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 5, -4*a^3*(im*A + B)*x - (4*a^3*(A - im*B)*log(cos(c + d*x)))/d + (2*a^3*(im*A + B)*tan(c + d*x))/d + (a*(A - im*B)*(a + im*a*tan(c + d*x))^2)/(2*d) + (A*(a + im*a*tan(c + d*x))^3)/(3*d) - ((im/4)*B*(a + im*a*tan(c + d*x))^4)/(a*d)]
    @test_int [(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 4, 4*a^3*(A - im*B)*x - (4*a^3*(im*A + B)*log(cos(c + d*x)))/d - (2*a^3*(A - im*B)*tan(c + d*x))/d + (a*(im*A + B)*(a + im*a*tan(c + d*x))^2)/(2*d) + (B*(a + im*a*tan(c + d*x))^3)/(3*d)]
    @test_int [cot(c + d*x)*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, 4*a^3*(im*A + B)*x + (a^3*(3*A - (4*im)*B)*log(cos(c + d*x)))/d + (a^3*A*log(sin(c + d*x)))/d + ((im/2)*a*B*(a + im*a*tan(c + d*x))^2)/d - ((A - (2*im)*B)*(a^3 + im*a^3*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^2*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, -4*a^3*(A - im*B)*x + (a^3*(im*A + 3*B)*log(cos(c + d*x)))/d + (a^3*(3*im*A + B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)*(a + im*a*tan(c + d*x))^2)/d + ((im*A - B)*(a^3 + im*a^3*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, -4*a^3*(im*A + B)*x + (im*a^3*B*log(cos(c + d*x)))/d - (a^3*(4*A - (3*im)*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^2*(a + im*a*tan(c + d*x))^2)/(2*d) - (((2*im)*A + B)*cot(c + d*x)*(a^3 + im*a^3*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 5, 4*a^3*(A - im*B)*x + (a^3*(17*A - (15*im)*B)*cot(c + d*x))/(6*d) - (4*a^3*(im*A + B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^3*(a + im*a*tan(c + d*x))^2)/(3*d) - (((5*im)*A + 3*B)*cot(c + d*x)^2*(a^3 + im*a^3*tan(c + d*x)))/(6*d)]
    @test_int [cot(c + d*x)^5*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, 4*a^3*(im*A + B)*x + (4*a^3*(im*A + B)*cot(c + d*x))/d + (a^3*(15*A - (14*im)*B)*cot(c + d*x)^2)/(12*d) + (4*a^3*(A - im*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^4*(a + im*a*tan(c + d*x))^2)/(4*d) - (((3*im)*A + 2*B)*cot(c + d*x)^3*(a^3 + im*a^3*tan(c + d*x)))/(6*d)]
    @test_int [cot(c + d*x)^6*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 7, -4*a^3*(A - im*B)*x - (4*a^3*(A - im*B)*cot(c + d*x))/d + (2*a^3*(im*A + B)*cot(c + d*x)^2)/d + (a^3*(47*A - (45*im)*B)*cot(c + d*x)^3)/(60*d) + (4*a^3*(im*A + B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^5*(a + im*a*tan(c + d*x))^2)/(5*d) - (((7*im)*A + 5*B)*cot(c + d*x)^4*(a^3 + im*a^3*tan(c + d*x)))/(20*d)]

    @test_int [tan(c + d*x)^2*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 7, -8*a^4*(A - im*B)*x + (8*a^4*(im*A + B)*log(cos(c + d*x)))/d + (8*a^4*(A - im*B)*tan(c + d*x))/d + (4*a^4*(im*A + B)*tan(c + d*x)^2)/d - (a^4*(92*A - (93*im)*B)*tan(c + d*x)^3)/(60*d) + ((im/6)*a*B*tan(c + d*x)^3*(a + im*a*tan(c + d*x))^3)/d - ((2*A - (3*im)*B)*tan(c + d*x)^3*(a^2 + im*a^2*tan(c + d*x))^2)/(10*d) - ((12*A - (13*im)*B)*tan(c + d*x)^3*(a^4 + im*a^4*tan(c + d*x)))/(20*d)]
    @test_int [tan(c + d*x)*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 6, -8*a^4*(im*A + B)*x - (8*a^4*(A - im*B)*log(cos(c + d*x)))/d + (4*a^4*(im*A + B)*tan(c + d*x))/d + (a*(A - im*B)*(a + im*a*tan(c + d*x))^3)/(3*d) + (A*(a + im*a*tan(c + d*x))^4)/(4*d) - ((im/5)*B*(a + im*a*tan(c + d*x))^5)/(a*d) + ((A - im*B)*(a^2 + im*a^2*tan(c + d*x))^2)/d]
    @test_int [(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 5, 8*a^4*(A - im*B)*x - (8*a^4*(im*A + B)*log(cos(c + d*x)))/d - (4*a^4*(A - im*B)*tan(c + d*x))/d + (a*(im*A + B)*(a + im*a*tan(c + d*x))^3)/(3*d) + (B*(a + im*a*tan(c + d*x))^4)/(4*d) + ((im*A + B)*(a^2 + im*a^2*tan(c + d*x))^2)/d]
    @test_int [cot(c + d*x)*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 7, 8*a^4*(im*A + B)*x + (a^4*(7*A - (8*im)*B)*log(cos(c + d*x)))/d + (a^4*A*log(sin(c + d*x)))/d + ((im/3)*a*B*(a + im*a*tan(c + d*x))^3)/d - ((A - (2*im)*B)*(a^2 + im*a^2*tan(c + d*x))^2)/(2*d) - ((3*A - (4*im)*B)*(a^4 + im*a^4*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^2*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 7, -8*a^4*(A - im*B)*x + (a^4*(4*im*A + 7*B)*log(cos(c + d*x)))/d + (a^4*(4*im*A + B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)*(a + im*a*tan(c + d*x))^3)/d + ((2*im*A - B)*(a^2 + im*a^2*tan(c + d*x))^2)/(2*d) - (3*B*(a^4 + im*a^4*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 7, -8*a^4*(im*A + B)*x - (a^4*(A - (4*im)*B)*log(cos(c + d*x)))/d - (a^4*(7*A - (4*im)*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^2*(a + im*a*tan(c + d*x))^3)/(2*d) - (((5*im)*A + 2*B)*cot(c + d*x)*(a^2 + im*a^2*tan(c + d*x))^2)/(2*d) - (3*A*(a^4 + im*a^4*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 7, 8*a^4*(A - im*B)*x - (a^4*B*log(cos(c + d*x)))/d - (a^4*((8*im)*A + 7*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^3*(a + im*a*tan(c + d*x))^3)/(3*d) - (((2*im)*A + B)*cot(c + d*x)^2*(a^2 + im*a^2*tan(c + d*x))^2)/(2*d) + ((4*A - (3*im)*B)*cot(c + d*x)*(a^4 + im*a^4*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^5*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 6, 8*a^4*(im*A + B)*x + (a^4*((67*im)*A + 64*B)*cot(c + d*x))/(12*d) + (8*a^4*(A - im*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^4*(a + im*a*tan(c + d*x))^3)/(4*d) - (((7*im)*A + 4*B)*cot(c + d*x)^3*(a^2 + im*a^2*tan(c + d*x))^2)/(12*d) + ((19*A - (16*im)*B)*cot(c + d*x)^2*(a^4 + im*a^4*tan(c + d*x)))/(12*d)]
    @test_int [cot(c + d*x)^6*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 7, -8*a^4*(A - im*B)*x - (8*a^4*(A - im*B)*cot(c + d*x))/d + (a^4*((148*im)*A + 145*B)*cot(c + d*x)^2)/(60*d) + (8*a^4*(im*A + B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^5*(a + im*a*tan(c + d*x))^3)/(5*d) - (((8*im)*A + 5*B)*cot(c + d*x)^4*(a^2 + im*a^2*tan(c + d*x))^2)/(20*d) + ((28*A - (25*im)*B)*cot(c + d*x)^3*(a^4 + im*a^4*tan(c + d*x)))/(30*d)]
    @test_int [cot(c + d*x)^7*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 8, -8*a^4*(im*A + B)*x - (8*a^4*(im*A + B)*cot(c + d*x))/d - (4*a^4*(A - im*B)*cot(c + d*x)^2)/d + (a^4*((93*im)*A + 92*B)*cot(c + d*x)^3)/(60*d) - (8*a^4*(A - im*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^6*(a + im*a*tan(c + d*x))^3)/(6*d) - (((3*im)*A + 2*B)*cot(c + d*x)^5*(a^2 + im*a^2*tan(c + d*x))^2)/(10*d) + ((13*A - (12*im)*B)*cot(c + d*x)^4*(a^4 + im*a^4*tan(c + d*x)))/(20*d)]

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

    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 4, (3*(im*A - B)*x)/(2*a) - ((A + 2*im*B)*log(cos(c + d*x)))/(a*d) - (3*(im*A - B)*tan(c + d*x))/(2*a*d) - ((A + 2*im*B)*tan(c + d*x)^2)/(2*a*d) + ((im*A - B)*tan(c + d*x)^3)/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 3, ((A + 3*im*B)*x)/(2*a) + ((im*A - B)*log(cos(c + d*x)))/(a*d) - ((A + 3*im*B)*tan(c + d*x))/(2*a*d) + ((im*A - B)*tan(c + d*x)^2)/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 5, -(((im*A - B)*x)/(2*a)) + (im*B*log(cos(c + d*x)))/(a*d) - (A + im*B)/(2*a*d*(1 + im*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + im*a*tan(c + d*x)), x, 2, ((A - im*B)*x)/(2*a) + (im*A - B)/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 3, -(((im*A - B)*x)/(2*a)) + (A*log(sin(c + d*x)))/(a*d) + (A + im*B)/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 4, -(((3*A + im*B)*x)/(2*a)) - ((3*A + im*B)*cot(c + d*x))/(2*a*d) - ((im*A - B)*log(sin(c + d*x)))/(a*d) + ((A + im*B)*cot(c + d*x))/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 5, (3*(im*A - B)*x)/(2*a) + (3*(im*A - B)*cot(c + d*x))/(2*a*d) - ((2*A + im*B)*cot(c + d*x)^2)/(2*a*d) - ((2*A + im*B)*log(sin(c + d*x)))/(a*d) + ((A + im*B)*cot(c + d*x)^2)/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^4*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 6, ((5*A + 3*im*B)*x)/(2*a) + ((5*A + 3*im*B)*cot(c + d*x))/(2*a*d) + ((im*A - B)*cot(c + d*x)^2)/(a*d) - ((5*A + 3*im*B)*cot(c + d*x)^3)/(6*a*d) + (2*(im*A - B)*log(sin(c + d*x)))/(a*d) + ((A + im*B)*cot(c + d*x)^3)/(2*d*(a + im*a*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 4, -((3*(im*A - 3*B)*x)/(4*a^2)) + ((A + 2*im*B)*log(cos(c + d*x)))/(a^2*d) + (3*(im*A - 3*B)*tan(c + d*x))/(4*a^2*d) + ((A + 2*im*B)*tan(c + d*x)^2)/(2*a^2*d*(1 + im*tan(c + d*x))) + ((im*A - B)*tan(c + d*x)^3)/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 6, -(((A + 3*im*B)*x)/(4*a^2)) + (B*log(cos(c + d*x)))/(a^2*d) + (im*A - 3*B)/(4*a^2*d*(1 + im*tan(c + d*x))) + ((im*A - B)*tan(c + d*x)^2)/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 3, -(((im*A + B)*x)/(4*a^2)) + (A + 3*im*B)/(4*a^2*d*(1 + im*tan(c + d*x))) - (A + im*B)/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(A + B*tan(c + d*x))/(a + im*a*tan(c + d*x))^2, x, 3, ((A - im*B)*x)/(4*a^2) + (im*A - B)/(4*d*(a + im*a*tan(c + d*x))^2) + (im*A + B)/(4*d*(a^2 + im*a^2*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 4, -(((3*im*A - B)*x)/(4*a^2)) + (A*log(sin(c + d*x)))/(a^2*d) + (3*A + im*B)/(4*a^2*d*(1 + im*tan(c + d*x))) + (A + im*B)/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 5, -((3*(3*A + im*B)*x)/(4*a^2)) - (3*(3*A + im*B)*cot(c + d*x))/(4*a^2*d) - ((2*im*A - B)*log(sin(c + d*x)))/(a^2*d) + ((2*A + im*B)*cot(c + d*x))/(2*a^2*d*(1 + im*tan(c + d*x))) + ((A + im*B)*cot(c + d*x))/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 6, (3*(5*im*A - 3*B)*x)/(4*a^2) + (3*(5*im*A - 3*B)*cot(c + d*x))/(4*a^2*d) - ((2*A + im*B)*cot(c + d*x)^2)/(a^2*d) - (2*(2*A + im*B)*log(sin(c + d*x)))/(a^2*d) + ((5*A + 3*im*B)*cot(c + d*x)^2)/(4*a^2*d*(1 + im*tan(c + d*x))) + ((A + im*B)*cot(c + d*x)^2)/(4*d*(a + im*a*tan(c + d*x))^2)]

    @test_int [(tan(c + d*x)^4*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 5, -(((7*A + 25*im*B)*x)/(8*a^3)) - ((im*A - 3*B)*log(cos(c + d*x)))/(a^3*d) + ((7*A + 25*im*B)*tan(c + d*x))/(8*a^3*d) + ((im*A - B)*tan(c + d*x)^4)/(6*d*(a + im*a*tan(c + d*x))^3) + ((5*A + 11*im*B)*tan(c + d*x)^3)/(24*a*d*(a + im*a*tan(c + d*x))^2) - ((im*A - 3*B)*tan(c + d*x)^2)/(2*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 7, ((im*A - 7*B)*x)/(8*a^3) - (im*B*log(cos(c + d*x)))/(a^3*d) + ((im*A - B)*tan(c + d*x)^3)/(6*d*(a + im*a*tan(c + d*x))^3) + ((A + 3*im*B)*tan(c + d*x)^2)/(8*a*d*(a + im*a*tan(c + d*x))^2) + (A + 7*im*B)/(8*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 4, -(((A - im*B)*x)/(8*a^3)) + ((im*A - B)*tan(c + d*x)^2)/(6*d*(a + im*a*tan(c + d*x))^3) + (im*A - 7*B)/(24*a*d*(a + im*a*tan(c + d*x))^2) + (im*A + 17*B)/(24*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 4, -(((im*A + B)*x)/(8*a^3)) - (A + im*B)/(6*d*(a + im*a*tan(c + d*x))^3) + (A + 3*im*B)/(8*a*d*(a + im*a*tan(c + d*x))^2) + (A - im*B)/(8*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + im*a*tan(c + d*x))^3, x, 4, ((A - im*B)*x)/(8*a^3) + (im*A - B)/(6*d*(a + im*a*tan(c + d*x))^3) + (im*A + B)/(8*a*d*(a + im*a*tan(c + d*x))^2) + (im*A + B)/(8*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 5, -(((7*im*A - B)*x)/(8*a^3)) + (A*log(sin(c + d*x)))/(a^3*d) + (A + im*B)/(6*d*(a + im*a*tan(c + d*x))^3) + (3*A + im*B)/(8*a*d*(a + im*a*tan(c + d*x))^2) + (7*A + im*B)/(8*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 6, -(((25*A + 7*im*B)*x)/(8*a^3)) - ((25*A + 7*im*B)*cot(c + d*x))/(8*a^3*d) - ((3*im*A - B)*log(sin(c + d*x)))/(a^3*d) + ((A + im*B)*cot(c + d*x))/(6*d*(a + im*a*tan(c + d*x))^3) + ((11*A + 5*im*B)*cot(c + d*x))/(24*a*d*(a + im*a*tan(c + d*x))^2) + ((3*A + im*B)*cot(c + d*x))/(2*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 7, (5*(11*im*A - 5*B)*x)/(8*a^3) + (5*(11*im*A - 5*B)*cot(c + d*x))/(8*a^3*d) - ((7*A + 3*im*B)*cot(c + d*x)^2)/(2*a^3*d) - ((7*A + 3*im*B)*log(sin(c + d*x)))/(a^3*d) + ((A + im*B)*cot(c + d*x)^2)/(6*d*(a + im*a*tan(c + d*x))^3) + ((13*A + 7*im*B)*cot(c + d*x)^2)/(24*a*d*(a + im*a*tan(c + d*x))^2) + (5*(11*A + 5*im*B)*cot(c + d*x)^2)/(24*d*(a^3 + im*a^3*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^4*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^4, x, 8, ((A + 15*im*B)*x)/(16*a^4) - (B*log(cos(c + d*x)))/(a^4*d) - (im*A - 15*B)/(16*a^4*d*(1 + im*tan(c + d*x))) - ((im*A - 7*B)*tan(c + d*x)^2)/(16*a^4*d*(1 + im*tan(c + d*x))^2) + ((im*A - B)*tan(c + d*x)^4)/(8*d*(a + im*a*tan(c + d*x))^4) + ((A + 3*im*B)*tan(c + d*x)^3)/(12*a*d*(a + im*a*tan(c + d*x))^3)]
    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^4, x, 5, ((im*A + B)*x)/(16*a^4) - (A - 13*im*B)/(48*a^4*d*(1 + im*tan(c + d*x))^2) + (5*A - 29*im*B)/(48*a^4*d*(1 + im*tan(c + d*x))) + ((im*A - B)*tan(c + d*x)^3)/(8*d*(a + im*a*tan(c + d*x))^4) + ((A + 5*im*B)*tan(c + d*x)^2)/(24*a*d*(a + im*a*tan(c + d*x))^3)]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^4, x, 5, -(((A - im*B)*x)/(16*a^4)) + (im*A + 5*B)/(16*a^4*d*(1 + im*tan(c + d*x))^2) - (im*A + B)/(16*a^4*d*(1 + im*tan(c + d*x))) + ((im*A - B)*tan(c + d*x)^2)/(8*d*(a + im*a*tan(c + d*x))^4) - B/(6*a*d*(a + im*a*tan(c + d*x))^3)]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^4, x, 5, -(((im*A + B)*x)/(16*a^4)) - (A + im*B)/(8*d*(a + im*a*tan(c + d*x))^4) + (A + 3*im*B)/(12*a*d*(a + im*a*tan(c + d*x))^3) + (A - im*B)/(16*d*(a^2 + im*a^2*tan(c + d*x))^2) + (A - im*B)/(16*d*(a^4 + im*a^4*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + im*a*tan(c + d*x))^4, x, 5, ((A - im*B)*x)/(16*a^4) + (im*A - B)/(8*d*(a + im*a*tan(c + d*x))^4) + (im*A + B)/(12*a*d*(a + im*a*tan(c + d*x))^3) + (im*A + B)/(16*d*(a^2 + im*a^2*tan(c + d*x))^2) + (im*A + B)/(16*d*(a^4 + im*a^4*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^4, x, 6, -(((15*im*A - B)*x)/(16*a^4)) + (A*log(sin(c + d*x)))/(a^4*d) + (7*A + im*B)/(16*a^4*d*(1 + im*tan(c + d*x))^2) + (15*A + im*B)/(16*a^4*d*(1 + im*tan(c + d*x))) + (A + im*B)/(8*d*(a + im*a*tan(c + d*x))^4) + (3*A + im*B)/(12*a*d*(a + im*a*tan(c + d*x))^3)]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^4, x, 7, -((5*(13*A + 3*im*B)*x)/(16*a^4)) - (5*(13*A + 3*im*B)*cot(c + d*x))/(16*a^4*d) - ((4*im*A - B)*log(sin(c + d*x)))/(a^4*d) + ((31*A + 9*im*B)*cot(c + d*x))/(48*a^4*d*(1 + im*tan(c + d*x))^2) + ((4*A + im*B)*cot(c + d*x))/(2*a^4*d*(1 + im*tan(c + d*x))) + ((A + im*B)*cot(c + d*x))/(8*d*(a + im*a*tan(c + d*x))^4) + ((7*A + 3*im*B)*cot(c + d*x))/(24*a*d*(a + im*a*tan(c + d*x))^3)]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^4, x, 8, (5*(35*im*A - 13*B)*x)/(16*a^4) + (5*(35*im*A - 13*B)*cot(c + d*x))/(16*a^4*d) - ((11*A + 4*im*B)*cot(c + d*x)^2)/(2*a^4*d) - ((11*A + 4*im*B)*log(sin(c + d*x)))/(a^4*d) + ((43*A + 17*im*B)*cot(c + d*x)^2)/(48*a^4*d*(1 + im*tan(c + d*x))^2) + (5*(35*A + 13*im*B)*cot(c + d*x)^2)/(48*a^4*d*(1 + im*tan(c + d*x))) + ((A + im*B)*cot(c + d*x)^2)/(8*d*(a + im*a*tan(c + d*x))^4) + ((2*A + im*B)*cot(c + d*x)^2)/(6*a*d*(a + im*a*tan(c + d*x))^3)]

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

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

    @test_int [tan(c + d*x)^3*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 6, (sqrt(2)*sqrt(a)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - (8*(7*A - im*B)*sqrt(a + im*a*tan(c + d*x)))/(35*d) + (2*(7*A - im*B)*tan(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(35*d) + (2*B*tan(c + d*x)^3*sqrt(a + im*a*tan(c + d*x)))/(7*d) - (2*(7*A - (31*im)*B)*(a + im*a*tan(c + d*x))^(3/2))/(105*a*d)]
    @test_int [tan(c + d*x)^2*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 5, (sqrt(2)*sqrt(a)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - (8*B*sqrt(a + im*a*tan(c + d*x)))/(5*d) + (2*B*tan(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(5*d) - (2*((5*im)*A + B)*(a + im*a*tan(c + d*x))^(3/2))/(15*a*d)]
    @test_int [tan(c + d*x)*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 4, -((sqrt(2)*sqrt(a)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d) + (2*A*sqrt(a + im*a*tan(c + d*x)))/d - (((2*im)/3)*B*(a + im*a*tan(c + d*x))^(3/2))/(a*d)]
    @test_int [sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 3, -((sqrt(2)*sqrt(a)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d) + (2*B*sqrt(a + im*a*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 6, (-2*sqrt(a)*A*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/d + (sqrt(2)*sqrt(a)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d]
    @test_int [cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 7, -((sqrt(a)*(im*A + 2*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/d) + (sqrt(2)*sqrt(a)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - (A*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 8, (sqrt(a)*(7*A - (4*im)*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(4*d) - (sqrt(2)*sqrt(a)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - ((im*A + 4*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(4*d) - (A*cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(2*d)]
    @test_int [cot(c + d*x)^4*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 9, (sqrt(a)*((9*im)*A + 14*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(8*d) - (sqrt(2)*sqrt(a)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + ((7*A - (2*im)*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(8*d) - ((im*A + 6*B)*cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(12*d) - (A*cot(c + d*x)^3*sqrt(a + im*a*tan(c + d*x)))/(3*d)]

    @test_int [tan(c + d*x)^2*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 6, (2*sqrt(2)*a^(3/2)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - (8*a*((7*im)*A + 8*B)*sqrt(a + im*a*tan(c + d*x)))/(35*d) + (2*a*((7*im)*A + 8*B)*tan(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(35*d) + (((2*im)/7)*a*B*tan(c + d*x)^3*sqrt(a + im*a*tan(c + d*x)))/d - (4*((21*im)*A + 19*B)*(a + im*a*tan(c + d*x))^(3/2))/(105*d)]
    @test_int [tan(c + d*x)*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 5, (-2*sqrt(2)*a^(3/2)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + (2*a*(A - im*B)*sqrt(a + im*a*tan(c + d*x)))/d + (2*A*(a + im*a*tan(c + d*x))^(3/2))/(3*d) - (((2*im)/5)*B*(a + im*a*tan(c + d*x))^(5/2))/(a*d)]
    @test_int [(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 4, (-2*sqrt(2)*a^(3/2)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + (2*a*(im*A + B)*sqrt(a + im*a*tan(c + d*x)))/d + (2*B*(a + im*a*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 7, (-2*a^(3/2)*A*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/d + (2*sqrt(2)*a^(3/2)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + ((2*im)*a*B*sqrt(a + im*a*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^2*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 7, -((a^(3/2)*((3*im)*A + 2*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/d) + (2*sqrt(2)*a^(3/2)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - (a*A*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 8, (a^(3/2)*(11*A - (12*im)*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(4*d) - (2*sqrt(2)*a^(3/2)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - (a*((5*im)*A + 4*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(4*d) - (a*A*cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(2*d)]
    @test_int [cot(c + d*x)^4*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 9, (a^(3/2)*((23*im)*A + 22*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(8*d) - (2*sqrt(2)*a^(3/2)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + (a*(9*A - (10*im)*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(8*d) - (a*((7*im)*A + 6*B)*cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(12*d) - (a*A*cot(c + d*x)^3*sqrt(a + im*a*tan(c + d*x)))/(3*d)]

    @test_int [tan(c + d*x)^2*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 7, (4*sqrt(2)*a^(5/2)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - (8*a^2*((45*im)*A + 46*B)*sqrt(a + im*a*tan(c + d*x)))/(105*d) + (2*a^2*((45*im)*A + 46*B)*tan(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(105*d) - (2*a^2*(3*A - (4*im)*B)*tan(c + d*x)^3*sqrt(a + im*a*tan(c + d*x)))/(21*d) - (8*a*((60*im)*A + 59*B)*(a + im*a*tan(c + d*x))^(3/2))/(315*d) + (((2*im)/9)*a*B*tan(c + d*x)^3*(a + im*a*tan(c + d*x))^(3/2))/d]
    @test_int [tan(c + d*x)*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 6, (-4*sqrt(2)*a^(5/2)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + (4*a^2*(A - im*B)*sqrt(a + im*a*tan(c + d*x)))/d + (2*a*(A - im*B)*(a + im*a*tan(c + d*x))^(3/2))/(3*d) + (2*A*(a + im*a*tan(c + d*x))^(5/2))/(5*d) - (((2*im)/7)*B*(a + im*a*tan(c + d*x))^(7/2))/(a*d)]
    @test_int [(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 5, (-4*sqrt(2)*a^(5/2)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + (4*a^2*(im*A + B)*sqrt(a + im*a*tan(c + d*x)))/d + (2*a*(im*A + B)*(a + im*a*tan(c + d*x))^(3/2))/(3*d) + (2*B*(a + im*a*tan(c + d*x))^(5/2))/(5*d)]
    @test_int [cot(c + d*x)*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 8, (-2*a^(5/2)*A*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/d + (4*sqrt(2)*a^(5/2)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - (2*a^2*(A - (2*im)*B)*sqrt(a + im*a*tan(c + d*x)))/d + (((2*im)/3)*a*B*(a + im*a*tan(c + d*x))^(3/2))/d]
    @test_int [cot(c + d*x)^2*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 8, -((a^(5/2)*(5*im*A + 2*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/d) + (4*sqrt(2)*a^(5/2)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + (a^2*(im*A - 2*B)*sqrt(a + im*a*tan(c + d*x)))/d - (a*A*cot(c + d*x)*(a + im*a*tan(c + d*x))^(3/2))/d]
    @test_int [cot(c + d*x)^3*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 8, (a^(5/2)*(23*A - (20*im)*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(4*d) - (4*sqrt(2)*a^(5/2)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d - (a^2*((7*im)*A + 4*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(4*d) - (a*A*cot(c + d*x)^2*(a + im*a*tan(c + d*x))^(3/2))/(2*d)]
    @test_int [cot(c + d*x)^4*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 9, (a^(5/2)*((45*im)*A + 46*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(8*d) - (4*sqrt(2)*a^(5/2)*(im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + (a^2*(19*A - (18*im)*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(8*d) - (a^2*((3*im)*A + 2*B)*cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(4*d) - (a*A*cot(c + d*x)^3*(a + im*a*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)^5*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 10, (-3*a^(5/2)*(121*A - (120*im)*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(64*d) + (4*sqrt(2)*a^(5/2)*(A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/d + (a^2*((149*im)*A + 152*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(64*d) + (a^2*(107*A - (104*im)*B)*cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(96*d) - (a^2*((11*im)*A + 8*B)*cot(c + d*x)^3*sqrt(a + im*a*tan(c + d*x)))/(24*d) - (a*A*cot(c + d*x)^4*(a + im*a*tan(c + d*x))^(3/2))/(4*d)]

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

    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)), x, 6, ((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(sqrt(2)*sqrt(a)*d) + ((im*A - B)*tan(c + d*x)^3)/(d*sqrt(a + im*a*tan(c + d*x))) + (4*(5*A + 7*im*B)*sqrt(a + im*a*tan(c + d*x)))/(5*a*d) - ((5*A + 7*im*B)*tan(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(5*a*d) - ((25*A + 23*im*B)*(a + im*a*tan(c + d*x))^(3/2))/(15*a^2*d)]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)), x, 5, ((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(sqrt(2)*sqrt(a)*d) + ((im*A - B)*tan(c + d*x)^2)/(d*sqrt(a + im*a*tan(c + d*x))) - (4*(im*A - B)*sqrt(a + im*a*tan(c + d*x)))/(a*d) + ((3*im*A - 5*B)*(a + im*a*tan(c + d*x))^(3/2))/(3*a^2*d)]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)), x, 4, -(((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(sqrt(2)*sqrt(a)*d)) - (A + im*B)/(d*sqrt(a + im*a*tan(c + d*x))) - ((2*im)*B*sqrt(a + im*a*tan(c + d*x)))/(a*d)]
    @test_int [(A + B*tan(c + d*x))/sqrt(a + im*a*tan(c + d*x)), x, 3, -(((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(sqrt(2)*sqrt(a)*d)) + (im*A - B)/(d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)), x, 7, (-2*A*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(sqrt(a)*d) + ((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(sqrt(2)*sqrt(a)*d) + (A + im*B)/(d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)), x, 8, ((im*A - 2*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(sqrt(a)*d) + ((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(sqrt(2)*sqrt(a)*d) + ((A + im*B)*cot(c + d*x))/(d*sqrt(a + im*a*tan(c + d*x))) - ((2*A + im*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(a*d)]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)), x, 9, ((11*A + (4*im)*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(4*sqrt(a)*d) - ((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(sqrt(2)*sqrt(a)*d) + ((A + im*B)*cot(c + d*x)^2)/(d*sqrt(a + im*a*tan(c + d*x))) + (((7*im)*A - 8*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(4*a*d) - ((3*A + (2*im)*B)*cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(2*a*d)]

    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 6, ((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(2*sqrt(2)*a^(3/2)*d) + ((im*A - B)*tan(c + d*x)^3)/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + ((3*A + 5*im*B)*tan(c + d*x)^2)/(2*a*d*sqrt(a + im*a*tan(c + d*x))) - (2*(3*A + 5*im*B)*sqrt(a + im*a*tan(c + d*x)))/(a^2*d) + ((11*A + 21*im*B)*(a + im*a*tan(c + d*x))^(3/2))/(6*a^3*d)]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 5, ((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(2*sqrt(2)*a^(3/2)*d) + ((im*A - B)*tan(c + d*x)^2)/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + (5*im*A - 11*B)/(6*a*d*sqrt(a + im*a*tan(c + d*x))) + ((im*A - 7*B)*sqrt(a + im*a*tan(c + d*x)))/(3*a^2*d)]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 4, -(((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(2*sqrt(2)*a^(3/2)*d)) - (A + im*B)/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + (A + 3*im*B)/(2*a*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + im*a*tan(c + d*x))^(3/2), x, 4, -(((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(2*sqrt(2)*a^(3/2)*d)) + (im*A - B)/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + (im*A + B)/(2*a*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 8, (-2*A*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(a^(3/2)*d) + ((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(2*sqrt(2)*a^(3/2)*d) + (A + im*B)/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + (3*A + im*B)/(2*a*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 9, (((3*im)*A - 2*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(a^(3/2)*d) + ((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(2*sqrt(2)*a^(3/2)*d) + ((A + im*B)*cot(c + d*x))/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + ((13*A + (7*im)*B)*cot(c + d*x))/(6*a*d*sqrt(a + im*a*tan(c + d*x))) - ((7*A + (3*im)*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(2*a^2*d)]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 10, ((23*A + (12*im)*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(4*a^(3/2)*d) - ((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(2*sqrt(2)*a^(3/2)*d) + ((A + im*B)*cot(c + d*x)^2)/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + ((17*A + (11*im)*B)*cot(c + d*x)^2)/(6*a*d*sqrt(a + im*a*tan(c + d*x))) + (7*((3*im)*A - 2*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(4*a^2*d) - ((22*A + (13*im)*B)*cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(6*a^2*d)]

    @test_int [(tan(c + d*x)^4*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 7, -(((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(4*sqrt(2)*a^(5/2)*d)) + ((im*A - B)*tan(c + d*x)^4)/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((11*A + 21*im*B)*tan(c + d*x)^3)/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) - ((39*im*A - 89*B)*tan(c + d*x)^2)/(20*a^2*d*sqrt(a + im*a*tan(c + d*x))) + ((39*im*A - 89*B)*sqrt(a + im*a*tan(c + d*x)))/(5*a^3*d) - ((151*im*A - 361*B)*(a + im*a*tan(c + d*x))^(3/2))/(60*a^4*d)]
    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 6, ((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(4*sqrt(2)*a^(5/2)*d) + ((im*A - B)*tan(c + d*x)^3)/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((7*A + 17*im*B)*tan(c + d*x)^2)/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) + (41*A + 151*im*B)/(60*a^2*d*sqrt(a + im*a*tan(c + d*x))) + ((13*A + 83*im*B)*sqrt(a + im*a*tan(c + d*x)))/(30*a^3*d)]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 5, ((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(4*sqrt(2)*a^(5/2)*d) + ((im*A - B)*tan(c + d*x)^2)/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + (3*im*A - 13*B)/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) - (im*A - 31*B)/(20*a^2*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 5, -(((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(4*sqrt(2)*a^(5/2)*d)) - (A + im*B)/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + (A + 3*im*B)/(6*a*d*(a + im*a*tan(c + d*x))^(3/2)) + (A - im*B)/(4*a^2*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + im*a*tan(c + d*x))^(5/2), x, 5, -(((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(4*sqrt(2)*a^(5/2)*d)) + (im*A - B)/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + (im*A + B)/(6*a*d*(a + im*a*tan(c + d*x))^(3/2)) + (im*A + B)/(4*a^2*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 9, (-2*A*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(a^(5/2)*d) + ((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(4*sqrt(2)*a^(5/2)*d) + (A + im*B)/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + (3*A + im*B)/(6*a*d*(a + im*a*tan(c + d*x))^(3/2)) + (7*A + im*B)/(4*a^2*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 10, (((5*im)*A - 2*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(a^(5/2)*d) + ((im*A + B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(4*sqrt(2)*a^(5/2)*d) + ((A + im*B)*cot(c + d*x))/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((19*A + (9*im)*B)*cot(c + d*x))/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) + ((41*A + (15*im)*B)*cot(c + d*x))/(12*a^2*d*sqrt(a + im*a*tan(c + d*x))) - (7*(3*A + im*B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(4*a^3*d)]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 11, ((43*A + (20*im)*B)*atanh(sqrt(a + im*a*tan(c + d*x))/sqrt(a)))/(4*a^(5/2)*d) - ((A - im*B)*atanh(sqrt(a + im*a*tan(c + d*x))/(sqrt(2)*sqrt(a))))/(4*sqrt(2)*a^(5/2)*d) + ((A + im*B)*cot(c + d*x)^2)/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((23*A + (13*im)*B)*cot(c + d*x)^2)/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) + ((337*A + (167*im)*B)*cot(c + d*x)^2)/(60*a^2*d*sqrt(a + im*a*tan(c + d*x))) + (21*((2*im)*A - B)*cot(c + d*x)*sqrt(a + im*a*tan(c + d*x)))/(4*a^3*d) - ((85*A + (41*im)*B)*cot(c + d*x)^2*sqrt(a + im*a*tan(c + d*x)))/(12*a^3*d)]

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

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

    @test_int [tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 6, -((2*(-1)^(1/4)*a*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) - (2*a*(im*A + B)*sqrt(tan(c + d*x)))/d + (2*a*(A - im*B)*tan(c + d*x)^(3/2))/(3*d) + (2*a*(im*A + B)*tan(c + d*x)^(5/2))/(5*d) + (2*im*a*B*tan(c + d*x)^(7/2))/(7*d)]
    @test_int [tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 5, (2*(-1)^(1/4)*a*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d + (2*a*(A - im*B)*sqrt(tan(c + d*x)))/d + (2*a*(im*A + B)*tan(c + d*x)^(3/2))/(3*d) + (2*im*a*B*tan(c + d*x)^(5/2))/(5*d)]
    @test_int [sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 4, (2*(-1)^(1/4)*a*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d + (2*a*(im*A + B)*sqrt(tan(c + d*x)))/d + (2*im*a*B*tan(c + d*x)^(3/2))/(3*d)]
    @test_int [((a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 3, -((2*(-1)^(1/4)*a*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) + (2*im*a*B*sqrt(tan(c + d*x)))/d]
    @test_int [((a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 3, -((2*(-1)^(1/4)*a*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) - (2*a*A)/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 4, (2*(-1)^(1/4)*a*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d - (2*a*A)/(3*d*tan(c + d*x)^(3/2)) - (2*a*(im*A + B))/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 5, (2*(-1)^(1/4)*a*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d - (2*a*A)/(5*d*tan(c + d*x)^(5/2)) - (2*a*(im*A + B))/(3*d*tan(c + d*x)^(3/2)) + (2*a*(A - im*B))/(d*sqrt(tan(c + d*x)))]

    @test_int [tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 7, -((4*(-1)^(1/4)*a^2*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) - (4*a^2*(im*A + B)*sqrt(tan(c + d*x)))/d + (4*a^2*(A - im*B)*tan(c + d*x)^(3/2))/(3*d) + (4*a^2*(im*A + B)*tan(c + d*x)^(5/2))/(5*d) - (2*a^2*(9*A - 11*im*B)*tan(c + d*x)^(7/2))/(63*d) + (2*im*B*tan(c + d*x)^(7/2)*(a^2 + im*a^2*tan(c + d*x)))/(9*d)]
    @test_int [tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 6, (4*(-1)^(1/4)*a^2*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d + (4*a^2*(A - im*B)*sqrt(tan(c + d*x)))/d + (4*a^2*(im*A + B)*tan(c + d*x)^(3/2))/(3*d) - (2*a^2*(7*A - 9*im*B)*tan(c + d*x)^(5/2))/(35*d) + (2*im*B*tan(c + d*x)^(5/2)*(a^2 + im*a^2*tan(c + d*x)))/(7*d)]
    @test_int [sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, (4*(-1)^(1/4)*a^2*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d + (4*a^2*(im*A + B)*sqrt(tan(c + d*x)))/d - (2*a^2*(5*A - 7*im*B)*tan(c + d*x)^(3/2))/(15*d) + (2*im*B*tan(c + d*x)^(3/2)*(a^2 + im*a^2*tan(c + d*x)))/(5*d)]
    @test_int [((a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 4, -((4*(-1)^(1/4)*a^2*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) - (2*a^2*(3*A - 5*im*B)*sqrt(tan(c + d*x)))/(3*d) + (2*im*B*sqrt(tan(c + d*x))*(a^2 + im*a^2*tan(c + d*x)))/(3*d)]
    @test_int [((a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 4, -((4*(-1)^(1/4)*a^2*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) + (2*a^2*(im*A - B)*sqrt(tan(c + d*x)))/d - (2*A*(a^2 + im*a^2*tan(c + d*x)))/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 4, (4*(-1)^(1/4)*a^2*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d - (2*a^2*(5*im*A + 3*B))/(3*d*sqrt(tan(c + d*x))) - (2*A*(a^2 + im*a^2*tan(c + d*x)))/(3*d*tan(c + d*x)^(3/2))]
    @test_int [((a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 5, (4*(-1)^(1/4)*a^2*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d - (2*a^2*(7*im*A + 5*B))/(15*d*tan(c + d*x)^(3/2)) + (4*a^2*(A - im*B))/(d*sqrt(tan(c + d*x))) - (2*A*(a^2 + im*a^2*tan(c + d*x)))/(5*d*tan(c + d*x)^(5/2))]
    @test_int [((a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)))/tan(c + d*x)^(9/2), x, 6, -((4*(-1)^(1/4)*a^2*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) - (2*a^2*(9*im*A + 7*B))/(35*d*tan(c + d*x)^(5/2)) + (4*a^2*(A - im*B))/(3*d*tan(c + d*x)^(3/2)) + (4*a^2*(im*A + B))/(d*sqrt(tan(c + d*x))) - (2*A*(a^2 + im*a^2*tan(c + d*x)))/(7*d*tan(c + d*x)^(7/2))]

    @test_int [tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 7, (8*(-1)^(1/4)*a^3*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d + (8*a^3*(A - im*B)*sqrt(tan(c + d*x)))/d + (8*a^3*(im*A + B)*tan(c + d*x)^(3/2))/(3*d) - (16*a^3*(18*A - 19*im*B)*tan(c + d*x)^(5/2))/(315*d) + (2*im*a*B*tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^2)/(9*d) - (2*(9*A - 13*im*B)*tan(c + d*x)^(5/2)*(a^3 + im*a^3*tan(c + d*x)))/(63*d)]
    @test_int [sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, (8*(-1)^(1/4)*a^3*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d + (8*a^3*(im*A + B)*sqrt(tan(c + d*x)))/d - (8*a^3*(21*A - 23*im*B)*tan(c + d*x)^(3/2))/(105*d) + (2*im*a*B*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^2)/(7*d) - (2*(7*A - 11*im*B)*tan(c + d*x)^(3/2)*(a^3 + im*a^3*tan(c + d*x)))/(35*d)]
    @test_int [((a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 5, -((8*(-1)^(1/4)*a^3*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) - (16*a^3*(5*A - 6*im*B)*sqrt(tan(c + d*x)))/(15*d) + (2*im*a*B*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^2)/(5*d) - (2*(5*A - 9*im*B)*sqrt(tan(c + d*x))*(a^3 + im*a^3*tan(c + d*x)))/(15*d)]
    @test_int [((a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 5, -((8*(-1)^(1/4)*a^3*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) - (16*a^3*B*sqrt(tan(c + d*x)))/(3*d) - (2*a*A*(a + im*a*tan(c + d*x))^2)/(d*sqrt(tan(c + d*x))) + (2*(3*im*A - B)*sqrt(tan(c + d*x))*(a^3 + im*a^3*tan(c + d*x)))/(3*d)]
    @test_int [((a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 5, (8*(-1)^(1/4)*a^3*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d - (16*a^3*A*sqrt(tan(c + d*x)))/(3*d) - (2*a*A*(a + im*a*tan(c + d*x))^2)/(3*d*tan(c + d*x)^(3/2)) - (2*(7*im*A + 3*B)*(a^3 + im*a^3*tan(c + d*x)))/(3*d*sqrt(tan(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 5, (8*(-1)^(1/4)*a^3*(im*A + B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d + (16*a^3*(6*A - 5*im*B))/(15*d*sqrt(tan(c + d*x))) - (2*a*A*(a + im*a*tan(c + d*x))^2)/(5*d*tan(c + d*x)^(5/2)) - (2*(9*im*A + 5*B)*(a^3 + im*a^3*tan(c + d*x)))/(15*d*tan(c + d*x)^(3/2))]
    @test_int [((a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)))/tan(c + d*x)^(9/2), x, 6, -((8*(-1)^(1/4)*a^3*(A - im*B)*atan((-1)^(3/4)*sqrt(tan(c + d*x))))/d) + (8*a^3*(23*A - 21*im*B))/(105*d*tan(c + d*x)^(3/2)) + (8*a^3*(im*A + B))/(d*sqrt(tan(c + d*x))) - (2*a*A*(a + im*a*tan(c + d*x))^2)/(7*d*tan(c + d*x)^(7/2)) - (2*(11*im*A + 7*B)*(a^3 + im*a^3*tan(c + d*x)))/(35*d*tan(c + d*x)^(5/2))]

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

    @test_int [(tan(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 13, -(((1/4 + im/4)*((4 + im)*A + (1 + 6*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a*d)) + ((1/4 + im/4)*((4 + im)*A + (1 + 6*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a*d) - ((1/8 + im/8)*((1 + 4*im)*A - (6 + im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a*d) - (((3 - 5*im)*A + (5 + 7*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(8*sqrt(2)*a*d) - (5*(im*A - B)*sqrt(tan(c + d*x)))/(2*a*d) - ((3*A + 7*im*B)*tan(c + d*x)^(3/2))/(6*a*d) + ((im*A - B)*tan(c + d*x)^(5/2))/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 12, -((((1 - 3*im)*A + (3 + 5*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(4*sqrt(2)*a*d)) - ((1/4 + im/4)*((1 + 2*im)*A - (4 + im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a*d) - ((1/8 + im/8)*((2 + im)*A + (1 + 4*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a*d) + ((1/8 + im/8)*((2 + im)*A + (1 + 4*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a*d) - ((A + 5*im*B)*sqrt(tan(c + d*x)))/(2*a*d) + ((im*A - B)*tan(c + d*x)^(3/2))/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 11, -(((1/4 - im/4)*(A + (2 - im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a*d)) + ((1/4 - im/4)*(A + (2 - im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a*d) + ((1/8 + im/8)*(A - (2 + im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a*d) - ((1/8 + im/8)*(A - (2 + im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a*d) + ((im*A - B)*sqrt(tan(c + d*x)))/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))), x, 11, -(((1/4 - im/4)*((2 + im)*A + B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a*d)) + ((1/4 - im/4)*((2 + im)*A + B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a*d) - (((3 + im)*A - (1 + im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(8*sqrt(2)*a*d) + (((3 + im)*A - (1 + im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(8*sqrt(2)*a*d) + ((A + im*B)*sqrt(tan(c + d*x)))/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))), x, 12, (((5 + 3*im)*A - (3 - im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(4*sqrt(2)*a*d) + (((-5 - 3*im)*A + (3 - im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(4*sqrt(2)*a*d) - ((1/8 - im/8)*((4 + im)*A + (1 + 2*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a*d) + (((5 - 3*im)*A + (3 + im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(8*sqrt(2)*a*d) - (5*A + im*B)/(2*a*d*sqrt(tan(c + d*x))) + (A + im*B)/(2*d*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))), x, 13, (((7 - 5*im)*A + (5 + 3*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(4*sqrt(2)*a*d) - ((1/4 - im/4)*((6 + im)*A + (1 + 4*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a*d) + (((7 + 5*im)*A - (5 - 3*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(8*sqrt(2)*a*d) + (((-7 - 5*im)*A + (5 - 3*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(8*sqrt(2)*a*d) - (7*A + 3*im*B)/(6*a*d*tan(c + d*x)^(3/2)) + (5*(im*A - B))/(2*a*d*sqrt(tan(c + d*x))) + (A + im*B)/(2*d*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 13, (((9 + 5*im)*A - (25 - 21*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^2*d) - (((9 + 5*im)*A - (25 - 21*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^2*d) - ((1/32 - im/32)*((7 + 2*im)*A + (2 + 23*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^2*d) + ((1/32 - im/32)*((7 + 2*im)*A + (2 + 23*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^2*d) + (5*(im*A - 5*B)*sqrt(tan(c + d*x)))/(8*a^2*d) + ((3*A + 7*im*B)*tan(c + d*x)^(3/2))/(8*a^2*d*(1 + im*tan(c + d*x))) + ((im*A - B)*tan(c + d*x)^(5/2))/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 12, (((1 + 3*im)*A + (9 + 5*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^2*d) - (((1 + 3*im)*A + (9 + 5*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^2*d) + (((1 - 3*im)*A - (9 - 5*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^2*d) - (((1 - 3*im)*A - (9 - 5*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^2*d) + ((A + 5*im*B)*sqrt(tan(c + d*x)))/(8*a^2*d*(1 + im*tan(c + d*x))) + ((im*A - B)*tan(c + d*x)^(3/2))/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 12, (((-1 + 3*im)*A + (1 + 3*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^2*d) - (((-1 + 3*im)*A + (1 + 3*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^2*d) + (((1 + 3*im)*A + (1 - 3*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^2*d) - (((1 + 3*im)*A + (1 - 3*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^2*d) + ((im*A + 3*B)*sqrt(tan(c + d*x)))/(8*a^2*d*(1 + im*tan(c + d*x))) + ((im*A - B)*sqrt(tan(c + d*x)))/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^2), x, 12, ((1/16 + im/16)*((-2 + 7*im)*A + (1 + 2*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^2*d) + (((9 - 5*im)*A + (1 - 3*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^2*d) + ((1/32 + im/32)*((-7 + 2*im)*A + (2 + im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^2*d) + (((9 + 5*im)*A - (1 + 3*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^2*d) + ((5*A + im*B)*sqrt(tan(c + d*x)))/(8*a^2*d*(1 + im*tan(c + d*x))) + ((A + im*B)*sqrt(tan(c + d*x)))/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^2), x, 13, (((25 + 21*im)*A - (9 - 5*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^2*d) - ((1/16 - im/16)*((2 + 23*im)*A - (7 + 2*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^2*d) - ((1/32 - im/32)*((23 + 2*im)*A + (2 + 7*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^2*d) + ((1/32 - im/32)*((23 + 2*im)*A + (2 + 7*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^2*d) - (5*(5*A + im*B))/(8*a^2*d*sqrt(tan(c + d*x))) + (7*A + 3*im*B)/(8*a^2*d*(1 + im*tan(c + d*x))*sqrt(tan(c + d*x))) + (A + im*B)/(4*d*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^2)]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^2), x, 14, ((1/16 - im/16)*((47 + 2*im)*A + (2 + 23*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^2*d) - ((1/16 - im/16)*((47 + 2*im)*A + (2 + 23*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^2*d) + (((49 + 45*im)*A - (25 - 21*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^2*d) - ((1/32 - im/32)*((2 + 47*im)*A - (23 + 2*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^2*d) - (7*(7*A + 3*im*B))/(24*a^2*d*tan(c + d*x)^(3/2)) + (9*A + 5*im*B)/(8*a^2*d*(1 + im*tan(c + d*x))*tan(c + d*x)^(3/2)) + (5*(9*im*A - 5*B))/(8*a^2*d*sqrt(tan(c + d*x))) + (A + im*B)/(4*d*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^2)]

    @test_int [(tan(c + d*x)^(9/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 15, ((1/16 + im/16)*((29 + im)*A + (1 + 76*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^3*d) - ((1/16 + im/16)*((29 + im)*A + (1 + 76*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^3*d) - (((28 - 30*im)*A + (75 + 77*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) - ((1/32 + im/32)*((1 + 29*im)*A - (76 + im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^3*d) + (15*(2*im*A - 5*B)*sqrt(tan(c + d*x)))/(8*a^3*d) + (7*(4*A + 11*im*B)*tan(c + d*x)^(3/2))/(24*a^3*d) + ((im*A - B)*tan(c + d*x)^(9/2))/(6*d*(a + im*a*tan(c + d*x))^3) + ((A + 2*im*B)*tan(c + d*x)^(7/2))/(4*a*d*(a + im*a*tan(c + d*x))^2) - (3*(2*im*A - 5*B)*tan(c + d*x)^(5/2))/(8*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^(7/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 14, -(((1/16 + im/16)*((1 + 6*im)*A - (29 + im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^3*d)) - (((5 - 7*im)*A + (28 + 30*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^3*d) + ((1/32 + im/32)*((6 + im)*A + (1 + 29*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^3*d) - ((1/32 + im/32)*((6 + im)*A + (1 + 29*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^3*d) + (5*(A + 6*im*B)*sqrt(tan(c + d*x)))/(8*a^3*d) + ((im*A - B)*tan(c + d*x)^(7/2))/(6*d*(a + im*a*tan(c + d*x))^3) + ((2*A + 5*im*B)*tan(c + d*x)^(5/2))/(12*a*d*(a + im*a*tan(c + d*x))^2) - (7*(im*A - 4*B)*tan(c + d*x)^(3/2))/(24*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 13, ((2*A + (5 - 7*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^3*d) - ((2*A + (5 - 7*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^3*d) - ((2*A - (5 + 7*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) + ((2*A - (5 + 7*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) + ((im*A - B)*tan(c + d*x)^(5/2))/(6*d*(a + im*a*tan(c + d*x))^3) + ((A + 4*im*B)*tan(c + d*x)^(3/2))/(12*a*d*(a + im*a*tan(c + d*x))^2) + (5*B*sqrt(tan(c + d*x)))/(8*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 13, (((1 + im)*A + 2*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^3*d) - (((1 + im)*A + 2*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^3*d) - (((-1 + im)*A + 2*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) + (((-1 + im)*A + 2*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) + ((im*A - B)*tan(c + d*x)^(3/2))/(6*d*(a + im*a*tan(c + d*x))^3) + (im*B*sqrt(tan(c + d*x)))/(4*a*d*(a + im*a*tan(c + d*x))^2) + ((A - 2*im*B)*sqrt(tan(c + d*x)))/(8*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 13, ((1/16 + im/16)*((1 + im)*A + B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^3*d) - ((1/16 + im/16)*((1 + im)*A + B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^3*d) + ((2*im*A + (1 - im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) - ((2*im*A + (1 - im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) + ((im*A - B)*sqrt(tan(c + d*x)))/(6*d*(a + im*a*tan(c + d*x))^3) + ((im*A + 2*B)*sqrt(tan(c + d*x)))/(12*a*d*(a + im*a*tan(c + d*x))^2) + (B*sqrt(tan(c + d*x)))/(8*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^3), x, 13, -((((7 - 5*im)*A - 2*im*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^3*d)) + (((7 - 5*im)*A - 2*im*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^3*d) - (((7 + 5*im)*A - 2*im*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) + (((7 + 5*im)*A - 2*im*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) + ((A + im*B)*sqrt(tan(c + d*x)))/(6*d*(a + im*a*tan(c + d*x))^3) + ((4*A + im*B)*sqrt(tan(c + d*x)))/(12*a*d*(a + im*a*tan(c + d*x))^2) + (5*A*sqrt(tan(c + d*x)))/(8*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^3), x, 14, (((30 + 28*im)*A - (7 - 5*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(16*sqrt(2)*a^3*d) - ((1/16 - im/16)*((1 + 29*im)*A - (6 + im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^3*d) - ((1/32 - im/32)*((29 + im)*A + (1 + 6*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^3*d) + ((1/32 - im/32)*((29 + im)*A + (1 + 6*im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^3*d) - (5*(6*A + im*B))/(8*a^3*d*sqrt(tan(c + d*x))) + (A + im*B)/(6*d*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^3) + (5*A + 2*im*B)/(12*a*d*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^2) + (7*(4*A + im*B))/(24*d*sqrt(tan(c + d*x))*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^3), x, 15, ((1/16 - im/16)*((76 + im)*A + (1 + 29*im)*B)*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^3*d) - ((1/16 - im/16)*((76 + im)*A + (1 + 29*im)*B)*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*a^3*d) + (((77 + 75*im)*A - (30 - 28*im)*B)*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(32*sqrt(2)*a^3*d) - ((1/32 - im/32)*((1 + 76*im)*A - (29 + im)*B)*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(sqrt(2)*a^3*d) - (7*(11*A + 4*im*B))/(24*a^3*d*tan(c + d*x)^(3/2)) + (15*(5*im*A - 2*B))/(8*a^3*d*sqrt(tan(c + d*x))) + (A + im*B)/(6*d*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^3) + (2*A + im*B)/(4*a*d*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^2) + (3*(5*A + 2*im*B))/(8*d*tan(c + d*x)^(3/2)*(a^3 + im*a^3*tan(c + d*x)))]

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

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

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

    @test_int [tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 10, ((-1)^(3/4)*a^(3/2)*(22*im*A + 23*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(8*d) + ((2 + 2*im)*a^(3/2)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + (a*(10*A - 9*im*B)*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(8*d) + (a*(6*im*A + 7*B)*tan(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(12*d) + (im*a*B*tan(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x)))/(3*d)]
    @test_int [sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 9, -(((-1)^(3/4)*a^(3/2)*(12*A - 11*im*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(4*d)) - ((2 + 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + (a*(4*im*A + 5*B)*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(4*d) + (im*a*B*tan(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(2*d)]
    @test_int [((a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 8, -(((-1)^(3/4)*a^(3/2)*(2*im*A + 3*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d) - ((2 + 2*im)*a^(3/2)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + (im*a*B*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/d]
    @test_int [((a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 8, (2*(-1)^(1/4)*a^(3/2)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + ((2 + 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a*A*sqrt(a + im*a*tan(c + d*x)))/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 5, ((2 + 2*im)*a^(3/2)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a*A*sqrt(a + im*a*tan(c + d*x)))/(3*d*tan(c + d*x)^(3/2)) - (2*a*(4*im*A + 3*B)*sqrt(a + im*a*tan(c + d*x)))/(3*d*sqrt(tan(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 6, ((-2 - 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a*A*sqrt(a + im*a*tan(c + d*x)))/(5*d*tan(c + d*x)^(5/2)) - (2*a*((6*im)*A + 5*B)*sqrt(a + im*a*tan(c + d*x)))/(15*d*tan(c + d*x)^(3/2)) + (4*a*(9*A - (10*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(15*d*sqrt(tan(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(9/2), x, 7, ((2 - 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a*A*sqrt(a + im*a*tan(c + d*x)))/(7*d*tan(c + d*x)^(7/2)) - (2*a*(8*im*A + 7*B)*sqrt(a + im*a*tan(c + d*x)))/(35*d*tan(c + d*x)^(5/2)) + (4*a*(19*A - 21*im*B)*sqrt(a + im*a*tan(c + d*x)))/(105*d*tan(c + d*x)^(3/2)) + (4*a*(67*im*A + 63*B)*sqrt(a + im*a*tan(c + d*x)))/(105*d*sqrt(tan(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(11/2), x, 8, ((2 + 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a*A*sqrt(a + im*a*tan(c + d*x)))/(9*d*tan(c + d*x)^(9/2)) - (2*a*((10*im)*A + 9*B)*sqrt(a + im*a*tan(c + d*x)))/(63*d*tan(c + d*x)^(7/2)) + (4*a*(11*A - (12*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(105*d*tan(c + d*x)^(5/2)) + (4*a*((61*im)*A + 57*B)*sqrt(a + im*a*tan(c + d*x)))/(315*d*tan(c + d*x)^(3/2)) - (4*a*(193*A - (201*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(315*d*sqrt(tan(c + d*x)))]

    @test_int [tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 11, (3*(-1)^(3/4)*a^(5/2)*(120*im*A + 121*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(64*d) + ((4 + 4*im)*a^(5/2)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + (a^2*(152*A - 149*im*B)*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(64*d) + (a^2*(104*im*A + 107*B)*tan(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(96*d) - (a^2*(8*A - 11*im*B)*tan(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x)))/(24*d) + (im*a*B*tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^(3/2))/(4*d)]
    @test_int [sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 10, -(((-1)^(3/4)*a^(5/2)*(46*A - 45*im*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(8*d)) - ((4 + 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + (a^2*(18*im*A + 19*B)*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(8*d) - (a^2*(2*A - 3*im*B)*tan(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(4*d) + (im*a*B*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [((a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 9, -(((-1)^(3/4)*a^(5/2)*(20*im*A + 23*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(4*d)) + ((4 - 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (a^2*(4*A - 7*im*B)*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(4*d) + (im*a*B*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^(3/2))/(2*d)]
    @test_int [((a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 9, ((-1)^(3/4)*a^(5/2)*(2*A - 5*im*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + ((4 + 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + (a^2*(2*im*A - B)*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/d - (2*a*A*(a + im*a*tan(c + d*x))^(3/2))/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 9, (2*(-1)^(3/4)*a^(5/2)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + ((4 + 4*im)*a^(5/2)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a^2*(2*im*A + B)*sqrt(a + im*a*tan(c + d*x)))/(d*sqrt(tan(c + d*x))) - (2*a*A*(a + im*a*tan(c + d*x))^(3/2))/(3*d*tan(c + d*x)^(3/2))]
    @test_int [((a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 6, ((-4 - 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a^2*((8*im)*A + 5*B)*sqrt(a + im*a*tan(c + d*x)))/(15*d*tan(c + d*x)^(3/2)) + (2*a^2*(38*A - (35*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(15*d*sqrt(tan(c + d*x))) - (2*a*A*(a + im*a*tan(c + d*x))^(3/2))/(5*d*tan(c + d*x)^(5/2))]
    @test_int [((a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(9/2), x, 7, ((4 - 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a^2*(10*im*A + 7*B)*sqrt(a + im*a*tan(c + d*x)))/(35*d*tan(c + d*x)^(5/2)) + (2*a^2*(80*A - 77*im*B)*sqrt(a + im*a*tan(c + d*x)))/(105*d*tan(c + d*x)^(3/2)) + (4*a^2*(130*im*A + 133*B)*sqrt(a + im*a*tan(c + d*x)))/(105*d*sqrt(tan(c + d*x))) - (2*a*A*(a + im*a*tan(c + d*x))^(3/2))/(7*d*tan(c + d*x)^(7/2))]
    @test_int [((a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(11/2), x, 8, ((4 + 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a^2*((4*im)*A + 3*B)*sqrt(a + im*a*tan(c + d*x)))/(21*d*tan(c + d*x)^(7/2)) + (2*a^2*(46*A - (45*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(105*d*tan(c + d*x)^(5/2)) + (8*a^2*((59*im)*A + 60*B)*sqrt(a + im*a*tan(c + d*x)))/(315*d*tan(c + d*x)^(3/2)) - (8*a^2*(197*A - (195*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(315*d*sqrt(tan(c + d*x))) - (2*a*A*(a + im*a*tan(c + d*x))^(3/2))/(9*d*tan(c + d*x)^(9/2))]
    @test_int [((a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(13/2), x, 9, ((4 + 4*im)*a^(5/2)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a^2*(14*im*A + 11*B)*sqrt(a + im*a*tan(c + d*x)))/(99*d*tan(c + d*x)^(9/2)) + (2*a^2*(212*A - 209*im*B)*sqrt(a + im*a*tan(c + d*x)))/(693*d*tan(c + d*x)^(7/2)) + (4*a^2*(250*im*A + 253*B)*sqrt(a + im*a*tan(c + d*x)))/(1155*d*tan(c + d*x)^(5/2)) - (8*a^2*(655*A - 649*im*B)*sqrt(a + im*a*tan(c + d*x)))/(3465*d*tan(c + d*x)^(3/2)) - (8*a^2*(2155*im*A + 2167*B)*sqrt(a + im*a*tan(c + d*x)))/(3465*d*sqrt(tan(c + d*x))) - (2*a*A*(a + im*a*tan(c + d*x))^(3/2))/(11*d*tan(c + d*x)^(11/2))]

    @test_int [((a + im*a*tan(c + d*x))^(5/2)*((3*b*B)/(2*a) + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 9, (2*(-1)^(3/4)*a^(5/2)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d + ((2 + 2*im)*a^(3/2)*(2*a + 3*im*b)*B*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/d - (2*a*(a + 3*im*b)*B*sqrt(a + im*a*tan(c + d*x)))/(d*sqrt(tan(c + d*x))) - (b*B*(a + im*a*tan(c + d*x))^(3/2))/(d*tan(c + d*x)^(3/2))]

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

    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)), x, 9, ((-1)^(3/4)*(2*im*A - B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(sqrt(a)*d) - ((1/2 - im/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(sqrt(a)*d) + ((im*A - B)*tan(c + d*x)^(3/2))/(d*sqrt(a + im*a*tan(c + d*x))) - ((A + 2*im*B)*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(a*d)]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)), x, 8, -((2*(-1)^(1/4)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(sqrt(a)*d)) - ((1/2 + im/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(sqrt(a)*d) + ((im*A - B)*sqrt(tan(c + d*x)))/(d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x))), x, 4, ((1/2 - im/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(sqrt(a)*d) + ((A + im*B)*sqrt(tan(c + d*x)))/(d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x))), x, 5, ((1/2 + im/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(sqrt(a)*d) + (A + im*B)/(d*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x))) - ((3*A + im*B)*sqrt(a + im*a*tan(c + d*x)))/(a*d*sqrt(tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x))), x, 6, ((1/2 + im/2)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(sqrt(a)*d) + (A + im*B)/(d*tan(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x))) - ((5*A + 3*im*B)*sqrt(a + im*a*tan(c + d*x)))/(3*a*d*tan(c + d*x)^(3/2)) + ((7*im*A - 9*B)*sqrt(a + im*a*tan(c + d*x)))/(3*a*d*sqrt(tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(7/2)*sqrt(a + im*a*tan(c + d*x))), x, 7, ((-1/2 - im/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(sqrt(a)*d) + (A + im*B)/(d*tan(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x))) - ((7*A + (5*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(5*a*d*tan(c + d*x)^(5/2)) + (((23*im)*A - 25*B)*sqrt(a + im*a*tan(c + d*x)))/(15*a*d*tan(c + d*x)^(3/2)) + ((61*A + (35*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(15*a*d*sqrt(tan(c + d*x)))]

    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 9, (2*(-1)^(3/4)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(3/2)*d) - ((1/4 - im/4)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(3/2)*d) + ((im*A - B)*tan(c + d*x)^(3/2))/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + ((A + 3*im*B)*sqrt(tan(c + d*x)))/(2*a*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 5, -(((1/4 + im/4)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(3/2)*d)) + ((im*A - B)*sqrt(tan(c + d*x)))/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + ((im*A + 5*B)*sqrt(tan(c + d*x)))/(6*a*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)), x, 5, ((1/4 - im/4)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(3/2)*d) + ((A + im*B)*sqrt(tan(c + d*x)))/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + ((7*A + im*B)*sqrt(tan(c + d*x)))/(6*a*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2)), x, 6, ((1/4 + im/4)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(3/2)*d) + (A + im*B)/(3*d*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)) + (11*A + (5*im)*B)/(6*a*d*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x))) - ((25*A + (7*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(6*a^2*d*sqrt(tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^(3/2)), x, 7, ((1/4 + im/4)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(3/2)*d) + (A + im*B)/(3*d*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2)) + (5*A + 3*im*B)/(2*a*d*tan(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x))) - ((21*A + 11*im*B)*sqrt(a + im*a*tan(c + d*x)))/(6*a^2*d*tan(c + d*x)^(3/2)) + ((39*im*A - 25*B)*sqrt(a + im*a*tan(c + d*x)))/(6*a^2*d*sqrt(tan(c + d*x)))]

    @test_int [(tan(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 10, (2*(-1)^(1/4)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(5/2)*d) + ((1/8 + im/8)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(5/2)*d) + ((im*A - B)*tan(c + d*x)^(5/2))/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((A + 3*im*B)*tan(c + d*x)^(3/2))/(6*a*d*(a + im*a*tan(c + d*x))^(3/2)) - ((im*A - 7*B)*sqrt(tan(c + d*x)))/(4*a^2*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 6, -(((1/8 - im/8)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(5/2)*d)) + ((im*A - B)*tan(c + d*x)^(3/2))/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((A + 11*im*B)*sqrt(tan(c + d*x)))/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) + ((13*A - 37*im*B)*sqrt(tan(c + d*x)))/(60*a^2*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 6, -(((1/8 + im/8)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(5/2)*d)) + ((im*A - B)*sqrt(tan(c + d*x)))/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((3*im*A + 7*B)*sqrt(tan(c + d*x)))/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) - ((3*im*A - 13*B)*sqrt(tan(c + d*x)))/(60*a^2*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^(5/2)), x, 6, ((1/8 - im/8)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(5/2)*d) + ((A + im*B)*sqrt(tan(c + d*x)))/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((13*A + 3*im*B)*sqrt(tan(c + d*x)))/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) + ((67*A - 3*im*B)*sqrt(tan(c + d*x)))/(60*a^2*d*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(5/2)), x, 7, ((1/8 + im/8)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(5/2)*d) + (A + im*B)/(5*d*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^(5/2)) + (17*A + (7*im)*B)/(30*a*d*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)) + (151*A + (41*im)*B)/(60*a^2*d*sqrt(tan(c + d*x))*sqrt(a + im*a*tan(c + d*x))) - ((317*A + (67*im)*B)*sqrt(a + im*a*tan(c + d*x)))/(60*a^3*d*sqrt(tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^(5/2)), x, 8, ((1/8 + im/8)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x))))/(a^(5/2)*d) + (A + im*B)/(5*d*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(5/2)) + (21*A + 11*im*B)/(30*a*d*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2)) + (89*A + 39*im*B)/(20*a^2*d*tan(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x))) - ((361*A + 151*im*B)*sqrt(a + im*a*tan(c + d*x)))/(60*a^3*d*tan(c + d*x)^(3/2)) + ((707*im*A - 317*B)*sqrt(a + im*a*tan(c + d*x)))/(60*a^3*d*sqrt(tan(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*tan(c+d*x)^m*(A+B*tan(c+d*x))*(a+i*a*tan(c+d*x))^(n/3)=#

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

    @test_int [tan(c + d*x)^0*(a + im*a*tan(c + d*x))^(1/3)*(A + B*tan(c + d*x)), x, 6, -((a^(1/3)*(A - im*B)*x)/(2*2^(2/3))) - (sqrt(3)*a^(1/3)*(im*A + B)*atan((a^(1/3) + 2^(2/3)*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/(2^(2/3)*d) + (a^(1/3)*(im*A + B)*log(cos(c + d*x)))/(2*2^(2/3)*d) + (3*a^(1/3)*(im*A + B)*log(2^(1/3)*a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(2*2^(2/3)*d) + (3*B*(a + im*a*tan(c + d*x))^(1/3))/d]

    @test_int [tan(c + d*x)^2*(a + im*a*tan(c + d*x))^(2/3)*(A + B*tan(c + d*x)), x, 8, (a^(2/3)*(A - im*B)*x)/(2*2^(1/3)) - (sqrt(3)*a^(2/3)*(im*A + B)*atan((a^(1/3) + 2^(2/3)*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/(2^(1/3)*d) - (a^(2/3)*(im*A + B)*log(cos(c + d*x)))/(2*2^(1/3)*d) - (3*a^(2/3)*(im*A + B)*log(2^(1/3)*a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(2*2^(1/3)*d) - (9*B*(a + im*a*tan(c + d*x))^(2/3))/(8*d) + (3*B*tan(c + d*x)^2*(a + im*a*tan(c + d*x))^(2/3))/(8*d) - (3*(4*im*A + B)*(a + im*a*tan(c + d*x))^(5/3))/(20*a*d)]
    @test_int [tan(c + d*x)^1*(a + im*a*tan(c + d*x))^(2/3)*(A + B*tan(c + d*x)), x, 7, (a^(2/3)*(im*A + B)*x)/(2*2^(1/3)) + (sqrt(3)*a^(2/3)*(A - im*B)*atan((a^(1/3) + 2^(2/3)*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/(2^(1/3)*d) + (a^(2/3)*(A - im*B)*log(cos(c + d*x)))/(2*2^(1/3)*d) + (3*a^(2/3)*(A - im*B)*log(2^(1/3)*a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(2*2^(1/3)*d) + (3*A*(a + im*a*tan(c + d*x))^(2/3))/(2*d) - (3*im*B*(a + im*a*tan(c + d*x))^(5/3))/(5*a*d)]
    @test_int [tan(c + d*x)^0*(a + im*a*tan(c + d*x))^(2/3)*(A + B*tan(c + d*x)), x, 6, -((a^(2/3)*(A - im*B)*x)/(2*2^(1/3))) + (sqrt(3)*a^(2/3)*(im*A + B)*atan((a^(1/3) + 2^(2/3)*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/(2^(1/3)*d) + (a^(2/3)*(im*A + B)*log(cos(c + d*x)))/(2*2^(1/3)*d) + (3*a^(2/3)*(im*A + B)*log(2^(1/3)*a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(2*2^(1/3)*d) + (3*B*(a + im*a*tan(c + d*x))^(2/3))/(2*d)]
    @test_int [cot(c + d*x)^1*(a + im*a*tan(c + d*x))^(2/3)*(A + B*tan(c + d*x)), x, 11, -((a^(2/3)*(im*A + B)*x)/(2*2^(1/3))) + (sqrt(3)*a^(2/3)*A*atan((a^(1/3) + 2*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/d - (sqrt(3)*a^(2/3)*(A - im*B)*atan((a^(1/3) + 2^(2/3)*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/(2^(1/3)*d) - (a^(2/3)*(A - im*B)*log(cos(c + d*x)))/(2*2^(1/3)*d) - (a^(2/3)*A*log(tan(c + d*x)))/(2*d) + (3*a^(2/3)*A*log(a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(2*d) - (3*a^(2/3)*(A - im*B)*log(2^(1/3)*a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(2*2^(1/3)*d)]
    @test_int [cot(c + d*x)^2*(a + im*a*tan(c + d*x))^(2/3)*(A + B*tan(c + d*x)), x, 12, (a^(2/3)*(A - im*B)*x)/(2*2^(1/3)) + (a^(2/3)*(2*im*A + 3*B)*atan((a^(1/3) + 2*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/(sqrt(3)*d) - (sqrt(3)*a^(2/3)*(im*A + B)*atan((a^(1/3) + 2^(2/3)*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/(2^(1/3)*d) - (a^(2/3)*(im*A + B)*log(cos(c + d*x)))/(2*2^(1/3)*d) - (a^(2/3)*(2*im*A + 3*B)*log(tan(c + d*x)))/(6*d) + (a^(2/3)*(2*im*A + 3*B)*log(a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(2*d) - (3*a^(2/3)*(im*A + B)*log(2^(1/3)*a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(2*2^(1/3)*d) - (A*cot(c + d*x)*(a + im*a*tan(c + d*x))^(2/3))/d]

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

    @test_int [(A + B*tan(c + d*x))/(a + im*a*tan(c + d*x))^(1/3), x, 6, -(((A - im*B)*x)/(4*2^(1/3)*a^(1/3))) + (sqrt(3)*(im*A + B)*atan((a^(1/3) + 2^(2/3)*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/(2*2^(1/3)*a^(1/3)*d) + ((im*A + B)*log(cos(c + d*x)))/(4*2^(1/3)*a^(1/3)*d) + (3*(im*A + B)*log(2^(1/3)*a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(4*2^(1/3)*a^(1/3)*d) + (3*(im*A - B))/(2*d*(a + im*a*tan(c + d*x))^(1/3))]
    @test_int [(A + B*tan(c + d*x))/(a + im*a*tan(c + d*x))^(2/3), x, 6, -(((A - im*B)*x)/(4*2^(2/3)*a^(2/3))) - (sqrt(3)*(im*A + B)*atan((a^(1/3) + 2^(2/3)*(a + im*a*tan(c + d*x))^(1/3))/(sqrt(3)*a^(1/3))))/(2*2^(2/3)*a^(2/3)*d) + ((im*A + B)*log(cos(c + d*x)))/(4*2^(2/3)*a^(2/3)*d) + (3*(im*A + B)*log(2^(1/3)*a^(1/3) - (a + im*a*tan(c + d*x))^(1/3)))/(4*2^(2/3)*a^(2/3)*d) + (3*(im*A - B))/(4*d*(a + im*a*tan(c + d*x))^(2/3))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*tan(c+d*x)^m*(A+B*tan(c+d*x))*(a+i*a*tan(c+d*x))^n*with*m*symbolic=#

    @test_int [tan(c + d*x)^m*(a + im*a*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 7, If(13>=8, -((2*a^4*(A*(64 + 60*m + 19*m^2 + 2*m^3) - im*B*(67 + 60*m + 19*m^2 + 2*m^3))*tan(c + d*x)^(1 + m))/(d*(1 + m)*(2 + m)*(3 + m)*(4 + m))) + (8*a^4*(A - im*B)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(d*(1 + m)) + (im*a*B*tan(c + d*x)^(1 + m)*(a + im*a*tan(c + d*x))^3)/(d*(4 + m)) - ((A*(4 + m) - im*B*(7 + m))*tan(c + d*x)^(1 + m)*(a^2 + im*a^2*tan(c + d*x))^2)/(d*(3 + m)*(4 + m)) - (2*(A*(4 + m)^2 - im*B*(19 + 8*m + m^2))*tan(c + d*x)^(1 + m)*(a^4 + im*a^4*tan(c + d*x)))/(d*(2 + m)*(3 + m)*(4 + m)), -((2*a^4*(A*(64 + 60*m + 19*m^2 + 2*m^3) - im*B*(67 + 60*m + 19*m^2 + 2*m^3))*tan(c + d*x)^(1 + m))/(d*(3 + m)*(4 + m)*(2 + 3*m + m^2))) + (8*a^4*(A - im*B)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(d*(1 + m)) + (im*a*B*tan(c + d*x)^(1 + m)*(a + im*a*tan(c + d*x))^3)/(d*(4 + m)) - ((A*(4 + m) - im*B*(7 + m))*tan(c + d*x)^(1 + m)*(a^2 + im*a^2*tan(c + d*x))^2)/(d*(3 + m)*(4 + m)) - (2*(A*(4 + m)^2 - im*B*(19 + 8*m + m^2))*tan(c + d*x)^(1 + m)*(a^4 + im*a^4*tan(c + d*x)))/(d*(4 + m)*(6 + 5*m + m^2)))]
    @test_int [tan(c + d*x)^m*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, If(13>=8, -((a^3*(A*(15 + 11*m + 2*m^2) - im*B*(17 + 11*m + 2*m^2))*tan(c + d*x)^(1 + m))/(d*(1 + m)*(2 + m)*(3 + m))) + (4*a^3*(A - im*B)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(d*(1 + m)) + (im*a*B*tan(c + d*x)^(1 + m)*(a + im*a*tan(c + d*x))^2)/(d*(3 + m)) - ((A*(3 + m) - im*B*(5 + m))*tan(c + d*x)^(1 + m)*(a^3 + im*a^3*tan(c + d*x)))/(d*(2 + m)*(3 + m)), -((a^3*(A*(15 + 11*m + 2*m^2) - im*B*(17 + 11*m + 2*m^2))*tan(c + d*x)^(1 + m))/(d*(3 + m)*(2 + 3*m + m^2))) + (4*a^3*(A - im*B)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(d*(1 + m)) + (im*a*B*tan(c + d*x)^(1 + m)*(a + im*a*tan(c + d*x))^2)/(d*(3 + m)) - ((A*(3 + m) - im*B*(5 + m))*tan(c + d*x)^(1 + m)*(a^3 + im*a^3*tan(c + d*x)))/(d*(2 + m)*(3 + m)))]
    @test_int [tan(c + d*x)^m*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, (im*a^2*(B + (im*A + B)*(2 + m))*tan(c + d*x)^(1 + m))/(d*(1 + m)*(2 + m)) + (2*a^2*(A - im*B)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(d*(1 + m)) + (im*B*tan(c + d*x)^(1 + m)*(a^2 + im*a^2*tan(c + d*x)))/(d*(2 + m))]
    @test_int [tan(c + d*x)^m*(a + im*a*tan(c + d*x))^1*(A + B*tan(c + d*x)), x, 3, (im*a*B*tan(c + d*x)^(1 + m))/(d*(1 + m)) + (a*(A - im*B)*HypergeometricFunctions._₂F₁(1, 1 + m, 2 + m, im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(d*(1 + m))]
    @test_int [(tan(c + d*x)^m*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^1, x, 6, ((A*(1 - m) - im*B*(1 + m))*HypergeometricFunctions._₂F₁(1, (1 + m)/2, (3 + m)/2, -tan(c + d*x)^2)*tan(c + d*x)^(1 + m))/(2*a*d*(1 + m)) + ((im*A - B)*m*HypergeometricFunctions._₂F₁(1, (2 + m)/2, (4 + m)/2, -tan(c + d*x)^2)*tan(c + d*x)^(2 + m))/(2*a*d*(2 + m)) + ((A + im*B)*tan(c + d*x)^(1 + m))/(2*d*(a + im*a*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^m*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 7, ((1 - m)*(A*(1 - m) - im*B*(1 + m))*HypergeometricFunctions._₂F₁(1, (1 + m)/2, (3 + m)/2, -tan(c + d*x)^2)*tan(c + d*x)^(1 + m))/(4*a^2*d*(1 + m)) + ((A*(2 - m) - im*B*m)*tan(c + d*x)^(1 + m))/(4*a^2*d*(1 + im*tan(c + d*x))) + (m*(im*A*(2 - m) + B*m)*HypergeometricFunctions._₂F₁(1, (2 + m)/2, (4 + m)/2, -tan(c + d*x)^2)*tan(c + d*x)^(2 + m))/(4*a^2*d*(2 + m)) + ((A + im*B)*tan(c + d*x)^(1 + m))/(4*d*(a + im*a*tan(c + d*x))^2)]
    @test_int [(tan(c + d*x)^m*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 8, -(((1 - m)*(im*B*(3 + m - 2*m^2) - A*(3 - 7*m + 2*m^2))*HypergeometricFunctions._₂F₁(1, (1 + m)/2, (3 + m)/2, -tan(c + d*x)^2)*tan(c + d*x)^(1 + m))/(24*a^3*d*(1 + m))) + ((2 - m)*m*(B + im*A*(5 - 2*m) + 2*B*m)*HypergeometricFunctions._₂F₁(1, (2 + m)/2, (4 + m)/2, -tan(c + d*x)^2)*tan(c + d*x)^(2 + m))/(24*a^3*d*(2 + m)) + ((A + im*B)*tan(c + d*x)^(1 + m))/(6*d*(a + im*a*tan(c + d*x))^3) + ((im*B*(1 - 2*m) + A*(7 - 2*m))*tan(c + d*x)^(1 + m))/(24*a*d*(a + im*a*tan(c + d*x))^2) + ((2 - m)*(A*(5 - 2*m) - im*(B + 2*B*m))*tan(c + d*x)^(1 + m))/(24*d*(a^3 + im*a^3*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^m*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^4, x, 9, -(((3 - 4*m + m^2)*(im*B*(1 - m^2) - A*(1 - 4*m + m^2))*HypergeometricFunctions._₂F₁(1, (1 + m)/2, (3 + m)/2, -tan(c + d*x)^2)*tan(c + d*x)^(1 + m))/(48*a^4*d*(1 + m))) - ((im*B*(1 + 3*m - m^2) - A*(13 - 7*m + m^2))*tan(c + d*x)^(1 + m))/(48*a^4*d*(1 + im*tan(c + d*x))^2) - ((2 - m)*(im*B*(2 + 2*m - m^2) - A*(8 - 6*m + m^2))*tan(c + d*x)^(1 + m))/(48*a^4*d*(1 + im*tan(c + d*x))) + ((2 - m)*m*(B*(2 + 2*m - m^2) + im*A*(8 - 6*m + m^2))*HypergeometricFunctions._₂F₁(1, (2 + m)/2, (4 + m)/2, -tan(c + d*x)^2)*tan(c + d*x)^(2 + m))/(48*a^4*d*(2 + m)) + ((A + im*B)*tan(c + d*x)^(1 + m))/(8*d*(a + im*a*tan(c + d*x))^4) + ((im*B*(1 - m) + A*(5 - m))*tan(c + d*x)^(1 + m))/(24*a*d*(a + im*a*tan(c + d*x))^3)]

    @test_int [tan(c + d*x)^m*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 9, (4*a^3*(A - im*B)*AppellF1(1 + m, 1/2, 1, 2 + m, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(1 + im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(d*(1 + m)*sqrt(a + im*a*tan(c + d*x))) + (2*a^2*(2*B*(19 + 17*m + 4*m^2) + im*A*(35 + 34*m + 8*m^2))*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, 1 + im*tan(c + d*x))*tan(c + d*x)^m*sqrt(a + im*a*tan(c + d*x)))/(((-im)*tan(c + d*x))^m*(d*(3 + 2*m)*(5 + 2*m))) + (2*a^2*(2*im*B*(4 + m) - A*(5 + 2*m))*tan(c + d*x)^(1 + m)*sqrt(a + im*a*tan(c + d*x)))/(d*(3 + 2*m)*(5 + 2*m)) + (2*im*a*B*tan(c + d*x)^(1 + m)*(a + im*a*tan(c + d*x))^(3/2))/(d*(5 + 2*m))]
    @test_int [tan(c + d*x)^m*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 8, (2*a^2*(A - im*B)*AppellF1(1 + m, 1/2, 1, 2 + m, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(1 + im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(d*(1 + m)*sqrt(a + im*a*tan(c + d*x))) + (2*a*(B + (im*A + B)*(3 + 2*m))*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, 1 + im*tan(c + d*x))*tan(c + d*x)^m*sqrt(a + im*a*tan(c + d*x)))/(((-im)*tan(c + d*x))^m*(d*(3 + 2*m))) + (2*im*a*B*tan(c + d*x)^(1 + m)*sqrt(a + im*a*tan(c + d*x)))/(d*(3 + 2*m))]
    @test_int [tan(c + d*x)^m*(a + im*a*tan(c + d*x))^(1/2)*(A + B*tan(c + d*x)), x, 7, (a*(A - im*B)*AppellF1(1 + m, 1/2, 1, 2 + m, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(1 + im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(d*(1 + m)*sqrt(a + im*a*tan(c + d*x))) + (2*B*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, 1 + im*tan(c + d*x))*tan(c + d*x)^m*sqrt(a + im*a*tan(c + d*x)))/(((-im)*tan(c + d*x))^m*d)]
    @test_int [(tan(c + d*x)^m*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(1/2), x, 8, ((A + im*B)*tan(c + d*x)^(1 + m))/(d*sqrt(a + im*a*tan(c + d*x))) + ((A - im*B)*AppellF1(1 + m, 1/2, 1, 2 + m, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(1 + im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(2*d*(1 + m)*sqrt(a + im*a*tan(c + d*x))) + ((im*A - B)*(1 + 2*m)*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, 1 + im*tan(c + d*x))*tan(c + d*x)^m*sqrt(a + im*a*tan(c + d*x)))/(((-im)*tan(c + d*x))^m*(a*d))]
    @test_int [(tan(c + d*x)^m*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 9, ((A + im*B)*tan(c + d*x)^(1 + m))/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + ((A*(5 - 4*m) - im*(B + 4*B*m))*tan(c + d*x)^(1 + m))/(6*a*d*sqrt(a + im*a*tan(c + d*x))) + ((A - im*B)*AppellF1(1 + m, 1/2, 1, 2 + m, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(1 + im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(4*a*d*(1 + m)*sqrt(a + im*a*tan(c + d*x))) + ((1 + 2*m)*(B + im*A*(5 - 4*m) + 4*B*m)*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, 1 + im*tan(c + d*x))*tan(c + d*x)^m*sqrt(a + im*a*tan(c + d*x)))/(((-im)*tan(c + d*x))^m*(6*a^2*d))]
    @test_int [(tan(c + d*x)^m*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 10, ((A + im*B)*tan(c + d*x)^(1 + m))/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((im*B*(1 - 4*m) + A*(11 - 4*m))*tan(c + d*x)^(1 + m))/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) - ((im*B*(13 + 12*m - 16*m^2) - A*(37 - 52*m + 16*m^2))*tan(c + d*x)^(1 + m))/(60*a^2*d*sqrt(a + im*a*tan(c + d*x))) + ((A - im*B)*AppellF1(1 + m, 1/2, 1, 2 + m, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(1 + im*tan(c + d*x))*tan(c + d*x)^(1 + m))/(8*a^2*d*(1 + m)*sqrt(a + im*a*tan(c + d*x))) + ((1 + 2*m)*(B*(13 + 12*m - 16*m^2) + im*A*(37 - 52*m + 16*m^2))*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, 1 + im*tan(c + d*x))*tan(c + d*x)^m*sqrt(a + im*a*tan(c + d*x)))/(((-im)*tan(c + d*x))^m*(60*a^3*d))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*tan(c+d*x)^m*(A+B*tan(c+d*x))*(a+i*a*tan(c+d*x))^n*with*n*symbolic=#

    @test_int [tan(c + d*x)^m*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 7, (1/(d*(1 + m)))*(((A - im*B)*AppellF1(1 + m, 1 - n, 1, 2 + m, (-im)*tan(c + d*x), im*tan(c + d*x))*tan(c + d*x)^(1 + m)*(a + im*a*tan(c + d*x))^n)/(1 + im*tan(c + d*x))^n) + (1/(d*(1 + m)))*((im*B*HypergeometricFunctions._₂F₁(1 + m, 1 - n, 2 + m, (-im)*tan(c + d*x))*tan(c + d*x)^(1 + m)*(a + im*a*tan(c + d*x))^n)/(1 + im*tan(c + d*x))^n)]

    @test_int [tan(c + d*x)^3*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 6, If(13>=8, (2*(im*B*n - A*(3 + n))*(a + im*a*tan(c + d*x))^n)/(d*n*(2 + n)*(3 + n)) + ((A - im*B)*HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 + im*tan(c + d*x)))*(a + im*a*tan(c + d*x))^n)/(2*d*n) - ((im*B*n - A*(3 + n))*tan(c + d*x)^2*(a + im*a*tan(c + d*x))^n)/(d*(2 + n)*(3 + n)) + (B*tan(c + d*x)^3*(a + im*a*tan(c + d*x))^n)/(d*(3 + n)) - ((A*n*(3 + n) - im*B*(6 + 3*n + n^2))*(a + im*a*tan(c + d*x))^(1 + n))/(a*d*(1 + n)*(2 + n)*(3 + n)), (2*(im*B*n - A*(3 + n))*(a + im*a*tan(c + d*x))^n)/(d*n*(2 + n)*(3 + n)) + ((A - im*B)*HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 + im*tan(c + d*x)))*(a + im*a*tan(c + d*x))^n)/(2*d*n) - ((im*B*n - A*(3 + n))*tan(c + d*x)^2*(a + im*a*tan(c + d*x))^n)/(d*(2 + n)*(3 + n)) + (B*tan(c + d*x)^3*(a + im*a*tan(c + d*x))^n)/(d*(3 + n)) - ((A*n*(3 + n) - im*B*(6 + 3*n + n^2))*(a + im*a*tan(c + d*x))^(1 + n))/(a*d*(3 + n)*(2 + 3*n + n^2)))]
    @test_int [tan(c + d*x)^2*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 5, -((2*B*(a + im*a*tan(c + d*x))^n)/(d*n*(2 + n))) + ((im*A + B)*HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 + im*tan(c + d*x)))*(a + im*a*tan(c + d*x))^n)/(2*d*n) + (B*tan(c + d*x)^2*(a + im*a*tan(c + d*x))^n)/(d*(2 + n)) - ((B*n + im*A*(2 + n))*(a + im*a*tan(c + d*x))^(1 + n))/(a*d*(1 + n)*(2 + n))]
    @test_int [tan(c + d*x)^1*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 4, (A*(a + im*a*tan(c + d*x))^n)/(d*n) - ((A - im*B)*HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 + im*tan(c + d*x)))*(a + im*a*tan(c + d*x))^n)/(2*d*n) - (im*B*(a + im*a*tan(c + d*x))^(1 + n))/(a*d*(1 + n))]
    @test_int [tan(c + d*x)^0*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 3, (B*(a + im*a*tan(c + d*x))^n)/(d*n) - ((im*A + B)*HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 + im*tan(c + d*x)))*(a + im*a*tan(c + d*x))^n)/(2*d*n)]
    @test_int [cot(c + d*x)^1*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 5, ((A - im*B)*HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 + im*tan(c + d*x)))*(a + im*a*tan(c + d*x))^n)/(2*d*n) - (A*HypergeometricFunctions._₂F₁(1, n, 1 + n, 1 + im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/(d*n)]
    @test_int [cot(c + d*x)^2*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 6, -((A*cot(c + d*x)*(a + im*a*tan(c + d*x))^n)/d) + ((im*A + B)*HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 + im*tan(c + d*x)))*(a + im*a*tan(c + d*x))^n)/(2*d*n) - ((B + im*A*n)*HypergeometricFunctions._₂F₁(1, n, 1 + n, 1 + im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/(d*n)]
    @test_int [cot(c + d*x)^3*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 7, -(((2*B + im*A*n)*cot(c + d*x)*(a + im*a*tan(c + d*x))^n)/(2*d)) - (A*cot(c + d*x)^2*(a + im*a*tan(c + d*x))^n)/(2*d) - ((A - im*B)*HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 + im*tan(c + d*x)))*(a + im*a*tan(c + d*x))^n)/(2*d*n) - ((2*im*B*n - A*(2 - n + n^2))*HypergeometricFunctions._₂F₁(1, n, 1 + n, 1 + im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/(2*d*n)]

    @test_int [tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 11, If(13>=8, -((2*(2*im*A*n*(5 + 2*n) + B*(15 + 10*n + 4*n^2))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/(d*(1 + 2*n)*(3 + 2*n)*(5 + 2*n))) + (2*(im*A + B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d) - (2*(4*B*n*(9 + 8*n + 2*n^2) + im*A*(15 + 36*n + 32*n^2 + 8*n^3))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(1 + 2*n)*(3 + 2*n)*(5 + 2*n))) - (2*(2*im*B*n - A*(5 + 2*n))*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^n)/(d*(3 + 2*n)*(5 + 2*n)) + (2*B*tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^n)/(d*(5 + 2*n)), -((2*(2*im*A*n*(5 + 2*n) + B*(15 + 10*n + 4*n^2))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/(d*(5 + 2*n)*(3 + 8*n + 4*n^2))) + (2*(im*A + B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d) - (2*(4*B*n*(9 + 8*n + 2*n^2) + im*A*(15 + 36*n + 32*n^2 + 8*n^3))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(5 + 2*n)*(3 + 8*n + 4*n^2))) - (2*(2*im*B*n - A*(5 + 2*n))*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^n)/(d*(3 + 2*n)*(5 + 2*n)) + (2*B*tan(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^n)/(d*(5 + 2*n)))]
    @test_int [tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 10, If(13>=8, -((2*(2*im*B*n - A*(3 + 2*n))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/(d*(1 + 2*n)*(3 + 2*n))) - (2*(A - im*B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d) + (2*(2*A*n*(3 + 2*n) - im*B*(3 + 6*n + 4*n^2))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(1 + 2*n)*(3 + 2*n))) + (2*B*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^n)/(d*(3 + 2*n)), -((2*(2*im*B*n - A*(3 + 2*n))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/(d*(3 + 8*n + 4*n^2))) - (2*(A - im*B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d) + (2*(2*A*n*(3 + 2*n) - im*B*(3 + 6*n + 4*n^2))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(3 + 8*n + 4*n^2))) + (2*B*tan(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^n)/(d*(3 + 2*n)))]
    @test_int [tan(c + d*x)^(1/2)*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 9, (2*B*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/(d*(1 + 2*n)) - (2*(im*A + B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d) + (2*(2*B*n + im*A*(1 + 2*n))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(1 + 2*n)))]
    @test_int [((a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)))/tan(c + d*x)^(1/2), x, 8, (2*(A - im*B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d) + (2*im*B*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d)]
    @test_int [((a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 9, -((2*A*(a + im*a*tan(c + d*x))^n)/(d*sqrt(tan(c + d*x)))) + (2*(im*A + B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d) - (2*im*A*(1 - 2*n)*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d)]
    @test_int [((a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 10, -((2*A*(a + im*a*tan(c + d*x))^n)/(3*d*tan(c + d*x)^(3/2))) - (2*(3*B + 2*im*A*n)*(a + im*a*tan(c + d*x))^n)/(3*d*sqrt(tan(c + d*x))) - (2*(A - im*B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*d) - (2*(1 - 2*n)*(3*im*B - 2*A*n)*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*sqrt(tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(3*d))]

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

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

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

    @test_int [tan(c + d*x)^2*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 4, -((a*A - b*B)*x) + ((A*b + a*B)*log(cos(c + d*x)))/d + ((a*A - b*B)*tan(c + d*x))/d + ((A*b + a*B)*tan(c + d*x)^2)/(2*d) + (b*B*tan(c + d*x)^3)/(3*d)]
    @test_int [tan(c + d*x)*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 3, -((A*b + a*B)*x) - ((a*A - b*B)*log(cos(c + d*x)))/d + ((A*b + a*B)*tan(c + d*x))/d + (b*B*tan(c + d*x)^2)/(2*d)]
    @test_int [(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 2, (a*A - b*B)*x - ((A*b + a*B)*log(cos(c + d*x)))/d + (b*B*tan(c + d*x))/d]
    @test_int [cot(c + d*x)*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 4, (A*b + a*B)*x - (b*B*log(cos(c + d*x)))/d + (a*A*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^2*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 3, -((a*A - b*B)*x) - (a*A*cot(c + d*x))/d + ((A*b + a*B)*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 4, -((A*b + a*B)*x) - ((A*b + a*B)*cot(c + d*x))/d - (a*A*cot(c + d*x)^2)/(2*d) - ((a*A - b*B)*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 5, (a*A - b*B)*x + ((a*A - b*B)*cot(c + d*x))/d - ((A*b + a*B)*cot(c + d*x)^2)/(2*d) - (a*A*cot(c + d*x)^3)/(3*d) - ((A*b + a*B)*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^5*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 6, (A*b + a*B)*x + ((A*b + a*B)*cot(c + d*x))/d + ((a*A - b*B)*cot(c + d*x)^2)/(2*d) - ((A*b + a*B)*cot(c + d*x)^3)/(3*d) - (a*A*cot(c + d*x)^4)/(4*d) + ((a*A - b*B)*log(sin(c + d*x)))/d]

    @test_int [tan(c + d*x)^2*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, -((a^2*A - A*b^2 - 2*a*b*B)*x) + ((2*a*A*b + a^2*B - b^2*B)*log(cos(c + d*x)))/d - (b*(A*b + a*B)*tan(c + d*x))/d - (B*(a + b*tan(c + d*x))^2)/(2*d) + ((4*A*b - a*B)*(a + b*tan(c + d*x))^3)/(12*b^2*d) + (B*tan(c + d*x)*(a + b*tan(c + d*x))^3)/(4*b*d)]
    @test_int [tan(c + d*x)*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 4, -((2*a*A*b + a^2*B - b^2*B)*x) - ((a^2*A - A*b^2 - 2*a*b*B)*log(cos(c + d*x)))/d + (b*(a*A - b*B)*tan(c + d*x))/d + (A*(a + b*tan(c + d*x))^2)/(2*d) + (B*(a + b*tan(c + d*x))^3)/(3*b*d)]
    @test_int [(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 3, (a^2*A - A*b^2 - 2*a*b*B)*x - ((2*a*A*b + a^2*B - b^2*B)*log(cos(c + d*x)))/d + (b*(A*b + a*B)*tan(c + d*x))/d + (B*(a + b*tan(c + d*x))^2)/(2*d)]
    @test_int [cot(c + d*x)*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 4, (2*a*A*b + a^2*B - b^2*B)*x - (b*(A*b + 2*a*B)*log(cos(c + d*x)))/d + (a^2*A*log(sin(c + d*x)))/d + (b^2*B*tan(c + d*x))/d]
    @test_int [cot(c + d*x)^2*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 4, -((a^2*A - A*b^2 - 2*a*b*B)*x) - (a^2*A*cot(c + d*x))/d - (b^2*B*log(cos(c + d*x)))/d + (a*(2*A*b + a*B)*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 4, (b^2*B - a*(2*A*b + a*B))*x - (a*(2*A*b + a*B)*cot(c + d*x))/d - (a^2*A*cot(c + d*x)^2)/(2*d) - ((a^2*A - A*b^2 - 2*a*b*B)*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^4*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, (a^2*A - A*b^2 - 2*a*b*B)*x + ((a^2*A - A*b^2 - 2*a*b*B)*cot(c + d*x))/d - (a*(2*A*b + a*B)*cot(c + d*x)^2)/(2*d) - (a^2*A*cot(c + d*x)^3)/(3*d) + ((b^2*B - a*(2*A*b + a*B))*log(sin(c + d*x)))/d]
    @test_int [cot(c + d*x)^5*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 6, (2*a*A*b + a^2*B - b^2*B)*x - ((b^2*B - a*(2*A*b + a*B))*cot(c + d*x))/d + ((a^2*A - A*b^2 - 2*a*b*B)*cot(c + d*x)^2)/(2*d) - (a*(2*A*b + a*B)*cot(c + d*x)^3)/(3*d) - (a^2*A*cot(c + d*x)^4)/(4*d) + ((a^2*A - A*b^2 - 2*a*b*B)*log(sin(c + d*x)))/d]

    @test_int [tan(c + d*x)^2*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, -((a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*x) + ((3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*log(cos(c + d*x)))/d - (b*(2*a*A*b + a^2*B - b^2*B)*tan(c + d*x))/d - ((A*b + a*B)*(a + b*tan(c + d*x))^2)/(2*d) - (B*(a + b*tan(c + d*x))^3)/(3*d) + ((5*A*b - a*B)*(a + b*tan(c + d*x))^4)/(20*b^2*d) + (B*tan(c + d*x)*(a + b*tan(c + d*x))^4)/(5*b*d)]
    @test_int [tan(c + d*x)*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 5, -((3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*x) - ((a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*log(cos(c + d*x)))/d + (b*(a^2*A - A*b^2 - 2*a*b*B)*tan(c + d*x))/d + ((a*A - b*B)*(a + b*tan(c + d*x))^2)/(2*d) + (A*(a + b*tan(c + d*x))^3)/(3*d) + (B*(a + b*tan(c + d*x))^4)/(4*b*d)]
    @test_int [(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 4, (a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*x - ((3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*log(cos(c + d*x)))/d + (b*(2*a*A*b + a^2*B - b^2*B)*tan(c + d*x))/d + ((A*b + a*B)*(a + b*tan(c + d*x))^2)/(2*d) + (B*(a + b*tan(c + d*x))^3)/(3*d)]
    @test_int [cot(c + d*x)*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 5, (3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*x - (b*(3*a*A*b + 3*a^2*B - b^2*B)*log(cos(c + d*x)))/d + (a^3*A*log(sin(c + d*x)))/d + (b^2*(A*b + 2*a*B)*tan(c + d*x))/d + (b*B*(a + b*tan(c + d*x))^2)/(2*d)]
    @test_int [cot(c + d*x)^2*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 5, -((a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*x) - (b^2*(A*b + 3*a*B)*log(cos(c + d*x)))/d + (a^2*(3*A*b + a*B)*log(sin(c + d*x)))/d + (b^2*(a*A + b*B)*tan(c + d*x))/d - (a*A*cot(c + d*x)*(a + b*tan(c + d*x))^2)/d]
    @test_int [cot(c + d*x)^3*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 5, -((3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*x) - (a^2*(2*A*b + a*B)*cot(c + d*x))/d - (b^3*B*log(cos(c + d*x)))/d - (a*(a^2*A - 3*A*b^2 - 3*a*b*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^2*(a + b*tan(c + d*x))^2)/(2*d)]
    @test_int [cot(c + d*x)^4*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 5, (a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*x + (a*(3*a^2*A - 8*A*b^2 - 9*a*b*B)*cot(c + d*x))/(3*d) - (a^2*(5*A*b + 3*a*B)*cot(c + d*x)^2)/(6*d) - ((3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^3*(a + b*tan(c + d*x))^2)/(3*d)]
    @test_int [cot(c + d*x)^5*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, (3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*x + ((3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*cot(c + d*x))/d + (a*(2*a^2*A - 5*A*b^2 - 6*a*b*B)*cot(c + d*x)^2)/(4*d) - (a^2*(3*A*b + 2*a*B)*cot(c + d*x)^3)/(6*d) + ((a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^4*(a + b*tan(c + d*x))^2)/(4*d)]
    @test_int [cot(c + d*x)^6*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 7, -((a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*x) - ((a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*cot(c + d*x))/d + ((3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*cot(c + d*x)^2)/(2*d) + (a*(5*a^2*A - 12*A*b^2 - 15*a*b*B)*cot(c + d*x)^3)/(15*d) - (a^2*(7*A*b + 5*a*B)*cot(c + d*x)^4)/(20*d) + ((3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*log(sin(c + d*x)))/d - (a*A*cot(c + d*x)^5*(a + b*tan(c + d*x))^2)/(5*d)]

    @test_int [tan(c + d*x)^2*(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 7, -((a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*x) + ((4*a^3*A*b - 4*a*A*b^3 + a^4*B - 6*a^2*b^2*B + b^4*B)*log(cos(c + d*x)))/d - (b*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*tan(c + d*x))/d - ((2*a*A*b + a^2*B - b^2*B)*(a + b*tan(c + d*x))^2)/(2*d) - ((A*b + a*B)*(a + b*tan(c + d*x))^3)/(3*d) - (B*(a + b*tan(c + d*x))^4)/(4*d) + ((6*A*b - a*B)*(a + b*tan(c + d*x))^5)/(30*b^2*d) + (B*tan(c + d*x)*(a + b*tan(c + d*x))^5)/(6*b*d)]
    @test_int [tan(c + d*x)*(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 6, -((4*a^3*A*b - 4*a*A*b^3 + a^4*B - 6*a^2*b^2*B + b^4*B)*x) - ((a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*log(cos(c + d*x)))/d + (b*(a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*tan(c + d*x))/d + ((a^2*A - A*b^2 - 2*a*b*B)*(a + b*tan(c + d*x))^2)/(2*d) + ((a*A - b*B)*(a + b*tan(c + d*x))^3)/(3*d) + (A*(a + b*tan(c + d*x))^4)/(4*d) + (B*(a + b*tan(c + d*x))^5)/(5*b*d)]
    @test_int [(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 5, (a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*x - ((4*a^3*A*b - 4*a*A*b^3 + a^4*B - 6*a^2*b^2*B + b^4*B)*log(cos(c + d*x)))/d + (b*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*tan(c + d*x))/d + ((2*a*A*b + a^2*B - b^2*B)*(a + b*tan(c + d*x))^2)/(2*d) + ((A*b + a*B)*(a + b*tan(c + d*x))^3)/(3*d) + (B*(a + b*tan(c + d*x))^4)/(4*d)]
    @test_int [cot(c + d*x)*(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 6, (4*a^3*A*b - 4*a*A*b^3 + a^4*B - 6*a^2*b^2*B + b^4*B)*x - (b*(6*a^2*A*b - A*b^3 + 4*a^3*B - 4*a*b^2*B)*log(cos(c + d*x)))/d + (a^4*A*log(sin(c + d*x)))/d + (b^2*(3*a*A*b + 3*a^2*B - b^2*B)*tan(c + d*x))/d + (b*(A*b + 2*a*B)*(a + b*tan(c + d*x))^2)/(2*d) + (b*B*(a + b*tan(c + d*x))^3)/(3*d)]
    @test_int [cot(c + d*x)^2*(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 6, -((a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*x) - (b^2*(4*a*A*b + 6*a^2*B - b^2*B)*log(cos(c + d*x)))/d + (a^3*(4*A*b + a*B)*log(sin(c + d*x)))/d + (b^2*(a^2*A + A*b^2 + 3*a*b*B)*tan(c + d*x))/d + (b*(2*a*A + b*B)*(a + b*tan(c + d*x))^2)/(2*d) - (a*A*cot(c + d*x)*(a + b*tan(c + d*x))^3)/d]
    @test_int [cot(c + d*x)^3*(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 6, -((4*a^3*A*b - 4*a*A*b^3 + a^4*B - 6*a^2*b^2*B + b^4*B)*x) - (b^3*(A*b + 4*a*B)*log(cos(c + d*x)))/d - (a^2*(a^2*A - 6*A*b^2 - 4*a*b*B)*log(sin(c + d*x)))/d + (b^2*(3*a*A*b + a^2*B + b^2*B)*tan(c + d*x))/d - (a*(5*A*b + 2*a*B)*cot(c + d*x)*(a + b*tan(c + d*x))^2)/(2*d) - (a*A*cot(c + d*x)^2*(a + b*tan(c + d*x))^3)/(2*d)]
    @test_int [cot(c + d*x)^4*(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 6, (a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*x + (a^2*(a^2*A - 3*A*b^2 - 3*a*b*B)*cot(c + d*x))/d - (b^4*B*log(cos(c + d*x)))/d - (a*(4*a^2*A*b - 4*A*b^3 + a^3*B - 6*a*b^2*B)*log(sin(c + d*x)))/d - (a*(2*A*b + a*B)*cot(c + d*x)^2*(a + b*tan(c + d*x))^2)/(2*d) - (a*A*cot(c + d*x)^3*(a + b*tan(c + d*x))^3)/(3*d)]
    @test_int [cot(c + d*x)^5*(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 6, (4*a^3*A*b - 4*a*A*b^3 + a^4*B - 6*a^2*b^2*B + b^4*B)*x + (a*(24*a^2*A*b - 19*A*b^3 + 6*a^3*B - 34*a*b^2*B)*cot(c + d*x))/(6*d) + (a^2*(6*a^2*A - 13*A*b^2 - 16*a*b*B)*cot(c + d*x)^2)/(12*d) + ((a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*log(sin(c + d*x)))/d - (a*(7*A*b + 4*a*B)*cot(c + d*x)^3*(a + b*tan(c + d*x))^2)/(12*d) - (a*A*cot(c + d*x)^4*(a + b*tan(c + d*x))^3)/(4*d)]
    @test_int [cot(c + d*x)^6*(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 7, -((a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*x) - ((a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*cot(c + d*x))/d + (a*(40*a^2*A*b - 28*A*b^3 + 10*a^3*B - 55*a*b^2*B)*cot(c + d*x)^2)/(20*d) + (a^2*(10*a^2*A - 18*A*b^2 - 25*a*b*B)*cot(c + d*x)^3)/(30*d) + ((4*a^3*A*b - 4*a*A*b^3 + a^4*B - 6*a^2*b^2*B + b^4*B)*log(sin(c + d*x)))/d - (a*(8*A*b + 5*a*B)*cot(c + d*x)^4*(a + b*tan(c + d*x))^2)/(20*d) - (a*A*cot(c + d*x)^5*(a + b*tan(c + d*x))^3)/(5*d)]
    @test_int [cot(c + d*x)^7*(a + b*tan(c + d*x))^4*(A + B*tan(c + d*x)), x, 8, -((4*a^3*A*b - 4*a*A*b^3 + a^4*B - 6*a^2*b^2*B + b^4*B)*x) - ((4*a^3*A*b - 4*a*A*b^3 + a^4*B - 6*a^2*b^2*B + b^4*B)*cot(c + d*x))/d - ((a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*cot(c + d*x)^2)/(2*d) + (a*(20*a^2*A*b - 13*A*b^3 + 5*a^3*B - 27*a*b^2*B)*cot(c + d*x)^3)/(15*d) + (a^2*(5*a^2*A - 8*A*b^2 - 12*a*b*B)*cot(c + d*x)^4)/(20*d) - ((a^4*A - 6*a^2*A*b^2 + A*b^4 - 4*a^3*b*B + 4*a*b^3*B)*log(sin(c + d*x)))/d - (a*(3*A*b + 2*a*B)*cot(c + d*x)^5*(a + b*tan(c + d*x))^2)/(10*d) - (a*A*cot(c + d*x)^6*(a + b*tan(c + d*x))^3)/(6*d)]

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

    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 6, -(((A*b - a*B)*x)/(a^2 + b^2)) + ((a*A + b*B)*log(cos(c + d*x)))/((a^2 + b^2)*d) - (a^3*(A*b - a*B)*log(a + b*tan(c + d*x)))/(b^3*(a^2 + b^2)*d) + ((A*b - a*B)*tan(c + d*x))/(b^2*d) + (B*tan(c + d*x)^2)/(2*b*d)]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 5, -(((a*A + b*B)*x)/(a^2 + b^2)) - ((A*b - a*B)*log(cos(c + d*x)))/((a^2 + b^2)*d) + (a^2*(A*b - a*B)*log(a + b*tan(c + d*x)))/(b^2*(a^2 + b^2)*d) + (B*tan(c + d*x))/(b*d)]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 5, ((A*b - a*B)*x)/(a^2 + b^2) - (B*log(cos(c + d*x)))/(b*d) - (a*(A*b - a*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(b*(a^2 + b^2)*d)]
    @test_int [(A + B*tan(c + d*x))/(a + b*tan(c + d*x)), x, 2, ((a*A + b*B)*x)/(a^2 + b^2) + ((A*b - a*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)*d)]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 3, -(((A*b - a*B)*x)/(a^2 + b^2)) + (A*log(sin(c + d*x)))/(a*d) - (b*(A*b - a*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a*(a^2 + b^2)*d)]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 4, -(((a*A + b*B)*x)/(a^2 + b^2)) - (A*cot(c + d*x))/(a*d) - ((A*b - a*B)*log(sin(c + d*x)))/(a^2*d) + (b^2*(A*b - a*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^2*(a^2 + b^2)*d)]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 5, ((A*b - a*B)*x)/(a^2 + b^2) + ((A*b - a*B)*cot(c + d*x))/(a^2*d) - (A*cot(c + d*x)^2)/(2*a*d) - ((a^2*A - A*b^2 + a*b*B)*log(sin(c + d*x)))/(a^3*d) - (b^3*(A*b - a*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^3*(a^2 + b^2)*d)]
    @test_int [(cot(c + d*x)^4*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 6, ((a*A + b*B)*x)/(a^2 + b^2) + ((a^2*A - A*b^2 + a*b*B)*cot(c + d*x))/(a^3*d) + ((A*b - a*B)*cot(c + d*x)^2)/(2*a^2*d) - (A*cot(c + d*x)^3)/(3*a*d) + ((a^2 - b^2)*(A*b - a*B)*log(sin(c + d*x)))/(a^4*d) + (b^4*(A*b - a*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^4*(a^2 + b^2)*d)]

    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 6, -(((2*a*A*b - a^2*B + b^2*B)*x)/(a^2 + b^2)^2) + ((a^2*A - A*b^2 + 2*a*b*B)*log(cos(c + d*x)))/((a^2 + b^2)^2*d) + (a^2*(a^2*A*b + 3*A*b^3 - 2*a^3*B - 4*a*b^2*B)*log(a + b*tan(c + d*x)))/(b^3*(a^2 + b^2)^2*d) - ((a*A*b - 2*a^2*B - b^2*B)*tan(c + d*x))/(b^2*(a^2 + b^2)*d) + (a*(A*b - a*B)*tan(c + d*x)^2)/(b*(a^2 + b^2)*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 5, -(((a^2*A - A*b^2 + 2*a*b*B)*x)/(a^2 + b^2)^2) - ((2*a*A*b - a^2*B + b^2*B)*log(cos(c + d*x)))/((a^2 + b^2)^2*d) - (a*(2*A*b^3 - a*(a^2 + 3*b^2)*B)*log(a + b*tan(c + d*x)))/(b^2*(a^2 + b^2)^2*d) - (a^2*(A*b - a*B))/(b^2*(a^2 + b^2)*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 3, ((2*a*A*b - a^2*B + b^2*B)*x)/(a^2 + b^2)^2 - ((a^2*A - A*b^2 + 2*a*b*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)^2*d) + (a*(A*b - a*B))/(b*(a^2 + b^2)*d*(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + b*tan(c + d*x))^2, x, 3, ((a^2*A - A*b^2 + 2*a*b*B)*x)/(a^2 + b^2)^2 + ((2*a*A*b - a^2*B + b^2*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)^2*d) - (A*b - a*B)/((a^2 + b^2)*d*(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 4, -(((2*a*A*b - a^2*B + b^2*B)*x)/(a^2 + b^2)^2) + (A*log(sin(c + d*x)))/(a^2*d) - (b*(3*a^2*A*b + A*b^3 - 2*a^3*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^2*(a^2 + b^2)^2*d) + (b*(A*b - a*B))/(a*(a^2 + b^2)*d*(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 5, -(((a^2*A - A*b^2 + 2*a*b*B)*x)/(a^2 + b^2)^2) - ((2*A*b - a*B)*log(sin(c + d*x)))/(a^3*d) + (b^2*(4*a^2*A*b + 2*A*b^3 - 3*a^3*B - a*b^2*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^3*(a^2 + b^2)^2*d) - (b*(a^2*A + 2*A*b^2 - a*b*B))/(a^2*(a^2 + b^2)*d*(a + b*tan(c + d*x))) - (A*cot(c + d*x))/(a*d*(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 6, ((2*a*A*b - a^2*B + b^2*B)*x)/(a^2 + b^2)^2 - ((a^2*A - 3*A*b^2 + 2*a*b*B)*log(sin(c + d*x)))/(a^4*d) - (b^3*(5*a^2*A*b + 3*A*b^3 - 4*a^3*B - 2*a*b^2*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^4*(a^2 + b^2)^2*d) + (b*(2*a^2*A*b + 3*A*b^3 - a^3*B - 2*a*b^2*B))/(a^3*(a^2 + b^2)*d*(a + b*tan(c + d*x))) + ((3*A*b - 2*a*B)*cot(c + d*x))/(2*a^2*d*(a + b*tan(c + d*x))) - (A*cot(c + d*x)^2)/(2*a*d*(a + b*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^4*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 7, ((a^3*A - 3*a*A*b^2 + 3*a^2*b*B - b^3*B)*x)/(a^2 + b^2)^3 + ((3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)*log(cos(c + d*x)))/((a^2 + b^2)^3*d) + (a^2*(a^4*A*b + 3*a^2*A*b^3 + 6*A*b^5 - 3*a^5*B - 9*a^3*b^2*B - 10*a*b^4*B)*log(a + b*tan(c + d*x)))/(b^4*(a^2 + b^2)^3*d) - ((a^3*A*b + 3*a*A*b^3 - 3*a^4*B - 6*a^2*b^2*B - b^4*B)*tan(c + d*x))/(b^3*(a^2 + b^2)^2*d) + (a*(A*b - a*B)*tan(c + d*x)^3)/(2*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) + (a*(a^2*A*b + 5*A*b^3 - 3*a^3*B - 7*a*b^2*B)*tan(c + d*x)^2)/(2*b^2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 6, -(((3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)*x)/(a^2 + b^2)^3) + ((a^3*A - 3*a*A*b^2 + 3*a^2*b*B - b^3*B)*log(cos(c + d*x)))/((a^2 + b^2)^3*d) + (a*(a^2*A*b^3 - 3*A*b^5 + a^5*B + 3*a^3*b^2*B + 6*a*b^4*B)*log(a + b*tan(c + d*x)))/(b^3*(a^2 + b^2)^3*d) + (a*(A*b - a*B)*tan(c + d*x)^2)/(2*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) - (a^2*(2*A*b^3 - a*(a^2 + 3*b^2)*B))/(b^3*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 4, -(((a^3*A - 3*a*A*b^2 + 3*a^2*b*B - b^3*B)*x)/(a^2 + b^2)^3) - ((3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)^3*d) - (a^2*(A*b - a*B))/(2*b^2*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) + (a*(2*A*b^3 - a*(a^2 + 3*b^2)*B))/(b^2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 4, ((3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)*x)/(a^2 + b^2)^3 - ((a^3*A - 3*a*A*b^2 + 3*a^2*b*B - b^3*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)^3*d) + (a*(A*b - a*B))/(2*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) + (a^2*A - A*b^2 + 2*a*b*B)/((a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + b*tan(c + d*x))^3, x, 4, ((a^3*A - 3*a*A*b^2 + 3*a^2*b*B - b^3*B)*x)/(a^2 + b^2)^3 + ((3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)^3*d) - (A*b - a*B)/(2*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) - (2*a*A*b - a^2*B + b^2*B)/((a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 5, -(((3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)*x)/(a^2 + b^2)^3) + (A*log(sin(c + d*x)))/(a^3*d) - (b*(6*a^4*A*b + 3*a^2*A*b^3 + A*b^5 - 3*a^5*B + a^3*b^2*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^3*(a^2 + b^2)^3*d) + (b*(A*b - a*B))/(2*a*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) + (b*(3*a^2*A*b + A*b^3 - 2*a^3*B))/(a^2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 6, -(((a^3*A - 3*a*A*b^2 + 3*a^2*b*B - b^3*B)*x)/(a^2 + b^2)^3) - ((3*A*b - a*B)*log(sin(c + d*x)))/(a^4*d) + (b^2*(10*a^4*A*b + 9*a^2*A*b^3 + 3*A*b^5 - 6*a^5*B - 3*a^3*b^2*B - a*b^4*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^4*(a^2 + b^2)^3*d) - (b*(2*a^2*A + 3*A*b^2 - a*b*B))/(2*a^2*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) - (A*cot(c + d*x))/(a*d*(a + b*tan(c + d*x))^2) - (b*(a^4*A + 6*a^2*A*b^2 + 3*A*b^4 - 3*a^3*b*B - a*b^3*B))/(a^3*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 7, ((3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)*x)/(a^2 + b^2)^3 - ((a^2*A - 6*A*b^2 + 3*a*b*B)*log(sin(c + d*x)))/(a^5*d) - (b^3*(15*a^4*A*b + 17*a^2*A*b^3 + 6*A*b^5 - 10*a^5*B - 9*a^3*b^2*B - 3*a*b^4*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^5*(a^2 + b^2)^3*d) + (b*(5*a^2*A*b + 6*A*b^3 - 2*a^3*B - 3*a*b^2*B))/(2*a^3*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) + ((2*A*b - a*B)*cot(c + d*x))/(a^2*d*(a + b*tan(c + d*x))^2) - (A*cot(c + d*x)^2)/(2*a*d*(a + b*tan(c + d*x))^2) + (b*(3*a^4*A*b + 11*a^2*A*b^3 + 6*A*b^5 - a^5*B - 6*a^3*b^2*B - 3*a*b^4*B))/(a^4*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^4*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^4, x, 7, ((a^4*A - 6*a^2*A*b^2 + A*b^4 + 4*a^3*b*B - 4*a*b^3*B)*x)/(a^2 + b^2)^4 + ((4*a^3*A*b - 4*a*A*b^3 - a^4*B + 6*a^2*b^2*B - b^4*B)*log(cos(c + d*x)))/((a^2 + b^2)^4*d) + (a*(4*a^2*A*b^5 - 4*A*b^7 + a^7*B + 4*a^5*b^2*B + 5*a^3*b^4*B + 10*a*b^6*B)*log(a + b*tan(c + d*x)))/(b^4*(a^2 + b^2)^4*d) + (a*(A*b - a*B)*tan(c + d*x)^3)/(3*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^3) + (a*(2*A*b^3 - a*(a^2 + 3*b^2)*B)*tan(c + d*x)^2)/(2*b^2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x))^2) + (a^2*(a^2*A*b^3 - 3*A*b^5 + a^5*B + 3*a^3*b^2*B + 6*a*b^4*B))/(b^4*(a^2 + b^2)^3*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^4, x, 5, -(((4*a^3*A*b - 4*a*A*b^3 - a^4*B + 6*a^2*b^2*B - b^4*B)*x)/(a^2 + b^2)^4) + ((a^4*A - 6*a^2*A*b^2 + A*b^4 + 4*a^3*b*B - 4*a*b^3*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)^4*d) + (a*(A*b - a*B)*tan(c + d*x)^2)/(3*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^3) + (a^2*(a^2*A*b - 5*A*b^3 + 2*a^3*B + 8*a*b^2*B))/(6*b^3*(a^2 + b^2)^2*d*(a + b*tan(c + d*x))^2) - (a*(a^4*A*b + 5*a^2*A*b^3 - 8*A*b^5 + 2*a^5*B + 7*a^3*b^2*B + 17*a*b^4*B))/(3*b^3*(a^2 + b^2)^3*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^4, x, 5, -(((a^4*A - 6*a^2*A*b^2 + A*b^4 + 4*a^3*b*B - 4*a*b^3*B)*x)/(a^2 + b^2)^4) - ((4*a^3*A*b - 4*a*A*b^3 - a^4*B + 6*a^2*b^2*B - b^4*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)^4*d) - (a^2*(A*b - a*B))/(3*b^2*(a^2 + b^2)*d*(a + b*tan(c + d*x))^3) + (a*(2*A*b^3 - a*(a^2 + 3*b^2)*B))/(2*b^2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x))^2) + (3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)/((a^2 + b^2)^3*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^4, x, 5, ((4*a^3*A*b - 4*a*A*b^3 - a^4*B + 6*a^2*b^2*B - b^4*B)*x)/(a^2 + b^2)^4 - ((a^4*A - 6*a^2*A*b^2 + A*b^4 + 4*a^3*b*B - 4*a*b^3*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)^4*d) + (a*(A*b - a*B))/(3*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^3) + (a^2*A - A*b^2 + 2*a*b*B)/(2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x))^2) + (a^3*A - 3*a*A*b^2 + 3*a^2*b*B - b^3*B)/((a^2 + b^2)^3*d*(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + b*tan(c + d*x))^4, x, 5, ((a^4*A - 6*a^2*A*b^2 + A*b^4 + 4*a^3*b*B - 4*a*b^3*B)*x)/(a^2 + b^2)^4 + ((4*a^3*A*b - 4*a*A*b^3 - a^4*B + 6*a^2*b^2*B - b^4*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)^4*d) - (A*b - a*B)/(3*(a^2 + b^2)*d*(a + b*tan(c + d*x))^3) - (2*a*A*b - a^2*B + b^2*B)/(2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x))^2) - (3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)/((a^2 + b^2)^3*d*(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^4, x, 6, -(((4*a^3*A*b - 4*a*A*b^3 - a^4*B + 6*a^2*b^2*B - b^4*B)*x)/(a^2 + b^2)^4) + (A*log(sin(c + d*x)))/(a^4*d) - (b*(10*a^6*A*b + 5*a^4*A*b^3 + 4*a^2*A*b^5 + A*b^7 - 4*a^7*B + 4*a^5*b^2*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^4*(a^2 + b^2)^4*d) + (b*(A*b - a*B))/(3*a*(a^2 + b^2)*d*(a + b*tan(c + d*x))^3) + (b*(3*a^2*A*b + A*b^3 - 2*a^3*B))/(2*a^2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x))^2) + (b*(6*a^4*A*b + 3*a^2*A*b^3 + A*b^5 - 3*a^5*B + a^3*b^2*B))/(a^3*(a^2 + b^2)^3*d*(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^4, x, 7, -(((a^4*A - 6*a^2*A*b^2 + A*b^4 + 4*a^3*b*B - 4*a*b^3*B)*x)/(a^2 + b^2)^4) - ((4*A*b - a*B)*log(sin(c + d*x)))/(a^5*d) + (b^2*(20*a^6*A*b + 24*a^4*A*b^3 + 16*a^2*A*b^5 + 4*A*b^7 - 10*a^7*B - 5*a^5*b^2*B - 4*a^3*b^4*B - a*b^6*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^5*(a^2 + b^2)^4*d) - (b*(3*a^2*A + 4*A*b^2 - a*b*B))/(3*a^2*(a^2 + b^2)*d*(a + b*tan(c + d*x))^3) - (A*cot(c + d*x))/(a*d*(a + b*tan(c + d*x))^3) - (b*(2*a^4*A + 8*a^2*A*b^2 + 4*A*b^4 - 3*a^3*b*B - a*b^3*B))/(2*a^3*(a^2 + b^2)^2*d*(a + b*tan(c + d*x))^2) - (b*(a^6*A + 13*a^4*A*b^2 + 12*a^2*A*b^4 + 4*A*b^6 - 6*a^5*b*B - 3*a^3*b^3*B - a*b^5*B))/(a^4*(a^2 + b^2)^3*d*(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^4, x, 8, ((4*a^3*A*b - 4*a*A*b^3 - a^4*B + 6*a^2*b^2*B - b^4*B)*x)/(a^2 + b^2)^4 - ((a^2*A - 10*A*b^2 + 4*a*b*B)*log(sin(c + d*x)))/(a^6*d) - (b^3*(35*a^6*A*b + 56*a^4*A*b^3 + 39*a^2*A*b^5 + 10*A*b^7 - 20*a^7*B - 24*a^5*b^2*B - 16*a^3*b^4*B - 4*a*b^6*B)*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^6*(a^2 + b^2)^4*d) + (b*(9*a^2*A*b + 10*A*b^3 - 3*a^3*B - 4*a*b^2*B))/(3*a^3*(a^2 + b^2)*d*(a + b*tan(c + d*x))^3) + ((5*A*b - 2*a*B)*cot(c + d*x))/(2*a^2*d*(a + b*tan(c + d*x))^3) - (A*cot(c + d*x)^2)/(2*a*d*(a + b*tan(c + d*x))^3) + (b*(7*a^4*A*b + 19*a^2*A*b^3 + 10*A*b^5 - 2*a^5*B - 8*a^3*b^2*B - 4*a*b^4*B))/(2*a^4*(a^2 + b^2)^2*d*(a + b*tan(c + d*x))^2) + (b*(4*a^6*A*b + 27*a^4*A*b^3 + 29*a^2*A*b^5 + 10*A*b^7 - a^7*B - 13*a^5*b^2*B - 12*a^3*b^4*B - 4*a*b^6*B))/(a^5*(a^2 + b^2)^3*d*(a + b*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^3*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 3, (B*log(cos(c + d*x)))/d + (B*tan(c + d*x)^2)/(2*d)]
    @test_int [(tan(c + d*x)^2*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 3, -(B*x) + (B*tan(c + d*x))/d]
    @test_int [(tan(c + d*x)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 2, -((B*log(cos(c + d*x)))/d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(a + b*tan(c + d*x)), x, 2, B*x]
    @test_int [(cot(c + d*x)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 2, (B*log(sin(c + d*x)))/d]
    @test_int [(cot(c + d*x)^2*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 3, -(B*x) - (B*cot(c + d*x))/d]
    @test_int [(cot(c + d*x)^3*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 3, -(B*cot(c + d*x)^2)/(2*d) - (B*log(sin(c + d*x)))/d]
    @test_int [(cot(c + d*x)^4*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 4, B*x + (B*cot(c + d*x))/d - (B*cot(c + d*x)^3)/(3*d)]

    @test_int [(tan(c + d*x)^4*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 7, (a*B*x)/(a^2 + b^2) + (b*B*log(cos(c + d*x)))/((a^2 + b^2)*d) + (a^4*B*log(a + b*tan(c + d*x)))/(b^3*(a^2 + b^2)*d) - (a*B*tan(c + d*x))/(b^2*d) + (B*tan(c + d*x)^2)/(2*b*d)]
    @test_int [(tan(c + d*x)^3*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 6, -((b*B*x)/(a^2 + b^2)) + (a*B*log(cos(c + d*x)))/((a^2 + b^2)*d) - (a^3*B*log(a + b*tan(c + d*x)))/(b^2*(a^2 + b^2)*d) + (B*tan(c + d*x))/(b*d)]
    @test_int [(tan(c + d*x)^2*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 5, -((a*B*x)/b^2) + (a^3*B*x)/(b^2*(a^2 + b^2)) - (B*log(cos(c + d*x)))/(b*d) + (a^2*B*log(a*cos(c + d*x) + b*sin(c + d*x)))/(b*(a^2 + b^2)*d)]
    @test_int [(tan(c + d*x)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 3, (b*B*x)/(a^2 + b^2) - (a*B*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(a + b*tan(c + d*x))^2, x, 3, (a*B*x)/(a^2 + b^2) + (b*B*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)*d)]
    @test_int [(cot(c + d*x)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 4, -((b*B*x)/(a^2 + b^2)) + (B*log(sin(c + d*x)))/(a*d) - (b^2*B*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a*(a^2 + b^2)*d)]
    @test_int [(cot(c + d*x)^2*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 5, -((a*B*x)/(a^2 + b^2)) - (B*cot(c + d*x))/(a*d) - (b*B*log(sin(c + d*x)))/(a^2*d) + (b^3*B*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^2*(a^2 + b^2)*d)]
    @test_int [(cot(c + d*x)^3*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 6, (b*B*x)/(a^2 + b^2) + (b*B*cot(c + d*x))/(a^2*d) - (B*cot(c + d*x)^2)/(2*a*d) - ((a^2 - b^2)*B*log(sin(c + d*x)))/(a^3*d) - (b^4*B*log(a*cos(c + d*x) + b*sin(c + d*x)))/(a^3*(a^2 + b^2)*d)]

    @test_int [(3 + tan(c + d*x))/(2 - tan(c + d*x)), x, 2, x - log(2*cos(c + d*x) - sin(c + d*x))/d]
    @test_int [((b*B)/a + B*tan(c + d*x))/(a + b*tan(c + d*x)), x, 2, (2*b*B*x)/(a^2 + b^2) - ((a - b^2/a)*B*log(a*cos(c + d*x) + b*sin(c + d*x)))/((a^2 + b^2)*d)]

    @test_int [(a + b*tan(c + d*x))/(b + a*tan(c + d*x))^2, x, 3, -((a*(a^2 - 3*b^2)*x)/(a^2 + b^2)^2) + (b*(3*a^2 - b^2)*log(b*cos(c + d*x) + a*sin(c + d*x)))/((a^2 + b^2)^2*d) - (a^2 - b^2)/((a^2 + b^2)*d*(b + a*tan(c + d*x)))]

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

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

    @test_int [tan(c + d*x)^3*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 11, (sqrt(a - im*b)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d + (sqrt(a + im*b)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - (2*A*sqrt(a + b*tan(c + d*x)))/d - (2*(14*a*A*b - 8*a^2*B + 35*b^2*B)*(a + b*tan(c + d*x))^(3/2))/(105*b^3*d) + (2*(7*A*b - 4*a*B)*tan(c + d*x)*(a + b*tan(c + d*x))^(3/2))/(35*b^2*d) + (2*B*tan(c + d*x)^2*(a + b*tan(c + d*x))^(3/2))/(7*b*d)]
    @test_int [tan(c + d*x)^2*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 10, (sqrt(a - im*b)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - (sqrt(a + im*b)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - (2*B*sqrt(a + b*tan(c + d*x)))/d + (2*(5*A*b - 2*a*B)*(a + b*tan(c + d*x))^(3/2))/(15*b^2*d) + (2*B*tan(c + d*x)*(a + b*tan(c + d*x))^(3/2))/(5*b*d)]
    @test_int [tan(c + d*x)*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 9, -((sqrt(a - im*b)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d) - (sqrt(a + im*b)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + (2*A*sqrt(a + b*tan(c + d*x)))/d + (2*B*(a + b*tan(c + d*x))^(3/2))/(3*b*d)]
    @test_int [sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 8, -((sqrt(a - im*b)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d) + (sqrt(a + im*b)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + (2*B*sqrt(a + b*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 11, (-2*sqrt(a)*A*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/d + (sqrt(a - im*b)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d + (sqrt(a + im*b)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d]
    @test_int [cot(c + d*x)^2*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 12, -(((A*b + 2*a*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(sqrt(a)*d)) + (sqrt(a - im*b)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - (sqrt(a + im*b)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - (A*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 13, ((8*a^2*A + A*b^2 - 4*a*b*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(4*a^(3/2)*d) - (sqrt(a - im*b)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - (sqrt(a + im*b)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - ((A*b + 4*a*B)*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/(4*a*d) - (A*cot(c + d*x)^2*sqrt(a + b*tan(c + d*x)))/(2*d)]
    @test_int [cot(c + d*x)^4*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 14, ((8*a^2*A*b - A*b^3 + 16*a^3*B + 2*a*b^2*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(8*a^(5/2)*d) - (sqrt(a - im*b)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d + (sqrt(a + im*b)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + ((8*a^2*A + A*b^2 - 2*a*b*B)*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/(8*a^2*d) - ((A*b + 6*a*B)*cot(c + d*x)^2*sqrt(a + b*tan(c + d*x)))/(12*a*d) - (A*cot(c + d*x)^3*sqrt(a + b*tan(c + d*x)))/(3*d)]

    @test_int [tan(c + d*x)^2*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 11, ((a - im*b)^(3/2)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - ((a + im*b)^(3/2)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - (2*(A*b + a*B)*sqrt(a + b*tan(c + d*x)))/d - (2*B*(a + b*tan(c + d*x))^(3/2))/(3*d) + (2*(7*A*b - 2*a*B)*(a + b*tan(c + d*x))^(5/2))/(35*b^2*d) + (2*B*tan(c + d*x)*(a + b*tan(c + d*x))^(5/2))/(7*b*d)]
    @test_int [tan(c + d*x)*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 10, -(((a - im*b)^(3/2)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d) - ((a + im*b)^(3/2)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + (2*(a*A - b*B)*sqrt(a + b*tan(c + d*x)))/d + (2*A*(a + b*tan(c + d*x))^(3/2))/(3*d) + (2*B*(a + b*tan(c + d*x))^(5/2))/(5*b*d)]
    @test_int [(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 9, -(((a - im*b)^(3/2)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d) + ((a + im*b)^(3/2)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + (2*(A*b + a*B)*sqrt(a + b*tan(c + d*x)))/d + (2*B*(a + b*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 12, (-2*a^(3/2)*A*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/d + ((a - im*b)^(3/2)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d + ((a + im*b)^(3/2)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + (2*b*B*sqrt(a + b*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^2*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 12, -((sqrt(a)*(3*A*b + 2*a*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/d) + ((a - im*b)^(3/2)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - ((a + im*b)^(3/2)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - (a*A*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/d]
    @test_int [cot(c + d*x)^3*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 13, ((8*a^2*A - 3*A*b^2 - 12*a*b*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(4*sqrt(a)*d) - ((a - im*b)^(3/2)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - ((a + im*b)^(3/2)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - ((5*A*b + 4*a*B)*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/(4*d) - (a*A*cot(c + d*x)^2*sqrt(a + b*tan(c + d*x)))/(2*d)]
    @test_int [cot(c + d*x)^4*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 14, ((24*a^2*A*b + A*b^3 + 16*a^3*B - 6*a*b^2*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(8*a^(3/2)*d) - ((a - im*b)^(3/2)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d + ((a + im*b)^(3/2)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + ((8*a^2*A - A*b^2 - 10*a*b*B)*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/(8*a*d) - ((7*A*b + 6*a*B)*cot(c + d*x)^2*sqrt(a + b*tan(c + d*x)))/(12*d) - (a*A*cot(c + d*x)^3*sqrt(a + b*tan(c + d*x)))/(3*d)]

    @test_int [tan(c + d*x)^2*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 12, ((a - im*b)^(5/2)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - ((a + im*b)^(5/2)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - (2*(2*a*A*b + a^2*B - b^2*B)*sqrt(a + b*tan(c + d*x)))/d - (2*(A*b + a*B)*(a + b*tan(c + d*x))^(3/2))/(3*d) - (2*B*(a + b*tan(c + d*x))^(5/2))/(5*d) + (2*(9*A*b - 2*a*B)*(a + b*tan(c + d*x))^(7/2))/(63*b^2*d) + (2*B*tan(c + d*x)*(a + b*tan(c + d*x))^(7/2))/(9*b*d)]
    @test_int [tan(c + d*x)*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 11, -(((a - im*b)^(5/2)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d) - ((a + im*b)^(5/2)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + (2*(a^2*A - A*b^2 - 2*a*b*B)*sqrt(a + b*tan(c + d*x)))/d + (2*(a*A - b*B)*(a + b*tan(c + d*x))^(3/2))/(3*d) + (2*A*(a + b*tan(c + d*x))^(5/2))/(5*d) + (2*B*(a + b*tan(c + d*x))^(7/2))/(7*b*d)]
    @test_int [(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 10, -(((a - im*b)^(5/2)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d) + ((a + im*b)^(5/2)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + (2*(2*a*A*b + a^2*B - b^2*B)*sqrt(a + b*tan(c + d*x)))/d + (2*(A*b + a*B)*(a + b*tan(c + d*x))^(3/2))/(3*d) + (2*B*(a + b*tan(c + d*x))^(5/2))/(5*d)]
    @test_int [cot(c + d*x)*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 13, (-2*a^(5/2)*A*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/d + ((a - im*b)^(5/2)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d + ((a + im*b)^(5/2)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + (2*b*(A*b + 2*a*B)*sqrt(a + b*tan(c + d*x)))/d + (2*b*B*(a + b*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)^2*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 13, -((a^(3/2)*(5*A*b + 2*a*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/d) + ((a - im*b)^(5/2)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - ((a + im*b)^(5/2)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + (b*(a*A + 2*b*B)*sqrt(a + b*tan(c + d*x)))/d - (a*A*cot(c + d*x)*(a + b*tan(c + d*x))^(3/2))/d]
    @test_int [cot(c + d*x)^3*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 13, (sqrt(a)*(8*a^2*A - 15*A*b^2 - 20*a*b*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(4*d) - ((a - im*b)^(5/2)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - ((a + im*b)^(5/2)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - (a*(7*A*b + 4*a*B)*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/(4*d) - (a*A*cot(c + d*x)^2*(a + b*tan(c + d*x))^(3/2))/(2*d)]
    @test_int [cot(c + d*x)^4*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 14, ((40*a^2*A*b - 5*A*b^3 + 16*a^3*B - 30*a*b^2*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(8*sqrt(a)*d) - ((a - im*b)^(5/2)*(im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d + ((a + im*b)^(5/2)*(im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + ((8*a^2*A - 11*A*b^2 - 18*a*b*B)*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/(8*d) - (a*(3*A*b + 2*a*B)*cot(c + d*x)^2*sqrt(a + b*tan(c + d*x)))/(4*d) - (a*A*cot(c + d*x)^3*(a + b*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)^5*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 15, -((128*a^4*A - 240*a^2*A*b^2 - 5*A*b^4 - 320*a^3*b*B + 40*a*b^3*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(64*a^(3/2)*d) + ((a - im*b)^(5/2)*(A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d + ((a + im*b)^(5/2)*(A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d + ((144*a^2*A*b - 5*A*b^3 + 64*a^3*B - 88*a*b^2*B)*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/(64*a*d) + ((48*a^2*A - 59*A*b^2 - 104*a*b*B)*cot(c + d*x)^2*sqrt(a + b*tan(c + d*x)))/(96*d) - (a*(11*A*b + 8*a*B)*cot(c + d*x)^3*sqrt(a + b*tan(c + d*x)))/(24*d) - (a*A*cot(c + d*x)^4*(a + b*tan(c + d*x))^(3/2))/(4*d)]

    @test_int [(-a + b*tan(c + d*x))*(a + b*tan(c + d*x))^(5/2), x, 10, ((im*a - b)*(a - im*b)^(5/2)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/d - ((a + im*b)^(5/2)*(im*a + b)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/d - (2*b*(a^2 + b^2)*sqrt(a + b*tan(c + d*x)))/d + (2*b*(a + b*tan(c + d*x))^(5/2))/(5*d)]
    @test_int [(-a + b*tan(c + d*x))*(a + b*tan(c + d*x))^(3/2), x, 13, -((b*(a^2 + b^2)*atanh((sqrt(a + sqrt(a^2 + b^2)) - sqrt(2)*sqrt(a + b*tan(c + d*x)))/sqrt(a - sqrt(a^2 + b^2))))/(sqrt(2)*sqrt(a - sqrt(a^2 + b^2))*d)) + (b*(a^2 + b^2)*atanh((sqrt(a + sqrt(a^2 + b^2)) + sqrt(2)*sqrt(a + b*tan(c + d*x)))/sqrt(a - sqrt(a^2 + b^2))))/(sqrt(2)*sqrt(a - sqrt(a^2 + b^2))*d) - (b*(a^2 + b^2)*log(a + sqrt(a^2 + b^2) + b*tan(c + d*x) - sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*sqrt(a + b*tan(c + d*x))))/(2*sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*d) + (b*(a^2 + b^2)*log(a + sqrt(a^2 + b^2) + b*tan(c + d*x) + sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*sqrt(a + b*tan(c + d*x))))/(2*sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*d) + (2*b*(a + b*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [(-a + b*tan(c + d*x))*(a + b*tan(c + d*x))^(1/2), x, 13, -((b*sqrt(a^2 + b^2)*atanh((sqrt(a + sqrt(a^2 + b^2)) - sqrt(2)*sqrt(a + b*tan(c + d*x)))/sqrt(a - sqrt(a^2 + b^2))))/(sqrt(2)*sqrt(a - sqrt(a^2 + b^2))*d)) + (b*sqrt(a^2 + b^2)*atanh((sqrt(a + sqrt(a^2 + b^2)) + sqrt(2)*sqrt(a + b*tan(c + d*x)))/sqrt(a - sqrt(a^2 + b^2))))/(sqrt(2)*sqrt(a - sqrt(a^2 + b^2))*d) + (b*sqrt(a^2 + b^2)*log(a + sqrt(a^2 + b^2) + b*tan(c + d*x) - sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*sqrt(a + b*tan(c + d*x))))/(2*sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*d) - (b*sqrt(a^2 + b^2)*log(a + sqrt(a^2 + b^2) + b*tan(c + d*x) + sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*sqrt(a + b*tan(c + d*x))))/(2*sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*d) + (2*b*sqrt(a + b*tan(c + d*x)))/d]

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

    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 10, ((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/(sqrt(a - im*b)*d) + ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/(sqrt(a + im*b)*d) - (2*(10*a*A*b - 8*a^2*B + 15*b^2*B)*sqrt(a + b*tan(c + d*x)))/(15*b^3*d) + (2*(5*A*b - 4*a*B)*tan(c + d*x)*sqrt(a + b*tan(c + d*x)))/(15*b^2*d) + (2*B*tan(c + d*x)^2*sqrt(a + b*tan(c + d*x)))/(5*b*d)]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 9, ((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/(sqrt(a - im*b)*d) - ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/(sqrt(a + im*b)*d) + (2*(3*A*b - 2*a*B)*sqrt(a + b*tan(c + d*x)))/(3*b^2*d) + (2*B*tan(c + d*x)*sqrt(a + b*tan(c + d*x)))/(3*b*d)]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 8, -(((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/(sqrt(a - im*b)*d)) - ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/(sqrt(a + im*b)*d) + (2*B*sqrt(a + b*tan(c + d*x)))/(b*d)]
    @test_int [(A + B*tan(c + d*x))/sqrt(a + b*tan(c + d*x)), x, 7, -(((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/(sqrt(a - im*b)*d)) + ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/(sqrt(a + im*b)*d)]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 11, (-2*A*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(sqrt(a)*d) + ((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/(sqrt(a - im*b)*d) + ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/(sqrt(a + im*b)*d)]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 12, ((A*b - 2*a*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(a^(3/2)*d) + ((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/(sqrt(a - im*b)*d) - ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/(sqrt(a + im*b)*d) - (A*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/(a*d)]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 13, ((8*a^2*A - 3*A*b^2 + 4*a*b*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(4*a^(5/2)*d) - ((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/(sqrt(a - im*b)*d) - ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/(sqrt(a + im*b)*d) + ((3*A*b - 4*a*B)*cot(c + d*x)*sqrt(a + b*tan(c + d*x)))/(4*a^2*d) - (A*cot(c + d*x)^2*sqrt(a + b*tan(c + d*x)))/(2*a*d)]

    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 10, ((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(3/2)*d) + ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(3/2)*d) + (2*a*(A*b - a*B)*tan(c + d*x)^2)/(b*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x))) + (2*(6*a^2*A*b + 3*A*b^3 - 8*a^3*B - 5*a*b^2*B)*sqrt(a + b*tan(c + d*x)))/(3*b^3*(a^2 + b^2)*d) - (2*(3*a*A*b - 4*a^2*B - b^2*B)*tan(c + d*x)*sqrt(a + b*tan(c + d*x)))/(3*b^2*(a^2 + b^2)*d)]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 9, ((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(3/2)*d) - ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(3/2)*d) - (2*a^2*(A*b - a*B))/(b^2*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x))) + (2*B*sqrt(a + b*tan(c + d*x)))/(b^2*d)]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 8, -(((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(3/2)*d)) - ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(3/2)*d) + (2*a*(A*b - a*B))/(b*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + b*tan(c + d*x))^(3/2), x, 8, -(((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(3/2)*d)) + ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(3/2)*d) - (2*(A*b - a*B))/((a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 12, (-2*A*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(a^(3/2)*d) + ((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(3/2)*d) + ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(3/2)*d) + (2*b*(A*b - a*B))/(a*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 13, ((3*A*b - 2*a*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(a^(5/2)*d) + ((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(3/2)*d) - ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(3/2)*d) - (b*(a^2*A + 3*A*b^2 - 2*a*b*B))/(a^2*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x))) - (A*cot(c + d*x))/(a*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 14, ((8*a^2*A - 15*A*b^2 + 12*a*b*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(4*a^(7/2)*d) - ((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(3/2)*d) - ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(3/2)*d) + (b*(7*a^2*A*b + 15*A*b^3 - 4*a^3*B - 12*a*b^2*B))/(4*a^3*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x))) + ((5*A*b - 4*a*B)*cot(c + d*x))/(4*a^2*d*sqrt(a + b*tan(c + d*x))) - (A*cot(c + d*x)^2)/(2*a*d*sqrt(a + b*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^4*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 11, -(((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(5/2)*d)) + ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(5/2)*d) + (2*a*(A*b - a*B)*tan(c + d*x)^3)/(3*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) + (2*a*(a^2*A*b + 3*A*b^3 - 2*a^3*B - 4*a*b^2*B)*tan(c + d*x)^2)/(b^2*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x))) + (2*(8*a^4*A*b + 17*a^2*A*b^3 + 3*A*b^5 - 16*a^5*B - 30*a^3*b^2*B - 8*a*b^4*B)*sqrt(a + b*tan(c + d*x)))/(3*b^4*(a^2 + b^2)^2*d) - (2*(4*a^3*A*b + 10*a*A*b^3 - 8*a^4*B - 15*a^2*b^2*B - b^4*B)*tan(c + d*x)*sqrt(a + b*tan(c + d*x)))/(3*b^3*(a^2 + b^2)^2*d)]
    @test_int [(tan(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 10, ((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(5/2)*d) + ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(5/2)*d) + (2*a*(A*b - a*B)*tan(c + d*x)^2)/(3*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) - (2*a^2*(a^2*A*b + 7*A*b^3 - 4*a^3*B - 10*a*b^2*B))/(3*b^3*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x))) - (2*(a*A*b - 4*a^2*B - 3*b^2*B)*sqrt(a + b*tan(c + d*x)))/(3*b^3*(a^2 + b^2)*d)]
    @test_int [(tan(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 9, ((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(5/2)*d) - ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(5/2)*d) - (2*a^2*(A*b - a*B))/(3*b^2*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) + (2*a*(2*A*b^3 - a*(a^2 + 3*b^2)*B))/(b^2*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 9, -(((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(5/2)*d)) - ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(5/2)*d) + (2*a*(A*b - a*B))/(3*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) + (2*(a^2*A - A*b^2 + 2*a*b*B))/((a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(a + b*tan(c + d*x))^(5/2), x, 9, -(((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(5/2)*d)) + ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(5/2)*d) - (2*(A*b - a*B))/(3*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) - (2*(2*a*A*b - a^2*B + b^2*B))/((a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 13, (-2*A*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(a^(5/2)*d) + ((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(5/2)*d) + ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(5/2)*d) + (2*b*(A*b - a*B))/(3*a*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) + (2*b*(3*a^2*A*b + A*b^3 - 2*a^3*B))/(a^2*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^2*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 14, ((5*A*b - 2*a*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(a^(7/2)*d) + ((im*A + B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(5/2)*d) - ((im*A - B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(5/2)*d) - (b*(3*a^2*A + 5*A*b^2 - 2*a*b*B))/(3*a^2*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) - (A*cot(c + d*x))/(a*d*(a + b*tan(c + d*x))^(3/2)) - (b*(a^4*A + 10*a^2*A*b^2 + 5*A*b^4 - 6*a^3*b*B - 2*a*b^3*B))/(a^3*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^3*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 15, ((8*a^2*A - 35*A*b^2 + 20*a*b*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(4*a^(9/2)*d) - ((A - im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(5/2)*d) - ((A + im*B)*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(5/2)*d) + (b*(27*a^2*A*b + 35*A*b^3 - 12*a^3*B - 20*a*b^2*B))/(12*a^3*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) + ((7*A*b - 4*a*B)*cot(c + d*x))/(4*a^2*d*(a + b*tan(c + d*x))^(3/2)) - (A*cot(c + d*x)^2)/(2*a*d*(a + b*tan(c + d*x))^(3/2)) + (b*(11*a^4*A*b + 62*a^2*A*b^3 + 35*A*b^5 - 4*a^5*B - 40*a^3*b^2*B - 20*a*b^4*B))/(4*a^4*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]

    @test_int [(a*B + b*B*tan(c + d*x))/sqrt(a + b*tan(c + d*x)), x, 12, (b*B*atanh((sqrt(a + sqrt(a^2 + b^2)) - sqrt(2)*sqrt(a + b*tan(c + d*x)))/sqrt(a - sqrt(a^2 + b^2))))/(sqrt(2)*sqrt(a - sqrt(a^2 + b^2))*d) - (b*B*atanh((sqrt(a + sqrt(a^2 + b^2)) + sqrt(2)*sqrt(a + b*tan(c + d*x)))/sqrt(a - sqrt(a^2 + b^2))))/(sqrt(2)*sqrt(a - sqrt(a^2 + b^2))*d) + (b*B*log(a + sqrt(a^2 + b^2) + b*tan(c + d*x) - sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*sqrt(a + b*tan(c + d*x))))/(2*sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*d) - (b*B*log(a + sqrt(a^2 + b^2) + b*tan(c + d*x) + sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*sqrt(a + b*tan(c + d*x))))/(2*sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(a + b*tan(c + d*x))^(3/2), x, 12, (b*B*atanh((sqrt(a + sqrt(a^2 + b^2)) - sqrt(2)*sqrt(a + b*tan(c + d*x)))/sqrt(a - sqrt(a^2 + b^2))))/(sqrt(2)*sqrt(a^2 + b^2)*sqrt(a - sqrt(a^2 + b^2))*d) - (b*B*atanh((sqrt(a + sqrt(a^2 + b^2)) + sqrt(2)*sqrt(a + b*tan(c + d*x)))/sqrt(a - sqrt(a^2 + b^2))))/(sqrt(2)*sqrt(a^2 + b^2)*sqrt(a - sqrt(a^2 + b^2))*d) - (b*B*log(a + sqrt(a^2 + b^2) + b*tan(c + d*x) - sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*sqrt(a + b*tan(c + d*x))))/(2*sqrt(2)*sqrt(a^2 + b^2)*sqrt(a + sqrt(a^2 + b^2))*d) + (b*B*log(a + sqrt(a^2 + b^2) + b*tan(c + d*x) + sqrt(2)*sqrt(a + sqrt(a^2 + b^2))*sqrt(a + b*tan(c + d*x))))/(2*sqrt(2)*sqrt(a^2 + b^2)*sqrt(a + sqrt(a^2 + b^2))*d)]
    @test_int [(cot(c + d*x)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 12, (-2*B*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(sqrt(a)*d) + (B*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/(sqrt(a - im*b)*d) + (B*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/(sqrt(a + im*b)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(a + b*tan(c + d*x))^(5/2), x, 9, ((-im)*B*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(3/2)*d) + (im*B*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(3/2)*d) - (2*b*B)/((a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 13, (-2*B*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a)))/(a^(3/2)*d) + (B*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/((a - im*b)^(3/2)*d) + (B*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/((a + im*b)^(3/2)*d) + (2*b^2*B)/(a*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]

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

    @test_int [(1 + im*tan(c + d*x))/sqrt(a + b*tan(c + d*x)), x, 3, -((2*im*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a - im*b)))/(sqrt(a - im*b)*d))]
    @test_int [(1 - im*tan(c + d*x))/sqrt(a + b*tan(c + d*x)), x, 3, (2*im*atanh(sqrt(a + b*tan(c + d*x))/sqrt(a + im*b)))/(sqrt(a + im*b)*d)]

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

    @test_int [(4 - 3*tan(a + b*x))/sqrt(4 + 3*tan(a + b*x)), x, 5, -((9*atan((1 - 3*tan(a + b*x))/(sqrt(2)*sqrt(4 + 3*tan(a + b*x)))))/(5*sqrt(2)*b)) + (13*atanh((3 + tan(a + b*x))/(sqrt(2)*sqrt(4 + 3*tan(a + b*x)))))/(5*sqrt(2)*b)]

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

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

    @test_int [tan(c + d*x)^(5/2)*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 14, ((a*(A - B) - b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((a*(A - B) - b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((b*(A - B) + a*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + ((b*(A - B) + a*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*(A*b + a*B)*sqrt(tan(c + d*x)))/d + (2*(a*A - b*B)*tan(c + d*x)^(3/2))/(3*d) + (2*(A*b + a*B)*tan(c + d*x)^(5/2))/(5*d) + (2*b*B*tan(c + d*x)^(7/2))/(7*d)]
    @test_int [tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 13, ((b*(A - B) + a*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((b*(A - B) + a*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((a*(A - B) - b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((a*(A - B) - b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*(a*A - b*B)*sqrt(tan(c + d*x)))/d + (2*(A*b + a*B)*tan(c + d*x)^(3/2))/(3*d) + (2*b*B*tan(c + d*x)^(5/2))/(5*d)]
    @test_int [sqrt(tan(c + d*x))*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 12, -(((a*(A - B) - b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + ((a*(A - B) - b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((b*(A - B) + a*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((b*(A - B) + a*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*(A*b + a*B)*sqrt(tan(c + d*x)))/d + (2*b*B*tan(c + d*x)^(3/2))/(3*d)]
    @test_int [((a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 11, -(((b*(A - B) + a*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + ((b*(A - B) + a*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((a*(A - B) - b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + ((a*(A - B) - b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*b*B*sqrt(tan(c + d*x)))/d]
    @test_int [((a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 11, ((a*(A - B) - b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((a*(A - B) - b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((b*(A - B) + a*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + ((b*(A - B) + a*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*a*A)/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 12, ((b*(A - B) + a*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((b*(A - B) + a*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((a*(A - B) - b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((a*(A - B) - b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*a*A)/(3*d*tan(c + d*x)^(3/2)) - (2*(A*b + a*B))/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 13, -(((a*(A - B) - b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + ((a*(A - B) - b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((b*(A - B) + a*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((b*(A - B) + a*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*a*A)/(5*d*tan(c + d*x)^(5/2)) - (2*(A*b + a*B))/(3*d*tan(c + d*x)^(3/2)) + (2*(a*A - b*B))/(d*sqrt(tan(c + d*x)))]

    @test_int [tan(c + d*x)^(5/2)*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 15, ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*(2*a*A*b + a^2*B - b^2*B)*sqrt(tan(c + d*x)))/d + (2*(a^2*A - A*b^2 - 2*a*b*B)*tan(c + d*x)^(3/2))/(3*d) + (2*(2*a*A*b + a^2*B - b^2*B)*tan(c + d*x)^(5/2))/(5*d) + (2*b*(9*A*b + 11*a*B)*tan(c + d*x)^(7/2))/(63*d) + (2*b*B*tan(c + d*x)^(7/2)*(a + b*tan(c + d*x)))/(9*d)]
    @test_int [tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 14, ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*(a^2*A - A*b^2 - 2*a*b*B)*sqrt(tan(c + d*x)))/d + (2*(2*a*A*b + a^2*B - b^2*B)*tan(c + d*x)^(3/2))/(3*d) + (2*b*(7*A*b + 9*a*B)*tan(c + d*x)^(5/2))/(35*d) + (2*b*B*tan(c + d*x)^(5/2)*(a + b*tan(c + d*x)))/(7*d)]
    @test_int [sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 13, -(((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*(2*a*A*b + a^2*B - b^2*B)*sqrt(tan(c + d*x)))/d + (2*b*(5*A*b + 7*a*B)*tan(c + d*x)^(3/2))/(15*d) + (2*b*B*tan(c + d*x)^(3/2)*(a + b*tan(c + d*x)))/(5*d)]
    @test_int [((a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 12, -(((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*b*(3*A*b + 5*a*B)*sqrt(tan(c + d*x)))/(3*d) + (2*b*B*sqrt(tan(c + d*x))*(a + b*tan(c + d*x)))/(3*d)]
    @test_int [((a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 12, ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*a^2*A)/(d*sqrt(tan(c + d*x))) + (2*b^2*B*sqrt(tan(c + d*x)))/d]
    @test_int [((a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 12, ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*a^2*A)/(3*d*tan(c + d*x)^(3/2)) - (2*a*(2*A*b + a*B))/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 13, -(((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*a^2*A)/(5*d*tan(c + d*x)^(5/2)) - (2*a*(2*A*b + a*B))/(3*d*tan(c + d*x)^(3/2)) + (2*(a^2*A - A*b^2 - 2*a*b*B))/(d*sqrt(tan(c + d*x)))]

    @test_int [tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 15, ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*(a^3*A - 3*a*A*b^2 - 3*a^2*b*B + b^3*B)*sqrt(tan(c + d*x)))/d + (2*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*tan(c + d*x)^(3/2))/(3*d) + (2*b*(27*a*A*b + 22*a^2*B - 9*b^2*B)*tan(c + d*x)^(5/2))/(45*d) + (2*b^2*(9*A*b + 13*a*B)*tan(c + d*x)^(7/2))/(63*d) + (2*b*B*tan(c + d*x)^(5/2)*(a + b*tan(c + d*x))^2)/(9*d)]
    @test_int [sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 14, -(((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*sqrt(tan(c + d*x)))/d + (2*b*(21*a*A*b + 18*a^2*B - 7*b^2*B)*tan(c + d*x)^(3/2))/(21*d) + (2*b^2*(7*A*b + 11*a*B)*tan(c + d*x)^(5/2))/(35*d) + (2*b*B*tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^2)/(7*d)]
    @test_int [((a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 13, -(((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*b*(15*a*A*b + 14*a^2*B - 5*b^2*B)*sqrt(tan(c + d*x)))/(5*d) + (2*b^2*(5*A*b + 9*a*B)*tan(c + d*x)^(3/2))/(15*d) + (2*b*B*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^2)/(5*d)]
    @test_int [((a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 13, ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*b*(2*a^2*A + A*b^2 + 3*a*b*B)*sqrt(tan(c + d*x)))/d + (2*b^2*(3*a*A + b*B)*tan(c + d*x)^(3/2))/(3*d) - (2*a*A*(a + b*tan(c + d*x))^2)/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 13, ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*a^2*(7*A*b + 3*a*B))/(3*d*sqrt(tan(c + d*x))) + (2*b^2*(a*A + 3*b*B)*sqrt(tan(c + d*x)))/(3*d) - (2*a*A*(a + b*tan(c + d*x))^2)/(3*d*tan(c + d*x)^(3/2))]
    @test_int [((a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 13, -(((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*a^2*(9*A*b + 5*a*B))/(15*d*tan(c + d*x)^(3/2)) + (2*a*(5*a^2*A - 14*A*b^2 - 15*a*b*B))/(5*d*sqrt(tan(c + d*x))) - (2*a*A*(a + b*tan(c + d*x))^2)/(5*d*tan(c + d*x)^(5/2))]

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

    @test_int [(tan(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 16, ((a*(A - B) + b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - ((a*(A - B) + b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - (2*a^(5/2)*(A*b - a*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(b^(5/2)*(a^2 + b^2)*d) + ((b*(A - B) - a*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((b*(A - B) - a*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + (2*(A*b - a*B)*sqrt(tan(c + d*x)))/(b^2*d) + (2*B*tan(c + d*x)^(3/2))/(3*b*d)]
    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 15, -(((b*(A - B) - a*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d)) + ((b*(A - B) - a*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) + (2*a^(3/2)*(A*b - a*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(b^(3/2)*(a^2 + b^2)*d) + ((a*(A - B) + b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((a*(A - B) + b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + (2*B*sqrt(tan(c + d*x)))/(b*d)]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 14, -(((a*(A - B) + b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d)) + ((a*(A - B) + b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - (2*sqrt(a)*(A*b - a*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(sqrt(b)*(a^2 + b^2)*d) - ((b*(A - B) - a*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + ((b*(A - B) - a*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + b*tan(c + d*x))), x, 14, ((b*(A - B) - a*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - ((b*(A - B) - a*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) + (2*sqrt(b)*(A*b - a*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(sqrt(a)*(a^2 + b^2)*d) - ((a*(A - B) + b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + ((a*(A - B) + b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))), x, 15, ((a*(A - B) + b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - ((a*(A - B) + b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - (2*b^(3/2)*(A*b - a*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(a^(3/2)*(a^2 + b^2)*d) + ((b*(A - B) - a*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((b*(A - B) - a*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - (2*A)/(a*d*sqrt(tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + b*tan(c + d*x))), x, 16, -(((b*(A - B) - a*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d)) + ((b*(A - B) - a*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) + (2*b^(5/2)*(A*b - a*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(a^(5/2)*(a^2 + b^2)*d) + ((a*(A - B) + b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((a*(A - B) + b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - (2*A)/(3*a*d*tan(c + d*x)^(3/2)) + (2*(A*b - a*B))/(a^2*d*sqrt(tan(c + d*x)))]

    @test_int [(tan(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 16, ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) + (a^(3/2)*(a^2*A*b + 5*A*b^3 - 3*a^3*B - 7*a*b^2*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(b^(5/2)*(a^2 + b^2)^2*d) + ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - ((a*A*b - 3*a^2*B - 2*b^2*B)*sqrt(tan(c + d*x)))/(b^2*(a^2 + b^2)*d) + (a*(A*b - a*B)*tan(c + d*x)^(3/2))/(b*(a^2 + b^2)*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 15, -(((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d)) + ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) + (sqrt(a)*(a^2*A*b - 3*A*b^3 + a^3*B + 5*a*b^2*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(b^(3/2)*(a^2 + b^2)^2*d) + ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) + (a*(A*b - a*B)*sqrt(tan(c + d*x)))/(b*(a^2 + b^2)*d*(a + b*tan(c + d*x)))]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 15, -(((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d)) + ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - ((3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(sqrt(a)*sqrt(b)*(a^2 + b^2)^2*d) - ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) + ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - ((A*b - a*B)*sqrt(tan(c + d*x)))/((a^2 + b^2)*d*(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^2), x, 15, ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) + (sqrt(b)*(5*a^2*A*b + A*b^3 - 3*a^3*B + a*b^2*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(a^(3/2)*(a^2 + b^2)^2*d) - ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) + ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) + (b*(A*b - a*B)*sqrt(tan(c + d*x)))/(a*(a^2 + b^2)*d*(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^2), x, 16, ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - (b^(3/2)*(7*a^2*A*b + 3*A*b^3 - 5*a^3*B - a*b^2*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(a^(5/2)*(a^2 + b^2)^2*d) + ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - (2*a^2*A + 3*A*b^2 - a*b*B)/(a^2*(a^2 + b^2)*d*sqrt(tan(c + d*x))) + (b*(A*b - a*B))/(a*(a^2 + b^2)*d*sqrt(tan(c + d*x))*(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + b*tan(c + d*x))^2), x, 17, -(((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d)) + ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) + (b^(5/2)*(9*a^2*A*b + 5*A*b^3 - 7*a^3*B - 3*a*b^2*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(a^(7/2)*(a^2 + b^2)^2*d) + ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - (2*a^2*A + 5*A*b^2 - 3*a*b*B)/(3*a^2*(a^2 + b^2)*d*tan(c + d*x)^(3/2)) + (4*a^2*A*b + 5*A*b^3 - 2*a^3*B - 3*a*b^2*B)/(a^3*(a^2 + b^2)*d*sqrt(tan(c + d*x))) + (b*(A*b - a*B))/(a*(a^2 + b^2)*d*tan(c + d*x)^(3/2)*(a + b*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^(7/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 17, ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) + (a^(3/2)*(3*a^4*A*b + 6*a^2*A*b^3 + 35*A*b^5 - 15*a^5*B - 46*a^3*b^2*B - 63*a*b^4*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(4*b^(7/2)*(a^2 + b^2)^3*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) - ((3*a^3*A*b + 11*a*A*b^3 - 15*a^4*B - 31*a^2*b^2*B - 8*b^4*B)*sqrt(tan(c + d*x)))/(4*b^3*(a^2 + b^2)^2*d) + (a*(A*b - a*B)*tan(c + d*x)^(5/2))/(2*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) + (a*(a^2*A*b + 9*A*b^3 - 5*a^3*B - 13*a*b^2*B)*tan(c + d*x)^(3/2))/(4*b^2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 16, ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) + (sqrt(a)*(a^4*A*b + 18*a^2*A*b^3 - 15*A*b^5 + 3*a^5*B + 6*a^3*b^2*B + 35*a*b^4*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(4*b^(5/2)*(a^2 + b^2)^3*d) + ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) - ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) + (a*(A*b - a*B)*tan(c + d*x)^(3/2))/(2*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) - (a*(a^2*A*b - 7*A*b^3 + 3*a^3*B + 11*a*b^2*B)*sqrt(tan(c + d*x)))/(4*b^2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 16, -(((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d)) + ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) + ((3*a^4*A*b - 26*a^2*A*b^3 + 3*A*b^5 + a^5*B + 18*a^3*b^2*B - 15*a*b^4*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(4*sqrt(a)*b^(3/2)*(a^2 + b^2)^3*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) + (a*(A*b - a*B)*sqrt(tan(c + d*x)))/(2*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) + ((3*a^2*A*b - 5*A*b^3 + a^3*B + 9*a*b^2*B)*sqrt(tan(c + d*x)))/(4*b*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 16, -(((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d)) + ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - ((15*a^4*A*b - 18*a^2*A*b^3 - A*b^5 - 3*a^5*B + 26*a^3*b^2*B - 3*a*b^4*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(4*a^(3/2)*sqrt(b)*(a^2 + b^2)^3*d) - ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) + ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) - ((A*b - a*B)*sqrt(tan(c + d*x)))/(2*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) - ((7*a^2*A*b - A*b^3 - 3*a^3*B + 5*a*b^2*B)*sqrt(tan(c + d*x)))/(4*a*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^3), x, 16, ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) + (sqrt(b)*(35*a^4*A*b + 6*a^2*A*b^3 + 3*A*b^5 - 15*a^5*B + 18*a^3*b^2*B + a*b^4*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(4*a^(5/2)*(a^2 + b^2)^3*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) + (b*(A*b - a*B)*sqrt(tan(c + d*x)))/(2*a*(a^2 + b^2)*d*(a + b*tan(c + d*x))^2) + (b*(11*a^2*A*b + 3*A*b^3 - 7*a^3*B + a*b^2*B)*sqrt(tan(c + d*x)))/(4*a^2*(a^2 + b^2)^2*d*(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^3), x, 17, ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - (b^(3/2)*(63*a^4*A*b + 46*a^2*A*b^3 + 15*A*b^5 - 35*a^5*B - 6*a^3*b^2*B - 3*a*b^4*B)*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(4*a^(7/2)*(a^2 + b^2)^3*d) + ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) - ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) - (8*a^4*A + 31*a^2*A*b^2 + 15*A*b^4 - 11*a^3*b*B - 3*a*b^3*B)/(4*a^3*(a^2 + b^2)^2*d*sqrt(tan(c + d*x))) + (b*(A*b - a*B))/(2*a*(a^2 + b^2)*d*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^2) + (b*(13*a^2*A*b + 5*A*b^3 - 9*a^3*B - a*b^2*B))/(4*a^2*(a^2 + b^2)^2*d*sqrt(tan(c + d*x))*(a + b*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^(5/2)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 13, (B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - (B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - (B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*B*tan(c + d*x)^(3/2))/(3*d)]
    @test_int [(tan(c + d*x)^(3/2)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 13, (B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - (B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + (B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (2*B*sqrt(tan(c + d*x)))/d]
    @test_int [(sqrt(tan(c + d*x))*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 12, -((B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + (B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + (B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + b*tan(c + d*x))), x, 12, -((B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d)) + (B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - (B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))), x, 13, (B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - (B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - (B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) + (B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*B)/(d*sqrt(tan(c + d*x)))]
    @test_int [(a*B + b*B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + b*tan(c + d*x))), x, 13, (B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) - (B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*d) + (B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*d) - (2*B)/(3*d*tan(c + d*x)^(3/2))]

    @test_int [(tan(c + d*x)^(5/2)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 16, ((a + b)*B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - ((a + b)*B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - (2*a^(5/2)*B*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(b^(3/2)*(a^2 + b^2)*d) - ((a - b)*B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + ((a - b)*B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + (2*B*sqrt(tan(c + d*x)))/(b*d)]
    @test_int [(tan(c + d*x)^(3/2)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 15, ((a - b)*B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - ((a - b)*B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) + (2*a^(3/2)*B*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(sqrt(b)*(a^2 + b^2)*d) + ((a + b)*B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((a + b)*B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(sqrt(tan(c + d*x))*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 15, -(((a + b)*B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d)) + ((a + b)*B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - (2*sqrt(a)*sqrt(b)*B*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/((a^2 + b^2)*d) + ((a - b)*B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((a - b)*B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^2), x, 15, -(((a - b)*B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d)) + ((a - b)*B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) + (2*b^(3/2)*B*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(sqrt(a)*(a^2 + b^2)*d) - ((a + b)*B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + ((a + b)*B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^2), x, 16, ((a + b)*B*atan(1 - sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - ((a + b)*B*atan(1 + sqrt(2)*sqrt(tan(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - (2*b^(5/2)*B*atan((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a)))/(a^(3/2)*(a^2 + b^2)*d) - ((a - b)*B*log(1 - sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + ((a - b)*B*log(1 + sqrt(2)*sqrt(tan(c + d*x)) + tan(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - (2*B)/(a*d*sqrt(tan(c + d*x)))]

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

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

    @test_int [tan(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 14, (sqrt(im*a - b)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((4*a*A*b - a^2*B - 8*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(4*b^(3/2)*d) + (sqrt(im*a + b)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((4*A*b - a*B)*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/(4*b*d) + (B*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2))/(2*b*d)]
    @test_int [sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 13, (sqrt(im*a - b)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((2*A*b + a*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(b)*d) - (sqrt(im*a + b)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + (B*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/d]
    @test_int [(sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 12, -((sqrt(im*a - b)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) + (2*sqrt(b)*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (sqrt(im*a + b)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d]
    @test_int [(sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 8, -((sqrt(im*a - b)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) + (sqrt(im*a + b)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*A*sqrt(a + b*tan(c + d*x)))/(d*sqrt(tan(c + d*x)))]
    @test_int [(sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 9, (sqrt(im*a - b)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + (sqrt(im*a + b)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*A*sqrt(a + b*tan(c + d*x)))/(3*d*tan(c + d*x)^(3/2)) - (2*(A*b + 3*a*B)*sqrt(a + b*tan(c + d*x)))/(3*a*d*sqrt(tan(c + d*x)))]
    @test_int [(sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 10, (sqrt(im*a - b)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (sqrt(im*a + b)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*A*sqrt(a + b*tan(c + d*x)))/(5*d*tan(c + d*x)^(5/2)) - (2*(A*b + 5*a*B)*sqrt(a + b*tan(c + d*x)))/(15*a*d*tan(c + d*x)^(3/2)) + (2*(15*a^2*A + 2*A*b^2 - 5*a*b*B)*sqrt(a + b*tan(c + d*x)))/(15*a^2*d*sqrt(tan(c + d*x)))]
    @test_int [(sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/tan(c + d*x)^(9/2), x, 11, -((sqrt(im*a - b)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) - (sqrt(im*a + b)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*A*sqrt(a + b*tan(c + d*x)))/(7*d*tan(c + d*x)^(7/2)) - (2*(A*b + 7*a*B)*sqrt(a + b*tan(c + d*x)))/(35*a*d*tan(c + d*x)^(5/2)) + (2*(35*a^2*A + 4*A*b^2 - 7*a*b*B)*sqrt(a + b*tan(c + d*x)))/(105*a^2*d*tan(c + d*x)^(3/2)) + (2*(35*a^2*A*b - 8*A*b^3 + 105*a^3*B + 14*a*b^2*B)*sqrt(a + b*tan(c + d*x)))/(105*a^3*d*sqrt(tan(c + d*x)))]

    @test_int [tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 15, ((im*a - b)^(3/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((6*a^2*A*b - 16*A*b^3 - a^3*B - 24*a*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(8*b^(3/2)*d) + ((im*a + b)^(3/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((6*a*A*b - a^2*B - 8*b^2*B)*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/(8*b*d) + ((6*A*b - a*B)*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2))/(12*b*d) + (B*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(5/2))/(3*b*d)]
    @test_int [sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 14, ((a + im*b)^2*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d) + ((12*a*A*b + 3*a^2*B - 8*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(4*sqrt(b)*d) + ((im*a + b)^(3/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((4*A*b + 5*a*B)*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/(4*d) + (b*B*tan(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(2*d)]
    @test_int [((a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 13, -(((im*a - b)^(3/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) + (sqrt(b)*(2*A*b + 3*a*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - ((im*a + b)^(3/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + (b*B*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/d]
    @test_int [((a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 13, -(((a + im*b)^2*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d)) + (2*b^(3/2)*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - ((im*a + b)^(3/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*A*sqrt(a + b*tan(c + d*x)))/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 9, ((im*a - b)^(3/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((im*a + b)^(3/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*A*sqrt(a + b*tan(c + d*x)))/(3*d*tan(c + d*x)^(3/2)) - (2*(4*A*b + 3*a*B)*sqrt(a + b*tan(c + d*x)))/(3*d*sqrt(tan(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 10, ((a + im*b)^2*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d) + ((im*a + b)^(3/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*A*sqrt(a + b*tan(c + d*x)))/(5*d*tan(c + d*x)^(5/2)) - (2*(6*A*b + 5*a*B)*sqrt(a + b*tan(c + d*x)))/(15*d*tan(c + d*x)^(3/2)) + (2*(15*a^2*A - 3*A*b^2 - 20*a*b*B)*sqrt(a + b*tan(c + d*x)))/(15*a*d*sqrt(tan(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(9/2), x, 11, -(((im*a - b)^(3/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) - ((im*a + b)^(3/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*A*sqrt(a + b*tan(c + d*x)))/(7*d*tan(c + d*x)^(7/2)) - (2*(8*A*b + 7*a*B)*sqrt(a + b*tan(c + d*x)))/(35*d*tan(c + d*x)^(5/2)) + (2*(35*a^2*A - 3*A*b^2 - 42*a*b*B)*sqrt(a + b*tan(c + d*x)))/(105*a*d*tan(c + d*x)^(3/2)) + (2*(140*a^2*A*b + 6*A*b^3 + 105*a^3*B - 21*a*b^2*B)*sqrt(a + b*tan(c + d*x)))/(105*a^2*d*sqrt(tan(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(11/2), x, 12, ((im*a - b)^(3/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - ((im*a + b)^(3/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*A*sqrt(a + b*tan(c + d*x)))/(9*d*tan(c + d*x)^(9/2)) - (2*(10*A*b + 9*a*B)*sqrt(a + b*tan(c + d*x)))/(63*d*tan(c + d*x)^(7/2)) + (2*(21*a^2*A - A*b^2 - 24*a*b*B)*sqrt(a + b*tan(c + d*x)))/(105*a*d*tan(c + d*x)^(5/2)) + (2*(126*a^2*A*b + 4*A*b^3 + 105*a^3*B - 9*a*b^2*B)*sqrt(a + b*tan(c + d*x)))/(315*a^2*d*tan(c + d*x)^(3/2)) - (2*(315*a^4*A - 63*a^2*A*b^2 + 8*A*b^4 - 420*a^3*b*B - 18*a*b^3*B)*sqrt(a + b*tan(c + d*x)))/(315*a^3*d*sqrt(tan(c + d*x)))]

    @test_int [tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 16, -(((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) + ((40*a^3*A*b - 320*a*A*b^3 - 5*a^4*B - 240*a^2*b^2*B + 128*b^4*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(64*b^(3/2)*d) - ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((40*a^2*A*b - 64*A*b^3 - 5*a^3*B - 112*a*b^2*B)*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/(64*b*d) + ((40*a*A*b - 5*a^2*B - 48*b^2*B)*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2))/(96*b*d) + ((8*A*b - a*B)*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(5/2))/(24*b*d) + (B*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(7/2))/(4*b*d)]
    @test_int [sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 15, -(((im*a - b)^(5/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) + ((30*a^2*A*b - 16*A*b^3 + 5*a^3*B - 40*a*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(8*sqrt(b)*d) + ((im*a + b)^(5/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((14*a*A*b + 5*a^2*B - 8*b^2*B)*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/(8*d) + ((2*A*b + 3*a*B)*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2))/(4*d) + (b*B*tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [((a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/sqrt(tan(c + d*x)), x, 14, ((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + (sqrt(b)*(20*a*A*b + 15*a^2*B - 8*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(4*d) + ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + (b*(4*A*b + 7*a*B)*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/(4*d) + (b*B*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2))/(2*d)]
    @test_int [((a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(3/2), x, 14, ((im*a - b)^(5/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + (b^(3/2)*(2*A*b + 5*a*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - ((im*a + b)^(5/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + (b*(2*a*A + b*B)*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/d - (2*a*A*(a + b*tan(c + d*x))^(3/2))/(d*sqrt(tan(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 14, -(((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) + (2*b^(5/2)*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*(2*A*b + a*B)*sqrt(a + b*tan(c + d*x)))/(d*sqrt(tan(c + d*x))) - (2*a*A*(a + b*tan(c + d*x))^(3/2))/(3*d*tan(c + d*x)^(3/2))]
    @test_int [((a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(7/2), x, 10, -(((im*a - b)^(5/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) + ((im*a + b)^(5/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*(8*A*b + 5*a*B)*sqrt(a + b*tan(c + d*x)))/(15*d*tan(c + d*x)^(3/2)) + (2*(15*a^2*A - 23*A*b^2 - 35*a*b*B)*sqrt(a + b*tan(c + d*x)))/(15*d*sqrt(tan(c + d*x))) - (2*a*A*(a + b*tan(c + d*x))^(3/2))/(5*d*tan(c + d*x)^(5/2))]
    @test_int [((a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(9/2), x, 11, ((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d + ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*(10*A*b + 7*a*B)*sqrt(a + b*tan(c + d*x)))/(35*d*tan(c + d*x)^(5/2)) + (2*(35*a^2*A - 45*A*b^2 - 77*a*b*B)*sqrt(a + b*tan(c + d*x)))/(105*d*tan(c + d*x)^(3/2)) + (2*(245*a^2*A*b - 15*A*b^3 + 105*a^3*B - 161*a*b^2*B)*sqrt(a + b*tan(c + d*x)))/(105*a*d*sqrt(tan(c + d*x))) - (2*a*A*(a + b*tan(c + d*x))^(3/2))/(7*d*tan(c + d*x)^(7/2))]
    @test_int [((a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(11/2), x, 12, ((im*a - b)^(5/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - ((im*a + b)^(5/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*(4*A*b + 3*a*B)*sqrt(a + b*tan(c + d*x)))/(21*d*tan(c + d*x)^(7/2)) + (2*(21*a^2*A - 25*A*b^2 - 45*a*b*B)*sqrt(a + b*tan(c + d*x)))/(105*d*tan(c + d*x)^(5/2)) + (2*(231*a^2*A*b - 5*A*b^3 + 105*a^3*B - 135*a*b^2*B)*sqrt(a + b*tan(c + d*x)))/(315*a*d*tan(c + d*x)^(3/2)) - (2*(315*a^4*A - 483*a^2*A*b^2 - 10*A*b^4 - 735*a^3*b*B + 45*a*b^3*B)*sqrt(a + b*tan(c + d*x)))/(315*a^2*d*sqrt(tan(c + d*x))) - (2*a*A*(a + b*tan(c + d*x))^(3/2))/(9*d*tan(c + d*x)^(9/2))]
    @test_int [((a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/tan(c + d*x)^(13/2), x, 13, -(((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d) - ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - (2*a*(14*A*b + 11*a*B)*sqrt(a + b*tan(c + d*x)))/(99*d*tan(c + d*x)^(9/2)) + (2*(99*a^2*A - 113*A*b^2 - 209*a*b*B)*sqrt(a + b*tan(c + d*x)))/(693*d*tan(c + d*x)^(7/2)) + (2*(495*a^2*A*b - 5*A*b^3 + 231*a^3*B - 275*a*b^2*B)*sqrt(a + b*tan(c + d*x)))/(1155*a*d*tan(c + d*x)^(5/2)) - (2*(1155*a^4*A - 1485*a^2*A*b^2 - 20*A*b^4 - 2541*a^3*b*B + 55*a*b^3*B)*sqrt(a + b*tan(c + d*x)))/(3465*a^2*d*tan(c + d*x)^(3/2)) - (2*(8085*a^4*A*b - 495*a^2*A*b^3 + 40*A*b^5 + 3465*a^5*B - 5313*a^3*b^2*B - 110*a*b^4*B)*sqrt(a + b*tan(c + d*x)))/(3465*a^3*d*sqrt(tan(c + d*x))) - (2*a*A*(a + b*tan(c + d*x))^(3/2))/(11*d*tan(c + d*x)^(11/2))]

    @test_int [((a + b*tan(c + d*x))^(5/2)*((3*b*B)/(2*a) + B*tan(c + d*x)))/tan(c + d*x)^(5/2), x, 14, ((im*a - b)^(5/2)*(2*a - 3*im*b)*B*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(2*a*d) + (2*b^(5/2)*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/d - ((2*a + 3*im*b)*(im*a + b)^(5/2)*B*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(2*a*d) - (2*(a^2 + 3*b^2)*B*sqrt(a + b*tan(c + d*x)))/(d*sqrt(tan(c + d*x))) - (b*B*(a + b*tan(c + d*x))^(3/2))/(d*tan(c + d*x)^(3/2))]

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

    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 13, -(((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d)) + ((2*A*b - a*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(b^(3/2)*d) - ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d) + (B*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x)))/(b*d)]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 12, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d) + (2*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(b)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x))), x, 7, ((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d) + ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d)]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x))), x, 8, -(((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d)) + ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d) - (2*A*sqrt(a + b*tan(c + d*x)))/(a*d*sqrt(tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x))), x, 9, -(((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d)) - ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d) - (2*A*sqrt(a + b*tan(c + d*x)))/(3*a*d*tan(c + d*x)^(3/2)) + (2*(2*A*b - 3*a*B)*sqrt(a + b*tan(c + d*x)))/(3*a^2*d*sqrt(tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(7/2)*sqrt(a + b*tan(c + d*x))), x, 10, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d) - (2*A*sqrt(a + b*tan(c + d*x)))/(5*a*d*tan(c + d*x)^(5/2)) + (2*(4*A*b - 5*a*B)*sqrt(a + b*tan(c + d*x)))/(15*a^2*d*tan(c + d*x)^(3/2)) + (2*(15*a^2*A - 8*A*b^2 + 10*a*b*B)*sqrt(a + b*tan(c + d*x)))/(15*a^3*d*sqrt(tan(c + d*x)))]

    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 13, -(((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(3/2)*d)) + (2*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(b^(3/2)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(3/2)*d) + (2*a*(A*b - a*B)*sqrt(tan(c + d*x)))/(b*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 8, -(((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(3/2)*d)) + ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(3/2)*d) - (2*(A*b - a*B)*sqrt(tan(c + d*x)))/((a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2)), x, 8, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(3/2)*d) + ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(3/2)*d) + (2*b*(A*b - a*B)*sqrt(tan(c + d*x)))/(a*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2)), x, 9, ((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(3/2)*d) - ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(3/2)*d) - (2*A)/(a*d*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x))) - (2*b*(a^2*A + 2*A*b^2 - a*b*B)*sqrt(tan(c + d*x)))/(a^2*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + b*tan(c + d*x))^(3/2)), x, 10, -(((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(3/2)*d)) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(3/2)*d) - (2*A)/(3*a*d*tan(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x))) + (2*(4*A*b - 3*a*B))/(3*a^2*d*sqrt(tan(c + d*x))*sqrt(a + b*tan(c + d*x))) + (2*b*(5*a^2*A*b + 8*A*b^3 - 3*a^3*B - 6*a*b^2*B)*sqrt(tan(c + d*x)))/(3*a^3*(a^2 + b^2)*d*sqrt(a + b*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 14, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(5/2)*d) + (2*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(b^(5/2)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(5/2)*d) + (2*a*(A*b - a*B)*tan(c + d*x)^(3/2))/(3*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) + (2*a*(2*A*b^3 - a*(a^2 + 3*b^2)*B)*sqrt(tan(c + d*x)))/(b^2*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(tan(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 9, ((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(5/2)*d) + ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(5/2)*d) + (2*a*(A*b - a*B)*sqrt(tan(c + d*x)))/(3*b*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) + (2*(2*a^2*A*b - 4*A*b^3 + a^3*B + 7*a*b^2*B)*sqrt(tan(c + d*x)))/(3*b*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(sqrt(tan(c + d*x))*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 9, -(((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(5/2)*d)) + ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(5/2)*d) - (2*(A*b - a*B)*sqrt(tan(c + d*x)))/(3*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) - (2*(5*a^2*A*b - A*b^3 - 2*a^3*B + 4*a*b^2*B)*sqrt(tan(c + d*x)))/(3*a*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(5/2)), x, 9, -(((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(5/2)*d)) - ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(5/2)*d) + (2*b*(A*b - a*B)*sqrt(tan(c + d*x)))/(3*a*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) + (2*b*(8*a^2*A*b + 2*A*b^3 - 5*a^3*B + a*b^2*B)*sqrt(tan(c + d*x)))/(3*a^2*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(5/2)), x, 10, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(5/2)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(5/2)*d) - (2*A)/(a*d*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2)) - (2*b*(3*a^2*A + 4*A*b^2 - a*b*B)*sqrt(tan(c + d*x)))/(3*a^2*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) - (2*b*(3*a^4*A + 17*a^2*A*b^2 + 8*A*b^4 - 8*a^3*b*B - 2*a*b^3*B)*sqrt(tan(c + d*x)))/(3*a^3*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(tan(c + d*x)^(5/2)*(a + b*tan(c + d*x))^(5/2)), x, 11, ((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a - b)^(5/2)*d) + ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/((im*a + b)^(5/2)*d) - (2*A)/(3*a*d*tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2)) + (2*(2*A*b - a*B))/(a^2*d*sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2)) + (2*b*(7*a^2*A*b + 8*A*b^3 - 3*a^3*B - 4*a*b^2*B)*sqrt(tan(c + d*x)))/(3*a^3*(a^2 + b^2)*d*(a + b*tan(c + d*x))^(3/2)) + (2*b*(8*a^4*A*b + 30*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B - 17*a^3*b^2*B - 8*a*b^4*B)*sqrt(tan(c + d*x)))/(3*a^4*(a^2 + b^2)^2*d*sqrt(a + b*tan(c + d*x)))]

    @test_int [(tan(c + d*x)^(3/2)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 13, -((B*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d)) + (2*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(b)*d) - (B*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d)]
    @test_int [(sqrt(tan(c + d*x))*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 8, (im*B*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d) - (im*B*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(sqrt(tan(c + d*x))*(a + b*tan(c + d*x))^(3/2)), x, 8, (B*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d) + (B*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(tan(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2)), x, 10, ((-im)*B*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a - b)*d) + (im*B*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x))))/(sqrt(im*a + b)*d) - (2*B*sqrt(a + b*tan(c + d*x)))/(a*d*sqrt(tan(c + d*x)))]

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

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

    @test_int [(a + b*tan(c + d*x))^(2/3)*(A + B*tan(c + d*x)), x, 12, (-(1/4))*(a - im*b)^(2/3)*(A - im*B)*x - (1/4)*(a + im*b)^(2/3)*(A + im*B)*x + (sqrt(3)*(a - im*b)^(2/3)*(im*A + B)*atan((1 + (2*(a + b*tan(c + d*x))^(1/3))/(a - im*b)^(1/3))/sqrt(3)))/(2*d) - (sqrt(3)*(a + im*b)^(2/3)*(im*A - B)*atan((1 + (2*(a + b*tan(c + d*x))^(1/3))/(a + im*b)^(1/3))/sqrt(3)))/(2*d) - ((a + im*b)^(2/3)*(im*A - B)*log(cos(c + d*x)))/(4*d) + ((a - im*b)^(2/3)*(im*A + B)*log(cos(c + d*x)))/(4*d) + (3*(a - im*b)^(2/3)*(im*A + B)*log((a - im*b)^(1/3) - (a + b*tan(c + d*x))^(1/3)))/(4*d) - (3*(a + im*b)^(2/3)*(im*A - B)*log((a + im*b)^(1/3) - (a + b*tan(c + d*x))^(1/3)))/(4*d) + (3*B*(a + b*tan(c + d*x))^(2/3))/(2*d)]
    @test_int [(a + b*tan(c + d*x))^(1/3)*(A + B*tan(c + d*x)), x, 12, (-(1/4))*(a - im*b)^(1/3)*(A - im*B)*x - (1/4)*(a + im*b)^(1/3)*(A + im*B)*x - (sqrt(3)*(a - im*b)^(1/3)*(im*A + B)*atan((1 + (2*(a + b*tan(c + d*x))^(1/3))/(a - im*b)^(1/3))/sqrt(3)))/(2*d) + (sqrt(3)*(a + im*b)^(1/3)*(im*A - B)*atan((1 + (2*(a + b*tan(c + d*x))^(1/3))/(a + im*b)^(1/3))/sqrt(3)))/(2*d) - ((a + im*b)^(1/3)*(im*A - B)*log(cos(c + d*x)))/(4*d) + ((a - im*b)^(1/3)*(im*A + B)*log(cos(c + d*x)))/(4*d) + (3*(a - im*b)^(1/3)*(im*A + B)*log((a - im*b)^(1/3) - (a + b*tan(c + d*x))^(1/3)))/(4*d) - (3*(a + im*b)^(1/3)*(im*A - B)*log((a + im*b)^(1/3) - (a + b*tan(c + d*x))^(1/3)))/(4*d) + (3*B*(a + b*tan(c + d*x))^(1/3))/d]

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

    @test_int [(A + B*tan(c + d*x))/(a + b*tan(c + d*x))^(1/3), x, 11, -(((A - im*B)*x)/(4*(a - im*b)^(1/3))) - ((A + im*B)*x)/(4*(a + im*b)^(1/3)) + (sqrt(3)*(im*A + B)*atan((1 + (2*(a + b*tan(c + d*x))^(1/3))/(a - im*b)^(1/3))/sqrt(3)))/(2*(a - im*b)^(1/3)*d) - (sqrt(3)*(im*A - B)*atan((1 + (2*(a + b*tan(c + d*x))^(1/3))/(a + im*b)^(1/3))/sqrt(3)))/(2*(a + im*b)^(1/3)*d) - ((im*A - B)*log(cos(c + d*x)))/(4*(a + im*b)^(1/3)*d) + ((im*A + B)*log(cos(c + d*x)))/(4*(a - im*b)^(1/3)*d) + (3*(im*A + B)*log((a - im*b)^(1/3) - (a + b*tan(c + d*x))^(1/3)))/(4*(a - im*b)^(1/3)*d) - (3*(im*A - B)*log((a + im*b)^(1/3) - (a + b*tan(c + d*x))^(1/3)))/(4*(a + im*b)^(1/3)*d)]
    @test_int [(A + B*tan(c + d*x))/(a + b*tan(c + d*x))^(2/3), x, 11, -(((A - im*B)*x)/(4*(a - im*b)^(2/3))) - ((A + im*B)*x)/(4*(a + im*b)^(2/3)) - (sqrt(3)*(im*A + B)*atan((1 + (2*(a + b*tan(c + d*x))^(1/3))/(a - im*b)^(1/3))/sqrt(3)))/(2*(a - im*b)^(2/3)*d) + (sqrt(3)*(im*A - B)*atan((1 + (2*(a + b*tan(c + d*x))^(1/3))/(a + im*b)^(1/3))/sqrt(3)))/(2*(a + im*b)^(2/3)*d) - ((im*A - B)*log(cos(c + d*x)))/(4*(a + im*b)^(2/3)*d) + ((im*A + B)*log(cos(c + d*x)))/(4*(a - im*b)^(2/3)*d) + (3*(im*A + B)*log((a - im*b)^(1/3) - (a + b*tan(c + d*x))^(1/3)))/(4*(a - im*b)^(2/3)*d) - (3*(im*A - B)*log((a + im*b)^(1/3) - (a + b*tan(c + d*x))^(1/3)))/(4*(a + im*b)^(2/3)*d)]

    @test_int [(im - tan(e + f*x))/(c + d*tan(e + f*x))^(1/3), x, 5, -((im*x)/(2*(c - im*d)^(1/3))) - (sqrt(3)*atan((1 + (2*(c + d*tan(e + f*x))^(1/3))/(c - im*d)^(1/3))/sqrt(3)))/((c - im*d)^(1/3)*f) - log(cos(e + f*x))/(2*(c - im*d)^(1/3)*f) - (3*log((c - im*d)^(1/3) - (c + d*tan(e + f*x))^(1/3)))/(2*(c - im*d)^(1/3)*f)]

    @test_int [(d - c*tan(e + f*x))/(c + d*tan(e + f*x))^(2/3), x, 11, (-(1/4))*im*(c - im*d)^(1/3)*x + (1/4)*im*(c + im*d)^(1/3)*x + (sqrt(3)*(c - im*d)^(1/3)*atan((1 + (2*(c + d*tan(e + f*x))^(1/3))/(c - im*d)^(1/3))/sqrt(3)))/(2*f) + (sqrt(3)*(c + im*d)^(1/3)*atan((1 + (2*(c + d*tan(e + f*x))^(1/3))/(c + im*d)^(1/3))/sqrt(3)))/(2*f) - ((c - im*d)^(1/3)*log(cos(e + f*x)))/(4*f) - ((c + im*d)^(1/3)*log(cos(e + f*x)))/(4*f) - (3*(c - im*d)^(1/3)*log((c - im*d)^(1/3) - (c + d*tan(e + f*x))^(1/3)))/(4*f) - (3*(c + im*d)^(1/3)*log((c + im*d)^(1/3) - (c + d*tan(e + f*x))^(1/3)))/(4*f)]

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

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

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

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

    @test_int [tan(c + d*x)^m*(A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n, x, 7, (1/(2*d*(1 + m)))*(((A + im*B)*AppellF1(1 + m, -n, 1, 2 + m, -((b*tan(c + d*x))/a), (-im)*tan(c + d*x))*tan(c + d*x)^(1 + m)*(a + b*tan(c + d*x))^n)/(1 + (b*tan(c + d*x))/a)^n) + (1/(2*d*(1 + m)))*(((A - im*B)*AppellF1(1 + m, -n, 1, 2 + m, -((b*tan(c + d*x))/a), im*tan(c + d*x))*tan(c + d*x)^(1 + m)*(a + b*tan(c + d*x))^n)/(1 + (b*tan(c + d*x))/a)^n)]

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

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

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

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*cot(c+d*x)^(m/2)*(A+B*tan(c+d*x))*(a+i*a*tan(c+d*x))^n=#

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

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

    @test_int [cot(c + d*x)^(7/2)*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 6, (4*(-1)^(1/4)*a^2*(A - im*B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d + (4*a^2*(A - im*B)*sqrt(cot(c + d*x)))/d - (2*a^2*(7*im*A + 5*B)*cot(c + d*x)^(3/2))/(15*d) - (2*A*cot(c + d*x)^(3/2)*(im*a^2 + a^2*cot(c + d*x)))/(5*d)]
    @test_int [cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, -((4*(-1)^(1/4)*a^2*(im*A + B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d) - (2*a^2*(5*im*A + 3*B)*sqrt(cot(c + d*x)))/(3*d) - (2*A*sqrt(cot(c + d*x))*(im*a^2 + a^2*cot(c + d*x)))/(3*d)]
    @test_int [cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, -((4*(-1)^(1/4)*a^2*(A - im*B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d) - (2*a^2*(A + im*B)*sqrt(cot(c + d*x)))/d + (2*im*B*(im*a^2 + a^2*cot(c + d*x)))/(d*sqrt(cot(c + d*x)))]
    @test_int [sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 5, (4*(-1)^(1/4)*a^2*(im*A + B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d - (2*a^2*(3*A - 5*im*B))/(3*d*sqrt(cot(c + d*x))) + (2*im*B*(im*a^2 + a^2*cot(c + d*x)))/(3*d*cot(c + d*x)^(3/2))]
    @test_int [((a + im*a*tan(c + d*x))^2*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 6, (4*(-1)^(1/4)*a^2*(A - im*B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d - (2*a^2*(5*A - 7*im*B))/(15*d*cot(c + d*x)^(3/2)) + (4*a^2*(im*A + B))/(d*sqrt(cot(c + d*x))) + (2*im*B*(im*a^2 + a^2*cot(c + d*x)))/(5*d*cot(c + d*x)^(5/2))]

    @test_int [cot(c + d*x)^(9/2)*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 7, (8*(-1)^(1/4)*a^3*(im*A + B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d + (8*a^3*(im*A + B)*sqrt(cot(c + d*x)))/d + (8*a^3*(23*A - 21*im*B)*cot(c + d*x)^(3/2))/(105*d) - (2*a*A*cot(c + d*x)^(3/2)*(im*a + a*cot(c + d*x))^2)/(7*d) - (2*(11*im*A + 7*B)*cot(c + d*x)^(3/2)*(im*a^3 + a^3*cot(c + d*x)))/(35*d)]
    @test_int [cot(c + d*x)^(7/2)*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, (8*(-1)^(1/4)*a^3*(A - im*B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d + (16*a^3*(6*A - 5*im*B)*sqrt(cot(c + d*x)))/(15*d) - (2*a*A*sqrt(cot(c + d*x))*(im*a + a*cot(c + d*x))^2)/(5*d) - (2*(9*im*A + 5*B)*sqrt(cot(c + d*x))*(im*a^3 + a^3*cot(c + d*x)))/(15*d)]
    @test_int [cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, -((8*(-1)^(1/4)*a^3*(im*A + B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d) - (16*im*a^3*A*sqrt(cot(c + d*x)))/(3*d) + (2*im*a*B*(im*a + a*cot(c + d*x))^2)/(d*sqrt(cot(c + d*x))) - (2*(A + 3*im*B)*sqrt(cot(c + d*x))*(im*a^3 + a^3*cot(c + d*x)))/(3*d)]
    @test_int [cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, -((8*(-1)^(1/4)*a^3*(A - im*B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d) - (16*im*a^3*B*sqrt(cot(c + d*x)))/(3*d) + (2*im*a*B*(im*a + a*cot(c + d*x))^2)/(3*d*cot(c + d*x)^(3/2)) - (2*(3*A - 7*im*B)*(im*a^3 + a^3*cot(c + d*x)))/(3*d*sqrt(cot(c + d*x)))]
    @test_int [sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 6, (8*(-1)^(1/4)*a^3*(im*A + B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d - (16*a^3*(5*A - 6*im*B))/(15*d*sqrt(cot(c + d*x))) + (2*im*a*B*(im*a + a*cot(c + d*x))^2)/(5*d*cot(c + d*x)^(5/2)) - (2*(5*A - 9*im*B)*(im*a^3 + a^3*cot(c + d*x)))/(15*d*cot(c + d*x)^(3/2))]
    @test_int [((a + im*a*tan(c + d*x))^3*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 7, (8*(-1)^(1/4)*a^3*(A - im*B)*atanh((-1)^(3/4)*sqrt(cot(c + d*x))))/d - (8*a^3*(21*A - 23*im*B))/(105*d*cot(c + d*x)^(3/2)) + (8*a^3*(im*A + B))/(d*sqrt(cot(c + d*x))) + (2*im*a*B*(im*a + a*cot(c + d*x))^2)/(7*d*cot(c + d*x)^(7/2)) - (2*(7*A - 11*im*B)*(im*a^3 + a^3*cot(c + d*x)))/(35*d*cot(c + d*x)^(5/2))]

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

    @test_int [(cot(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 14, -(((1/4 - im/4)*((6 + im)*A + (1 + 4*im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a*d)) + (((7 - 5*im)*A + (5 + 3*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(4*sqrt(2)*a*d) + (5*(im*A - B)*sqrt(cot(c + d*x)))/(2*a*d) - ((7*A + 3*im*B)*cot(c + d*x)^(3/2))/(6*a*d) + ((A + im*B)*cot(c + d*x)^(5/2))/(2*d*(im*a + a*cot(c + d*x))) + (((7 + 5*im)*A - (5 - 3*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(8*sqrt(2)*a*d) + (((-7 - 5*im)*A + (5 - 3*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(8*sqrt(2)*a*d)]
    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 13, (1/(4*sqrt(2)*a*d))*(((-5 - 3*im)*A + (3 - im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x)))) + (1/(4*sqrt(2)*a*d))*(((5 + 3*im)*A - (3 - im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x)))) - ((5*A + im*B)*sqrt(cot(c + d*x)))/(2*a*d) + ((A + im*B)*cot(c + d*x)^(3/2))/(2*d*(im*a + a*cot(c + d*x))) - (1/(sqrt(2)*a*d))*((1/8 - im/8)*((4 + im)*A + (1 + 2*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x))) + (1/(8*sqrt(2)*a*d))*(((5 - 3*im)*A + (3 + im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x)), x, 12, ((1/4 - im/4)*((2 + im)*A + B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a*d) - ((1/4 - im/4)*((2 + im)*A + B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a*d) + ((A + im*B)*sqrt(cot(c + d*x)))/(2*d*(im*a + a*cot(c + d*x))) - (((3 + im)*A - (1 + im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(8*sqrt(2)*a*d) + (((3 + im)*A - (1 + im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(8*sqrt(2)*a*d)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))), x, 12, ((1/4 - im/4)*(A + (2 - im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a*d) - ((1/4 - im/4)*(A + (2 - im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a*d) + ((im*A - B)*sqrt(cot(c + d*x)))/(2*d*(im*a + a*cot(c + d*x))) + ((1/8 + im/8)*(A - (2 + im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a*d) - ((1/8 + im/8)*(A - (2 + im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))), x, 13, (((1 - 3*im)*A + (3 + 5*im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(4*sqrt(2)*a*d) + ((1/4 + im/4)*((1 + 2*im)*A - (4 + im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a*d) - (A + 5*im*B)/(2*a*d*sqrt(cot(c + d*x))) + (im*A - B)/(2*d*sqrt(cot(c + d*x))*(im*a + a*cot(c + d*x))) - ((1/8 + im/8)*((2 + im)*A + (1 + 4*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a*d) + ((1/8 + im/8)*((2 + im)*A + (1 + 4*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))), x, 14, ((1/4 + im/4)*((4 + im)*A + (1 + 6*im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a*d) - ((1/4 + im/4)*((4 + im)*A + (1 + 6*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a*d) - (3*A + 7*im*B)/(6*a*d*cot(c + d*x)^(3/2)) - (5*(im*A - B))/(2*a*d*sqrt(cot(c + d*x))) + (im*A - B)/(2*d*cot(c + d*x)^(3/2)*(im*a + a*cot(c + d*x))) + (((3 - 5*im)*A + (5 + 7*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(8*sqrt(2)*a*d) + ((1/8 + im/8)*((1 + 4*im)*A - (6 + im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a*d)]

    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 14, -(((1/16 - im/16)*((2 + 23*im)*A - (7 + 2*im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a^2*d)) + (((25 + 21*im)*A - (9 - 5*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^2*d) - (5*(5*A + im*B)*sqrt(cot(c + d*x)))/(8*a^2*d) + ((7*A + 3*im*B)*cot(c + d*x)^(3/2))/(8*a^2*d*(im + cot(c + d*x))) + ((A + im*B)*cot(c + d*x)^(5/2))/(4*d*(im*a + a*cot(c + d*x))^2) - ((1/32 - im/32)*((23 + 2*im)*A + (2 + 7*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^2*d) + ((1/32 - im/32)*((23 + 2*im)*A + (2 + 7*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^2*d)]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^2, x, 13, (((9 - 5*im)*A + (1 - 3*im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^2*d) + ((1/16 + im/16)*((-2 + 7*im)*A + (1 + 2*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a^2*d) + ((5*A + im*B)*sqrt(cot(c + d*x)))/(8*a^2*d*(im + cot(c + d*x))) + ((A + im*B)*cot(c + d*x)^(3/2))/(4*d*(im*a + a*cot(c + d*x))^2) + ((1/32 + im/32)*((-7 + 2*im)*A + (2 + im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^2*d) + (((9 + 5*im)*A - (1 + 3*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^2*d)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^2), x, 13, -((((-1 + 3*im)*A + (1 + 3*im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^2*d)) + (((-1 + 3*im)*A + (1 + 3*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^2*d) + ((3*im*A + B)*sqrt(cot(c + d*x)))/(8*a^2*d*(im + cot(c + d*x))) + ((A + im*B)*sqrt(cot(c + d*x)))/(4*d*(im*a + a*cot(c + d*x))^2) + (((1 + 3*im)*A + (1 - 3*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^2*d) - (((1 + 3*im)*A + (1 - 3*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^2*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^2), x, 13, -(((1/16 + im/16)*((2 + im)*A + (7 - 2*im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a^2*d)) + (((1 + 3*im)*A + (9 + 5*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^2*d) + ((A + 5*im*B)*sqrt(cot(c + d*x)))/(8*a^2*d*(im + cot(c + d*x))) + ((im*A - B)*sqrt(cot(c + d*x)))/(4*d*(im*a + a*cot(c + d*x))^2) + (((1 - 3*im)*A - (9 - 5*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^2*d) + ((1/32 + im/32)*((1 + 2*im)*A + (2 - 7*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^2*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^2), x, 14, -(((1/16 - im/16)*((2 + 7*im)*A - (23 + 2*im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a^2*d)) + (((9 + 5*im)*A - (25 - 21*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^2*d) + (5*(im*A - 5*B))/(8*a^2*d*sqrt(cot(c + d*x))) + (3*A + 7*im*B)/(8*a^2*d*sqrt(cot(c + d*x))*(im + cot(c + d*x))) + (im*A - B)/(4*d*sqrt(cot(c + d*x))*(im*a + a*cot(c + d*x))^2) - ((1/32 - im/32)*((7 + 2*im)*A + (2 + 23*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^2*d) + ((1/32 - im/32)*((7 + 2*im)*A + (2 + 23*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^2*d)]

    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 15, -(((1/16 - im/16)*((1 + 29*im)*A - (6 + im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a^3*d)) + (((30 + 28*im)*A - (7 - 5*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^3*d) - (5*(6*A + im*B)*sqrt(cot(c + d*x)))/(8*a^3*d) + ((A + im*B)*cot(c + d*x)^(7/2))/(6*d*(im*a + a*cot(c + d*x))^3) + ((5*A + 2*im*B)*cot(c + d*x)^(5/2))/(12*a*d*(im*a + a*cot(c + d*x))^2) + (7*(4*A + im*B)*cot(c + d*x)^(3/2))/(24*d*(im*a^3 + a^3*cot(c + d*x))) - ((1/32 - im/32)*((29 + im)*A + (1 + 6*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^3*d) + ((1/32 - im/32)*((29 + im)*A + (1 + 6*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^3*d)]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^3, x, 14, -((((-7 + 5*im)*A + 2*im*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^3*d)) + (((-7 + 5*im)*A + 2*im*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^3*d) + ((A + im*B)*cot(c + d*x)^(5/2))/(6*d*(im*a + a*cot(c + d*x))^3) + ((4*A + im*B)*cot(c + d*x)^(3/2))/(12*a*d*(im*a + a*cot(c + d*x))^2) + (5*A*sqrt(cot(c + d*x)))/(8*d*(im*a^3 + a^3*cot(c + d*x))) - (((7 + 5*im)*A - 2*im*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^3*d) + (((7 + 5*im)*A - 2*im*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^3*d)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^3), x, 14, -(((1/16 + im/16)*((1 + im)*A + B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a^3*d)) + ((1/16 + im/16)*((1 + im)*A + B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a^3*d) + ((A + im*B)*cot(c + d*x)^(3/2))/(6*d*(im*a + a*cot(c + d*x))^3) + (A*sqrt(cot(c + d*x)))/(4*a*d*(im*a + a*cot(c + d*x))^2) + ((2*im*A + B)*sqrt(cot(c + d*x)))/(8*d*(im*a^3 + a^3*cot(c + d*x))) + ((2*im*A + (1 - im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^3*d) - ((2*im*A + (1 - im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^3*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^3), x, 14, -((((1 + im)*A + 2*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^3*d)) + (((1 + im)*A + 2*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^3*d) + ((A + im*B)*sqrt(cot(c + d*x)))/(6*d*(im*a + a*cot(c + d*x))^3) + ((2*im*A + B)*sqrt(cot(c + d*x)))/(12*a*d*(im*a + a*cot(c + d*x))^2) + (A*sqrt(cot(c + d*x)))/(8*d*(im*a^3 + a^3*cot(c + d*x))) - (((-1 + im)*A + 2*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^3*d) + (((-1 + im)*A + 2*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^3*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^3), x, 14, -(((2*A + (5 - 7*im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^3*d)) + ((2*A + (5 - 7*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^3*d) + ((im*A - B)*sqrt(cot(c + d*x)))/(6*d*(im*a + a*cot(c + d*x))^3) + ((A + 4*im*B)*sqrt(cot(c + d*x)))/(12*a*d*(im*a + a*cot(c + d*x))^2) + (5*B*sqrt(cot(c + d*x)))/(8*d*(im*a^3 + a^3*cot(c + d*x))) - ((2*A - (5 + 7*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^3*d) + ((2*A - (5 + 7*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(32*sqrt(2)*a^3*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(7/2)*(a + im*a*tan(c + d*x))^3), x, 15, ((1/16 + im/16)*((1 + 6*im)*A - (29 + im)*B)*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*a^3*d) + (((5 - 7*im)*A + (28 + 30*im)*B)*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(16*sqrt(2)*a^3*d) + (5*(A + 6*im*B))/(8*a^3*d*sqrt(cot(c + d*x))) + (im*A - B)/(6*d*sqrt(cot(c + d*x))*(im*a + a*cot(c + d*x))^3) + (2*A + 5*im*B)/(12*a*d*sqrt(cot(c + d*x))*(im*a + a*cot(c + d*x))^2) - (7*(im*A - 4*B))/(24*d*sqrt(cot(c + d*x))*(im*a^3 + a^3*cot(c + d*x))) + ((1/32 + im/32)*((6 + im)*A + (1 + 29*im)*B)*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^3*d) - ((1/32 + im/32)*((6 + im)*A + (1 + 29*im)*B)*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(sqrt(2)*a^3*d)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*cot(c+d*x)^(m/2)*(A+B*tan(c+d*x))*(a+i*a*tan(c+d*x))^(n/2)=#

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

    @test_int [cot(c + d*x)^(7/2)*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 7, ((-1 - im)*sqrt(a)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (2*(13*A - (5*im)*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(15*d) - (2*(im*A + 5*B)*cot(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(15*d) - (2*A*cot(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x)))/(5*d)]
    @test_int [cot(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 6, ((1 + im)*sqrt(a)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*(im*A + 3*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(3*d) - (2*A*cot(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(3*d)]
    @test_int [cot(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 5, ((1 + im)*sqrt(a)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*A*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/d]
    @test_int [sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)), x, 8, -((2*(-1)^(3/4)*sqrt(a)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) + ((1 - im)*sqrt(a)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d]
    @test_int [(sqrt(a + im*a*tan(c + d*x))*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 9, -(((-1)^(3/4)*sqrt(a)*(2*A - im*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) - ((1 + im)*sqrt(a)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (B*sqrt(a + im*a*tan(c + d*x)))/(d*sqrt(cot(c + d*x)))]

    @test_int [cot(c + d*x)^(9/2)*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 8, ((2 - 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (4*a*((67*im)*A + 63*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(105*d) + (4*a*(19*A - (21*im)*B)*cot(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(105*d) - (2*a*((8*im)*A + 7*B)*cot(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x)))/(35*d) - (2*a*A*cot(c + d*x)^(7/2)*sqrt(a + im*a*tan(c + d*x)))/(7*d)]
    @test_int [cot(c + d*x)^(7/2)*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 7, ((-2 - 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (4*a*(9*A - (10*im)*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(15*d) - (2*a*((6*im)*A + 5*B)*cot(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(15*d) - (2*a*A*cot(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x)))/(5*d)]
    @test_int [cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 6, ((2 + 2*im)*a^(3/2)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*a*((4*im)*A + 3*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(3*d) - (2*a*A*cot(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(3*d)]
    @test_int [cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 9, (2*(-1)^(1/4)*a^(3/2)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((2 + 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*a*A*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/d]
    @test_int [sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 9, -(((-1)^(3/4)*a^(3/2)*(2*im*A + 3*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) + ((2 - 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (im*a*B*sqrt(a + im*a*tan(c + d*x)))/(d*sqrt(cot(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 10, -(((-1)^(3/4)*a^(3/2)*(12*A - 11*im*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(4*d)) - ((2 + 2*im)*a^(3/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (im*a*B*sqrt(a + im*a*tan(c + d*x)))/(2*d*cot(c + d*x)^(3/2)) + (a*(4*im*A + 5*B)*sqrt(a + im*a*tan(c + d*x)))/(4*d*sqrt(cot(c + d*x)))]

    @test_int [cot(c + d*x)^(11/2)*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 9, ((4 + 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (8*a^2*(197*A - (195*im)*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(315*d) + (8*a^2*((59*im)*A + 60*B)*cot(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(315*d) + (2*a^2*(46*A - (45*im)*B)*cot(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x)))/(105*d) - (2*a^2*((4*im)*A + 3*B)*cot(c + d*x)^(7/2)*sqrt(a + im*a*tan(c + d*x)))/(21*d) - (2*a*A*cot(c + d*x)^(9/2)*(a + im*a*tan(c + d*x))^(3/2))/(9*d)]
    @test_int [cot(c + d*x)^(9/2)*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 8, ((4 - 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (4*a^2*((130*im)*A + 133*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(105*d) + (2*a^2*(80*A - (77*im)*B)*cot(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(105*d) - (2*a^2*((10*im)*A + 7*B)*cot(c + d*x)^(5/2)*sqrt(a + im*a*tan(c + d*x)))/(35*d) - (2*a*A*cot(c + d*x)^(7/2)*(a + im*a*tan(c + d*x))^(3/2))/(7*d)]
    @test_int [cot(c + d*x)^(7/2)*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 7, ((-4 - 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (2*a^2*(38*A - (35*im)*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(15*d) - (2*a^2*((8*im)*A + 5*B)*cot(c + d*x)^(3/2)*sqrt(a + im*a*tan(c + d*x)))/(15*d) - (2*a*A*cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^(3/2))/(5*d)]
    @test_int [cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 10, (2*(-1)^(3/4)*a^(5/2)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((4 + 4*im)*a^(5/2)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*a^2*(2*im*A + B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/d - (2*a*A*cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 10, ((-1)^(3/4)*a^(5/2)*(2*A - 5*im*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((4 + 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (a^2*(2*im*A - B)*sqrt(a + im*a*tan(c + d*x)))/(d*sqrt(cot(c + d*x))) - (2*a*A*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(3/2))/d]
    @test_int [sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 10, -(((-1)^(3/4)*a^(5/2)*(20*im*A + 23*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(4*d)) + ((4 - 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (a^2*(4*A - 7*im*B)*sqrt(a + im*a*tan(c + d*x)))/(4*d*sqrt(cot(c + d*x))) + (im*a*B*(a + im*a*tan(c + d*x))^(3/2))/(2*d*sqrt(cot(c + d*x)))]
    @test_int [((a + im*a*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 11, -(((-1)^(3/4)*a^(5/2)*(46*A - 45*im*B)*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(8*d)) - ((4 + 4*im)*a^(5/2)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (a^2*(2*A - 3*im*B)*sqrt(a + im*a*tan(c + d*x)))/(4*d*cot(c + d*x)^(3/2)) + (a^2*(18*im*A + 19*B)*sqrt(a + im*a*tan(c + d*x)))/(8*d*sqrt(cot(c + d*x))) + (im*a*B*(a + im*a*tan(c + d*x))^(3/2))/(3*d*cot(c + d*x)^(3/2))]

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

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

    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 7, ((1/4 + im/4)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(3/2)*d) + ((A + im*B)*sqrt(cot(c + d*x)))/(3*d*(a + im*a*tan(c + d*x))^(3/2)) + ((11*A + (5*im)*B)*sqrt(cot(c + d*x)))/(6*a*d*sqrt(a + im*a*tan(c + d*x))) - ((25*A + (7*im)*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(6*a^2*d)]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(3/2), x, 6, ((1/4 - im/4)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(3/2)*d) + (A + im*B)/(3*d*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)) + (7*A + im*B)/(6*a*d*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)), x, 6, -(((1/4 + im/4)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(3/2)*d)) + (im*A - B)/(3*d*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)) + (im*A + 5*B)/(6*a*d*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2)), x, 10, (2*(-1)^(3/4)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(3/2)*d) + ((1/4 + im/4)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(3/2)*d) + (im*A - B)/(3*d*cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2)) + (A + 3*im*B)/(2*a*d*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))]

    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 8, ((1/8 + im/8)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(5/2)*d) + ((A + im*B)*sqrt(cot(c + d*x)))/(5*d*(a + im*a*tan(c + d*x))^(5/2)) + ((17*A + (7*im)*B)*sqrt(cot(c + d*x)))/(30*a*d*(a + im*a*tan(c + d*x))^(3/2)) + ((151*A + (41*im)*B)*sqrt(cot(c + d*x)))/(60*a^2*d*sqrt(a + im*a*tan(c + d*x))) - ((317*A + (67*im)*B)*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))/(60*a^3*d)]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/(a + im*a*tan(c + d*x))^(5/2), x, 7, ((1/8 - im/8)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(5/2)*d) + (A + im*B)/(5*d*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(5/2)) + (13*A + (3*im)*B)/(30*a*d*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)) + (67*A - (3*im)*B)/(60*a^2*d*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(5/2)), x, 7, -(((1/8 + im/8)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(5/2)*d)) + (im*A - B)/(5*d*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(5/2)) + (3*im*A + 7*B)/(30*a*d*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)) - (3*im*A - 13*B)/(60*a^2*d*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(5/2)), x, 7, ((1/8 + im/8)*(im*A + B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(5/2)*d) + (im*A - B)/(5*d*cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(5/2)) + (A + 11*im*B)/(30*a*d*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^(3/2)) + (13*A - 37*im*B)/(60*a^2*d*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^(5/2)), x, 11, (2*(-1)^(1/4)*B*atan(((-1)^(3/4)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(5/2)*d) + ((1/8 + im/8)*(A - im*B)*atanh(((1 + im)*sqrt(a)*sqrt(tan(c + d*x)))/sqrt(a + im*a*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(a^(5/2)*d) + (im*A - B)/(5*d*cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^(5/2)) + (A + 3*im*B)/(6*a*d*cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^(3/2)) - (im*A - 7*B)/(4*a^2*d*sqrt(cot(c + d*x))*sqrt(a + im*a*tan(c + d*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*cot(c+d*x)^(m/2)*(A+B*tan(c+d*x))*(a+i*a*tan(c+d*x))^n*with*n*symbolic=#

    @test_int [cot(c + d*x)^m*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 8, (1/(d*(1 - m)))*(((A - im*B)*AppellF1(1 - m, 1 - n, 1, 2 - m, (-im)*tan(c + d*x), im*tan(c + d*x))*cot(c + d*x)^(-1 + m)*(a + im*a*tan(c + d*x))^n)/(1 + im*tan(c + d*x))^n) + (1/(d*(1 - m)))*((im*B*cot(c + d*x)^(-1 + m)*HypergeometricFunctions._₂F₁(1 - m, 1 - n, 2 - m, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/(1 + im*tan(c + d*x))^n)]

    @test_int [cot(c + d*x)^(5/2)*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 11, -((2*(3*B + 2*im*A*n)*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^n)/(3*d)) - (2*A*cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^n)/(3*d) - (2*(A - im*B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x)))) - (2*(1 - 2*n)*(3*im*B - 2*A*n)*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(3*d*sqrt(cot(c + d*x))))]
    @test_int [cot(c + d*x)^(3/2)*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 10, -((2*A*sqrt(cot(c + d*x))*(a + im*a*tan(c + d*x))^n)/d) + (2*(im*A + B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x)))) - (2*im*A*(1 - 2*n)*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x))))]
    @test_int [cot(c + d*x)^(1/2)*(a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)), x, 9, (2*(A - im*B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x)))) + (2*im*B*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x))))]
    @test_int [((a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)))/cot(c + d*x)^(1/2), x, 10, If(13>=8, (2*B*(a + im*a*tan(c + d*x))^n)/(d*(1 + 2*n)*sqrt(cot(c + d*x))) - (2*(im*A + B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x)))) + (2*(2*B*n + im*A*(1 + 2*n))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(1 + 2*n)*sqrt(cot(c + d*x)))), (2*B*(a + im*a*tan(c + d*x))^n)/(d*(1 + 2*n)*sqrt(cot(c + d*x))) - (2*(im*A + B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x)))) + (2*(2*B*n + im*A*(1 + 2*n))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(1 + 2*n)*sqrt(cot(c + d*x)))))]
    @test_int [((a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)))/cot(c + d*x)^(3/2), x, 11, If(13>=8, (2*B*(a + im*a*tan(c + d*x))^n)/(d*(3 + 2*n)*cot(c + d*x)^(3/2)) - (2*(2*im*B*n - A*(3 + 2*n))*(a + im*a*tan(c + d*x))^n)/(d*(1 + 2*n)*(3 + 2*n)*sqrt(cot(c + d*x))) - (2*(A - im*B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x)))) + (2*(2*A*n*(3 + 2*n) - im*B*(3 + 6*n + 4*n^2))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(1 + 2*n)*(3 + 2*n)*sqrt(cot(c + d*x)))), (2*B*(a + im*a*tan(c + d*x))^n)/(d*(3 + 2*n)*cot(c + d*x)^(3/2)) - (2*(2*im*B*n - A*(3 + 2*n))*(a + im*a*tan(c + d*x))^n)/(d*(3 + 8*n + 4*n^2)*sqrt(cot(c + d*x))) - (2*(A - im*B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x)))) + (2*(2*A*n*(3 + 2*n) - im*B*(3 + 6*n + 4*n^2))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(3 + 8*n + 4*n^2)*sqrt(cot(c + d*x)))))]
    @test_int [((a + im*a*tan(c + d*x))^n*(A + B*tan(c + d*x)))/cot(c + d*x)^(5/2), x, 12, If(13>=8, (2*B*(a + im*a*tan(c + d*x))^n)/(d*(5 + 2*n)*cot(c + d*x)^(5/2)) - (2*(2*im*B*n - A*(5 + 2*n))*(a + im*a*tan(c + d*x))^n)/(d*(3 + 2*n)*(5 + 2*n)*cot(c + d*x)^(3/2)) - (2*(2*im*A*n*(5 + 2*n) + B*(15 + 10*n + 4*n^2))*(a + im*a*tan(c + d*x))^n)/(d*(1 + 2*n)*(3 + 2*n)*(5 + 2*n)*sqrt(cot(c + d*x))) + (2*(im*A + B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x)))) - (2*(4*B*n*(9 + 8*n + 2*n^2) + im*A*(15 + 36*n + 32*n^2 + 8*n^3))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(1 + 2*n)*(3 + 2*n)*(5 + 2*n)*sqrt(cot(c + d*x)))), (2*B*(a + im*a*tan(c + d*x))^n)/(d*(5 + 2*n)*cot(c + d*x)^(5/2)) - (2*(2*im*B*n - A*(5 + 2*n))*(a + im*a*tan(c + d*x))^n)/(d*(3 + 2*n)*(5 + 2*n)*cot(c + d*x)^(3/2)) - (2*(2*im*A*n*(5 + 2*n) + B*(15 + 10*n + 4*n^2))*(a + im*a*tan(c + d*x))^n)/(d*(5 + 2*n)*(3 + 8*n + 4*n^2)*sqrt(cot(c + d*x))) + (2*(im*A + B)*AppellF1(1/2, 1 - n, 1, 3/2, (-im)*tan(c + d*x), im*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*sqrt(cot(c + d*x)))) - (2*(4*B*n*(9 + 8*n + 2*n^2) + im*A*(15 + 36*n + 32*n^2 + 8*n^3))*HypergeometricFunctions._₂F₁(1/2, 1 - n, 3/2, (-im)*tan(c + d*x))*(a + im*a*tan(c + d*x))^n)/((1 + im*tan(c + d*x))^n*(d*(5 + 2*n)*(3 + 8*n + 4*n^2)*sqrt(cot(c + d*x)))))]

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

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

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

    @test_int [cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 13, -(((b*(A - B) + a*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + ((b*(A - B) + a*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - (2*(A*b + a*B)*sqrt(cot(c + d*x)))/d - (2*a*A*cot(c + d*x)^(3/2))/(3*d) + ((a*(A - B) - b*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - ((a*(A - B) - b*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 12, -(((a*(A - B) - b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + ((a*(A - B) - b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - (2*a*A*sqrt(cot(c + d*x)))/d - ((b*(A - B) + a*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + ((b*(A - B) + a*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [sqrt(cot(c + d*x))*(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 12, ((b*(A - B) + a*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - ((b*(A - B) + a*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*b*B)/(d*sqrt(cot(c + d*x))) - ((a*(A - B) - b*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + ((a*(A - B) - b*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [((a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 13, ((a*(A - B) - b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - ((a*(A - B) - b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*b*B)/(3*d*cot(c + d*x)^(3/2)) + (2*(A*b + a*B))/(d*sqrt(cot(c + d*x))) + ((b*(A - B) + a*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - ((b*(A - B) + a*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]

    @test_int [cot(c + d*x)^(7/2)*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 14, ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*(a^2*A - A*b^2 - 2*a*b*B)*sqrt(cot(c + d*x)))/d - (2*a*(7*A*b + 5*a*B)*cot(c + d*x)^(3/2))/(15*d) - (2*a*A*cot(c + d*x)^(3/2)*(b + a*cot(c + d*x)))/(5*d) + ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 13, -(((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - (2*a*(5*A*b + 3*a*B)*sqrt(cot(c + d*x)))/(3*d) - (2*a*A*sqrt(cot(c + d*x))*(b + a*cot(c + d*x)))/(3*d) + ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 13, -(((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*b^2*B)/(d*sqrt(cot(c + d*x))) - (2*a^2*A*sqrt(cot(c + d*x)))/d - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)), x, 13, ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*b^2*B)/(3*d*cot(c + d*x)^(3/2)) + (2*b*(A*b + 2*a*B))/(d*sqrt(cot(c + d*x))) - ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [((a + b*tan(c + d*x))^2*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 14, ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - ((a^2*(A - B) - b^2*(A - B) - 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*b^2*B)/(5*d*cot(c + d*x)^(5/2)) + (2*b*(A*b + 2*a*B))/(3*d*cot(c + d*x)^(3/2)) + (2*(2*a*A*b + a^2*B - b^2*B))/(d*sqrt(cot(c + d*x))) + ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - ((2*a*b*(A - B) + a^2*(A + B) - b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]

    @test_int [cot(c + d*x)^(9/2)*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 15, ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*sqrt(cot(c + d*x)))/d + (2*a*(7*a^2*A - 18*A*b^2 - 21*a*b*B)*cot(c + d*x)^(3/2))/(21*d) - (2*a^2*(11*A*b + 7*a*B)*cot(c + d*x)^(5/2))/(35*d) - (2*a*A*cot(c + d*x)^(3/2)*(b + a*cot(c + d*x))^2)/(7*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [cot(c + d*x)^(7/2)*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 14, ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*a*(5*a^2*A - 14*A*b^2 - 15*a*b*B)*sqrt(cot(c + d*x)))/(5*d) - (2*a^2*(9*A*b + 5*a*B)*cot(c + d*x)^(3/2))/(15*d) - (2*a*A*sqrt(cot(c + d*x))*(b + a*cot(c + d*x))^2)/(5*d) + ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 14, -(((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - (2*a*(3*a*A*b + a^2*B + 2*b^2*B)*sqrt(cot(c + d*x)))/d - (2*a^2*(a*A + 3*b*B)*cot(c + d*x)^(3/2))/(3*d) + (2*b*B*(b + a*cot(c + d*x))^2)/(d*sqrt(cot(c + d*x))) + ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 14, -(((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*b^2*(3*A*b + 7*a*B))/(3*d*sqrt(cot(c + d*x))) - (2*a^2*(3*a*A + b*B)*sqrt(cot(c + d*x)))/(3*d) + (2*b*B*(b + a*cot(c + d*x))^2)/(3*d*cot(c + d*x)^(3/2)) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)), x, 14, ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*b^2*(5*A*b + 9*a*B))/(15*d*cot(c + d*x)^(3/2)) + (2*b*(15*a*A*b + 14*a^2*B - 5*b^2*B))/(5*d*sqrt(cot(c + d*x))) + (2*b*B*(b + a*cot(c + d*x))^2)/(5*d*cot(c + d*x)^(5/2)) - ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [((a + b*tan(c + d*x))^3*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 15, ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) - 3*a^2*b*(A + B) + b^3*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*b^2*(7*A*b + 11*a*B))/(35*d*cot(c + d*x)^(5/2)) + (2*b*(21*a*A*b + 18*a^2*B - 7*b^2*B))/(21*d*cot(c + d*x)^(3/2)) + (2*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B))/(d*sqrt(cot(c + d*x))) + (2*b*B*(b + a*cot(c + d*x))^2)/(7*d*cot(c + d*x)^(7/2)) + ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - ((3*a^2*b*(A - B) - b^3*(A - B) + a^3*(A + B) - 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]

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

    @test_int [(cot(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 17, ((b*(A - B) - a*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - ((b*(A - B) - a*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - (2*b^(5/2)*(A*b - a*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(a^(5/2)*(a^2 + b^2)*d) + (2*(A*b - a*B)*sqrt(cot(c + d*x)))/(a^2*d) - (2*A*cot(c + d*x)^(3/2))/(3*a*d) + ((a*(A - B) + b*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((a*(A - B) + b*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 16, -(((a*(A - B) + b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d)) + ((a*(A - B) + b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) + (2*b^(3/2)*(A*b - a*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(a^(3/2)*(a^2 + b^2)*d) - (2*A*sqrt(cot(c + d*x)))/(a*d) + ((b*(A - B) - a*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((b*(A - B) - a*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 15, -(((b*(A - B) - a*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d)) + ((b*(A - B) - a*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - (2*sqrt(b)*(A*b - a*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(sqrt(a)*(a^2 + b^2)*d) - ((a*(A - B) + b*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + ((a*(A - B) + b*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + b*tan(c + d*x))), x, 15, ((a*(A - B) + b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - ((a*(A - B) + b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) + (2*sqrt(a)*(A*b - a*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(sqrt(b)*(a^2 + b^2)*d) - ((b*(A - B) - a*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) + ((b*(A - B) - a*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))), x, 16, ((b*(A - B) - a*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - ((b*(A - B) - a*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) - (2*a^(3/2)*(A*b - a*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(b^(3/2)*(a^2 + b^2)*d) + (2*B)/(b*d*sqrt(cot(c + d*x))) + ((a*(A - B) + b*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((a*(A - B) + b*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))), x, 17, -(((a*(A - B) + b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d)) + ((a*(A - B) + b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)*d) + (2*a^(5/2)*(A*b - a*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(b^(5/2)*(a^2 + b^2)*d) + (2*B)/(3*b*d*cot(c + d*x)^(3/2)) + (2*(A*b - a*B))/(b^2*d*sqrt(cot(c + d*x))) + ((b*(A - B) - a*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d) - ((b*(A - B) - a*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)*d)]

    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 17, -(((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d)) + ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) + (b^(3/2)*(7*a^2*A*b + 3*A*b^3 - 5*a^3*B - a*b^2*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(a^(5/2)*(a^2 + b^2)^2*d) - ((2*a^2*A + 3*A*b^2 - a*b*B)*sqrt(cot(c + d*x)))/(a^2*(a^2 + b^2)*d) + (b*(A*b - a*B)*cot(c + d*x)^(3/2))/(a*(a^2 + b^2)*d*(b + a*cot(c + d*x))) + ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d)]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^2, x, 16, -(((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d)) + ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - (sqrt(b)*(5*a^2*A*b + A*b^3 - 3*a^3*B + a*b^2*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(a^(3/2)*(a^2 + b^2)^2*d) + (b*(A*b - a*B)*sqrt(cot(c + d*x)))/(a*(a^2 + b^2)*d*(b + a*cot(c + d*x))) - ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) + ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^2), x, 16, ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) + ((3*a^2*A*b - A*b^3 - a^3*B + 3*a*b^2*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(sqrt(a)*sqrt(b)*(a^2 + b^2)^2*d) - ((A*b - a*B)*sqrt(cot(c + d*x)))/((a^2 + b^2)*d*(b + a*cot(c + d*x))) - ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) + ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^2), x, 16, ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - (sqrt(a)*(a^2*A*b - 3*A*b^3 + a^3*B + 5*a*b^2*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(b^(3/2)*(a^2 + b^2)^2*d) + (a*(A*b - a*B)*sqrt(cot(c + d*x)))/(b*(a^2 + b^2)*d*(b + a*cot(c + d*x))) + ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))^2), x, 17, -(((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d)) + ((a^2*(A - B) - b^2*(A - B) + 2*a*b*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^2*d) - (a^(3/2)*(a^2*A*b + 5*A*b^3 - 3*a^3*B - 7*a*b^2*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(b^(5/2)*(a^2 + b^2)^2*d) - (a*A*b - 3*a^2*B - 2*b^2*B)/(b^2*(a^2 + b^2)*d*sqrt(cot(c + d*x))) + (a*(A*b - a*B))/(b*(a^2 + b^2)*d*sqrt(cot(c + d*x))*(b + a*cot(c + d*x))) + ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d) - ((2*a*b*(A - B) - a^2*(A + B) + b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^2*d)]

    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 18, -(((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d)) + ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) + (b^(3/2)*(63*a^4*A*b + 46*a^2*A*b^3 + 15*A*b^5 - 35*a^5*B - 6*a^3*b^2*B - 3*a*b^4*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(4*a^(7/2)*(a^2 + b^2)^3*d) - ((8*a^4*A + 31*a^2*A*b^2 + 15*A*b^4 - 11*a^3*b*B - 3*a*b^3*B)*sqrt(cot(c + d*x)))/(4*a^3*(a^2 + b^2)^2*d) + (b*(A*b - a*B)*cot(c + d*x)^(5/2))/(2*a*(a^2 + b^2)*d*(b + a*cot(c + d*x))^2) + (b*(13*a^2*A*b + 5*A*b^3 - 9*a^3*B - a*b^2*B)*cot(c + d*x)^(3/2))/(4*a^2*(a^2 + b^2)^2*d*(b + a*cot(c + d*x))) + ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) - ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d)]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^3, x, 17, -(((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d)) + ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - (sqrt(b)*(35*a^4*A*b + 6*a^2*A*b^3 + 3*A*b^5 - 15*a^5*B + 18*a^3*b^2*B + a*b^4*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(4*a^(5/2)*(a^2 + b^2)^3*d) + (b*(A*b - a*B)*cot(c + d*x)^(3/2))/(2*a*(a^2 + b^2)*d*(b + a*cot(c + d*x))^2) + (b*(11*a^2*A*b + 3*A*b^3 - 7*a^3*B + a*b^2*B)*sqrt(cot(c + d*x)))/(4*a^2*(a^2 + b^2)^2*d*(b + a*cot(c + d*x))) - ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^3), x, 17, ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) + ((15*a^4*A*b - 18*a^2*A*b^3 - A*b^5 - 3*a^5*B + 26*a^3*b^2*B - 3*a*b^4*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(4*a^(3/2)*sqrt(b)*(a^2 + b^2)^3*d) + (b*(A*b - a*B)*sqrt(cot(c + d*x)))/(2*a*(a^2 + b^2)*d*(b + a*cot(c + d*x))^2) - ((9*a^2*A*b + A*b^3 - 5*a^3*B + 3*a*b^2*B)*sqrt(cot(c + d*x)))/(4*a*(a^2 + b^2)^2*d*(b + a*cot(c + d*x))) - ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) + ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^3), x, 17, ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - ((3*a^4*A*b - 26*a^2*A*b^3 + 3*A*b^5 + a^5*B + 18*a^3*b^2*B - 15*a*b^4*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(4*sqrt(a)*b^(3/2)*(a^2 + b^2)^3*d) - ((A*b - a*B)*sqrt(cot(c + d*x)))/(2*(a^2 + b^2)*d*(b + a*cot(c + d*x))^2) + ((5*a^2*A*b - 3*A*b^3 - a^3*B + 7*a*b^2*B)*sqrt(cot(c + d*x)))/(4*b*(a^2 + b^2)^2*d*(b + a*cot(c + d*x))) + ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) - ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))^3), x, 17, -(((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d)) + ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - (sqrt(a)*(a^4*A*b + 18*a^2*A*b^3 - 15*A*b^5 + 3*a^5*B + 6*a^3*b^2*B + 35*a*b^4*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(4*b^(5/2)*(a^2 + b^2)^3*d) + (a*(A*b - a*B)*sqrt(cot(c + d*x)))/(2*b*(a^2 + b^2)*d*(b + a*cot(c + d*x))^2) - (a*(a^2*A*b - 7*A*b^3 + 3*a^3*B + 11*a*b^2*B)*sqrt(cot(c + d*x)))/(4*b^2*(a^2 + b^2)^2*d*(b + a*cot(c + d*x))) + ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) - ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(7/2)*(a + b*tan(c + d*x))^3), x, 18, -(((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d)) + ((3*a^2*b*(A - B) - b^3*(A - B) - a^3*(A + B) + 3*a*b^2*(A + B))*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*(a^2 + b^2)^3*d) - (a^(3/2)*(3*a^4*A*b + 6*a^2*A*b^3 + 35*A*b^5 - 15*a^5*B - 46*a^3*b^2*B - 63*a*b^4*B)*atan((sqrt(a)*sqrt(cot(c + d*x)))/sqrt(b)))/(4*b^(7/2)*(a^2 + b^2)^3*d) - (3*a^3*A*b + 11*a*A*b^3 - 15*a^4*B - 31*a^2*b^2*B - 8*b^4*B)/(4*b^3*(a^2 + b^2)^2*d*sqrt(cot(c + d*x))) + (a*(A*b - a*B))/(2*b*(a^2 + b^2)*d*sqrt(cot(c + d*x))*(b + a*cot(c + d*x))^2) + (a*(a^2*A*b + 9*A*b^3 - 5*a^3*B - 13*a*b^2*B))/(4*b^2*(a^2 + b^2)^2*d*sqrt(cot(c + d*x))*(b + a*cot(c + d*x))) - ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d) + ((a^3*(A - B) - 3*a*b^2*(A - B) + 3*a^2*b*(A + B) - b^3*(A + B))*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*(a^2 + b^2)^3*d)]

    @test_int [(cot(c + d*x)^(5/2)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 13, -((B*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + (B*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - (2*B*cot(c + d*x)^(3/2))/(3*d) + (B*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - (B*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [(cot(c + d*x)^(3/2)*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 13, -((B*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + (B*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - (2*B*sqrt(cot(c + d*x)))/d - (B*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + (B*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [(sqrt(cot(c + d*x))*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x)), x, 12, (B*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - (B*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - (B*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + (B*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + b*tan(c + d*x))), x, 12, (B*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) - (B*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (B*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - (B*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))), x, 13, -((B*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + (B*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*B)/(d*sqrt(cot(c + d*x))) + (B*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) - (B*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))), x, 13, -((B*atan(1 - sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d)) + (B*atan(1 + sqrt(2)*sqrt(cot(c + d*x))))/(sqrt(2)*d) + (2*B)/(3*d*cot(c + d*x)^(3/2)) - (B*log(1 - sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d) + (B*log(1 + sqrt(2)*sqrt(cot(c + d*x)) + cot(c + d*x)))/(2*sqrt(2)*d)]

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

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

    @test_int [cot(c + d*x)^(9/2)*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 12, -((sqrt(im*a - b)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) - (sqrt(im*a + b)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (2*(35*a^2*A*b - 8*A*b^3 + 105*a^3*B + 14*a*b^2*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(105*a^3*d) + (2*(35*a^2*A + 4*A*b^2 - 7*a*b*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(105*a^2*d) - (2*(A*b + 7*a*B)*cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x)))/(35*a*d) - (2*A*cot(c + d*x)^(7/2)*sqrt(a + b*tan(c + d*x)))/(7*d)]
    @test_int [cot(c + d*x)^(7/2)*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 11, (sqrt(im*a - b)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (sqrt(im*a + b)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (2*(15*a^2*A + 2*A*b^2 - 5*a*b*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(15*a^2*d) - (2*(A*b + 5*a*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(15*a*d) - (2*A*cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x)))/(5*d)]
    @test_int [cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 10, (sqrt(im*a - b)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (sqrt(im*a + b)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*(A*b + 3*a*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(3*a*d) - (2*A*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(3*d)]
    @test_int [cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 9, -((sqrt(im*a - b)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) + (sqrt(im*a + b)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*A*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/d]
    @test_int [sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)), x, 13, -((sqrt(im*a - b)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) + (2*sqrt(b)*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (sqrt(im*a + b)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d]
    @test_int [(sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 14, (sqrt(im*a - b)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((2*A*b + a*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(b)*d) - (sqrt(im*a + b)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (B*sqrt(a + b*tan(c + d*x)))/(d*sqrt(cot(c + d*x)))]
    @test_int [(sqrt(a + b*tan(c + d*x))*(A + B*tan(c + d*x)))/cot(c + d*x)^(3/2), x, 15, (sqrt(im*a - b)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((4*a*A*b - a^2*B - 8*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(4*b^(3/2)*d) + (sqrt(im*a + b)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((4*A*b - a*B)*sqrt(a + b*tan(c + d*x)))/(4*b*d*sqrt(cot(c + d*x))) + (B*(a + b*tan(c + d*x))^(3/2))/(2*b*d*sqrt(cot(c + d*x)))]

    @test_int [cot(c + d*x)^(11/2)*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 13, ((im*a - b)^(3/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - ((im*a + b)^(3/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*(315*a^4*A - 63*a^2*A*b^2 + 8*A*b^4 - 420*a^3*b*B - 18*a*b^3*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(315*a^3*d) + (2*(126*a^2*A*b + 4*A*b^3 + 105*a^3*B - 9*a*b^2*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(315*a^2*d) + (2*(21*a^2*A - A*b^2 - 24*a*b*B)*cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x)))/(105*a*d) - (2*(10*A*b + 9*a*B)*cot(c + d*x)^(7/2)*sqrt(a + b*tan(c + d*x)))/(63*d) - (2*a*A*cot(c + d*x)^(9/2)*sqrt(a + b*tan(c + d*x)))/(9*d)]
    @test_int [cot(c + d*x)^(9/2)*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 12, -(((im*a - b)^(3/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) - ((im*a + b)^(3/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (2*(140*a^2*A*b + 6*A*b^3 + 105*a^3*B - 21*a*b^2*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(105*a^2*d) + (2*(35*a^2*A - 3*A*b^2 - 42*a*b*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(105*a*d) - (2*(8*A*b + 7*a*B)*cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x)))/(35*d) - (2*a*A*cot(c + d*x)^(7/2)*sqrt(a + b*tan(c + d*x)))/(7*d)]
    @test_int [cot(c + d*x)^(7/2)*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 11, ((a + im*b)^2*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d) + ((im*a + b)^(3/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (2*(15*a^2*A - 3*A*b^2 - 20*a*b*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(15*a*d) - (2*(6*A*b + 5*a*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(15*d) - (2*a*A*cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x)))/(5*d)]
    @test_int [cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 10, ((im*a - b)^(3/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((im*a + b)^(3/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*(4*A*b + 3*a*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(3*d) - (2*a*A*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(3*d)]
    @test_int [cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 14, -(((a + im*b)^2*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d)) + (2*b^(3/2)*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - ((im*a + b)^(3/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*a*A*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/d]
    @test_int [sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)), x, 14, -(((im*a - b)^(3/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) + (sqrt(b)*(2*A*b + 3*a*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - ((im*a + b)^(3/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (b*B*sqrt(a + b*tan(c + d*x)))/(d*sqrt(cot(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 15, ((a + im*b)^2*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d) + ((12*a*A*b + 3*a^2*B - 8*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(4*sqrt(b)*d) + ((im*a + b)^(3/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (b*B*sqrt(a + b*tan(c + d*x)))/(2*d*cot(c + d*x)^(3/2)) + ((4*A*b + 5*a*B)*sqrt(a + b*tan(c + d*x)))/(4*d*sqrt(cot(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^(3/2)*(A + B*tan(c + d*x)))/cot(c + d*x)^(3/2), x, 16, ((im*a - b)^(3/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((6*a^2*A*b - 16*A*b^3 - a^3*B - 24*a*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(8*b^(3/2)*d) + ((im*a + b)^(3/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((6*a*A*b - a^2*B - 8*b^2*B)*sqrt(a + b*tan(c + d*x)))/(8*b*d*sqrt(cot(c + d*x))) + ((6*A*b - a*B)*(a + b*tan(c + d*x))^(3/2))/(12*b*d*sqrt(cot(c + d*x))) + (B*(a + b*tan(c + d*x))^(5/2))/(3*b*d*sqrt(cot(c + d*x)))]

    @test_int [cot(c + d*x)^(13/2)*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 14, -(((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) - ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*(8085*a^4*A*b - 495*a^2*A*b^3 + 40*A*b^5 + 3465*a^5*B - 5313*a^3*b^2*B - 110*a*b^4*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(3465*a^3*d) - (2*(1155*a^4*A - 1485*a^2*A*b^2 - 20*A*b^4 - 2541*a^3*b*B + 55*a*b^3*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(3465*a^2*d) + (2*(495*a^2*A*b - 5*A*b^3 + 231*a^3*B - 275*a*b^2*B)*cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x)))/(1155*a*d) + (2*(99*a^2*A - 113*A*b^2 - 209*a*b*B)*cot(c + d*x)^(7/2)*sqrt(a + b*tan(c + d*x)))/(693*d) - (2*a*(14*A*b + 11*a*B)*cot(c + d*x)^(9/2)*sqrt(a + b*tan(c + d*x)))/(99*d) - (2*a*A*cot(c + d*x)^(11/2)*(a + b*tan(c + d*x))^(3/2))/(11*d)]
    @test_int [cot(c + d*x)^(11/2)*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 13, ((im*a - b)^(5/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - ((im*a + b)^(5/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*(315*a^4*A - 483*a^2*A*b^2 - 10*A*b^4 - 735*a^3*b*B + 45*a*b^3*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(315*a^2*d) + (2*(231*a^2*A*b - 5*A*b^3 + 105*a^3*B - 135*a*b^2*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(315*a*d) + (2*(21*a^2*A - 25*A*b^2 - 45*a*b*B)*cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x)))/(105*d) - (2*a*(4*A*b + 3*a*B)*cot(c + d*x)^(7/2)*sqrt(a + b*tan(c + d*x)))/(21*d) - (2*a*A*cot(c + d*x)^(9/2)*(a + b*tan(c + d*x))^(3/2))/(9*d)]
    @test_int [cot(c + d*x)^(9/2)*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 12, ((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (2*(245*a^2*A*b - 15*A*b^3 + 105*a^3*B - 161*a*b^2*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(105*a*d) + (2*(35*a^2*A - 45*A*b^2 - 77*a*b*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(105*d) - (2*a*(10*A*b + 7*a*B)*cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x)))/(35*d) - (2*a*A*cot(c + d*x)^(7/2)*(a + b*tan(c + d*x))^(3/2))/(7*d)]
    @test_int [cot(c + d*x)^(7/2)*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 11, -(((im*a - b)^(5/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) + ((im*a + b)^(5/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (2*(15*a^2*A - 23*A*b^2 - 35*a*b*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(15*d) - (2*a*(8*A*b + 5*a*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(15*d) - (2*a*A*cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))^(3/2))/(5*d)]
    @test_int [cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 15, -(((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) + (2*b^(5/2)*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - (2*a*(2*A*b + a*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/d - (2*a*A*cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2))/(3*d)]
    @test_int [cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 15, ((im*a - b)^(5/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (b^(3/2)*(2*A*b + 5*a*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d - ((im*a + b)^(5/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (b*(2*a*A + b*B)*sqrt(a + b*tan(c + d*x)))/(d*sqrt(cot(c + d*x))) - (2*a*A*sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(3/2))/d]
    @test_int [sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)), x, 15, ((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (sqrt(b)*(20*a*A*b + 15*a^2*B - 8*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(4*d) + ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + (b*(4*A*b + 7*a*B)*sqrt(a + b*tan(c + d*x)))/(4*d*sqrt(cot(c + d*x))) + (b*B*(a + b*tan(c + d*x))^(3/2))/(2*d*sqrt(cot(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/sqrt(cot(c + d*x)), x, 16, -(((im*a - b)^(5/2)*(A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) + ((30*a^2*A*b - 16*A*b^3 + 5*a^3*B - 40*a*b^2*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(8*sqrt(b)*d) + ((im*a + b)^(5/2)*(A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((14*a*A*b + 5*a^2*B - 8*b^2*B)*sqrt(a + b*tan(c + d*x)))/(8*d*sqrt(cot(c + d*x))) + (b*B*(a + b*tan(c + d*x))^(3/2))/(3*d*cot(c + d*x)^(3/2)) + ((2*A*b + 3*a*B)*(a + b*tan(c + d*x))^(3/2))/(4*d*sqrt(cot(c + d*x)))]
    @test_int [((a + b*tan(c + d*x))^(5/2)*(A + B*tan(c + d*x)))/cot(c + d*x)^(3/2), x, 17, -(((im*a - b)^(5/2)*(im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d) + ((40*a^3*A*b - 320*a*A*b^3 - 5*a^4*B - 240*a^2*b^2*B + 128*b^4*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(64*b^(3/2)*d) - ((im*a + b)^(5/2)*(im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/d + ((40*a^2*A*b - 64*A*b^3 - 5*a^3*B - 112*a*b^2*B)*sqrt(a + b*tan(c + d*x)))/(64*b*d*sqrt(cot(c + d*x))) + ((40*a*A*b - 5*a^2*B - 48*b^2*B)*(a + b*tan(c + d*x))^(3/2))/(96*b*d*sqrt(cot(c + d*x))) + ((8*A*b - a*B)*(a + b*tan(c + d*x))^(5/2))/(24*b*d*sqrt(cot(c + d*x))) + (B*(a + b*tan(c + d*x))^(7/2))/(4*b*d*sqrt(cot(c + d*x)))]

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

    @test_int [(cot(c + d*x)^(7/2)*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 11, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a + b)*d) + (2*(15*a^2*A - 8*A*b^2 + 10*a*b*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(15*a^3*d) + (2*(4*A*b - 5*a*B)*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(15*a^2*d) - (2*A*cot(c + d*x)^(5/2)*sqrt(a + b*tan(c + d*x)))/(5*a*d)]
    @test_int [(cot(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 10, -(((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d)) - ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a + b)*d) + (2*(2*A*b - 3*a*B)*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(3*a^2*d) - (2*A*cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x)))/(3*a*d)]
    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 9, -(((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d)) + ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a + b)*d) - (2*A*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))/(a*d)]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/sqrt(a + b*tan(c + d*x)), x, 8, ((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d) + ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a + b)*d)]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x))), x, 13, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d) + (2*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(b)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a + b)*d)]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*sqrt(a + b*tan(c + d*x))), x, 14, -(((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d)) + ((2*A*b - a*B)*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(b^(3/2)*d) - ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a + b)*d) + (B*sqrt(a + b*tan(c + d*x)))/(b*d*sqrt(cot(c + d*x)))]

    @test_int [(cot(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 11, -(((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(3/2)*d)) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(3/2)*d) + (2*b*(5*a^2*A*b + 8*A*b^3 - 3*a^3*B - 6*a*b^2*B))/(3*a^3*(a^2 + b^2)*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x))) + (2*(4*A*b - 3*a*B)*sqrt(cot(c + d*x)))/(3*a^2*d*sqrt(a + b*tan(c + d*x))) - (2*A*cot(c + d*x)^(3/2))/(3*a*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 10, ((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(3/2)*d) - ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(3/2)*d) - (2*b*(a^2*A + 2*A*b^2 - a*b*B))/(a^2*(a^2 + b^2)*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x))) - (2*A*sqrt(cot(c + d*x)))/(a*d*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^(1/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 9, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(3/2)*d) + ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(3/2)*d) + (2*b*(A*b - a*B))/(a*(a^2 + b^2)*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(1/2)*(a + b*tan(c + d*x))^(3/2)), x, 9, -(((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(3/2)*d)) + ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(3/2)*d) - (2*(A*b - a*B))/((a^2 + b^2)*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2)), x, 14, -(((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(3/2)*d)) + (2*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(b^(3/2)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(3/2)*d) + (2*a*(A*b - a*B))/(b*(a^2 + b^2)*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))]

    @test_int [(cot(c + d*x)^(5/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 12, ((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(5/2)*d) + ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(5/2)*d) + (2*b*(7*a^2*A*b + 8*A*b^3 - 3*a^3*B - 4*a*b^2*B))/(3*a^3*(a^2 + b^2)*d*sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(3/2)) + (2*(2*A*b - a*B)*sqrt(cot(c + d*x)))/(a^2*d*(a + b*tan(c + d*x))^(3/2)) - (2*A*cot(c + d*x)^(3/2))/(3*a*d*(a + b*tan(c + d*x))^(3/2)) + (2*b*(8*a^4*A*b + 30*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B - 17*a^3*b^2*B - 8*a*b^4*B))/(3*a^4*(a^2 + b^2)^2*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))]
    @test_int [(cot(c + d*x)^(3/2)*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 11, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(5/2)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(5/2)*d) - (2*b*(3*a^2*A + 4*A*b^2 - a*b*B))/(3*a^2*(a^2 + b^2)*d*sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(3/2)) - (2*A*sqrt(cot(c + d*x)))/(a*d*(a + b*tan(c + d*x))^(3/2)) - (2*b*(3*a^4*A + 17*a^2*A*b^2 + 8*A*b^4 - 8*a^3*b*B - 2*a*b^3*B))/(3*a^3*(a^2 + b^2)^2*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))]
    @test_int [(sqrt(cot(c + d*x))*(A + B*tan(c + d*x)))/(a + b*tan(c + d*x))^(5/2), x, 10, -(((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(5/2)*d)) - ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(5/2)*d) + (2*b*(A*b - a*B))/(3*a*(a^2 + b^2)*d*sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(3/2)) + (2*b*(8*a^2*A*b + 2*A*b^3 - 5*a^3*B + a*b^2*B))/(3*a^2*(a^2 + b^2)^2*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(5/2)), x, 10, -(((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(5/2)*d)) + ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(5/2)*d) - (2*(A*b - a*B))/(3*(a^2 + b^2)*d*sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(3/2)) - (2*(5*a^2*A*b - A*b^3 - 2*a^3*B + 4*a*b^2*B))/(3*a*(a^2 + b^2)^2*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(5/2)), x, 10, ((A + im*B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(5/2)*d) + ((A - im*B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(5/2)*d) + (2*a*(A*b - a*B))/(3*b*(a^2 + b^2)*d*sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(3/2)) + (2*(2*a^2*A*b - 4*A*b^3 + a^3*B + 7*a*b^2*B))/(3*b*(a^2 + b^2)^2*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))]
    @test_int [(A + B*tan(c + d*x))/(cot(c + d*x)^(5/2)*(a + b*tan(c + d*x))^(5/2)), x, 15, ((im*A - B)*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a - b)^(5/2)*d) + (2*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(b^(5/2)*d) - ((im*A + B)*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/((im*a + b)^(5/2)*d) + (2*a*(A*b - a*B))/(3*b*(a^2 + b^2)*d*cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2)) + (2*a*(2*A*b^3 - a*(a^2 + 3*b^2)*B))/(b^2*(a^2 + b^2)^2*d*sqrt(cot(c + d*x))*sqrt(a + b*tan(c + d*x)))]

    @test_int [(sqrt(cot(c + d*x))*(a*B + b*B*tan(c + d*x)))/(a + b*tan(c + d*x))^(3/2), x, 9, (B*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d) + (B*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a + b)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^(3/2)), x, 9, (im*B*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d) - (im*B*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a + b)*d)]
    @test_int [(a*B + b*B*tan(c + d*x))/(cot(c + d*x)^(3/2)*(a + b*tan(c + d*x))^(3/2)), x, 14, -((B*atan((sqrt(im*a - b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a - b)*d)) + (2*B*atanh((sqrt(b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(b)*d) - (B*atanh((sqrt(im*a + b)*sqrt(tan(c + d*x)))/sqrt(a + b*tan(c + d*x)))*sqrt(cot(c + d*x))*sqrt(tan(c + d*x)))/(sqrt(im*a + b)*d)]

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

    @test_int [cot(c + d*x)^m*(A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n, x, 8, (1/(2*d*(1 - m)))*(((A + im*B)*AppellF1(1 - m, -n, 1, 2 - m, -((b*tan(c + d*x))/a), (-im)*tan(c + d*x))*cot(c + d*x)^(-1 + m)*(a + b*tan(c + d*x))^n)/(1 + (b*tan(c + d*x))/a)^n) + (1/(2*d*(1 - m)))*(((A - im*B)*AppellF1(1 - m, -n, 1, 2 - m, -((b*tan(c + d*x))/a), im*tan(c + d*x))*cot(c + d*x)^(-1 + m)*(a + b*tan(c + d*x))^n)/(1 + (b*tan(c + d*x))/a)^n)]

    @test_int [cot(c + d*x)^(3/2)*(A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n, x, 10, -(((A + im*B)*AppellF1(-(1/2), 1, -n, 1/2, (-im)*tan(c + d*x), -((b*tan(c + d*x))/a))*sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^n)/((1 + (b*tan(c + d*x))/a)^n*d)) - ((A - im*B)*AppellF1(-(1/2), 1, -n, 1/2, im*tan(c + d*x), -((b*tan(c + d*x))/a))*sqrt(cot(c + d*x))*(a + b*tan(c + d*x))^n)/((1 + (b*tan(c + d*x))/a)^n*d)]
    @test_int [sqrt(cot(c + d*x))*(A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n, x, 10, ((A + im*B)*AppellF1(1/2, 1, -n, 3/2, (-im)*tan(c + d*x), -((b*tan(c + d*x))/a))*(a + b*tan(c + d*x))^n)/((1 + (b*tan(c + d*x))/a)^n*(d*sqrt(cot(c + d*x)))) + ((A - im*B)*AppellF1(1/2, 1, -n, 3/2, im*tan(c + d*x), -((b*tan(c + d*x))/a))*(a + b*tan(c + d*x))^n)/((1 + (b*tan(c + d*x))/a)^n*(d*sqrt(cot(c + d*x))))]
    @test_int [(A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n/sqrt(cot(c + d*x)), x, 10, ((A + im*B)*AppellF1(3/2, 1, -n, 5/2, (-im)*tan(c + d*x), -((b*tan(c + d*x))/a))*(a + b*tan(c + d*x))^n)/((1 + (b*tan(c + d*x))/a)^n*(3*d*cot(c + d*x)^(3/2))) + ((A - im*B)*AppellF1(3/2, 1, -n, 5/2, im*tan(c + d*x), -((b*tan(c + d*x))/a))*(a + b*tan(c + d*x))^n)/((1 + (b*tan(c + d*x))/a)^n*(3*d*cot(c + d*x)^(3/2)))]
    @test_int [(A + B*tan(c + d*x))*(a + b*tan(c + d*x))^n/cot(c + d*x)^(3/2), x, 10, ((A + im*B)*AppellF1(5/2, 1, -n, 7/2, (-im)*tan(c + d*x), -((b*tan(c + d*x))/a))*(a + b*tan(c + d*x))^n)/((1 + (b*tan(c + d*x))/a)^n*(5*d*cot(c + d*x)^(5/2))) + ((A - im*B)*AppellF1(5/2, 1, -n, 7/2, im*tan(c + d*x), -((b*tan(c + d*x))/a))*(a + b*tan(c + d*x))^n)/((1 + (b*tan(c + d*x))/a)^n*(5*d*cot(c + d*x)^(5/2)))]

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

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

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(a+a*im*tan(e+f*x))^m*(c-c*im*tan(e+f*x))^n*(A+B*tan(e+f*x))=#

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

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

    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^n, x, 3, (a*(im*A + B)*(c - im*c*tan(e + f*x))^n)/(f*n) - (a*B*(c - im*c*tan(e + f*x))^(1 + n))/(c*f*(1 + n))]

    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^4, x, 3, (a*(im*A + B)*c^4*(1 - im*tan(e + f*x))^4)/(4*f) - (a*B*c^4*(1 - im*tan(e + f*x))^5)/(5*f)]
    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^3, x, 3, (a*(im*A + B)*c^3*(1 - im*tan(e + f*x))^3)/(3*f) - (a*B*c^3*(1 - im*tan(e + f*x))^4)/(4*f)]
    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^2, x, 3, (a*A*c^2*tan(e + f*x))/f - (a*(im*A - B)*c^2*tan(e + f*x)^2)/(2*f) - (im*a*B*c^2*tan(e + f*x)^3)/(3*f)]
    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x)), x, 2, (a*A*c*tan(e + f*x))/f + (a*B*c*tan(e + f*x)^2)/(2*f)]
    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)), x, 2, a*(A - im*B)*x - (a*(im*A + B)*log(cos(e + f*x)))/f + (im*a*B*tan(e + f*x))/f]
    @test_int [((a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x)), x, 3, (im*a*B*x)/c + (a*B*log(cos(e + f*x)))/(c*f) + (a*(A - im*B))/(c*f*(im + tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^2, x, 2, (a*(A + B*tan(e + f*x))^2)/(2*(im*A + B)*c^2*f*(1 - im*tan(e + f*x))^2)]
    @test_int [((a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^3, x, 3, -((a*(A - im*B))/(3*c^3*f*(im + tan(e + f*x))^3)) - (a*B)/(2*c^3*f*(im + tan(e + f*x))^2)]
    @test_int [((a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^4, x, 3, -((a*(im*A + B))/(4*c^4*f*(im + tan(e + f*x))^4)) - (im*a*B)/(3*c^4*f*(im + tan(e + f*x))^3)]
    @test_int [((a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^5, x, 3, (a*(A - im*B))/(5*c^5*f*(im + tan(e + f*x))^5) + (a*B)/(4*c^5*f*(im + tan(e + f*x))^4)]

    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^n, x, 3, (2*a^2*(im*A + B)*(c - im*c*tan(e + f*x))^n)/(f*n) - (a^2*(im*A + 3*B)*(c - im*c*tan(e + f*x))^(1 + n))/(c*f*(1 + n)) + (a^2*B*(c - im*c*tan(e + f*x))^(2 + n))/(c^2*f*(2 + n))]

    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^5, x, 3, (2*a^2*(im*A + B)*c^5*(1 - im*tan(e + f*x))^5)/(5*f) - (a^2*(im*A + 3*B)*c^5*(1 - im*tan(e + f*x))^6)/(6*f) + (a^2*B*c^5*(1 - im*tan(e + f*x))^7)/(7*f)]
    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^4, x, 3, (a^2*(im*A + B)*c^4*(1 - im*tan(e + f*x))^4)/(2*f) - (a^2*(im*A + 3*B)*c^4*(1 - im*tan(e + f*x))^5)/(5*f) + (a^2*B*c^4*(1 - im*tan(e + f*x))^6)/(6*f)]
    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^3, x, 3, (2*a^2*(im*A + B)*c^3*(1 - im*tan(e + f*x))^3)/(3*f) - (a^2*(im*A + 3*B)*c^3*(1 - im*tan(e + f*x))^4)/(4*f) + (a^2*B*c^3*(1 - im*tan(e + f*x))^5)/(5*f)]
    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^2, x, 4, (a^2*B*c^2*sec(e + f*x)^4)/(4*f) + (a^2*A*c^2*tan(e + f*x))/f + (a^2*A*c^2*tan(e + f*x)^3)/(3*f)]
    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x)), x, 3, (a^2*A*c*tan(e + f*x))/f + (a^2*(im*A + B)*c*tan(e + f*x)^2)/(2*f) + (im*a^2*B*c*tan(e + f*x)^3)/(3*f)]
    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)), x, 3, 2*a^2*(A - im*B)*x - (2*a^2*(im*A + B)*log(cos(e + f*x)))/f - (a^2*(A - im*B)*tan(e + f*x))/f + (B*(a + im*a*tan(e + f*x))^2)/(2*f)]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x)), x, 3, -((a^2*(A - (3*im)*B)*x)/c) + (a^2*(im*A + 3*B)*log(cos(e + f*x)))/(c*f) - (im*a^2*B*tan(e + f*x))/(c*f) + (2*a^2*(A - im*B))/(c*f*(im + tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^2, x, 3, ((-im)*a^2*B*x)/c^2 - (a^2*B*log(cos(e + f*x)))/(c^2*f) + (a^2*(im*A + B))/(c^2*f*(im + tan(e + f*x))^2) - (a^2*(A - (3*im)*B))/(c^2*f*(im + tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^3, x, 3, (-2*a^2*(A - im*B))/(3*c^3*f*(im + tan(e + f*x))^3) - (a^2*(im*A + 3*B))/(2*c^3*f*(im + tan(e + f*x))^2) - (im*a^2*B)/(c^3*f*(im + tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^4, x, 3, -(a^2*(im*A + B))/(2*c^4*f*(im + tan(e + f*x))^4) + (a^2*(A - (3*im)*B))/(3*c^4*f*(im + tan(e + f*x))^3) + (a^2*B)/(2*c^4*f*(im + tan(e + f*x))^2)]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^5, x, 3, (2*a^2*(A - im*B))/(5*c^5*f*(im + tan(e + f*x))^5) + (a^2*(im*A + 3*B))/(4*c^5*f*(im + tan(e + f*x))^4) + ((im/3)*a^2*B)/(c^5*f*(im + tan(e + f*x))^3)]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^6, x, 3, (a^2*(im*A + B))/(3*c^6*f*(im + tan(e + f*x))^6) - (a^2*(A - (3*im)*B))/(5*c^6*f*(im + tan(e + f*x))^5) - (a^2*B)/(4*c^6*f*(im + tan(e + f*x))^4)]

    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^n, x, 3, (4*a^3*(im*A + B)*(c - im*c*tan(e + f*x))^n)/(f*n) - (4*a^3*(im*A + 2*B)*(c - im*c*tan(e + f*x))^(1 + n))/(c*f*(1 + n)) + (a^3*(im*A + 5*B)*(c - im*c*tan(e + f*x))^(2 + n))/(c^2*f*(2 + n)) - (a^3*B*(c - im*c*tan(e + f*x))^(3 + n))/(c^3*f*(3 + n))]

    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^6, x, 3, (2*a^3*(im*A + B)*c^6*(1 - im*tan(e + f*x))^6)/(3*f) - (4*a^3*(im*A + 2*B)*c^6*(1 - im*tan(e + f*x))^7)/(7*f) + (a^3*(im*A + 5*B)*c^6*(1 - im*tan(e + f*x))^8)/(8*f) - (a^3*B*c^6*(1 - im*tan(e + f*x))^9)/(9*f)]
    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^5, x, 3, (4*a^3*(im*A + B)*c^5*(1 - im*tan(e + f*x))^5)/(5*f) - (2*a^3*(im*A + 2*B)*c^5*(1 - im*tan(e + f*x))^6)/(3*f) + (a^3*(im*A + 5*B)*c^5*(1 - im*tan(e + f*x))^7)/(7*f) - (a^3*B*c^5*(1 - im*tan(e + f*x))^8)/(8*f)]
    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^4, x, 3, (a^3*(im*A + B)*c^4*(1 - im*tan(e + f*x))^4)/f - (4*a^3*(im*A + 2*B)*c^4*(1 - im*tan(e + f*x))^5)/(5*f) + (a^3*(im*A + 5*B)*c^4*(1 - im*tan(e + f*x))^6)/(6*f) - (a^3*B*c^4*(1 - im*tan(e + f*x))^7)/(7*f)]
    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^3, x, 5, (a^3*B*c^3*sec(e + f*x)^6)/(6*f) + (a^3*A*c^3*tan(e + f*x))/f + (2*a^3*A*c^3*tan(e + f*x)^3)/(3*f) + (a^3*A*c^3*tan(e + f*x)^5)/(5*f)]
    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^2, x, 3, -((2*a^3*(im*A - B)*c^2*(1 + im*tan(e + f*x))^3)/(3*f)) + (a^3*(im*A - 3*B)*c^2*(1 + im*tan(e + f*x))^4)/(4*f) + (a^3*B*c^2*(1 + im*tan(e + f*x))^5)/(5*f)]
    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x)), x, 3, -((a^3*(im*A - B)*c*(1 + im*tan(e + f*x))^3)/(3*f)) - (a^3*B*c*(1 + im*tan(e + f*x))^4)/(4*f)]
    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)), x, 4, 4*a^3*(A - im*B)*x - (4*a^3*(im*A + B)*log(cos(e + f*x)))/f - (2*a^3*(A - im*B)*tan(e + f*x))/f + (a*(im*A + B)*(a + im*a*tan(e + f*x))^2)/(2*f) + (B*(a + im*a*tan(e + f*x))^3)/(3*f)]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x)), x, 3, (-4*a^3*(A - (2*im)*B)*x)/c + (4*a^3*(im*A + 2*B)*log(cos(e + f*x)))/(c*f) + (a^3*(A - (4*im)*B)*tan(e + f*x))/(c*f) + (a^3*B*tan(e + f*x)^2)/(2*c*f) + (4*a^3*(A - im*B))/(c*f*(im + tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^2, x, 3, (a^3*(A - (5*im)*B)*x)/c^2 - (a^3*(im*A + 5*B)*log(cos(e + f*x)))/(c^2*f) + (im*a^3*B*tan(e + f*x))/(c^2*f) + (2*a^3*(im*A + B))/(c^2*f*(im + tan(e + f*x))^2) - (4*a^3*(A - (2*im)*B))/(c^2*f*(im + tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^3, x, 4, (im*a^3*B*x)/c^3 + (a^3*B*log(cos(e + f*x)))/(c^3*f) - (a^3*(im*A + B)*(1 + im*tan(e + f*x))^3)/(6*c^3*f*(1 - im*tan(e + f*x))^3) - (2*a^3*B)/(c^3*f*(im + tan(e + f*x))^2) - ((4*im)*a^3*B)/(c^3*f*(im + tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^4, x, 3, -(a^3*(im*A + B)*(1 + im*tan(e + f*x))^3)/(8*c^4*f*(1 - im*tan(e + f*x))^4) - (a^3*(im*A - 7*B)*(1 + im*tan(e + f*x))^3)/(48*c^4*f*(1 - im*tan(e + f*x))^3)]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^5, x, 3, (4*a^3*(A - im*B))/(5*c^5*f*(im + tan(e + f*x))^5) + (a^3*(im*A + 2*B))/(c^5*f*(im + tan(e + f*x))^4) - (a^3*(A - (5*im)*B))/(3*c^5*f*(im + tan(e + f*x))^3) - (a^3*B)/(2*c^5*f*(im + tan(e + f*x))^2)]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^6, x, 3, (2*a^3*(im*A + B))/(3*c^6*f*(im + tan(e + f*x))^6) - (4*a^3*(A - (2*im)*B))/(5*c^6*f*(im + tan(e + f*x))^5) - (a^3*(im*A + 5*B))/(4*c^6*f*(im + tan(e + f*x))^4) - ((im/3)*a^3*B)/(c^6*f*(im + tan(e + f*x))^3)]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^7, x, 3, (-4*a^3*(A - im*B))/(7*c^7*f*(im + tan(e + f*x))^7) - (2*a^3*(im*A + 2*B))/(3*c^7*f*(im + tan(e + f*x))^6) + (a^3*(A - (5*im)*B))/(5*c^7*f*(im + tan(e + f*x))^5) + (a^3*B)/(4*c^7*f*(im + tan(e + f*x))^4)]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^8, x, 3, -(a^3*(im*A + B))/(2*c^8*f*(im + tan(e + f*x))^8) + (4*a^3*(A - (2*im)*B))/(7*c^8*f*(im + tan(e + f*x))^7) + (a^3*(im*A + 5*B))/(6*c^8*f*(im + tan(e + f*x))^6) + ((im/5)*a^3*B)/(c^8*f*(im + tan(e + f*x))^5)]

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

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^n)/(a + im*a*tan(e + f*x)), x, 3, ((im*A*(1 - n) + B*(1 + n))*HypergeometricFunctions._₂F₁(1, n, 1 + n, (1/2)*(1 - im*tan(e + f*x)))*(c - im*c*tan(e + f*x))^n)/(4*a*f*n) + ((im*A - B)*(c - im*c*tan(e + f*x))^n)/(2*a*f*(1 + im*tan(e + f*x)))]

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^4)/(a + im*a*tan(e + f*x)), x, 3, (-4*(3*A + (5*im)*B)*c^4*x)/a - (4*((3*im)*A - 5*B)*c^4*log(cos(e + f*x)))/(a*f) - (8*(A + im*B)*c^4)/(a*f*(im - tan(e + f*x))) + ((5*A + (12*im)*B)*c^4*tan(e + f*x))/(a*f) - ((im*A - 5*B)*c^4*tan(e + f*x)^2)/(2*a*f) - ((im/3)*B*c^4*tan(e + f*x)^3)/(a*f)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^3)/(a + im*a*tan(e + f*x)), x, 3, (-4*(A + (2*im)*B)*c^3*x)/a - (4*(im*A - 2*B)*c^3*log(cos(e + f*x)))/(a*f) - (4*(A + im*B)*c^3)/(a*f*(im - tan(e + f*x))) + ((A + (4*im)*B)*c^3*tan(e + f*x))/(a*f) + (B*c^3*tan(e + f*x)^2)/(2*a*f)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^2)/(a + im*a*tan(e + f*x)), x, 3, -(((A + (3*im)*B)*c^2*x)/a) - ((im*A - 3*B)*c^2*log(cos(e + f*x)))/(a*f) - (2*(A + im*B)*c^2)/(a*f*(im - tan(e + f*x))) + (im*B*c^2*tan(e + f*x))/(a*f)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x)))/(a + im*a*tan(e + f*x)), x, 3, -((im*B*c*x)/a) + (B*c*log(cos(e + f*x)))/(a*f) - ((A + im*B)*c)/(a*f*(im - tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/(a + im*a*tan(e + f*x)), x, 2, ((A - im*B)*x)/(2*a) + (im*A - B)/(2*f*(a + im*a*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))), x, 4, (A*x)/(2*a*c) - (cos(e + f*x)^2*(B - A*tan(e + f*x)))/(2*a*c*f)]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^2), x, 4, ((3*A + im*B)*x)/(8*a*c^2) - (A + im*B)/(8*a*c^2*f*(im - tan(e + f*x))) + (im*A + B)/(8*a*c^2*f*(im + tan(e + f*x))^2) + A/(4*a*c^2*f*(im + tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^3), x, 4, ((2*A + im*B)*x)/(8*a*c^3) - (A + im*B)/(16*a*c^3*f*(im - tan(e + f*x))) - (A - im*B)/(12*a*c^3*f*(im + tan(e + f*x))^3) + ((im/8)*A)/(a*c^3*f*(im + tan(e + f*x))^2) + (3*A + im*B)/(16*a*c^3*f*(im + tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^4), x, 4, ((5*A + (3*im)*B)*x)/(32*a*c^4) - (A + im*B)/(32*a*c^4*f*(im - tan(e + f*x))) - (im*A + B)/(16*a*c^4*f*(im + tan(e + f*x))^4) - A/(12*a*c^4*f*(im + tan(e + f*x))^3) + ((3*im)*A - B)/(32*a*c^4*f*(im + tan(e + f*x))^2) + (2*A + im*B)/(16*a*c^4*f*(im + tan(e + f*x)))]

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^n)/(a + im*a*tan(e + f*x))^2, x, 3, ((im*A*(2 - n) + B*(2 + n))*HypergeometricFunctions._₂F₁(2, n, 1 + n, (1/2)*(1 - im*tan(e + f*x)))*(c - im*c*tan(e + f*x))^n)/(16*a^2*f*n) + ((im*A - B)*(c - im*c*tan(e + f*x))^n)/(4*a^2*f*(1 + im*tan(e + f*x))^2)]

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^5)/(a + im*a*tan(e + f*x))^2, x, 3, (8*(3*A + (7*im)*B)*c^5*x)/a^2 + (8*((3*im)*A - 7*B)*c^5*log(cos(e + f*x)))/(a^2*f) - (8*(im*A - B)*c^5)/(a^2*f*(im - tan(e + f*x))^2) + (16*(2*A + (3*im)*B)*c^5)/(a^2*f*(im - tan(e + f*x))) - ((7*A + (24*im)*B)*c^5*tan(e + f*x))/(a^2*f) + ((im*A - 7*B)*c^5*tan(e + f*x)^2)/(2*a^2*f) + ((im/3)*B*c^5*tan(e + f*x)^3)/(a^2*f)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^4)/(a + im*a*tan(e + f*x))^2, x, 3, (6*(A + (3*im)*B)*c^4*x)/a^2 + (6*(im*A - 3*B)*c^4*log(cos(e + f*x)))/(a^2*f) - (4*(im*A - B)*c^4)/(a^2*f*(im - tan(e + f*x))^2) + (4*(3*A + (5*im)*B)*c^4)/(a^2*f*(im - tan(e + f*x))) - ((A + (6*im)*B)*c^4*tan(e + f*x))/(a^2*f) - (B*c^4*tan(e + f*x)^2)/(2*a^2*f)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^3)/(a + im*a*tan(e + f*x))^2, x, 3, ((A + (5*im)*B)*c^3*x)/a^2 + ((im*A - 5*B)*c^3*log(cos(e + f*x)))/(a^2*f) - (2*(im*A - B)*c^3)/(a^2*f*(im - tan(e + f*x))^2) + (4*(A + (2*im)*B)*c^3)/(a^2*f*(im - tan(e + f*x))) - (im*B*c^3*tan(e + f*x))/(a^2*f)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^2)/(a + im*a*tan(e + f*x))^2, x, 3, (im*B*c^2*x)/a^2 - (B*c^2*log(cos(e + f*x)))/(a^2*f) - ((im*A - B)*c^2)/(a^2*f*(im - tan(e + f*x))^2) + ((A + (3*im)*B)*c^2)/(a^2*f*(im - tan(e + f*x)))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x)))/(a + im*a*tan(e + f*x))^2, x, 2, -((c*(A + B*tan(e + f*x))^2)/(2*a^2*(im*A - B)*f*(1 + im*tan(e + f*x))^2))]
    @test_int [(A + B*tan(e + f*x))/(a + im*a*tan(e + f*x))^2, x, 3, ((A - im*B)*x)/(4*a^2) + (im*A - B)/(4*f*(a + im*a*tan(e + f*x))^2) + (im*A + B)/(4*f*(a^2 + im*a^2*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^2*(c - im*c*tan(e + f*x))), x, 4, ((3*A - im*B)*x)/(8*a^2*c) - (im*A - B)/(8*a^2*c*f*(im - tan(e + f*x))^2) - A/(4*a^2*c*f*(im - tan(e + f*x))) + (A - im*B)/(8*a^2*c*f*(im + tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^2), x, 5, (3*A*x)/(8*a^2*c^2) + (3*A*cos(e + f*x)*sin(e + f*x))/(8*a^2*c^2*f) - (cos(e + f*x)^4*(B - A*tan(e + f*x)))/(4*a^2*c^2*f)]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^3), x, 4, ((5*A + im*B)*x)/(16*a^2*c^3) - (im*A - B)/(32*a^2*c^3*f*(im - tan(e + f*x))^2) - (2*A + im*B)/(16*a^2*c^3*f*(im - tan(e + f*x))) - (A - im*B)/(24*a^2*c^3*f*(im + tan(e + f*x))^3) + ((3*im)*A + B)/(32*a^2*c^3*f*(im + tan(e + f*x))^2) + (3*A)/(16*a^2*c^3*f*(im + tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^4), x, 4, (5*(3*A + im*B)*x)/(64*a^2*c^4) - (im*A - B)/(64*a^2*c^4*f*(im - tan(e + f*x))^2) - (5*A + (3*im)*B)/(64*a^2*c^4*f*(im - tan(e + f*x))) - (im*A + B)/(32*a^2*c^4*f*(im + tan(e + f*x))^4) - (3*A - im*B)/(48*a^2*c^4*f*(im + tan(e + f*x))^3) + (((3*im)/32)*A)/(a^2*c^4*f*(im + tan(e + f*x))^2) + (5*A + im*B)/(32*a^2*c^4*f*(im + tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^5), x, 4, (3*(7*A + (3*im)*B)*x)/(128*a^2*c^5) - (im*A - B)/(128*a^2*c^5*f*(im - tan(e + f*x))^2) - (3*A + (2*im)*B)/(64*a^2*c^5*f*(im - tan(e + f*x))) + (A - im*B)/(40*a^2*c^5*f*(im + tan(e + f*x))^5) - ((3*im)*A + B)/(64*a^2*c^5*f*(im + tan(e + f*x))^4) - A/(16*a^2*c^5*f*(im + tan(e + f*x))^3) + ((5*im)*A - B)/(64*a^2*c^5*f*(im + tan(e + f*x))^2) + (5*(3*A + im*B))/(128*a^2*c^5*f*(im + tan(e + f*x)))]

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^n)/(a + im*a*tan(e + f*x))^3, x, 3, ((im*A*(3 - n) + B*(3 + n))*HypergeometricFunctions._₂F₁(3, n, 1 + n, (1/2)*(1 - im*tan(e + f*x)))*(c - im*c*tan(e + f*x))^n)/(48*a^3*f*n) + ((im*A - B)*(c - im*c*tan(e + f*x))^n)/(6*a^3*f*(1 + im*tan(e + f*x))^3)]

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^5)/(a + im*a*tan(e + f*x))^3, x, 3, (-8*(A + (4*im)*B)*c^5*x)/a^3 - (8*(im*A - 4*B)*c^5*log(cos(e + f*x)))/(a^3*f) + (16*(A + im*B)*c^5)/(3*a^3*f*(im - tan(e + f*x))^3) + (8*((2*im)*A - 3*B)*c^5)/(a^3*f*(im - tan(e + f*x))^2) - (8*(3*A + (7*im)*B)*c^5)/(a^3*f*(im - tan(e + f*x))) + ((A + (8*im)*B)*c^5*tan(e + f*x))/(a^3*f) + (B*c^5*tan(e + f*x)^2)/(2*a^3*f)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^4)/(a + im*a*tan(e + f*x))^3, x, 3, -(((A + (7*im)*B)*c^4*x)/a^3) - ((im*A - 7*B)*c^4*log(cos(e + f*x)))/(a^3*f) + (8*(A + im*B)*c^4)/(3*a^3*f*(im - tan(e + f*x))^3) + (2*((3*im)*A - 5*B)*c^4)/(a^3*f*(im - tan(e + f*x))^2) - (6*(A + (3*im)*B)*c^4)/(a^3*f*(im - tan(e + f*x))) + (im*B*c^4*tan(e + f*x))/(a^3*f)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^3)/(a + im*a*tan(e + f*x))^3, x, 4, ((-im)*B*c^3*x)/a^3 + (B*c^3*log(cos(e + f*x)))/(a^3*f) - (2*B*c^3)/(a^3*f*(im - tan(e + f*x))^2) - ((4*im)*B*c^3)/(a^3*f*(im - tan(e + f*x))) + ((im*A - B)*c^3*(1 - im*tan(e + f*x))^3)/(6*a^3*f*(1 + im*tan(e + f*x))^3)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^2)/(a + im*a*tan(e + f*x))^3, x, 3, (2*(A + im*B)*c^2)/(3*a^3*f*(im - tan(e + f*x))^3) + ((im*A - 3*B)*c^2)/(2*a^3*f*(im - tan(e + f*x))^2) - (im*B*c^2)/(a^3*f*(im - tan(e + f*x)))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x)))/(a + im*a*tan(e + f*x))^3, x, 3, ((A + im*B)*c)/(3*a^3*f*(im - tan(e + f*x))^3) - (B*c)/(2*a^3*f*(im - tan(e + f*x))^2)]
    @test_int [(A + B*tan(e + f*x))/(a + im*a*tan(e + f*x))^3, x, 4, ((A - im*B)*x)/(8*a^3) + (im*A - B)/(6*f*(a + im*a*tan(e + f*x))^3) + (im*A + B)/(8*a*f*(a + im*a*tan(e + f*x))^2) + (im*A + B)/(8*f*(a^3 + im*a^3*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^3*(c - im*c*tan(e + f*x))), x, 4, ((2*A - im*B)*x)/(8*a^3*c) + (A + im*B)/(12*a^3*c*f*(im - tan(e + f*x))^3) - ((im/8)*A)/(a^3*c*f*(im - tan(e + f*x))^2) - (3*A - im*B)/(16*a^3*c*f*(im - tan(e + f*x))) + (A - im*B)/(16*a^3*c*f*(im + tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^3*(c - im*c*tan(e + f*x))^2), x, 4, ((5*A - im*B)*x)/(16*a^3*c^2) + (A + im*B)/(24*a^3*c^2*f*(im - tan(e + f*x))^3) - ((3*im)*A - B)/(32*a^3*c^2*f*(im - tan(e + f*x))^2) - (3*A)/(16*a^3*c^2*f*(im - tan(e + f*x))) + (im*A + B)/(32*a^3*c^2*f*(im + tan(e + f*x))^2) + (2*A - im*B)/(16*a^3*c^2*f*(im + tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^3*(c - im*c*tan(e + f*x))^3), x, 6, (5*A*x)/(16*a^3*c^3) + (5*A*cos(e + f*x)*sin(e + f*x))/(16*a^3*c^3*f) + (5*A*cos(e + f*x)^3*sin(e + f*x))/(24*a^3*c^3*f) - (cos(e + f*x)^6*(B - A*tan(e + f*x)))/(6*a^3*c^3*f)]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^3*(c - im*c*tan(e + f*x))^4), x, 4, (5*(7*A + im*B)*x)/(128*a^3*c^4) + (A + im*B)/(96*a^3*c^4*f*(im - tan(e + f*x))^3) - ((5*im)*A - 3*B)/(128*a^3*c^4*f*(im - tan(e + f*x))^2) - (5*(3*A + im*B))/(128*a^3*c^4*f*(im - tan(e + f*x))) - (im*A + B)/(64*a^3*c^4*f*(im + tan(e + f*x))^4) - (2*A - im*B)/(48*a^3*c^4*f*(im + tan(e + f*x))^3) + ((5*im)*A + B)/(64*a^3*c^4*f*(im + tan(e + f*x))^2) + (5*A)/(32*a^3*c^4*f*(im + tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^3*(c - im*c*tan(e + f*x))^5), x, 4, (7*(4*A + im*B)*x)/(128*a^3*c^5) + (A + im*B)/(192*a^3*c^5*f*(im - tan(e + f*x))^3) - ((3*im)*A - 2*B)/(128*a^3*c^5*f*(im - tan(e + f*x))^2) - (3*(7*A + (3*im)*B))/(256*a^3*c^5*f*(im - tan(e + f*x))) + (A - im*B)/(80*a^3*c^5*f*(im + tan(e + f*x))^5) - ((2*im)*A + B)/(64*a^3*c^5*f*(im + tan(e + f*x))^4) - (5*A - im*B)/(96*a^3*c^5*f*(im + tan(e + f*x))^3) + (((5*im)/64)*A)/(a^3*c^5*f*(im + tan(e + f*x))^2) + (5*(7*A + im*B))/(256*a^3*c^5*f*(im + tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^3*(c - im*c*tan(e + f*x))^6), x, 4, (7*(3*A + im*B)*x)/(128*a^3*c^6) + (A + im*B)/(384*a^3*c^6*f*(im - tan(e + f*x))^3) - ((7*im)*A - 5*B)/(512*a^3*c^6*f*(im - tan(e + f*x))^2) - (7*(2*A + im*B))/(256*a^3*c^6*f*(im - tan(e + f*x))) + (im*A + B)/(96*a^3*c^6*f*(im + tan(e + f*x))^6) + (2*A - im*B)/(80*a^3*c^6*f*(im + tan(e + f*x))^5) - ((5*im)*A + B)/(128*a^3*c^6*f*(im + tan(e + f*x))^4) - (5*A)/(96*a^3*c^6*f*(im + tan(e + f*x))^3) + (5*((7*im)*A - B))/(512*a^3*c^6*f*(im + tan(e + f*x))^2) + (7*(4*A + im*B))/(256*a^3*c^6*f*(im + tan(e + f*x)))]

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

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

    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2), x, 3, (2*a*(im*A + B)*(c - im*c*tan(e + f*x))^(7/2))/(7*f) - (2*a*B*(c - im*c*tan(e + f*x))^(9/2))/(9*c*f)]
    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2), x, 3, (2*a*(im*A + B)*(c - im*c*tan(e + f*x))^(5/2))/(5*f) - (2*a*B*(c - im*c*tan(e + f*x))^(7/2))/(7*c*f)]
    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2), x, 3, (2*a*(im*A + B)*(c - im*c*tan(e + f*x))^(3/2))/(3*f) - (2*a*B*(c - im*c*tan(e + f*x))^(5/2))/(5*c*f)]
    @test_int [(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)), x, 3, (2*a*(im*A + B)*sqrt(c - im*c*tan(e + f*x)))/f - (2*a*B*(c - im*c*tan(e + f*x))^(3/2))/(3*c*f)]
    @test_int [((a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/sqrt(c - im*c*tan(e + f*x)), x, 3, (-2*a*(im*A + B))/(f*sqrt(c - im*c*tan(e + f*x))) - (2*a*B*sqrt(c - im*c*tan(e + f*x)))/(c*f)]
    @test_int [((a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(3/2), x, 3, (-2*a*(im*A + B))/(3*f*(c - im*c*tan(e + f*x))^(3/2)) + (2*a*B)/(c*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(5/2), x, 3, (-2*a*(im*A + B))/(5*f*(c - im*c*tan(e + f*x))^(5/2)) + (2*a*B)/(3*c*f*(c - im*c*tan(e + f*x))^(3/2))]
    @test_int [((a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(7/2), x, 3, (-2*a*(im*A + B))/(7*f*(c - im*c*tan(e + f*x))^(7/2)) + (2*a*B)/(5*c*f*(c - im*c*tan(e + f*x))^(5/2))]

    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2), x, 3, (4*a^2*(im*A + B)*(c - im*c*tan(e + f*x))^(7/2))/(7*f) - (2*a^2*(im*A + 3*B)*(c - im*c*tan(e + f*x))^(9/2))/(9*c*f) + (2*a^2*B*(c - im*c*tan(e + f*x))^(11/2))/(11*c^2*f)]
    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2), x, 3, (4*a^2*(im*A + B)*(c - im*c*tan(e + f*x))^(5/2))/(5*f) - (2*a^2*(im*A + 3*B)*(c - im*c*tan(e + f*x))^(7/2))/(7*c*f) + (2*a^2*B*(c - im*c*tan(e + f*x))^(9/2))/(9*c^2*f)]
    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2), x, 3, (4*a^2*(im*A + B)*(c - im*c*tan(e + f*x))^(3/2))/(3*f) - (2*a^2*(im*A + 3*B)*(c - im*c*tan(e + f*x))^(5/2))/(5*c*f) + (2*a^2*B*(c - im*c*tan(e + f*x))^(7/2))/(7*c^2*f)]
    @test_int [(a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)), x, 3, (4*a^2*(im*A + B)*sqrt(c - im*c*tan(e + f*x)))/f - (2*a^2*(im*A + 3*B)*(c - im*c*tan(e + f*x))^(3/2))/(3*c*f) + (2*a^2*B*(c - im*c*tan(e + f*x))^(5/2))/(5*c^2*f)]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/sqrt(c - im*c*tan(e + f*x)), x, 3, (-4*a^2*(im*A + B))/(f*sqrt(c - im*c*tan(e + f*x))) - (2*a^2*(im*A + 3*B)*sqrt(c - im*c*tan(e + f*x)))/(c*f) + (2*a^2*B*(c - im*c*tan(e + f*x))^(3/2))/(3*c^2*f)]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(3/2), x, 3, (-4*a^2*(im*A + B))/(3*f*(c - im*c*tan(e + f*x))^(3/2)) + (2*a^2*(im*A + 3*B))/(c*f*sqrt(c - im*c*tan(e + f*x))) + (2*a^2*B*sqrt(c - im*c*tan(e + f*x)))/(c^2*f)]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(5/2), x, 3, (-4*a^2*(im*A + B))/(5*f*(c - im*c*tan(e + f*x))^(5/2)) + (2*a^2*(im*A + 3*B))/(3*c*f*(c - im*c*tan(e + f*x))^(3/2)) - (2*a^2*B)/(c^2*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^2*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(7/2), x, 3, (-4*a^2*(im*A + B))/(7*f*(c - im*c*tan(e + f*x))^(7/2)) + (2*a^2*(im*A + 3*B))/(5*c*f*(c - im*c*tan(e + f*x))^(5/2)) - (2*a^2*B)/(3*c^2*f*(c - im*c*tan(e + f*x))^(3/2))]

    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2), x, 3, (8*a^3*(im*A + B)*(c - im*c*tan(e + f*x))^(7/2))/(7*f) - (8*a^3*(im*A + 2*B)*(c - im*c*tan(e + f*x))^(9/2))/(9*c*f) + (2*a^3*(im*A + 5*B)*(c - im*c*tan(e + f*x))^(11/2))/(11*c^2*f) - (2*a^3*B*(c - im*c*tan(e + f*x))^(13/2))/(13*c^3*f)]
    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2), x, 3, (8*a^3*(im*A + B)*(c - im*c*tan(e + f*x))^(5/2))/(5*f) - (8*a^3*(im*A + 2*B)*(c - im*c*tan(e + f*x))^(7/2))/(7*c*f) + (2*a^3*(im*A + 5*B)*(c - im*c*tan(e + f*x))^(9/2))/(9*c^2*f) - (2*a^3*B*(c - im*c*tan(e + f*x))^(11/2))/(11*c^3*f)]
    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2), x, 3, (8*a^3*(im*A + B)*(c - im*c*tan(e + f*x))^(3/2))/(3*f) - (8*a^3*(im*A + 2*B)*(c - im*c*tan(e + f*x))^(5/2))/(5*c*f) + (2*a^3*(im*A + 5*B)*(c - im*c*tan(e + f*x))^(7/2))/(7*c^2*f) - (2*a^3*B*(c - im*c*tan(e + f*x))^(9/2))/(9*c^3*f)]
    @test_int [(a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)), x, 3, (8*a^3*(im*A + B)*sqrt(c - im*c*tan(e + f*x)))/f - (8*a^3*(im*A + 2*B)*(c - im*c*tan(e + f*x))^(3/2))/(3*c*f) + (2*a^3*(im*A + 5*B)*(c - im*c*tan(e + f*x))^(5/2))/(5*c^2*f) - (2*a^3*B*(c - im*c*tan(e + f*x))^(7/2))/(7*c^3*f)]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/sqrt(c - im*c*tan(e + f*x)), x, 3, (-8*a^3*(im*A + B))/(f*sqrt(c - im*c*tan(e + f*x))) - (8*a^3*(im*A + 2*B)*sqrt(c - im*c*tan(e + f*x)))/(c*f) + (2*a^3*(im*A + 5*B)*(c - im*c*tan(e + f*x))^(3/2))/(3*c^2*f) - (2*a^3*B*(c - im*c*tan(e + f*x))^(5/2))/(5*c^3*f)]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(3/2), x, 3, (-8*a^3*(im*A + B))/(3*f*(c - im*c*tan(e + f*x))^(3/2)) + (8*a^3*(im*A + 2*B))/(c*f*sqrt(c - im*c*tan(e + f*x))) + (2*a^3*(im*A + 5*B)*sqrt(c - im*c*tan(e + f*x)))/(c^2*f) - (2*a^3*B*(c - im*c*tan(e + f*x))^(3/2))/(3*c^3*f)]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(5/2), x, 3, (-8*a^3*(im*A + B))/(5*f*(c - im*c*tan(e + f*x))^(5/2)) + (8*a^3*(im*A + 2*B))/(3*c*f*(c - im*c*tan(e + f*x))^(3/2)) - (2*a^3*(im*A + 5*B))/(c^2*f*sqrt(c - im*c*tan(e + f*x))) - (2*a^3*B*sqrt(c - im*c*tan(e + f*x)))/(c^3*f)]
    @test_int [((a + im*a*tan(e + f*x))^3*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(7/2), x, 3, (-8*a^3*(im*A + B))/(7*f*(c - im*c*tan(e + f*x))^(7/2)) + (8*a^3*(im*A + 2*B))/(5*c*f*(c - im*c*tan(e + f*x))^(5/2)) - (2*a^3*(im*A + 5*B))/(3*c^2*f*(c - im*c*tan(e + f*x))^(3/2)) + (2*a^3*B)/(c^3*f*sqrt(c - im*c*tan(e + f*x)))]

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

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2))/(a + im*a*tan(e + f*x)), x, 7, (-2*sqrt(2)*((5*im)*A - 9*B)*c^(7/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(a*f) + (2*((5*im)*A - 9*B)*c^3*sqrt(c - im*c*tan(e + f*x)))/(a*f) + (((5*im)*A - 9*B)*c^2*(c - im*c*tan(e + f*x))^(3/2))/(3*a*f) + (((5*im)*A - 9*B)*c*(c - im*c*tan(e + f*x))^(5/2))/(10*a*f) + ((im*A - B)*(c - im*c*tan(e + f*x))^(7/2))/(2*a*f*(1 + im*tan(e + f*x)))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2))/(a + im*a*tan(e + f*x)), x, 6, -((sqrt(2)*((3*im)*A - 7*B)*c^(5/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(a*f)) + (((3*im)*A - 7*B)*c^2*sqrt(c - im*c*tan(e + f*x)))/(a*f) + (((3*im)*A - 7*B)*c*(c - im*c*tan(e + f*x))^(3/2))/(6*a*f) + ((im*A - B)*(c - im*c*tan(e + f*x))^(5/2))/(2*a*f*(1 + im*tan(e + f*x)))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(a + im*a*tan(e + f*x)), x, 5, -(((im*A - 5*B)*c^(3/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(sqrt(2)*a*f)) + ((im*A - 5*B)*c*sqrt(c - im*c*tan(e + f*x)))/(2*a*f) + ((im*A - B)*(c - im*c*tan(e + f*x))^(3/2))/(2*a*f*(1 + im*tan(e + f*x)))]
    @test_int [((A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(a + im*a*tan(e + f*x)), x, 4, ((im*A + 3*B)*sqrt(c)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(2*sqrt(2)*a*f) + ((im*A - B)*sqrt(c - im*c*tan(e + f*x)))/(2*a*f*(1 + im*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x))), x, 5, (((3*im)*A + B)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(4*sqrt(2)*a*sqrt(c)*f) - ((3*im)*A + B)/(4*a*f*sqrt(c - im*c*tan(e + f*x))) + (im*A - B)/(2*a*f*(1 + im*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2)), x, 6, (((5*im)*A - B)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(8*sqrt(2)*a*c^(3/2)*f) - ((5*im)*A - B)/(12*a*f*(c - im*c*tan(e + f*x))^(3/2)) + (im*A - B)/(2*a*f*(1 + im*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2)) - ((5*im)*A - B)/(8*a*c*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2)), x, 7, (((7*im)*A - 3*B)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(16*sqrt(2)*a*c^(5/2)*f) - ((7*im)*A - 3*B)/(20*a*f*(c - im*c*tan(e + f*x))^(5/2)) + (im*A - B)/(2*a*f*(1 + im*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2)) - ((7*im)*A - 3*B)/(24*a*c*f*(c - im*c*tan(e + f*x))^(3/2)) - ((7*im)*A - 3*B)/(16*a*c^2*f*sqrt(c - im*c*tan(e + f*x)))]

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(9/2))/(a + im*a*tan(e + f*x))^2, x, 8, (7*(5*im*A - 13*B)*c^(9/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(sqrt(2)*a^2*f) - (7*(5*im*A - 13*B)*c^4*sqrt(c - im*c*tan(e + f*x)))/(2*a^2*f) - (7*(5*im*A - 13*B)*c^3*(c - im*c*tan(e + f*x))^(3/2))/(12*a^2*f) - (7*(5*im*A - 13*B)*c^2*(c - im*c*tan(e + f*x))^(5/2))/(40*a^2*f) - ((5*im*A - 13*B)*c*(c - im*c*tan(e + f*x))^(7/2))/(8*a^2*f*(1 + im*tan(e + f*x))) + ((im*A - B)*(c - im*c*tan(e + f*x))^(9/2))/(4*a^2*f*(1 + im*tan(e + f*x))^2)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2))/(a + im*a*tan(e + f*x))^2, x, 7, (5*((3*im)*A - 11*B)*c^(7/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(2*sqrt(2)*a^2*f) - (5*((3*im)*A - 11*B)*c^3*sqrt(c - im*c*tan(e + f*x)))/(4*a^2*f) - (5*((3*im)*A - 11*B)*c^2*(c - im*c*tan(e + f*x))^(3/2))/(24*a^2*f) - (((3*im)*A - 11*B)*c*(c - im*c*tan(e + f*x))^(5/2))/(8*a^2*f*(1 + im*tan(e + f*x))) + ((im*A - B)*(c - im*c*tan(e + f*x))^(7/2))/(4*a^2*f*(1 + im*tan(e + f*x))^2)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2))/(a + im*a*tan(e + f*x))^2, x, 6, (3*(im*A - 9*B)*c^(5/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(4*sqrt(2)*a^2*f) - (3*(im*A - 9*B)*c^2*sqrt(c - im*c*tan(e + f*x)))/(8*a^2*f) - ((im*A - 9*B)*c*(c - im*c*tan(e + f*x))^(3/2))/(8*a^2*f*(1 + im*tan(e + f*x))) + ((im*A - B)*(c - im*c*tan(e + f*x))^(5/2))/(4*a^2*f*(1 + im*tan(e + f*x))^2)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(a + im*a*tan(e + f*x))^2, x, 5, -((im*A + 7*B)*c^(3/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(8*sqrt(2)*a^2*f) + ((im*A + 7*B)*c*sqrt(c - im*c*tan(e + f*x)))/(8*a^2*f*(1 + im*tan(e + f*x))) + ((im*A - B)*(c - im*c*tan(e + f*x))^(3/2))/(4*a^2*f*(1 + im*tan(e + f*x))^2)]
    @test_int [((A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(a + im*a*tan(e + f*x))^2, x, 5, (((3*im)*A + 5*B)*sqrt(c)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(16*sqrt(2)*a^2*f) + ((im*A - B)*sqrt(c - im*c*tan(e + f*x)))/(4*a^2*f*(1 + im*tan(e + f*x))^2) + (((3*im)*A + 5*B)*sqrt(c - im*c*tan(e + f*x)))/(16*a^2*f*(1 + im*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^2*sqrt(c - im*c*tan(e + f*x))), x, 6, (3*((5*im)*A + 3*B)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(32*sqrt(2)*a^2*sqrt(c)*f) - (3*((5*im)*A + 3*B))/(32*a^2*f*sqrt(c - im*c*tan(e + f*x))) + (im*A - B)/(4*a^2*f*(1 + im*tan(e + f*x))^2*sqrt(c - im*c*tan(e + f*x))) + ((5*im)*A + 3*B)/(16*a^2*f*(1 + im*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^(3/2)), x, 7, (5*((7*im)*A + B)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(64*sqrt(2)*a^2*c^(3/2)*f) - (5*((7*im)*A + B))/(96*a^2*f*(c - im*c*tan(e + f*x))^(3/2)) + (im*A - B)/(4*a^2*f*(1 + im*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^(3/2)) + ((7*im)*A + B)/(16*a^2*f*(1 + im*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2)) - (5*((7*im)*A + B))/(64*a^2*c*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^(5/2)), x, 8, (7*((9*im)*A - B)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(128*sqrt(2)*a^2*c^(5/2)*f) - (7*((9*im)*A - B))/(160*a^2*f*(c - im*c*tan(e + f*x))^(5/2)) + (im*A - B)/(4*a^2*f*(1 + im*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^(5/2)) + ((9*im)*A - B)/(16*a^2*f*(1 + im*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2)) - (7*((9*im)*A - B))/(192*a^2*c*f*(c - im*c*tan(e + f*x))^(3/2)) - (7*((9*im)*A - B))/(128*a^2*c^2*f*sqrt(c - im*c*tan(e + f*x)))]

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(9/2))/(a + im*a*tan(e + f*x))^3, x, 8, -((35*(im*A - 5*B)*c^(9/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(4*sqrt(2)*a^3*f)) + (35*(im*A - 5*B)*c^4*sqrt(c - im*c*tan(e + f*x)))/(8*a^3*f) + (35*(im*A - 5*B)*c^3*(c - im*c*tan(e + f*x))^(3/2))/(48*a^3*f) + (7*(im*A - 5*B)*c^2*(c - im*c*tan(e + f*x))^(5/2))/(16*a^3*f*(1 + im*tan(e + f*x))) - ((im*A - 5*B)*c*(c - im*c*tan(e + f*x))^(7/2))/(8*a^3*f*(1 + im*tan(e + f*x))^2) + ((im*A - B)*(c - im*c*tan(e + f*x))^(9/2))/(6*a^3*f*(1 + im*tan(e + f*x))^3)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2))/(a + im*a*tan(e + f*x))^3, x, 7, (-5*(im*A - 13*B)*c^(7/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(8*sqrt(2)*a^3*f) + (5*(im*A - 13*B)*c^3*sqrt(c - im*c*tan(e + f*x)))/(16*a^3*f) + (5*(im*A - 13*B)*c^2*(c - im*c*tan(e + f*x))^(3/2))/(48*a^3*f*(1 + im*tan(e + f*x))) - ((im*A - 13*B)*c*(c - im*c*tan(e + f*x))^(5/2))/(24*a^3*f*(1 + im*tan(e + f*x))^2) + ((im*A - B)*(c - im*c*tan(e + f*x))^(7/2))/(6*a^3*f*(1 + im*tan(e + f*x))^3)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2))/(a + im*a*tan(e + f*x))^3, x, 6, ((im*A + 11*B)*c^(5/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(16*sqrt(2)*a^3*f) - ((im*A + 11*B)*c^2*sqrt(c - im*c*tan(e + f*x)))/(16*a^3*f*(1 + im*tan(e + f*x))) + ((im*A + 11*B)*c*(c - im*c*tan(e + f*x))^(3/2))/(24*a^3*f*(1 + im*tan(e + f*x))^2) + ((im*A - B)*(c - im*c*tan(e + f*x))^(5/2))/(6*a^3*f*(1 + im*tan(e + f*x))^3)]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(a + im*a*tan(e + f*x))^3, x, 6, -((im*A + 3*B)*c^(3/2)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(32*sqrt(2)*a^3*f) + ((im*A + 3*B)*c*sqrt(c - im*c*tan(e + f*x)))/(8*a^3*f*(1 + im*tan(e + f*x))^2) - ((im*A + 3*B)*c*sqrt(c - im*c*tan(e + f*x)))/(32*a^3*f*(1 + im*tan(e + f*x))) + ((im*A - B)*(c - im*c*tan(e + f*x))^(3/2))/(6*a^3*f*(1 + im*tan(e + f*x))^3)]
    @test_int [((A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(a + im*a*tan(e + f*x))^3, x, 6, (((5*im)*A + 7*B)*sqrt(c)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(64*sqrt(2)*a^3*f) + ((im*A - B)*sqrt(c - im*c*tan(e + f*x)))/(6*a^3*f*(1 + im*tan(e + f*x))^3) + (((5*im)*A + 7*B)*sqrt(c - im*c*tan(e + f*x)))/(48*a^3*f*(1 + im*tan(e + f*x))^2) + (((5*im)*A + 7*B)*sqrt(c - im*c*tan(e + f*x)))/(64*a^3*f*(1 + im*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^3*sqrt(c - im*c*tan(e + f*x))), x, 7, (5*((7*im)*A + 5*B)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(128*sqrt(2)*a^3*sqrt(c)*f) - (5*((7*im)*A + 5*B))/(128*a^3*f*sqrt(c - im*c*tan(e + f*x))) + (im*A - B)/(6*a^3*f*(1 + im*tan(e + f*x))^3*sqrt(c - im*c*tan(e + f*x))) + ((7*im)*A + 5*B)/(48*a^3*f*(1 + im*tan(e + f*x))^2*sqrt(c - im*c*tan(e + f*x))) + (5*((7*im)*A + 5*B))/(192*a^3*f*(1 + im*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^3*(c - im*c*tan(e + f*x))^(3/2)), x, 8, (35*((3*im)*A + B)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(256*sqrt(2)*a^3*c^(3/2)*f) - (35*((3*im)*A + B))/(384*a^3*f*(c - im*c*tan(e + f*x))^(3/2)) + (im*A - B)/(6*a^3*f*(1 + im*tan(e + f*x))^3*(c - im*c*tan(e + f*x))^(3/2)) + ((3*im)*A + B)/(16*a^3*f*(1 + im*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^(3/2)) + (7*((3*im)*A + B))/(64*a^3*f*(1 + im*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2)) - (35*((3*im)*A + B))/(256*a^3*c*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^3*(c - im*c*tan(e + f*x))^(5/2)), x, 9, (21*((11*im)*A + B)*atanh(sqrt(c - im*c*tan(e + f*x))/(sqrt(2)*sqrt(c))))/(512*sqrt(2)*a^3*c^(5/2)*f) - (21*((11*im)*A + B))/(640*a^3*f*(c - im*c*tan(e + f*x))^(5/2)) + (im*A - B)/(6*a^3*f*(1 + im*tan(e + f*x))^3*(c - im*c*tan(e + f*x))^(5/2)) + ((11*im)*A + B)/(48*a^3*f*(1 + im*tan(e + f*x))^2*(c - im*c*tan(e + f*x))^(5/2)) + (3*((11*im)*A + B))/(64*a^3*f*(1 + im*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2)) - (7*((11*im)*A + B))/(256*a^3*c*f*(c - im*c*tan(e + f*x))^(3/2)) - (21*((11*im)*A + B))/(512*a^3*c^2*f*sqrt(c - im*c*tan(e + f*x)))]

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

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

    @test_int [sqrt(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2), x, 8, (-5*sqrt(a)*((4*im)*A - 3*B)*c^(7/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(4*f) - (5*((4*im)*A - 3*B)*c^3*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(8*f) - (5*((4*im)*A - 3*B)*c^2*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(24*f) - (((4*im)*A - 3*B)*c*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2))/(12*f) + (B*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2))/(4*f)]
    @test_int [sqrt(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2), x, 7, -((sqrt(a)*((3*im)*A - 2*B)*c^(5/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/f) - (((3*im)*A - 2*B)*c^2*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*f) - (((3*im)*A - 2*B)*c*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(6*f) + (B*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2))/(3*f)]
    @test_int [sqrt(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2), x, 6, -((sqrt(a)*((2*im)*A - B)*c^(3/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/f) - (((2*im)*A - B)*c*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*f) + (B*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(2*f)]
    @test_int [sqrt(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)), x, 5, ((-2*im)*sqrt(a)*A*sqrt(c)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/f + (B*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/f]
    @test_int [(sqrt(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/sqrt(c - im*c*tan(e + f*x)), x, 5, (2*sqrt(a)*B*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(sqrt(c)*f) - ((im*A + B)*sqrt(a + im*a*tan(e + f*x)))/(f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(sqrt(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(3/2), x, 3, -((im*A + B)*sqrt(a + im*a*tan(e + f*x)))/(3*f*(c - im*c*tan(e + f*x))^(3/2)) - ((im*A - 2*B)*sqrt(a + im*a*tan(e + f*x)))/(3*c*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(sqrt(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(5/2), x, 4, -((im*A + B)*sqrt(a + im*a*tan(e + f*x)))/(5*f*(c - im*c*tan(e + f*x))^(5/2)) - (((2*im)*A - 3*B)*sqrt(a + im*a*tan(e + f*x)))/(15*c*f*(c - im*c*tan(e + f*x))^(3/2)) - (((2*im)*A - 3*B)*sqrt(a + im*a*tan(e + f*x)))/(15*c^2*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(sqrt(a + im*a*tan(e + f*x))*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(7/2), x, 5, -((im*A + B)*sqrt(a + im*a*tan(e + f*x)))/(7*f*(c - im*c*tan(e + f*x))^(7/2)) - (((3*im)*A - 4*B)*sqrt(a + im*a*tan(e + f*x)))/(35*c*f*(c - im*c*tan(e + f*x))^(5/2)) - (2*((3*im)*A - 4*B)*sqrt(a + im*a*tan(e + f*x)))/(105*c^2*f*(c - im*c*tan(e + f*x))^(3/2)) - (2*((3*im)*A - 4*B)*sqrt(a + im*a*tan(e + f*x)))/(105*c^3*f*sqrt(c - im*c*tan(e + f*x)))]

    @test_int [(a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2), x, 8, -(a^(3/2)*((5*im)*A - 2*B)*c^(7/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(4*f) + (a*(5*A + (2*im)*B)*c^3*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(8*f) - (((5*im)*A - 2*B)*c^2*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(12*f) - (((5*im)*A - 2*B)*c*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(5/2))/(20*f) + (B*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(7/2))/(5*f)]
    @test_int [(a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2), x, 7, -(a^(3/2)*((4*im)*A - B)*c^(5/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(4*f) + (a*(4*A + im*B)*c^2*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(8*f) - (((4*im)*A - B)*c*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(12*f) + (B*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(5/2))/(4*f)]
    @test_int [(a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2), x, 6, ((-im)*a^(3/2)*A*c^(3/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/f + (a*A*c*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*f) + (B*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(3*f)]
    @test_int [(a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)), x, 6, -((a^(3/2)*((2*im)*A + B)*sqrt(c)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/f) + (a*((2*im)*A + B)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*f) + (B*(a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x)))/(2*f)]
    @test_int [((a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x)))/sqrt(c - im*c*tan(e + f*x)), x, 6, (2*a^(3/2)*(im*A + 2*B)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(sqrt(c)*f) - ((im*A + B)*(a + im*a*tan(e + f*x))^(3/2))/(f*sqrt(c - im*c*tan(e + f*x))) - (a*(im*A + 2*B)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(c*f)]
    @test_int [((a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(3/2), x, 6, (-2*a^(3/2)*B*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(c^(3/2)*f) - ((im*A + B)*(a + im*a*tan(e + f*x))^(3/2))/(3*f*(c - im*c*tan(e + f*x))^(3/2)) + (2*a*B*sqrt(a + im*a*tan(e + f*x)))/(c*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(5/2), x, 3, -((im*A + B)*(a + im*a*tan(e + f*x))^(3/2))/(5*f*(c - im*c*tan(e + f*x))^(5/2)) - ((im*A - 4*B)*(a + im*a*tan(e + f*x))^(3/2))/(15*c*f*(c - im*c*tan(e + f*x))^(3/2))]
    @test_int [((a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(7/2), x, 4, -((im*A + B)*(a + im*a*tan(e + f*x))^(3/2))/(7*f*(c - im*c*tan(e + f*x))^(7/2)) - (((2*im)*A - 5*B)*(a + im*a*tan(e + f*x))^(3/2))/(35*c*f*(c - im*c*tan(e + f*x))^(5/2)) - (((2*im)*A - 5*B)*(a + im*a*tan(e + f*x))^(3/2))/(105*c^2*f*(c - im*c*tan(e + f*x))^(3/2))]
    @test_int [((a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(9/2), x, 5, -((im*A + B)*(a + im*a*tan(e + f*x))^(3/2))/(9*f*(c - im*c*tan(e + f*x))^(9/2)) - ((im*A - 2*B)*(a + im*a*tan(e + f*x))^(3/2))/(21*c*f*(c - im*c*tan(e + f*x))^(7/2)) - (2*(im*A - 2*B)*(a + im*a*tan(e + f*x))^(3/2))/(105*c^2*f*(c - im*c*tan(e + f*x))^(5/2)) - (2*(im*A - 2*B)*(a + im*a*tan(e + f*x))^(3/2))/(315*c^3*f*(c - im*c*tan(e + f*x))^(3/2))]
    @test_int [((a + im*a*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(11/2), x, 6, -((im*A + B)*(a + im*a*tan(e + f*x))^(3/2))/(11*f*(c - im*c*tan(e + f*x))^(11/2)) - (((4*im)*A - 7*B)*(a + im*a*tan(e + f*x))^(3/2))/(99*c*f*(c - im*c*tan(e + f*x))^(9/2)) - (((4*im)*A - 7*B)*(a + im*a*tan(e + f*x))^(3/2))/(231*c^2*f*(c - im*c*tan(e + f*x))^(7/2)) - (2*((4*im)*A - 7*B)*(a + im*a*tan(e + f*x))^(3/2))/(1155*c^3*f*(c - im*c*tan(e + f*x))^(5/2)) - (2*((4*im)*A - 7*B)*(a + im*a*tan(e + f*x))^(3/2))/(3465*c^4*f*(c - im*c*tan(e + f*x))^(3/2))]

    @test_int [(a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2), x, 8, -(a^(5/2)*((6*im)*A - B)*c^(7/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(8*f) + (a^2*(6*A + im*B)*c^3*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(16*f) + (a*(6*A + im*B)*c^2*tan(e + f*x)*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(24*f) - (((6*im)*A - B)*c*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(5/2))/(30*f) + (B*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(7/2))/(6*f)]
    @test_int [(a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2), x, 7, (((-3*im)/4)*a^(5/2)*A*c^(5/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/f + (3*a^2*A*c^2*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(8*f) + (a*A*c*tan(e + f*x)*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(4*f) + (B*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(5/2))/(5*f)]
    @test_int [(a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2), x, 7, -(a^(5/2)*((4*im)*A + B)*c^(3/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(4*f) + (a^2*(4*A - im*B)*c*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(8*f) + (a*((4*im)*A + B)*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(12*f) + (B*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(3/2))/(4*f)]
    @test_int [(a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)), x, 7, -((a^(5/2)*((3*im)*A + 2*B)*sqrt(c)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/f) + (a^2*((3*im)*A + 2*B)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*f) + (a*((3*im)*A + 2*B)*(a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x)))/(6*f) + (B*(a + im*a*tan(e + f*x))^(5/2)*sqrt(c - im*c*tan(e + f*x)))/(3*f)]
    @test_int [((a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x)))/sqrt(c - im*c*tan(e + f*x)), x, 7, (3*a^(5/2)*((2*im)*A + 3*B)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(sqrt(c)*f) - ((im*A + B)*(a + im*a*tan(e + f*x))^(5/2))/(f*sqrt(c - im*c*tan(e + f*x))) - (3*a^2*((2*im)*A + 3*B)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*c*f) - (a*((2*im)*A + 3*B)*(a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x)))/(2*c*f)]
    @test_int [((a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(3/2), x, 7, (-2*a^(5/2)*(im*A + 4*B)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(c^(3/2)*f) - ((im*A + B)*(a + im*a*tan(e + f*x))^(5/2))/(3*f*(c - im*c*tan(e + f*x))^(3/2)) + (2*a*(im*A + 4*B)*(a + im*a*tan(e + f*x))^(3/2))/(3*c*f*sqrt(c - im*c*tan(e + f*x))) + (a^2*(im*A + 4*B)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(c^2*f)]
    @test_int [((a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(5/2), x, 7, (2*a^(5/2)*B*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(c^(5/2)*f) - ((im*A + B)*(a + im*a*tan(e + f*x))^(5/2))/(5*f*(c - im*c*tan(e + f*x))^(5/2)) + (2*a*B*(a + im*a*tan(e + f*x))^(3/2))/(3*c*f*(c - im*c*tan(e + f*x))^(3/2)) - (2*a^2*B*sqrt(a + im*a*tan(e + f*x)))/(c^2*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(7/2), x, 3, -((im*A + B)*(a + im*a*tan(e + f*x))^(5/2))/(7*f*(c - im*c*tan(e + f*x))^(7/2)) - ((im*A - 6*B)*(a + im*a*tan(e + f*x))^(5/2))/(35*c*f*(c - im*c*tan(e + f*x))^(5/2))]
    @test_int [((a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(9/2), x, 4, -((im*A + B)*(a + im*a*tan(e + f*x))^(5/2))/(9*f*(c - im*c*tan(e + f*x))^(9/2)) - (((2*im)*A - 7*B)*(a + im*a*tan(e + f*x))^(5/2))/(63*c*f*(c - im*c*tan(e + f*x))^(7/2)) - (((2*im)*A - 7*B)*(a + im*a*tan(e + f*x))^(5/2))/(315*c^2*f*(c - im*c*tan(e + f*x))^(5/2))]
    @test_int [((a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(11/2), x, 5, -((im*A + B)*(a + im*a*tan(e + f*x))^(5/2))/(11*f*(c - im*c*tan(e + f*x))^(11/2)) - (((3*im)*A - 8*B)*(a + im*a*tan(e + f*x))^(5/2))/(99*c*f*(c - im*c*tan(e + f*x))^(9/2)) - (2*((3*im)*A - 8*B)*(a + im*a*tan(e + f*x))^(5/2))/(693*c^2*f*(c - im*c*tan(e + f*x))^(7/2)) - (2*((3*im)*A - 8*B)*(a + im*a*tan(e + f*x))^(5/2))/(3465*c^3*f*(c - im*c*tan(e + f*x))^(5/2))]
    @test_int [((a + im*a*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(13/2), x, 6, -((im*A + B)*(a + im*a*tan(e + f*x))^(5/2))/(13*f*(c - im*c*tan(e + f*x))^(13/2)) - (((4*im)*A - 9*B)*(a + im*a*tan(e + f*x))^(5/2))/(143*c*f*(c - im*c*tan(e + f*x))^(11/2)) - (((4*im)*A - 9*B)*(a + im*a*tan(e + f*x))^(5/2))/(429*c^2*f*(c - im*c*tan(e + f*x))^(9/2)) - (2*((4*im)*A - 9*B)*(a + im*a*tan(e + f*x))^(5/2))/(3003*c^3*f*(c - im*c*tan(e + f*x))^(7/2)) - (2*((4*im)*A - 9*B)*(a + im*a*tan(e + f*x))^(5/2))/(15015*c^4*f*(c - im*c*tan(e + f*x))^(5/2))]

    @test_int [(a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(9/2), x, 9, (-5*a^(7/2)*((8*im)*A - B)*c^(9/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(64*f) + (5*a^3*(8*A + im*B)*c^4*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(128*f) + (5*a^2*(8*A + im*B)*c^3*tan(e + f*x)*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(192*f) + (a*(8*A + im*B)*c^2*tan(e + f*x)*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(5/2))/(48*f) - (((8*im)*A - B)*c*(a + im*a*tan(e + f*x))^(7/2)*(c - im*c*tan(e + f*x))^(7/2))/(56*f) + (B*(a + im*a*tan(e + f*x))^(7/2)*(c - im*c*tan(e + f*x))^(9/2))/(8*f)]
    @test_int [(a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2), x, 8, (((-5*im)/8)*a^(7/2)*A*c^(7/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/f + (5*a^3*A*c^3*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(16*f) + (5*a^2*A*c^2*tan(e + f*x)*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(24*f) + (a*A*c*tan(e + f*x)*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(5/2))/(6*f) + (B*(a + im*a*tan(e + f*x))^(7/2)*(c - im*c*tan(e + f*x))^(7/2))/(7*f)]
    @test_int [(a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2), x, 8, -(a^(7/2)*((6*im)*A + B)*c^(5/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(8*f) + (a^3*(6*A - im*B)*c^2*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(16*f) + (a^2*(6*A - im*B)*c*tan(e + f*x)*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(24*f) + (a*((6*im)*A + B)*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(5/2))/(30*f) + (B*(a + im*a*tan(e + f*x))^(7/2)*(c - im*c*tan(e + f*x))^(5/2))/(6*f)]
    @test_int [(a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2), x, 8, -(a^(7/2)*((5*im)*A + 2*B)*c^(3/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(4*f) + (a^3*(5*A - (2*im)*B)*c*tan(e + f*x)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(8*f) + (a^2*((5*im)*A + 2*B)*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2))/(12*f) + (a*((5*im)*A + 2*B)*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(3/2))/(20*f) + (B*(a + im*a*tan(e + f*x))^(7/2)*(c - im*c*tan(e + f*x))^(3/2))/(5*f)]
    @test_int [(a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)), x, 8, (-5*a^(7/2)*((4*im)*A + 3*B)*sqrt(c)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(4*f) + (5*a^3*((4*im)*A + 3*B)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(8*f) + (5*a^2*((4*im)*A + 3*B)*(a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x)))/(24*f) + (a*((4*im)*A + 3*B)*(a + im*a*tan(e + f*x))^(5/2)*sqrt(c - im*c*tan(e + f*x)))/(12*f) + (B*(a + im*a*tan(e + f*x))^(7/2)*sqrt(c - im*c*tan(e + f*x)))/(4*f)]
    @test_int [((a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x)))/sqrt(c - im*c*tan(e + f*x)), x, 8, (5*a^(7/2)*((3*im)*A + 4*B)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(sqrt(c)*f) - ((im*A + B)*(a + im*a*tan(e + f*x))^(7/2))/(f*sqrt(c - im*c*tan(e + f*x))) - (5*a^3*((3*im)*A + 4*B)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*c*f) - (5*a^2*((3*im)*A + 4*B)*(a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x)))/(6*c*f) - (a*((3*im)*A + 4*B)*(a + im*a*tan(e + f*x))^(5/2)*sqrt(c - im*c*tan(e + f*x)))/(3*c*f)]
    @test_int [((a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(3/2), x, 8, (-5*a^(7/2)*((2*im)*A + 5*B)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(c^(3/2)*f) - ((im*A + B)*(a + im*a*tan(e + f*x))^(7/2))/(3*f*(c - im*c*tan(e + f*x))^(3/2)) + (2*a*((2*im)*A + 5*B)*(a + im*a*tan(e + f*x))^(5/2))/(3*c*f*sqrt(c - im*c*tan(e + f*x))) + (5*a^3*((2*im)*A + 5*B)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*c^2*f) + (5*a^2*((2*im)*A + 5*B)*(a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x)))/(6*c^2*f)]
    @test_int [((a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(5/2), x, 8, (2*a^(7/2)*(im*A + 6*B)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(c^(5/2)*f) - ((im*A + B)*(a + im*a*tan(e + f*x))^(7/2))/(5*f*(c - im*c*tan(e + f*x))^(5/2)) + (2*a*(im*A + 6*B)*(a + im*a*tan(e + f*x))^(5/2))/(15*c*f*(c - im*c*tan(e + f*x))^(3/2)) - (2*a^2*(im*A + 6*B)*(a + im*a*tan(e + f*x))^(3/2))/(3*c^2*f*sqrt(c - im*c*tan(e + f*x))) - (a^3*(im*A + 6*B)*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(c^3*f)]
    @test_int [((a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(7/2), x, 8, (-2*a^(7/2)*B*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(c^(7/2)*f) - ((im*A + B)*(a + im*a*tan(e + f*x))^(7/2))/(7*f*(c - im*c*tan(e + f*x))^(7/2)) + (2*a*B*(a + im*a*tan(e + f*x))^(5/2))/(5*c*f*(c - im*c*tan(e + f*x))^(5/2)) - (2*a^2*B*(a + im*a*tan(e + f*x))^(3/2))/(3*c^2*f*(c - im*c*tan(e + f*x))^(3/2)) + (2*a^3*B*sqrt(a + im*a*tan(e + f*x)))/(c^3*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [((a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(9/2), x, 3, -((im*A + B)*(a + im*a*tan(e + f*x))^(7/2))/(9*f*(c - im*c*tan(e + f*x))^(9/2)) - ((im*A - 8*B)*(a + im*a*tan(e + f*x))^(7/2))/(63*c*f*(c - im*c*tan(e + f*x))^(7/2))]
    @test_int [((a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(11/2), x, 4, -((im*A + B)*(a + im*a*tan(e + f*x))^(7/2))/(11*f*(c - im*c*tan(e + f*x))^(11/2)) - (((2*im)*A - 9*B)*(a + im*a*tan(e + f*x))^(7/2))/(99*c*f*(c - im*c*tan(e + f*x))^(9/2)) - (((2*im)*A - 9*B)*(a + im*a*tan(e + f*x))^(7/2))/(693*c^2*f*(c - im*c*tan(e + f*x))^(7/2))]
    @test_int [((a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(13/2), x, 5, -((im*A + B)*(a + im*a*tan(e + f*x))^(7/2))/(13*f*(c - im*c*tan(e + f*x))^(13/2)) - (((3*im)*A - 10*B)*(a + im*a*tan(e + f*x))^(7/2))/(143*c*f*(c - im*c*tan(e + f*x))^(11/2)) - (2*((3*im)*A - 10*B)*(a + im*a*tan(e + f*x))^(7/2))/(1287*c^2*f*(c - im*c*tan(e + f*x))^(9/2)) - (2*((3*im)*A - 10*B)*(a + im*a*tan(e + f*x))^(7/2))/(9009*c^3*f*(c - im*c*tan(e + f*x))^(7/2))]
    @test_int [((a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(15/2), x, 6, -((im*A + B)*(a + im*a*tan(e + f*x))^(7/2))/(15*f*(c - im*c*tan(e + f*x))^(15/2)) - (((4*im)*A - 11*B)*(a + im*a*tan(e + f*x))^(7/2))/(195*c*f*(c - im*c*tan(e + f*x))^(13/2)) - (((4*im)*A - 11*B)*(a + im*a*tan(e + f*x))^(7/2))/(715*c^2*f*(c - im*c*tan(e + f*x))^(11/2)) - (2*((4*im)*A - 11*B)*(a + im*a*tan(e + f*x))^(7/2))/(6435*c^3*f*(c - im*c*tan(e + f*x))^(9/2)) - (2*((4*im)*A - 11*B)*(a + im*a*tan(e + f*x))^(7/2))/(45045*c^4*f*(c - im*c*tan(e + f*x))^(7/2))]
    @test_int [((a + im*a*tan(e + f*x))^(7/2)*(A + B*tan(e + f*x)))/(c - im*c*tan(e + f*x))^(17/2), x, 7, -((im*A + B)*(a + im*a*tan(e + f*x))^(7/2))/(17*f*(c - im*c*tan(e + f*x))^(17/2)) - (((5*im)*A - 12*B)*(a + im*a*tan(e + f*x))^(7/2))/(255*c*f*(c - im*c*tan(e + f*x))^(15/2)) - (4*((5*im)*A - 12*B)*(a + im*a*tan(e + f*x))^(7/2))/(3315*c^2*f*(c - im*c*tan(e + f*x))^(13/2)) - (4*((5*im)*A - 12*B)*(a + im*a*tan(e + f*x))^(7/2))/(12155*c^3*f*(c - im*c*tan(e + f*x))^(11/2)) - (8*((5*im)*A - 12*B)*(a + im*a*tan(e + f*x))^(7/2))/(109395*c^4*f*(c - im*c*tan(e + f*x))^(9/2)) - (8*((5*im)*A - 12*B)*(a + im*a*tan(e + f*x))^(7/2))/(765765*c^5*f*(c - im*c*tan(e + f*x))^(7/2))]

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

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2))/sqrt(a + im*a*tan(e + f*x)), x, 7, (3*((2*im)*A - 3*B)*c^(5/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(sqrt(a)*f) + (3*((2*im)*A - 3*B)*c^2*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*a*f) + (((2*im)*A - 3*B)*c*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(2*a*f) + ((im*A - B)*(c - im*c*tan(e + f*x))^(5/2))/(f*sqrt(a + im*a*tan(e + f*x)))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/sqrt(a + im*a*tan(e + f*x)), x, 6, (2*(im*A - 2*B)*c^(3/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(sqrt(a)*f) + ((im*A - 2*B)*c*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(a*f) + ((im*A - B)*(c - im*c*tan(e + f*x))^(3/2))/(f*sqrt(a + im*a*tan(e + f*x)))]
    @test_int [((A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/sqrt(a + im*a*tan(e + f*x)), x, 5, (-2*B*sqrt(c)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(sqrt(a)*f) + ((im*A - B)*sqrt(c - im*c*tan(e + f*x)))/(f*sqrt(a + im*a*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/(sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x))), x, 3, -((im*A + B)/(f*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))) + (im*A*sqrt(c - im*c*tan(e + f*x)))/(c*f*sqrt(a + im*a*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/(sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2)), x, 4, (im*A - B)/(f*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2)) - (((2*im)*A - B)*sqrt(a + im*a*tan(e + f*x)))/(3*a*f*(c - im*c*tan(e + f*x))^(3/2)) - (((2*im)*A - B)*sqrt(a + im*a*tan(e + f*x)))/(3*a*c*f*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/(sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2)), x, 5, (im*A - B)/(f*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2)) - (((3*im)*A - 2*B)*sqrt(a + im*a*tan(e + f*x)))/(5*a*f*(c - im*c*tan(e + f*x))^(5/2)) - (2*((3*im)*A - 2*B)*sqrt(a + im*a*tan(e + f*x)))/(15*a*c*f*(c - im*c*tan(e + f*x))^(3/2)) - (2*((3*im)*A - 2*B)*sqrt(a + im*a*tan(e + f*x)))/(15*a*c^2*f*sqrt(c - im*c*tan(e + f*x)))]

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2))/(a + im*a*tan(e + f*x))^(3/2), x, 8, (-5*((2*im)*A - 5*B)*c^(7/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(a^(3/2)*f) - (5*((2*im)*A - 5*B)*c^3*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*a^2*f) - (5*((2*im)*A - 5*B)*c^2*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(6*a^2*f) - (2*((2*im)*A - 5*B)*c*(c - im*c*tan(e + f*x))^(5/2))/(3*a*f*sqrt(a + im*a*tan(e + f*x))) + ((im*A - B)*(c - im*c*tan(e + f*x))^(7/2))/(3*f*(a + im*a*tan(e + f*x))^(3/2))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2))/(a + im*a*tan(e + f*x))^(3/2), x, 7, (-2*(im*A - 4*B)*c^(5/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(a^(3/2)*f) - ((im*A - 4*B)*c^2*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(a^2*f) - (2*(im*A - 4*B)*c*(c - im*c*tan(e + f*x))^(3/2))/(3*a*f*sqrt(a + im*a*tan(e + f*x))) + ((im*A - B)*(c - im*c*tan(e + f*x))^(5/2))/(3*f*(a + im*a*tan(e + f*x))^(3/2))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(a + im*a*tan(e + f*x))^(3/2), x, 6, (2*B*c^(3/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(a^(3/2)*f) + (2*B*c*sqrt(c - im*c*tan(e + f*x)))/(a*f*sqrt(a + im*a*tan(e + f*x))) + ((im*A - B)*(c - im*c*tan(e + f*x))^(3/2))/(3*f*(a + im*a*tan(e + f*x))^(3/2))]
    @test_int [((A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(a + im*a*tan(e + f*x))^(3/2), x, 3, ((im*A - B)*sqrt(c - im*c*tan(e + f*x)))/(3*f*(a + im*a*tan(e + f*x))^(3/2)) + ((im*A + 2*B)*sqrt(c - im*c*tan(e + f*x)))/(3*a*f*sqrt(a + im*a*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x))), x, 4, -((im*A + B)/(f*(a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x)))) + (((2*im)*A + B)*sqrt(c - im*c*tan(e + f*x)))/(3*c*f*(a + im*a*tan(e + f*x))^(3/2)) + (((2*im)*A + B)*sqrt(c - im*c*tan(e + f*x)))/(3*a*c*f*sqrt(a + im*a*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2)), x, 4, -(im*A + B)/(3*f*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2)) + ((im/3)*A)/(c*f*(a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x))) + (2*A*tan(e + f*x))/(3*a*c*f*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(5/2)), x, 6, (im*A - B)/(3*f*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(5/2)) + (4*im*A - B)/(3*a*f*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2)) - ((4*im*A - B)*sqrt(a + im*a*tan(e + f*x)))/(5*a^2*f*(c - im*c*tan(e + f*x))^(5/2)) - (2*(4*im*A - B)*sqrt(a + im*a*tan(e + f*x)))/(15*a^2*c*f*(c - im*c*tan(e + f*x))^(3/2)) - (2*(4*im*A - B)*sqrt(a + im*a*tan(e + f*x)))/(15*a^2*c^2*f*sqrt(c - im*c*tan(e + f*x)))]

    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(9/2))/(a + im*a*tan(e + f*x))^(5/2), x, 9, (7*((2*im)*A - 7*B)*c^(9/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(a^(5/2)*f) + (7*((2*im)*A - 7*B)*c^4*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(2*a^3*f) + (7*((2*im)*A - 7*B)*c^3*sqrt(a + im*a*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(6*a^3*f) + (14*((2*im)*A - 7*B)*c^2*(c - im*c*tan(e + f*x))^(5/2))/(15*a^2*f*sqrt(a + im*a*tan(e + f*x))) - (2*((2*im)*A - 7*B)*c*(c - im*c*tan(e + f*x))^(7/2))/(15*a*f*(a + im*a*tan(e + f*x))^(3/2)) + ((im*A - B)*(c - im*c*tan(e + f*x))^(9/2))/(5*f*(a + im*a*tan(e + f*x))^(5/2))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(7/2))/(a + im*a*tan(e + f*x))^(5/2), x, 8, (2*(im*A - 6*B)*c^(7/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(a^(5/2)*f) + ((im*A - 6*B)*c^3*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(a^3*f) + (2*(im*A - 6*B)*c^2*(c - im*c*tan(e + f*x))^(3/2))/(3*a^2*f*sqrt(a + im*a*tan(e + f*x))) - (2*(im*A - 6*B)*c*(c - im*c*tan(e + f*x))^(5/2))/(15*a*f*(a + im*a*tan(e + f*x))^(3/2)) + ((im*A - B)*(c - im*c*tan(e + f*x))^(7/2))/(5*f*(a + im*a*tan(e + f*x))^(5/2))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(5/2))/(a + im*a*tan(e + f*x))^(5/2), x, 7, (-2*B*c^(5/2)*atan((sqrt(c)*sqrt(a + im*a*tan(e + f*x)))/(sqrt(a)*sqrt(c - im*c*tan(e + f*x)))))/(a^(5/2)*f) - (2*B*c^2*sqrt(c - im*c*tan(e + f*x)))/(a^2*f*sqrt(a + im*a*tan(e + f*x))) + (2*B*c*(c - im*c*tan(e + f*x))^(3/2))/(3*a*f*(a + im*a*tan(e + f*x))^(3/2)) + ((im*A - B)*(c - im*c*tan(e + f*x))^(5/2))/(5*f*(a + im*a*tan(e + f*x))^(5/2))]
    @test_int [((A + B*tan(e + f*x))*(c - im*c*tan(e + f*x))^(3/2))/(a + im*a*tan(e + f*x))^(5/2), x, 3, ((im*A - B)*(c - im*c*tan(e + f*x))^(3/2))/(5*f*(a + im*a*tan(e + f*x))^(5/2)) + ((im*A + 4*B)*(c - im*c*tan(e + f*x))^(3/2))/(15*a*f*(a + im*a*tan(e + f*x))^(3/2))]
    @test_int [((A + B*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))/(a + im*a*tan(e + f*x))^(5/2), x, 4, ((im*A - B)*sqrt(c - im*c*tan(e + f*x)))/(5*f*(a + im*a*tan(e + f*x))^(5/2)) + (((2*im)*A + 3*B)*sqrt(c - im*c*tan(e + f*x)))/(15*a*f*(a + im*a*tan(e + f*x))^(3/2)) + (((2*im)*A + 3*B)*sqrt(c - im*c*tan(e + f*x)))/(15*a^2*f*sqrt(a + im*a*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^(5/2)*sqrt(c - im*c*tan(e + f*x))), x, 5, -((im*A + B)/(f*(a + im*a*tan(e + f*x))^(5/2)*sqrt(c - im*c*tan(e + f*x)))) + (((3*im)*A + 2*B)*sqrt(c - im*c*tan(e + f*x)))/(5*c*f*(a + im*a*tan(e + f*x))^(5/2)) + (2*((3*im)*A + 2*B)*sqrt(c - im*c*tan(e + f*x)))/(15*a*c*f*(a + im*a*tan(e + f*x))^(3/2)) + (2*((3*im)*A + 2*B)*sqrt(c - im*c*tan(e + f*x)))/(15*a^2*c*f*sqrt(a + im*a*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(3/2)), x, 5, -(im*A + B)/(3*f*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(3/2)) + ((4*im)*A + B)/(15*c*f*(a + im*a*tan(e + f*x))^(5/2)*sqrt(c - im*c*tan(e + f*x))) + ((4*im)*A + B)/(15*a*c*f*(a + im*a*tan(e + f*x))^(3/2)*sqrt(c - im*c*tan(e + f*x))) + (2*(4*A - im*B)*tan(e + f*x))/(15*a^2*c*f*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x))/((a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(5/2)), x, 5, -(im*A + B)/(5*f*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(5/2)) + ((im/5)*A)/(c*f*(a + im*a*tan(e + f*x))^(5/2)*(c - im*c*tan(e + f*x))^(3/2)) + (4*A*tan(e + f*x))/(15*a*c*f*(a + im*a*tan(e + f*x))^(3/2)*(c - im*c*tan(e + f*x))^(3/2)) + (8*A*tan(e + f*x))/(15*a^2*c^2*f*sqrt(a + im*a*tan(e + f*x))*sqrt(c - im*c*tan(e + f*x)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(a+a*im*tan(e+f*x))^m*(c-c*im*tan(e+f*x))^n*(A+B*tan(e+f*x))*when*m*and*n*symbolic=#

    @test_int [(a + im*a*tan(e + f*x))^m*(c - im*c*tan(e + f*x))^n*(A + B*tan(e + f*x)), x, 4, ((im*A + B)*(a + im*a*tan(e + f*x))^m*(c - im*c*tan(e + f*x))^n)/(2*f*n) - (1/(f*m*n))*((2^(-1 + n)*(B*(m - n) + im*A*(m + n))*HypergeometricFunctions._₂F₁(m, -n, 1 + m, (1/2)*(1 + im*tan(e + f*x)))*(a + im*a*tan(e + f*x))^m*(c - im*c*tan(e + f*x))^n)/(1 - im*tan(e + f*x))^n)]

    @test_int [(a + im*a*tan(e + f*x))^(1 + m)*(c - im*c*tan(e + f*x))^(-1 - m)*(A + B*tan(e + f*x)), x, 4, -((im*A + B)*(a + im*a*tan(e + f*x))^(1 + m)*(c - im*c*tan(e + f*x))^(-1 - m))/(2*f*(1 + m)) + (2^m*a*B*HypergeometricFunctions._₂F₁(-m, -m, 1 - m, (1 - im*tan(e + f*x))/2)*(a + im*a*tan(e + f*x))^m)/(c*f*m*(1 + im*tan(e + f*x))^m*(c - im*c*tan(e + f*x))^m)]

    @test_int [(c - im*c*tan(e + f*x))^n*((-im)*(2 + n) + (-2 + n)*tan(e + f*x))/(-im + tan(e + f*x))^2, x, 2, (c - im*c*tan(e + f*x))^n/(f*(im - tan(e + f*x))^2)]

    #= ::Section:: =#
    #=Integrands*of*the*form*(a+a*im*tan(e+f*x))^m*(c+d*tan(e+f*x))^n*(A+B*tan(e+f*x))=#

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

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

    @test_int [((c + d*tan(e + f*x))*(A + B*tan(e + f*x)))/(a + im*a*tan(e + f*x))^2, x, 3, ((A - im*B)*(c - im*d)*x)/(4*a^2) + (B*(c + 3*im*d) + A*(im*c + d))/(4*a^2*f*(1 + im*tan(e + f*x))) + ((im*A - B)*(c + im*d))/(4*f*(a + im*a*tan(e + f*x))^2)]

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

    @test_int [((c + d*tan(e + f*x))*(A + B*tan(e + f*x)))/(a + im*a*tan(e + f*x))^(3/2), x, 4, -(((im*A + B)*(c - im*d)*atanh(sqrt(a + im*a*tan(e + f*x))/(sqrt(2)*sqrt(a))))/(2*sqrt(2)*a^(3/2)*f)) + ((im*A - B)*(c + im*d))/(3*f*(a + im*a*tan(e + f*x))^(3/2)) + (B*(c + 3*im*d) + A*(im*c + d))/(2*a*f*sqrt(a + im*a*tan(e + f*x)))]

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

max_stars_repo_path: test/4 Trig functions/4.3 Tangent/4.3.3.1 (a+b tan)^m (c+d tan)^n (A+B tan).jl