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

    #= ::Package:: =#

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    #= ::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)+C*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*(A+B*tan(e+f*x)+C*tan(e+f*x)^2)=#

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

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

    @test_int [(a + b*tan(e + f*x))^3*(c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 7, -((a^3*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - 3*a*b^2*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) + 3*a^2*b*(2*c*(A - C)*d + B*(c^2 - d^2)) - b^3*(2*c*(A - C)*d + B*(c^2 - d^2)))*x) + ((3*a^2*b*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - b^3*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - a^3*(2*c*(A - C)*d + B*(c^2 - d^2)) + 3*a*b^2*(2*c*(A - C)*d + B*(c^2 - d^2)))*log(cos(e + f*x)))/f + (d*(3*a^2*b*(A*c - c*C - B*d) - b^3*(A*c - c*C - B*d) + a^3*(B*c + (A - C)*d) - 3*a*b^2*(B*c + (A - C)*d))*tan(e + f*x))/f + ((a^3*B - 3*a*b^2*B + 3*a^2*b*(A - C) - b^3*(A - C))*(c + d*tan(e + f*x))^2)/(2*f) + ((4*a^3*C*d^3 - 3*a^2*b*d^2*(3*c*C - 16*B*d) + 3*a*b^2*d*(2*c^2*C - 5*B*c*d + 20*(A - C)*d^2) - b^3*(c^3*C - 2*B*c^2*d + 5*c*(A - C)*d^2 + 20*B*d^3))*(c + d*tan(e + f*x))^3)/(60*d^4*f) + (b*(5*b*(A*b + a*B - b*C)*d^2 + (b*c - a*d)*(b*c*C - 2*b*B*d - a*C*d))*tan(e + f*x)*(c + d*tan(e + f*x))^3)/(20*d^3*f) - ((b*c*C - 2*b*B*d - a*C*d)*(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^3)/(10*d^2*f) + (C*(a + b*tan(e + f*x))^3*(c + d*tan(e + f*x))^3)/(6*d*f)]
    @test_int [(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 6, -((a^2*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - b^2*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) + 2*a*b*(2*c*(A - C)*d + B*(c^2 - d^2)))*x) + ((2*a*b*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - a^2*(2*c*(A - C)*d + B*(c^2 - d^2)) + b^2*(2*c*(A - C)*d + B*(c^2 - d^2)))*log(cos(e + f*x)))/f + (d*(2*a*b*(A*c - c*C - B*d) + a^2*(B*c + (A - C)*d) - b^2*(B*c + (A - C)*d))*tan(e + f*x))/f + ((a^2*B - b^2*B + 2*a*b*(A - C))*(c + d*tan(e + f*x))^2)/(2*f) + ((8*a^2*C*d^2 - 10*a*b*d*(c*C - 4*B*d) + b^2*(2*c^2*C - 5*B*c*d + 20*(A - C)*d^2))*(c + d*tan(e + f*x))^3)/(60*d^3*f) - (b*(2*b*c*C - 5*b*B*d - 2*a*C*d)*tan(e + f*x)*(c + d*tan(e + f*x))^3)/(20*d^2*f) + (C*(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^3)/(5*d*f)]
    @test_int [(a + b*tan(e + f*x))^1*(c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 5, -((a*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) + b*(2*c*(A - C)*d + B*(c^2 - d^2)))*x) - ((a*(B*c^2 - 2*c*C*d - B*d^2) - b*(c^2*C + 2*B*c*d - C*d^2) + A*(2*a*c*d + b*(c^2 - d^2)))*log(cos(e + f*x)))/f + (d*(A*b*c + a*B*c - b*c*C + a*A*d - b*B*d - a*C*d)*tan(e + f*x))/f + ((A*b + a*B - b*C)*(c + d*tan(e + f*x))^2)/(2*f) - ((b*c*C - 4*b*B*d - 4*a*C*d)*(c + d*tan(e + f*x))^3)/(12*d^2*f) + (b*C*tan(e + f*x)*(c + d*tan(e + f*x))^3)/(4*d*f)]
    @test_int [(a + b*tan(e + f*x))^0*(c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 4, -((c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2))*x) - ((2*c*(A - C)*d + B*(c^2 - d^2))*log(cos(e + f*x)))/f + (d*(B*c + (A - C)*d)*tan(e + f*x))/f + (B*(c + d*tan(e + f*x))^2)/(2*f) + (C*(c + d*tan(e + f*x))^3)/(3*d*f)]
    @test_int [((c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^1, x, 6, -(((a*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - b*(2*c*(A - C)*d + B*(c^2 - d^2)))*x)/(a^2 + b^2)) - ((a*(B*c^2 - 2*c*C*d - B*d^2) + b*(c^2*C + 2*B*c*d - C*d^2) + A*(2*a*c*d - b*(c^2 - d^2)))*log(cos(e + f*x)))/((a^2 + b^2)*f) + ((A*b^2 - a*(b*B - a*C))*(b*c - a*d)^2*log(a + b*tan(e + f*x)))/(b^3*(a^2 + b^2)*f) + (d*(b*c*C + b*B*d - a*C*d)*tan(e + f*x))/(b^2*f) + (C*(c + d*tan(e + f*x))^2)/(2*b*f)]
    @test_int [((c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^2, x, 6, -(((a^2*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - b^2*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - 2*a*b*(2*c*(A - C)*d + B*(c^2 - d^2)))*x)/(a^2 + b^2)^2) - ((2*a*b*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) + a^2*(2*c*(A - C)*d + B*(c^2 - d^2)) - b^2*(2*c*(A - C)*d + B*(c^2 - d^2)))*log(cos(e + f*x)))/((a^2 + b^2)^2*f) - ((b*c - a*d)*(a^3*b*B*d - 2*a^4*C*d - b^4*(B*c + 2*A*d) - a*b^3*(2*A*c - 2*c*C - 3*B*d) + a^2*b^2*(B*c - 4*C*d))*log(a + b*tan(e + f*x)))/(b^3*(a^2 + b^2)^2*f) + ((A*b^2 - a*b*B + 2*a^2*C + b^2*C)*d^2*tan(e + f*x))/(b^2*(a^2 + b^2)*f) - ((A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^2)/(b*(a^2 + b^2)*f*(a + b*tan(e + f*x)))]
    @test_int [((c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^3, x, 6, -(((a^3*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - 3*a*b^2*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - 3*a^2*b*(2*c*(A - C)*d + B*(c^2 - d^2)) + b^3*(2*c*(A - C)*d + B*(c^2 - d^2)))*x)/(a^2 + b^2)^3) - ((3*a^2*b*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - b^3*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) + a^3*(2*c*(A - C)*d + B*(c^2 - d^2)) - 3*a*b^2*(2*c*(A - C)*d + B*(c^2 - d^2)))*log(cos(e + f*x)))/((a^2 + b^2)^3*f) + ((a^6*C*d^2 + 3*a^4*b^2*C*d^2 - 3*a^2*b^4*(c^2*C + 2*B*c*d - 2*C*d^2 - A*(c^2 - d^2)) + b^6*(c*(c*C + 2*B*d) - A*(c^2 - d^2)) - a^3*b^3*(2*c*(A - C)*d + B*(c^2 - d^2)) + 3*a*b^5*(2*c*(A - C)*d + B*(c^2 - d^2)))*log(a + b*tan(e + f*x)))/(b^3*(a^2 + b^2)^3*f) - ((b*c - a*d)*(a^4*C*d + b^4*(B*c + A*d) + 2*a*b^3*(A*c - c*C - B*d) - a^2*b^2*(B*c + (A - 3*C)*d)))/(b^3*(a^2 + b^2)^2*f*(a + b*tan(e + f*x))) - ((A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^2)/(2*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^2)]

    @test_int [(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^3*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 7, (a^2*(A*c^3 - c^3*C - 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 + B*d^3) + b^2*(c^3*C + 3*B*c^2*d - 3*c*C*d^2 - B*d^3 - A*(c^3 - 3*c*d^2)) - 2*a*b*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)))*x + ((2*a*b*(c^3*C + 3*B*c^2*d - 3*c*C*d^2 - B*d^3 - A*(c^3 - 3*c*d^2)) - a^2*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)) + b^2*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)))*log(cos(e + f*x)))/f - (d*(2*a*b*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - a^2*(2*c*(A - C)*d + B*(c^2 - d^2)) + b^2*(2*c*(A - C)*d + B*(c^2 - d^2)))*tan(e + f*x))/f + ((2*a*b*(A*c - c*C - B*d) + a^2*(B*c + (A - C)*d) - b^2*(B*c + (A - C)*d))*(c + d*tan(e + f*x))^2)/(2*f) + ((a^2*B - b^2*B + 2*a*b*(A - C))*(c + d*tan(e + f*x))^3)/(3*f) + ((5*a^2*C*d^2 - 6*a*b*d*(c*C - 5*B*d) + b^2*(c^2*C - 3*B*c*d + 15*(A - C)*d^2))*(c + d*tan(e + f*x))^4)/(60*d^3*f) - (b*(b*c*C - 3*b*B*d - a*C*d)*tan(e + f*x)*(c + d*tan(e + f*x))^4)/(15*d^2*f) + (C*(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^4)/(6*d*f)]
    @test_int [(a + b*tan(e + f*x))^1*(c + d*tan(e + f*x))^3*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 6, (a*(A*c^3 - c^3*C - 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 + B*d^3) - b*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)))*x - ((A*(b*c^3 + 3*a*c^2*d - 3*b*c*d^2 - a*d^3) - b*(c^3*C + 3*B*c^2*d - 3*c*C*d^2 - B*d^3) + a*(B*c^3 - 3*c^2*C*d - 3*B*c*d^2 + C*d^3))*log(cos(e + f*x)))/f + (d*(a*(B*c^2 - 2*c*C*d - B*d^2) - b*(c^2*C + 2*B*c*d - C*d^2) + A*(2*a*c*d + b*(c^2 - d^2)))*tan(e + f*x))/f + ((A*b*c + a*B*c - b*c*C + a*A*d - b*B*d - a*C*d)*(c + d*tan(e + f*x))^2)/(2*f) + ((A*b + a*B - b*C)*(c + d*tan(e + f*x))^3)/(3*f) - ((b*c*C - 5*b*B*d - 5*a*C*d)*(c + d*tan(e + f*x))^4)/(20*d^2*f) + (b*C*tan(e + f*x)*(c + d*tan(e + f*x))^4)/(5*d*f)]
    @test_int [(a + b*tan(e + f*x))^0*(c + d*tan(e + f*x))^3*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 5, -((c^3*C + 3*B*c^2*d - 3*c*C*d^2 - B*d^3 - A*(c^3 - 3*c*d^2))*x) - (((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2))*log(cos(e + f*x)))/f + (d*(2*c*(A - C)*d + B*(c^2 - d^2))*tan(e + f*x))/f + ((B*c + (A - C)*d)*(c + d*tan(e + f*x))^2)/(2*f) + (B*(c + d*tan(e + f*x))^3)/(3*f) + (C*(c + d*tan(e + f*x))^4)/(4*d*f)]
    @test_int [((c + d*tan(e + f*x))^3*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^1, x, 7, -(((a*(c^3*C + 3*B*c^2*d - 3*c*C*d^2 - B*d^3 - A*(c^3 - 3*c*d^2)) - b*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)))*x)/(a^2 + b^2)) - ((b*(c^3*C + 3*B*c^2*d - 3*c*C*d^2 - B*d^3) + a*(B*c^3 - 3*c^2*C*d - 3*B*c*d^2 + C*d^3) + A*(a*d*(3*c^2 - d^2) - b*(c^3 - 3*c*d^2)))*log(cos(e + f*x)))/((a^2 + b^2)*f) + ((A*b^2 - a*(b*B - a*C))*(b*c - a*d)^3*log(a + b*tan(e + f*x)))/(b^4*(a^2 + b^2)*f) + (d*(b^2*d*(B*c + (A - C)*d) + (b*c - a*d)*(b*c*C + b*B*d - a*C*d))*tan(e + f*x))/(b^3*f) + ((b*c*C + b*B*d - a*C*d)*(c + d*tan(e + f*x))^2)/(2*b^2*f) + (C*(c + d*tan(e + f*x))^3)/(3*b*f)]
    @test_int [((c + d*tan(e + f*x))^3*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^2, x, 7, -(((b^2*(A*c^3 - c^3*C - 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 + B*d^3) + a^2*(c^3*C + 3*B*c^2*d - 3*c*C*d^2 - B*d^3 - A*(c^3 - 3*c*d^2)) - 2*a*b*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)))*x)/(a^2 + b^2)^2) + ((2*a*b*(A*c^3 - c^3*C - 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 + B*d^3) - a^2*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)) + b^2*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)))*log(cos(e + f*x)))/((a^2 + b^2)^2*f) - ((b*c - a*d)^2*(2*a^3*b*B*d - 3*a^4*C*d - b^4*(B*c + 3*A*d) - 2*a*b^3*(A*c - c*C - 2*B*d) + a^2*b^2*(B*c - (A + 5*C)*d))*log(a + b*tan(e + f*x)))/(b^4*(a^2 + b^2)^2*f) - (d^2*(3*a^3*C*d - A*b^2*(b*c - a*d) - b^3*(2*c*C + B*d) - a^2*b*(3*c*C + 2*B*d) + a*b^2*(B*c + 2*C*d))*tan(e + f*x))/(b^3*(a^2 + b^2)*f) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C + b^2*C)*d*(c + d*tan(e + f*x))^2)/(2*b^2*(a^2 + b^2)*f) - ((A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^3)/(b*(a^2 + b^2)*f*(a + b*tan(e + f*x)))]
    @test_int [((c + d*tan(e + f*x))^3*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^3, x, 7, -(((3*a*b^2*(A*c^3 - c^3*C - 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 + B*d^3) + a^3*(c^3*C + 3*B*c^2*d - 3*c*C*d^2 - B*d^3 - A*(c^3 - 3*c*d^2)) - 3*a^2*b*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)) + b^3*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)))*x)/(a^2 + b^2)^3) - ((b^3*(A*c^3 - c^3*C - 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 + B*d^3) + 3*a^2*b*(c^3*C + 3*B*c^2*d - 3*c*C*d^2 - B*d^3 - A*(c^3 - 3*c*d^2)) + a^3*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)) - 3*a*b^2*((A - C)*d*(3*c^2 - d^2) + B*(c^3 - 3*c*d^2)))*log(cos(e + f*x)))/((a^2 + b^2)^3*f) - ((b*c - a*d)*(a^5*b*B*d^2 - 3*a^6*C*d^2 + a^4*b^2*d*(B*c - 9*C*d) + a^3*b^3*B*(c^2 + 3*d^2) - b^6*(c*(c*C + 3*B*d) - A*(c^2 - 3*d^2)) - a*b^5*(8*c*(A - C)*d + 3*B*(c^2 - 2*d^2)) + a^2*b^4*(3*c^2*C + 6*B*c*d - 10*C*d^2 - A*(3*c^2 - d^2)))*log(a + b*tan(e + f*x)))/(b^4*(a^2 + b^2)^3*f) - (d^2*(a^3*b*B*d - 3*a^4*C*d - a*b^3*(2*A*c - 2*c*C - 3*B*d) + a^2*b^2*(B*c - 6*C*d) - b^4*(B*c + (2*A + C)*d))*tan(e + f*x))/(b^3*(a^2 + b^2)^2*f) + ((a^3*b*B*d - 3*a^4*C*d - b^4*(2*B*c + 3*A*d) - a*b^3*(4*A*c - 4*c*C - 5*B*d) + a^2*b^2*(2*B*c + (A - 7*C)*d))*(c + d*tan(e + f*x))^2)/(2*b^2*(a^2 + b^2)^2*f*(a + b*tan(e + f*x))) - ((A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^3)/(2*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^2)]

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

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

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

    @test_int [((a + b*tan(e + f*x))^3*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x))^3, x, 7, -(((3*a*b^2*(A*c^3 - c^3*C + 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 - B*d^3) + a^3*(c^3*C - 3*B*c^2*d - 3*c*C*d^2 + B*d^3 - A*(c^3 - 3*c*d^2)) - 3*a^2*b*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)) + b^3*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)))*x)/(c^2 + d^2)^3) - ((3*a^2*b*(A*c^3 - c^3*C + 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 - B*d^3) - b^3*(A*c^3 - c^3*C + 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 - B*d^3) - a^3*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)) + 3*a*b^2*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)))*log(cos(e + f*x)))/((c^2 + d^2)^3*f) - ((b*c - a*d)*(b^2*(3*c^6*C - B*c^5*d + 9*c^4*C*d^2 - 3*B*c^3*d^3 - c^2*(A - 10*C)*d^4 - 6*B*c*d^5 + 3*A*d^6) + a^2*d^3*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)) + a*b*d^2*(8*c*(A - C)*d^3 - B*(c^4 + 6*c^2*d^2 - 3*d^4)))*log(c + d*tan(e + f*x)))/(d^4*(c^2 + d^2)^3*f) + (b^2*(b*(3*c^4*C - B*c^3*d + 6*c^2*C*d^2 - 3*B*c*d^3 + (2*A + C)*d^4) + a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*tan(e + f*x))/(d^3*(c^2 + d^2)^2*f) - ((c^2*C - B*c*d + A*d^2)*(a + b*tan(e + f*x))^3)/(2*d*(c^2 + d^2)*f*(c + d*tan(e + f*x))^2) - ((b*(3*c^4*C - B*c^3*d - c^2*(A - 7*C)*d^2 - 5*B*c*d^3 + 3*A*d^4) + 2*a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*(a + b*tan(e + f*x))^2)/(2*d^2*(c^2 + d^2)^2*f*(c + d*tan(e + f*x)))]
    @test_int [((a + b*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x))^3, x, 6, -(((b^2*(A*c^3 - c^3*C + 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 - B*d^3) + a^2*(c^3*C - 3*B*c^2*d - 3*c*C*d^2 + B*d^3 - A*(c^3 - 3*c*d^2)) - 2*a*b*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)))*x)/(c^2 + d^2)^3) - ((2*a*b*(A*c^3 - c^3*C + 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 - B*d^3) - a^2*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)) + b^2*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)))*log(cos(e + f*x)))/((c^2 + d^2)^3*f) - ((2*a*b*d^3*(A*c^3 - c^3*C + 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 - B*d^3) - b^2*(c^6*C + 3*c^4*C*d^2 + B*c^3*d^3 - 3*c^2*(A - 2*C)*d^4 - 3*B*c*d^5 + A*d^6) - a^2*d^3*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)))*log(c + d*tan(e + f*x)))/(d^3*(c^2 + d^2)^3*f) - ((c^2*C - B*c*d + A*d^2)*(a + b*tan(e + f*x))^2)/(2*d*(c^2 + d^2)*f*(c + d*tan(e + f*x))^2) + ((b*c - a*d)*(b*(c^4*C - c^2*(A - 3*C)*d^2 - 2*B*c*d^3 + A*d^4) + a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2))))/(d^3*(c^2 + d^2)^2*f*(c + d*tan(e + f*x)))]
    @test_int [((a + b*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x))^3, x, 4, -(((a*(c^3*C - 3*B*c^2*d - 3*c*C*d^2 + B*d^3 - A*(c^3 - 3*c*d^2)) - b*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)))*x)/(c^2 + d^2)^3) + ((b*(c^3*C - 3*B*c^2*d - 3*c*C*d^2 + B*d^3) - a*(B*c^3 + 3*c^2*C*d - 3*B*c*d^2 - C*d^3) + A*(a*d*(3*c^2 - d^2) - b*(c^3 - 3*c*d^2)))*log(c*cos(e + f*x) + d*sin(e + f*x)))/((c^2 + d^2)^3*f) + ((b*c - a*d)*(c^2*C - B*c*d + A*d^2))/(2*d^2*(c^2 + d^2)*f*(c + d*tan(e + f*x))^2) - (b*(c^4*C - c^2*(A - 3*C)*d^2 - 2*B*c*d^3 + A*d^4) + a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))/(d^2*(c^2 + d^2)^2*f*(c + d*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x) + C*tan(e + f*x)^2)/(c + d*tan(e + f*x))^3, x, 4, -(((c^3*C - 3*B*c^2*d - 3*c*C*d^2 + B*d^3 - A*(c^3 - 3*c*d^2))*x)/(c^2 + d^2)^3) + (((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2))*log(c*cos(e + f*x) + d*sin(e + f*x)))/((c^2 + d^2)^3*f) - (c^2*C - B*c*d + A*d^2)/(2*d*(c^2 + d^2)*f*(c + d*tan(e + f*x))^2) - (2*c*(A - C)*d - B*(c^2 - d^2))/((c^2 + d^2)^2*f*(c + d*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x) + C*tan(e + f*x)^2)/((a + b*tan(e + f*x))*(c + d*tan(e + f*x))^3), x, 5, -(((a*(c^3*C - 3*B*c^2*d - 3*c*C*d^2 + B*d^3 - A*(c^3 - 3*c*d^2)) + b*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)))*x)/((a^2 + b^2)*(c^2 + d^2)^3)) + (b^2*(A*b^2 - a*(b*B - a*C))*log(a*cos(e + f*x) + b*sin(e + f*x)))/((a^2 + b^2)*(b*c - a*d)^3*f) - ((b^2*(c^6*C - 3*B*c^5*d + 3*c^4*(2*A - C)*d^2 + B*c^3*d^3 + 3*A*c^2*d^4 + A*d^6) + a^2*d^3*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)) - a*b*d^2*(8*c^3*(A - C)*d - B*(3*c^4 - 6*c^2*d^2 - d^4)))*log(c*cos(e + f*x) + d*sin(e + f*x)))/((b*c - a*d)^3*(c^2 + d^2)^3*f) + (c^2*C - B*c*d + A*d^2)/(2*(b*c - a*d)*(c^2 + d^2)*f*(c + d*tan(e + f*x))^2) + (b*(c^4*C - 2*B*c^3*d + c^2*(3*A - C)*d^2 + A*d^4) - a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))/((b*c - a*d)^2*(c^2 + d^2)^2*f*(c + d*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x) + C*tan(e + f*x)^2)/((a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^3), x, 6, -(((b^2*(A*c^3 - c^3*C + 3*B*c^2*d - 3*A*c*d^2 + 3*c*C*d^2 - B*d^3) + a^2*(c^3*C - 3*B*c^2*d - 3*c*C*d^2 + B*d^3 - A*(c^3 - 3*c*d^2)) + 2*a*b*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)))*x)/((a^2 + b^2)^2*(c^2 + d^2)^3)) + (b^2*(4*a^3*b*B*d - 3*a^4*C*d + b^4*(B*c - 3*A*d) + 2*a*b^3*(A*c - c*C + B*d) - a^2*b^2*(B*c + (5*A + C)*d))*log(a*cos(e + f*x) + b*sin(e + f*x)))/((a^2 + b^2)^2*(b*c - a*d)^4*f) + (1/((b*c - a*d)^4*(c^2 + d^2)^3*f))*(d*(b^2*(3*c^6*C - 6*B*c^5*d + c^4*(10*A - C)*d^2 - 3*B*c^3*d^3 + 9*A*c^2*d^4 - B*c*d^5 + 3*A*d^6) + a^2*d^3*((A - C)*d*(3*c^2 - d^2) - B*(c^3 - 3*c*d^2)) - 2*a*b*d^2*(c*(A - C)*d*(5*c^2 + d^2) - B*(2*c^4 - 3*c^2*d^2 - d^4)))*log(c*cos(e + f*x) + d*sin(e + f*x))) - (d*(b^2*c*(c*C - B*d) - 2*a*b*B*(c^2 + d^2) + a^2*(3*c^2*C - B*c*d + 2*C*d^2) + A*(a^2*d^2 + b^2*(2*c^2 + 3*d^2))))/(2*(a^2 + b^2)*(b*c - a*d)^2*(c^2 + d^2)*f*(c + d*tan(e + f*x))^2) - (A*b^2 - a*(b*B - a*C))/((a^2 + b^2)*(b*c - a*d)*f*(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^2) - (d*(b^3*c*(2*c^3*C - 3*B*c^2*d - B*d^3) + a^2*b*(3*c^4*C - 3*B*c^3*d + 2*c^2*C*d^2 - B*c*d^3 + C*d^4) + a^3*d^2*(2*c*C*d + B*(c^2 - d^2)) + a*b^2*(2*c*C*d^3 - B*(c^4 + c^2*d^2 + 2*d^4)) - A*(2*a^3*c*d^3 + 2*a*b^2*c*d^3 - 2*a^2*b*d^2*(2*c^2 + d^2) - b^3*(c^4 + 6*c^2*d^2 + 3*d^4))))/((a^2 + b^2)*(b*c - a*d)^3*(c^2 + d^2)^2*f*(c + d*tan(e + f*x)))]

    #= ::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)+C*tan(e+f*x)^2)=#

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

    @test_int [(a + b*tan(e + f*x))^3*sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 12, -(((a - im*b)^3*(im*A + B - im*C)*sqrt(c - im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) + ((a + im*b)^3*(im*A - B - im*C)*sqrt(c + im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*(a^3*B - 3*a*b^2*B + 3*a^2*b*(A - C) - b^3*(A - C))*sqrt(c + d*tan(e + f*x)))/f + (1/(315*d^4*f))*(2*(40*a^3*C*d^3 - 6*a^2*b*d^2*(16*c*C - 45*B*d) + 9*a*b^2*d*(8*c^2*C - 14*B*c*d + 35*(A - C)*d^2) - b^3*(16*c^3*C - 24*B*c^2*d + 42*c*(A - C)*d^2 + 105*B*d^3))*(c + d*tan(e + f*x))^(3/2)) + (2*b*(21*b*(A*b + a*B - b*C)*d^2 + 4*(b*c - a*d)*(2*b*c*C - 3*b*B*d - 2*a*C*d))*tan(e + f*x)*(c + d*tan(e + f*x))^(3/2))/(105*d^3*f) - (2*(2*b*c*C - 3*b*B*d - 2*a*C*d)*(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^(3/2))/(21*d^2*f) + (2*C*(a + b*tan(e + f*x))^3*(c + d*tan(e + f*x))^(3/2))/(9*d*f)]
    @test_int [(a + b*tan(e + f*x))^2*sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 11, -(((a - im*b)^2*(B + im*(A - C))*sqrt(c - im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) - ((a + im*b)^2*(B - im*(A - C))*sqrt(c + im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*(a^2*B - b^2*B + 2*a*b*(A - C))*sqrt(c + d*tan(e + f*x)))/f + (2*(20*a^2*C*d^2 - 14*a*b*d*(2*c*C - 5*B*d) + b^2*(8*c^2*C - 14*B*c*d + 35*(A - C)*d^2))*(c + d*tan(e + f*x))^(3/2))/(105*d^3*f) - (2*b*(4*b*c*C - 7*b*B*d - 4*a*C*d)*tan(e + f*x)*(c + d*tan(e + f*x))^(3/2))/(35*d^2*f) + (2*C*(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^(3/2))/(7*d*f)]
    @test_int [(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 10, -(((im*a + b)*(A - im*B - C)*sqrt(c - im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) + ((im*a - b)*(A + im*B - C)*sqrt(c + im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*(A*b + a*B - b*C)*sqrt(c + d*tan(e + f*x)))/f - (2*(2*b*c*C - 5*b*B*d - 5*a*C*d)*(c + d*tan(e + f*x))^(3/2))/(15*d^2*f) + (2*b*C*tan(e + f*x)*(c + d*tan(e + f*x))^(3/2))/(5*d*f)]
    @test_int [sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 9, -(((im*A + B - im*C)*sqrt(c - im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) - ((B - im*(A - C))*sqrt(c + im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*B*sqrt(c + d*tan(e + f*x)))/f + (2*C*(c + d*tan(e + f*x))^(3/2))/(3*d*f)]
    @test_int [(sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x)), x, 12, -(((im*A + B - im*C)*sqrt(c - im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((a - im*b)*f)) + ((im*A - B - im*C)*sqrt(c + im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((a + im*b)*f) - (2*(A*b^2 - a*(b*B - a*C))*sqrt(b*c - a*d)*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(b^(3/2)*(a^2 + b^2)*f) + (2*C*sqrt(c + d*tan(e + f*x)))/(b*f)]
    @test_int [(sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^2, x, 12, -(((im*A + B - im*C)*sqrt(c - im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((a - im*b)^2*f)) - ((B - im*(A - C))*sqrt(c + im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((a + im*b)^2*f) - ((a^3*b*B*d + a^4*C*d + b^4*(2*B*c + A*d) + a*b^3*(4*A*c - 4*c*C - 3*B*d) - a^2*b^2*(2*B*c + 3*A*d - 5*C*d))*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(b^(3/2)*(a^2 + b^2)^2*sqrt(b*c - a*d)*f) - ((A*b^2 - a*(b*B - a*C))*sqrt(c + d*tan(e + f*x)))/(b*(a^2 + b^2)*f*(a + b*tan(e + f*x)))]
    @test_int [(sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^3, x, 13, -(((A - im*B - C)*sqrt(c - im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((im*a + b)^3*f)) + ((A + im*B - C)*sqrt(c + im*d)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((im*a - b)^3*f) + ((3*a^5*b*B*d^2 + a^6*C*d^2 - 3*a^4*b^2*d*(4*B*c + 5*A*d - 6*C*d) - 3*a^2*b^4*(8*A*c^2 - 8*c^2*C - 16*B*c*d - 6*A*d^2 + 5*C*d^2) + 2*a^3*b^3*(20*c*(A - C)*d + B*(4*c^2 - 13*d^2)) - 3*a*b^5*(8*c*(A - C)*d + B*(8*c^2 - d^2)) - b^6*(4*c*(2*c*C + B*d) - A*(8*c^2 + d^2)))*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(4*b^(3/2)*(a^2 + b^2)^3*(b*c - a*d)^(3/2)*f) - ((A*b^2 - a*(b*B - a*C))*sqrt(c + d*tan(e + f*x)))/(2*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^2) - ((3*a^3*b*B*d + a^4*C*d + b^4*(4*B*c + A*d) + a*b^3*(8*A*c - 8*c*C - 5*B*d) - a^2*b^2*(4*B*c + 7*A*d - 9*C*d))*sqrt(c + d*tan(e + f*x)))/(4*b*(a^2 + b^2)^2*(b*c - a*d)*f*(a + b*tan(e + f*x)))]

    @test_int [(a + b*tan(e + f*x))^3*(c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 13, ((im*a + b)^3*(A - im*B - C)*(c - im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f + ((a + im*b)^3*(im*A - B - im*C)*(c + im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*(3*a^2*b*(A*c - c*C - B*d) - b^3*(A*c - c*C - B*d) + a^3*(B*c + (A - C)*d) - 3*a*b^2*(B*c + (A - C)*d))*sqrt(c + d*tan(e + f*x)))/f + (2*(a^3*B - 3*a*b^2*B + 3*a^2*b*(A - C) - b^3*(A - C))*(c + d*tan(e + f*x))^(3/2))/(3*f) + (2*(168*a^3*C*d^3 - 2*a^2*b*d^2*(192*c*C - 847*B*d) + 33*a*b^2*d*(8*c^2*C - 18*B*c*d + 63*(A - C)*d^2) - b^3*(48*c^3*C - 88*B*c^2*d + 198*c*(A - C)*d^2 + 693*B*d^3))*(c + d*tan(e + f*x))^(5/2))/(3465*d^4*f) + (2*b*(99*b*(A*b + a*B - b*C)*d^2 + 4*(b*c - a*d)*(6*b*c*C - 11*b*B*d - 6*a*C*d))*tan(e + f*x)*(c + d*tan(e + f*x))^(5/2))/(693*d^3*f) - (2*(6*b*c*C - 11*b*B*d - 6*a*C*d)*(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^(5/2))/(99*d^2*f) + (2*C*(a + b*tan(e + f*x))^3*(c + d*tan(e + f*x))^(5/2))/(11*d*f)]
    @test_int [(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 12, -(((a - im*b)^2*(B + im*(A - C))*(c - im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) + ((a + im*b)^2*(im*A - B - im*C)*(c + im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*(2*a*b*(A*c - c*C - B*d) + a^2*(B*c + (A - C)*d) - b^2*(B*c + (A - C)*d))*sqrt(c + d*tan(e + f*x)))/f + (2*(a^2*B - b^2*B + 2*a*b*(A - C))*(c + d*tan(e + f*x))^(3/2))/(3*f) + (2*(28*a^2*C*d^2 - 18*a*b*d*(2*c*C - 7*B*d) + b^2*(8*c^2*C - 18*B*c*d + 63*(A - C)*d^2))*(c + d*tan(e + f*x))^(5/2))/(315*d^3*f) - (2*b*(4*b*c*C - 9*b*B*d - 4*a*C*d)*tan(e + f*x)*(c + d*tan(e + f*x))^(5/2))/(63*d^2*f) + (2*C*(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^(5/2))/(9*d*f)]
    @test_int [(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 11, -(((im*a + b)*(A - im*B - C)*(c - im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) + ((im*a - b)*(A + im*B - C)*(c + im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*(A*b*c + a*B*c - b*c*C + a*A*d - b*B*d - a*C*d)*sqrt(c + d*tan(e + f*x)))/f + (2*(A*b + a*B - b*C)*(c + d*tan(e + f*x))^(3/2))/(3*f) - (2*(2*b*c*C - 7*b*B*d - 7*a*C*d)*(c + d*tan(e + f*x))^(5/2))/(35*d^2*f) + (2*b*C*tan(e + f*x)*(c + d*tan(e + f*x))^(5/2))/(7*d*f)]
    @test_int [(c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 10, -(((im*A + B - im*C)*(c - im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) - ((B - im*(A - C))*(c + im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*(B*c + (A - C)*d)*sqrt(c + d*tan(e + f*x)))/f + (2*B*(c + d*tan(e + f*x))^(3/2))/(3*f) + (2*C*(c + d*tan(e + f*x))^(5/2))/(5*d*f)]
    @test_int [((c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x)), x, 13, -(((im*A + B - im*C)*(c - im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((a - im*b)*f)) - ((A + im*B - C)*(c + im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((im*a - b)*f) - (2*(A*b^2 - a*(b*B - a*C))*(b*c - a*d)^(3/2)*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(b^(5/2)*(a^2 + b^2)*f) + (2*(b*c*C + b*B*d - a*C*d)*sqrt(c + d*tan(e + f*x)))/(b^2*f) + (2*C*(c + d*tan(e + f*x))^(3/2))/(3*b*f)]
    @test_int [((c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^2, x, 13, -(((im*A + B - im*C)*(c - im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((a - im*b)^2*f)) - ((B - im*(A - C))*(c + im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((a + im*b)^2*f) + (sqrt(b*c - a*d)*(a^3*b*B*d - 3*a^4*C*d - b^4*(2*B*c + 3*A*d) - a*b^3*(4*A*c - 4*c*C - 5*B*d) + a^2*b^2*(2*B*c + (A - 7*C)*d))*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(b^(5/2)*(a^2 + b^2)^2*f) + ((A*b^2 - a*b*B + 3*a^2*C + 2*b^2*C)*d*sqrt(c + d*tan(e + f*x)))/(b^2*(a^2 + b^2)*f) - ((A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(3/2))/(b*(a^2 + b^2)*f*(a + b*tan(e + f*x)))]
    @test_int [((c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^3, x, 13, -(((A - im*B - C)*(c - im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((im*a + b)^3*f)) + ((A + im*B - C)*(c + im*d)^(3/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((im*a - b)^3*f) - ((a^5*b*B*d^2 + 3*a^6*C*d^2 + a^4*b^2*d*(4*B*c + 3*(A + 2*C)*d) - b^6*(8*A*c^2 - 8*c^2*C - 12*B*c*d - 3*A*d^2) + a^2*b^4*(24*A*c^2 - 24*c^2*C - 48*B*c*d - 26*A*d^2 + 35*C*d^2) - 2*a^3*b^3*(12*c*(A - C)*d + B*(4*c^2 - 9*d^2)) + a*b^5*(40*c*(A - C)*d + 3*B*(8*c^2 - 5*d^2)))*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(4*b^(5/2)*(a^2 + b^2)^3*sqrt(b*c - a*d)*f) - ((a^3*b*B*d + 3*a^4*C*d + b^4*(4*B*c + 3*A*d) + a*b^3*(8*A*c - 8*c*C - 7*B*d) - a^2*b^2*(4*B*c + 5*A*d - 11*C*d))*sqrt(c + d*tan(e + f*x)))/(4*b^2*(a^2 + b^2)^2*f*(a + b*tan(e + f*x))) - ((A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(3/2))/(2*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^2)]

    @test_int [(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 13, -(((a - im*b)^2*(im*A + B - im*C)*(c - im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) + ((a + im*b)^2*(im*A - B - im*C)*(c + im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f - (2*(2*a*b*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - a^2*(2*c*(A - C)*d + B*(c^2 - d^2)) + b^2*(2*c*(A - C)*d + B*(c^2 - d^2)))*sqrt(c + d*tan(e + f*x)))/f + (2*(2*a*b*(A*c - c*C - B*d) + a^2*(B*c + (A - C)*d) - b^2*(B*c + (A - C)*d))*(c + d*tan(e + f*x))^(3/2))/(3*f) + (2*(a^2*B - b^2*B + 2*a*b*(A - C))*(c + d*tan(e + f*x))^(5/2))/(5*f) + (2*(36*a^2*C*d^2 - 22*a*b*d*(2*c*C - 9*B*d) + b^2*(8*c^2*C - 22*B*c*d + 99*(A - C)*d^2))*(c + d*tan(e + f*x))^(7/2))/(693*d^3*f) - (2*b*(4*b*c*C - 11*b*B*d - 4*a*C*d)*tan(e + f*x)*(c + d*tan(e + f*x))^(7/2))/(99*d^2*f) + (2*C*(a + b*tan(e + f*x))^2*(c + d*tan(e + f*x))^(7/2))/(11*d*f)]
    @test_int [(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 12, -(((im*a + b)*(A - im*B - C)*(c - im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) + ((im*a - b)*(A + im*B - C)*(c + im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*(a*(B*c^2 - 2*c*C*d - B*d^2) - b*(c^2*C + 2*B*c*d - C*d^2) + A*(2*a*c*d + b*(c^2 - d^2)))*sqrt(c + d*tan(e + f*x)))/f + (2*(A*b*c + a*B*c - b*c*C + a*A*d - b*B*d - a*C*d)*(c + d*tan(e + f*x))^(3/2))/(3*f) + (2*(A*b + a*B - b*C)*(c + d*tan(e + f*x))^(5/2))/(5*f) - (2*(2*b*c*C - 9*b*B*d - 9*a*C*d)*(c + d*tan(e + f*x))^(7/2))/(63*d^2*f) + (2*b*C*tan(e + f*x)*(c + d*tan(e + f*x))^(7/2))/(9*d*f)]
    @test_int [(c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 11, -(((im*A + B - im*C)*(c - im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/f) - ((B - im*(A - C))*(c + im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/f + (2*(2*c*(A - C)*d + B*(c^2 - d^2))*sqrt(c + d*tan(e + f*x)))/f + (2*(B*c + (A - C)*d)*(c + d*tan(e + f*x))^(3/2))/(3*f) + (2*B*(c + d*tan(e + f*x))^(5/2))/(5*f) + (2*C*(c + d*tan(e + f*x))^(7/2))/(7*d*f)]
    @test_int [((c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x)), x, 14, -(((im*A + B - im*C)*(c - im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((a - im*b)*f)) + ((im*A - B - im*C)*(c + im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((a + im*b)*f) - (2*(A*b^2 - a*(b*B - a*C))*(b*c - a*d)^(5/2)*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(b^(7/2)*(a^2 + b^2)*f) + (2*(b^2*d*(B*c + (A - C)*d) + (b*c - a*d)*(b*c*C + b*B*d - a*C*d))*sqrt(c + d*tan(e + f*x)))/(b^3*f) + (2*(b*c*C + b*B*d - a*C*d)*(c + d*tan(e + f*x))^(3/2))/(3*b^2*f) + (2*C*(c + d*tan(e + f*x))^(5/2))/(5*b*f)]
    @test_int [((c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^2, x, 14, -(((im*A + B - im*C)*(c - im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((a - im*b)^2*f)) - ((B - im*(A - C))*(c + im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((a + im*b)^2*f) + ((b*c - a*d)^(3/2)*(3*a^3*b*B*d - 5*a^4*C*d - b^4*(2*B*c + 5*A*d) - a*b^3*(4*A*c - 4*c*C - 7*B*d) + a^2*b^2*(2*B*c - (A + 9*C)*d))*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(b^(7/2)*(a^2 + b^2)^2*f) - (d*(5*a^3*C*d - A*b^2*(b*c - a*d) - 2*b^3*(2*c*C + B*d) - a^2*b*(5*c*C + 3*B*d) + a*b^2*(B*c + 4*C*d))*sqrt(c + d*tan(e + f*x)))/(b^3*(a^2 + b^2)*f) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C + 2*b^2*C)*d*(c + d*tan(e + f*x))^(3/2))/(3*b^2*(a^2 + b^2)*f) - ((A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(5/2))/(b*(a^2 + b^2)*f*(a + b*tan(e + f*x)))]
    @test_int [((c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^3, x, 14, -(((A - im*B - C)*(c - im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((im*a + b)^3*f)) + ((A + im*B - C)*(c + im*d)^(5/2)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((im*a - b)^3*f) + (1/(4*b^(7/2)*(a^2 + b^2)^3*f))*(sqrt(b*c - a*d)*(3*a^5*b*B*d^2 - 15*a^6*C*d^2 + a^4*b^2*d*(4*B*c + (A - 46*C)*d) - 3*a^2*b^4*(8*A*c^2 - 8*c^2*C - 16*B*c*d - 6*A*d^2 + 21*C*d^2) - a*b^5*(56*c*(A - C)*d + B*(24*c^2 - 35*d^2)) - b^6*(4*c*(2*c*C + 5*B*d) - A*(8*c^2 - 15*d^2)) + 2*a^3*b^3*(4*c*(A - C)*d + B*(4*c^2 + 3*d^2)))*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d))) - (d*(3*a^3*b*B*d - 15*a^4*C*d - a*b^3*(8*A*c - 8*c*C - 11*B*d) + a^2*b^2*(4*B*c + (A - 31*C)*d) - b^4*(4*B*c + 7*A*d + 8*C*d))*sqrt(c + d*tan(e + f*x)))/(4*b^3*(a^2 + b^2)^2*f) + ((a^3*b*B*d - 5*a^4*C*d - b^4*(4*B*c + 5*A*d) - a*b^3*(8*A*c - 8*c*C - 9*B*d) + a^2*b^2*(4*B*c + 3*A*d - 13*C*d))*(c + d*tan(e + f*x))^(3/2))/(4*b^2*(a^2 + b^2)^2*f*(a + b*tan(e + f*x))) - ((A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(5/2))/(2*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^2)]

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

    @test_int [((a + b*tan(e + f*x))^3*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/sqrt(c + d*tan(e + f*x)), x, 11, ((im*a + b)^3*(A - im*B - C)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/(sqrt(c - im*d)*f) - ((im*a - b)^3*(A + im*B - C)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/(sqrt(c + im*d)*f) + (2*(72*a^3*C*d^3 - 6*a^2*b*d^2*(32*c*C - 49*B*d) + 21*a*b^2*d*(8*c^2*C - 10*B*c*d + 15*(A - C)*d^2) - b^3*(48*c^3*C - 56*B*c^2*d + 70*c*(A - C)*d^2 + 105*B*d^3))*sqrt(c + d*tan(e + f*x)))/(105*d^4*f) + (2*b*(35*b*(A*b + a*B - b*C)*d^2 + 4*(b*c - a*d)*(6*b*c*C - 7*b*B*d - 6*a*C*d))*tan(e + f*x)*sqrt(c + d*tan(e + f*x)))/(105*d^3*f) - (2*(6*b*c*C - 7*b*B*d - 6*a*C*d)*(a + b*tan(e + f*x))^2*sqrt(c + d*tan(e + f*x)))/(35*d^2*f) + (2*C*(a + b*tan(e + f*x))^3*sqrt(c + d*tan(e + f*x)))/(7*d*f)]
    @test_int [((a + b*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/sqrt(c + d*tan(e + f*x)), x, 10, -(((a - im*b)^2*(B + im*(A - C))*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/(sqrt(c - im*d)*f)) + ((a + im*b)^2*(im*A - B - im*C)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/(sqrt(c + im*d)*f) + (2*(12*a^2*C*d^2 - 10*a*b*d*(2*c*C - 3*B*d) + b^2*(8*c^2*C - 10*B*c*d + 15*(A - C)*d^2))*sqrt(c + d*tan(e + f*x)))/(15*d^3*f) - (2*b*(4*b*c*C - 5*b*B*d - 4*a*C*d)*tan(e + f*x)*sqrt(c + d*tan(e + f*x)))/(15*d^2*f) + (2*C*(a + b*tan(e + f*x))^2*sqrt(c + d*tan(e + f*x)))/(5*d*f)]
    @test_int [((a + b*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/sqrt(c + d*tan(e + f*x)), x, 9, -(((im*a + b)*(A - im*B - C)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/(sqrt(c - im*d)*f)) + ((im*a - b)*(A + im*B - C)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/(sqrt(c + im*d)*f) - (2*(2*b*c*C - 3*b*B*d - 3*a*C*d)*sqrt(c + d*tan(e + f*x)))/(3*d^2*f) + (2*b*C*tan(e + f*x)*sqrt(c + d*tan(e + f*x)))/(3*d*f)]
    @test_int [(A + B*tan(e + f*x) + C*tan(e + f*x)^2)/sqrt(c + d*tan(e + f*x)), x, 8, -(((im*A + B - im*C)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/(sqrt(c - im*d)*f)) - ((B - im*(A - C))*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/(sqrt(c + im*d)*f) + (2*C*sqrt(c + d*tan(e + f*x)))/(d*f)]
    @test_int [(A + B*tan(e + f*x) + C*tan(e + f*x)^2)/((a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x))), x, 11, -(((im*A + B - im*C)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((a - im*b)*sqrt(c - im*d)*f)) - ((A + im*B - C)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((im*a - b)*sqrt(c + im*d)*f) - (2*(A*b^2 - a*(b*B - a*C))*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(sqrt(b)*(a^2 + b^2)*sqrt(b*c - a*d)*f)]
    @test_int [(A + B*tan(e + f*x) + C*tan(e + f*x)^2)/((a + b*tan(e + f*x))^2*sqrt(c + d*tan(e + f*x))), x, 12, -(((im*A + B - im*C)*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c - im*d)))/((a - im*b)^2*sqrt(c - im*d)*f)) - ((B - im*(A - C))*atanh(sqrt(c + d*tan(e + f*x))/sqrt(c + im*d)))/((a + im*b)^2*sqrt(c + im*d)*f) - ((3*a^3*b*B*d - a^4*C*d + b^4*(2*B*c - A*d) + a*b^3*(4*A*c - 4*c*C - B*d) - a^2*b^2*(2*B*c + 5*A*d - 3*C*d))*atanh((sqrt(b)*sqrt(c + d*tan(e + f*x)))/sqrt(b*c - a*d)))/(sqrt(b)*(a^2 + b^2)^2*(b*c - a*d)^(3/2)*f) - ((A*b^2 - a*(b*B - a*C))*sqrt(c + d*tan(e + f*x)))/((a^2 + b^2)*(b*c - a*d)*f*(a + b*tan(e + f*x)))]

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

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

    #= ::Subsection::Closed:: =#
    #=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)+C*tan(e+f*x)^2)=#

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

    @test_int [(a + b*tan(e + f*x))^(5/2)*sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 16, -(((a - im*b)^(5/2)*(im*A + B - im*C)*sqrt(c - im*d)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/f) - ((a + im*b)^(5/2)*(B - im*(A - C))*sqrt(c + im*d)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/f - ((5*a^4*C*d^4 - 20*a^3*b*d^3*(c*C + 2*B*d) + 30*a^2*b^2*d^2*(c^2*C - 4*B*c*d - 8*(A - C)*d^2) - 20*a*b^3*d*(c^3*C - 2*B*c^2*d + 8*c*(A - C)*d^2 - 16*B*d^3) + b^4*(5*c^4*C - 8*B*c^3*d + 16*c^2*(A - C)*d^2 + 64*B*c*d^3 + 128*(A - C)*d^4))*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(64*b^(3/2)*d^(7/2)*f) + ((64*b*(a^2*B - b^2*B + 2*a*b*(A - C))*d^3 - (b*c - a*d)*(16*b*(A*b + a*B - b*C)*d^2 + (b*c - a*d)*(5*b*c*C - 8*b*B*d - 5*a*C*d)))*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(64*b*d^3*f) + ((16*b*(A*b + a*B - b*C)*d^2 + (b*c - a*d)*(5*b*c*C - 8*b*B*d - 5*a*C*d))*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2))/(32*d^3*f) - ((5*b*c*C - 8*b*B*d - 5*a*C*d)*(a + b*tan(e + f*x))^(3/2)*(c + d*tan(e + f*x))^(3/2))/(24*d^2*f) + (C*(a + b*tan(e + f*x))^(5/2)*(c + d*tan(e + f*x))^(3/2))/(4*d*f)]
    @test_int [(a + b*tan(e + f*x))^(3/2)*sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 15, -(((a - im*b)^(3/2)*(im*A + B - im*C)*sqrt(c - im*d)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/f) + ((a + im*b)^(3/2)*(im*A - B - im*C)*sqrt(c + im*d)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/f - ((a^3*C*d^3 - 3*a^2*b*d^2*(c*C + 2*B*d) + 3*a*b^2*d*(c^2*C - 4*B*c*d - 8*(A - C)*d^2) - b^3*(c^3*C - 2*B*c^2*d + 8*c*(A - C)*d^2 - 16*B*d^3))*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(8*b^(3/2)*d^(5/2)*f) + ((8*b*(A*b + a*B - b*C)*d^2 + (b*c - a*d)*(b*c*C - 2*b*B*d - a*C*d))*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(8*b*d^2*f) - ((b*c*C - 2*b*B*d - a*C*d)*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2))/(4*d^2*f) + (C*(a + b*tan(e + f*x))^(3/2)*(c + d*tan(e + f*x))^(3/2))/(3*d*f)]
    @test_int [sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 14, -((sqrt(a - im*b)*(im*A + B - im*C)*sqrt(c - im*d)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/f) - (sqrt(a + im*b)*(B - im*(A - C))*sqrt(c + im*d)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/f - ((a^2*C*d^2 - 2*a*b*d*(c*C + 2*B*d) + b^2*(c^2*C - 4*B*c*d - 8*(A - C)*d^2))*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(4*b^(3/2)*d^(3/2)*f) - ((b*c*C - 4*b*B*d - a*C*d)*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(4*b*d*f) + (C*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2))/(2*d*f)]
    @test_int [(sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/sqrt(a + b*tan(e + f*x)), x, 13, -(((im*A + B - im*C)*sqrt(c - im*d)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/(sqrt(a - im*b)*f)) - ((B - im*(A - C))*sqrt(c + im*d)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/(sqrt(a + im*b)*f) + ((b*c*C + 2*b*B*d - a*C*d)*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(b^(3/2)*sqrt(d)*f) + (C*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(b*f)]
    @test_int [(sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(3/2), x, 13, -(((im*A + B - im*C)*sqrt(c - im*d)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(3/2)*f)) - ((B - im*(A - C))*sqrt(c + im*d)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(3/2)*f) + (2*C*sqrt(d)*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(b^(3/2)*f) - (2*(A*b^2 - a*(b*B - a*C))*sqrt(c + d*tan(e + f*x)))/(b*(a^2 + b^2)*f*sqrt(a + b*tan(e + f*x)))]
    @test_int [(sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(5/2), x, 9, -(((im*A + B - im*C)*sqrt(c - im*d)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(5/2)*f)) - ((B - im*(A - C))*sqrt(c + im*d)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(5/2)*f) - (2*(A*b^2 - a*(b*B - a*C))*sqrt(c + d*tan(e + f*x)))/(3*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^(3/2)) - (2*(2*a^3*b*B*d + a^4*C*d + b^4*(3*B*c + A*d) + 2*a*b^3*(3*A*c - 3*c*C - 2*B*d) - a^2*b^2*(3*B*c + 5*A*d - 7*C*d))*sqrt(c + d*tan(e + f*x)))/(3*b*(a^2 + b^2)^2*(b*c - a*d)*f*sqrt(a + b*tan(e + f*x)))]
    @test_int [(sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(7/2), x, 10, -(((im*A + B - im*C)*sqrt(c - im*d)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(7/2)*f)) - ((B - im*(A - C))*sqrt(c + im*d)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(7/2)*f) - (2*(A*b^2 - a*(b*B - a*C))*sqrt(c + d*tan(e + f*x)))/(5*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^(5/2)) - (2*(4*a^3*b*B*d + a^4*C*d + b^4*(5*B*c + A*d) + 2*a*b^3*(5*A*c - 5*c*C - 3*B*d) - a^2*b^2*(5*B*c + 9*A*d - 11*C*d))*sqrt(c + d*tan(e + f*x)))/(15*b*(a^2 + b^2)^2*(b*c - a*d)*f*(a + b*tan(e + f*x))^(3/2)) + (2*(8*a^5*b*B*d^2 + 2*a^6*C*d^2 - a^4*b^2*d*(25*B*c + 33*A*d - 39*C*d) - a^2*b^4*(45*A*c^2 - 45*c^2*C - 90*B*c*d - 29*A*d^2 + 23*C*d^2) + a^3*b^3*(80*c*(A - C)*d + B*(15*c^2 - 49*d^2)) - a*b^5*(40*c*(A - C)*d + B*(45*c^2 - 3*d^2)) - b^6*(5*c*(3*c*C + B*d) - A*(15*c^2 + 2*d^2)))*sqrt(c + d*tan(e + f*x)))/(15*b*(a^2 + b^2)^3*(b*c - a*d)^2*f*sqrt(a + b*tan(e + f*x)))]

    @test_int [(a + b*tan(e + f*x))^(3/2)*(c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 16, -(((a - im*b)^(3/2)*(B + im*(A - C))*(c - im*d)^(3/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/f) - ((a + im*b)^(3/2)*(B - im*(A - C))*(c + im*d)^(3/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/f + ((3*a^4*C*d^4 - 4*a^3*b*d^3*(3*c*C + 2*B*d) + 6*a^2*b^2*d^2*(3*c^2*C + 12*B*c*d + 8*(A - C)*d^2) - 12*a*b^3*d*(c^3*C - 6*B*c^2*d - 24*c*(A - C)*d^2 + 16*B*d^3) + b^4*(3*c^4*C - 8*B*c^3*d + 48*c^2*(A - C)*d^2 - 192*B*c*d^3 - 128*(A - C)*d^4))*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(64*b^(5/2)*d^(5/2)*f) + ((64*b*(a^2*B - b^2*B + 2*a*b*(A - C))*d^3 + (b*c - a*d)*(48*b*(A*b + a*B - b*C)*d^2 + (b*c - a*d)*(3*b*c*C - 8*b*B*d - 3*a*C*d)))*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(64*b^2*d^2*f) + ((48*b*(A*b + a*B - b*C)*d^2 + (b*c - a*d)*(3*b*c*C - 8*b*B*d - 3*a*C*d))*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2))/(96*b*d^2*f) - ((3*b*c*C - 8*b*B*d - 3*a*C*d)*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(5/2))/(24*d^2*f) + (C*(a + b*tan(e + f*x))^(3/2)*(c + d*tan(e + f*x))^(5/2))/(4*d*f)]
    @test_int [sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 15, -((sqrt(a - im*b)*(im*A + B - im*C)*(c - im*d)^(3/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/f) - (sqrt(a + im*b)*(B - im*(A - C))*(c + im*d)^(3/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/f + ((a^3*C*d^3 - a^2*b*d^2*(3*c*C + 2*B*d) + a*b^2*d*(3*c^2*C + 12*B*c*d + 8*(A - C)*d^2) - b^3*(c^3*C - 6*B*c^2*d - 24*c*(A - C)*d^2 + 16*B*d^3))*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(8*b^(5/2)*d^(3/2)*f) + ((8*b*(A*b + a*B - b*C)*d^2 - (b*c - a*d)*(b*c*C - 6*b*B*d - a*C*d))*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(8*b^2*d*f) - ((b*c*C - 6*b*B*d - a*C*d)*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2))/(12*b*d*f) + (C*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(5/2))/(3*d*f)]
    @test_int [((c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/sqrt(a + b*tan(e + f*x)), x, 14, -(((im*A + B - im*C)*(c - im*d)^(3/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/(sqrt(a - im*b)*f)) + ((im*A - B - im*C)*(c + im*d)^(3/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/(sqrt(a + im*b)*f) + ((3*a^2*C*d^2 - 2*a*b*d*(3*c*C + 2*B*d) + b^2*(3*c^2*C + 12*B*c*d + 8*(A - C)*d^2))*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(4*b^(5/2)*sqrt(d)*f) + ((3*b*c*C + 4*b*B*d - 3*a*C*d)*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(4*b^2*f) + (C*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2))/(2*b*f)]
    @test_int [((c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(3/2), x, 14, -(((im*A + B - im*C)*(c - im*d)^(3/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(3/2)*f)) - ((B - im*(A - C))*(c + im*d)^(3/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(3/2)*f) + (sqrt(d)*(3*b*c*C + 2*b*B*d - 3*a*C*d)*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(b^(5/2)*f) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C + b^2*C)*d*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(b^2*(a^2 + b^2)*f) - (2*(A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(3/2))/(b*(a^2 + b^2)*f*sqrt(a + b*tan(e + f*x)))]
    @test_int [((c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(5/2), x, 14, -(((im*A + B - im*C)*(c - im*d)^(3/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(5/2)*f)) - ((B - im*(A - C))*(c + im*d)^(3/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(5/2)*f) + (2*C*d^(3/2)*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(b^(5/2)*f) - (2*(a^4*C*d + b^4*(B*c + A*d) + 2*a*b^3*(A*c - c*C - B*d) - a^2*b^2*(B*c + (A - 3*C)*d))*sqrt(c + d*tan(e + f*x)))/(b^2*(a^2 + b^2)^2*f*sqrt(a + b*tan(e + f*x))) - (2*(A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(3/2))/(3*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^(3/2))]
    @test_int [((c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(7/2), x, 10, -(((im*A + B - im*C)*(c - im*d)^(3/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(7/2)*f)) - ((B - im*(A - C))*(c + im*d)^(3/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(7/2)*f) - (2*(2*a^3*b*B*d + 3*a^4*C*d + b^4*(5*B*c + 3*A*d) + 2*a*b^3*(5*A*c - 5*c*C - 4*B*d) - a^2*b^2*(5*B*c + 7*A*d - 13*C*d))*sqrt(c + d*tan(e + f*x)))/(15*b^2*(a^2 + b^2)^2*f*(a + b*tan(e + f*x))^(3/2)) - (2*(2*a^5*b*B*d^2 + 3*a^6*C*d^2 + a^4*b^2*d*(10*B*c + (8*A + C)*d) + a^2*b^4*(45*A*c^2 - 45*c^2*C - 90*B*c*d - 49*A*d^2 + 58*C*d^2) - a^3*b^3*(50*c*(A - C)*d + B*(15*c^2 - 39*d^2)) + a*b^5*(70*c*(A - C)*d + B*(45*c^2 - 23*d^2)) + b^6*(5*c*(3*c*C + 4*B*d) - 3*A*(5*c^2 - d^2)))*sqrt(c + d*tan(e + f*x)))/(15*b^2*(a^2 + b^2)^3*(b*c - a*d)*f*sqrt(a + b*tan(e + f*x))) - (2*(A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(3/2))/(5*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^(5/2))]

    @test_int [sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 16, -((sqrt(a - im*b)*(im*A + B - im*C)*(c - im*d)^(5/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/f) + (sqrt(a + im*b)*(im*A - B - im*C)*(c + im*d)^(5/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/f - ((5*a^4*C*d^4 - 4*a^3*b*d^3*(5*c*C + 2*B*d) + 2*a^2*b^2*d^2*(15*c^2*C + 20*B*c*d + 8*(A - C)*d^2) - 4*a*b^3*d*(5*c^3*C + 30*B*c^2*d + 40*c*(A - C)*d^2 - 16*B*d^3) + b^4*(5*c^4*C - 40*B*c^3*d - 240*c^2*(A - C)*d^2 + 320*B*c*d^3 + 128*(A - C)*d^4))*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(64*b^(7/2)*d^(3/2)*f) + ((64*b^2*d^2*(A*b*c + a*B*c - b*c*C + a*A*d - b*B*d - a*C*d) + (b*c - a*d)*(48*b*(A*b + a*B - b*C)*d^2 - 5*(b*c - a*d)*(b*c*C - 8*b*B*d - a*C*d)))*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(64*b^3*d*f) + ((48*b*(A*b + a*B - b*C)*d^2 - 5*(b*c - a*d)*(b*c*C - 8*b*B*d - a*C*d))*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2))/(96*b^2*d*f) - ((b*c*C - 8*b*B*d - a*C*d)*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(5/2))/(24*b*d*f) + (C*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(7/2))/(4*d*f)]
    @test_int [((c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/sqrt(a + b*tan(e + f*x)), x, 15, -(((im*A + B - im*C)*(c - im*d)^(5/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/(sqrt(a - im*b)*f)) - ((B - im*(A - C))*(c + im*d)^(5/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/(sqrt(a + im*b)*f) - ((5*a^3*C*d^3 - 3*a^2*b*d^2*(5*c*C + 2*B*d) + a*b^2*d*(15*c^2*C + 20*B*c*d + 8*(A - C)*d^2) - b^3*(5*c^3*C + 30*B*c^2*d + 40*c*(A - C)*d^2 - 16*B*d^3))*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(8*b^(7/2)*sqrt(d)*f) + ((8*b^2*d*(B*c + (A - C)*d) + (b*c - a*d)*(5*b*c*C + 6*b*B*d - 5*a*C*d))*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(8*b^3*f) + ((5*b*c*C + 6*b*B*d - 5*a*C*d)*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2))/(12*b^2*f) + (C*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(5/2))/(3*b*f)]
    @test_int [((c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(3/2), x, 15, -(((im*A + B - im*C)*(c - im*d)^(5/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(3/2)*f)) - ((B - im*(A - C))*(c + im*d)^(5/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(3/2)*f) + (sqrt(d)*(15*a^2*C*d^2 - 6*a*b*d*(5*c*C + 2*B*d) + b^2*(15*c^2*C + 20*B*c*d + 8*(A - C)*d^2))*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(4*b^(7/2)*f) - (d*(15*a^3*C*d - 8*A*b^2*(b*c - a*d) - 3*a^2*b*(5*c*C + 4*B*d) - b^3*(7*c*C + 4*B*d) + a*b^2*(8*B*c + 7*C*d))*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(4*b^3*(a^2 + b^2)*f) + ((4*A*b^2 - 4*a*b*B + 5*a^2*C + b^2*C)*d*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2))/(2*b^2*(a^2 + b^2)*f) - (2*(A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(5/2))/(b*(a^2 + b^2)*f*sqrt(a + b*tan(e + f*x)))]
    @test_int [((c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(5/2), x, 15, -(((im*A + B - im*C)*(c - im*d)^(5/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(5/2)*f)) - ((B - im*(A - C))*(c + im*d)^(5/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(5/2)*f) + (d^(3/2)*(5*b*c*C + 2*b*B*d - 5*a*C*d)*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(b^(7/2)*f) - (d*(2*a^3*b*B*d - 5*a^4*C*d - 2*a*b^3*(2*A*c - 2*c*C - 3*B*d) + 2*a^2*b^2*(B*c - 5*C*d) - b^4*(2*B*c + (4*A + C)*d))*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(b^3*(a^2 + b^2)^2*f) + (2*(2*a^3*b*B*d - 5*a^4*C*d - b^4*(3*B*c + 5*A*d) - 2*a*b^3*(3*A*c - 3*c*C - 4*B*d) + a^2*b^2*(3*B*c + (A - 11*C)*d))*(c + d*tan(e + f*x))^(3/2))/(3*b^2*(a^2 + b^2)^2*f*sqrt(a + b*tan(e + f*x))) - (2*(A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(5/2))/(3*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^(3/2))]
    @test_int [((c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(7/2), x, 15, -(((im*A + B - im*C)*(c - im*d)^(5/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(7/2)*f)) - ((B - im*(A - C))*(c + im*d)^(5/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(7/2)*f) + (2*C*d^(5/2)*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(b^(7/2)*f) - (2*(a^6*C*d^2 + 3*a^4*b^2*C*d^2 - 3*a^2*b^4*(c^2*C + 2*B*c*d - 2*C*d^2 - A*(c^2 - d^2)) + b^6*(c*(c*C + 2*B*d) - A*(c^2 - d^2)) - a^3*b^3*(2*c*(A - C)*d + B*(c^2 - d^2)) + 3*a*b^5*(2*c*(A - C)*d + B*(c^2 - d^2)))*sqrt(c + d*tan(e + f*x)))/(b^3*(a^2 + b^2)^3*f*sqrt(a + b*tan(e + f*x))) - (2*(a^4*C*d + b^4*(B*c + A*d) + 2*a*b^3*(A*c - c*C - B*d) - a^2*b^2*(B*c + (A - 3*C)*d))*(c + d*tan(e + f*x))^(3/2))/(3*b^2*(a^2 + b^2)^2*f*(a + b*tan(e + f*x))^(3/2)) - (2*(A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(5/2))/(5*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^(5/2))]
    @test_int [((c + d*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^(9/2), x, 11, -(((im*A + B - im*C)*(c - im*d)^(5/2)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(9/2)*f)) - ((B - im*(A - C))*(c + im*d)^(5/2)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(9/2)*f) - (2*(6*a^5*b*B*d^2 + 15*a^6*C*d^2 + a^4*b^2*d*(14*B*c + 8*A*d + 37*C*d) + 3*a^2*b^4*(35*A*c^2 - 35*c^2*C - 70*B*c*d - 39*A*d^2 + 54*C*d^2) - a^3*b^3*(98*c*(A - C)*d + B*(35*c^2 - 75*d^2)) + a*b^5*(182*c*(A - C)*d + B*(105*c^2 - 71*d^2)) + b^6*(7*c*(5*c*C + 8*B*d) - 5*A*(7*c^2 - 3*d^2)))*sqrt(c + d*tan(e + f*x)))/(105*b^3*(a^2 + b^2)^3*f*(a + b*tan(e + f*x))^(3/2)) - (1/(105*b^3*(a^2 + b^2)^4*(b*c - a*d)*f*sqrt(a + b*tan(e + f*x))))*(2*(6*a^7*b*B*d^3 + 15*a^8*C*d^3 + 2*a^6*b^2*d^2*(7*B*c + 4*A*d + 26*C*d) - 2*a*b^7*(210*A*c^3 - 210*c^3*C - 525*B*c^2*d - 406*A*c*d^2 + 406*c*C*d^2 + 88*B*d^3) - a^4*b^4*(105*B*c^3 + 525*A*c^2*d - 525*c^2*C*d - 749*B*c*d^2 - 311*A*d^3 + 221*C*d^3) + 2*a^2*b^6*(315*B*c^3 + 875*A*c^2*d - 875*c^2*C*d - 812*B*c*d^2 - 261*A*d^3 + 291*C*d^3) + 2*a^5*b^3*d*(56*c*(A - C)*d + B*(35*c^2 - 12*d^2)) - b^8*(5*d*(49*A*c^2 - 49*c^2*C - 3*A*d^2) + 7*B*(15*c^3 - 23*c*d^2)) - 2*a^3*b^5*(210*c^3*C + 700*B*c^2*d - 798*c*C*d^2 - 317*B*d^3 - 42*A*(5*c^3 - 19*c*d^2)))*sqrt(c + d*tan(e + f*x))) - (2*(2*a^3*b*B*d + 5*a^4*C*d + b^4*(7*B*c + 5*A*d) + 2*a*b^3*(7*A*c - 7*c*C - 6*B*d) - a^2*b^2*(7*B*c + 9*A*d - 19*C*d))*(c + d*tan(e + f*x))^(3/2))/(35*b^2*(a^2 + b^2)^2*f*(a + b*tan(e + f*x))^(5/2)) - (2*(A*b^2 - a*(b*B - a*C))*(c + d*tan(e + f*x))^(5/2))/(7*b*(a^2 + b^2)*f*(a + b*tan(e + f*x))^(7/2))]

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

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

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

    @test_int [((a + b*tan(e + f*x))^(5/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x))^(5/2), x, 15, -(((a - im*b)^(5/2)*(im*A + B - im*C)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((c - im*d)^(5/2)*f)) - ((a + im*b)^(5/2)*(B - im*(A - C))*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((c + im*d)^(5/2)*f) - (b^(3/2)*(5*b*c*C - 2*b*B*d - 5*a*C*d)*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(d^(7/2)*f) - (2*(c^2*C - B*c*d + A*d^2)*(a + b*tan(e + f*x))^(5/2))/(3*d*(c^2 + d^2)*f*(c + d*tan(e + f*x))^(3/2)) - (2*(b*(5*c^4*C - 2*B*c^3*d - c^2*(A - 11*C)*d^2 - 8*B*c*d^3 + 5*A*d^4) + 3*a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*(a + b*tan(e + f*x))^(3/2))/(3*d^2*(c^2 + d^2)^2*f*sqrt(c + d*tan(e + f*x))) + (b*(b*(5*c^4*C - 2*B*c^3*d + 10*c^2*C*d^2 - 6*B*c*d^3 + (4*A + C)*d^4) + 2*a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x)))/(d^3*(c^2 + d^2)^2*f)]
    @test_int [((a + b*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x))^(5/2), x, 14, -(((a - im*b)^(3/2)*(im*A + B - im*C)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((c - im*d)^(5/2)*f)) - ((a + im*b)^(3/2)*(B - im*(A - C))*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((c + im*d)^(5/2)*f) + (2*b^(3/2)*C*atanh((sqrt(d)*sqrt(a + b*tan(e + f*x)))/(sqrt(b)*sqrt(c + d*tan(e + f*x)))))/(d^(5/2)*f) - (2*(c^2*C - B*c*d + A*d^2)*(a + b*tan(e + f*x))^(3/2))/(3*d*(c^2 + d^2)*f*(c + d*tan(e + f*x))^(3/2)) - (2*(b*(c^4*C - c^2*(A - 3*C)*d^2 - 2*B*c*d^3 + A*d^4) + a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*sqrt(a + b*tan(e + f*x)))/(d^2*(c^2 + d^2)^2*f*sqrt(c + d*tan(e + f*x)))]
    @test_int [(sqrt(a + b*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x))^(5/2), x, 9, -((sqrt(a - im*b)*(im*A + B - im*C)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((c - im*d)^(5/2)*f)) - (sqrt(a + im*b)*(B - im*(A - C))*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((c + im*d)^(5/2)*f) - (2*(c^2*C - B*c*d + A*d^2)*sqrt(a + b*tan(e + f*x)))/(3*d*(c^2 + d^2)*f*(c + d*tan(e + f*x))^(3/2)) + (2*(b*(c^4*C + 2*B*c^3*d - c^2*(5*A - 7*C)*d^2 - 4*B*c*d^3 + A*d^4) + 3*a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*sqrt(a + b*tan(e + f*x)))/(3*d*(b*c - a*d)*(c^2 + d^2)^2*f*sqrt(c + d*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x) + C*tan(e + f*x)^2)/(sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(5/2)), x, 9, -(((B + im*(A - C))*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/(sqrt(a - im*b)*(c - im*d)^(5/2)*f)) + ((im*A - B - im*C)*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/(sqrt(a + im*b)*(c + im*d)^(5/2)*f) + (2*(c^2*C - B*c*d + A*d^2)*sqrt(a + b*tan(e + f*x)))/(3*(b*c - a*d)*(c^2 + d^2)*f*(c + d*tan(e + f*x))^(3/2)) + (2*(b*(2*c^4*C - 5*B*c^3*d + 4*c^2*(2*A - C)*d^2 + B*c*d^3 + 2*A*d^4) - 3*a*d^2*(2*c*(A - C)*d - B*(c^2 - d^2)))*sqrt(a + b*tan(e + f*x)))/(3*(b*c - a*d)^2*(c^2 + d^2)^2*f*sqrt(c + d*tan(e + f*x)))]
    @test_int [(A + B*tan(e + f*x) + C*tan(e + f*x)^2)/((a + b*tan(e + f*x))^(3/2)*(c + d*tan(e + f*x))^(5/2)), x, 10, -(((im*A + B - im*C)*atanh((sqrt(c - im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a - im*b)*sqrt(c + d*tan(e + f*x)))))/((a - im*b)^(3/2)*(c - im*d)^(5/2)*f)) - ((B - im*(A - C))*atanh((sqrt(c + im*d)*sqrt(a + b*tan(e + f*x)))/(sqrt(a + im*b)*sqrt(c + d*tan(e + f*x)))))/((a + im*b)^(3/2)*(c + im*d)^(5/2)*f) - (2*(A*b^2 - a*(b*B - a*C)))/((a^2 + b^2)*(b*c - a*d)*f*sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(3/2)) - (2*d*(b^2*c*(c*C - B*d) - 3*a*b*B*(c^2 + d^2) + a^2*(4*c^2*C - B*c*d + 3*C*d^2) + A*(a^2*d^2 + b^2*(3*c^2 + 4*d^2)))*sqrt(a + b*tan(e + f*x)))/(3*(a^2 + b^2)*(b*c - a*d)^2*(c^2 + d^2)*f*(c + d*tan(e + f*x))^(3/2)) - (2*d*(b^3*c*(5*c^3*C - 8*B*c^2*d - c*C*d^2 - 2*B*d^3) + a^2*b*(8*c^4*C - 8*B*c^3*d + 5*c^2*C*d^2 - 2*B*c*d^3 + 3*C*d^4) + 3*a^3*d^2*(2*c*C*d + B*(c^2 - d^2)) + 3*a*b^2*(2*c*C*d^3 - B*(c^4 + c^2*d^2 + 2*d^4)) - A*(6*a^3*c*d^3 + 6*a*b^2*c*d^3 - a^2*b*d^2*(11*c^2 + 5*d^2) - b^3*(3*c^4 + 17*c^2*d^2 + 8*d^4)))*sqrt(a + b*tan(e + f*x)))/(3*(a^2 + b^2)*(b*c - a*d)^3*(c^2 + d^2)^2*f*sqrt(c + d*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)+C*tan(e+f*x)^2)*with*m*and/or*n*symbolic=#

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

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

    #= [(a + b*tan(e + f*x))^m*(c + d*tan(e + f*x))^(3/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 18, -((2*(3*a*C*d - b*(3*c*C + B*d*(5 + 2*m)))*(a + b*tan(e + f*x))^(1 + m)*sqrt(c + d*tan(e + f*x)))/(b^2*f*(3 + 2*m)*(5 + 2*m))) + (2*C*(a + b*tan(e + f*x))^(1 + m)*(c + d*tan(e + f*x))^(3/2))/(b*f*(5 + 2*m)) - ((B*d*(c^2 - d^2 - 2*c*sqrt(-d^2)) + (A - C)*(2*c*d^2 + c^2*sqrt(-d^2) + (-d^2)^(3/2)))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c - sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(c - sqrt(-d^2))*f)) - ((B*d*(c^2 - d^2 + 2*c*sqrt(-d^2)) + (A - C)*(2*c*d^2 - c^2*sqrt(-d^2) - (-d^2)^(3/2)))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c + sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(c + sqrt(-d^2))*f)) + (1/(b^2*d*f*(3 + 2*m)*(5 + 2*m)))*((2*(3*a^2*C*d^2 - a*b*d*(6*c*C + B*d*(5 + 2*m)) + b^2*(3*c^2*C + 2*B*c*d*(10 + 9*m + 2*m^2) + (A - C)*d^2*(15 + 16*m + 4*m^2)))*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/(1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m)]
    @test_int [(a + b*tan(e + f*x))^m*(c + d*tan(e + f*x))^(1/2)*(A + B*tan(e + f*x) + C*tan(e + f*x)^2), x, 16, (2*C*(a + b*tan(e + f*x))^(1 + m)*sqrt(c + d*tan(e + f*x)))/(b*f*(3 + 2*m)) - ((B*d*(c - sqrt(-d^2)) + (A - C)*(d^2 + c*sqrt(-d^2)))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c - sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(c - sqrt(-d^2))*f)) - ((B*d*(c + sqrt(-d^2)) + (A - C)*(d^2 - c*sqrt(-d^2)))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c + sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(c + sqrt(-d^2))*f)) - (2*(a*C*d - b*(c*C + B*d*(3 + 2*m)))*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(b*d*f*(3 + 2*m)))]
    @test_int [((a + b*tan(e + f*x))^m*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x))^(1/2), x, 15, -(((B*d + (A - C)*sqrt(-d^2))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c - sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(c - sqrt(-d^2))*f))) - ((B*d - (A - C)*sqrt(-d^2))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c + sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(c + sqrt(-d^2))*f)) + (2*C*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*f))]
    @test_int [((a + b*tan(e + f*x))^m*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(c + d*tan(e + f*x))^(3/2), x, 16, If(13<9, (2*(c^2*C - B*c*d + A*d^2)*(a + b*tan(e + f*x))^(1 + m))/((b*c - a*d)*(c^2 + d^2)*f*sqrt(c + d*tan(e + f*x))) - ((B*c - (A - C)*d - (d*(A*c - c*C + B*d))/sqrt(-d^2))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c - sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*((c^2 + d^2)*(c - sqrt(-d^2))*f)) - ((B*c - (A - C)*d + (d*(A*c - c*C + B*d))/sqrt(-d^2))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c + sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*((c^2 + d^2)*(c + sqrt(-d^2))*f)) - (2*b*(c^2*C - B*c*d + A*d^2)*(1 + 2*m)*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(b*c - a*d)*(c^2 + d^2)*f)), (2*(c^2*C - B*c*d + A*d^2)*(a + b*tan(e + f*x))^(1 + m))/((b*c - a*d)*(c^2 + d^2)*f*sqrt(c + d*tan(e + f*x))) - ((B*d*(c + sqrt(-d^2)) - (A - C)*(d^2 - c*sqrt(-d^2)))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c - sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(c^2 + d^2)*(c - sqrt(-d^2))*f)) - ((B*d*(c - sqrt(-d^2)) - (A - C)*(d^2 + c*sqrt(-d^2)))*AppellF1(1/2, -m, 1, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d), (c + d*tan(e + f*x))/(c + sqrt(-d^2)))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(c^2 + d^2)*(c + sqrt(-d^2))*f)) - (2*b*(c^2*C - B*c*d + A*d^2)*(1 + 2*m)*HypergeometricFunctions._₂F₁(1/2, -m, 3/2, (b*c + b*d*tan(e + f*x))/(b*c - a*d))*(a + b*tan(e + f*x))^m*sqrt(c + d*tan(e + f*x)))/((1 - (b*c + b*d*tan(e + f*x))/(b*c - a*d))^m*(d*(b*c - a*d)*(c^2 + d^2)*f)))] =#
    end

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