text:
@testset "1.3.1 Rational functions" begin
    (A, B, C, D, a, b, c, d, e, f, m, n, p, x, ) = @variables A B C D a b c d e f m n p x

    #= ::Package:: =#

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*P(x)^p=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P3(x)^p=#

    @test_int [1/(2*sqrt(3)*b^(3/2) - 9*b*x + 9*x^3), x, 3, 1/(3*sqrt(3)*sqrt(b)*(sqrt(3)*sqrt(b) - 3*x)) - log(sqrt(b) - sqrt(3)*x)/(27*b) + log(2*sqrt(b) + sqrt(3)*x)/(27*b)]

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

    @test_int [(a^3 + 3*a^2*b*x + 3*a*b^2*x^2 + b^3*x^3)^3, x, 2, (a + b*x)^10/(10*b)]
    @test_int [(a^3 + 3*a^2*b*x + 3*a*b^2*x^2 + b^3*x^3)^2, x, 2, (a + b*x)^7/(7*b)]
    @test_int [(a^3 + 3*a^2*b*x + 3*a*b^2*x^2 + b^3*x^3)^1, x, 1, a^3*x + (3/2)*a^2*b*x^2 + a*b^2*x^3 + (b^3*x^4)/4]
    @test_int [1/(a^3 + 3*a^2*b*x + 3*a*b^2*x^2 + b^3*x^3)^1, x, 2, -(1/(2*b*(a + b*x)^2))]
    @test_int [1/(a^3 + 3*a^2*b*x + 3*a*b^2*x^2 + b^3*x^3)^2, x, 2, -(1/(5*b*(a + b*x)^5))]
    @test_int [1/(a^3 + 3*a^2*b*x + 3*a*b^2*x^2 + b^3*x^3)^3, x, 2, -(1/(8*b*(a + b*x)^8))]

    @test_int [(3*a*b + 3*b^2*x + 3*b*c*x^2 + c^2*x^3)^3, x, 3, -((b^3*(b^2 - 3*a*c)^3*x)/c^3) + (3*b^2*(b^2 - 3*a*c)^2*(b + c*x)^4)/(4*c^4) - (3*b*(b^2 - 3*a*c)*(b + c*x)^7)/(7*c^4) + (b + c*x)^10/(10*c^4)]
    @test_int [(3*a*b + 3*b^2*x + 3*b*c*x^2 + c^2*x^3)^2, x, 3, (b^2*(b^2 - 3*a*c)^2*x)/c^2 - (b*(b^2 - 3*a*c)*(b + c*x)^4)/(2*c^3) + (b + c*x)^7/(7*c^3)]
    @test_int [(3*a*b + 3*b^2*x + 3*b*c*x^2 + c^2*x^3)^1, x, 1, 3*a*b*x + (3*b^2*x^2)/2 + b*c*x^3 + (c^2*x^4)/4]
    @test_int [1/(3*a*b + 3*b^2*x + 3*b*c*x^2 + c^2*x^3)^1, x, 7, -(atan((b^(1/3) + (2*(b + c*x))/(b^2 - 3*a*c)^(1/3))/(sqrt(3)*b^(1/3)))/(sqrt(3)*b^(2/3)*(b^2 - 3*a*c)^(2/3))) + log(b - b^(1/3)*(b^2 - 3*a*c)^(1/3) + c*x)/(3*b^(2/3)*(b^2 - 3*a*c)^(2/3)) - log(b^(2/3)*(b^2 - 3*a*c)^(2/3) + b^(1/3)*c*(b^2 - 3*a*c)^(1/3)*(b/c + x) + c^2*(b/c + x)^2)/(6*b^(2/3)*(b^2 - 3*a*c)^(2/3))]
    @test_int [1/(3*a*b + 3*b^2*x + 3*b*c*x^2 + c^2*x^3)^2, x, 8, -((c*(b/c + x))/(3*b*(b^2 - 3*a*c)*(3*a*b + 3*b^2*x + 3*b*c*x^2 + c^2*x^3))) + (2*c*atan((b^(1/3) + (2*(b + c*x))/(b^2 - 3*a*c)^(1/3))/(sqrt(3)*b^(1/3))))/(3*sqrt(3)*b^(5/3)*(b^2 - 3*a*c)^(5/3)) - (2*c*log(b - b^(1/3)*(b^2 - 3*a*c)^(1/3) + c*x))/(9*b^(5/3)*(b^2 - 3*a*c)^(5/3)) + (c*log(b^(2/3)*(b^2 - 3*a*c)^(2/3) + b^(1/3)*c*(b^2 - 3*a*c)^(1/3)*(b/c + x) + c^2*(b/c + x)^2))/(9*b^(5/3)*(b^2 - 3*a*c)^(5/3))]
    @test_int [1/(3*a*b + 3*b^2*x + 3*b*c*x^2 + c^2*x^3)^3, x, 9, -((c*(b/c + x))/(6*b*(b^2 - 3*a*c)*(3*a*b + 3*b^2*x + 3*b*c*x^2 + c^2*x^3)^2)) + (5*c^2*(b/c + x))/(18*b^2*(b^2 - 3*a*c)^2*(3*a*b + 3*b^2*x + 3*b*c*x^2 + c^2*x^3)) - (5*c^2*atan((b^(1/3) + (2*(b + c*x))/(b^2 - 3*a*c)^(1/3))/(sqrt(3)*b^(1/3))))/(9*sqrt(3)*b^(8/3)*(b^2 - 3*a*c)^(8/3)) + (5*c^2*log(b - b^(1/3)*(b^2 - 3*a*c)^(1/3) + c*x))/(27*b^(8/3)*(b^2 - 3*a*c)^(8/3)) - (5*c^2*log(b^(2/3)*(b^2 - 3*a*c)^(2/3) + b^(1/3)*c*(b^2 - 3*a*c)^(1/3)*(b/c + x) + c^2*(b/c + x)^2))/(54*b^(8/3)*(b^2 - 3*a*c)^(8/3))]

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

    @test_int [1/(1 + x + x^2 + x^3), x, 5, atan(x)/2 + (1/2)*log(1 + x) - (1/4)*log(1 + x^2)]
    @test_int [1/(-1 + 4*x - 4*x^2 + 16*x^3), x, 5, (-(1/10))*atan(2*x) + (1/5)*log(1 - 4*x) - (1/10)*log(1 + 4*x^2)]

    @test_int [1/(0 + 0*x + 0*x^2 + d*x^3), x, 2, -(1/(2*d*x^2))]
    @test_int [1/(0 + 0*x + c*x^2 + d*x^3), x, 3, -(1/(c*x)) - (d*log(x))/c^2 + (d*log(c + d*x))/c^2]
    @test_int [1/(0 + b*x + 0*x^2 + d*x^3), x, 5, log(x)/b - log(b + d*x^2)/(2*b)]
    @test_int [1/(0 + b*x + c*x^2 + d*x^3), x, 7, (c*atanh((c + 2*d*x)/sqrt(c^2 - 4*b*d)))/(b*sqrt(c^2 - 4*b*d)) + log(x)/b - log(b + c*x + d*x^2)/(2*b)]

    @test_int [1/(a + 0*x + 0*x^2 + d*x^3), x, 6, -(atan((a^(1/3) - 2*d^(1/3)*x)/(sqrt(3)*a^(1/3)))/(sqrt(3)*a^(2/3)*d^(1/3))) + log(a^(1/3) + d^(1/3)*x)/(3*a^(2/3)*d^(1/3)) - log(a^(2/3) - a^(1/3)*d^(1/3)*x + d^(2/3)*x^2)/(6*a^(2/3)*d^(1/3))]
    #= [1/(a + 0*x + c*x^2 + d*x^3), x, 3, -((72*2^(1/3)*d*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3)*log(2^(2/3)*c^2 - c*(-4*c^3 - 6*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3) + (-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3) - 3*2^(1/3)*d*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3)*x))/((2*(3*im + sqrt(3))*c^2 + 2^(1/3)*(3*im - sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3))*(2*(3*im - sqrt(3))*c^2 + 2^(1/3)*(3*im + sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3)))) - (12*2^(1/3)*sqrt(3)*d*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3)*log((2^(1/3)*c + (-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3))*(2^(1/3)*(im + sqrt(3))*c + (im - sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3)) + 6*im*2^(1/3)*d*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3)*x))/((2*c^2 - 2^(1/3)*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3))*(2*(3*im + sqrt(3))*c^2 + 2^(1/3)*(3*im - sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3))) + (12*2^(1/3)*sqrt(3)*d*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3)*log((2^(1/3)*c + (-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3))*(2^(1/3)*(im - sqrt(3))*c + (im + sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3)) + 6*im*2^(1/3)*d*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3)*x))/((2*c^2 - 2^(1/3)*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3))*(2*(3*im - sqrt(3))*c^2 + 2^(1/3)*(3*im + sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3)))] =#
    #= [1/(a + b*x + 0*x^2 + d*x^3), x, 3, -((6*3^(1/6)*d^(1/3)*(3*sqrt(3)*a*d - sqrt(d*(4*b^3 + 27*a^2*d)))*log(2^(2/3)*3^(1/3)*b*d^(1/3) - (9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3) - 2^(1/3)*3^(2/3)*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3)*x))/(18*3^(2/3)*a*b*d^(4/3) - 6*3^(1/6)*b*d^(1/3)*sqrt(d*(4*b^3 + 27*a^2*d)) - 6*2^(2/3)*b^2*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3) - 9*6^(1/3)*a*d*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3) + 2^(1/3)*3^(5/6)*sqrt(d*(4*b^3 + 27*a^2*d))*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3))) - (12*2^(1/3)*3^(1/6)*d^(1/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3)*log(2^(2/3)*3^(1/3)*(1 - im*sqrt(3))*b*d^(1/3) - (1 + im*sqrt(3))*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3) + 2*2^(1/3)*3^(2/3)*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3)*x))/((6*b*d^(1/3) + 2^(1/3)*(27*a*d - 3*sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3))*(2*(3*im + sqrt(3))*b*d^(1/3) + 2^(1/3)*3^(1/6)*(1 - im*sqrt(3))*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3))) + (12*2^(1/3)*3^(2/3)*d^(1/3)*(3*sqrt(3)*a*d - sqrt(d*(4*b^3 + 27*a^2*d)))*log(2^(2/3)*3^(1/3)*(1 + im*sqrt(3))*b*d^(1/3) + im*(im + sqrt(3))*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3) + 2*2^(1/3)*3^(2/3)*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3)*x))/((9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3)*(6*b*d^(1/3) + 2^(1/3)*(27*a*d - 3*sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3))*(2*(3*im - sqrt(3))*b*d^(1/3) + im*2^(1/3)*3^(1/6)*(im - sqrt(3))*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3)))] =#
    #= [1/(a + b*x + c*x^2 + d*x^3), x, 0, 0] =#

    @test_int [(0 + 0*x + 0*x^2 + d*x^3)^n, x, 2, (x*(d*x^3)^n)/(1 + 3*n)]
    @test_int [(0 + 0*x + c*x^2 + d*x^3)^n, x, 3, (x*(c*x^2 + d*x^3)^n*HypergeometricFunctions._₂F₁(-n, 1 + 2*n, 2*(1 + n), -((d*x)/c)))/((1 + (d*x)/c)^n*(1 + 2*n))]
    @test_int [(0 + b*x + 0*x^2 + d*x^3)^n, x, 3, (x*(b + d*x^2)*(b*x + d*x^3)^n*HypergeometricFunctions._₂F₁(1, (3*(1 + n))/2, (3 + n)/2, -((d*x^2)/b)))/(b*(1 + n)), (x*(b*x + d*x^3)^n*HypergeometricFunctions._₂F₁(-n, (1 + n)/2, (3 + n)/2, -((d*x^2)/b)))/((1 + d*x^2/b)^n*(1 + n))]
    @test_int [(0 + b*x + c*x^2 + d*x^3)^n, x, 3, (x*(b*x + c*x^2 + d*x^3)^n*AppellF1(1 + n, -n, -n, 2 + n, -((2*d*x)/(c - sqrt(c^2 - 4*b*d))), -((2*d*x)/(c + sqrt(c^2 - 4*b*d)))))/((1 + (2*d*x)/(c - sqrt(c^2 - 4*b*d)))^n*(1 + (2*d*x)/(c + sqrt(c^2 - 4*b*d)))^n*(1 + n))]

    @test_int [(a + 0*x + 0*x^2 + d*x^3)^n, x, 2, (x*(a + d*x^3)^(1 + n)*HypergeometricFunctions._₂F₁(1, 4/3 + n, 4/3, -((d*x^3)/a)))/a, (x*(a + d*x^3)^n*HypergeometricFunctions._₂F₁(1/3, -n, 4/3, -((d*x^3)/a)))/(1 + d*x^3/a)^n]
    #= [(a + 0*x + c*x^2 + d*x^3)^n, x, 2, (1/(3*d*(1 + n)))*((2^(-1 + (2*n)/3)*(2*c - (2*2^(1/3)*c^2)/(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3) - 2^(2/3)*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3) + 6*d*x)*(a + c*x^2 + d*x^3)^n*AppellF1(1 + n, -n, -n, 2 + n, -((3*d*(c - (2*c^2 + 2^(1/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(2/3))/(2^(2/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(1/3)) + 3*d*x))/(-3*d*(c - (2*c^2 + 2^(1/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(2/3))/(2^(2/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(1/3))) + 3*d*(c + (2*(1 + im*sqrt(3))*c^2 + 2^(1/3)*(1 - im*sqrt(3))*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(2/3))/(2*2^(2/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(1/3))))), -((3*d*(c - (2*c^2 + 2^(1/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(2/3))/(2^(2/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(1/3)) + 3*d*x))/(-3*d*(c - (2*c^2 + 2^(1/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(2/3))/(2^(2/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(1/3))) + 3*d*(c + (2*(1 - im*sqrt(3))*c^2 + 2^(1/3)*(1 + im*sqrt(3))*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(2/3))/(2*2^(2/3)*(-2*c^3 - 27*a*d^2 + 3*sqrt(3)*d*sqrt(a*(4*c^3 + 27*a*d^2)))^(1/3)))))))/(((im*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3)*(4*c + (2^(1/3)*((2 + 2*im*sqrt(3))*c^2 + 2^(1/3)*(1 - im*sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3)))/(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3) + 12*d*x))/(2*(3*im - sqrt(3))*c^2 + 2^(1/3)*(3*im + sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3)))^n*((im*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3)*(4*c + (2^(1/3)*((2 - 2*im*sqrt(3))*c^2 + 2^(1/3)*(1 + im*sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3)))/(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(1/3) + 12*d*x))/(2*(3*im + sqrt(3))*c^2 + 2^(1/3)*(3*im - sqrt(3))*(-2*c^3 - 3*d*(9*a*d - sqrt(3)*sqrt(a*(4*c^3 + 27*a*d^2))))^(2/3)))^n))] =#
    #= [(a + b*x + 0*x^2 + d*x^3)^n, x, 2, -((1/(d^(2/3)*(1 + n)))*((2^(-2 + (2*n)/3)*3^(-2 + (17*n)/6)*((2^(1/3)*3^(2/3)*(6*im*(im - sqrt(3))*b*d^(1/3) - 2^(1/3)*3^(1/6)*(3*im - sqrt(3))*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3)))/(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3) - 36*d^(2/3)*x)*(a + b*x + d*x^3)^n*AppellF1(1 + n, -n, -n, 2 + n, (3*d*(-((6*(1 + im*sqrt(3))*b*d - 2^(1/3)*3^(2/3)*(1 - im*sqrt(3))*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3))/(2*2^(2/3)*3^(1/3)*d^(1/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3))) - 3*d*x))/(-(((3/2)^(2/3)*d^(2/3)*(6*(1 + im*sqrt(3))*b*d - 2^(1/3)*3^(2/3)*(1 - im*sqrt(3))*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3)))/(2*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3))) + ((3/2)^(2/3)*d^(2/3)*(6*(1 - im*sqrt(3))*b*d - 2^(1/3)*3^(2/3)*(1 + im*sqrt(3))*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3)))/(2*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3))), -((3*d*(-((6*(1 + im*sqrt(3))*b*d - 2^(1/3)*3^(2/3)*(1 - im*sqrt(3))*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3))/(2*2^(2/3)*3^(1/3)*d^(1/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3))) - 3*d*x))/(((3/2)^(2/3)*d^(2/3)*(6*b*d - 2^(1/3)*3^(2/3)*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3)))/(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3) + ((3/2)^(2/3)*d^(2/3)*(6*(1 + im*sqrt(3))*b*d - 2^(1/3)*3^(2/3)*(1 - im*sqrt(3))*d^(2/3)*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3)))/(2*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3))))))/((-((im*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3)*((2^(1/3)*3^(2/3)*(6*im*(im + sqrt(3))*b*d^(1/3) + 2^(1/3)*3^(1/6)*(3*im + sqrt(3))*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3)))/(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3) - 36*d^(2/3)*x))/(6*b*d^(1/3) + 2^(1/3)*(27*a*d - 3*sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3))))^n*(-(((9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3)*((2^(1/3)*3^(2/3)*(6*b*d^(1/3) - 2^(1/3)*(27*a*d - 3*sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3)))/(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(1/3) - 18*d^(2/3)*x))/(2*im*(3*im - sqrt(3))*b*d^(1/3) - 2^(1/3)*3^(1/6)*(im - sqrt(3))*(9*a*d - sqrt(3)*sqrt(d*(4*b^3 + 27*a^2*d)))^(2/3))))^n)))] =#
    #= [(a + b*x + c*x^2 + d*x^3)^n, x, 2, (1/(3*d*(1 + n)))*((2^(-1 + (2*n)/3)*(2*c - (2^(1/3)*(2*c^2 - 6*b*d + 2^(1/3)*(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(2/3)))/(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(1/3) + 6*d*x)*(a + b*x + c*x^2 + d*x^3)^n*AppellF1(1 + n, -n, -n, 2 + n, -((3*d*(c - (2*c^2 - 6*b*d + 2^(1/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(2/3))/(2^(2/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(1/3)) + 3*d*x))/(-3*d*(c - (2*c^2 - 6*b*d + 2^(1/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(2/3))/(2^(2/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(1/3))) + 3*d*(c + (2*(1 - im*sqrt(3))*c^2 - 6*(1 - im*sqrt(3))*b*d + im*2^(1/3)*(-im + sqrt(3))*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(2/3))/(2*2^(2/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(1/3))))), -((3*d*(c - (2*c^2 - 6*b*d + 2^(1/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(2/3))/(2^(2/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(1/3)) + 3*d*x))/(-3*d*(c - (2*c^2 - 6*b*d + 2^(1/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(2/3))/(2^(2/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(1/3))) + 3*d*(c + (2*(1 + im*sqrt(3))*c^2 - 6*(1 + im*sqrt(3))*b*d - im*2^(1/3)*(im + sqrt(3))*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(2/3))/(2*2^(2/3)*(-2*c^3 + 9*b*c*d - 27*a*d^2 + 3*sqrt(3)*d*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2))^(1/3)))))))/(((im*(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(1/3)*(4*c + (2^(1/3)*((2 + 2*im*sqrt(3))*c^2 + 6*im*(im - sqrt(3))*b*d + 2^(1/3)*(1 - im*sqrt(3))*(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(2/3)))/(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(1/3) + 12*d*x))/(2*(3*im - sqrt(3))*c^2 - 6*(3*im - sqrt(3))*b*d + 2^(1/3)*(3*im + sqrt(3))*(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(2/3)))^n*((im*(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(1/3)*(4*c + (2^(1/3)*((2 - 2*im*sqrt(3))*c^2 + 6*im*(im + sqrt(3))*b*d + 2^(1/3)*(1 + im*sqrt(3))*(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(2/3)))/(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(1/3) + 12*d*x))/(2*(3*im + sqrt(3))*c^2 - 6*(3*im + sqrt(3))*b*d + 2^(1/3)*(3*im - sqrt(3))*(-2*c^3 + 9*b*c*d - 3*d*(9*a*d - sqrt(3)*sqrt((-b^2)*c^2 + 4*a*c^3 + 4*b^3*d - 18*a*b*c*d + 27*a^2*d^2)))^(2/3)))^n))] =#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P4(x)^p=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(a + 0*x + c*x^2 + d*x^3 + e*x^4)^p*when*d^3 - 4*c*d*e=0=#

    @test_int [(4*a*c + 4*c^2*x^2 + 4*c*d*x^3 + d^2*x^4)^4, x, 3, (c^4*(c^3 + 4*a*d^2)^4*x)/d^8 - (8*c^5*(c^3 + 4*a*d^2)^3*(c/d + x)^3)/(3*d^6) + (4*c^3*(c^3 + 4*a*d^2)^2*(7*c^3 + 4*a*d^2)*(c/d + x)^5)/(5*d^4) - (8*c^4*(c^3 + 4*a*d^2)*(7*c^3 + 12*a*d^2)*(c/d + x)^7)/(7*d^2) + (2/9)*c^2*(35*c^6 + 120*a*c^3*d^2 + 48*a^2*d^4)*(c/d + x)^9 - (8/11)*c^3*d^2*(7*c^3 + 12*a*d^2)*(c/d + x)^11 + (4/13)*c*d^4*(7*c^3 + 4*a*d^2)*(c/d + x)^13 - (8/15)*c^2*d^6*(c/d + x)^15 + (1/17)*d^8*(c/d + x)^17]
    @test_int [(4*a*c + 4*c^2*x^2 + 4*c*d*x^3 + d^2*x^4)^3, x, 2, 64*a^3*c^3*x + 64*a^2*c^4*x^3 + 48*a^2*c^3*d*x^4 + (48/5)*a*c^2*(4*c^3 + a*d^2)*x^5 + 64*a*c^4*d*x^6 + (32/7)*c^3*(2*c^3 + 9*a*d^2)*x^7 + 12*c^2*d*(2*c^3 + a*d^2)*x^8 + (4/3)*c*d^2*(20*c^3 + a*d^2)*x^9 + 16*c^3*d^3*x^10 + (60/11)*c^2*d^4*x^11 + c*d^5*x^12 + (d^6*x^13)/13]
    @test_int [(4*a*c + 4*c^2*x^2 + 4*c*d*x^3 + d^2*x^4)^2, x, 2, 16*a^2*c^2*x + (32/3)*a*c^3*x^3 + 8*a*c^2*d*x^4 + (8/5)*c*(2*c^3 + a*d^2)*x^5 + (16/3)*c^3*d*x^6 + (24/7)*c^2*d^2*x^7 + c*d^3*x^8 + (d^4*x^9)/9]
    @test_int [(4*a*c + 4*c^2*x^2 + 4*c*d*x^3 + d^2*x^4)^1, x, 1, 4*a*c*x + (4*c^2*x^3)/3 + c*d*x^4 + (d^2*x^5)/5]
    @test_int [1/(4*a*c + 4*c^2*x^2 + 4*c*d*x^3 + d^2*x^4)^1, x, 10, -((d*atanh((sqrt(2)*c + c^(1/4)*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2)) + sqrt(2)*d*x)/(c^(1/4)*sqrt(c^(3/2) - sqrt(c^3 + 4*a*d^2)))))/(2*sqrt(2)*c^(3/4)*sqrt(c^3 + 4*a*d^2)*sqrt(c^(3/2) - sqrt(c^3 + 4*a*d^2)))) + (d*atanh((c^(1/4)*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2)) - sqrt(2)*(c + d*x))/(c^(1/4)*sqrt(c^(3/2) - sqrt(c^3 + 4*a*d^2)))))/(2*sqrt(2)*c^(3/4)*sqrt(c^3 + 4*a*d^2)*sqrt(c^(3/2) - sqrt(c^3 + 4*a*d^2))) - (d*log(sqrt(c)*sqrt(c^3 + 4*a*d^2) - sqrt(2)*c^(1/4)*d*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2))*(c/d + x) + d^2*(c/d + x)^2))/(4*sqrt(2)*c^(3/4)*sqrt(c^3 + 4*a*d^2)*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2))) + (d*log(sqrt(c)*sqrt(c^3 + 4*a*d^2) + sqrt(2)*c^(1/4)*d*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2))*(c/d + x) + d^2*(c/d + x)^2))/(4*sqrt(2)*c^(3/4)*sqrt(c^3 + 4*a*d^2)*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2)))]
    @test_int [1/(4*a*c + 4*c^2*x^2 + 4*c*d*x^3 + d^2*x^4)^2, x, 11, -(((c/d + x)*(c^3 - 4*a*d^2 - c*d^2*(c/d + x)^2))/(16*a*c*(c^3 + 4*a*d^2)*(4*a*c + 4*c^2*x^2 + 4*c*d*x^3 + d^2*x^4))) - (d*(c^3 + 12*a*d^2 + c^(3/2)*sqrt(c^3 + 4*a*d^2))*atanh((sqrt(2)*c + c^(1/4)*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2)) + sqrt(2)*d*x)/(c^(1/4)*sqrt(c^(3/2) - sqrt(c^3 + 4*a*d^2)))))/(32*sqrt(2)*a*c^(7/4)*(c^3 + 4*a*d^2)^(3/2)*sqrt(c^(3/2) - sqrt(c^3 + 4*a*d^2))) + (d*(c^3 + 12*a*d^2 + c^(3/2)*sqrt(c^3 + 4*a*d^2))*atanh((c^(1/4)*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2)) - sqrt(2)*(c + d*x))/(c^(1/4)*sqrt(c^(3/2) - sqrt(c^3 + 4*a*d^2)))))/(32*sqrt(2)*a*c^(7/4)*(c^3 + 4*a*d^2)^(3/2)*sqrt(c^(3/2) - sqrt(c^3 + 4*a*d^2))) - (d*(c^3 + 12*a*d^2 - c^(3/2)*sqrt(c^3 + 4*a*d^2))*log(sqrt(c)*sqrt(c^3 + 4*a*d^2) - sqrt(2)*c^(1/4)*d*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2))*(c/d + x) + d^2*(c/d + x)^2))/(64*sqrt(2)*a*c^(7/4)*(c^3 + 4*a*d^2)^(3/2)*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2))) + (d*(c^3 + 12*a*d^2 - c^(3/2)*sqrt(c^3 + 4*a*d^2))*log(sqrt(c)*sqrt(c^3 + 4*a*d^2) + sqrt(2)*c^(1/4)*d*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2))*(c/d + x) + d^2*(c/d + x)^2))/(64*sqrt(2)*a*c^(7/4)*(c^3 + 4*a*d^2)^(3/2)*sqrt(c^(3/2) + sqrt(c^3 + 4*a*d^2)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(a + b*x + 0*x^2 + d*x^3 + e*x^4)^p*when*d^3 + 8*b*e^2=0=#

    @test_int [(8*a*e^2 - d^3*x + 8*d*e^2*x^3 + 8*e^3*x^4)^4, x, 3, ((5*d^4 + 256*a*e^3)^4*x)/(1048576*e^4) - (d^2*(5*d^4 + 256*a*e^3)^3*(d/(4*e) + x)^3)/(8192*e^2) + ((5*d^4 + 256*a*e^3)^2*(59*d^4 + 256*a*e^3)*(d/(4*e) + x)^5)/5120 - (9/224)*d^2*e^2*(5*d^4 + 256*a*e^3)*(17*d^4 + 256*a*e^3)*(d/(4*e) + x)^7 + (1/24)*e^4*(601*d^8 + 20992*a*d^4*e^3 + 65536*a^2*e^6)*(d/(4*e) + x)^9 - (72/11)*d^2*e^6*(17*d^4 + 256*a*e^3)*(d/(4*e) + x)^11 + (64/13)*e^8*(59*d^4 + 256*a*e^3)*(d/(4*e) + x)^13 - (2048/5)*d^2*e^10*(d/(4*e) + x)^15 + (4096/17)*e^12*(d/(4*e) + x)^17]
    @test_int [(8*a*e^2 - d^3*x + 8*d*e^2*x^3 + 8*e^3*x^4)^3, x, 2, 512*a^3*e^6*x - 96*a^2*d^3*e^4*x^2 + 8*a*d^6*e^2*x^3 - (1/4)*d*(d^8 - 1536*a^2*e^6)*x^4 - (384/5)*a*e^4*(d^4 - 4*a*e^3)*x^5 + 4*d^3*e^2*(d^4 - 16*a*e^3)*x^6 + (24/7)*d^2*e^3*(d^4 + 64*a*e^3)*x^7 - 24*d*e^4*(d^4 - 16*a*e^3)*x^8 - (128/3)*e^5*(d^4 - 4*a*e^3)*x^9 + 32*d^3*e^6*x^10 + (1536/11)*d^2*e^7*x^11 + 128*d*e^8*x^12 + (512*e^9*x^13)/13]
    @test_int [(8*a*e^2 - d^3*x + 8*d*e^2*x^3 + 8*e^3*x^4)^2, x, 2, 64*a^2*e^4*x - 8*a*d^3*e^2*x^2 + (d^6*x^3)/3 + 32*a*d*e^4*x^4 - (16/5)*e^2*(d^4 - 8*a*e^3)*x^5 - (8/3)*d^3*e^3*x^6 + (64/7)*d^2*e^4*x^7 + 16*d*e^5*x^8 + (64*e^6*x^9)/9]
    @test_int [(8*a*e^2 - d^3*x + 8*d*e^2*x^3 + 8*e^3*x^4)^1, x, 1, 8*a*e^2*x - (d^3*x^2)/2 + 2*d*e^2*x^4 + (8*e^3*x^5)/5]
    @test_int [1/(8*a*e^2 - d^3*x + 8*d*e^2*x^3 + 8*e^3*x^4)^1, x, 4, (2*atanh((d + 4*e*x)/sqrt(3*d^2 - 2*sqrt(d^4 - 64*a*e^3))))/(sqrt(d^4 - 64*a*e^3)*sqrt(3*d^2 - 2*sqrt(d^4 - 64*a*e^3))) - (2*atanh((d + 4*e*x)/sqrt(3*d^2 + 2*sqrt(d^4 - 64*a*e^3))))/(sqrt(d^4 - 64*a*e^3)*sqrt(3*d^2 + 2*sqrt(d^4 - 64*a*e^3)))]
    @test_int [1/(8*a*e^2 - d^3*x + 8*d*e^2*x^3 + 8*e^3*x^4)^2, x, 5, (2*e*(d/(4*e) + x)*(13*d^4 - 256*a*e^3 - 48*d^2*e^2*(d/(4*e) + x)^2))/((5*d^8 - 64*a*d^4*e^3 - 16384*a^2*e^6)*(8*a*e^2 - d^3*x + 8*d*e^2*x^3 + 8*e^3*x^4)) - (24*e*(d^4 + 128*a*e^3 - d^2*sqrt(d^4 - 64*a*e^3))*atanh((d + 4*e*x)/sqrt(3*d^2 - 2*sqrt(d^4 - 64*a*e^3))))/((d^4 - 64*a*e^3)^(3/2)*(5*d^4 + 256*a*e^3)*sqrt(3*d^2 - 2*sqrt(d^4 - 64*a*e^3))) + (24*e*(d^4 + 128*a*e^3 + d^2*sqrt(d^4 - 64*a*e^3))*atanh((d + 4*e*x)/sqrt(3*d^2 + 2*sqrt(d^4 - 64*a*e^3))))/((d^4 - 64*a*e^3)^(3/2)*(5*d^4 + 256*a*e^3)*sqrt(3*d^2 + 2*sqrt(d^4 - 64*a*e^3)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(a + b*x + 0*x^2 + d*x^3 + e*x^4)^p*when*b^3 + 8*a^2*d=0=#

    @test_int [(8 + 8*x - x^3 + 8*x^4)^4, x, 2, 4096*x + 8192*x^2 + 8192*x^3 + 3584*x^4 + (14336*x^5)/5 + 7168*x^6 + 6784*x^7 + 1376*x^8 + 1408*x^9 + (21488*x^10)/5 + (25312*x^11)/11 - 448*x^12 + (10241*x^13)/13 + 1168*x^14 + (128*x^15)/5 - 128*x^16 + (4096*x^17)/17]
    @test_int [(8 + 8*x - x^3 + 8*x^4)^3, x, 2, 512*x + 768*x^2 + 512*x^3 + 80*x^4 + (1152*x^5)/5 + 480*x^6 + (1560*x^7)/7 - 45*x^8 + 128*x^9 + (307*x^10)/2 + (24*x^11)/11 - 16*x^12 + (512*x^13)/13]
    @test_int [(8 + 8*x - x^3 + 8*x^4)^2, x, 2, 64*x + 64*x^2 + (64*x^3)/3 - 4*x^4 + (112*x^5)/5 + (64*x^6)/3 + x^7/7 - 2*x^8 + (64*x^9)/9]
    @test_int [(8 + 8*x - x^3 + 8*x^4)^1, x, 1, 8*x + 4*x^2 - x^4/4 + (8*x^5)/5]
    @test_int [1/(8 + 8*x - x^3 + 8*x^4)^1, x, 16, -(atan((3 - (1 + 4/x)^2)/(6*sqrt(7)))/(12*sqrt(7))) - (1/12)*sqrt((109 + 67*sqrt(29))/1218)*atan((2 - sqrt(6*(1 + sqrt(29))) + 8/x)/sqrt(6*(-1 + sqrt(29)))) - (1/12)*sqrt((109 + 67*sqrt(29))/1218)*atan((2 + sqrt(6*(1 + sqrt(29))) + 8/x)/sqrt(6*(-1 + sqrt(29)))) - (1/24)*sqrt((-109 + 67*sqrt(29))/1218)*log(3*sqrt(29) - sqrt(6*(1 + sqrt(29)))*(1 + 4/x) + (1 + 4/x)^2) + (1/24)*sqrt((-109 + 67*sqrt(29))/1218)*log(3*sqrt(29) + sqrt(6*(1 + sqrt(29)))*(1 + 4/x) + (1 + 4/x)^2)]
    @test_int [1/(8 + 8*x - x^3 + 8*x^4)^2, x, 18, -((207 + 29*(1 + 4/x)^2)/(336*(261 - 6*(1 + 4/x)^2 + (1 + 4/x)^4))) + (5*(5157 + 199*(1 + 4/x)^2)*(1 + 4/x))/(87696*(261 - 6*(1 + 4/x)^2 + (1 + 4/x)^4)) - (17*atan((3 - (1 + 4/x)^2)/(6*sqrt(7))))/(1008*sqrt(7)) - (sqrt((180983329 + 45923327*sqrt(29))/1218)*atan((2 - sqrt(6*(1 + sqrt(29))) + 8/x)/sqrt(6*(-1 + sqrt(29)))))/87696 - (sqrt((180983329 + 45923327*sqrt(29))/1218)*atan((2 + sqrt(6*(1 + sqrt(29))) + 8/x)/sqrt(6*(-1 + sqrt(29)))))/87696 - (sqrt((-180983329 + 45923327*sqrt(29))/1218)*log(3*sqrt(29) - sqrt(6*(1 + sqrt(29)))*(1 + 4/x) + (1 + 4/x)^2))/175392 + (sqrt((-180983329 + 45923327*sqrt(29))/1218)*log(3*sqrt(29) + sqrt(6*(1 + sqrt(29)))*(1 + 4/x) + (1 + 4/x)^2))/175392]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(a + b*x + c*x^2 + 0*x^3 + e*x^4)^p*when*b^2 - 4*a*c=0=#

    @test_int [(1 + 4*x + 4*x^2 + 4*x^4)^4, x, 2, x + 8*x^2 + (112*x^3)/3 + 112*x^4 + (1136*x^5)/5 + (992*x^6)/3 + (2752*x^7)/7 + 448*x^8 + (4192*x^9)/9 + 384*x^10 + (3328*x^11)/11 + 256*x^12 + (1792*x^13)/13 + (512*x^14)/7 + (1024*x^15)/15 + (256*x^17)/17]
    @test_int [(1 + 4*x + 4*x^2 + 4*x^4)^3, x, 2, x + 6*x^2 + 20*x^3 + 40*x^4 + (252*x^5)/5 + 48*x^6 + (352*x^7)/7 + 48*x^8 + (80*x^9)/3 + (96*x^10)/5 + (192*x^11)/11 + (64*x^13)/13]
    @test_int [(1 + 4*x + 4*x^2 + 4*x^4)^2, x, 2, x + 4*x^2 + 8*x^3 + 8*x^4 + (24*x^5)/5 + (16*x^6)/3 + (32*x^7)/7 + (16*x^9)/9]
    @test_int [(1 + 4*x + 4*x^2 + 4*x^4)^1, x, 1, x + 2*x^2 + (4*x^3)/3 + (4*x^5)/5]
    @test_int [1/(1 + 4*x + 4*x^2 + 4*x^4)^1, x, 15, (1/2)*atan((1/2)*(-1 + (1 + 1/x)^2)) - (1/2)*sqrt((1/5)*(2 + sqrt(5)))*atan((2 - sqrt(2*(1 + sqrt(5))) + 2/x)/sqrt(2*(-1 + sqrt(5)))) - (1/2)*sqrt((1/5)*(2 + sqrt(5)))*atan((2 + sqrt(2*(1 + sqrt(5))) + 2/x)/sqrt(2*(-1 + sqrt(5)))) - (1/4)*sqrt((1/5)*(-2 + sqrt(5)))*log(sqrt(5) - sqrt(2*(1 + sqrt(5)))*(1 + 1/x) + (1 + 1/x)^2) + (1/4)*sqrt((1/5)*(-2 + sqrt(5)))*log(sqrt(5) + sqrt(2*(1 + sqrt(5)))*(1 + 1/x) + (1 + 1/x)^2)]
    @test_int [1/(1 + 4*x + 4*x^2 + 4*x^4)^2, x, 17, -((17 - (1 + 1/x)^2)/(2*(5 - 2*(1 + 1/x)^2 + (1 + 1/x)^4))) + ((59 - 17*(1 + 1/x)^2)*(1 + 1/x))/(10*(5 - 2*(1 + 1/x)^2 + (1 + 1/x)^4)) + (7/4)*atan((1/2)*(-1 + (1 + 1/x)^2)) - (1/20)*sqrt((1/10)*(5959 + 2665*sqrt(5)))*atan((2 - sqrt(2*(1 + sqrt(5))) + 2/x)/sqrt(2*(-1 + sqrt(5)))) - (1/20)*sqrt((1/10)*(5959 + 2665*sqrt(5)))*atan((2 + sqrt(2*(1 + sqrt(5))) + 2/x)/sqrt(2*(-1 + sqrt(5)))) + (1/40)*sqrt((1/10)*(-5959 + 2665*sqrt(5)))*log(sqrt(5) - sqrt(2*(1 + sqrt(5)))*(1 + 1/x) + (1 + 1/x)^2) - (1/40)*sqrt((1/10)*(-5959 + 2665*sqrt(5)))*log(sqrt(5) + sqrt(2*(1 + sqrt(5)))*(1 + 1/x) + (1 + 1/x)^2)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(a + b*x + c*x^2 + d*x^3 + e*x^4)^p*when*b^3 - 4*a*b*c + 8*a^2*d=0=#

    @test_int [(8 + 24*x + 8*x^2 - 15*x^3 + 8*x^4)^4, x, 2, 4096*x + 24576*x^2 + (237568*x^3)/3 + 139776*x^4 + (538624*x^5)/5 - 30720*x^6 - (566912*x^7)/7 + 36384*x^8 + (641152*x^9)/9 - (169584*x^10)/5 - (331040*x^11)/11 + 31128*x^12 - (12095*x^13)/13 - (75504*x^14)/7 + (102784*x^15)/15 - 1920*x^16 + (4096*x^17)/17]
    @test_int [(8 + 24*x + 8*x^2 - 15*x^3 + 8*x^4)^3, x, 2, 512*x + 2304*x^2 + 5120*x^3 + 5040*x^4 - (384*x^5)/5 - 2976*x^6 + (5528*x^7)/7 + 2097*x^8 - (2936*x^9)/3 - (4527*x^10)/10 + (6936*x^11)/11 - 240*x^12 + (512*x^13)/13]
    @test_int [(8 + 24*x + 8*x^2 - 15*x^3 + 8*x^4)^2, x, 2, 64*x + 192*x^2 + (704*x^3)/3 + 36*x^4 - (528*x^5)/5 + 24*x^6 + (353*x^7)/7 - 30*x^8 + (64*x^9)/9]
    @test_int [(8 + 24*x + 8*x^2 - 15*x^3 + 8*x^4)^1, x, 1, 8*x + 12*x^2 + (8*x^3)/3 - (15*x^4)/4 + (8*x^5)/5]
    @test_int [1/(8 + 24*x + 8*x^2 - 15*x^3 + 8*x^4)^1, x, 16, (-(1/4))*sqrt((5167 + 235*sqrt(517))/40326)*atan((6 - sqrt(2*(19 + sqrt(517))) + 8/x)/sqrt(2*(-19 + sqrt(517)))) - (1/4)*sqrt((5167 + 235*sqrt(517))/40326)*atan((6 + sqrt(2*(19 + sqrt(517))) + 8/x)/sqrt(2*(-19 + sqrt(517)))) + (1/4)*sqrt(3/13)*atan((8 + 12*x - 5*x^2)/(sqrt(39)*x^2)) - (1/8)*sqrt((-5167 + 235*sqrt(517))/40326)*log(sqrt(517) - sqrt(2*(19 + sqrt(517)))*(3 + 4/x) + (3 + 4/x)^2) + (1/8)*sqrt((-5167 + 235*sqrt(517))/40326)*log(sqrt(517) + sqrt(2*(19 + sqrt(517)))*(3 + 4/x) + (3 + 4/x)^2)]
    @test_int [1/(8 + 24*x + 8*x^2 - 15*x^3 + 8*x^4)^2, x, 18, -((3*(3359 - 107*(3 + 4/x)^2))/(208*(517 - 38*(3 + 4/x)^2 + (3 + 4/x)^4))) + ((3327931 - 129631*(3 + 4/x)^2)*(3 + 4/x))/(322608*(517 - 38*(3 + 4/x)^2 + (3 + 4/x)^4)) - (sqrt((19 + sqrt(517))/40326)*(1678181 + 74897*sqrt(517))*atan((6 - sqrt(2*(19 + sqrt(517))) + 8/x)/sqrt(2*(-19 + sqrt(517)))))/645216 - (sqrt((19 + sqrt(517))/40326)*(1678181 + 74897*sqrt(517))*atan((6 + sqrt(2*(19 + sqrt(517))) + 8/x)/sqrt(2*(-19 + sqrt(517)))))/645216 + (73/208)*sqrt(3/13)*atan((8 + 12*x - 5*x^2)/(sqrt(39)*x^2)) - (sqrt((-59644114671451 + 2623170438295*sqrt(517))/40326)*log(sqrt(517) - sqrt(2*(19 + sqrt(517)))*(3 + 4/x) + (3 + 4/x)^2))/645216 + (sqrt((-59644114671451 + 2623170438295*sqrt(517))/40326)*log(sqrt(517) + sqrt(2*(19 + sqrt(517)))*(3 + 4/x) + (3 + 4/x)^2))/645216]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P5(x)^p=#

    @test_int [(a^5 + 5*a^4*b*x + 10*a^3*b^2*x^2 + 10*a^2*b^3*x^3 + 5*a*b^4*x^4 + b^5*x^5)^3, x, 2, (a + b*x)^16/(16*b)]
    @test_int [(a^5 + 5*a^4*b*x + 10*a^3*b^2*x^2 + 10*a^2*b^3*x^3 + 5*a*b^4*x^4 + b^5*x^5)^2, x, 2, (a + b*x)^11/(11*b)]
    @test_int [(a^5 + 5*a^4*b*x + 10*a^3*b^2*x^2 + 10*a^2*b^3*x^3 + 5*a*b^4*x^4 + b^5*x^5)^1, x, 1, (a + b*x)^6/(6*b), a^5*x + (5/2)*a^4*b*x^2 + (10/3)*a^3*b^2*x^3 + (5/2)*a^2*b^3*x^4 + a*b^4*x^5 + (b^5*x^6)/6]
    @test_int [1/(a^5 + 5*a^4*b*x + 10*a^3*b^2*x^2 + 10*a^2*b^3*x^3 + 5*a*b^4*x^4 + b^5*x^5)^1, x, 2, -(1/(4*b*(a + b*x)^4))]
    @test_int [1/(a^5 + 5*a^4*b*x + 10*a^3*b^2*x^2 + 10*a^2*b^3*x^3 + 5*a*b^4*x^4 + b^5*x^5)^2, x, 2, -(1/(9*b*(a + b*x)^9))]
    @test_int [1/(a^5 + 5*a^4*b*x + 10*a^3*b^2*x^2 + 10*a^2*b^3*x^3 + 5*a*b^4*x^4 + b^5*x^5)^3, x, 2, -(1/(14*b*(a + b*x)^14))]

    @test_int [1/(1 + x^2 + x^3 + x^5), x, 6, atan(x)/2 + (1/6)*log(1 + x) + (1/4)*log(1 + x^2) - (1/3)*log(1 - x + x^2)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P6(x)^p=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P3(x^2)^p=#

    @test_int [(3 - 19*x^2 + 32*x^4 - 16*x^6)^4, x, 5, 81*x - 684*x^3 + 4590*x^5 - (149700*x^7)/7 + (634321*x^9)/9 - (1841600*x^11)/11 + (3764416*x^13)/13 - (1094656*x^15)/3 + (5633536*x^17)/17 - (4014080*x^19)/19 + (1884160*x^21)/21 - (524288*x^23)/23 + (65536*x^25)/25]
    @test_int [(3 - 19*x^2 + 32*x^4 - 16*x^6)^3, x, 5, 27*x - 171*x^3 + (4113*x^5)/5 - 2605*x^7 + (16448*x^9)/3 - (84912*x^11)/11 + (93440*x^13)/13 - (21248*x^15)/5 + (24576*x^17)/17 - (4096*x^19)/19]
    @test_int [(3 - 19*x^2 + 32*x^4 - 16*x^6)^2, x, 5, 9*x - 38*x^3 + (553*x^5)/5 - (1312*x^7)/7 + (544*x^9)/3 - (1024*x^11)/11 + (256*x^13)/13]
    @test_int [(3 - 19*x^2 + 32*x^4 - 16*x^6)^1, x, 1, 3*x - (19*x^3)/3 + (32*x^5)/5 - (16*x^7)/7]
    @test_int [1/(3 - 19*x^2 + 32*x^4 - 16*x^6)^1, x, 5, atanh(x)/3 + (1/3)*atanh(2*x) - atanh((2*x)/sqrt(3))/sqrt(3)]
    @test_int [1/(3 - 19*x^2 + 32*x^4 - 16*x^6)^2, x, 7, 1/(18*(1 - 2*x)) + 1/(36*(1 - x)) - 1/(36*(1 + x)) - 1/(18*(1 + 2*x)) + (2*x)/(3*(3 - 4*x^2)) + (67*atanh(x))/54 - (7/27)*atanh(2*x) - (5*atanh((2*x)/sqrt(3)))/(3*sqrt(3))]
    @test_int [1/(3 - 19*x^2 + 32*x^4 - 16*x^6)^3, x, 10, 1/(108*(1 - 2*x)^2) - 7/(108*(1 - 2*x)) + 1/(432*(1 - x)^2) + 67/(432*(1 - x)) - 1/(432*(1 + x)^2) - 67/(432*(1 + x)) - 1/(108*(1 + 2*x)^2) + 7/(108*(1 + 2*x)) - (2*x)/(3*(3 - 4*x^2)^2) + (5*x)/(3*(3 - 4*x^2)) + (3913*atanh(x))/648 + (67/162)*atanh(2*x) + (5*atanh((2*x)/sqrt(3)))/(6*sqrt(3)) - 4*sqrt(3)*atanh((2*x)/sqrt(3))]

    @test_int [1/(-1 + 7*x^2 - 7*x^4 + x^6)^2, x, 15, x/(32*(1 - x^2)) + (x*(99 - 17*x^2))/(128*(1 - 6*x^2 + x^4)) + (5*atanh(x))/32 + (1/512)*(-4 + 3*sqrt(2))*atanh((-1 + sqrt(2))*x) + (1/512)*(4 + 3*sqrt(2))*atanh((1 + sqrt(2))*x), 1/(64*(1 - x)) - 1/(64*(1 + x)) + (41 + 17*x)/(256*(1 - 2*x - x^2)) - (41 - 17*x)/(256*(1 + 2*x - x^2)) - (17*atanh((1 - x)/sqrt(2)))/(256*sqrt(2)) + (5*atanh(x))/32 + (17*atanh((1 + x)/sqrt(2)))/(256*sqrt(2)) + (1/512)*(2 - 7*sqrt(2))*log(1 - sqrt(2) - x) + (1/512)*(2 + 7*sqrt(2))*log(1 + sqrt(2) - x) - (1/512)*(2 - 7*sqrt(2))*log(1 - sqrt(2) + x) - (1/512)*(2 + 7*sqrt(2))*log(1 + sqrt(2) + x)]

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*x^m*P(x)^p=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*x^m*P2(x)^p=#

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

    @test_int [x^3/(c + (a + b*x)^2), x, 6, -((3*a*x)/b^3) + (a + b*x)^2/(2*b^4) - (a*(a^2 - 3*c)*atan((a + b*x)/sqrt(c)))/(b^4*sqrt(c)) + ((3*a^2 - c)*log(c + (a + b*x)^2))/(2*b^4)]
    @test_int [x^2/(c + (a + b*x)^2), x, 6, x/b^2 + ((a^2 - c)*atan((a + b*x)/sqrt(c)))/(b^3*sqrt(c)) - (a*log(c + (a + b*x)^2))/b^3]
    @test_int [x^1/(c + (a + b*x)^2), x, 4, -((a*atan((a + b*x)/sqrt(c)))/(b^2*sqrt(c))) + log(c + (a + b*x)^2)/(2*b^2)]
    @test_int [x^0/(c + (a + b*x)^2), x, 2, atan((a + b*x)/sqrt(c))/(b*sqrt(c))]
    @test_int [1/(x^1*(c + (a + b*x)^2)), x, 6, -((a*atan((a + b*x)/sqrt(c)))/(sqrt(c)*(a^2 + c))) + log(x)/(a^2 + c) - log(c + (a + b*x)^2)/(2*(a^2 + c))]
    @test_int [1/(x^2*(c + (a + b*x)^2)), x, 7, -(1/((a^2 + c)*x)) + (b*(a^2 - c)*atan((a + b*x)/sqrt(c)))/(sqrt(c)*(a^2 + c)^2) - (2*a*b*log(x))/(a^2 + c)^2 + (a*b*log(c + (a + b*x)^2))/(a^2 + c)^2]
    @test_int [1/(x^3*(c + (a + b*x)^2)), x, 7, -(1/(2*(a^2 + c)*x^2)) + (2*a*b)/((a^2 + c)^2*x) - (a*b^2*(a^2 - 3*c)*atan((a + b*x)/sqrt(c)))/(sqrt(c)*(a^2 + c)^3) + (b^2*(3*a^2 - c)*log(x))/(a^2 + c)^3 - (b^2*(3*a^2 - c)*log(c + (a + b*x)^2))/(2*(a^2 + c)^3)]

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

    @test_int [1/(1 + (c + d*x)^2), x, 2, atan(c + d*x)/d]
    @test_int [1/(1 + (c + d*x)^2)^2, x, 3, (c + d*x)/(2*d*(1 + (c + d*x)^2)) + atan(c + d*x)/(2*d)]
    @test_int [1/(1 + (c + d*x)^2)^3, x, 4, (c + d*x)/(4*d*(1 + (c + d*x)^2)^2) + (3*(c + d*x))/(8*d*(1 + (c + d*x)^2)) + (3*atan(c + d*x))/(8*d)]

    @test_int [1/(1 - (c + d*x)^2), x, 2, atanh(c + d*x)/d]
    @test_int [1/(1 - (c + d*x)^2)^2, x, 3, (c + d*x)/(2*d*(1 - (c + d*x)^2)) + atanh(c + d*x)/(2*d)]
    @test_int [1/(1 - (c + d*x)^2)^3, x, 4, (c + d*x)/(4*d*(1 - (c + d*x)^2)^2) + (3*(c + d*x))/(8*d*(1 - (c + d*x)^2)) + (3*atanh(c + d*x))/(8*d)]

    @test_int [1/(1 - (1 + x)^2), x, 2, atanh(1 + x)]
    @test_int [1/(1 - (1 + x)^2)^2, x, 3, (1 + x)/(2*(1 - (1 + x)^2)) + (1/2)*atanh(1 + x)]
    @test_int [1/(1 - (1 + x)^2)^3, x, 4, (1 + x)/(4*(1 - (1 + x)^2)^2) + (3*(1 + x))/(8*(1 - (1 + x)^2)) + (3/8)*atanh(1 + x)]

    @test_int [(1 + (a + b*x)^2)^2/x, x, 3, a*(2 + a^2)*b*x + (1/2)*(2 + a^2)*(a + b*x)^2 + (1/3)*a*(a + b*x)^3 + (1/4)*(a + b*x)^4 + (1 + a^2)^2*log(x)]
    @test_int [x^2/(1 + (-1 + x)^2), x, 4, x + log(1 + (-1 + x)^2)]

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

    @test_int [x^2/sqrt(1 - (1 + x)^2), x, 4, (3/2)*sqrt(1 - (1 + x)^2) - (1/2)*x*sqrt(1 - (1 + x)^2) + (3/2)*asin(1 + x)]
    @test_int [x^2/sqrt(1 - (a + b*x)^2), x, 4, (3*a*sqrt(1 - (a + b*x)^2))/(2*b^3) - (x*sqrt(1 - (a + b*x)^2))/(2*b^2) + ((1 + 2*a^2)*asin(a + b*x))/(2*b^3)]
    @test_int [x^2/sqrt(1 + (a + b*x)^2), x, 4, -((3*a*sqrt(1 + (a + b*x)^2))/(2*b^3)) + (x*sqrt(1 + (a + b*x)^2))/(2*b^2) - ((1 - 2*a^2)*asinh(a + b*x))/(2*b^3)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*x^m*P3(x)^p=#

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

    @test_int [x^3/(a + b*(c + d*x)^3), x, 11, x/(b*d^3) + ((a - 3*a^(1/3)*b^(2/3)*c^2 + b*c^3)*atan((a^(1/3) - 2*b^(1/3)*(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*a^(2/3)*b^(4/3)*d^4) - ((a + 3*a^(1/3)*b^(2/3)*c^2 + b*c^3)*log(a^(1/3) + b^(1/3)*(c + d*x)))/(3*a^(2/3)*b^(4/3)*d^4) + ((a + 3*a^(1/3)*b^(2/3)*c^2 + b*c^3)*log(a^(2/3) - a^(1/3)*b^(1/3)*(c + d*x) + b^(2/3)*(c + d*x)^2))/(6*a^(2/3)*b^(4/3)*d^4) - (c*log(a + b*(c + d*x)^3))/(b*d^4)]
    @test_int [x^2/(a + b*(c + d*x)^3), x, 9, (c*(2*a^(1/3) - b^(1/3)*c)*atan((a^(1/3) - 2*b^(1/3)*(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*a^(2/3)*b^(2/3)*d^3) + (c*(2*a^(1/3) + b^(1/3)*c)*log(a^(1/3) + b^(1/3)*(c + d*x)))/(3*a^(2/3)*b^(2/3)*d^3) - (c*(2*a^(1/3) + b^(1/3)*c)*log(a^(2/3) - a^(1/3)*b^(1/3)*(c + d*x) + b^(2/3)*(c + d*x)^2))/(6*a^(2/3)*b^(2/3)*d^3) + log(a + b*(c + d*x)^3)/(3*b*d^3)]
    @test_int [x/(a + b*(c + d*x)^3), x, 7, -(((a^(1/3) - b^(1/3)*c)*atan((a^(1/3) - 2*b^(1/3)*(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*a^(2/3)*b^(2/3)*d^2)) - ((a^(1/3) + b^(1/3)*c)*log(a^(1/3) + b^(1/3)*(c + d*x)))/(3*a^(2/3)*b^(2/3)*d^2) + ((a^(1/3) + b^(1/3)*c)*log(a^(2/3) - a^(1/3)*b^(1/3)*(c + d*x) + b^(2/3)*(c + d*x)^2))/(6*a^(2/3)*b^(2/3)*d^2)]
    @test_int [1/(a + b*(c + d*x)^3), x, 7, -(atan((a^(1/3) - 2*b^(1/3)*(c + d*x))/(sqrt(3)*a^(1/3)))/(sqrt(3)*a^(2/3)*b^(1/3)*d)) + log(a^(1/3) + b^(1/3)*(c + d*x))/(3*a^(2/3)*b^(1/3)*d) - log(a^(2/3) - a^(1/3)*b^(1/3)*(c + d*x) + b^(2/3)*(c + d*x)^2)/(6*a^(2/3)*b^(1/3)*d)]
    @test_int [1/(x*(a + b*(c + d*x)^3)), x, 11, (b^(1/3)*c*atan((a^(1/3) - 2*b^(1/3)*(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*a^(2/3)*(a^(2/3) - a^(1/3)*b^(1/3)*c + b^(2/3)*c^2)) + log(x)/(a + b*c^3) - log(a^(1/3) + b^(1/3)*(c + d*x))/(3*a^(2/3)*(a^(1/3) + b^(1/3)*c)) - ((2*a^(1/3) - b^(1/3)*c)*log(a^(2/3) - a^(1/3)*b^(1/3)*(c + d*x) + b^(2/3)*(c + d*x)^2))/(6*a^(2/3)*(a^(2/3) - a^(1/3)*b^(1/3)*c + b^(2/3)*c^2)), (b^(1/3)*c*(a^(1/3) + b^(1/3)*c)*atan((a^(1/3) - 2*b^(1/3)*(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*a^(2/3)*(a + b*c^3)) + log(x)/(a + b*c^3) + (b^(1/3)*c*(a^(1/3) - b^(1/3)*c)*log(a^(1/3) + b^(1/3)*(c + d*x)))/(3*a^(2/3)*(a + b*c^3)) - (b^(1/3)*c*(a^(1/3) - b^(1/3)*c)*log(a^(2/3) - a^(1/3)*b^(1/3)*(c + d*x) + b^(2/3)*(c + d*x)^2))/(6*a^(2/3)*(a + b*c^3)) - log(a + b*(c + d*x)^3)/(3*(a + b*c^3))]
    @test_int [1/(x^2*(a + b*(c + d*x)^3)), x, 11, -(1/((a + b*c^3)*x)) + (b^(1/3)*(a^(1/3) - b^(1/3)*c)*(a^(1/3) + b^(1/3)*c)^3*d*atan((a^(1/3) - 2*b^(1/3)*(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*a^(2/3)*(a + b*c^3)^2) - (3*b*c^2*d*log(x))/(a + b*c^3)^2 + (b^(1/3)*(a^(1/3)*(a - 2*b*c^3) - b^(1/3)*c*(2*a - b*c^3))*d*log(a^(1/3) + b^(1/3)*(c + d*x)))/(3*a^(2/3)*(a + b*c^3)^2) - (b^(1/3)*(a^(1/3)*(a - 2*b*c^3) - b^(1/3)*c*(2*a - b*c^3))*d*log(a^(2/3) - a^(1/3)*b^(1/3)*(c + d*x) + b^(2/3)*(c + d*x)^2))/(6*a^(2/3)*(a + b*c^3)^2) + (b*c^2*d*log(a + b*(c + d*x)^3))/(a + b*c^3)^2]
    @test_int [1/(x^3*(a + b*(c + d*x)^3)), x, 11, -(1/(2*(a + b*c^3)*x^2)) + (3*b*c^2*d)/((a + b*c^3)^2*x) + (b^(2/3)*(a^(1/3) + b^(1/3)*c)^3*(a - 3*a^(2/3)*b^(1/3)*c + b*c^3)*d^2*atan((a^(1/3) - 2*b^(1/3)*(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*a^(2/3)*(a + b*c^3)^3) - (3*b*c*(a - 2*b*c^3)*d^2*log(x))/(a + b*c^3)^3 - (b^(2/3)*(a^2 + 6*a^(4/3)*b^(2/3)*c^2 - 7*a*b*c^3 - 3*a^(1/3)*b^(5/3)*c^5 + b^2*c^6)*d^2*log(a^(1/3) + b^(1/3)*(c + d*x)))/(3*a^(2/3)*(a + b*c^3)^3) + (b^(2/3)*(a^2 + 6*a^(4/3)*b^(2/3)*c^2 - 7*a*b*c^3 - 3*a^(1/3)*b^(5/3)*c^5 + b^2*c^6)*d^2*log(a^(2/3) - a^(1/3)*b^(1/3)*(c + d*x) + b^(2/3)*(c + d*x)^2))/(6*a^(2/3)*(a + b*c^3)^3) + (b*c*(a - 2*b*c^3)*d^2*log(a + b*(c + d*x)^3))/(a + b*c^3)^3]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*x^m*P4(x)^p=#

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

    @test_int [x^3/(a + b*(c + d*x)^4), x, 16, (3*c^2*atan((sqrt(b)*(c + d*x)^2)/sqrt(a)))/(2*sqrt(a)*sqrt(b)*d^4) + (c*(3*sqrt(a) + sqrt(b)*c^2)*atan(1 - (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*b^(3/4)*d^4) - (c*(3*sqrt(a) + sqrt(b)*c^2)*atan(1 + (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*b^(3/4)*d^4) - (c*(3*sqrt(a) - sqrt(b)*c^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*b^(3/4)*d^4) + (c*(3*sqrt(a) - sqrt(b)*c^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*b^(3/4)*d^4) + log(a + b*(c + d*x)^4)/(4*b*d^4)]
    @test_int [x^2/(a + b*(c + d*x)^4), x, 14, -((c*atan((sqrt(b)*(c + d*x)^2)/sqrt(a)))/(sqrt(a)*sqrt(b)*d^3)) - ((sqrt(a) + sqrt(b)*c^2)*atan(1 - (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*b^(3/4)*d^3) + ((sqrt(a) + sqrt(b)*c^2)*atan(1 + (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*b^(3/4)*d^3) + ((sqrt(a) - sqrt(b)*c^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*b^(3/4)*d^3) - ((sqrt(a) - sqrt(b)*c^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*b^(3/4)*d^3)]
    @test_int [x^1/(a + b*(c + d*x)^4), x, 14, atan((sqrt(b)*(c + d*x)^2)/sqrt(a))/(2*sqrt(a)*sqrt(b)*d^2) + (c*atan(1 - (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*b^(1/4)*d^2) - (c*atan(1 + (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*b^(1/4)*d^2) + (c*log(sqrt(a) - sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*b^(1/4)*d^2) - (c*log(sqrt(a) + sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*b^(1/4)*d^2)]
    @test_int [x^0/(a + b*(c + d*x)^4), x, 10, -(atan(1 - (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4))/(2*sqrt(2)*a^(3/4)*b^(1/4)*d)) + atan(1 + (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4))/(2*sqrt(2)*a^(3/4)*b^(1/4)*d) - log(sqrt(a) - sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2)/(4*sqrt(2)*a^(3/4)*b^(1/4)*d) + log(sqrt(a) + sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2)/(4*sqrt(2)*a^(3/4)*b^(1/4)*d)]
    @test_int [1/(x^1*(a + b*(c + d*x)^4)), x, 18, -((sqrt(b)*c^2*atan((sqrt(b)*(c + d*x)^2)/sqrt(a)))/(2*sqrt(a)*(a + b*c^4))) + (b^(1/4)*c*(sqrt(a) + sqrt(b)*c^2)*atan(1 - (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(a + b*c^4)) - (b^(1/4)*c*(sqrt(a) + sqrt(b)*c^2)*atan(1 + (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(a + b*c^4)) + log(x)/(a + b*c^4) - (b^(1/4)*c*(sqrt(a) - sqrt(b)*c^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*(a + b*c^4)) + (b^(1/4)*c*(sqrt(a) - sqrt(b)*c^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*(a + b*c^4)) - log(a + b*(c + d*x)^4)/(4*(a + b*c^4))]
    @test_int [1/(x^2*(a + b*(c + d*x)^4)), x, 18, -(1/((a + b*c^4)*x)) - (sqrt(b)*c*(a - b*c^4)*d*atan((sqrt(b)*(c + d*x)^2)/sqrt(a)))/(sqrt(a)*(a + b*c^4)^2) + (b^(1/4)*(sqrt(a)*(a - 3*b*c^4) + sqrt(b)*c^2*(3*a - b*c^4))*d*atan(1 - (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(a + b*c^4)^2) - (b^(1/4)*(sqrt(a)*(a - 3*b*c^4) + sqrt(b)*c^2*(3*a - b*c^4))*d*atan(1 + (sqrt(2)*b^(1/4)*(c + d*x))/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(a + b*c^4)^2) - (4*b*c^3*d*log(x))/(a + b*c^4)^2 - (b^(1/4)*(sqrt(a)*(a - 3*b*c^4) - sqrt(b)*c^2*(3*a - b*c^4))*d*log(sqrt(a) - sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*(a + b*c^4)^2) + (b^(1/4)*(sqrt(a)*(a - 3*b*c^4) - sqrt(b)*c^2*(3*a - b*c^4))*d*log(sqrt(a) + sqrt(2)*a^(1/4)*b^(1/4)*(c + d*x) + sqrt(b)*(c + d*x)^2))/(4*sqrt(2)*a^(3/4)*(a + b*c^4)^2) + (b*c^3*d*log(a + b*(c + d*x)^4))/(a + b*c^4)^2]

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

    @test_int [(a + 8*x - 8*x^2 + 4*x^3 - x^4)^4, x, 3, (-(8/3))*(3 + a)^3*(-1 + x)^3 + (4/5)*(3 - a)*(3 + a)^2*(-1 + x)^5 + (8/7)*(3 + a)*(5 + 3*a)*(-1 + x)^7 - (2/9)*(37 + 6*a - 3*a^2)*(-1 + x)^9 - (8/11)*(5 + 3*a)*(-1 + x)^11 + (4/13)*(3 - a)*(-1 + x)^13 + (8/15)*(-1 + x)^15 + (1/17)*(-1 + x)^17 + (3 + a)^4*x]
    @test_int [(a + 8*x - 8*x^2 + 4*x^3 - x^4)^3, x, 2, a^3*x + 12*a^2*x^2 + 8*(8 - a)*a*x^3 + (128 - 96*a + 3*a^2)*x^4 - (3/5)*(512 - 128*a + a^2)*x^5 + 8*(48 - 5*a)*x^6 - (32/7)*(70 - 3*a)*x^7 + 3*(64 - a)*x^8 - (1/3)*(256 - a)*x^9 + 28*x^10 - (72*x^11)/11 + x^12 - x^13/13]
    @test_int [(a + 8*x - 8*x^2 + 4*x^3 - x^4)^2, x, 2, a^2*x + 8*a*x^2 + (16/3)*(4 - a)*x^3 - 2*(16 - a)*x^4 + (2/5)*(64 - a)*x^5 - (40*x^6)/3 + (32*x^7)/7 - x^8 + x^9/9]
    @test_int [(a + 8*x - 8*x^2 + 4*x^3 - x^4)^1, x, 1, a*x + 4*x^2 - (8*x^3)/3 + x^4 - x^5/5]
    @test_int [1/(a + 8*x - 8*x^2 + 4*x^3 - x^4)^1, x, 4, -(atan((-1 + x)/sqrt(1 - sqrt(4 + a)))/(2*sqrt(4 + a)*sqrt(1 - sqrt(4 + a)))) + atan((-1 + x)/sqrt(1 + sqrt(4 + a)))/(2*sqrt(4 + a)*sqrt(1 + sqrt(4 + a)))]
    @test_int [1/(a + 8*x - 8*x^2 + 4*x^3 - x^4)^2, x, 5, ((5 + a + (-1 + x)^2)*(-1 + x))/(4*(12 + 7*a + a^2)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) - ((10 + 3*a + sqrt(4 + a))*atan((-1 + x)/sqrt(1 - sqrt(4 + a))))/(8*(3 + a)*(4 + a)^(3/2)*sqrt(1 - sqrt(4 + a))) + ((10 + 3*a - sqrt(4 + a))*atan((-1 + x)/sqrt(1 + sqrt(4 + a))))/(8*(3 + a)*(4 + a)^(3/2)*sqrt(1 + sqrt(4 + a)))]
    @test_int [1/(a + 8*x - 8*x^2 + 4*x^3 - x^4)^3, x, 6, If(13>=8, ((5 + a + (-1 + x)^2)*(-1 + x))/(8*(12 + 7*a + a^2)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)^2) + (((6 + a)*(25 + 7*a) + 6*(7 + 2*a)*(-1 + x)^2)*(-1 + x))/(32*(3 + a)^2*(4 + a)^2*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) - (3*(80 + 7*a^2 + 14*sqrt(4 + a) + a*(47 + 4*sqrt(4 + a)))*atan((-1 + x)/sqrt(1 - sqrt(4 + a))))/(64*(3 + a)^2*(4 + a)^(5/2)*sqrt(1 - sqrt(4 + a))) - (3*(14 + 4*a - (80 + 47*a + 7*a^2)/sqrt(4 + a))*atan((-1 + x)/sqrt(1 + sqrt(4 + a))))/(64*(3 + a)^2*(4 + a)^2*sqrt(1 + sqrt(4 + a))), ((5 + a + (-1 + x)^2)*(-1 + x))/(8*(12 + 7*a + a^2)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)^2) + (((6 + a)*(25 + 7*a) + 6*(7 + 2*a)*(-1 + x)^2)*(-1 + x))/(32*(12 + 7*a + a^2)^2*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) - (3*(80 + 7*a^2 + 14*sqrt(4 + a) + a*(47 + 4*sqrt(4 + a)))*atan((-1 + x)/sqrt(1 - sqrt(4 + a))))/(64*(3 + a)^2*(4 + a)^(5/2)*sqrt(1 - sqrt(4 + a))) - (3*(14 + 4*a - (80 + 47*a + 7*a^2)/sqrt(4 + a))*atan((-1 + x)/sqrt(1 + sqrt(4 + a))))/(64*(3 + a)^2*(4 + a)^2*sqrt(1 + sqrt(4 + a))))]

    @test_int [x*(a + 8*x - 8*x^2 + 4*x^3 - x^4)^4, x, 2, (a^4*x^2)/2 + (32*a^3*x^3)/3 + 8*(12 - a)*a^2*x^4 + (16/5)*a*(128 - 48*a + a^2)*x^5 + (2/3)*(1024 - 1536*a + 192*a^2 - a^3)*x^6 - (32/7)*(512 - 288*a + 15*a^2)*x^7 + 8*(128 - 3*a)*(4 - a)*x^8 - (16/3)*(896 - 128*a + a^2)*x^9 + (1/5)*(20480 - 1536*a + 3*a^2)*x^10 - (32/11)*(928 - 35*a)*x^11 + (8/3)*(524 - 9*a)*x^12 - (16/13)*(464 - 3*a)*x^13 + (2/7)*(640 - a)*x^14 - (224*x^15)/5 + 8*x^16 - (16*x^17)/17 + x^18/18]
    @test_int [x*(a + 8*x - 8*x^2 + 4*x^3 - x^4)^3, x, 2, (a^3*x^2)/2 + 8*a^2*x^3 + 6*(8 - a)*a*x^4 + (4/5)*(128 - 96*a + 3*a^2)*x^5 - (1/2)*(512 - 128*a + a^2)*x^6 + (48/7)*(48 - 5*a)*x^7 - 4*(70 - 3*a)*x^8 + (8/3)*(64 - a)*x^9 - (3/10)*(256 - a)*x^10 + (280*x^11)/11 - 6*x^12 + (12*x^13)/13 - x^14/14]
    @test_int [x*(a + 8*x - 8*x^2 + 4*x^3 - x^4)^2, x, 2, (a^2*x^2)/2 + (16*a*x^3)/3 + 4*(4 - a)*x^4 - (8/5)*(16 - a)*x^5 + (1/3)*(64 - a)*x^6 - (80*x^7)/7 + 4*x^8 - (8*x^9)/9 + x^10/10]
    @test_int [x*(a + 8*x - 8*x^2 + 4*x^3 - x^4)^1, x, 2, (a*x^2)/2 + (8*x^3)/3 - 2*x^4 + (4*x^5)/5 - x^6/6]
    @test_int [x/(a + 8*x - 8*x^2 + 4*x^3 - x^4)^1, x, 8, -(atan((-1 + x)/sqrt(1 - sqrt(4 + a)))/(2*sqrt(4 + a)*sqrt(1 - sqrt(4 + a)))) + atan((-1 + x)/sqrt(1 + sqrt(4 + a)))/(2*sqrt(4 + a)*sqrt(1 + sqrt(4 + a))) + atanh((1 + (-1 + x)^2)/sqrt(4 + a))/(2*sqrt(4 + a))]
    @test_int [x/(a + 8*x - 8*x^2 + 4*x^3 - x^4)^2, x, 10, (1 + (-1 + x)^2)/(4*(4 + a)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) + ((5 + a + (-1 + x)^2)*(-1 + x))/(4*(12 + 7*a + a^2)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) - ((10 + 3*a + sqrt(4 + a))*atan((-1 + x)/sqrt(1 - sqrt(4 + a))))/(8*(3 + a)*(4 + a)^(3/2)*sqrt(1 - sqrt(4 + a))) + ((10 + 3*a - sqrt(4 + a))*atan((-1 + x)/sqrt(1 + sqrt(4 + a))))/(8*(3 + a)*(4 + a)^(3/2)*sqrt(1 + sqrt(4 + a))) + atanh((1 + (-1 + x)^2)/sqrt(4 + a))/(4*(4 + a)^(3/2))]
    @test_int [x/(a + 8*x - 8*x^2 + 4*x^3 - x^4)^3, x, 12, If(13>=8, (1 + (-1 + x)^2)/(8*(4 + a)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)^2) + (3*(1 + (-1 + x)^2))/(16*(4 + a)^2*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) + ((5 + a + (-1 + x)^2)*(-1 + x))/(8*(12 + 7*a + a^2)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)^2) + (((6 + a)*(25 + 7*a) + 6*(7 + 2*a)*(-1 + x)^2)*(-1 + x))/(32*(3 + a)^2*(4 + a)^2*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) - (3*(80 + 7*a^2 + 14*sqrt(4 + a) + a*(47 + 4*sqrt(4 + a)))*atan((-1 + x)/sqrt(1 - sqrt(4 + a))))/(64*(3 + a)^2*(4 + a)^(5/2)*sqrt(1 - sqrt(4 + a))) - (3*(14 + 4*a - (80 + 47*a + 7*a^2)/sqrt(4 + a))*atan((-1 + x)/sqrt(1 + sqrt(4 + a))))/(64*(3 + a)^2*(4 + a)^2*sqrt(1 + sqrt(4 + a))) + (3*atanh((1 + (-1 + x)^2)/sqrt(4 + a)))/(16*(4 + a)^(5/2)), (1 + (-1 + x)^2)/(8*(4 + a)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)^2) + (3*(1 + (-1 + x)^2))/(16*(4 + a)^2*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) + ((5 + a + (-1 + x)^2)*(-1 + x))/(8*(12 + 7*a + a^2)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)^2) + (((6 + a)*(25 + 7*a) + 6*(7 + 2*a)*(-1 + x)^2)*(-1 + x))/(32*(12 + 7*a + a^2)^2*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) - (3*(80 + 7*a^2 + 14*sqrt(4 + a) + a*(47 + 4*sqrt(4 + a)))*atan((-1 + x)/sqrt(1 - sqrt(4 + a))))/(64*(3 + a)^2*(4 + a)^(5/2)*sqrt(1 - sqrt(4 + a))) - (3*(14 + 4*a - (80 + 47*a + 7*a^2)/sqrt(4 + a))*atan((-1 + x)/sqrt(1 + sqrt(4 + a))))/(64*(3 + a)^2*(4 + a)^2*sqrt(1 + sqrt(4 + a))) + (3*atanh((1 + (-1 + x)^2)/sqrt(4 + a)))/(16*(4 + a)^(5/2)))]

    @test_int [x^2*(a + 8*x - 8*x^2 + 4*x^3 - x^4)^4, x, 2, (a^4*x^3)/3 + 8*a^3*x^4 + (32/5)*(12 - a)*a^2*x^5 + (8/3)*a*(128 - 48*a + a^2)*x^6 + (4/7)*(1024 - 1536*a + 192*a^2 - a^3)*x^7 - 4*(512 - 288*a + 15*a^2)*x^8 + (64/9)*(128 - 3*a)*(4 - a)*x^9 - (24/5)*(896 - 128*a + a^2)*x^10 + (2/11)*(20480 - 1536*a + 3*a^2)*x^11 - (8/3)*(928 - 35*a)*x^12 + (32/13)*(524 - 9*a)*x^13 - (8/7)*(464 - 3*a)*x^14 + (4/15)*(640 - a)*x^15 - 42*x^16 + (128*x^17)/17 - (8*x^18)/9 + x^19/19]
    @test_int [x^2*(a + 8*x - 8*x^2 + 4*x^3 - x^4)^3, x, 2, (a^3*x^3)/3 + 6*a^2*x^4 + (24/5)*(8 - a)*a*x^5 + (2/3)*(128 - 96*a + 3*a^2)*x^6 - (3/7)*(512 - 128*a + a^2)*x^7 + 6*(48 - 5*a)*x^8 - (32/9)*(70 - 3*a)*x^9 + (12/5)*(64 - a)*x^10 - (3/11)*(256 - a)*x^11 + (70*x^12)/3 - (72*x^13)/13 + (6*x^14)/7 - x^15/15]
    @test_int [x^2*(a + 8*x - 8*x^2 + 4*x^3 - x^4)^2, x, 2, (a^2*x^3)/3 + 4*a*x^4 + (16/5)*(4 - a)*x^5 - (4/3)*(16 - a)*x^6 + (2/7)*(64 - a)*x^7 - 10*x^8 + (32*x^9)/9 - (4*x^10)/5 + x^11/11]
    @test_int [x^2*(a + 8*x - 8*x^2 + 4*x^3 - x^4)^1, x, 2, (a*x^3)/3 + 2*x^4 - (8*x^5)/5 + (2*x^6)/3 - x^7/7]
    @test_int [x^2/(a + 8*x - 8*x^2 + 4*x^3 - x^4)^1, x, 9, -(atan((-1 + x)/sqrt(1 - sqrt(4 + a)))/(2*sqrt(1 - sqrt(4 + a)))) - atan((-1 + x)/sqrt(1 + sqrt(4 + a)))/(2*sqrt(1 + sqrt(4 + a))) + atanh((1 + (-1 + x)^2)/sqrt(4 + a))/sqrt(4 + a)]
    @test_int [x^2/(a + 8*x - 8*x^2 + 4*x^3 - x^4)^2, x, 11, (1 + (-1 + x)^2)/(2*(4 + a)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) + ((4 + a)*(2 + (-1 + x)^2)*(-1 + x))/(4*(12 + 7*a + a^2)*(3 + a - 2*(-1 + x)^2 - (-1 + x)^4)) - ((4 + a + sqrt(4 + a))*atan((-1 + x)/sqrt(1 - sqrt(4 + a))))/(8*(3 + a)*(4 + a)*sqrt(1 - sqrt(4 + a))) - ((4 + a - sqrt(4 + a))*atan((-1 + x)/sqrt(1 + sqrt(4 + a))))/(8*(3 + a)*(4 + a)*sqrt(1 + sqrt(4 + a))) + atanh((1 + (-1 + x)^2)/sqrt(4 + a))/(2*(4 + a)^(3/2))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*x^m*P6(x)^p=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*x^m*(a+b*x^2+c*x^3+d*x^4+e*x^6)^p*when*b^2-3*a*d=0*and*b^3-27*a^2*e=0=#

    #= ::Subsubsection:: =#
    #=p>0=#

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [x^4/(27*a^3 + 27*a^2*b*x^2 + 27*a^2*c*x^3 + 9*a*b^2*x^4 + b^3*x^6), x, 14, -(((-1)^(1/3)*(2*(-1)^(1/3)*b + 3*a^(1/3)*c^(2/3))*atan((3*(-1)^(1/3)*a^(2/3)*c^(1/3) - 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3)))))/(3*sqrt(3)*(1 + (-1)^(1/3))^2*a^(5/6)*b^2*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))*c^(2/3))) - ((2*b - 3*a^(1/3)*c^(2/3))*atan((3*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*a^(1/3)*c^(2/3)))))/(9*sqrt(3)*a^(5/6)*b^2*sqrt(4*b - 3*a^(1/3)*c^(2/3))*c^(2/3)) - ((-1)^(2/3)*(2*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3))*atan((3*(-1)^(2/3)*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3)))))/(3*sqrt(3)*(1 - (-1)^(1/3))*(1 + (-1)^(1/3))^2*a^(5/6)*b^2*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3))*c^(2/3)) - log(3*a + 3*a^(2/3)*c^(1/3)*x + b*x^2)/(18*a^(2/3)*b^2*c^(1/3)) + log(3*a - 3*(-1)^(1/3)*a^(2/3)*c^(1/3)*x + b*x^2)/(6*(1 + (-1)^(1/3))^2*a^(2/3)*b^2*c^(1/3)) + ((-1)^(1/3)*log(3*a + 3*(-1)^(2/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(18*a^(2/3)*b^2*c^(1/3))]
    @test_int [x^3/(27*a^3 + 27*a^2*b*x^2 + 27*a^2*c*x^3 + 9*a*b^2*x^4 + b^3*x^6), x, 14, -(atan((3*(-1)^(1/3)*a^(2/3)*c^(1/3) - 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))))/(3*sqrt(3)*(1 + (-1)^(1/3))^2*a^(7/6)*b*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))*c^(1/3))) - atan((3*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*a^(1/3)*c^(2/3))))/(9*sqrt(3)*a^(7/6)*b*sqrt(4*b - 3*a^(1/3)*c^(2/3))*c^(1/3)) + ((-1)^(1/3)*atan((3*(-1)^(2/3)*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3)))))/(3*sqrt(3)*(1 - (-1)^(1/3))*(1 + (-1)^(1/3))^2*a^(7/6)*b*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3))*c^(1/3)) + log(3*a + 3*a^(2/3)*c^(1/3)*x + b*x^2)/(54*a^(4/3)*b*c^(2/3)) - ((-1)^(2/3)*log(3*a - 3*(-1)^(1/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(18*(1 + (-1)^(1/3))^2*a^(4/3)*b*c^(2/3)) + ((-1)^(2/3)*log(3*a + 3*(-1)^(2/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(54*a^(4/3)*b*c^(2/3))]
    @test_int [x^2/(27*a^3 + 27*a^2*b*x^2 + 27*a^2*c*x^3 + 9*a*b^2*x^4 + b^3*x^6), x, 8, (2*(-1)^(2/3)*atan((3*(-1)^(1/3)*a^(2/3)*c^(1/3) - 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3)))))/(9*sqrt(3)*(1 + (-1)^(1/3))^2*a^(11/6)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))*c^(2/3)) + (2*atan((3*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*a^(1/3)*c^(2/3)))))/(27*sqrt(3)*a^(11/6)*sqrt(4*b - 3*a^(1/3)*c^(2/3))*c^(2/3)) + (2*(-1)^(2/3)*atan((3*(-1)^(2/3)*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3)))))/(9*sqrt(3)*(1 - (-1)^(1/3))*(1 + (-1)^(1/3))^2*a^(11/6)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3))*c^(2/3))]
    @test_int [x^1/(27*a^3 + 27*a^2*b*x^2 + 27*a^2*c*x^3 + 9*a*b^2*x^4 + b^3*x^6), x, 14, -(atan((3*(-1)^(1/3)*a^(2/3)*c^(1/3) - 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))))/(9*sqrt(3)*(1 + (-1)^(1/3))^2*a^(13/6)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))*c^(1/3))) - atan((3*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*a^(1/3)*c^(2/3))))/(27*sqrt(3)*a^(13/6)*sqrt(4*b - 3*a^(1/3)*c^(2/3))*c^(1/3)) + ((-1)^(1/3)*atan((3*(-1)^(2/3)*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3)))))/(9*sqrt(3)*(1 - (-1)^(1/3))*(1 + (-1)^(1/3))^2*a^(13/6)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3))*c^(1/3)) - log(3*a + 3*a^(2/3)*c^(1/3)*x + b*x^2)/(162*a^(7/3)*c^(2/3)) + ((-1)^(2/3)*log(3*a - 3*(-1)^(1/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(54*(1 + (-1)^(1/3))^2*a^(7/3)*c^(2/3)) - ((-1)^(2/3)*log(3*a + 3*(-1)^(2/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(162*a^(7/3)*c^(2/3))]
    @test_int [x^0/(27*a^3 + 27*a^2*b*x^2 + 27*a^2*c*x^3 + 9*a*b^2*x^4 + b^3*x^6), x, 14, -(((-1)^(1/3)*(2*(-1)^(1/3)*b + 3*a^(1/3)*c^(2/3))*atan((3*(-1)^(1/3)*a^(2/3)*c^(1/3) - 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3)))))/(27*sqrt(3)*(1 + (-1)^(1/3))^2*a^(17/6)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))*c^(2/3))) - ((2*b - 3*a^(1/3)*c^(2/3))*atan((3*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*a^(1/3)*c^(2/3)))))/(81*sqrt(3)*a^(17/6)*sqrt(4*b - 3*a^(1/3)*c^(2/3))*c^(2/3)) - ((2*(-1)^(2/3)*b - 3*a^(1/3)*c^(2/3))*atan((3*(-1)^(2/3)*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3)))))/(27*sqrt(3)*(1 - (-1)^(1/3))*(1 + (-1)^(1/3))^2*a^(17/6)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3))*c^(2/3)) + log(3*a + 3*a^(2/3)*c^(1/3)*x + b*x^2)/(162*a^(8/3)*c^(1/3)) - log(3*a - 3*(-1)^(1/3)*a^(2/3)*c^(1/3)*x + b*x^2)/(54*(1 + (-1)^(1/3))^2*a^(8/3)*c^(1/3)) - ((-1)^(1/3)*log(3*a + 3*(-1)^(2/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(162*a^(8/3)*c^(1/3))]
    @test_int [1/(x^1*(27*a^3 + 27*a^2*b*x^2 + 27*a^2*c*x^3 + 9*a*b^2*x^4 + b^3*x^6)), x, 14, ((b - (-1)^(2/3)*a^(1/3)*c^(2/3))*atan((3*(-1)^(1/3)*a^(2/3)*c^(1/3) - 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3)))))/(9*sqrt(3)*(1 + (-1)^(1/3))^2*a^(19/6)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))*c^(1/3)) + ((b - a^(1/3)*c^(2/3))*atan((3*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*a^(1/3)*c^(2/3)))))/(27*sqrt(3)*a^(19/6)*sqrt(4*b - 3*a^(1/3)*c^(2/3))*c^(1/3)) + ((-1)^(2/3)*((-1)^(2/3)*b - a^(1/3)*c^(2/3))*atan((3*(-1)^(2/3)*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3)))))/(9*sqrt(3)*(1 - (-1)^(1/3))*(1 + (-1)^(1/3))^2*a^(19/6)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3))*c^(1/3)) + log(x)/(27*a^3) - ((3*a^(1/3) - b/c^(2/3))*log(3*a + 3*a^(2/3)*c^(1/3)*x + b*x^2))/(486*a^(10/3)) - ((b + im*sqrt(3)*b + 6*a^(1/3)*c^(2/3))*log(3*a - 3*(-1)^(1/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(972*a^(10/3)*c^(2/3)) - ((3*a^(1/3) - ((-1)^(2/3)*b)/c^(2/3))*log(3*a + 3*(-1)^(2/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(486*a^(10/3))]
    @test_int [1/(x^2*(27*a^3 + 27*a^2*b*x^2 + 27*a^2*c*x^3 + 9*a*b^2*x^4 + b^3*x^6)), x, 14, -(1/(27*a^3*x)) + ((2*(-1)^(2/3)*b^2 + 12*(-1)^(1/3)*a^(1/3)*b*c^(2/3) + 9*a^(2/3)*c^(4/3))*atan((3*(-1)^(1/3)*a^(2/3)*c^(1/3) - 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3)))))/(81*sqrt(3)*(1 + (-1)^(1/3))^2*a^(23/6)*sqrt(4*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))*c^(2/3)) + ((2*b^2 - 12*a^(1/3)*b*c^(2/3) + 9*a^(2/3)*c^(4/3))*atan((3*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b - 3*a^(1/3)*c^(2/3)))))/(243*sqrt(3)*a^(23/6)*sqrt(4*b - 3*a^(1/3)*c^(2/3))*c^(2/3)) + ((-1)^(2/3)*(2*b^2 + 12*(-1)^(1/3)*a^(1/3)*b*c^(2/3) + 9*(-1)^(2/3)*a^(2/3)*c^(4/3))*atan((3*(-1)^(2/3)*a^(2/3)*c^(1/3) + 2*b*x)/(sqrt(3)*sqrt(a)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3)))))/(81*sqrt(3)*(1 - (-1)^(1/3))*(1 + (-1)^(1/3))^2*a^(23/6)*sqrt(4*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3))*c^(2/3)) - ((2*b - 3*a^(1/3)*c^(2/3))*log(3*a + 3*a^(2/3)*c^(1/3)*x + b*x^2))/(486*a^(11/3)*c^(1/3)) + ((2*b - 3*(-1)^(2/3)*a^(1/3)*c^(2/3))*log(3*a - 3*(-1)^(1/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(162*(1 + (-1)^(1/3))^2*a^(11/3)*c^(1/3)) + ((-1)^(1/3)*(2*b + 3*(-1)^(1/3)*a^(1/3)*c^(2/3))*log(3*a + 3*(-1)^(2/3)*a^(2/3)*c^(1/3)*x + b*x^2))/(486*a^(11/3)*c^(1/3))]

    @test_int [x^5/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6), x, 14, -(((-2)^(1/3)*(1 + (-2)^(1/3)*3^(2/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(3^(5/6)*sqrt(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3)))) + ((3/2)^(1/6)*(1 - (-3)^(2/3)*2^(1/3))*atan((2^(1/6)*(3*(-3)^(1/3) - 2^(1/3)*x))/sqrt(3*(4 - 3*(-3)^(2/3)*2^(1/3)))))/((1 + (-1)^(1/3))^2*sqrt(4 - 3*(-3)^(2/3)*2^(1/3))) - ((1 - 2^(1/3)*3^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(2^(1/6)*3^(5/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3))) + (1/216)*(36 + 2^(2/3)*3^(1/3)*(1 + im*sqrt(3)))*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2) + (1/108)*(18 - (-2)^(2/3)*3^(1/3))*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2) + (1/108)*(18 - 2^(2/3)*3^(1/3))*log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)]
    @test_int [x^4/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6), x, 14, ((-1)^(2/3)*(3*(-3)^(2/3) - 2^(2/3))*atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(9*3^(1/6)*(1 + (-1)^(1/3))^2*sqrt(2*(4 - 3*(-3)^(2/3)*2^(1/3)))) + ((9 - (-2)^(2/3)*3^(1/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(27*sqrt(3*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3)))) - ((9 - 2^(2/3)*3^(1/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(27*sqrt(6*(-4 + 3*2^(1/3)*3^(2/3)))) + log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2)/(6*2^(2/3)*3^(1/3)*(1 + (-1)^(1/3))^2) + ((-(1/3))^(1/3)*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(18*2^(2/3)) - log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(18*2^(2/3)*3^(1/3))]
    @test_int [x^3/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6), x, 14, -(atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3))))/(6*2^(1/6)*3^(5/6)*(1 + (-1)^(1/3))^2*sqrt(4 - 3*(-3)^(2/3)*2^(1/3)))) + ((-1)^(1/3)*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(9*2^(2/3)*3^(5/6)*sqrt(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))) + atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(18*2^(1/6)*3^(5/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3))) - ((-1)^(2/3)*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))/(36*2^(1/3)*3^(2/3)*(1 + (-1)^(1/3))^2) + ((-1)^(2/3)*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(108*2^(1/3)*3^(2/3)) + log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(108*2^(1/3)*3^(2/3))]
    @test_int [x^2/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6), x, 8, ((-1)^(2/3)*atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(27*2^(5/6)*3^(1/6)*(1 + (-1)^(1/3))^2*sqrt(4 - 3*(-3)^(2/3)*2^(1/3))) + ((-1)^(2/3)*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(81*2^(1/3)*3^(1/6)*sqrt(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))) - atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(81*2^(5/6)*3^(1/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3)))]
    @test_int [x^1/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6), x, 14, -(atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3))))/(36*2^(1/6)*3^(5/6)*(1 + (-1)^(1/3))^2*sqrt(4 - 3*(-3)^(2/3)*2^(1/3)))) + ((-1)^(1/3)*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(54*2^(2/3)*3^(5/6)*sqrt(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))) + atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(108*2^(1/6)*3^(5/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3))) + ((-1)^(2/3)*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))/(216*2^(1/3)*3^(2/3)*(1 + (-1)^(1/3))^2) - ((-1)^(2/3)*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(648*2^(1/3)*3^(2/3)) - log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(648*2^(1/3)*3^(2/3))]
    @test_int [x^0/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6), x, 14, ((-1)^(2/3)*(3*(-3)^(2/3) - 2^(2/3))*atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(324*3^(1/6)*(1 + (-1)^(1/3))^2*sqrt(2*(4 - 3*(-3)^(2/3)*2^(1/3)))) + ((9 - (-2)^(2/3)*3^(1/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(972*sqrt(3*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3)))) - ((9 - 2^(2/3)*3^(1/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(972*sqrt(6*(-4 + 3*2^(1/3)*3^(2/3)))) - log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2)/(216*2^(2/3)*3^(1/3)*(1 + (-1)^(1/3))^2) - ((-(1/3))^(1/3)*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(648*2^(2/3)) + log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(648*2^(2/3)*3^(1/3))]
    @test_int [1/(x^1*(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6)), x, 14, ((-1)^(2/3)*((-2)^(2/3) - 2*3^(2/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(216*2^(1/3)*3^(5/6)*sqrt(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))) - ((-1)^(2/3)*((-3)^(1/3) + 3*2^(1/3))*atan((2^(1/6)*(3*(-3)^(1/3) - 2^(1/3)*x))/sqrt(3*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(216*6^(1/6)*(1 + (-1)^(1/3))^2*sqrt(4 - 3*(-3)^(2/3)*2^(1/3))) - ((1 - 2^(1/3)*3^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(216*2^(1/6)*3^(5/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3))) + log(x)/216 - ((36 + 2^(2/3)*3^(1/3)*(1 + im*sqrt(3)))*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))/46656 - ((18 - (-2)^(2/3)*3^(1/3))*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/23328 - ((18 - 2^(2/3)*3^(1/3))*log(6 + 3*2^(2/3)*3^(1/3)*x + x^2))/23328]
    @test_int [1/(x^2*(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6)), x, 14, -(1/(216*x)) - ((27*(-6)^(1/3) - (-2)^(2/3) + 12*3^(2/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(5832*3^(1/6)*sqrt(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))) - ((-1)^(2/3)*(6*(-6)^(2/3) + 27*(-3)^(1/3) - 2^(1/3))*atan((2^(1/6)*(3*(-3)^(1/3) - 2^(1/3)*x))/sqrt(3*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(1944*6^(1/6)*(1 + (-1)^(1/3))^2*sqrt(4 - 3*(-3)^(2/3)*2^(1/3))) - ((2^(1/3) + 27*3^(1/3) - 6*6^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(5832*6^(1/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3))) - ((-1)^(2/3)*(9 + (-3)^(1/3)*2^(2/3))*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))/(1296*2^(1/3)*3^(2/3)*(1 + (-1)^(1/3))^2) + ((3*(-6)^(2/3) + 2*(-2)^(1/3))*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(7776*3^(1/3)) - ((2^(2/3) - 3*3^(2/3))*log(6 + 3*2^(2/3)*3^(1/3)*x + x^2))/(3888*6^(1/3))]

    @test_int [x^8/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6)^2, x, 23, -(((-(1/3))^(1/3)*(9*(6 + (-3)^(1/3)*2^(2/3)) + (2 - 2^(2/3)*(6*(-6)^(2/3) + 27*(-3)^(1/3)))*x))/(162*2^(2/3)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))*(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))) - ((-(1/3))^(1/3)*(9*(6 - (-2)^(2/3)*3^(1/3)) + (2 + 27*(-2)^(2/3)*3^(1/3) + 12*(-2)^(1/3)*3^(2/3))*x))/(729*2^(2/3)*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))*(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2)) + (9*(6 - 2^(2/3)*3^(1/3)) + (2 + 2^(2/3)*(27*3^(1/3) - 6*6^(2/3)))*x)/(1458*2^(2/3)*3^(1/3)*(4 - 3*2^(1/3)*3^(2/3))*(6 + 3*2^(2/3)*3^(1/3)*x + x^2)) - (im*((-2)^(2/3) + 6*3^(2/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(162*2^(5/6)*3^(1/3)*(1 + (-1)^(1/3))^5*sqrt(4 + 3*(-2)^(1/3)*3^(2/3))) - ((-1)^(1/3)*(2 + 27*(-2)^(2/3)*3^(1/3) + 12*(-2)^(1/3)*3^(2/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(162*2^(1/6)*3^(5/6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(4 + 3*(-2)^(1/3)*3^(2/3))^(3/2)) - ((-1)^(1/3)*(6*(-6)^(2/3) + 27*(-3)^(1/3) - 2^(1/3))*atan((2^(1/6)*(3*(-3)^(1/3) - 2^(1/3)*x))/sqrt(3*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(81*sqrt(2)*3^(5/6)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))^(3/2)) + ((im*2^(2/3) - 9*3^(1/6) - 3*im*3^(2/3))*atan((2^(1/6)*(3*(-3)^(1/3) - 2^(1/3)*x))/sqrt(3*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(162*2^(5/6)*3^(1/3)*(1 + (-1)^(1/3))^5*sqrt(4 - 3*(-3)^(2/3)*2^(1/3))) - ((1 + 3*2^(1/3)*3^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(1458*2^(1/6)*3^(5/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3))) + ((2^(1/3) + 27*3^(1/3) - 6*6^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(81*sqrt(2)*3^(5/6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(-4 + 3*2^(1/3)*3^(2/3))^(3/2)) - log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2)/(972*2^(1/3)*3^(2/3)*(1 + (-1)^(1/3))^4) + (im*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(972*2^(1/3)*3^(1/6)*(1 + (-1)^(1/3))^5) - log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(8748*2^(1/3)*3^(2/3))]
    @test_int [x^7/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6)^2, x, 23, -((2*(2*(-1)^(1/3)*3^(2/3) + 9*6^(1/3)) - 9*((-2)^(2/3) + 2*(-1)^(1/3)*3^(2/3))*x)/(972*2^(2/3)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))*(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))) - ((-6)^(1/3)*(9*(-2)^(1/3) + 2*3^(1/3)) - 9*(1 + (-2)^(1/3)*3^(2/3))*x)/(4374*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))*(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2)) + (2*(2 - 3*2^(1/3)*3^(2/3)) - 3*(6 - 2^(2/3)*3^(1/3))*x)/(2916*2^(2/3)*3^(1/3)*(4 - 3*2^(1/3)*3^(2/3))*(6 + 3*2^(2/3)*3^(1/3)*x + x^2)) + ((9*im + 3^(1/3)*(2*im*2^(2/3) - 9*3^(1/6) + 2*2^(2/3)*sqrt(3)))*atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(5832*(1 + (-1)^(1/3))^5*sqrt(2*(4 - 3*(-3)^(2/3)*2^(1/3)))) + ((1 + (-2)^(1/3)*3^(2/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(54*sqrt(6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(4 + 3*(-2)^(1/3)*3^(2/3))^(3/2)) + ((9*3^(1/6) + im*(4*2^(2/3) - 3*3^(2/3)))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(1944*3^(2/3)*(1 + (-1)^(1/3))^5*sqrt(2*(4 + 3*(-2)^(1/3)*3^(2/3)))) - ((-1)^(1/3)*((-3)^(1/3) + 3*2^(1/3))*atan((2^(1/6)*(3*(-3)^(1/3) - 2^(1/3)*x))/sqrt(3*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(54*sqrt(2)*3^(5/6)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))^(3/2)) + ((1 - 2^(1/3)*3^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(54*sqrt(6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(-4 + 3*2^(1/3)*3^(2/3))^(3/2)) + ((2*2^(2/3) + 3*3^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(26244*3^(1/6)*sqrt(2*(-4 + 3*2^(1/3)*3^(2/3)))) + (im*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))/(648*2^(2/3)*3^(5/6)*(1 + (-1)^(1/3))^5) - ((im + sqrt(3))*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(1296*2^(2/3)*3^(5/6)*(1 + (-1)^(1/3))^5) - log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(17496*2^(2/3)*3^(1/3))]
    @test_int [x^6/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6)^2, x, 14, (9*(-2)^(2/3) + 6^(1/3)*(9 + (-3)^(1/3)*2^(2/3))*x)/(2916*2^(2/3)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))*(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2)) + (9*2^(2/3) + (-1)^(1/3)*3^(2/3)*(2 + 3*(-2)^(1/3)*3^(2/3))*x)/(13122*2^(2/3)*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))*(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2)) + (3*2^(2/3)*3^(1/3) - (2 - 3*2^(1/3)*3^(2/3))*x)/(8748*2^(2/3)*3^(1/3)*(4 - 3*2^(1/3)*3^(2/3))*(6 + 3*2^(2/3)*3^(1/3)*x + x^2)) + ((-1)^(1/3)*(3*(-3)^(2/3) - 2^(2/3))*atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(486*6^(5/6)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))^(3/2)) + ((3*(-3)^(2/3) + (-1)^(1/3)*2^(2/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(486*6^(5/6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(4 + 3*(-2)^(1/3)*3^(2/3))^(3/2)) - ((2^(2/3) - 3*3^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(486*6^(5/6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(-4 + 3*2^(1/3)*3^(2/3))^(3/2)) + ((-(1/3))^(1/6)*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))/(5832*2^(1/3)*(1 + (-1)^(1/3))^5) - (im*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(5832*2^(1/3)*3^(1/6)*(1 + (-1)^(1/3))^5) + log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(52488*2^(1/3)*3^(2/3))]
    @test_int [x^5/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6)^2, x, 17, ((-(1/3))^(1/3)*(4 - (-3)^(1/3)*2^(2/3)*x))/(1944*2^(2/3)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))*(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2)) + ((-(1/3))^(1/3)*(4 + (-2)^(2/3)*3^(1/3)*x))/(8748*2^(2/3)*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))*(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2)) - (4 + 2^(2/3)*3^(1/3)*x)/(17496*2^(2/3)*3^(1/3)*(4 - 3*2^(1/3)*3^(2/3))*(6 + 3*2^(2/3)*3^(1/3)*x + x^2)) - atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3))))/(4374*2^(5/6)*3^(1/6)*(1 + (-1)^(1/3))^4*sqrt(4 - 3*(-3)^(2/3)*2^(1/3))) + atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3))))/(4374*sqrt(3)*(8 - 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))^(3/2)) - (im*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(1458*2^(5/6)*3^(2/3)*(1 + (-1)^(1/3))^5*sqrt(4 + 3*(-2)^(1/3)*3^(2/3))) - atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3))))/(4374*sqrt(3)*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))^(3/2)) - atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(8748*sqrt(6)*(-4 + 3*2^(1/3)*3^(2/3))^(3/2)) - atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(39366*2^(5/6)*3^(1/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3)))]
    @test_int [x^4/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6)^2, x, 23, ((-(1/3))^(1/3)*(3*(-3)^(1/3)*2^(2/3) - 2*x))/(5832*2^(2/3)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))*(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2)) - ((-(1/3))^(1/3)*(3*(-2)^(2/3)*3^(1/3) + 2*x))/(26244*2^(2/3)*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))*(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2)) - (3*3^(1/3) + 2^(1/3)*x)/(52488*(9*2^(1/3) - 4*3^(1/3))*(6 + 3*2^(2/3)*3^(1/3)*x + x^2)) + ((-1)^(1/3)*atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(729*2^(2/3)*3^(5/6)*(1 + (-1)^(1/3))^4*(8 - 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))^(3/2)) - ((-1)^(1/3)*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(2916*2^(1/6)*3^(5/6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(4 + 3*(-2)^(1/3)*3^(2/3))^(3/2)) - ((im + sqrt(3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(11664*2^(1/6)*3^(1/3)*(1 + (-1)^(1/3))^5*sqrt(4 + 3*(-2)^(1/3)*3^(2/3))) - (im*atan((2^(1/6)*(3*(-3)^(1/3) - 2^(1/3)*x))/sqrt(3*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(5832*2^(1/6)*3^(1/3)*(1 + (-1)^(1/3))^5*sqrt(4 - 3*(-3)^(2/3)*2^(1/3))) + atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(26244*2^(1/6)*3^(5/6)*(-4 + 3*2^(1/3)*3^(2/3))^(3/2)) + atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(52488*2^(1/6)*3^(5/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3))) - log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2)/(34992*2^(1/3)*3^(2/3)*(1 + (-1)^(1/3))^4) + (im*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(34992*2^(1/3)*3^(1/6)*(1 + (-1)^(1/3))^5) - log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(314928*2^(1/3)*3^(2/3))]
    @test_int [x^3/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6)^2, x, 23, ((-6)^(1/3)*(2*(-3)^(1/3) + 9*2^(1/3)) - 3*x)/(157464*(8 - 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))*(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2)) - ((-6)^(1/3)*(9*(-2)^(1/3) + 2*3^(1/3)) + 3*x)/(157464*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))*(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2)) - (2*2^(1/3) - 3*6^(2/3) - 3^(1/3)*x)/(104976*(9*2^(1/3) - 4*3^(1/3))*(6 + 3*2^(2/3)*3^(1/3)*x + x^2)) + atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3))))/(26244*sqrt(3)*(8 - 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))^(3/2)) - ((9*im - 3^(1/3)*(2*im*2^(2/3) + 9*3^(1/6) + 2*2^(2/3)*sqrt(3)))*atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(209952*(1 + (-1)^(1/3))^5*sqrt(2*(4 - 3*(-3)^(2/3)*2^(1/3)))) - atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3))))/(26244*sqrt(3)*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))^(3/2)) + ((9*im + 3^(1/3)*(4*im*2^(2/3) - 9*3^(1/6)))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(209952*(1 + (-1)^(1/3))^5*sqrt(2*(4 + 3*(-2)^(1/3)*3^(2/3)))) - atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(52488*sqrt(6)*(-4 + 3*2^(1/3)*3^(2/3))^(3/2)) + ((2*2^(2/3) - 3*3^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(944784*3^(1/6)*sqrt(2*(-4 + 3*2^(1/3)*3^(2/3)))) - (im*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))/(23328*2^(2/3)*3^(5/6)*(1 + (-1)^(1/3))^5) + ((im + sqrt(3))*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(46656*2^(2/3)*3^(5/6)*(1 + (-1)^(1/3))^5) + log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(629856*2^(2/3)*3^(1/3))]
    @test_int [x^2/(216 + 108*x^2 + 324*x^3 + 18*x^4 + x^6)^2, x, 23, If(13>=8, -((27*((-2)^(2/3) + 2*(-1)^(1/3)*3^(2/3)) - 6^(1/3)*(9 + (-3)^(1/3)*2^(2/3))*x)/(104976*2^(2/3)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))*(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))) - (27*2^(2/3)*(1 + (-2)^(1/3)*3^(2/3)) - (-1)^(1/3)*3^(2/3)*(2 + 3*(-2)^(1/3)*3^(2/3))*x)/(472392*2^(2/3)*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))*(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2)) + (9*(6 - 2^(2/3)*3^(1/3)) - (2 - 3*2^(1/3)*3^(2/3))*x)/(314928*2^(2/3)*3^(1/3)*(4 - 3*2^(1/3)*3^(2/3))*(6 + 3*2^(2/3)*3^(1/3)*x + x^2)) - ((1 + im*sqrt(3) + 3*2^(1/3)*3^(2/3))*atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(8748*2^(2/3)*3^(5/6)*(1 + (-1)^(1/3))^4*(8 - 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))^(3/2)) + ((3*(-3)^(2/3) + (-1)^(1/3)*2^(2/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(17496*6^(5/6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(4 + 3*(-2)^(1/3)*3^(2/3))^(3/2)) + ((im + sqrt(3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(34992*2^(1/6)*3^(1/3)*(1 + (-1)^(1/3))^5*sqrt(4 + 3*(-2)^(1/3)*3^(2/3))) + (im*atan((2^(1/6)*(3*(-3)^(1/3) - 2^(1/3)*x))/sqrt(3*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(17496*2^(1/6)*3^(1/3)*(1 + (-1)^(1/3))^5*sqrt(4 - 3*(-3)^(2/3)*2^(1/3))) - ((2^(2/3) - 3*3^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(17496*6^(5/6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(-4 + 3*2^(1/3)*3^(2/3))^(3/2)) - atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(157464*2^(1/6)*3^(5/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3))) + ((im + sqrt(3))*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))/(419904*2^(1/3)*3^(1/6)*(1 + (-1)^(1/3))^5) - (im*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(209952*2^(1/3)*3^(1/6)*(1 + (-1)^(1/3))^5) + log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(1889568*2^(1/3)*3^(2/3)), -((27*((-2)^(2/3) + 2*(-1)^(1/3)*3^(2/3)) - 6^(1/3)*(9 + (-3)^(1/3)*2^(2/3))*x)/(104976*2^(2/3)*(1 + (-1)^(1/3))^4*(4 - 3*(-3)^(2/3)*2^(1/3))*(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))) - (27*(2^(2/3) + 2*(-1)^(1/3)*3^(2/3)) - (-1)^(1/3)*3^(2/3)*(2 + 3*(-2)^(1/3)*3^(2/3))*x)/(472392*2^(2/3)*(8 + 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))*(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2)) + (9*(6 - 2^(2/3)*3^(1/3)) - (2 - 3*2^(1/3)*3^(2/3))*x)/(314928*2^(2/3)*3^(1/3)*(4 - 3*2^(1/3)*3^(2/3))*(6 + 3*2^(2/3)*3^(1/3)*x + x^2)) - ((1 + im*sqrt(3) + 3*2^(1/3)*3^(2/3))*atan((3*(-3)^(1/3)*2^(2/3) - 2*x)/sqrt(6*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(8748*2^(2/3)*3^(5/6)*(1 + (-1)^(1/3))^4*(8 - 9*im*2^(1/3)*3^(1/6) + 3*2^(1/3)*3^(2/3))^(3/2)) + ((3*(-3)^(2/3) + (-1)^(1/3)*2^(2/3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(17496*6^(5/6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(4 + 3*(-2)^(1/3)*3^(2/3))^(3/2)) + ((im + sqrt(3))*atan((3*(-2)^(2/3)*3^(1/3) + 2*x)/sqrt(6*(4 + 3*(-2)^(1/3)*3^(2/3)))))/(34992*2^(1/6)*3^(1/3)*(1 + (-1)^(1/3))^5*sqrt(4 + 3*(-2)^(1/3)*3^(2/3))) + (im*atan((2^(1/6)*(3*(-3)^(1/3) - 2^(1/3)*x))/sqrt(3*(4 - 3*(-3)^(2/3)*2^(1/3)))))/(17496*2^(1/6)*3^(1/3)*(1 + (-1)^(1/3))^5*sqrt(4 - 3*(-3)^(2/3)*2^(1/3))) - ((2^(2/3) - 3*3^(2/3))*atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3)))))/(17496*6^(5/6)*(1 - (-1)^(1/3))^2*(1 + (-1)^(1/3))^4*(-4 + 3*2^(1/3)*3^(2/3))^(3/2)) - atanh((2^(1/6)*(3*3^(1/3) + 2^(1/3)*x))/sqrt(3*(-4 + 3*2^(1/3)*3^(2/3))))/(157464*2^(1/6)*3^(5/6)*sqrt(-4 + 3*2^(1/3)*3^(2/3))) + ((im + sqrt(3))*log(6 - 3*(-3)^(1/3)*2^(2/3)*x + x^2))/(419904*2^(1/3)*3^(1/6)*(1 + (-1)^(1/3))^5) - (im*log(6 + 3*(-2)^(2/3)*3^(1/3)*x + x^2))/(209952*2^(1/3)*3^(1/6)*(1 + (-1)^(1/3))^5) + log(6 + 3*2^(2/3)*3^(1/3)*x + x^2)/(1889568*2^(1/3)*3^(2/3)))]

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*P(x)^p*Q(x)=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P1(x)^p*Q(x)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P1(x)^p*Q5(x)=#

    #= Can*cancel*GCD*of*numerator*and*denominator. =#
    @test_int [(a^2*c + a^2*d*x + 2*a*b*c*x^2 + 2*a*b*d*x^3 + b^2*c*x^4 + b^2*d*x^5)/(c + d*x)^1, x, 2, a^2*x + (2/3)*a*b*x^3 + (b^2*x^5)/5]
    @test_int [(a^2*c + a^2*d*x + 2*a*b*c*x^2 + 2*a*b*d*x^3 + b^2*c*x^4 + b^2*d*x^5)/(c + d*x)^2, x, 4, -((b*c*(b*c^2 + 2*a*d^2)*x)/d^4) + (b*(b*c^2 + 2*a*d^2)*x^2)/(2*d^3) - (b^2*c*x^3)/(3*d^2) + (b^2*x^4)/(4*d) + ((b*c^2 + a*d^2)^2*log(c + d*x))/d^5]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P2(x)^p*Q(x)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P2(x)^p*Q1(x)=#

    @test_int [x^0*(b + 2*c*x^1)*(b*x + c*x^2)^13, x, 1, (1/14)*(b*x + c*x^2)^14]
    @test_int [x^14*(b + 2*c*x^2)*(b*x + c*x^3)^13, x, 3, (1/28)*x^28*(b + c*x^2)^14]
    @test_int [x^28*(b + 2*c*x^3)*(b*x + c*x^4)^13, x, 3, (1/42)*x^42*(b + c*x^3)^14]
    @test_int [x^(14*(n - 1))*(b + 2*c*x^n)*(b*x + c*x^(n+1))^13, x, 3, (x^(14*n)*(b + c*x^n)^14)/(14*n)]

    @test_int [x^0*(b + 2*c*x^1)/(b*x + c*x^2), x, 1, log(b*x + c*x^2)]
    @test_int [x^0*(b + 2*c*x^2)/(b*x + c*x^3), x, 4, log(x) + (1/2)*log(b + c*x^2)]
    @test_int [x^0*(b + 2*c*x^3)/(b*x + c*x^4), x, 4, log(x) + (1/3)*log(b + c*x^3)]
    @test_int [x^0*(b + 2*c*x^n)/(b*x + c*x^(n+1)), x, 4, log(x) + log(b + c*x^n)/n]

    @test_int [x^0*(b + 2*c*x^1)/(b*x + c*x^2)^8, x, 1, -(1/(7*(b*x + c*x^2)^7))]
    @test_int [x^(-7)*(b + 2*c*x^2)/(b*x + c*x^3)^8, x, 3, -(1/(14*x^14*(b + c*x^2)^7))]
    @test_int [x^(-14)*(b + 2*c*x^3)/(b*x + c*x^4)^8, x, 3, -(1/(21*x^21*(b + c*x^3)^7))]
    @test_int [x^(-7*(n - 1))*(b + 2*c*x^n)/(b*x + c*x^(n+1))^8, x, 3, -(1/(x^(7*n)*(7*n*(b + c*x^n)^7)))]

    @test_int [x^0*(b + 2*c*x^1)*(b*x + c*x^2)^p, x, 1, (b*x + c*x^2)^(1 + p)/(1 + p)]
    @test_int [x^(1 + p)*(b + 2*c*x^2)*(b*x + c*x^3)^p, x, 1, (x^(1 + p)*(b*x + c*x^3)^(1 + p))/(2*(1 + p))]
    @test_int [b*x^(1 + p)*(b*x + c*x^3)^p + 2*c*x^(3 + p)*(b*x + c*x^3)^p, x, -7, (x^(1 + p)*(b*x + c*x^3)^(1 + p))/(2*(1 + p))]

    @test_int [x^(2*(p + 1))*(b + 2*c*x^3)*(b*x + c*x^4)^p, x, 1, (x^(2*(1 + p))*(b*x + c*x^4)^(1 + p))/(3*(1 + p))]
    @test_int [x^((p + 1)*(n - 1))*(b + 2*c*x^n)*(b*x + c*x^(n+1))^p, x, 1, (b*x + c*x^(1 + n))^(1 + p)/(x^((1 - n)*(1 + p))*(n*(1 + p)))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P2(x)^p*Q5(x)=#

    #= Can*cancel*GCD*of*numerator*and*denominator. =#
    @test_int [(a^2*c + a^2*d*x + 2*a*b*c*x^2 + 2*a*b*d*x^3 + b^2*c*x^4 + b^2*d*x^5)/(a + b*x^2)^1, x, 2, a*c*x + (1/2)*a*d*x^2 + (1/3)*b*c*x^3 + (1/4)*b*d*x^4]
    @test_int [(a^2*c + a^2*d*x + 2*a*b*c*x^2 + 2*a*b*d*x^3 + b^2*c*x^4 + b^2*d*x^5)/(a + b*x^2)^2, x, 3, c*x + (d*x^2)/2]
    @test_int [(a^2*c + a^2*d*x + 2*a*b*c*x^2 + 2*a*b*d*x^3 + b^2*c*x^4 + b^2*d*x^5)/(a + b*x^2)^3, x, 5, (c*atan((sqrt(b)*x)/sqrt(a)))/(sqrt(a)*sqrt(b)) + (d*log(a + b*x^2))/(2*b)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P3(x)^p*Q(x)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P3(x)^p*Q2(x)=#

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

    @test_int [(b + 3*d*x^2)*(a + b*x + d*x^3)^n, x, 1, (a + b*x + d*x^3)^(1 + n)/(1 + n)]
    @test_int [(b + 3*d*x^2)*(b*x + d*x^3)^n, x, 1, (b*x + d*x^3)^(1 + n)/(1 + n)]
    @test_int [(b + 3*d*x^2)*x^n*(b + d*x^2)^n, x, 1, (x^(1 + n)*(b + d*x^2)^(1 + n))/(1 + n)]

    @test_int [(2*c*x + 3*d*x^2)*(a + c*x^2 + d*x^3)^n, x, 1, (a + c*x^2 + d*x^3)^(1 + n)/(1 + n)]
    @test_int [(2*c*x + 3*d*x^2)*(c*x^2 + d*x^3)^n, x, 1, (c*x^2 + d*x^3)^(1 + n)/(1 + n)]
    @test_int [(2*c*x + 3*d*x^2)*x^n*(c*x + d*x^2)^n, x, 2, (x^(1 + n)*(c*x + d*x^2)^(1 + n))/(1 + n)]
    @test_int [(2*c*x + 3*d*x^2)*x^(2*n)*(c + d*x)^n, x, 1, (x^(2*(1 + n))*(c + d*x)^(1 + n))/(1 + n)]

    @test_int [x*(2*c + 3*d*x)*(a + c*x^2 + d*x^3)^n, x, 1, (a + c*x^2 + d*x^3)^(1 + n)/(1 + n)]
    @test_int [x*(2*c + 3*d*x)*(c*x^2 + d*x^3)^n, x, 1, (c*x^2 + d*x^3)^(1 + n)/(1 + n)]

    @test_int [(b + 2*c*x + 3*d*x^2)*(a + b*x + c*x^2 + d*x^3)^7, x, 1, (1/8)*(a + b*x + c*x^2 + d*x^3)^8]
    @test_int [(b + 2*c*x + 3*d*x^2)*(b*x + c*x^2 + d*x^3)^7, x, 1, (1/8)*(b*x + c*x^2 + d*x^3)^8]
    @test_int [x^7*(b + 2*c*x + 3*d*x^2)*(b + c*x + d*x^2)^7, x, 1, (1/8)*x^8*(b + c*x + d*x^2)^8]

    @test_int [(b + 3*d*x^2)*(a + b*x + d*x^3)^7, x, 1, (1/8)*(a + b*x + d*x^3)^8]

    @test_int [(b + 3*d*x^2)*(b*x + d*x^3)^7, x, 1, (1/8)*(b*x + d*x^3)^8]
    @test_int [x^7*(b + 3*d*x^2)*(b + d*x^2)^7, x, 2, (1/8)*x^8*(b + d*x^2)^8]

    @test_int [(2*c*x + 3*d*x^2)*(a + c*x^2 + d*x^3)^7, x, 1, (1/8)*(a + c*x^2 + d*x^3)^8]
    @test_int [(2*c*x + 3*d*x^2)*(c*x^2 + d*x^3)^7, x, 1, (1/8)*(c*x^2 + d*x^3)^8]
    @test_int [x^7*(2*c*x + 3*d*x^2)*(c*x + d*x^2)^7, x, 2, (1/8)*x^16*(c + d*x)^8]
    @test_int [x^14*(2*c*x + 3*d*x^2)*(c + d*x)^7, x, 1, (x^(2 + 2*7)*(c + d*x)^8)/8]

    @test_int [x*(2*c + 3*d*x)*(a + c*x^2 + d*x^3)^7, x, 1, (a + c*x^2 + d*x^3)^8/8]
    @test_int [x*(2*c + 3*d*x)*(c*x^2 + d*x^3)^7, x, 2, (1/8)*x^16*(c + d*x)^8]
    @test_int [x^8*(2*c + 3*d*x)*(c*x + d*x^2)^7, x, 1, (1/8)*x^8*(c*x + d*x^2)^8]
    @test_int [x^15*(2*c + 3*d*x)*(c + d*x)^7, x, 1, (x^(2 + 2*7)*(c + d*x)^8)/8]

    @test_int [(a + b*x)*(1 + (a*x + b*(x^2/2))^4), x, 2, a*x + (b*x^2)/2 + (1/160)*x^5*(2*a + b*x)^5]
    @test_int [(a + b*x)*(1 + (c + a*x + b*(x^2/2))^4), x, 2, a*x + (b*x^2)/2 + (1/5)*(c + a*x + (b*x^2)/2)^5]

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

    @test_int [(a + c*x^2)*(1 + (a*x + c*(x^3/3))^5), x, 2, a*x + (c*x^3)/3 + (1/6)*(a*x + (c*x^3)/3)^6]
    @test_int [(a + c*x^2)*(1 + (d + a*x + c*(x^3/3))^5), x, 2, a*x + (c*x^3)/3 + (1/6)*(d + a*x + (c*x^3)/3)^6]

    @test_int [(b*x + c*x^2)*(1 + (b*(x^2/2) + c*(x^3/3))^5), x, 2, (b*x^2)/2 + (c*x^3)/3 + (x^12*(3*b + 2*c*x)^6)/279936]
    @test_int [(b*x + c*x^2)*(1 + (d + b*(x^2/2) + c*(x^3/3))^5), x, 2, (b*x^2)/2 + (c*x^3)/3 + (1/6)*(d + (b*x^2)/2 + (c*x^3)/3)^6]

    @test_int [(a + b*x + c*x^2)*(1 + (a*x + b*(x^2/2) + c*(x^3/3))^5), x, 2, a*x + (b*x^2)/2 + (c*x^3)/3 + (1/6)*(a*x + (b*x^2)/2 + (c*x^3)/3)^6]
    @test_int [(a + b*x + c*x^2)*(1 + (d + a*x + b*(x^2/2) + c*(x^3/3))^5), x, 2, a*x + (b*x^2)/2 + (c*x^3)/3 + (1/6)*(d + a*x + (b*x^2)/2 + (c*x^3)/3)^6]

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

    @test_int [(-4 + 4*x + x^2)*(5 - 12*x + 6*x^2 + x^3), x, 1, (5 - 12*x + 6*x^2 + x^3)^2/6]
    @test_int [(2*x + x^3)*(1 + 4*x^2 + x^4), x, 1, (1/8)*(1 + 4*x^2 + x^4)^2]

    @test_int [(1 + 2*x)*(x + x^2)^3*(-18 + 7*(x + x^2)^3)^2, x, -3, 81*x^4*(1 + x)^4 - 36*x^7*(1 + x)^7 + (49/10)*x^10*(1 + x)^10]
    @test_int [x^3*(1 + x)^3*(1 + 2*x)*(-18 + 7*x^3*(1 + x)^3)^2, x, -2, 81*x^4*(1 + x)^4 - 36*x^7*(1 + x)^7 + (49/10)*x^10*(1 + x)^10]

    @test_int [(2 - x^2)/(1 - 6*x + x^3)^5, x, 1, 1/(12*(1 - 6*x + x^3)^4)]
    @test_int [(2*x + x^2)/(4 + 3*x^2 + x^3), x, 1, log(4 + 3*x^2 + x^3)/3]

    @test_int [(1 + x + x^3)/(4*x + 2*x^2 + x^4), x, 1, (1/4)*log(4*x + 2*x^2 + x^4)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P3(x)^p*Q3(x)=#

    @test_int [(b*c - a*d - 2*a*e*x - b*e*x^2 - 3*a*f*x^2 - 2*b*f*x^3)/(c + d*x + e*x^2 + f*x^3)^2, x, 3, a/(c + d*x + e*x^2 + f*x^3) + (b*x)/(c + d*x + e*x^2 + f*x^3)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P4(x)^p*Q(x)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P4(x)^p*Q3(x)=#

    @test_int [(A + B*x + C*x^2 + D*x^3)/(a + b*x + c*x^2 + b*x^3 + a*x^4), x, 9, ((4*a^2*B + b*(b - sqrt(8*a^2 + b^2 - 4*a*c))*D - a*(A*(b - sqrt(8*a^2 + b^2 - 4*a*c)) + b*C - sqrt(8*a^2 + b^2 - 4*a*c)*C + 2*c*D))*atan((b - sqrt(8*a^2 + b^2 - 4*a*c) + 4*a*x)/(sqrt(2)*sqrt(4*a^2 + 2*a*c - b*(b - sqrt(8*a^2 + b^2 - 4*a*c))))))/(sqrt(2)*a*sqrt(8*a^2 + b^2 - 4*a*c)*sqrt(4*a^2 + 2*a*c - b*(b - sqrt(8*a^2 + b^2 - 4*a*c)))) - ((4*a^2*B + b*(b + sqrt(8*a^2 + b^2 - 4*a*c))*D - a*(A*(b + sqrt(8*a^2 + b^2 - 4*a*c)) + b*C + sqrt(8*a^2 + b^2 - 4*a*c)*C + 2*c*D))*atan((b + sqrt(8*a^2 + b^2 - 4*a*c) + 4*a*x)/(sqrt(2)*sqrt(4*a^2 + 2*a*c - b*(b + sqrt(8*a^2 + b^2 - 4*a*c))))))/(sqrt(2)*a*sqrt(8*a^2 + b^2 - 4*a*c)*sqrt(4*a^2 + 2*a*c - b*(b + sqrt(8*a^2 + b^2 - 4*a*c)))) - ((2*a*(A - C) + (b - sqrt(8*a^2 + b^2 - 4*a*c))*D)*log(2*a + (b - sqrt(8*a^2 + b^2 - 4*a*c))*x + 2*a*x^2))/(4*a*sqrt(8*a^2 + b^2 - 4*a*c)) + ((2*a*(A - C) + (b + sqrt(8*a^2 + b^2 - 4*a*c))*D)*log(2*a + (b + sqrt(8*a^2 + b^2 - 4*a*c))*x + 2*a*x^2))/(4*a*sqrt(8*a^2 + b^2 - 4*a*c))]

    @test_int [(2 + x - 4*x^2 + 2*x^3)/(1 - x + x^2 - x^3 + x^4), x, 3, -((2*log(2 - (1 - sqrt(5))*x + 2*x^2))/(1 - sqrt(5))) - (2*log(2 - (1 + sqrt(5))*x + 2*x^2))/(1 + sqrt(5))]

    #= Integrands*of*the*form*(a + b*x + c*x^2 + d*x^3 + e*x^4)^p*(A+B*x+C*x^2+D*x^3)*when*d^3 - 4*c*d*e + 8*b*e^2=0 =#
    @test_int [(3*x + 3*x^2 + x^3)/(1 + 4*x + 6*x^2 + 4*x^3 + x^4), x, 4, 1/(3*(1 + x)^3) + log(1 + x)]
    @test_int [(-1 + 3*x - 3*x^2 + x^3)/(1 + 4*x + 6*x^2 + 4*x^3 + x^4), x, 3, 8/(3*(1 + x)^3) - 6/(1 + x)^2 + 6/(1 + x) + log(1 + x)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P4(x)^p*Q8(x)=#

    @test_int [(9 - 40*x - 18*x^2 + 174*x^4 + 24*x^5 + 26*x^6 - 39*x^8)/(3 + 2*x^2 + x^4)^3, x, 6, (2*(1 - 2*x^2))/(3 + 2*x^2 + x^4)^2 - (2*x*(18 + 13*x^2))/(3 + 2*x^2 + x^4)^2 + (13*x)/(3 + 2*x^2 + x^4)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P5(x)^p*Q(x)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P5(x)^p*Q5(x)=#

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

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*P6(x)^p*Q(x)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*P3(x^2)^p*Q1(x^2)=#

    @test_int [(1 + x^2)/(1 - 7*x^2 + 7*x^4 - x^6)^2, x, 15, x/(16*(1 - x^2)) + (x*(29 - 5*x^2))/(32*(1 - 6*x^2 + x^4)) + atanh(x)/4 + (1/64)*((3 - 2*sqrt(2))*atanh((-1 + sqrt(2))*x) - (3 + 2*sqrt(2))*atanh((1 + sqrt(2))*x)), 1/(32*(1 - x)) - 1/(32*(1 + x)) + (12 + 5*x)/(64*(1 - 2*x - x^2)) - (12 - 5*x)/(64*(1 + 2*x - x^2)) - (5*atanh((1 - x)/sqrt(2)))/(64*sqrt(2)) + atanh(x)/4 + (5*atanh((1 + x)/sqrt(2)))/(64*sqrt(2)) - (3/256)*(2 + 3*sqrt(2))*log(1 - sqrt(2) - x) - (3/256)*(2 - 3*sqrt(2))*log(1 + sqrt(2) - x) + (3/256)*(2 + 3*sqrt(2))*log(1 - sqrt(2) + x) + (3/256)*(2 - 3*sqrt(2))*log(1 + sqrt(2) + x)]

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*x^m*P(x)^p*Q(x)=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*x^m*P3(x)^p*Q(x)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*x^m*P3(x)^p*Q3(x)=#

    @test_int [x^m*(a + b*x + c*x^2 + d*x^3)^p*(a*(1 + m) + x*(b*(2 + p + m) + x*(c*(3 + 2*p + m) + d*(4 + 3*p + m)*x))), x, 1, x^(1 + m)*(a + b*x + c*x^2 + d*x^3)^(1 + p)]

    @test_int [x^2*(3*a + b*(4 + p)*x + c*(5 + 2*p)*x^2 + d*(6 + 3*p)*x^3)*(a + b*x + c*x^2 + d*x^3)^p, x, 1, x^3*(a + b*x + c*x^2 + d*x^3)^(1 + p)]
    @test_int [x^1*(2*a + b*(3 + p)*x + c*(4 + 2*p)*x^2 + d*(5 + 3*p)*x^3)*(a + b*x + c*x^2 + d*x^3)^p, x, 1, x^2*(a + b*x + c*x^2 + d*x^3)^(1 + p)]
    @test_int [x^0*(1*a + b*(2 + p)*x + c*(3 + 2*p)*x^2 + d*(4 + 3*p)*x^3)*(a + b*x + c*x^2 + d*x^3)^p, x, 1, x^1*(a + b*x + c*x^2 + d*x^3)^(1 + p)]
    @test_int [((a + b*x + c*x^2 + d*x^3)^p*( 0*a + b*( 1 + p)*x + c*(2 + 2*p)*x^2 + d*(3 + 3*p)*x^3))/x^1, x, 2, (a + b*x + c*x^2 + d*x^3)^(1 + p)/x^0]
    @test_int [((a + b*x + c*x^2 + d*x^3)^p*(-1*a + b*( 0 + p)*x + c*(1 + 2*p)*x^2 + d*(2 + 3*p)*x^3))/x^2, x, 1, (a + b*x + c*x^2 + d*x^3)^(1 + p)/x^1]
    @test_int [((a + b*x + c*x^2 + d*x^3)^p*(-2*a + b*(-1 + p)*x + c*(0 + 2*p)*x^2 + d*(1 + 3*p)*x^3))/x^3, x, 1, (a + b*x + c*x^2 + d*x^3)^(1 + p)/x^2]
    @test_int [((a + b*x + c*x^2 + d*x^3)^p*(-3*a + b*(-2 + p)*x + c*(-1 + 2*p)*x^2 + d*(0 + 3*p)*x^3))/x^4, x, 1, (a + b*x + c*x^2 + d*x^3)^(1 + p)/x^3]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*x^m*P4(x)^p*Q(x)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*x^m*P4(x)^p*Q3(x)=#

    @test_int [x^4*(5 + x + 3*x^2 + 2*x^3)/(2 + x + 3*x^2 + x^3 + 2*x^4), x, 10, (5*x)/4 - (3*x^2)/4 + x^3/3 + x^4/4 + (1/24)*sqrt(5/3)*atan((1 - 4*x)/sqrt(15)) - (10*atan((1 + 2*x)/sqrt(3)))/(3*sqrt(3)) + (1/3)*log(1 + x + x^2) - (13/48)*log(2 - x + 2*x^2)]
    @test_int [x^3*(5 + x + 3*x^2 + 2*x^3)/(2 + x + 3*x^2 + x^3 + 2*x^4), x, 10, -((3*x)/2) + x^2/2 + x^3/3 + (5/12)*sqrt(5/3)*atan((1 - 4*x)/sqrt(15)) + (8*atan((1 + 2*x)/sqrt(3)))/(3*sqrt(3)) + (2/3)*log(1 + x + x^2) - (1/24)*log(2 - x + 2*x^2)]
    @test_int [x^2*(5 + x + 3*x^2 + 2*x^3)/(2 + x + 3*x^2 + x^3 + 2*x^4), x, 10, x + x^2/2 + (1/6)*sqrt(5/3)*atan((1 - 4*x)/sqrt(15)) + (2*atan((1 + 2*x)/sqrt(3)))/(3*sqrt(3)) - log(1 + x + x^2) + (1/4)*log(2 - x + 2*x^2)]
    @test_int [x^1*(5 + x + 3*x^2 + 2*x^3)/(2 + x + 3*x^2 + x^3 + 2*x^4), x, 10, x - (1/3)*sqrt(5/3)*atan((1 - 4*x)/sqrt(15)) - (10*atan((1 + 2*x)/sqrt(3)))/(3*sqrt(3)) + (1/3)*log(1 + x + x^2) + (1/6)*log(2 - x + 2*x^2)]
    @test_int [x^0*(5 + x + 3*x^2 + 2*x^3)/(2 + x + 3*x^2 + x^3 + 2*x^4), x, 10, (-(1/3))*sqrt(5/3)*atan((1 - 4*x)/sqrt(15)) + (8*atan((1 + 2*x)/sqrt(3)))/(3*sqrt(3)) + (2/3)*log(1 + x + x^2) - (1/6)*log(2 - x + 2*x^2)]
    @test_int [(5 + x + 3*x^2 + 2*x^3)/(x^1*(2 + x + 3*x^2 + x^3 + 2*x^4)), x, 13, (1/6)*sqrt(5/3)*atan((1 - 4*x)/sqrt(15)) + (2*atan((1 + 2*x)/sqrt(3)))/(3*sqrt(3)) + (5*log(x))/2 - log(1 + x + x^2) - (1/4)*log(2 - x + 2*x^2)]
    @test_int [(5 + x + 3*x^2 + 2*x^3)/(x^2*(2 + x + 3*x^2 + x^3 + 2*x^4)), x, 13, -(5/(2*x)) + (5/12)*sqrt(5/3)*atan((1 - 4*x)/sqrt(15)) - (10*atan((1 + 2*x)/sqrt(3)))/(3*sqrt(3)) - (3*log(x))/4 + (1/3)*log(1 + x + x^2) + (1/24)*log(2 - x + 2*x^2)]
    @test_int [(5 + x + 3*x^2 + 2*x^3)/(x^3*(2 + x + 3*x^2 + x^3 + 2*x^4)), x, 13, -(5/(4*x^2)) + 3/(4*x) + (1/24)*sqrt(5/3)*atan((1 - 4*x)/sqrt(15)) + (8*atan((1 + 2*x)/sqrt(3)))/(3*sqrt(3)) - (15*log(x))/8 + (2/3)*log(1 + x + x^2) + (13/48)*log(2 - x + 2*x^2)]

    @test_int [x^3*(5 + x + 3*x^2 + 2*x^3)/(2 + x + 5*x^2 + x^3 + 2*x^4), x, 13, (-(1/28))*(35 - 9*im*sqrt(7))*x - (1/28)*(35 + 9*im*sqrt(7))*x + (1/28)*(7 - 5*im*sqrt(7))*x^2 + (1/28)*(7 + 5*im*sqrt(7))*x^2 + (1/42)*(7 - 5*im*sqrt(7))*x^3 + (1/42)*(7 + 5*im*sqrt(7))*x^3 + (11*(9*im + 5*sqrt(7))*atan((1 - im*sqrt(7) + 8*x)/sqrt(2*(35 + im*sqrt(7)))))/(4*sqrt(14*(35 + im*sqrt(7)))) - (11*(9*im - 5*sqrt(7))*atan((1 + im*sqrt(7) + 8*x)/sqrt(2*(35 - im*sqrt(7)))))/(4*sqrt(14*(35 - im*sqrt(7)))) + (3/112)*(7 - 11*im*sqrt(7))*log(4 + (1 - im*sqrt(7))*x + 4*x^2) + (3/112)*(7 + 11*im*sqrt(7))*log(4 + (1 + im*sqrt(7))*x + 4*x^2)]
    @test_int [x^2*(5 + x + 3*x^2 + 2*x^3)/(2 + x + 5*x^2 + x^3 + 2*x^4), x, 13, (1/14)*(7 - 5*im*sqrt(7))*x + (1/14)*(7 + 5*im*sqrt(7))*x + (1/28)*(7 - 5*im*sqrt(7))*x^2 + (1/28)*(7 + 5*im*sqrt(7))*x^2 - ((53*im + sqrt(7))*atan((1 - im*sqrt(7) + 8*x)/sqrt(2*(35 + im*sqrt(7)))))/(2*sqrt(14*(35 + im*sqrt(7)))) + ((53*im - sqrt(7))*atan((1 + im*sqrt(7) + 8*x)/sqrt(2*(35 - im*sqrt(7)))))/(2*sqrt(14*(35 - im*sqrt(7)))) - (1/56)*(35 + 9*im*sqrt(7))*log(4 + (1 - im*sqrt(7))*x + 4*x^2) - (1/56)*(35 - 9*im*sqrt(7))*log(4 + (1 + im*sqrt(7))*x + 4*x^2)]
    @test_int [x^1*(5 + x + 3*x^2 + 2*x^3)/(2 + x + 5*x^2 + x^3 + 2*x^4), x, 11, (1/14)*(7 - 5*im*sqrt(7))*x + (1/14)*(7 + 5*im*sqrt(7))*x - ((19*im + 7*sqrt(7))*atan((1 - im*sqrt(7) + 8*x)/sqrt(2*(35 + im*sqrt(7)))))/sqrt(14*(35 + im*sqrt(7))) + ((19*im - 7*sqrt(7))*atan((1 + im*sqrt(7) + 8*x)/sqrt(2*(35 - im*sqrt(7)))))/sqrt(14*(35 - im*sqrt(7))) + (1/28)*(7 + 5*im*sqrt(7))*log(4 + (1 - im*sqrt(7))*x + 4*x^2) + (1/28)*(7 - 5*im*sqrt(7))*log(4 + (1 + im*sqrt(7))*x + 4*x^2)]
    @test_int [x^0*(5 + x + 3*x^2 + 2*x^3)/(2 + x + 5*x^2 + x^3 + 2*x^4), x, 9, ((19*im + 7*sqrt(7))*atan((1 - im*sqrt(7) + 8*x)/sqrt(2*(35 + im*sqrt(7)))))/sqrt(14*(35 + im*sqrt(7))) - ((19*im - 7*sqrt(7))*atan((1 + im*sqrt(7) + 8*x)/sqrt(2*(35 - im*sqrt(7)))))/sqrt(14*(35 - im*sqrt(7))) + (1/28)*(7 + 5*im*sqrt(7))*log(4 + (1 - im*sqrt(7))*x + 4*x^2) + (1/28)*(7 - 5*im*sqrt(7))*log(4 + (1 + im*sqrt(7))*x + 4*x^2)]
    @test_int [(5 + x + 3*x^2 + 2*x^3)/(x^1*(2 + x + 5*x^2 + x^3 + 2*x^4)), x, 13, -(((53 + im*sqrt(7))*atanh((im - sqrt(7) + 8*im*x)/sqrt(2*(35 - im*sqrt(7)))))/(2*sqrt(14*(35 - im*sqrt(7))))) + ((53 - im*sqrt(7))*atanh((im + sqrt(7) + 8*im*x)/sqrt(2*(35 + im*sqrt(7)))))/(2*sqrt(14*(35 + im*sqrt(7)))) + (1/28)*(35 - 9*im*sqrt(7))*log(x) + (1/28)*(35 + 9*im*sqrt(7))*log(x) - (1/56)*(35 - 9*im*sqrt(7))*log(4*im + (im - sqrt(7))*x + 4*im*x^2) - (1/56)*(35 + 9*im*sqrt(7))*log(4*im + (im + sqrt(7))*x + 4*im*x^2)]
    @test_int [(5 + x + 3*x^2 + 2*x^3)/(x^2*(2 + x + 5*x^2 + x^3 + 2*x^4)), x, 13, -((35 - 9*im*sqrt(7))/(28*x)) - (35 + 9*im*sqrt(7))/(28*x) + (11*(9 + 5*im*sqrt(7))*atanh((im - sqrt(7) + 8*im*x)/sqrt(2*(35 - im*sqrt(7)))))/(4*sqrt(14*(35 - im*sqrt(7)))) - (11*(9 - 5*im*sqrt(7))*atanh((im + sqrt(7) + 8*im*x)/sqrt(2*(35 + im*sqrt(7)))))/(4*sqrt(14*(35 + im*sqrt(7)))) - (3/56)*(7 - 11*im*sqrt(7))*log(x) - (3/56)*(7 + 11*im*sqrt(7))*log(x) + (3/112)*(7 + 11*im*sqrt(7))*log(4*im + (im - sqrt(7))*x + 4*im*x^2) + (3/112)*(7 - 11*im*sqrt(7))*log(4*im + (im + sqrt(7))*x + 4*im*x^2)]
    @test_int [(5 + x + 3*x^2 + 2*x^3)/(x^3*(2 + x + 5*x^2 + x^3 + 2*x^4)), x, 13, -((35 - 9*im*sqrt(7))/(56*x^2)) - (35 + 9*im*sqrt(7))/(56*x^2) + (3*(7 - 11*im*sqrt(7)))/(56*x) + (3*(7 + 11*im*sqrt(7)))/(56*x) + ((355 - 73*im*sqrt(7))*atanh((im - sqrt(7) + 8*im*x)/sqrt(2*(35 - im*sqrt(7)))))/(8*sqrt(14*(35 - im*sqrt(7)))) - ((355 + 73*im*sqrt(7))*atanh((im + sqrt(7) + 8*im*x)/sqrt(2*(35 + im*sqrt(7)))))/(8*sqrt(14*(35 + im*sqrt(7)))) - (1/16)*(35 - 9*im*sqrt(7))*log(x) - (1/16)*(35 + 9*im*sqrt(7))*log(x) + (1/32)*(35 - 9*im*sqrt(7))*log(4*im + (im - sqrt(7))*x + 4*im*x^2) + (1/32)*(35 + 9*im*sqrt(7))*log(4*im + (im + sqrt(7))*x + 4*im*x^2)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*x^m*P6(x)^p*Q2(x)=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*x^m*P3(x^2)^p*Q1(x^2)=#

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

    #= ::Title::Closed:: =#
    #=Integrands*requiring*algebraic*expansion=#

    #= ::Subsection::Closed:: =#
    #=Problems*from*Calculus*textbooks*and*competitions=#

    #= ::Subsubsection::Closed:: =#
    #=Anton*Calculus, 4th*Edition=#

    @test_int [(1 - 3*x^4)/((-2 + x)*(1 + x^2)^2), x, 6, -((1 - 2*x)/(5*(1 + x^2))) - (46*atan(x))/25 - (47/25)*log(2 - x) - (14/25)*log(1 + x^2)]
    @test_int [(-9 - 9*x + 2*x^2)/(-9*x + x^3), x, 3, -log(3 - x) + log(x) + 2*log(3 + x)]
    @test_int [(1 + 2*x^2 + x^5)/(-x + x^3), x, 3, x + x^3/3 + 2*log(1 - x) - log(x) + log(1 + x)]
    @test_int [(3 + 2*x^2)/((-1 + x)^2*x), x, 2, 5/(1 - x) - log(1 - x) + 3*log(x)]
    @test_int [(-1 + 2*x^2)/((-1 + 4*x)*(1 + x^2)), x, 5, (3*atan(x))/17 - (7/34)*log(1 - 4*x) + (6/17)*log(1 + x^2)]
    @test_int [(-3 + 2*x - 3*x^2 + x^3)/(1 + x^2), x, 3, -3*x + x^2/2 + (1/2)*log(1 + x^2)]
    @test_int [(x + 10*x^2 + 6*x^3 + x^4)/(10 + 6*x + x^2), x, 6, x^3/3 - 3*atan(3 + x) + log(10 + 6*x + x^2)/2]
    @test_int [1/(-18 + 27*x - 7*x^2 - 3*x^3 + x^4), x, 2, (1/8)*log(1 - x) - (1/5)*log(2 - x) + (1/12)*log(3 - x) - (1/120)*log(3 + x)]
    @test_int [(1 + x^3)/(-2 + x), x, 2, 4*x + x^2 + x^3/3 + 9*log(2 - x)]

    #= ::Subsubsection::Closed:: =#
    #=Ayres*Calculus, 1964*edition=#

    @test_int [(3*x - 4*x^2 + 3*x^3)/(1 + x^2), x, 4, -4*x + (3*x^2)/2 + 4*atan(x)]
    @test_int [(5 + 3*x)/(1 - x - x^2 + x^3), x, 3, 4/(1 - x) + atanh(x)]
    @test_int [(-1 - x - x^3 + x^4)/(-x^2 + x^3), x, 3, -(1/x) + x^2/2 - 2*log(1 - x) + 2*log(x)]
    @test_int [(2 + x + x^2 + x^3)/(2 + 3*x^2 + x^4), x, 6, atan(x) + log(2 + x^2)/2]
    @test_int [(-4 + 8*x - 4*x^2 + 4*x^3 - x^4 + x^5)/(2 + x^2)^3, x, 5, -(1/(2 + x^2)^2) - atan(x/sqrt(2))/sqrt(2) + (1/2)*log(2 + x^2)]
    @test_int [(-1 - 3*x + x^2)/(-2*x + x^2 + x^3), x, 3, -log(1 - x) + log(x)/2 + (3/2)*log(2 + x)]
    @test_int [(3 - x + 3*x^2 - 2*x^3 + x^4)/(3*x - 2*x^2 + x^3), x, 4, x^2/2 + log(x) - (1/2)*log(3 - 2*x + x^2)]
    @test_int [(-1 + x + x^3)/(1 + x^2)^2, x, 4, -(x/(2*(1 + x^2))) - atan(x)/2 + (1/2)*log(1 + x^2)]
    @test_int [(1 + 2*x - x^2 + 8*x^3 + x^4)/((x + x^2)*(1 + x^3)), x, 7, -(3/(1 + x)) - (2*atan((1 - 2*x)/sqrt(3)))/sqrt(3) + log(x) - 2*log(1 + x) + log(1 - x + x^2)]
    @test_int [(15 - 5*x + x^2 + x^3)/((5 + x^2)*(3 + 2*x + x^2)), x, 7, (-sqrt(5))*atan(x/sqrt(5)) + (5*atan((1 + x)/sqrt(2)))/sqrt(2) + (1/2)*log(3 + 2*x + x^2)]
    @test_int [(-3 + 25*x + 23*x^2 + 32*x^3 + 15*x^4 + 7*x^5 + x^6)/((1 + x^2)^2*(2 + x + x^2)^2), x, 6, -3/(1 + x^2) + (2 + x + x^2)^(-1) + log(1 + x^2) - log(2 + x + x^2)]

    #= ::Subsubsection::Closed:: =#
    #=Edwards*and*Penney*Calculus=#

    @test_int [1/((1 + x^2)*(4 + x^2)), x, 3, (-(1/6))*atan(x/2) + atan(x)/3]
    @test_int [(a + b*x^3)/(1 + x^2), x, 5, (b*x^2)/2 + a*atan(x) - (1/2)*b*log(1 + x^2)]
    @test_int [(x + x^2)/((4 + x)*(-4 + x^2)), x, 4, (-(1/2))*atanh(x/2) + log(4 + x)]
    @test_int [(4 + x^2)/((1 + x^2)*(2 + x^2)), x, 3, 3*atan(x) - sqrt(2)*atan(x/sqrt(2))]
    @test_int [(5 - 4*x + 3*x^2 + x^4)/((-1 + x)^2*(1 + x^2)), x, 5, 5/(2*(1 - x)) + x + 2*atan(x) + (1/2)*log(1 - x) + (3/4)*log(1 + x^2)]
    @test_int [(1 + x^4)/(2 + x^2), x, 3, -2*x + x^3/3 + (5*atan(x/sqrt(2)))/sqrt(2)]
    @test_int [(2 + 2*x + x^4)/(x^4 + x^5), x, 3, -2/(3*x^3) + log(1 + x)]
    @test_int [(-1 - 5*x + 2*x^2)/(2 - x - 2*x^2 + x^3), x, 2, 2*log(1 - x) - log(2 - x) + log(1 + x)]
    @test_int [(2 + x + x^3)/(1 + 2*x^2 + x^4), x, 5, x/(1 + x^2) + atan(x) + (1/2)*log(1 + x^2)]
    @test_int [(1 + 2*x + x^2 + x^3)/(1 + 2*x^2 + x^4), x, 5, -(1/(2*(1 + x^2))) + atan(x) + (1/2)*log(1 + x^2)]
    @test_int [(3 + 4*x)/((1 + x^2)*(2 + x^2)), x, 8, 3*atan(x) - (3*atan(x/sqrt(2)))/sqrt(2) + 2*log(1 + x^2) - 2*log(2 + x^2)]
    @test_int [(2 + x)/((1 + x^2)*(4 + x^2)), x, 8, (-(1/3))*atan(x/2) + (2*atan(x))/3 + (1/6)*log(1 + x^2) - (1/6)*log(4 + x^2)]

    #= ::Subsubsection::Closed:: =#
    #=Grossman*Calculus=#

    @test_int [(2 - x + x^3)/(-7 - 6*x + x^2), x, 5, 6*x + x^2/2 + (169/4)*log(7 - x) - (1/4)*log(1 + x)]
    @test_int [(-1 + x^5)/(-1 + x^2), x, 4, x^2/2 + x^4/4 + log(1 + x)]
    @test_int [(5 + 2*x - x^2 + x^3)/(1 + x + x^2), x, 6, -2*x + x^2/2 + (11*atan((1 + 2*x)/sqrt(3)))/sqrt(3) + (3/2)*log(1 + x + x^2)]
    @test_int [(-3 + x - 2*x^3 + x^4)/(10 - 8*x + 2*x^2), x, 6, (3*x)/2 + x^2/2 + x^3/6 + 6*atan(2 - x) + (3/4)*log(5 - 4*x + x^2)]
    @test_int [(1 + 2*x + 3*x^2 + x^3)/((-3 + x)*(-2 + x)*(-1 + x)), x, 2, x + (7/2)*log(1 - x) - 25*log(2 - x) + (61/2)*log(3 - x)]
    @test_int [(2 - 7*x + x^2 - x^3 + x^4)/(-24 - 14*x + x^2 + x^3), x, 2, -2*x + x^2/2 + (13/3)*log(4 - x) - (22/3)*log(2 + x) + 20*log(3 + x)]
    @test_int [(2 + x^2)/((-1 + x)^2*x*(1 + x)), x, 2, 3/(2*(1 - x)) - (5/4)*log(1 - x) + 2*log(x) - (3/4)*log(1 + x)]
    @test_int [(3 + x^2 + x^3)/(2 + x^2)^2, x, 4, (4 + x)/(4*(2 + x^2)) + (5*atan(x/sqrt(2)))/(4*sqrt(2)) + (1/2)*log(2 + x^2)]
    @test_int [(-35 + 70*x - 4*x^2 + 2*x^3)/((26 - 10*x + x^2)*(17 - 2*x + x^2)), x, 10, -((15033*atan(5 - x))/1025) - (4607*atan((1/4)*(-1 + x)))/4100 + (1003*log(26 - 10*x + x^2))/1025 + (22*log(17 - 2*x + x^2))/1025]
    @test_int [(2 + x^2)/((-5 + x)*(-3 + x)*(4 + x)), x, 2, (-(11/14))*log(3 - x) + (3/2)*log(5 - x) + (2/7)*log(4 + x)]
    @test_int [x^4/((-1 + x)*(2 + x^2)), x, 5, x + x^2/2 - (2/3)*sqrt(2)*atan(x/sqrt(2)) + (1/3)*log(1 - x) - (2/3)*log(2 + x^2)]

    #= ::Subsubsection::Closed:: =#
    #=Spivak*Calculus=#

    @test_int [(-1 + 7*x + 2*x^2)/(-1 - x + x^2 + x^3), x, 2, -3/(1 + x) + 2*log(1 - x)]
    @test_int [(1 + 2*x)/(-1 + 3*x - 3*x^2 + x^3), x, 2, -(3/(2*(1 - x)^2)) + 2/(1 - x)]
    @test_int [(5 - 5*x + 7*x^2 + x^3)/((-1 + x)^2*(1 + x)^3), x, 2, (1 - x)^(-1) - 2/(1 + x)^2]
    @test_int [(1 + 3*x + 3*x^2)/(1 + 2*x + 2*x^2 + x^3), x, 6, (-2*atan((1 + 2*x)/sqrt(3)))/sqrt(3) + log(1 + x) + log(1 + x + x^2)]

    #= ::Subsubsection::Closed:: =#
    #=Stewart*Calculus=#

    @test_int [(-1 + 2*x + x^2)/(-2*x + 3*x^2 + 2*x^3), x, 3, (1/10)*log(1 - 2*x) + log(x)/2 - (1/10)*log(2 + x)]
    @test_int [(1 + 4*x - 2*x^2 + x^4)/(1 - x - x^2 + x^3), x, 2, 2/(1 - x) + x + x^2/2 + log(1 - x) - log(1 + x)]
    @test_int [(4 - x + 2*x^2)/(4*x + x^3), x, 6, (-(1/2))*atan(x/2) + log(x) + (1/2)*log(4 + x^2)]
    @test_int [(1 + x^2 + x^3)/((-1 + x)*x*(1 + x^2)^3*(1 + x + x^2)), x, 14, (1 + x)/(8*(1 + x^2)^2) - (3*(1 - x))/(8*(1 + x^2)) + (3*x)/(16*(1 + x^2)) + (7*atan(x))/16 - atan((1 + 2*x)/sqrt(3))/sqrt(3) + (1/8)*log(1 - x) - log(x) + (15/16)*log(1 + x^2) - (1/2)*log(1 + x + x^2)]
    @test_int [(1 - 3*x + 2*x^2 - x^3)/(1 + x^2)^2, x, 4, (2 - x)/(2*(1 + x^2)) + (3*atan(x))/2 - (1/2)*log(1 + x^2)]
    @test_int [(1 - 3*x + 2*x^2 - x^3)/(x*(1 + x^2)^2), x, 6, -((1 + 2*x)/(2*(1 + x^2))) - 2*atan(x) + log(x) - (1/2)*log(1 + x^2)]
    @test_int [(1 - x - x^2 + x^3 + x^4)/(-x + x^3), x, 4, x + x^2/2 - log(x) + (1/2)*log(1 - x^2)]
    @test_int [(2 - 4*x^2 + x^3)/((1 + x^2)*(2 + x^2)), x, 8, 6*atan(x) - 5*sqrt(2)*atan(x/sqrt(2)) - log(1 + x^2)/2 + log(2 + x^2)]
    @test_int [(1 + x^2 + x^4)/((1 + x^2)*(4 + x^2)^2), x, 6, -((13*x)/(24*(4 + x^2))) + (25/144)*atan(x/2) + atan(x)/9]
    @test_int [(1 + x^2 + x^3)/(2*x^2 + x^3 + x^4), x, 7, -(1/(2*x)) + atan((1 + 2*x)/sqrt(7))/(4*sqrt(7)) - log(x)/4 + (5/8)*log(2 + x + x^2)]
    @test_int [(1 - 12*x + x^2 + x^3)/(-12 + x + x^2), x, 5, x^2/2 - (2/7)*atanh((1/7)*(1 + 2*x)), x^2/2 + (1/7)*log(3 - x) - (1/7)*log(4 + x)]
    @test_int [(-3 + 5*x + 6*x^2)/(-3*x + 2*x^2 + x^3), x, 3, 2*log(1 - x) + log(x) + 3*log(3 + x)]
    @test_int [(-2 + 3*x + 5*x^2)/(2*x^2 + x^3), x, 3, x^(-1) + 2*log(x) + 3*log(2 + x)]
    @test_int [(18 - 2*x - 4*x^2)/(-6 + x + 4*x^2 + x^3), x, 2, log(1 - x) - 2*log(2 + x) - 3*log(3 + x)]
    @test_int [(1 + x - 2*x^2 + x^3)/(4 + 5*x^2 + x^4), x, 7, (-(3/2))*atan(x/2) + atan(x) + (1/2)*log(4 + x^2)]
    @test_int [(-32 + 5*x - 27*x^2 + 4*x^3)/(-70 - 299*x - 286*x^2 + 50*x^3 - 13*x^4 + 30*x^5), x, 6, (3988*atan((1 + 2*x)/sqrt(19)))/(13685*sqrt(19)) - (3146*log(7 - 3*x))/80155 - (334/323)*log(1 + 2*x) + (4822*log(2 + 5*x))/4879 + (11049*log(5 + x + x^2))/260015]
    @test_int [(8 - 13*x^2 - 7*x^3 + 12*x^5)/(4 - 20*x + 41*x^2 - 80*x^3 + 116*x^4 - 80*x^5 + 100*x^6), x, 7, 5828/(9075*(2 - 5*x)) - (313 + 502*x)/(1452*(1 + 2*x^2)) + (503*atan(sqrt(2)*x))/(7986*sqrt(2)) - (59096*log(2 - 5*x))/99825 + (2843*log(1 + 2*x^2))/7986, 5828/(9075*(2 - 5*x)) - (313 + 502*x)/(1452*(1 + 2*x^2)) - (251*atan(sqrt(2)*x))/(726*sqrt(2)) + (272*sqrt(2)*atan(sqrt(2)*x))/1331 - (59096*log(2 - 5*x))/99825 + (2843*log(1 + 2*x^2))/7986]

    #= ::Subsubsection::Closed:: =#
    #=Thomas*Calculus, 8th*Edition=#

    @test_int [(9 + x^4)/(x^2*(9 + x^2)), x, 3, -x^(-1) + x - (10*atan(x/3))/3]
    @test_int [(2*x + x^4)/(1 + x^2), x, 6, -x + x^3/3 + atan(x) + log(1 + x^2)]
    @test_int [(-x + x^3)/((-1 + x)^2*(1 + x^2)), x, 5, atan(x) + log(1 - x)]
    @test_int [(2 + 5*x + 3*x^2 + 2*x^3)/(1 + x + x^2), x, 3, x + x^2 + log(1 + x + x^2)]
    @test_int [(3 - 4*x - 5*x^2 + 3*x^3)/(x^3*(-1 + x + x^2)), x, 5, 3/(2*x^2) - 1/x + 3*log(x) - (1/10)*(15 - sqrt(5))*log(1 - sqrt(5) + 2*x) - (1/10)*(15 + sqrt(5))*log(1 + sqrt(5) + 2*x)]
    @test_int [(4 + 8*x + 5*x^2 + 2*x^3)/(2 + 2*x + x^2)^2, x, 5, -(1/(2 + 2*x + x^2)) - atan(1 + x) + log(2 + 2*x + x^2)]
    @test_int [((-1 + x)^4*x^4)/(1 + x^2), x, 3, 4*x - (4*x^3)/3 + x^5 - (2*x^6)/3 + x^7/7 - 4*atan(x)]
    @test_int [(-20*x + 4*x^2)/(9 - 10*x^2 + x^4), x, -11, log(1 - x) - (1/2)*log(3 - x) + (3/2)*log(1 + x) - 2*log(3 + x)]
    @test_int [(-1 + x + 4*x^3)/((-1 + x)*x^2*(1 + x^2)), x, 5, -x^(-1) + atan(x) + 2*log(1 - x) - log(1 + x^2)]

    @test_int [(1 - 3*x + 2*x^2 - 4*x^3 + x^4)/(1 + x^2)^3, x, 4, -(1/(4*(1 + x^2)^2)) + 2/(1 + x^2) + atan(x)]
    @test_int [(1 - 3*x + 2*x^2 - 4*x^3 + x^4)/(1 + 3*x^2 + 3*x^4 + x^6), x, 5, -(1/(4*(1 + x^2)^2)) + 2/(1 + x^2) + atan(x)]

    #= ::Subsubsection::Closed:: =#
    #=North*Texas*University*Integration*Competition=#

    @test_int [(1 + x + 2*x^2 + 2*x^3)/(x^2 + x^3 + x^4), x, 4, -x^(-1) + log(1 + x + x^2)]

    #= ::Subsection::Closed:: =#
    #=Miscellaneous*problems*requiring*algebraic*expansion=#

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

    @test_int [(-x + 2*x^3 + 4*x^5)/(3 + 2*x^2 + x^4)^2, x, 6, (5 - 7*x^2)/(8*(3 + 2*x^2 + x^4)) + (9*atan((1 + x^2)/sqrt(2)))/(8*sqrt(2))]
    @test_int [(x + x^5)/(1 + 2*x^2 + 2*x^4)^3, x, 7, (3 + 4*x^2)/(16*(1 + 2*x^2 + 2*x^4)^2) + (1 + 2*x^2)/(2*(1 + 2*x^2 + 2*x^4)) + atan(1 + 2*x^2)]

    @test_int [(a + b*x + c*x^2)/(d + e*x^2 + f*x^4), x, 8, ((c - (c*e - 2*a*f)/sqrt(e^2 - 4*d*f))*atan((sqrt(2)*sqrt(f)*x)/sqrt(e - sqrt(e^2 - 4*d*f))))/(sqrt(2)*sqrt(f)*sqrt(e - sqrt(e^2 - 4*d*f))) + ((c + (c*e - 2*a*f)/sqrt(e^2 - 4*d*f))*atan((sqrt(2)*sqrt(f)*x)/sqrt(e + sqrt(e^2 - 4*d*f))))/(sqrt(2)*sqrt(f)*sqrt(e + sqrt(e^2 - 4*d*f))) - (b*atanh((e + 2*f*x^2)/sqrt(e^2 - 4*d*f)))/sqrt(e^2 - 4*d*f)]
    @test_int [(d + e*x)^2/(a + b*x^2 + c*x^4), x, 8, ((e^2 + (2*c*d^2 - b*e^2)/sqrt(b^2 - 4*a*c))*atan((sqrt(2)*sqrt(c)*x)/sqrt(b - sqrt(b^2 - 4*a*c))))/(sqrt(2)*sqrt(c)*sqrt(b - sqrt(b^2 - 4*a*c))) + ((e^2 - (2*c*d^2 - b*e^2)/sqrt(b^2 - 4*a*c))*atan((sqrt(2)*sqrt(c)*x)/sqrt(b + sqrt(b^2 - 4*a*c))))/(sqrt(2)*sqrt(c)*sqrt(b + sqrt(b^2 - 4*a*c))) - (2*d*e*atanh((b + 2*c*x^2)/sqrt(b^2 - 4*a*c)))/sqrt(b^2 - 4*a*c)]

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

    @test_int [x^1/((1 - x^1)*(1 + x^1)^2), x, 3, 1/(2*(1 + x)) + atanh(x)/2]
    @test_int [x^2/((1 - x^2)*(1 + x^2)^2), x, 2, -(x/(4*(1 + x^2))) + atanh(x)/4]
    @test_int [x^3/((1 - x^3)*(1 + x^3)^2), x, 14, -(x/(6*(1 + x^3))) + atan((1 - 2*x)/sqrt(3))/(12*sqrt(3)) + atan((1 + 2*x)/sqrt(3))/(4*sqrt(3)) - (1/12)*log(1 - x) - (1/36)*log(1 + x) + (1/72)*log(1 - x + x^2) + (1/24)*log(1 + x + x^2)]

    @test_int [(9 + x + 3*x^2 + x^3)/((1 + x^2)*(3 + x^2)), x, 4, 3*atan(x) + (1/2)*log(3 + x^2)]
    @test_int [(3 + x + x^2 + x^3)/((1 + x^2)*(3 + x^2)), x, 4, atan(x) + log(3 + x^2)/2]
    @test_int [(-4 + 6*x - x^2 + 3*x^3)/((1 + x^2)*(2 + x^2)), x, 6, -3*atan(x) + sqrt(2)*atan(x/sqrt(2)) + (3*log(1 + x^2))/2]

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

    @test_int [(-3 + x + x^2)/((-3 + x)*x^2), x, 2, -(1/x) + log(3 - x)]
    @test_int [(1 + x + 4*x^2)/(x + 4*x^3), x, 4, atan(2*x)/2 + log(x)]
    @test_int [(1 - x + 3*x^2)/(-x^2 + x^3), x, 3, 1/x + 3*log(1 - x)]
    @test_int [(4 + 3*x + x^2)/(x + x^2), x, 3, x + 4*log(x) - 2*log(1 + x)]
    @test_int [(4 + x + 3*x^2)/(x + x^3), x, 6, atan(x) + 4*log(x) - log(1 + x^2)/2]

    @test_int [(7 - 4*x + 8*x^2)/((1 + 4*x)*(1 + x^2)), x, 3, -atan(x) + 2*log(1 + 4*x)]
    @test_int [x^2/((-1 + x)*(1 + 2*x + x^2)), x, 3, 1/(2*(1 + x)) + (1/4)*log(1 - x) + (3/4)*log(1 + x)]
    @test_int [(-4 + 3*x + x^2)/((-1 + 2*x)^2*(3 + 2*x)), x, 2, -(9/(32*(1 - 2*x))) + (41/128)*log(1 - 2*x) - (25/128)*log(3 + 2*x)]
    @test_int [(5 - 4*x + 3*x^2)/((-1 + x)*(1 + x^2)), x, 5, -3*atan(x) + 2*log(1 - x) + (1/2)*log(1 + x^2)]
    @test_int [(-1 - 2*x + x^2)/((-1 + x)^2*(1 + x^2)), x, 5, 1/(-1 + x) + atan(x) + log(1 - x) - (1/2)*log(1 + x^2)]
    @test_int [(5 + x^3)/((10 - 6*x + x^2)*(1/2 - x + x^2)), x, 10, (-(261/221))*atan(1 - 2*x) - (1026/221)*atan(3 - x) + (56/221)*log(10 - 6*x + x^2) + (109/442)*log(1 - 2*x + 2*x^2)]

    @test_int [(4 + 3*x + x^2)/((-3 + x)*(-2 + x)*(-1 + x)), x, 2, 4*log(1 - x) - 14*log(2 - x) + 11*log(3 - x)]
    @test_int [(1 + 16*x)/((5 + x)^2*(-3 + 2*x)*(1 + x + x^2)), x, 6, -(79/(273*(5 + x))) + (451*atan((1 + 2*x)/sqrt(3)))/(2793*sqrt(3)) + (200*log(3 - 2*x))/3211 + (2731*log(5 + x))/24843 - (481*log(1 + x + x^2))/5586]

    @test_int [(-1 + x^3)/(1 + x + x^2), x, 2, -x + x^2/2]
    @test_int [(-3 + x^3)/(-7 - 6*x + x^2), x, 5, 6*x + x^2/2 + (85/2)*log(7 - x) + (1/2)*log(1 + x)]

    @test_int [(1 + x^3)/(13 + 4*x + x^2)^2, x, 5, (67 + 47*x)/(18*(13 + 4*x + x^2)) - (61/54)*atan((2 + x)/3) + (1/2)*log(13 + 4*x + x^2)]

    @test_int [(-32 + 36*x - 42*x^2 + 21*x^3 - 10*x^4 + 3*x^5)/(x*(1 + x^2)*(4 + x^2)^2), x, 7, (4 + x^2)^(-1) + atan(x/2)/2 + 2*atan(x) - 2*log(x) + log(4 + x^2)]

    @test_int [(-1 + x^4 + 7*x^5 + x^9)/(-7 + 6*x^4 + x^8), x, 17, x^2/2 - atan(1 - (sqrt(2)*x)/7^(1/4))/(2*sqrt(2)*7^(3/4)) + atan(1 + (sqrt(2)*x)/7^(1/4))/(2*sqrt(2)*7^(3/4)) - atanh(x^2)/2 - log(sqrt(7) - sqrt(2)*7^(1/4)*x + x^2)/(4*sqrt(2)*7^(3/4)) + log(sqrt(7) + sqrt(2)*7^(1/4)*x + x^2)/(4*sqrt(2)*7^(3/4))]
    @test_int [(1 + x^3 + x^6)/(x + x^5), x, 18, x^2/2 - atan(x^2)/2 - atan(1 - sqrt(2)*x)/(2*sqrt(2)) + atan(1 + sqrt(2)*x)/(2*sqrt(2)) + log(x) + log(1 - sqrt(2)*x + x^2)/(4*sqrt(2)) - log(1 + sqrt(2)*x + x^2)/(4*sqrt(2)) - (1/4)*log(1 + x^4)]

    #= Note: This*test*problem*formerly*caused*stack*overflow*because*the*degree*of*the*polynomial
    	was*not*properly*reduced*by*the*Ostrogradskiy-Hermite*method*code. =#
    #= [(a + 2*b*x - a*x^2)^4/(-1 + x^2)^5, x, 14, -((4*a*b*(3*a^2 - 2*b^2))/(3*(1 - x^2)^4)) + (11*a^4*x)/(5*(1 - x^2)^4) - (48*a^2*b^2*x)/(5*(1 - x^2)^4) + (6*b^4*x)/(5*(1 - x^2)^4) + (4*a*b*(9*a^2 - 8*b^2)*x^2)/(3*(1 - x^2)^4) - ((73*a^4 - 264*a^2*b^2 + 48*b^4)*x^3)/(15*(1 - x^2)^4) - (4*a*b*(3*a^2 - 2*b^2)*x^4)/(1 - x^2)^4 + (a^2*(11*a^2 - 24*b^2)*x^5)/(3*(1 - x^2)^4) + (4*a^3*b*x^6)/(1 - x^2)^4 - (a^4*x^7)/(1 - x^2)^4 - ((8*a^4 - 24*a^2*b^2 + 3*b^4)*x)/(15*(1 - x^2)^3) - ((8*a^4 - 24*a^2*b^2 + 3*b^4)*x)/(12*(1 - x^2)^2) - ((8*a^4 - 24*a^2*b^2 + 3*b^4)*x)/(8*(1 - x^2)) - (1/8)*(8*a^4 - 24*a^2*b^2 + 3*b^4)*atanh(x)] =#

    @test_int [(1 + x^2)/(-x + x^2), x, 3, x + 2*log(1 - x) - log(x)]

    @test_int [(1 + x^3)/(-x + x^3), x, 3, x + log(1 - x) - log(x)]
    @test_int [(1 + x^3)/(-x^2 + x^3), x, 3, x^(-1) + x + 2*log(1 - x) - log(x)]
    @test_int [(-1 + x^5)/(-x + x^3), x, 3, x + x^3/3 + log(x) - log(1 + x)]
    @test_int [(1 + x^4)/(x^3 + x^5), x, 4, -1/(2*x^2) - log(x) + log(1 + x^2)]

    #= Integrands*of*the*form*(a+b*x^m)/(c*x^n+d*x^p+e*x^q)*where*m, n, p*and*q*are*integers =#
    @test_int [(1 + x^2)/(x + 2*x^2 + x^3), x, 4, 2/(1 + x) + log(x)]
    @test_int [(1 + x^5)/(-10*x - 3*x^2 + x^3), x, 3, 19*x + (3*x^2)/2 + x^3/3 + (3126*log(5 - x))/35 - log(x)/10 - (31*log(2 + x))/14]

    @test_int [(15 - 5*x + x^2 + x^3)/((5 + x^2)*(3 + 2*x + x^2)), x, 7, (-sqrt(5))*atan(x/sqrt(5)) + (5*atan((1 + x)/sqrt(2)))/sqrt(2) + (1/2)*log(3 + 2*x + x^2)]

    @test_int [1/((1 + x^2)*(3 + 10*x/(1 + x^2))), x, 4, (-(1/8))*log(3 + x) + (1/8)*log(1 + 3*x)]

    #= Integrands*of*the*form*x^m/(a*x^n+b*x^p+c*x^q)*where*m, n, p*and*q*are*integers =#
    #= In*some*of*the*following*examples*gcd*cancellation*should*occur*without*also*partial*fraction
    	expansion, since*that*will*result*in*unnecessary*expansion. =#
    @test_int [x^3/(13 + 2/x + 15*x), x, 6, (139*x)/3375 - (13*x^2)/450 + x^3/45 - (16/567)*log(2 + 3*x) + log(1 + 5*x)/4375]
    @test_int [x^2/(13 + 2/x + 15*x), x, 6, -((13*x)/225) + x^2/30 + (8/189)*log(2 + 3*x) - (1/875)*log(1 + 5*x)]
    @test_int [x/(13 + 2/x + 15*x), x, 5, x/15 - (4/63)*log(2 + 3*x) + (1/175)*log(1 + 5*x)]
    @test_int [1/(13 + 2/x + 15*x), x, 4, (2/21)*log(2 + 3*x) - (1/35)*log(1 + 5*x)]
    @test_int [1/(x*(13 + 2/x + 15*x)), x, 4, (-(1/7))*log(2 + 3*x) + (1/7)*log(1 + 5*x)]
    @test_int [1/(x^2*(13 + 2/x + 15*x)), x, 6, log(x)/2 + (3/14)*log(2 + 3*x) - (5/7)*log(1 + 5*x)]
    @test_int [1/(x^3*(13 + 2/x + 15*x)), x, 4, -(1/(2*x)) - (13*log(x))/4 - (9/28)*log(2 + 3*x) + (25/7)*log(1 + 5*x)]
    @test_int [1/(x^4*(13 + 2/x + 15*x)), x, 4, -(1/(4*x^2)) + 13/(4*x) + (139*log(x))/8 + (27/56)*log(2 + 3*x) - (125/7)*log(1 + 5*x)]
    @test_int [1/(x^5*(13 + 2/x + 15*x)), x, 4, -(1/(6*x^3)) + 13/(8*x^2) - 139/(8*x) - (1417*log(x))/16 - (81/112)*log(2 + 3*x) + (625/7)*log(1 + 5*x)]

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

    @test_int [(1 - x^2)/(a + b*(1 - x^2)^4), x, 16, -(atan((b^(1/8)*x)/sqrt((-a)^(1/4) - b^(1/4)))/(4*sqrt(-a)*sqrt((-a)^(1/4) - b^(1/4))*b^(3/8))) - (sqrt(sqrt(sqrt(-a) + sqrt(b)) - b^(1/4))*atan((sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4)) - sqrt(2)*b^(1/8)*x)/sqrt(sqrt(sqrt(-a) + sqrt(b)) - b^(1/4))))/(4*sqrt(2)*sqrt(-a)*sqrt(sqrt(-a) + sqrt(b))*b^(3/8)) + (sqrt(sqrt(sqrt(-a) + sqrt(b)) - b^(1/4))*atan((sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4)) + sqrt(2)*b^(1/8)*x)/sqrt(sqrt(sqrt(-a) + sqrt(b)) - b^(1/4))))/(4*sqrt(2)*sqrt(-a)*sqrt(sqrt(-a) + sqrt(b))*b^(3/8)) + atanh((b^(1/8)*x)/sqrt((-a)^(1/4) + b^(1/4)))/(4*sqrt(-a)*sqrt((-a)^(1/4) + b^(1/4))*b^(3/8)) + (sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4))*log(sqrt(sqrt(-a) + sqrt(b)) - sqrt(2)*sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4))*b^(1/8)*x + b^(1/4)*x^2))/(8*sqrt(2)*sqrt(-a)*sqrt(sqrt(-a) + sqrt(b))*b^(3/8)) - (sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4))*log(sqrt(sqrt(-a) + sqrt(b)) + sqrt(2)*sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4))*b^(1/8)*x + b^(1/4)*x^2))/(8*sqrt(2)*sqrt(-a)*sqrt(sqrt(-a) + sqrt(b))*b^(3/8))]
    @test_int [(1 - x^2)/(a + b*(-1 + x^2)^4), x, 17, -(atan((b^(1/8)*x)/sqrt((-a)^(1/4) - b^(1/4)))/(4*sqrt(-a)*sqrt((-a)^(1/4) - b^(1/4))*b^(3/8))) - (sqrt(sqrt(sqrt(-a) + sqrt(b)) - b^(1/4))*atan((sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4)) - sqrt(2)*b^(1/8)*x)/sqrt(sqrt(sqrt(-a) + sqrt(b)) - b^(1/4))))/(4*sqrt(2)*sqrt(-a)*sqrt(sqrt(-a) + sqrt(b))*b^(3/8)) + (sqrt(sqrt(sqrt(-a) + sqrt(b)) - b^(1/4))*atan((sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4)) + sqrt(2)*b^(1/8)*x)/sqrt(sqrt(sqrt(-a) + sqrt(b)) - b^(1/4))))/(4*sqrt(2)*sqrt(-a)*sqrt(sqrt(-a) + sqrt(b))*b^(3/8)) + atanh((b^(1/8)*x)/sqrt((-a)^(1/4) + b^(1/4)))/(4*sqrt(-a)*sqrt((-a)^(1/4) + b^(1/4))*b^(3/8)) + (sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4))*log(sqrt(sqrt(-a) + sqrt(b)) - sqrt(2)*sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4))*b^(1/8)*x + b^(1/4)*x^2))/(8*sqrt(2)*sqrt(-a)*sqrt(sqrt(-a) + sqrt(b))*b^(3/8)) - (sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4))*log(sqrt(sqrt(-a) + sqrt(b)) + sqrt(2)*sqrt(sqrt(sqrt(-a) + sqrt(b)) + b^(1/4))*b^(1/8)*x + b^(1/4)*x^2))/(8*sqrt(2)*sqrt(-a)*sqrt(sqrt(-a) + sqrt(b))*b^(3/8))]

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

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*(d+e*x)^p*(a+c*x^4)^q=#

    #= ::Subsubsection:: =#
    #=q>0=#

    #= ::Subsubsection::Closed:: =#
    #=q<0=#

    @test_int [(d + e*x)^3/(a + c*x^4), x, 15, (3*d^2*e*atan((sqrt(c)*x^2)/sqrt(a)))/(2*sqrt(a)*sqrt(c)) - (d*(sqrt(c)*d^2 + 3*sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*c^(3/4)) + (d*(sqrt(c)*d^2 + 3*sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*c^(3/4)) - (d*(sqrt(c)*d^2 - 3*sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*c^(3/4)) + (d*(sqrt(c)*d^2 - 3*sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*c^(3/4)) + (e^3*log(a + c*x^4))/(4*c)]
    @test_int [(d + e*x)^2/(a + c*x^4), x, 13, (d*e*atan((sqrt(c)*x^2)/sqrt(a)))/(sqrt(a)*sqrt(c)) - ((sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*c^(3/4)) + ((sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*c^(3/4)) - ((sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*c^(3/4)) + ((sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*c^(3/4))]
    @test_int [(d + e*x)^1/(a + c*x^4), x, 13, (e*atan((sqrt(c)*x^2)/sqrt(a)))/(2*sqrt(a)*sqrt(c)) - (d*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*c^(1/4)) + (d*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*c^(1/4)) - (d*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*c^(1/4)) + (d*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*c^(1/4))]
    @test_int [(d + e*x)^0/(a + c*x^4), x, 9, -(atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4))/(2*sqrt(2)*a^(3/4)*c^(1/4))) + atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4))/(2*sqrt(2)*a^(3/4)*c^(1/4)) - log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2)/(4*sqrt(2)*a^(3/4)*c^(1/4)) + log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2)/(4*sqrt(2)*a^(3/4)*c^(1/4))]
    @test_int [1/((d + e*x)^1*(a + c*x^4)), x, 17, -((sqrt(c)*d^2*e*atan((sqrt(c)*x^2)/sqrt(a)))/(2*sqrt(a)*(c*d^4 + a*e^4))) - (c^(1/4)*d*(sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)) + (c^(1/4)*d*(sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)) + (e^3*log(d + e*x))/(c*d^4 + a*e^4) - (c^(1/4)*d*(sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)) + (c^(1/4)*d*(sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)) - (e^3*log(a + c*x^4))/(4*(c*d^4 + a*e^4))]
    @test_int [1/((d + e*x)^2*(a + c*x^4)), x, 17, -(e^3/((c*d^4 + a*e^4)*(d + e*x))) - (sqrt(c)*d*e*(c*d^4 - a*e^4)*atan((sqrt(c)*x^2)/sqrt(a)))/(sqrt(a)*(c*d^4 + a*e^4)^2) - (c^(1/4)*(sqrt(c)*d^2*(c*d^4 - 3*a*e^4) + sqrt(a)*e^2*(3*c*d^4 - a*e^4))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*(sqrt(c)*d^2*(c*d^4 - 3*a*e^4) + sqrt(a)*e^2*(3*c*d^4 - a*e^4))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^2) + (4*c*d^3*e^3*log(d + e*x))/(c*d^4 + a*e^4)^2 - (c^(1/4)*(sqrt(c)*d^2*(c*d^4 - 3*a*e^4) - sqrt(a)*e^2*(3*c*d^4 - a*e^4))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*(sqrt(c)*d^2*(c*d^4 - 3*a*e^4) - sqrt(a)*e^2*(3*c*d^4 - a*e^4))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^2) - (c*d^3*e^3*log(a + c*x^4))/(c*d^4 + a*e^4)^2]
    @test_int [1/((d + e*x)^3*(a + c*x^4)), x, 17, -(e^3/(2*(c*d^4 + a*e^4)*(d + e*x)^2)) - (4*c*d^3*e^3)/((c*d^4 + a*e^4)^2*(d + e*x)) - (sqrt(c)*e*(3*c^2*d^8 - 12*a*c*d^4*e^4 + a^2*e^8)*atan((sqrt(c)*x^2)/sqrt(a)))/(2*sqrt(a)*(c*d^4 + a*e^4)^3) - (c^(3/4)*d*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8 + 2*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) + (c^(3/4)*d*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8 + 2*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) + (2*c*d^2*e^3*(5*c*d^4 - 3*a*e^4)*log(d + e*x))/(c*d^4 + a*e^4)^3 - (c^(3/4)*d*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8 - 2*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) + (c^(3/4)*d*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8 - 2*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) - (c*d^2*e^3*(5*c*d^4 - 3*a*e^4)*log(a + c*x^4))/(2*(c*d^4 + a*e^4)^3)]

    @test_int [(d + e*x)^3/(a + c*x^4)^2, x, 16, -((a*e^3 - c*x*(d^3 + 3*d^2*e*x + 3*d*e^2*x^2))/(4*a*c*(a + c*x^4))) + (3*d^2*e*atan((sqrt(c)*x^2)/sqrt(a)))/(4*a^(3/2)*sqrt(c)) - (3*d*(sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*c^(3/4)) + (3*d*(sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*c^(3/4)) - (3*d*(sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*c^(3/4)) + (3*d*(sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*c^(3/4))]
    @test_int [(d + e*x)^2/(a + c*x^4)^2, x, 14, (x*(d + e*x)^2)/(4*a*(a + c*x^4)) + (d*e*atan((sqrt(c)*x^2)/sqrt(a)))/(2*a^(3/2)*sqrt(c)) - ((3*sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*c^(3/4)) + ((3*sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*c^(3/4)) - ((3*sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*c^(3/4)) + ((3*sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*c^(3/4))]
    @test_int [(d + e*x)^1/(a + c*x^4)^2, x, 14, (x*(d + e*x))/(4*a*(a + c*x^4)) + (e*atan((sqrt(c)*x^2)/sqrt(a)))/(4*a^(3/2)*sqrt(c)) - (3*d*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*c^(1/4)) + (3*d*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*c^(1/4)) - (3*d*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*c^(1/4)) + (3*d*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*c^(1/4))]
    @test_int [(d + e*x)^0/(a + c*x^4)^2, x, 10, x/(4*a*(a + c*x^4)) - (3*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*c^(1/4)) + (3*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*c^(1/4)) - (3*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*c^(1/4)) + (3*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*c^(1/4))]
    @test_int [1/((d + e*x)^1*(a + c*x^4)^2), x, 31, (a*e^3 + c*x*(d^3 - d^2*e*x + d*e^2*x^2))/(4*a*(c*d^4 + a*e^4)*(a + c*x^4)) - (sqrt(c)*d^2*e^5*atan((sqrt(c)*x^2)/sqrt(a)))/(2*sqrt(a)*(c*d^4 + a*e^4)^2) - (sqrt(c)*d^2*e*atan((sqrt(c)*x^2)/sqrt(a)))/(4*a^(3/2)*(c*d^4 + a*e^4)) - (c^(1/4)*d*e^4*(sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^2) - (c^(1/4)*d*(3*sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)) + (c^(1/4)*d*e^4*(sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*d*(3*sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)) + (e^7*log(d + e*x))/(c*d^4 + a*e^4)^2 - (c^(1/4)*d*e^4*(sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^2) - (c^(1/4)*d*(3*sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)) + (c^(1/4)*d*e^4*(sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*d*(3*sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)) - (e^7*log(a + c*x^4))/(4*(c*d^4 + a*e^4)^2)]
    @test_int [1/((d + e*x)^2*(a + c*x^4)^2), x, 31, -(e^7/((c*d^4 + a*e^4)^2*(d + e*x))) + (c*(4*a*d^3*e^3 + x*(d^2*(c*d^4 - 3*a*e^4) - 2*d*e*(c*d^4 - a*e^4)*x + e^2*(3*c*d^4 - a*e^4)*x^2)))/(4*a*(c*d^4 + a*e^4)^2*(a + c*x^4)) - (sqrt(c)*d*e^5*(3*c*d^4 - a*e^4)*atan((sqrt(c)*x^2)/sqrt(a)))/(sqrt(a)*(c*d^4 + a*e^4)^3) - (sqrt(c)*d*e*(c*d^4 - a*e^4)*atan((sqrt(c)*x^2)/sqrt(a)))/(2*a^(3/2)*(c*d^4 + a*e^4)^2) - (c^(1/4)*(3*sqrt(c)*d^2*(c*d^4 - 3*a*e^4) + sqrt(a)*e^2*(3*c*d^4 - a*e^4))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^2) - (c^(1/4)*e^4*(sqrt(c)*d^2*(5*c*d^4 - 3*a*e^4) + sqrt(a)*e^2*(7*c*d^4 - a*e^4))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) + (c^(1/4)*(3*sqrt(c)*d^2*(c*d^4 - 3*a*e^4) + sqrt(a)*e^2*(3*c*d^4 - a*e^4))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*e^4*(sqrt(c)*d^2*(5*c*d^4 - 3*a*e^4) + sqrt(a)*e^2*(7*c*d^4 - a*e^4))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) + (8*c*d^3*e^7*log(d + e*x))/(c*d^4 + a*e^4)^3 - (c^(1/4)*(3*sqrt(c)*d^2*(c*d^4 - 3*a*e^4) - sqrt(a)*e^2*(3*c*d^4 - a*e^4))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^2) - (c^(1/4)*e^4*(sqrt(c)*d^2*(5*c*d^4 - 3*a*e^4) - sqrt(a)*e^2*(7*c*d^4 - a*e^4))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) + (c^(1/4)*(3*sqrt(c)*d^2*(c*d^4 - 3*a*e^4) - sqrt(a)*e^2*(3*c*d^4 - a*e^4))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*e^4*(sqrt(c)*d^2*(5*c*d^4 - 3*a*e^4) - sqrt(a)*e^2*(7*c*d^4 - a*e^4))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) - (2*c*d^3*e^7*log(a + c*x^4))/(c*d^4 + a*e^4)^3]
    @test_int [1/((d + e*x)^3*(a + c*x^4)^2), x, 31, -(e^7/(2*(c*d^4 + a*e^4)^2*(d + e*x)^2)) - (8*c*d^3*e^7)/((c*d^4 + a*e^4)^3*(d + e*x)) + (c*(2*a*d^2*e^3*(5*c*d^4 - 3*a*e^4) + x*(d*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8) - e*(3*c^2*d^8 - 12*a*c*d^4*e^4 + a^2*e^8)*x + 2*c*d^3*e^2*(3*c*d^4 - 5*a*e^4)*x^2)))/(4*a*(c*d^4 + a*e^4)^3*(a + c*x^4)) - (sqrt(c)*e^5*(21*c^2*d^8 - 26*a*c*d^4*e^4 + a^2*e^8)*atan((sqrt(c)*x^2)/sqrt(a)))/(2*sqrt(a)*(c*d^4 + a*e^4)^4) - (sqrt(c)*e*(3*c^2*d^8 - 12*a*c*d^4*e^4 + a^2*e^8)*atan((sqrt(c)*x^2)/sqrt(a)))/(4*a^(3/2)*(c*d^4 + a*e^4)^3) - (c^(3/4)*d*(3*c^2*d^8 - 36*a*c*d^4*e^4 + 9*a^2*e^8 + 2*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^3) - (c^(3/4)*d*e^4*(4*sqrt(a)*sqrt(c)*d^2*e^2*(7*c*d^4 - 5*a*e^4) + 3*(5*c^2*d^8 - 10*a*c*d^4*e^4 + a^2*e^8))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^4) + (c^(3/4)*d*(3*c^2*d^8 - 36*a*c*d^4*e^4 + 9*a^2*e^8 + 2*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^3) + (c^(3/4)*d*e^4*(4*sqrt(a)*sqrt(c)*d^2*e^2*(7*c*d^4 - 5*a*e^4) + 3*(5*c^2*d^8 - 10*a*c*d^4*e^4 + a^2*e^8))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^4) + (12*c*d^2*e^7*(3*c*d^4 - a*e^4)*log(d + e*x))/(c*d^4 + a*e^4)^4 - (c^(3/4)*d*(3*c^2*d^8 - 36*a*c*d^4*e^4 + 9*a^2*e^8 - 2*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^3) + (c^(3/4)*d*e^4*(4*sqrt(a)*sqrt(c)*d^2*e^2*(7*c*d^4 - 5*a*e^4) - 3*(5*c^2*d^8 - 10*a*c*d^4*e^4 + a^2*e^8))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^4) + (c^(3/4)*d*(3*c^2*d^8 - 36*a*c*d^4*e^4 + 9*a^2*e^8 - 2*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^3) - (c^(3/4)*d*e^4*(4*sqrt(a)*sqrt(c)*d^2*e^2*(7*c*d^4 - 5*a*e^4) - 3*(5*c^2*d^8 - 10*a*c*d^4*e^4 + a^2*e^8))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^4) - (3*c*d^2*e^7*(3*c*d^4 - a*e^4)*log(a + c*x^4))/(c*d^4 + a*e^4)^4]

    @test_int [(d + e*x)^3/(a + c*x^4)^3, x, 15, (x*(7*d^3 + 18*d^2*e*x + 15*d*e^2*x^2))/(32*a^2*(a + c*x^4)) - (a*e^3 - c*x*(d^3 + 3*d^2*e*x + 3*d*e^2*x^2))/(8*a*c*(a + c*x^4)^2) + (9*d^2*e*atan((sqrt(c)*x^2)/sqrt(a)))/(16*a^(5/2)*sqrt(c)) - (3*d*(7*sqrt(c)*d^2 + 5*sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*c^(3/4)) + (3*d*(7*sqrt(c)*d^2 + 5*sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*c^(3/4)) - (3*d*(7*sqrt(c)*d^2 - 5*sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*c^(3/4)) + (3*d*(7*sqrt(c)*d^2 - 5*sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*c^(3/4))]
    @test_int [(d + e*x)^2/(a + c*x^4)^3, x, 15, (x*(d + e*x)^2)/(8*a*(a + c*x^4)^2) + (x*(7*d^2 + 12*d*e*x + 5*e^2*x^2))/(32*a^2*(a + c*x^4)) + (3*d*e*atan((sqrt(c)*x^2)/sqrt(a)))/(8*a^(5/2)*sqrt(c)) - ((21*sqrt(c)*d^2 + 5*sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*c^(3/4)) + ((21*sqrt(c)*d^2 + 5*sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*c^(3/4)) - ((21*sqrt(c)*d^2 - 5*sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*c^(3/4)) + ((21*sqrt(c)*d^2 - 5*sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*c^(3/4))]
    @test_int [(d + e*x)^1/(a + c*x^4)^3, x, 15, (x*(d + e*x))/(8*a*(a + c*x^4)^2) + (x*(7*d + 6*e*x))/(32*a^2*(a + c*x^4)) + (3*e*atan((sqrt(c)*x^2)/sqrt(a)))/(16*a^(5/2)*sqrt(c)) - (21*d*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*c^(1/4)) + (21*d*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*c^(1/4)) - (21*d*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*c^(1/4)) + (21*d*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*c^(1/4))]
    @test_int [(d + e*x)^0/(a + c*x^4)^3, x, 11, x/(8*a*(a + c*x^4)^2) + (7*x)/(32*a^2*(a + c*x^4)) - (21*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*c^(1/4)) + (21*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*c^(1/4)) - (21*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*c^(1/4)) + (21*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*c^(1/4))]
    @test_int [1/((d + e*x)^1*(a + c*x^4)^3), x, 46, (c*x*(7*d^3 - 6*d^2*e*x + 5*d*e^2*x^2))/(32*a^2*(c*d^4 + a*e^4)*(a + c*x^4)) + (a*e^3 + c*x*(d^3 - d^2*e*x + d*e^2*x^2))/(8*a*(c*d^4 + a*e^4)*(a + c*x^4)^2) + (e^4*(a*e^3 + c*x*(d^3 - d^2*e*x + d*e^2*x^2)))/(4*a*(c*d^4 + a*e^4)^2*(a + c*x^4)) - (sqrt(c)*d^2*e^9*atan((sqrt(c)*x^2)/sqrt(a)))/(2*sqrt(a)*(c*d^4 + a*e^4)^3) - (sqrt(c)*d^2*e^5*atan((sqrt(c)*x^2)/sqrt(a)))/(4*a^(3/2)*(c*d^4 + a*e^4)^2) - (3*sqrt(c)*d^2*e*atan((sqrt(c)*x^2)/sqrt(a)))/(16*a^(5/2)*(c*d^4 + a*e^4)) - (c^(1/4)*d*e^8*(sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) - (c^(1/4)*d*e^4*(3*sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^2) - (c^(1/4)*d*(21*sqrt(c)*d^2 + 5*sqrt(a)*e^2)*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)) + (c^(1/4)*d*e^8*(sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) + (c^(1/4)*d*e^4*(3*sqrt(c)*d^2 + sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*d*(21*sqrt(c)*d^2 + 5*sqrt(a)*e^2)*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)) + (e^11*log(d + e*x))/(c*d^4 + a*e^4)^3 - (c^(1/4)*d*e^8*(sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) - (c^(1/4)*d*e^4*(3*sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^2) - (c^(1/4)*d*(21*sqrt(c)*d^2 - 5*sqrt(a)*e^2)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)) + (c^(1/4)*d*e^8*(sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^3) + (c^(1/4)*d*e^4*(3*sqrt(c)*d^2 - sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*d*(21*sqrt(c)*d^2 - 5*sqrt(a)*e^2)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)) - (e^11*log(a + c*x^4))/(4*(c*d^4 + a*e^4)^3)]
    @test_int [1/((d + e*x)^2*(a + c*x^4)^3), x, 46, -(e^11/((c*d^4 + a*e^4)^3*(d + e*x))) + (c*x*(7*d^2*(c*d^4 - 3*a*e^4) - 12*d*e*(c*d^4 - a*e^4)*x + 5*e^2*(3*c*d^4 - a*e^4)*x^2))/(32*a^2*(c*d^4 + a*e^4)^2*(a + c*x^4)) + (c*(4*a*d^3*e^3 + x*(d^2*(c*d^4 - 3*a*e^4) - 2*d*e*(c*d^4 - a*e^4)*x + e^2*(3*c*d^4 - a*e^4)*x^2)))/(8*a*(c*d^4 + a*e^4)^2*(a + c*x^4)^2) + (c*e^4*(8*a*d^3*e^3 + x*(d^2*(5*c*d^4 - 3*a*e^4) - 2*d*e*(3*c*d^4 - a*e^4)*x + e^2*(7*c*d^4 - a*e^4)*x^2)))/(4*a*(c*d^4 + a*e^4)^3*(a + c*x^4)) - (sqrt(c)*d*e^9*(5*c*d^4 - a*e^4)*atan((sqrt(c)*x^2)/sqrt(a)))/(sqrt(a)*(c*d^4 + a*e^4)^4) - (sqrt(c)*d*e^5*(3*c*d^4 - a*e^4)*atan((sqrt(c)*x^2)/sqrt(a)))/(2*a^(3/2)*(c*d^4 + a*e^4)^3) - (3*sqrt(c)*d*e*(c*d^4 - a*e^4)*atan((sqrt(c)*x^2)/sqrt(a)))/(8*a^(5/2)*(c*d^4 + a*e^4)^2) - (c^(1/4)*(21*sqrt(c)*d^2*(c*d^4 - 3*a*e^4) + 5*sqrt(a)*e^2*(3*c*d^4 - a*e^4))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)^2) - (c^(1/4)*e^4*(3*sqrt(c)*d^2*(5*c*d^4 - 3*a*e^4) + sqrt(a)*e^2*(7*c*d^4 - a*e^4))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^3) - (c^(1/4)*e^8*(3*sqrt(c)*d^2*(3*c*d^4 - a*e^4) + sqrt(a)*e^2*(11*c*d^4 - a*e^4))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^4) + (c^(1/4)*(21*sqrt(c)*d^2*(c*d^4 - 3*a*e^4) + 5*sqrt(a)*e^2*(3*c*d^4 - a*e^4))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*e^4*(3*sqrt(c)*d^2*(5*c*d^4 - 3*a*e^4) + sqrt(a)*e^2*(7*c*d^4 - a*e^4))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^3) + (c^(1/4)*e^8*(3*sqrt(c)*d^2*(3*c*d^4 - a*e^4) + sqrt(a)*e^2*(11*c*d^4 - a*e^4))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^4) + (12*c*d^3*e^11*log(d + e*x))/(c*d^4 + a*e^4)^4 - (c^(1/4)*e^8*(9*c^(3/2)*d^6 - 11*sqrt(a)*c*d^4*e^2 - 3*a*sqrt(c)*d^2*e^4 + a^(3/2)*e^6)*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^4) - (c^(1/4)*(21*sqrt(c)*d^2*(c*d^4 - 3*a*e^4) - 5*sqrt(a)*e^2*(3*c*d^4 - a*e^4))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)^2) - (c^(1/4)*e^4*(3*sqrt(c)*d^2*(5*c*d^4 - 3*a*e^4) - sqrt(a)*e^2*(7*c*d^4 - a*e^4))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^3) + (c^(1/4)*e^8*(9*c^(3/2)*d^6 - 11*sqrt(a)*c*d^4*e^2 - 3*a*sqrt(c)*d^2*e^4 + a^(3/2)*e^6)*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^4) + (c^(1/4)*(21*sqrt(c)*d^2*(c*d^4 - 3*a*e^4) - 5*sqrt(a)*e^2*(3*c*d^4 - a*e^4))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)^2) + (c^(1/4)*e^4*(3*sqrt(c)*d^2*(5*c*d^4 - 3*a*e^4) - sqrt(a)*e^2*(7*c*d^4 - a*e^4))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^3) - (3*c*d^3*e^11*log(a + c*x^4))/(c*d^4 + a*e^4)^4]
    @test_int [1/((d + e*x)^3*(a + c*x^4)^3), x, 46, -(e^11/(2*(c*d^4 + a*e^4)^3*(d + e*x)^2)) - (12*c*d^3*e^11)/((c*d^4 + a*e^4)^4*(d + e*x)) + (c*x*(7*d*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8) - 6*e*(3*c^2*d^8 - 12*a*c*d^4*e^4 + a^2*e^8)*x + 10*c*d^3*e^2*(3*c*d^4 - 5*a*e^4)*x^2))/(32*a^2*(c*d^4 + a*e^4)^3*(a + c*x^4)) + (c*(2*a*d^2*e^3*(5*c*d^4 - 3*a*e^4) + x*(d*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8) - e*(3*c^2*d^8 - 12*a*c*d^4*e^4 + a^2*e^8)*x + 2*c*d^3*e^2*(3*c*d^4 - 5*a*e^4)*x^2)))/(8*a*(c*d^4 + a*e^4)^3*(a + c*x^4)^2) + (c*e^4*(12*a*d^2*e^3*(3*c*d^4 - a*e^4) + x*(3*d*(5*c^2*d^8 - 10*a*c*d^4*e^4 + a^2*e^8) - e*(21*c^2*d^8 - 26*a*c*d^4*e^4 + a^2*e^8)*x + 4*c*d^3*e^2*(7*c*d^4 - 5*a*e^4)*x^2)))/(4*a*(c*d^4 + a*e^4)^4*(a + c*x^4)) - (sqrt(c)*e^9*(55*c^2*d^8 - 40*a*c*d^4*e^4 + a^2*e^8)*atan((sqrt(c)*x^2)/sqrt(a)))/(2*sqrt(a)*(c*d^4 + a*e^4)^5) - (sqrt(c)*e^5*(21*c^2*d^8 - 26*a*c*d^4*e^4 + a^2*e^8)*atan((sqrt(c)*x^2)/sqrt(a)))/(4*a^(3/2)*(c*d^4 + a*e^4)^4) - (3*sqrt(c)*e*(3*c^2*d^8 - 12*a*c*d^4*e^4 + a^2*e^8)*atan((sqrt(c)*x^2)/sqrt(a)))/(16*a^(5/2)*(c*d^4 + a*e^4)^3) - (3*c^(3/4)*d*e^8*(15*c^2*d^8 - 16*a*c*d^4*e^4 + a^2*e^8 + 2*sqrt(a)*sqrt(c)*d^2*e^2*(11*c*d^4 - 5*a*e^4))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^5) - (c^(3/4)*d*e^4*(4*sqrt(a)*sqrt(c)*d^2*e^2*(7*c*d^4 - 5*a*e^4) + 9*(5*c^2*d^8 - 10*a*c*d^4*e^4 + a^2*e^8))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^4) - (c^(3/4)*d*(10*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4) + 21*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8))*atan(1 - (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)^3) + (3*c^(3/4)*d*e^8*(15*c^2*d^8 - 16*a*c*d^4*e^4 + a^2*e^8 + 2*sqrt(a)*sqrt(c)*d^2*e^2*(11*c*d^4 - 5*a*e^4))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(2*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^5) + (c^(3/4)*d*e^4*(4*sqrt(a)*sqrt(c)*d^2*e^2*(7*c*d^4 - 5*a*e^4) + 9*(5*c^2*d^8 - 10*a*c*d^4*e^4 + a^2*e^8))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(8*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^4) + (c^(3/4)*d*(10*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4) + 21*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8))*atan(1 + (sqrt(2)*c^(1/4)*x)/a^(1/4)))/(64*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)^3) + (6*c*d^2*e^11*(13*c*d^4 - 3*a*e^4)*log(d + e*x))/(c*d^4 + a*e^4)^5 - (3*c^(3/4)*d*e^8*(15*c^2*d^8 - 16*a*c*d^4*e^4 + a^2*e^8 - 2*sqrt(a)*sqrt(c)*d^2*e^2*(11*c*d^4 - 5*a*e^4))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^5) + (c^(3/4)*d*e^4*(4*sqrt(a)*sqrt(c)*d^2*e^2*(7*c*d^4 - 5*a*e^4) - 9*(5*c^2*d^8 - 10*a*c*d^4*e^4 + a^2*e^8))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^4) + (c^(3/4)*d*(10*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4) - 21*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8))*log(sqrt(a) - sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)^3) + (3*c^(3/4)*d*e^8*(15*c^2*d^8 - 16*a*c*d^4*e^4 + a^2*e^8 - 2*sqrt(a)*sqrt(c)*d^2*e^2*(11*c*d^4 - 5*a*e^4))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(4*sqrt(2)*a^(3/4)*(c*d^4 + a*e^4)^5) - (c^(3/4)*d*e^4*(4*sqrt(a)*sqrt(c)*d^2*e^2*(7*c*d^4 - 5*a*e^4) - 9*(5*c^2*d^8 - 10*a*c*d^4*e^4 + a^2*e^8))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(16*sqrt(2)*a^(7/4)*(c*d^4 + a*e^4)^4) - (c^(3/4)*d*(10*sqrt(a)*sqrt(c)*d^2*e^2*(3*c*d^4 - 5*a*e^4) - 21*(c^2*d^8 - 12*a*c*d^4*e^4 + 3*a^2*e^8))*log(sqrt(a) + sqrt(2)*a^(1/4)*c^(1/4)*x + sqrt(c)*x^2))/(128*sqrt(2)*a^(11/4)*(c*d^4 + a*e^4)^3) - (3*c*d^2*e^11*(13*c*d^4 - 3*a*e^4)*log(a + c*x^4))/(2*(c*d^4 + a*e^4)^5)]

    #= ::Title::Closed:: =#
    #=Integrands*requiring*algebraic*simplification=#

    #= Following*pairs*of*integrands*are*equal. =#
    @test_int [(-1 + x)/(1 - x + x^2), x, 4, atan((1 - 2*x)/sqrt(3))/sqrt(3) + (1/2)*log(1 - x + x^2)]
    @test_int [(-1 + x^2)/(1 + x^3), x, 5, atan((1 - 2*x)/sqrt(3))/sqrt(3) + (1/2)*log(1 - x + x^2)]

    @test_int [(-4 + 3*x)/(4 - 2*x + x^2), x, 4, atan((1 - x)/sqrt(3))/sqrt(3) + (3/2)*log(4 - 2*x + x^2)]
    @test_int [(-8 + 2*x + 3*x^2)/(8 + x^3), x, 5, atan((1 - x)/sqrt(3))/sqrt(3) + (3/2)*log(4 - 2*x + x^2)]

    @test_int [(2 + x)/(-1 + 2*x + x^2), x, 3, (1/4)*(2 + sqrt(2))*log(1 - sqrt(2) + x) + (1/4)*(2 - sqrt(2))*log(1 + sqrt(2) + x)]
    @test_int [(-4 + x^2)/(2 - 5*x + x^3), x, 4, (1/4)*(2 + sqrt(2))*log(1 - sqrt(2) + x) + (1/4)*(2 - sqrt(2))*log(1 + sqrt(2) + x)]

    @test_int [2/(-1 + 4*x^2), x, 2, -atanh(2*x)]
    @test_int [1/(-1 + 2*x) - 1/(1 + 2*x), x, 1, (1/2)*log(1 - 2*x) - (1/2)*log(1 + 2*x)]

    @test_int [x/(1 - x^2)^5, x, 1, 1/(8*(1 - x^2)^4)]
    @test_int [-(1/(32*(-1 + x)^5)) + 3/(64*(-1 + x)^4) - 5/(128*(-1 + x)^3) + 5/(256*(-1 + x)^2) - 1/(32*(1 + x)^5) - 3/(64*(1 + x)^4) - 5/(128*(1 + x)^3) - 5/(256*(1 + x)^2), x, 1, 1/(8*(1 - x^2)^4), 1/(128*(1 - x)^4) + 1/(64*(1 - x)^3) + 5/(256*(1 - x)^2) + 5/(256*(1 - x)) + 1/(128*(1 + x)^4) + 1/(64*(1 + x)^3) + 5/(256*(1 + x)^2) + 5/(256*(1 + x))]

    @test_int [(1 + x^6)/(-1 + x^6), x, 11, x + atan((1 - 2*x)/sqrt(3))/sqrt(3) - atan((1 + 2*x)/sqrt(3))/sqrt(3) - (2*atanh(x))/3 + (1/6)*log(1 - x + x^2) - (1/6)*log(1 + x + x^2)]
    @test_int [(1/x^3 + x^3)/(-(1/x^3) + x^3), x, 13, x + atan((1 - 2*x)/sqrt(3))/sqrt(3) - atan((1 + 2*x)/sqrt(3))/sqrt(3) - (2*atanh(x))/3 + (1/6)*log(1 - x + x^2) - (1/6)*log(1 + x + x^2)]

    #= ::Title::Closed:: =#
    #=Miscellaneous*rational*function*integration*problems=#

    @test_int [(-x + x^3)/(6 + 2*x), x, 3, 4*x - (3*x^2)/4 + x^3/6 - 12*log(3 + x)]
    @test_int [(x + x^3)/(-1 + x), x, 3, 2*x + x^2/2 + x^3/3 + 2*log(1 - x)]

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

    @test_int [(4 + 4*x)/(x^2*(1 + x^2)), x, 5, -4/x - 4*atan(x) + 4*log(x) - 2*log(1 + x^2)]
    @test_int [(24 + 8*x)/(x*(-4 + x^2)), x, 2, 5*log(2 - x) - 6*log(x) + log(2 + x)]

    @test_int [(-1 + x^2)/(-2*x + x^3), x, 4, log(x)/2 + (1/4)*log(2 - x^2)]
    @test_int [(1 + x^2)/(3*x + x^3), x, 1, (1/3)*log(3*x + x^3)]
    @test_int [(a + 3*b*x^2)/(a*x + b*x^3), x, 1, log(a*x + b*x^3)]

    @test_int [(-2 + 4*x)/(-x + x^3), x, 3, log(1 - x) + 2*log(x) - 3*log(1 + x)]
    @test_int [(4 + x)/(4*x + x^3), x, 6, (1/2)*atan(x/2) + log(x) - (1/2)*log(4 + x^2)]

    @test_int [(-x + 2*x^3)/(1 - x^2 + x^4), x, 1, log(1 - x^2 + x^4)/2]

    @test_int [(-3 + x)/(2*x + 3*x^2 + x^3), x, 3, -((3*log(x))/2) + 4*log(1 + x) - (5/2)*log(2 + x)]
    @test_int [(2 + 4*x)/(x^2 + 2*x^3 + x^4), x, 3, -(2/(x*(1 + x)))]
    @test_int [(1 + x)/(-6*x + x^2 + x^3), x, 3, (3/10)*log(2 - x) - log(x)/6 - (2/15)*log(3 + x)]

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

    @test_int [(1 - 5*x^2)/(x^3*(1 + x^2)), x, 3, -(1/(2*x^2)) - 6*log(x) + 3*log(1 + x^2)]
    @test_int [(2*x)/((-1 + x)*(5 + x^2)), x, 6, (1/3)*sqrt(5)*atan(x/sqrt(5)) + (1/3)*log(1 - x) - (1/6)*log(5 + x^2)]
    @test_int [(2 + x^2)/(2 + x), x, 2, -2*x + x^2/2 + 6*log(2 + x)]
    @test_int [1/((-3 + x)*(4 + x^2)), x, 5, (-(3/26))*atan(x/2) + (1/13)*log(3 - x) - (1/26)*log(4 + x^2)]
    @test_int [(-2 + 3*x^6)/(x*(5 + 2*x^6)), x, 3, (-2*log(x))/5 + (19*log(5 + 2*x^6))/60]

    @test_int [(3 + 2*x)/((-2 + x)*(5 + x)), x, 2, log(2 - x) + log(5 + x)]
    @test_int [x^4/(4 + 5*x^2 + x^4), x, 4, x - (8/3)*atan(x/2) + atan(x)/3]
    @test_int [1/((1 + x)*(2 + x)^2*(3 + x)^3), x, 2, 1/(2 + x) + 1/(4*(3 + x)^2) + 5/(4*(3 + x)) + (1/8)*log(1 + x) + 2*log(2 + x) - (17/8)*log(3 + x)]
    @test_int [x/(-1 + x^2), x, 1, (1/2)*log(1 - x^2)]
    @test_int [(-1 + x^2)^(-2), x, 2, x/(2*(1 - x^2)) + atanh(x)/2]
    @test_int [x^2/(1 + x^2)^2, x, 2, -(x/(2*(1 + x^2))) + atan(x)/2]
    @test_int [1/(2 + 3*x), x, 1, log(2 + 3*x)/3]
    @test_int [1/(a^2 + x^2), x, 1, atan(x/a)/a]
    @test_int [1/(a + b*x^2), x, 1, atan((sqrt(b)*x)/sqrt(a))/(sqrt(a)*sqrt(b))]
    @test_int [1/(2 - x + x^2), x, 2, -((2*atan((1 - 2*x)/sqrt(7)))/sqrt(7))]

    @test_int [x^2*(4 - x^2)^2, x, 2, (16*x^3)/3 - (8*x^5)/5 + x^7/7]
    @test_int [x*(1 - x^3)^2, x, 2, x^2/2 - (2*x^5)/5 + x^8/8]
    @test_int [(-4 + 5*x^2 + x^3)/x^2, x, 2, 4/x + 5*x + x^2/2]
    @test_int [(-1 + x)/(3 - 4*x + 3*x^2), x, 4, atan((2 - 3*x)/sqrt(5))/(3*sqrt(5)) + (1/6)*log(3 - 4*x + 3*x^2)]

    @test_int [(2 + x^3)^2, x, 2, 4*x + x^4 + x^7/7]
    @test_int [(-4 + x^2)/(2 + x), x, 2, -2*x + x^2/2]
    @test_int [1/((2 + x)*(1 + x^2)), x, 5, (2*atan(x))/5 + (1/5)*log(2 + x) - (1/10)*log(1 + x^2)]
    @test_int [1/((1 + x)*(1 + x^2)), x, 5, atan(x)/2 + (1/2)*log(1 + x) - (1/4)*log(1 + x^2)]
    @test_int [x/((1 + x)*(1 + x^2)), x, 5, atan(x)/2 - (1/2)*log(1 + x) + (1/4)*log(1 + x^2)]
    @test_int [(2*x + x^2)/(1 + x)^2, x, 2, x^2/(1 + x), x + 1/(1 + x)]
    @test_int [(-10 + x^2)/(4 + 9*x^2 + 2*x^4), x, 3, atan(x/2) - (3*atan(sqrt(2)*x))/sqrt(2)]
    @test_int [(31 + 5*x)/(11 - 4*x + 3*x^2), x, 4, -((103*atan((2 - 3*x)/sqrt(29)))/(3*sqrt(29))) + (5/6)*log(11 - 4*x + 3*x^2)]

    @test_int [(-2 + x^2 + x^3)/x^4, x, 2, 2/(3*x^3) - x^(-1) + log(x)]
    @test_int [(1 + x + x^3)/x^2, x, 2, -(1/x) + x^2/2 + log(x)]
    @test_int [(-2 + x^2)/(x*(2 + x^2)), x, 3, -log(x) + log(2 + x^2)]

    @test_int [(-3 + x)*(-7 + 4*x^2), x, 2, 21*x - 4*x^3 + (1/16)*(7 - 4*x^2)^2]
    @test_int [(-2 + 7*x)^3, x, 1, (1/28)*(2 - 7*x)^4]
    @test_int [(-7 + 4*x^2)/(3 + 2*x), x, 2, -3*x + x^2 + log(3 + 2*x)]
    @test_int [(1 + x)/((-1 + x)*x^2), x, 2, 1/x + 2*log(1 - x) - 2*log(x)]

    @test_int [1/(4*x^2 + 4*x^3 + x^4), x, 3, (1 + x)/(2*(1 - (1 + x)^2)) + (1/2)*atanh(1 + x)]
    @test_int [(1 + x^2)/(1 + x), x, 2, -x + x^2/2 + 2*log(1 + x)]
    @test_int [(-1 + 3*x - 3*x^2 + x^3)/x^2, x, 2, 1/x - 3*x + x^2/2 + 3*log(x)]
    @test_int [((3 - sqrt(37))/2 + x)*((3 + sqrt(37))/2 + x), x, 2, -7*x + (3*x^2)/2 + x^3/3]

    @test_int [(4 + 3*x^2 + 2*x^3)/(1 + x)^4, x, 2, -5/(3*(1 + x)^3) + 3/(1 + x) + 2*log(1 + x)]
    @test_int [x/((1 + x)^2*(1 + x^2)), x, 3, 1/(2*(1 + x)) + atan(x)/2]
    @test_int [(7 - 2*x + 3*x^2 - x^3 + x^4)/(2 + x), x, 2, -20*x + (9*x^2)/2 - x^3 + x^4/4 + 47*log(2 + x)]
    @test_int [(-1 + x^3)/(-1 + x), x, 2, x + x^2/2 + x^3/3]
    @test_int [(2 + 2*x)/((-1 + x)^3*(1 + x^2)), x, 3, -(1/(1 - x)^2) + 1/(-1 + x) + atan(x)]

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

    @test_int [x^2/(1 + (-1 + x^2)^2), x, 10, (-(1/2))*sqrt((1/2)*(1 + sqrt(2)))*atan((sqrt(2*(1 + sqrt(2))) - 2*x)/sqrt(2*(-1 + sqrt(2)))) + (1/2)*sqrt((1/2)*(1 + sqrt(2)))*atan((sqrt(2*(1 + sqrt(2))) + 2*x)/sqrt(2*(-1 + sqrt(2)))) + log(sqrt(2) - sqrt(2*(1 + sqrt(2)))*x + x^2)/(4*sqrt(2*(1 + sqrt(2)))) - log(sqrt(2) + sqrt(2*(1 + sqrt(2)))*x + x^2)/(4*sqrt(2*(1 + sqrt(2))))]

    #= Following*integrands*are*equal. =#
    #= Requires*the*Ostrogradskiy-Hermite*method =#
    @test_int [-((15 - 36*x + 5*x^2 + 12*x^3 - 34*x^4 + 140*x^5 + 15*x^6 + 8*x^7 - 30*x^9)/(3 + x + x^4)^4), x, 5, 2/(3 + x + x^4)^3 - (3*x)/(3 + x + x^4)^3 + (5*x^2)/(3 + x + x^4)^3 + x^4/(3 + x + x^4)^3 - (5*x^6)/(3 + x + x^4)^3]
    @test_int [(3*(-47 + 228*x + 120*x^2 + 19*x^3))/(3 + x + x^4)^4 + (42 - 320*x - 75*x^2 - 8*x^3)/(3 + x + x^4)^3 + (30*x)/(3 + x + x^4)^2, x, -7, (2 - 3*x + 5*x^2 + x^4 - 5*x^6)/(3 + x + x^4)^3]
    @test_int [(-3 + 10*x + 4*x^3 - 30*x^5)/(3 + x + x^4)^3 - (3*(1 + 4*x^3)*(2 - 3*x + 5*x^2 + x^4 - 5*x^6))/(3 + x + x^4)^4, x, -13, (2 - 3*x + 5*x^2 + x^4 - 5*x^6)/(3 + x + x^4)^3]
    end

max_stars_repo_path: test/1 Algebraic functions/1.3 Miscellaneous/1.3.1 Rational functions.jl