@testset "5.3.5 u (a+b arctan(c+d x))^p" begin
    (a, b, c, d, e, f, m, x, ) = @variables a b c d e f m x

    #= ::Package:: =#

    #= ::Title:: =#
    #=Integrands*of*the*form*u*(a+b*atan(c+d*x))^p=#


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


    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(e+f*x)^m*(a+b*atan(c+d*x))^p*when*d*e-c*f=0=#


    @test_int [(c*e + d*e*x)^3*(a + b*atan(c + d*x)), x, 6, (b*e^3*x)/4 - (b*e^3*(c + d*x)^3)/(12*d) - (b*e^3*atan(c + d*x))/(4*d) + (e^3*(c + d*x)^4*(a + b*atan(c + d*x)))/(4*d)]
    @test_int [(c*e + d*e*x)^2*(a + b*atan(c + d*x)), x, 6, -(b*e^2*(c + d*x)^2)/(6*d) + (e^2*(c + d*x)^3*(a + b*atan(c + d*x)))/(3*d) + (b*e^2*log(1 + (c + d*x)^2))/(6*d)]
    @test_int [(c*e + d*e*x)^1*(a + b*atan(c + d*x)), x, 5, -(b*e*x)/2 + (b*e*atan(c + d*x))/(2*d) + (e*(c + d*x)^2*(a + b*atan(c + d*x)))/(2*d)]
    @test_int [(a + b*atan(c + d*x))/(c*e + d*e*x)^1, x, 5, (a*log(c + d*x))/(d*e) + ((im/2)*b*PolyLog(2, (-im)*(c + d*x)))/(d*e) - ((im/2)*b*PolyLog(2, im*(c + d*x)))/(d*e)]
    @test_int [(a + b*atan(c + d*x))/(c*e + d*e*x)^2, x, 7, -((a + b*atan(c + d*x))/(d*e^2*(c + d*x))) + (b*log(c + d*x))/(d*e^2) - (b*log(1 + (c + d*x)^2))/(2*d*e^2)]
    @test_int [(a + b*atan(c + d*x))/(c*e + d*e*x)^3, x, 5, -b/(2*d*e^3*(c + d*x)) - (b*atan(c + d*x))/(2*d*e^3) - (a + b*atan(c + d*x))/(2*d*e^3*(c + d*x)^2)]


    @test_int [(c*e + d*e*x)^3*(a + b*atan(c + d*x))^2, x, 13, (a*b*e^3*x)/2 + (b^2*e^3*(c + d*x)^2)/(12*d) + (b^2*e^3*(c + d*x)*atan(c + d*x))/(2*d) - (b*e^3*(c + d*x)^3*(a + b*atan(c + d*x)))/(6*d) - (e^3*(a + b*atan(c + d*x))^2)/(4*d) + (e^3*(c + d*x)^4*(a + b*atan(c + d*x))^2)/(4*d) - (b^2*e^3*log(1 + (c + d*x)^2))/(3*d)]
    @test_int [(c*e + d*e*x)^2*(a + b*atan(c + d*x))^2, x, 11, (b^2*e^2*x)/3 - (b^2*e^2*atan(c + d*x))/(3*d) - (b*e^2*(c + d*x)^2*(a + b*atan(c + d*x)))/(3*d) - ((im/3)*e^2*(a + b*atan(c + d*x))^2)/d + (e^2*(c + d*x)^3*(a + b*atan(c + d*x))^2)/(3*d) - (2*b*e^2*(a + b*atan(c + d*x))*log(2/(1 + im*(c + d*x))))/(3*d) - ((im/3)*b^2*e^2*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/d]
    @test_int [(c*e + d*e*x)^1*(a + b*atan(c + d*x))^2, x, 8, -(a*b*e*x) - (b^2*e*(c + d*x)*atan(c + d*x))/d + (e*(a + b*atan(c + d*x))^2)/(2*d) + (e*(c + d*x)^2*(a + b*atan(c + d*x))^2)/(2*d) + (b^2*e*log(1 + (c + d*x)^2))/(2*d)]
    @test_int [(a + b*atan(c + d*x))^2/(c*e + d*e*x)^1, x, 8, (2*(a + b*atan(c + d*x))^2*atanh(1 - 2/(1 + im*(c + d*x))))/(d*e) - (im*b*(a + b*atan(c + d*x))*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/(d*e) + (im*b*(a + b*atan(c + d*x))*PolyLog(2, -1 + 2/(1 + im*(c + d*x))))/(d*e) - (b^2*PolyLog(3, 1 - 2/(1 + im*(c + d*x))))/(2*d*e) + (b^2*PolyLog(3, -1 + 2/(1 + im*(c + d*x))))/(2*d*e)]
    @test_int [(a + b*atan(c + d*x))^2/(c*e + d*e*x)^2, x, 6, ((-im)*(a + b*atan(c + d*x))^2)/(d*e^2) - (a + b*atan(c + d*x))^2/(d*e^2*(c + d*x)) + (2*b*(a + b*atan(c + d*x))*log(2 - 2/(1 - im*(c + d*x))))/(d*e^2) - (im*b^2*PolyLog(2, -1 + 2/(1 - im*(c + d*x))))/(d*e^2)]
    @test_int [(a + b*atan(c + d*x))^2/(c*e + d*e*x)^3, x, 10, -((b*(a + b*atan(c + d*x)))/(d*e^3*(c + d*x))) - (a + b*atan(c + d*x))^2/(2*d*e^3) - (a + b*atan(c + d*x))^2/(2*d*e^3*(c + d*x)^2) + (b^2*log(c + d*x))/(d*e^3) - (b^2*log(1 + (c + d*x)^2))/(2*d*e^3)]
    @test_int [(a + b*atan(c + d*x))^2/(c*e + d*e*x)^4, x, 10, -b^2/(3*d*e^4*(c + d*x)) - (b^2*atan(c + d*x))/(3*d*e^4) - (b*(a + b*atan(c + d*x)))/(3*d*e^4*(c + d*x)^2) + ((im/3)*(a + b*atan(c + d*x))^2)/(d*e^4) - (a + b*atan(c + d*x))^2/(3*d*e^4*(c + d*x)^3) - (2*b*(a + b*atan(c + d*x))*log(2 - 2/(1 - im*(c + d*x))))/(3*d*e^4) + ((im/3)*b^2*PolyLog(2, -1 + 2/(1 - im*(c + d*x))))/(d*e^4)]
    @test_int [(a + b*atan(c + d*x))^2/(c*e + d*e*x)^5, x, 15, -b^2/(12*d*e^5*(c + d*x)^2) - (b*(a + b*atan(c + d*x)))/(6*d*e^5*(c + d*x)^3) + (b*(a + b*atan(c + d*x)))/(2*d*e^5*(c + d*x)) + (a + b*atan(c + d*x))^2/(4*d*e^5) - (a + b*atan(c + d*x))^2/(4*d*e^5*(c + d*x)^4) - (2*b^2*log(c + d*x))/(3*d*e^5) + (b^2*log(1 + (c + d*x)^2))/(3*d*e^5)]


    @test_int [(c*e + d*e*x)^2*(a + b*atan(c + d*x))^3, x, 14, a*b^2*e^2*x + (b^3*e^2*(c + d*x)*atan(c + d*x))/d - (b*e^2*(a + b*atan(c + d*x))^2)/(2*d) - (b*e^2*(c + d*x)^2*(a + b*atan(c + d*x))^2)/(2*d) - ((im/3)*e^2*(a + b*atan(c + d*x))^3)/d + (e^2*(c + d*x)^3*(a + b*atan(c + d*x))^3)/(3*d) - (b*e^2*(a + b*atan(c + d*x))^2*log(2/(1 + im*(c + d*x))))/d - (b^3*e^2*log(1 + (c + d*x)^2))/(2*d) - (im*b^2*e^2*(a + b*atan(c + d*x))*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/d - (b^3*e^2*PolyLog(3, 1 - 2/(1 + im*(c + d*x))))/(2*d)]
    @test_int [(c*e + d*e*x)^1*(a + b*atan(c + d*x))^3, x, 10, (((-3*im)/2)*b*e*(a + b*atan(c + d*x))^2)/d - (3*b*e*(c + d*x)*(a + b*atan(c + d*x))^2)/(2*d) + (e*(a + b*atan(c + d*x))^3)/(2*d) + (e*(c + d*x)^2*(a + b*atan(c + d*x))^3)/(2*d) - (3*b^2*e*(a + b*atan(c + d*x))*log(2/(1 + im*(c + d*x))))/d - (((3*im)/2)*b^3*e*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/d]
    @test_int [(a + b*atan(c + d*x))^3/(c*e + d*e*x)^1, x, 10, (2*(a + b*atan(c + d*x))^3*atanh(1 - 2/(1 + im*(c + d*x))))/(d*e) - (((3*im)/2)*b*(a + b*atan(c + d*x))^2*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/(d*e) + (((3*im)/2)*b*(a + b*atan(c + d*x))^2*PolyLog(2, -1 + 2/(1 + im*(c + d*x))))/(d*e) - (3*b^2*(a + b*atan(c + d*x))*PolyLog(3, 1 - 2/(1 + im*(c + d*x))))/(2*d*e) + (3*b^2*(a + b*atan(c + d*x))*PolyLog(3, -1 + 2/(1 + im*(c + d*x))))/(2*d*e) + (((3*im)/4)*b^3*PolyLog(4, 1 - 2/(1 + im*(c + d*x))))/(d*e) - (((3*im)/4)*b^3*PolyLog(4, -1 + 2/(1 + im*(c + d*x))))/(d*e)]
    @test_int [(a + b*atan(c + d*x))^3/(c*e + d*e*x)^2, x, 7, ((-im)*(a + b*atan(c + d*x))^3)/(d*e^2) - (a + b*atan(c + d*x))^3/(d*e^2*(c + d*x)) + (3*b*(a + b*atan(c + d*x))^2*log(2 - 2/(1 - im*(c + d*x))))/(d*e^2) - ((3*im)*b^2*(a + b*atan(c + d*x))*PolyLog(2, -1 + 2/(1 - im*(c + d*x))))/(d*e^2) + (3*b^3*PolyLog(3, -1 + 2/(1 - im*(c + d*x))))/(2*d*e^2)]
    @test_int [(a + b*atan(c + d*x))^3/(c*e + d*e*x)^3, x, 9, (((-3*im)/2)*b*(a + b*atan(c + d*x))^2)/(d*e^3) - (3*b*(a + b*atan(c + d*x))^2)/(2*d*e^3*(c + d*x)) - (a + b*atan(c + d*x))^3/(2*d*e^3) - (a + b*atan(c + d*x))^3/(2*d*e^3*(c + d*x)^2) + (3*b^2*(a + b*atan(c + d*x))*log(2 - 2/(1 - im*(c + d*x))))/(d*e^3) - (((3*im)/2)*b^3*PolyLog(2, -1 + 2/(1 - im*(c + d*x))))/(d*e^3)]
    @test_int [(a + b*atan(c + d*x))^3/(c*e + d*e*x)^4, x, 16, -((b^2*(a + b*atan(c + d*x)))/(d*e^4*(c + d*x))) - (b*(a + b*atan(c + d*x))^2)/(2*d*e^4) - (b*(a + b*atan(c + d*x))^2)/(2*d*e^4*(c + d*x)^2) + ((im/3)*(a + b*atan(c + d*x))^3)/(d*e^4) - (a + b*atan(c + d*x))^3/(3*d*e^4*(c + d*x)^3) + (b^3*log(c + d*x))/(d*e^4) - (b^3*log(1 + (c + d*x)^2))/(2*d*e^4) - (b*(a + b*atan(c + d*x))^2*log(2 - 2/(1 - im*(c + d*x))))/(d*e^4) + (im*b^2*(a + b*atan(c + d*x))*PolyLog(2, -1 + 2/(1 - im*(c + d*x))))/(d*e^4) - (b^3*PolyLog(3, -1 + 2/(1 - im*(c + d*x))))/(2*d*e^4)]


    @test_int [atan(1 + x)/(2 + 2*x), x, 5, (1/4)*im*PolyLog(2, (-im)*(1 + x)) - (1/4)*im*PolyLog(2, im*(1 + x))]


    @test_int [atan(a + b*x)/((a*d)/b + d*x), x, 5, (im*PolyLog(2, (-im)*(a + b*x)))/(2*d) - (im*PolyLog(2, im*(a + b*x)))/(2*d)]


    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(e+f*x)^m*(a+b*atan(c+d*x))^(p/2)*when*d*e-c*f=0=#


    @test_int [(a + b*x)^2*atan(a + b*x)^(1/2), x, 0, Unintegrable((a + b*x)^2*sqrt(atan(a + b*x)), x)]


    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(e+f*x)^m*(a+b*atan(c+d*x))^p=#


    @test_int [(e + f*x)^3*(a + b*atan(c + d*x)), x, 7, -((b*f*(6*d^2*e^2 - 12*c*d*e*f - (1 - 6*c^2)*f^2)*x)/(4*d^3)) - (b*f^2*(d*e - c*f)*(c + d*x)^2)/(2*d^4) - (b*f^3*(c + d*x)^3)/(12*d^4) - (b*(d^4*e^4 - 4*c*d^3*e^3*f - 6*(1 - c^2)*d^2*e^2*f^2 + 4*c*(3 - c^2)*d*e*f^3 + (1 - 6*c^2 + c^4)*f^4)*atan(c + d*x))/(4*d^4*f) + ((e + f*x)^4*(a + b*atan(c + d*x)))/(4*f) - (b*(d*e - c*f)*(d*e + f - c*f)*(d*e - (1 + c)*f)*log(1 + (c + d*x)^2))/(2*d^4)]
    @test_int [(e + f*x)^2*(a + b*atan(c + d*x)), x, 7, -((b*f*(d*e - c*f)*x)/d^2) - (b*f^2*(c + d*x)^2)/(6*d^3) - (b*(d*e - c*f)*(d^2*e^2 - 2*c*d*e*f - (3 - c^2)*f^2)*atan(c + d*x))/(3*d^3*f) + ((e + f*x)^3*(a + b*atan(c + d*x)))/(3*f) - (b*(3*d^2*e^2 - 6*c*d*e*f - (1 - 3*c^2)*f^2)*log(1 + (c + d*x)^2))/(6*d^3)]
    @test_int [(e + f*x)^1*(a + b*atan(c + d*x)), x, 7, -((b*f*x)/(2*d)) - (b*(d*e + f - c*f)*(d*e - (1 + c)*f)*atan(c + d*x))/(2*d^2*f) + ((e + f*x)^2*(a + b*atan(c + d*x)))/(2*f) - (b*(d*e - c*f)*log(1 + (c + d*x)^2))/(2*d^2)]
    @test_int [(e + f*x)^0*(a + b*atan(c + d*x)), x, 4, a*x + (b*(c + d*x)*atan(c + d*x))/d - (b*log(1 + (c + d*x)^2))/(2*d)]
    @test_int [(a + b*atan(c + d*x))/(e + f*x)^1, x, 5, -(((a + b*atan(c + d*x))*log(2/(1 - im*(c + d*x))))/f) + ((a + b*atan(c + d*x))*log((2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/f + (im*b*PolyLog(2, 1 - 2/(1 - im*(c + d*x))))/(2*f) - (im*b*PolyLog(2, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(2*f)]
    @test_int [(a + b*atan(c + d*x))/(e + f*x)^2, x, 8, (b*d*(d*e - c*f)*atan(c + d*x))/(f*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)) - (a + b*atan(c + d*x))/(f*(e + f*x)) + (b*d*log(e + f*x))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) - (b*d*log(1 + c^2 + 2*c*d*x + d^2*x^2))/(2*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2))]
    @test_int [(a + b*atan(c + d*x))/(e + f*x)^3, x, 9, -((b*d)/(2*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)*(e + f*x))) + (b*d^2*(d*e + f - c*f)*(d*e - (1 + c)*f)*atan(c + d*x))/(2*f*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)^2) - (a + b*atan(c + d*x))/(2*f*(e + f*x)^2) + (b*d^2*(d*e - c*f)*log(e + f*x))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)^2 - (b*d^2*(d*e - c*f)*log(1 + c^2 + 2*c*d*x + d^2*x^2))/(2*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)^2)]


    @test_int [(e + f*x)^2*(a + b*atan(c + d*x))^2, x, 16, (b^2*f^2*x)/(3*d^2) - (2*a*b*f*(d*e - c*f)*x)/d^2 - (b^2*f^2*atan(c + d*x))/(3*d^3) - (2*b^2*f*(d*e - c*f)*(c + d*x)*atan(c + d*x))/d^3 - (b*f^2*(c + d*x)^2*(a + b*atan(c + d*x)))/(3*d^3) + (im*(3*d^2*e^2 - 6*c*d*e*f - (1 - 3*c^2)*f^2)*(a + b*atan(c + d*x))^2)/(3*d^3) - ((d*e - c*f)*(d^2*e^2 - 2*c*d*e*f - (3 - c^2)*f^2)*(a + b*atan(c + d*x))^2)/(3*d^3*f) + ((e + f*x)^3*(a + b*atan(c + d*x))^2)/(3*f) + (2*b*(3*d^2*e^2 - 6*c*d*e*f - (1 - 3*c^2)*f^2)*(a + b*atan(c + d*x))*log(2/(1 + im*(c + d*x))))/(3*d^3) + (b^2*f*(d*e - c*f)*log(1 + (c + d*x)^2))/d^3 + (im*b^2*(3*d^2*e^2 - 6*c*d*e*f - (1 - 3*c^2)*f^2)*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/(3*d^3)]
    @test_int [(e + f*x)^1*(a + b*atan(c + d*x))^2, x, 13, -((a*b*f*x)/d) - (b^2*f*(c + d*x)*atan(c + d*x))/d^2 + (im*(d*e - c*f)*(a + b*atan(c + d*x))^2)/d^2 - ((d*e + f - c*f)*(d*e - (1 + c)*f)*(a + b*atan(c + d*x))^2)/(2*d^2*f) + ((e + f*x)^2*(a + b*atan(c + d*x))^2)/(2*f) + (2*b*(d*e - c*f)*(a + b*atan(c + d*x))*log(2/(1 + im*(c + d*x))))/d^2 + (b^2*f*log(1 + (c + d*x)^2))/(2*d^2) + (im*b^2*(d*e - c*f)*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/d^2]
    @test_int [(e + f*x)^0*(a + b*atan(c + d*x))^2, x, 6, (im*(a + b*atan(c + d*x))^2)/d + ((c + d*x)*(a + b*atan(c + d*x))^2)/d + (2*b*(a + b*atan(c + d*x))*log(2/(1 + im*(c + d*x))))/d + (im*b^2*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/d]
    @test_int [(a + b*atan(c + d*x))^2/(e + f*x)^1, x, 2, -(((a + b*atan(c + d*x))^2*log(2/(1 - im*(c + d*x))))/f) + ((a + b*atan(c + d*x))^2*log((2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/f + (im*b*(a + b*atan(c + d*x))*PolyLog(2, 1 - 2/(1 - im*(c + d*x))))/f - (im*b*(a + b*atan(c + d*x))*PolyLog(2, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/f - (b^2*PolyLog(3, 1 - 2/(1 - im*(c + d*x))))/(2*f) + (b^2*PolyLog(3, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(2*f)]
    @test_int [(a + b*atan(c + d*x))^2/(e + f*x)^2, x, 25, (2*a*b*d*(d*e - c*f)*atan(c + d*x))/(f*(f^2 + (d*e - c*f)^2)) + (im*b^2*d*atan(c + d*x)^2)/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (b^2*d*(d*e - c*f)*atan(c + d*x)^2)/(f*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)) - (a + b*atan(c + d*x))^2/(f*(e + f*x)) + (2*a*b*d*log(e + f*x))/(f^2 + (d*e - c*f)^2) - (2*b^2*d*atan(c + d*x)*log(2/(1 - im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (2*b^2*d*atan(c + d*x)*log((2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (2*b^2*d*atan(c + d*x)*log(2/(1 + im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) - (a*b*d*log(1 + (c + d*x)^2))/(f^2 + (d*e - c*f)^2) + (im*b^2*d*PolyLog(2, 1 - 2/(1 - im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) - (im*b^2*d*PolyLog(2, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (im*b^2*d*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)]


    @test_int [(e + f*x)^2*(a + b*atan(c + d*x))^3, x, 21, (a*b^2*f^2*x)/d^2 + (b^3*f^2*(c + d*x)*atan(c + d*x))/d^3 - (b*f^2*(a + b*atan(c + d*x))^2)/(2*d^3) - (3*im*b*f*(d*e - c*f)*(a + b*atan(c + d*x))^2)/d^3 - (3*b*f*(d*e - c*f)*(c + d*x)*(a + b*atan(c + d*x))^2)/d^3 - (b*f^2*(c + d*x)^2*(a + b*atan(c + d*x))^2)/(2*d^3) + (im*(3*d^2*e^2 - 6*c*d*e*f - (1 - 3*c^2)*f^2)*(a + b*atan(c + d*x))^3)/(3*d^3) - ((d*e - c*f)*(d^2*e^2 - 2*c*d*e*f - (3 - c^2)*f^2)*(a + b*atan(c + d*x))^3)/(3*d^3*f) + ((e + f*x)^3*(a + b*atan(c + d*x))^3)/(3*f) - (6*b^2*f*(d*e - c*f)*(a + b*atan(c + d*x))*log(2/(1 + im*(c + d*x))))/d^3 + (b*(3*d^2*e^2 - 6*c*d*e*f - (1 - 3*c^2)*f^2)*(a + b*atan(c + d*x))^2*log(2/(1 + im*(c + d*x))))/d^3 - (b^3*f^2*log(1 + (c + d*x)^2))/(2*d^3) - (3*im*b^3*f*(d*e - c*f)*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/d^3 + (im*b^2*(3*d^2*e^2 - 6*c*d*e*f - (1 - 3*c^2)*f^2)*(a + b*atan(c + d*x))*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/d^3 + (b^3*(3*d^2*e^2 - 6*c*d*e*f - (1 - 3*c^2)*f^2)*PolyLog(3, 1 - 2/(1 + im*(c + d*x))))/(2*d^3)]
    @test_int [(e + f*x)^1*(a + b*atan(c + d*x))^3, x, 15, -((3*im*b*f*(a + b*atan(c + d*x))^2)/(2*d^2)) - (3*b*f*(c + d*x)*(a + b*atan(c + d*x))^2)/(2*d^2) + (im*(d*e - c*f)*(a + b*atan(c + d*x))^3)/d^2 - ((d*e + f - c*f)*(d*e - (1 + c)*f)*(a + b*atan(c + d*x))^3)/(2*d^2*f) + ((e + f*x)^2*(a + b*atan(c + d*x))^3)/(2*f) - (3*b^2*f*(a + b*atan(c + d*x))*log(2/(1 + im*(c + d*x))))/d^2 + (3*b*(d*e - c*f)*(a + b*atan(c + d*x))^2*log(2/(1 + im*(c + d*x))))/d^2 - (3*im*b^3*f*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/(2*d^2) + (3*im*b^2*(d*e - c*f)*(a + b*atan(c + d*x))*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/d^2 + (3*b^3*(d*e - c*f)*PolyLog(3, 1 - 2/(1 + im*(c + d*x))))/(2*d^2)]
    @test_int [(e + f*x)^0*(a + b*atan(c + d*x))^3, x, 6, (im*(a + b*atan(c + d*x))^3)/d + ((c + d*x)*(a + b*atan(c + d*x))^3)/d + (3*b*(a + b*atan(c + d*x))^2*log(2/(1 + im*(c + d*x))))/d + (3*im*b^2*(a + b*atan(c + d*x))*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/d + (3*b^3*PolyLog(3, 1 - 2/(1 + im*(c + d*x))))/(2*d)]
    @test_int [(a + b*atan(c + d*x))^3/(e + f*x)^1, x, 2, -(((a + b*atan(c + d*x))^3*log(2/(1 - im*(c + d*x))))/f) + ((a + b*atan(c + d*x))^3*log((2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/f + (3*im*b*(a + b*atan(c + d*x))^2*PolyLog(2, 1 - 2/(1 - im*(c + d*x))))/(2*f) - (3*im*b*(a + b*atan(c + d*x))^2*PolyLog(2, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(2*f) - (3*b^2*(a + b*atan(c + d*x))*PolyLog(3, 1 - 2/(1 - im*(c + d*x))))/(2*f) + (3*b^2*(a + b*atan(c + d*x))*PolyLog(3, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(2*f) - (3*im*b^3*PolyLog(4, 1 - 2/(1 - im*(c + d*x))))/(4*f) + (3*im*b^3*PolyLog(4, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(4*f)]
    @test_int [(a + b*atan(c + d*x))^3/(e + f*x)^2, x, 35, (3*a^2*b*d*(d*e - c*f)*atan(c + d*x))/(f*(f^2 + (d*e - c*f)^2)) + (3*im*a*b^2*d*atan(c + d*x)^2)/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (3*a*b^2*d*(d*e - c*f)*atan(c + d*x)^2)/(f*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)) + (im*b^3*d*atan(c + d*x)^3)/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (b^3*d*(d*e - c*f)*atan(c + d*x)^3)/(f*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)) - (a + b*atan(c + d*x))^3/(f*(e + f*x)) + (3*a^2*b*d*log(e + f*x))/(f^2 + (d*e - c*f)^2) - (6*a*b^2*d*atan(c + d*x)*log(2/(1 - im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) - (3*b^3*d*atan(c + d*x)^2*log(2/(1 - im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (6*a*b^2*d*atan(c + d*x)*log((2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (3*b^3*d*atan(c + d*x)^2*log((2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (6*a*b^2*d*atan(c + d*x)*log(2/(1 + im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (3*b^3*d*atan(c + d*x)^2*log(2/(1 + im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) - (3*a^2*b*d*log(1 + (c + d*x)^2))/(2*(f^2 + (d*e - c*f)^2)) + (3*im*a*b^2*d*PolyLog(2, 1 - 2/(1 - im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (3*im*b^3*d*atan(c + d*x)*PolyLog(2, 1 - 2/(1 - im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) - (3*im*a*b^2*d*PolyLog(2, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) - (3*im*b^3*d*atan(c + d*x)*PolyLog(2, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (3*im*a*b^2*d*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) + (3*im*b^3*d*atan(c + d*x)*PolyLog(2, 1 - 2/(1 + im*(c + d*x))))/(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2) - (3*b^3*d*PolyLog(3, 1 - 2/(1 - im*(c + d*x))))/(2*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)) + (3*b^3*d*PolyLog(3, 1 - (2*d*(e + f*x))/((d*e + im*f - c*f)*(1 - im*(c + d*x)))))/(2*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2)) + (3*b^3*d*PolyLog(3, 1 - 2/(1 + im*(c + d*x))))/(2*(d^2*e^2 - 2*c*d*e*f + (1 + c^2)*f^2))]


    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(e+f*x)^m*(a+b*atan(c+d*x))^p*with*m*symbolic=#


    @test_int [(e + f*x)^m*(a + b*atan(c + d*x))^1, x, 6, ((e + f*x)^(1 + m)*(a + b*atan(c + d*x)))/(f*(1 + m)) - (im*b*d*(e + f*x)^(2 + m)*HypergeometricFunctions._₂F₁(1, 2 + m, 3 + m, (d*(e + f*x))/(d*e + im*f - c*f)))/(2*f*(d*e + (im - c)*f)*(1 + m)*(2 + m)) + (im*b*d*(e + f*x)^(2 + m)*HypergeometricFunctions._₂F₁(1, 2 + m, 3 + m, (d*(e + f*x))/(d*e - (im + c)*f)))/(2*f*(d*e - (im + c)*f)*(1 + m)*(2 + m))]
    @test_int [(e + f*x)^m*(a + b*atan(c + d*x))^2, x, 1, Unintegrable((e + f*x)^m*(a + b*atan(c + d*x))^2, x)]
    @test_int [(e + f*x)^m*(a + b*atan(c + d*x))^3, x, 1, Unintegrable((e + f*x)^m*(a + b*atan(c + d*x))^3, x)]


    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*AF(x)*(a+b*atan(c+d*x))^p=#


    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*x^m*atan(a+b*x)^p=#


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


    @test_int [x^3*atan(a + b*x), x, 7, ((1 - 6*a^2)*x)/(4*b^3) + (a*(a + b*x)^2)/(2*b^4) - (a + b*x)^3/(12*b^4) - ((1 - 6*a^2 + a^4)*atan(a + b*x))/(4*b^4) + (1/4)*x^4*atan(a + b*x) - (a*(1 - a^2)*log(1 + (a + b*x)^2))/(2*b^4)]
    @test_int [x^2*atan(a + b*x), x, 7, (a*x)/b^2 - (a + b*x)^2/(6*b^3) - (a*(3 - a^2)*atan(a + b*x))/(3*b^3) + (1/3)*x^3*atan(a + b*x) + ((1 - 3*a^2)*log(1 + (a + b*x)^2))/(6*b^3)]
    @test_int [x^1*atan(a + b*x), x, 7, -(x/(2*b)) + ((1 - a^2)*atan(a + b*x))/(2*b^2) + (1/2)*x^2*atan(a + b*x) + (a*log(1 + (a + b*x)^2))/(2*b^2)]
    @test_int [x^0*atan(a + b*x), x, 3, ((a + b*x)*atan(a + b*x))/b - log(1 + (a + b*x)^2)/(2*b)]
    @test_int [atan(a + b*x)/x^1, x, 5, (-atan(a + b*x))*log(2/(1 - im*(a + b*x))) + atan(a + b*x)*log((2*b*x)/((im - a)*(1 - im*(a + b*x)))) + (1/2)*im*PolyLog(2, 1 - 2/(1 - im*(a + b*x))) - (1/2)*im*PolyLog(2, 1 - (2*b*x)/((im - a)*(1 - im*(a + b*x))))]
    @test_int [atan(a + b*x)/x^2, x, 7, -((a*b*atan(a + b*x))/(1 + a^2)) - atan(a + b*x)/x + (b*log(x))/(1 + a^2) - (b*log(1 + (a + b*x)^2))/(2*(1 + a^2))]
    @test_int [atan(a + b*x)/x^3, x, 8, -(b/(2*(1 + a^2)*x)) - ((1 - a^2)*b^2*atan(a + b*x))/(2*(1 + a^2)^2) - atan(a + b*x)/(2*x^2) - (a*b^2*log(x))/(1 + a^2)^2 + (a*b^2*log(1 + (a + b*x)^2))/(2*(1 + a^2)^2)]
    @test_int [atan(a + b*x)/x^4, x, 8, -(b/(6*(1 + a^2)*x^2)) + (2*a*b^2)/(3*(1 + a^2)^2*x) + (a*(3 - a^2)*b^3*atan(a + b*x))/(3*(1 + a^2)^3) - atan(a + b*x)/(3*x^3) - ((1 - 3*a^2)*b^3*log(x))/(3*(1 + a^2)^3) + ((1 - 3*a^2)*b^3*log(1 + (a + b*x)^2))/(6*(1 + a^2)^3)]


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


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


    @test_int [atan(a + b*x)/(c + d*x^3), x, 23, -((im*log(1 + im*a + im*b*x)*log((b*(c^(1/3) + d^(1/3)*x))/(b*c^(1/3) + (im - a)*d^(1/3))))/(6*c^(2/3)*d^(1/3))) + (im*log(1 - im*a - im*b*x)*log((b*(c^(1/3) + d^(1/3)*x))/(b*c^(1/3) - (im + a)*d^(1/3))))/(6*c^(2/3)*d^(1/3)) + ((-1)^(1/6)*log(1 + im*a + im*b*x)*log((b*(c^(1/3) - (-1)^(1/3)*d^(1/3)*x))/(b*c^(1/3) - (-1)^(1/3)*(im - a)*d^(1/3))))/(6*c^(2/3)*d^(1/3)) - ((-1)^(1/6)*log(1 - im*a - im*b*x)*log((b*(c^(1/3) - (-1)^(1/3)*d^(1/3)*x))/(b*c^(1/3) + (-1)^(1/3)*(im + a)*d^(1/3))))/(6*c^(2/3)*d^(1/3)) + ((-1)^(5/6)*log(1 + im*a + im*b*x)*log((b*(c^(1/3) + (-1)^(2/3)*d^(1/3)*x))/(b*c^(1/3) + (-1)^(2/3)*(im - a)*d^(1/3))))/(6*c^(2/3)*d^(1/3)) - ((-1)^(5/6)*log(1 - im*a - im*b*x)*log((b*(c^(1/3) + (-1)^(2/3)*d^(1/3)*x))/(b*c^(1/3) + (-1)^(1/6)*(1 - im*a)*d^(1/3))))/(6*c^(2/3)*d^(1/3)) - (im*PolyLog(2, (d^(1/3)*(im - a - b*x))/(b*c^(1/3) + (im - a)*d^(1/3))))/(6*c^(2/3)*d^(1/3)) + ((-1)^(5/6)*PolyLog(2, -(((-1)^(1/6)*d^(1/3)*(im - a - b*x))/(im*b*c^(1/3) - (-1)^(1/6)*(im - a)*d^(1/3)))))/(6*c^(2/3)*d^(1/3)) + ((-1)^(1/6)*PolyLog(2, -(((-1)^(1/3)*d^(1/3)*(im - a - b*x))/(b*c^(1/3) - (-1)^(1/3)*(im - a)*d^(1/3)))))/(6*c^(2/3)*d^(1/3)) + (im*PolyLog(2, -((d^(1/3)*(im + a + b*x))/(b*c^(1/3) - (im + a)*d^(1/3)))))/(6*c^(2/3)*d^(1/3)) - ((-1)^(1/6)*PolyLog(2, ((-1)^(1/3)*d^(1/3)*(im + a + b*x))/(b*c^(1/3) + (-1)^(1/3)*(im + a)*d^(1/3))))/(6*c^(2/3)*d^(1/3)) - ((-1)^(5/6)*PolyLog(2, -(((-1)^(2/3)*d^(1/3)*(im + a + b*x))/(b*c^(1/3) - (-1)^(2/3)*(im + a)*d^(1/3)))))/(6*c^(2/3)*d^(1/3))]
    @test_int [atan(a + b*x)/(c + d*x^2), x, 17, -((im*log(1 + im*a + im*b*x)*log((b*(sqrt(-c) - sqrt(d)*x))/(b*sqrt(-c) - (im - a)*sqrt(d))))/(4*sqrt(-c)*sqrt(d))) + (im*log(1 - im*a - im*b*x)*log((b*(sqrt(-c) - sqrt(d)*x))/(b*sqrt(-c) + (im + a)*sqrt(d))))/(4*sqrt(-c)*sqrt(d)) + (im*log(1 + im*a + im*b*x)*log((b*(sqrt(-c) + sqrt(d)*x))/(b*sqrt(-c) + (im - a)*sqrt(d))))/(4*sqrt(-c)*sqrt(d)) - (im*log(1 - im*a - im*b*x)*log((b*(sqrt(-c) + sqrt(d)*x))/(b*sqrt(-c) - (im + a)*sqrt(d))))/(4*sqrt(-c)*sqrt(d)) - (im*PolyLog(2, -((sqrt(d)*(im - a - b*x))/(b*sqrt(-c) - (im - a)*sqrt(d)))))/(4*sqrt(-c)*sqrt(d)) + (im*PolyLog(2, (sqrt(d)*(im - a - b*x))/(b*sqrt(-c) + (im - a)*sqrt(d))))/(4*sqrt(-c)*sqrt(d)) - (im*PolyLog(2, -((sqrt(d)*(im + a + b*x))/(b*sqrt(-c) - (im + a)*sqrt(d)))))/(4*sqrt(-c)*sqrt(d)) + (im*PolyLog(2, (sqrt(d)*(im + a + b*x))/(b*sqrt(-c) + (im + a)*sqrt(d))))/(4*sqrt(-c)*sqrt(d))]
    @test_int [atan(a + b*x)/(c + d*x), x, 5, -((atan(a + b*x)*log(2/(1 - im*(a + b*x))))/d) + (atan(a + b*x)*log((2*b*(c + d*x))/((b*c + im*d - a*d)*(1 - im*(a + b*x)))))/d + (im*PolyLog(2, 1 - 2/(1 - im*(a + b*x))))/(2*d) - (im*PolyLog(2, 1 - (2*b*(c + d*x))/((b*c + im*d - a*d)*(1 - im*(a + b*x)))))/(2*d)]
    @test_int [atan(a + b*x)/(c + d/x), x, 15, -(((1 + im*a + im*b*x)*log(1 + im*a + im*b*x))/(2*b*c)) - ((1 - im*a - im*b*x)*log((-im)*(im + a + b*x)))/(2*b*c) - (im*d*log(1 - im*a - im*b*x)*log(-((b*(d + c*x))/((im + a)*c - b*d))))/(2*c^2) + (im*d*log(1 + im*a + im*b*x)*log((b*(d + c*x))/((im - a)*c + b*d)))/(2*c^2) + (im*d*PolyLog(2, (c*(im - a - b*x))/(im*c - a*c + b*d)))/(2*c^2) - (im*d*PolyLog(2, (c*(im + a + b*x))/((im + a)*c - b*d)))/(2*c^2)]
    @test_int [atan(a + b*x)/(c + d/x^2), x, 25, -(((1 + im*a + im*b*x)*log(1 + im*a + im*b*x))/(2*b*c)) - ((1 - im*a - im*b*x)*log((-im)*(im + a + b*x)))/(2*b*c) + (im*sqrt(d)*log(1 + im*a + im*b*x)*log(-((b*(sqrt(d) - sqrt(-c)*x))/(im*sqrt(-c) - a*sqrt(-c) - b*sqrt(d)))))/(4*(-c)^(3/2)) - (im*sqrt(d)*log(1 - im*a - im*b*x)*log((b*(sqrt(d) - sqrt(-c)*x))/(im*sqrt(-c) + a*sqrt(-c) + b*sqrt(d))))/(4*(-c)^(3/2)) + (im*sqrt(d)*log(1 - im*a - im*b*x)*log(-((b*(sqrt(d) + sqrt(-c)*x))/((im + a)*sqrt(-c) - b*sqrt(d)))))/(4*(-c)^(3/2)) - (im*sqrt(d)*log(1 + im*a + im*b*x)*log((b*(sqrt(d) + sqrt(-c)*x))/(im*sqrt(-c) - a*sqrt(-c) + b*sqrt(d))))/(4*(-c)^(3/2)) + (im*sqrt(d)*PolyLog(2, (sqrt(-c)*(im - a - b*x))/(im*sqrt(-c) - a*sqrt(-c) - b*sqrt(d))))/(4*(-c)^(3/2)) - (im*sqrt(d)*PolyLog(2, (sqrt(-c)*(1 + im*a + im*b*x))/((1 + im*a)*sqrt(-c) - im*b*sqrt(d))))/(4*(-c)^(3/2)) + (im*sqrt(d)*PolyLog(2, (sqrt(-c)*(im + a + b*x))/(im*sqrt(-c) + a*sqrt(-c) - b*sqrt(d))))/(4*(-c)^(3/2)) - (im*sqrt(d)*PolyLog(2, (sqrt(-c)*(im + a + b*x))/(im*sqrt(-c) + a*sqrt(-c) + b*sqrt(d))))/(4*(-c)^(3/2))]
    @test_int [atan(a + b*x)/(c + d/x^3), x, 31, -(((1 + im*a + im*b*x)*log(1 + im*a + im*b*x))/(2*b*c)) - ((1 - im*a - im*b*x)*log((-im)*(im + a + b*x)))/(2*b*c) - (im*d^(1/3)*log(1 - im*a - im*b*x)*log(-((b*(d^(1/3) + c^(1/3)*x))/((im + a)*c^(1/3) - b*d^(1/3)))))/(6*c^(4/3)) + (im*d^(1/3)*log(1 + im*a + im*b*x)*log((b*(d^(1/3) + c^(1/3)*x))/((im - a)*c^(1/3) + b*d^(1/3))))/(6*c^(4/3)) - ((-1)^(1/6)*d^(1/3)*log(1 + im*a + im*b*x)*log(-((b*(d^(1/3) - (-1)^(1/3)*c^(1/3)*x))/((-1)^(1/3)*(im - a)*c^(1/3) - b*d^(1/3)))))/(6*c^(4/3)) + ((-1)^(1/6)*d^(1/3)*log(1 - im*a - im*b*x)*log((b*(d^(1/3) - (-1)^(1/3)*c^(1/3)*x))/((-1)^(1/3)*(im + a)*c^(1/3) + b*d^(1/3))))/(6*c^(4/3)) - ((-1)^(5/6)*d^(1/3)*log(1 + im*a + im*b*x)*log((b*(d^(1/3) + (-1)^(2/3)*c^(1/3)*x))/((-1)^(2/3)*(im - a)*c^(1/3) + b*d^(1/3))))/(6*c^(4/3)) + ((-1)^(5/6)*d^(1/3)*log(1 - im*a - im*b*x)*log((b*(d^(1/3) + (-1)^(2/3)*c^(1/3)*x))/((-1)^(1/6)*(1 - im*a)*c^(1/3) + b*d^(1/3))))/(6*c^(4/3)) - ((-1)^(1/6)*d^(1/3)*PolyLog(2, ((-1)^(1/3)*c^(1/3)*(im - a - b*x))/((-1)^(1/3)*(im - a)*c^(1/3) - b*d^(1/3))))/(6*c^(4/3)) - ((-1)^(5/6)*d^(1/3)*PolyLog(2, ((-1)^(1/6)*c^(1/3)*(im - a - b*x))/((-1)^(1/6)*(im - a)*c^(1/3) - im*b*d^(1/3))))/(6*c^(4/3)) + (im*d^(1/3)*PolyLog(2, (c^(1/3)*(im - a - b*x))/((im - a)*c^(1/3) + b*d^(1/3))))/(6*c^(4/3)) - (im*d^(1/3)*PolyLog(2, (c^(1/3)*(im + a + b*x))/((im + a)*c^(1/3) - b*d^(1/3))))/(6*c^(4/3)) + ((-1)^(5/6)*d^(1/3)*PolyLog(2, ((-1)^(2/3)*c^(1/3)*(im + a + b*x))/((-1)^(2/3)*(im + a)*c^(1/3) - b*d^(1/3))))/(6*c^(4/3)) + ((-1)^(1/6)*d^(1/3)*PolyLog(2, ((-1)^(1/3)*c^(1/3)*(im + a + b*x))/((-1)^(1/3)*(im + a)*c^(1/3) + b*d^(1/3))))/(6*c^(4/3))]


    #= [atan(a + b*x)/(a + b*x^(3/2)), x, 41, ((im/3)*log(-a^(1/3) - b^(1/3)*sqrt(x))*log((sqrt(-im - a) - sqrt(b)*sqrt(x))/(sqrt(-im - a) + a^(1/3)*b^(1/6))))/(a^(1/3)*b^(2/3)) - ((-1)^(1/6)*log((-1)^(1/3)*a^(1/3) - b^(1/3)*sqrt(x))*log((sqrt(-im - a) - sqrt(b)*sqrt(x))/(sqrt(-im - a) - (-1)^(1/3)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) - ((-1)^(5/6)*log(-((-1)^(2/3)*a^(1/3)) - b^(1/3)*sqrt(x))*log((sqrt(-im - a) - sqrt(b)*sqrt(x))/(sqrt(-im - a) + (-1)^(2/3)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) + ((-1)^(1/6)*log((-1)^(1/3)*a^(1/3) - b^(1/3)*sqrt(x))*log(-(((-1)^(3/4)*((-1)^(1/4)*sqrt(1 + im*a) - sqrt(b)*sqrt(x)))/(sqrt(1 + im*a) - (-1)^(1/12)*a^(1/3)*b^(1/6)))))/(3*a^(1/3)*b^(2/3)) + ((-1)^(5/6)*log(-((-1)^(2/3)*a^(1/3)) - b^(1/3)*sqrt(x))*log(-(((-1)^(3/4)*((-1)^(1/4)*sqrt(1 + im*a) - sqrt(b)*sqrt(x)))/(sqrt(1 + im*a) + (-1)^(5/12)*a^(1/3)*b^(1/6)))))/(3*a^(1/3)*b^(2/3)) + ((im/3)*log(-a^(1/3) - b^(1/3)*sqrt(x))*log((sqrt(-im - a) + sqrt(b)*sqrt(x))/(sqrt(-im - a) - a^(1/3)*b^(1/6))))/(a^(1/3)*b^(2/3)) - ((-1)^(1/6)*log((-1)^(1/3)*a^(1/3) - b^(1/3)*sqrt(x))*log((sqrt(-im - a) + sqrt(b)*sqrt(x))/(sqrt(-im - a) + (-1)^(1/3)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) - ((-1)^(5/6)*log(-((-1)^(2/3)*a^(1/3)) - b^(1/3)*sqrt(x))*log((sqrt(-im - a) + sqrt(b)*sqrt(x))/(sqrt(-im - a) - (-1)^(2/3)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) - ((im/3)*log(-a^(1/3) - b^(1/3)*sqrt(x))*log(((-1)^(1/4)*sqrt(1 + im*a) + sqrt(b)*sqrt(x))/((-1)^(1/4)*sqrt(1 + im*a) - a^(1/3)*b^(1/6))))/(a^(1/3)*b^(2/3)) + ((-1)^(1/6)*log((-1)^(1/3)*a^(1/3) - b^(1/3)*sqrt(x))*log((sqrt(1 + im*a) - (-1)^(3/4)*sqrt(b)*sqrt(x))/(sqrt(1 + im*a) + (-1)^(1/12)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) + ((-1)^(5/6)*log(-((-1)^(2/3)*a^(1/3)) - b^(1/3)*sqrt(x))*log((sqrt(1 + im*a) - (-1)^(3/4)*sqrt(b)*sqrt(x))/(sqrt(1 + im*a) - (-1)^(5/12)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) - ((im/3)*log(-a^(1/3) - b^(1/3)*sqrt(x))*log(((-1)^(1/4)*(sqrt(1 + im*a) + (-1)^(3/4)*sqrt(b)*sqrt(x)))/((-1)^(1/4)*sqrt(1 + im*a) + a^(1/3)*b^(1/6))))/(a^(1/3)*b^(2/3)) + ((im/3)*log(-a^(1/3) - b^(1/3)*sqrt(x))*log(1 + im*a + im*b*x))/(a^(1/3)*b^(2/3)) - ((-1)^(1/6)*log((-1)^(1/3)*a^(1/3) - b^(1/3)*sqrt(x))*log(1 + im*a + im*b*x))/(3*a^(1/3)*b^(2/3)) - ((-1)^(5/6)*log(-((-1)^(2/3)*a^(1/3)) - b^(1/3)*sqrt(x))*log(1 + im*a + im*b*x))/(3*a^(1/3)*b^(2/3)) - ((im/3)*log(-a^(1/3) - b^(1/3)*sqrt(x))*log((-im)*(im + a + b*x)))/(a^(1/3)*b^(2/3)) + ((-1)^(1/6)*log((-1)^(1/3)*a^(1/3) - b^(1/3)*sqrt(x))*log((-im)*(im + a + b*x)))/(3*a^(1/3)*b^(2/3)) + ((-1)^(5/6)*log(-((-1)^(2/3)*a^(1/3)) - b^(1/3)*sqrt(x))*log((-im)*(im + a + b*x)))/(3*a^(1/3)*b^(2/3)) - ((-1)^(1/6)*PolyLog(2, -((b^(1/6)*((-1)^(1/3)*a^(1/3) - b^(1/3)*sqrt(x)))/(sqrt(-im - a) - (-1)^(1/3)*a^(1/3)*b^(1/6)))))/(3*a^(1/3)*b^(2/3)) + ((im/3)*PolyLog(2, -((b^(1/6)*(a^(1/3) + b^(1/3)*sqrt(x)))/(sqrt(-im - a) - a^(1/3)*b^(1/6)))))/(a^(1/3)*b^(2/3)) - ((im/3)*PolyLog(2, -((b^(1/6)*(a^(1/3) + b^(1/3)*sqrt(x)))/((-1)^(1/4)*sqrt(1 + im*a) - a^(1/3)*b^(1/6)))))/(a^(1/3)*b^(2/3)) + ((im/3)*PolyLog(2, (b^(1/6)*(a^(1/3) + b^(1/3)*sqrt(x)))/(sqrt(-im - a) + a^(1/3)*b^(1/6))))/(a^(1/3)*b^(2/3)) - ((im/3)*PolyLog(2, (b^(1/6)*(a^(1/3) + b^(1/3)*sqrt(x)))/((-1)^(1/4)*sqrt(1 + im*a) + a^(1/3)*b^(1/6))))/(a^(1/3)*b^(2/3)) + ((-1)^(5/6)*PolyLog(2, ((-1)^(3/4)*b^(1/6)*((-1)^(2/3)*a^(1/3) + b^(1/3)*sqrt(x)))/(sqrt(1 + im*a) - (-1)^(5/12)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) - ((-1)^(5/6)*PolyLog(2, -((b^(1/6)*((-1)^(2/3)*a^(1/3) + b^(1/3)*sqrt(x)))/(sqrt(-im - a) - (-1)^(2/3)*a^(1/3)*b^(1/6)))))/(3*a^(1/3)*b^(2/3)) - ((-1)^(5/6)*PolyLog(2, (b^(1/6)*((-1)^(2/3)*a^(1/3) + b^(1/3)*sqrt(x)))/(sqrt(-im - a) + (-1)^(2/3)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) + ((-1)^(5/6)*PolyLog(2, ((-1)^(5/12)*b^(1/6)*(a^(1/3) - (-1)^(1/3)*b^(1/3)*sqrt(x)))/(sqrt(1 + im*a) + (-1)^(5/12)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) + ((-1)^(1/6)*PolyLog(2, ((-1)^(1/12)*b^(1/6)*(a^(1/3) + (-1)^(2/3)*b^(1/3)*sqrt(x)))/(sqrt(1 + im*a) + (-1)^(1/12)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) - ((-1)^(1/6)*PolyLog(2, ((-1)^(1/3)*b^(1/6)*(a^(1/3) + (-1)^(2/3)*b^(1/3)*sqrt(x)))/(sqrt(-im - a) + (-1)^(1/3)*a^(1/3)*b^(1/6))))/(3*a^(1/3)*b^(2/3)) + ((-1)^(1/6)*PolyLog(2, -((b^(1/6)*((-1)^(1/12)*a^(1/3) + (-1)^(3/4)*b^(1/3)*sqrt(x)))/(sqrt(1 + im*a) - (-1)^(1/12)*a^(1/3)*b^(1/6)))))/(3*a^(1/3)*b^(2/3))] =#
    @test_int [atan(a + b*x)/(c + d*sqrt(x)), x, 31, (2*im*sqrt(im + a)*atan((sqrt(b)*sqrt(x))/sqrt(im + a)))/(sqrt(b)*d) - (2*im*sqrt(im - a)*atanh((sqrt(b)*sqrt(x))/sqrt(im - a)))/(sqrt(b)*d) + (im*c*log((d*(sqrt(-im - a) - sqrt(b)*sqrt(x)))/(sqrt(b)*c + sqrt(-im - a)*d))*log(c + d*sqrt(x)))/d^2 - (im*c*log((d*(sqrt(im - a) - sqrt(b)*sqrt(x)))/(sqrt(b)*c + sqrt(im - a)*d))*log(c + d*sqrt(x)))/d^2 + (im*c*log(-((d*(sqrt(-im - a) + sqrt(b)*sqrt(x)))/(sqrt(b)*c - sqrt(-im - a)*d)))*log(c + d*sqrt(x)))/d^2 - (im*c*log(-((d*(sqrt(im - a) + sqrt(b)*sqrt(x)))/(sqrt(b)*c - sqrt(im - a)*d)))*log(c + d*sqrt(x)))/d^2 + (im*sqrt(x)*log(1 - im*a - im*b*x))/d - (im*c*log(c + d*sqrt(x))*log(1 - im*a - im*b*x))/d^2 - (im*sqrt(x)*log(1 + im*a + im*b*x))/d + (im*c*log(c + d*sqrt(x))*log(1 + im*a + im*b*x))/d^2 + (im*c*PolyLog(2, (sqrt(b)*(c + d*sqrt(x)))/(sqrt(b)*c - sqrt(-im - a)*d)))/d^2 + (im*c*PolyLog(2, (sqrt(b)*(c + d*sqrt(x)))/(sqrt(b)*c + sqrt(-im - a)*d)))/d^2 - (im*c*PolyLog(2, (sqrt(b)*(c + d*sqrt(x)))/(sqrt(b)*c - sqrt(im - a)*d)))/d^2 - (im*c*PolyLog(2, (sqrt(b)*(c + d*sqrt(x)))/(sqrt(b)*c + sqrt(im - a)*d)))/d^2]
    @test_int [atan(a + b*x)/(c + d/sqrt(x)), x, 37, -((2*im*sqrt(im + a)*d*atan((sqrt(b)*sqrt(x))/sqrt(im + a)))/(sqrt(b)*c^2)) + (2*im*sqrt(im - a)*d*atanh((sqrt(b)*sqrt(x))/sqrt(im - a)))/(sqrt(b)*c^2) - (im*d^2*log((c*(sqrt(-im - a) - sqrt(b)*sqrt(x)))/(sqrt(-im - a)*c + sqrt(b)*d))*log(d + c*sqrt(x)))/c^3 + (im*d^2*log((c*(sqrt(im - a) - sqrt(b)*sqrt(x)))/(sqrt(im - a)*c + sqrt(b)*d))*log(d + c*sqrt(x)))/c^3 - (im*d^2*log((c*(sqrt(-im - a) + sqrt(b)*sqrt(x)))/(sqrt(-im - a)*c - sqrt(b)*d))*log(d + c*sqrt(x)))/c^3 + (im*d^2*log((c*(sqrt(im - a) + sqrt(b)*sqrt(x)))/(sqrt(im - a)*c - sqrt(b)*d))*log(d + c*sqrt(x)))/c^3 - (im*d*sqrt(x)*log(1 - im*a - im*b*x))/c^2 + (im*d^2*log(d + c*sqrt(x))*log(1 - im*a - im*b*x))/c^3 + (im*d*sqrt(x)*log(1 + im*a + im*b*x))/c^2 - ((1 + im*a + im*b*x)*log(1 + im*a + im*b*x))/(2*b*c) - (im*d^2*log(d + c*sqrt(x))*log(1 + im*a + im*b*x))/c^3 - ((1 - im*a - im*b*x)*log((-im)*(im + a + b*x)))/(2*b*c) - (im*d^2*PolyLog(2, -((sqrt(b)*(d + c*sqrt(x)))/(sqrt(-im - a)*c - sqrt(b)*d))))/c^3 + (im*d^2*PolyLog(2, -((sqrt(b)*(d + c*sqrt(x)))/(sqrt(im - a)*c - sqrt(b)*d))))/c^3 - (im*d^2*PolyLog(2, (sqrt(b)*(d + c*sqrt(x)))/(sqrt(-im - a)*c + sqrt(b)*d)))/c^3 + (im*d^2*PolyLog(2, (sqrt(b)*(d + c*sqrt(x)))/(sqrt(im - a)*c + sqrt(b)*d)))/c^3]
    #= [atan(a + b*x)/(a + b/x^(3/2)), x, 49, -((-1)^(5/6)*b^(2/3)*log(-((-1)^(2/3)*b^(1/3)) - a^(1/3)*sqrt(x))*log(-(((-1)^(3/4)*a^(1/3)*((-1)^(1/4)*sqrt(1 + im*a) - sqrt(b)*sqrt(x)))/(sqrt(1 + im*a)*a^(1/3) + (-1)^(5/12)*b^(5/6)))))/(3*a^(5/3)) - ((im/3)*b^(2/3)*log(-b^(1/3) - a^(1/3)*sqrt(x))*log((a^(1/3)*((-1)^(3/4)*sqrt(1 - im*a) + sqrt(b)*sqrt(x)))/((-1)^(3/4)*sqrt(1 - im*a)*a^(1/3) - b^(5/6))))/a^(5/3) + ((im/3)*b^(2/3)*log(-b^(1/3) - a^(1/3)*sqrt(x))*log((a^(1/3)*((-1)^(1/4)*sqrt(1 + im*a) + sqrt(b)*sqrt(x)))/((-1)^(1/4)*sqrt(1 + im*a)*a^(1/3) - b^(5/6))))/a^(5/3) + ((-1)^(5/6)*b^(2/3)*log(-((-1)^(2/3)*b^(1/3)) - a^(1/3)*sqrt(x))*log(((-1)^(1/12)*a^(1/3)*(sqrt(1 - im*a) - (-1)^(1/4)*sqrt(b)*sqrt(x)))/((-1)^(1/12)*sqrt(1 - im*a)*a^(1/3) - b^(5/6))))/(3*a^(5/3)) + ((-1)^(1/6)*b^(2/3)*log((-1)^(1/3)*b^(1/3) - a^(1/3)*sqrt(x))*log(((-1)^(5/12)*a^(1/3)*(sqrt(1 - im*a) - (-1)^(1/4)*sqrt(b)*sqrt(x)))/((-1)^(5/12)*sqrt(1 - im*a)*a^(1/3) + b^(5/6))))/(3*a^(5/3)) + ((-1)^(1/6)*b^(2/3)*log((-1)^(1/3)*b^(1/3) - a^(1/3)*sqrt(x))*log(((-1)^(5/12)*a^(1/3)*(sqrt(1 - im*a) + (-1)^(1/4)*sqrt(b)*sqrt(x)))/((-1)^(5/12)*sqrt(1 - im*a)*a^(1/3) - b^(5/6))))/(3*a^(5/3)) + ((-1)^(5/6)*b^(2/3)*log(-((-1)^(2/3)*b^(1/3)) - a^(1/3)*sqrt(x))*log(((-1)^(1/12)*a^(1/3)*(sqrt(1 - im*a) + (-1)^(1/4)*sqrt(b)*sqrt(x)))/((-1)^(1/12)*sqrt(1 - im*a)*a^(1/3) + b^(5/6))))/(3*a^(5/3)) - ((im/3)*b^(2/3)*log(-b^(1/3) - a^(1/3)*sqrt(x))*log(((-1)^(3/4)*a^(1/3)*(sqrt(1 - im*a) + (-1)^(1/4)*sqrt(b)*sqrt(x)))/((-1)^(3/4)*sqrt(1 - im*a)*a^(1/3) + b^(5/6))))/a^(5/3) - ((-1)^(1/6)*b^(2/3)*log((-1)^(1/3)*b^(1/3) - a^(1/3)*sqrt(x))*log((a^(1/3)*(sqrt(1 + im*a) - (-1)^(3/4)*sqrt(b)*sqrt(x)))/(sqrt(1 + im*a)*a^(1/3) + (-1)^(1/12)*b^(5/6))))/(3*a^(5/3)) - ((-1)^(5/6)*b^(2/3)*log(-((-1)^(2/3)*b^(1/3)) - a^(1/3)*sqrt(x))*log((a^(1/3)*(sqrt(1 + im*a) - (-1)^(3/4)*sqrt(b)*sqrt(x)))/(sqrt(1 + im*a)*a^(1/3) - (-1)^(5/12)*b^(5/6))))/(3*a^(5/3)) + ((im/3)*b^(2/3)*log(-b^(1/3) - a^(1/3)*sqrt(x))*log(((-1)^(1/4)*a^(1/3)*(sqrt(1 + im*a) + (-1)^(3/4)*sqrt(b)*sqrt(x)))/((-1)^(1/4)*sqrt(1 + im*a)*a^(1/3) + b^(5/6))))/a^(5/3) - ((-1)^(1/6)*b^(2/3)*log((-1)^(1/3)*b^(1/3) - a^(1/3)*sqrt(x))*log((a^(1/3)*(sqrt(1 + im*a) + (-1)^(3/4)*sqrt(b)*sqrt(x)))/(sqrt(1 + im*a)*a^(1/3) - (-1)^(1/12)*b^(5/6))))/(3*a^(5/3)) - ((1 - im*a - im*b*x)*log(1 - im*a - im*b*x))/(2*a*b) + ((im/3)*b^(2/3)*log(-b^(1/3) - a^(1/3)*sqrt(x))*log(1 - im*a - im*b*x))/a^(5/3) - ((-1)^(1/6)*b^(2/3)*log((-1)^(1/3)*b^(1/3) - a^(1/3)*sqrt(x))*log(1 - im*a - im*b*x))/(3*a^(5/3)) - ((-1)^(5/6)*b^(2/3)*log(-((-1)^(2/3)*b^(1/3)) - a^(1/3)*sqrt(x))*log(1 - im*a - im*b*x))/(3*a^(5/3)) - ((1 + im*a + im*b*x)*log(1 + im*a + im*b*x))/(2*a*b) - ((im/3)*b^(2/3)*log(-b^(1/3) - a^(1/3)*sqrt(x))*log(1 + im*a + im*b*x))/a^(5/3) + ((-1)^(1/6)*b^(2/3)*log((-1)^(1/3)*b^(1/3) - a^(1/3)*sqrt(x))*log(1 + im*a + im*b*x))/(3*a^(5/3)) + ((-1)^(5/6)*b^(2/3)*log(-((-1)^(2/3)*b^(1/3)) - a^(1/3)*sqrt(x))*log(1 + im*a + im*b*x))/(3*a^(5/3)) - ((im/3)*b^(2/3)*PolyLog(2, -((sqrt(b)*(b^(1/3) + a^(1/3)*sqrt(x)))/((-1)^(3/4)*sqrt(1 - im*a)*a^(1/3) - b^(5/6)))))/a^(5/3) + ((im/3)*b^(2/3)*PolyLog(2, -((sqrt(b)*(b^(1/3) + a^(1/3)*sqrt(x)))/((-1)^(1/4)*sqrt(1 + im*a)*a^(1/3) - b^(5/6)))))/a^(5/3) - ((im/3)*b^(2/3)*PolyLog(2, (sqrt(b)*(b^(1/3) + a^(1/3)*sqrt(x)))/((-1)^(3/4)*sqrt(1 - im*a)*a^(1/3) + b^(5/6))))/a^(5/3) + ((im/3)*b^(2/3)*PolyLog(2, (sqrt(b)*(b^(1/3) + a^(1/3)*sqrt(x)))/((-1)^(1/4)*sqrt(1 + im*a)*a^(1/3) + b^(5/6))))/a^(5/3) + ((-1)^(5/6)*b^(2/3)*PolyLog(2, ((-1)^(1/3)*sqrt(b)*((-1)^(2/3)*b^(1/3) + a^(1/3)*sqrt(x)))/((-1)^(1/12)*sqrt(1 - im*a)*a^(1/3) - b^(5/6))))/(3*a^(5/3)) - ((-1)^(5/6)*b^(2/3)*PolyLog(2, ((-1)^(3/4)*sqrt(b)*((-1)^(2/3)*b^(1/3) + a^(1/3)*sqrt(x)))/(sqrt(1 + im*a)*a^(1/3) - (-1)^(5/12)*b^(5/6))))/(3*a^(5/3)) + ((-1)^(5/6)*b^(2/3)*PolyLog(2, (sqrt(b)*(b^(1/3) - (-1)^(1/3)*a^(1/3)*sqrt(x)))/((-1)^(1/12)*sqrt(1 - im*a)*a^(1/3) + b^(5/6))))/(3*a^(5/3)) - ((-1)^(5/6)*b^(2/3)*PolyLog(2, ((-1)^(5/12)*sqrt(b)*(b^(1/3) - (-1)^(1/3)*a^(1/3)*sqrt(x)))/(sqrt(1 + im*a)*a^(1/3) + (-1)^(5/12)*b^(5/6))))/(3*a^(5/3)) + ((-1)^(1/6)*b^(2/3)*PolyLog(2, -((sqrt(b)*(b^(1/3) + (-1)^(2/3)*a^(1/3)*sqrt(x)))/((-1)^(5/12)*sqrt(1 - im*a)*a^(1/3) - b^(5/6)))))/(3*a^(5/3)) + ((-1)^(1/6)*b^(2/3)*PolyLog(2, (sqrt(b)*(b^(1/3) + (-1)^(2/3)*a^(1/3)*sqrt(x)))/((-1)^(5/12)*sqrt(1 - im*a)*a^(1/3) + b^(5/6))))/(3*a^(5/3)) - ((-1)^(1/6)*b^(2/3)*PolyLog(2, ((-1)^(1/12)*sqrt(b)*(b^(1/3) + (-1)^(2/3)*a^(1/3)*sqrt(x)))/(sqrt(1 + im*a)*a^(1/3) + (-1)^(1/12)*b^(5/6))))/(3*a^(5/3)) - ((-1)^(1/6)*b^(2/3)*PolyLog(2, -((sqrt(b)*((-1)^(1/12)*b^(1/3) + (-1)^(3/4)*a^(1/3)*sqrt(x)))/(sqrt(1 + im*a)*a^(1/3) - (-1)^(1/12)*b^(5/6)))))/(3*a^(5/3))] =#


    @test_int [atan(a + b*x)/(1 + x^2), x, 17, (1/4)*log((b*(im - x))/(a + im*(1 + b)))*log(1 - im*a - im*b*x) - (1/4)*log(-((b*(im + x))/(a + im*(1 - b))))*log(1 - im*a - im*b*x) - (1/4)*log((b*(im - x))/(a - im*(1 - b)))*log(1 + im*a + im*b*x) + (1/4)*log(-((b*(im + x))/(a - im*(1 + b))))*log(1 + im*a + im*b*x) - (1/4)*PolyLog(2, -((im - a - b*x)/(a - im*(1 - b)))) + (1/4)*PolyLog(2, -((im - a - b*x)/(a - im*(1 + b)))) - (1/4)*PolyLog(2, (im + a + b*x)/(im + a - im*b)) + (1/4)*PolyLog(2, (im + a + b*x)/(a + im*(1 + b)))]


    @test_int [atan(d + e*x)/(a + b*x^2), x, 17, (im*log((e*(sqrt(-a) - sqrt(b)*x))/(sqrt(b)*(im + d) + sqrt(-a)*e))*log(1 - im*d - im*e*x))/(4*sqrt(-a)*sqrt(b)) - (im*log(-((e*(sqrt(-a) + sqrt(b)*x))/(sqrt(b)*(im + d) - sqrt(-a)*e)))*log(1 - im*d - im*e*x))/(4*sqrt(-a)*sqrt(b)) - (im*log(-((e*(sqrt(-a) - sqrt(b)*x))/(sqrt(b)*(im - d) - sqrt(-a)*e)))*log(1 + im*d + im*e*x))/(4*sqrt(-a)*sqrt(b)) + (im*log((e*(sqrt(-a) + sqrt(b)*x))/(sqrt(b)*(im - d) + sqrt(-a)*e))*log(1 + im*d + im*e*x))/(4*sqrt(-a)*sqrt(b)) - (im*PolyLog(2, (sqrt(b)*(im - d - e*x))/(sqrt(b)*(im - d) - sqrt(-a)*e)))/(4*sqrt(-a)*sqrt(b)) + (im*PolyLog(2, (sqrt(b)*(im - d - e*x))/(sqrt(b)*(im - d) + sqrt(-a)*e)))/(4*sqrt(-a)*sqrt(b)) - (im*PolyLog(2, (sqrt(b)*(im + d + e*x))/(sqrt(b)*(im + d) - sqrt(-a)*e)))/(4*sqrt(-a)*sqrt(b)) + (im*PolyLog(2, (sqrt(b)*(im + d + e*x))/(sqrt(b)*(im + d) + sqrt(-a)*e)))/(4*sqrt(-a)*sqrt(b))]


    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(A+B*x+C*x^2)^q*atan(a+b*x)=#


    @test_int [atan(d + e*x)/(a + b*x + c*x^2), x, 12, (atan(d + e*x)*log((2*e*(b - sqrt(b^2 - 4*a*c) + 2*c*x))/((2*c*(im - d) + (b - sqrt(b^2 - 4*a*c))*e)*(1 - im*(d + e*x)))))/sqrt(b^2 - 4*a*c) - (atan(d + e*x)*log((2*e*(b + sqrt(b^2 - 4*a*c) + 2*c*x))/((2*c*(im - d) + (b + sqrt(b^2 - 4*a*c))*e)*(1 - im*(d + e*x)))))/sqrt(b^2 - 4*a*c) - (im*PolyLog(2, 1 + (2*(2*c*d - (b - sqrt(b^2 - 4*a*c))*e - 2*c*(d + e*x)))/((2*im*c - 2*c*d + b*e - sqrt(b^2 - 4*a*c)*e)*(1 - im*(d + e*x)))))/(2*sqrt(b^2 - 4*a*c)) + (im*PolyLog(2, 1 + (2*(2*c*d - (b + sqrt(b^2 - 4*a*c))*e - 2*c*(d + e*x)))/((2*c*(im - d) + (b + sqrt(b^2 - 4*a*c))*e)*(1 - im*(d + e*x)))))/(2*sqrt(b^2 - 4*a*c))]


    @test_int [atan(a + b*x)/sqrt(1 + a^2 + 2*a*b*x + b^2*x^2), x, 2, -((2*im*atan(a + b*x)*atan(sqrt(1 + im*(a + b*x))/sqrt(1 - im*(a + b*x))))/b) + (im*PolyLog(2, -((im*sqrt(1 + im*(a + b*x)))/sqrt(1 - im*(a + b*x)))))/b - (im*PolyLog(2, (im*sqrt(1 + im*(a + b*x)))/sqrt(1 - im*(a + b*x))))/b]
    @test_int [atan(a + b*x)/sqrt((1 + a^2)*c + 2*a*b*c*x + b^2*c*x^2), x, 3, -((2*im*sqrt(1 + (a + b*x)^2)*atan(a + b*x)*atan(sqrt(1 + im*(a + b*x))/sqrt(1 - im*(a + b*x))))/(b*sqrt(c + c*(a + b*x)^2))) + (im*sqrt(1 + (a + b*x)^2)*PolyLog(2, -((im*sqrt(1 + im*(a + b*x)))/sqrt(1 - im*(a + b*x)))))/(b*sqrt(c + c*(a + b*x)^2)) - (im*sqrt(1 + (a + b*x)^2)*PolyLog(2, (im*sqrt(1 + im*(a + b*x)))/sqrt(1 - im*(a + b*x))))/(b*sqrt(c + c*(a + b*x)^2))]


    @test_int [atan(a + b*x)/(1 + a^2 + 2*a*b*x + b^2*x^2)^(1/3), x, 1, Unintegrable(atan(a + b*x)/(1 + (a + b*x)^2)^(1/3), x)]
    @test_int [atan(a + b*x)/((1 + a^2)*c + 2*a*b*c*x + b^2*c*x^2)^(1/3), x, 1, Unintegrable(atan(a + b*x)/(c + c*(a + b*x)^2)^(1/3), x)]


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


    @test_int [(a + b*x)^2*atan(a + b*x)/sqrt(1 + a^2 + 2*a*b*x + b^2*x^2), x, 4, -(sqrt(1 + (a + b*x)^2)/(2*b)) + ((a + b*x)*sqrt(1 + (a + b*x)^2)*atan(a + b*x))/(2*b) + (im*atan(a + b*x)*atan(sqrt(1 + im*(a + b*x))/sqrt(1 - im*(a + b*x))))/b - (im*PolyLog(2, -((im*sqrt(1 + im*(a + b*x)))/sqrt(1 - im*(a + b*x)))))/(2*b) + (im*PolyLog(2, (im*sqrt(1 + im*(a + b*x)))/sqrt(1 - im*(a + b*x))))/(2*b)]
    @test_int [(a + b*x)^2*atan(a + b*x)/sqrt((1 + a^2)*c + 2*a*b*c*x + b^2*c*x^2), x, 5, -(sqrt(c + c*(a + b*x)^2)/(2*b*c)) + ((a + b*x)*sqrt(c + c*(a + b*x)^2)*atan(a + b*x))/(2*b*c) + (im*sqrt(1 + (a + b*x)^2)*atan(a + b*x)*atan(sqrt(1 + im*(a + b*x))/sqrt(1 - im*(a + b*x))))/(b*sqrt(c + c*(a + b*x)^2)) - (im*sqrt(1 + (a + b*x)^2)*PolyLog(2, -((im*sqrt(1 + im*(a + b*x)))/sqrt(1 - im*(a + b*x)))))/(2*b*sqrt(c + c*(a + b*x)^2)) + (im*sqrt(1 + (a + b*x)^2)*PolyLog(2, (im*sqrt(1 + im*(a + b*x)))/sqrt(1 - im*(a + b*x))))/(2*b*sqrt(c + c*(a + b*x)^2))]


    @test_int [(a + b*x)^2*atan(a + b*x)/(1 + a^2 + 2*a*b*x + b^2*x^2)^(1/3), x, 1, Unintegrable(((a + b*x)^2*atan(a + b*x))/(1 + (a + b*x)^2)^(1/3), x)]
    @test_int [(a + b*x)^2*atan(a + b*x)/((1 + a^2)*c + 2*a*b*c*x + b^2*c*x^2)^(1/3), x, 1, Unintegrable(((a + b*x)^2*atan(a + b*x))/(c + c*(a + b*x)^2)^(1/3), x)]
    end
