text:
using Rubin
using Tests
using Elliptic
using HypergeometricFunctions
using Polylogarithms
using SpecialFunctions

@test integrate((9*x^3+-9*b*x+2*3^(1/2)*b^3//2)^-1, x) == :(-1//27*b^-1*log(b^(1/2)+-1*x*3^(1/2))+1//27*b^-1*log(2*b^(1/2)+x*3^(1/2))+1//9*3^(1/2)*b^-1//2*(-3x+3^(1/2)*b^(1/2))^-1)
@test integrate((a^3+b^3*x^3+3*a*b^2*x^2+3*b*x*a^2)^p, x) == :((b^3*(x+a*b^-1)^3)^p*(1+3p)^-1*(x+a*b^-1))
@test integrate((a^3+b^3*x^3+3*a*b^2*x^2+3*b*x*a^2)^3, x) == :(1//10*b^-1*(a+b*x)^10)
@test integrate((a^3+b^3*x^3+3*a*b^2*x^2+3*b*x*a^2)^2, x) == :(1//7*b^-1*(a+b*x)^7)
@test integrate(a^3+b^3*x^3+3*a*b^2*x^2+3*b*x*a^2, x) == :(x*a^3+1//4*b^3*x^4+a*b^2*x^3+3//2*b*a^2*x^2)
@test integrate((a^3+b^3*x^3+3*a*b^2*x^2+3*b*x*a^2)^-1, x) == :(-1//2*b^-1*(a+b*x)^-2)
@test integrate((a^3+b^3*x^3+3*a*b^2*x^2+3*b*x*a^2)^-2, x) == :(-1//5*b^-1*(a+b*x)^-5)
@test integrate((a^3+b^3*x^3+3*a*b^2*x^2+3*b*x*a^2)^-3, x) == :(-1//8*b^-1*(a+b*x)^-8)
@test integrate((c^2*x^3+3*a*b+3*x*b^2+3*b*c*x^2)^3, x) == :(1//10*c^-4*(b+c*x)^10+-1*x*b^3*c^-3*(b^2+-3*a*c)^3+-3//7*b*c^-4*(b+c*x)^7*(b^2+-3*a*c)+3//4*b^2*c^-4*(b+c*x)^4*(b^2+-3*a*c)^2)
@test integrate((c^2*x^3+3*a*b+3*x*b^2+3*b*c*x^2)^2, x) == :(1//7*c^-3*(b+c*x)^7+x*b^2*c^-2*(b^2+-3*a*c)^2+-1//2*b*c^-3*(b+c*x)^4*(b^2+-3*a*c))
@test integrate(c^2*x^3+3*a*b+3*x*b^2+3*b*c*x^2, x) == :(1//4*c^2*x^4+3//2*b^2*x^2+b*c*x^3+3*a*b*x)
@test integrate((c^2*x^3+3*a*b+3*x*b^2+3*b*c*x^2)^-1, x) == :(-1//6*b^-2//3*(b^2+-3*a*c)^-2//3*log(b^2//3*(b^2+-3*a*c)^2//3+c^2*(x+b*c^-1)^2+c*b^1//3*(b^2+-3*a*c)^1//3*(x+b*c^-1))+1//3*b^-2//3*(b^2+-3*a*c)^-2//3*log(b+c*x+-1*b^1//3*(b^2+-3*a*c)^1//3)+-1//3*3^(1/2)*b^-2//3*(b^2+-3*a*c)^-2//3*arctan(1//3*3^(1/2)*b^-1//3*(b^1//3+(b^2+-3*a*c)^-1//3*(2b+2*c*x))))
@test integrate((c^2*x^3+3*a*b+3*x*b^2+3*b*c*x^2)^-2, x) == :(-2//9*c*b^-5//3*(b^2+-3*a*c)^-5//3*log(b+c*x+-1*b^1//3*(b^2+-3*a*c)^1//3)+1//9*c*b^-5//3*(b^2+-3*a*c)^-5//3*log(b^2//3*(b^2+-3*a*c)^2//3+c^2*(x+b*c^-1)^2+c*b^1//3*(b^2+-3*a*c)^1//3*(x+b*c^-1))+-1//3*c*b^-1*(b^2+-3*a*c)^-1*(c^2*x^3+3*a*b+3*x*b^2+3*b*c*x^2)^-1*(x+b*c^-1)+2//9*c*3^(1/2)*b^-5//3*(b^2+-3*a*c)^-5//3*arctan(1//3*3^(1/2)*b^-1//3*(b^1//3+(b^2+-3*a*c)^-1//3*(2b+2*c*x))))
@test integrate((c^2*x^3+3*a*b+3*x*b^2+3*b*c*x^2)^-3, x) == :(-5//54*b^-8//3*c^2*(b^2+-3*a*c)^-8//3*log(b^2//3*(b^2+-3*a*c)^2//3+c^2*(x+b*c^-1)^2+c*b^1//3*(b^2+-3*a*c)^1//3*(x+b*c^-1))+5//27*b^-8//3*c^2*(b^2+-3*a*c)^-8//3*log(b+c*x+-1*b^1//3*(b^2+-3*a*c)^1//3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^-2*log(c+d*x)+-1*d*c^-2*log(x))
@test integrate((b*x+d*x^3)^-1, x) == :(b^-1*log(x)+-1//2*b^-1*log(b+d*x^2))
@test integrate((b*x+c*x^2+d*x^3)^-1, x) == :(b^-1*log(x)+-1//2*b^-1*log(b+c*x+d*x^2)+c*b^-1*(c^2+-4*b*d)^-1//2*arctanh((c^2+-4*b*d)^-1//2*(c+2*d*x)))
@test integrate((a+d*x^3)^-1, x) == :(-1//6*a^-2//3*d^-1//3*log(a^2//3+d^2//3*x^2+-1*x*a^1//3*d^1//3)+1//3*a^-2//3*d^-1//3*log(a^1//3+x*d^1//3)+-1//3*3^(1/2)*a^-2//3*d^-1//3*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+-2*x*d^1//3)))
@test integrate((d*x^3)^n, x) == :(x*(d*x^3)^n*(1+3n)^-1)
@test integrate((d^2*x^4+4*a*c+4*c^2*x^2+4*c*d*x^3)^4, x) == :(1//17*d^8*(x+c*d^-1)^17+-8//15*c^2*d^6*(x+c*d^-1)^15+2//9*c^2*(x+c*d^-1)^9*(35*c^6+48*a^2*d^4+120*a*c^3*d^2)+x*c^4*d^-8*(c^3+4*a*d^2)^4+-8//3*c^5*d^-6*(x+c*d^-1)^3*(c^3+4*a*d^2)^3+-8//11*c^3*d^2*(x+c*d^-1)^11*(7*c^3+12*a*d^2)+4//13*c*d^4*(x+c*d^-1)^13*(7*c^3+4*a*d^2)+-8//7*c^4*d^-2*(x+c*d^-1)^7*(c^3+4*a*d^2)*(7*c^3+12*a*d^2)+4//5*c^3*d^-4*(x+c*d^-1)^5*(c^3+4*a*d^2)^2*(7*c^3+4*a*d^2))
@test integrate((d^2*x^4+4*a*c+4*c^2*x^2+4*c*d*x^3)^3, x) == :(1//13*d^6*x^13+c*d^5*x^12+16*c^3*d^3*x^10+64*x*a^3*c^3+64*a^2*c^4*x^3+32//7*c^3*x^7*(2*c^3+9*a*d^2)+60//11*c^2*d^4*x^11+12*d*c^2*x^8*(2*c^3+a*d^2)+48*d*a^2*c^3*x^4+64*a*d*c^4*x^6+4//3*c*d^2*x^9*(20*c^3+a*d^2)+48//5*a*c^2*x^5*(4*c^3+a*d^2))
@test integrate((d^2*x^4+4*a*c+4*c^2*x^2+4*c*d*x^3)^2, x) == :(1//9*d^4*x^9+c*d^3*x^8+16*x*a^2*c^2+8//5*c*x^5*(2*c^3+a*d^2)+16//3*d*c^3*x^6+24//7*c^2*d^2*x^7+32//3*a*c^3*x^3+8*a*d*c^2*x^4)
@test integrate(d^2*x^4+4*a*c+4*c^2*x^2+4*c*d*x^3, x) == :(1//5*d^2*x^5+4//3*c^2*x^3+c*d*x^4+4*a*c*x)
@test integrate((d^2*x^4+4*a*c+4*c^2*x^2+4*c*d*x^3)^-1, x) == :(-1//4*d*2^(1/2)*c^-3//4*(c^3+4*a*d^2)^-1//2*(c^3//2+-1*(c^3+4*a*d^2)^(1/2))^-1//2*arctanh(c^-1//4*(c^3//2+-1*(c^3+4*a*d^2)^(1/2))^-1//2*(c*2^(1/2)+c^1//4*(c^3//2+(c^3+4*a*d^2)^(1/2))^(1/2)+d*x*2^(1/2)))+-1//8*d*2^(1/2)*c^-3//4*(c^3+4*a*d^2)^-1//2*(c^3//2+(c^3+4*a*d^2)^(1/2))^-1//2*log(c^(1/2)*(c^3+4*a*d^2)^(1/2)+d^2*(x+c*d^-1)^2+-1*d*2^(1/2)*c^1//4*(c^3//2+(c^3+4*a*d^2)^(1/2))^(1/2)*(x+c*d^-1))+1//4*d*2^(1/2)*c^-3//4*(c^3+4*a*d^2)^-1//2*(c^3//2+-1*(c^3+4*a*d^2)^(1/2))^-1//2*arctanh(c^-1//4*(c^3//2+-1*(c^3+4*a*d^2)^(1/2))^-1//2*(c^1//4*(c^3//2+(c^3+4*a*d^2)^(1/2))^(1/2)+-1*2^(1/2)*(c+d*x)))+1//8*d*2^(1/2)*c^-3//4*(c^3+4*a*d^2)^-1//2*(c^3//2+(c^3+4*a*d^2)^(1/2))^-1//2*log(c^(1/2)*(c^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-1//2*(c^3+-1*c^3//2*(c^3+4*a*d^2)^(1/2)+12*a*d^2)*log(c^(1/2)*(c^3+4*a*d^2)^(1/2)+d^2*(x+c*d^-1)^2+d*2^(1/2)*c^1//4*(c^3//2+(c^3+4*a*d^2)^(1/2))^(1/2)*(x+c*d^-1)))
@test integrate((-1*x*d^3+8*a*e^2+8*e^3*x^4+8*d*e^2*x^3)^4, x) == :(4096//17*e^12*(x+1//4*d*e^-1)^17+-2048//5*d^2*e^10*(x+1//4*d*e^-1)^15+1//24*e^4*(x+1//4*d*e^-1)^9*(601*d^8+65536*a^2*e^6+20992*a*d^4*e^3)+1//5120*(x+1//4*d*e^-1)^5*(5*d^4+256*a*e^3)^2*(59*d^4+256*a*e^3)+1//1048576*x*e^-4*(5*d^4+256*a*e^3)^4+64//13*e^8*(x+1//4*d*e^-1)^13*(59*d^4+256*a*e^3)+-72//11*d^2*e^6*(x+1//4*d*e^-1)^11*(17*d^4+256*a*e^3)+-1//8192*d^2*e^-2*(x+1//4*d*e^-1)^3*(5*d^4+256*a*e^3)^3+-9//224*d^2*e^2*(x+1//4*d*e^-1)^7*(5*d^4+256*a*e^3)*(17*d^4+256*a*e^3))
@test integrate((-1*x*d^3+8*a*e^2+8*e^3*x^4+8*d*e^2*x^3)^3, x) == :(512//13*e^9*x^13+32*d^3*e^6*x^10+128*d*e^8*x^12+512*x*a^3*e^6+-128//3*e^5*x^9*(d^4+-4*a*e^3)+-1//4*d*x^4*(d^8+-1536*a^2*e^6)+1536//11*d^2*e^7*x^11+-96*a^2*d^3*e^4*x^2+-24*d*e^4*x^8*(d^4+-16*a*e^3)+4*d^3*e^2*x^6*(d^4+-16*a*e^3)+8*a*d^6*e^2*x^3+-384//5*a*e^4*x^5*(d^4+-4*a*e^3)+24//7*d^2*e^3*x^7*(d^4+64*a*e^3))
@test integrate((-1*x*d^3+8*a*e^2+8*e^3*x^4+8*d*e^2*x^3)^2, x) == :(1//3*d^6*x^3+64//9*e^6*x^9+16*d*e^5*x^8+64*x*a^2*e^4+-16//5*e^2*x^5*(d^4+-8*a*e^3)+-8//3*d^3*e^3*x^6+64//7*d^2*e^4*x^7+-8*a*d^3*e^2*x^2+32*a*d*e^4*x^4)
@test integrate(-1*x*d^3+8*a*e^2+8*e^3*x^4+8*d*e^2*x^3, x) == :(-1//2*d^3*x^2+8//5*e^3*x^5+2*d*e^2*x^4+8*a*x*e^2)
@test integrate((-1*x*d^3+8*a*e^2+8*e^3*x^4+8*d*e^2*x^3)^-1, x) == :(-2*(d^4+-64*a*e^3)^-1//2*(2*(d^4+-64*a*e^3)^(1/2)+3*d^2)^-1//2*arctanh((2*(d^4+-64*a*e^3)^(1/2)+3*d^2)^-1//2*(d+4*e*x))+2*(d^4+-64*a*e^3)^-1//2*(-2*(d^4+-64*a*e^3)^(1/2)+3*d^2)^-1//2*arctanh((-2*(d^4+-64*a*e^3)^(1/2)+3*d^2)^-1//2*(d+4*e*x)))
@test integrate((-1*x*d^3+8*a*e^2+8*e^3*x^4+8*d*e^2*x^3)^-2, x) == :(2*e*(5*d^8+-16384*a^2*e^6+-64*a*d^4*e^3)^-1*(-1*x*d^3+8*a*e^2+8*e^3*x^4+8*d*e^2*x^3)^-1*(x+1//4*d*e^-1)*(13*d^4+-256*a*e^3+-48*d^2*e^2*(x+1//4*d*e^-1)^2)+-24*e*(d^4+-64*a*e^3)^-3//2*(-2*(d^4+-64*a*e^3)^(1/2)+3*d^2)^-1//2*(5*d^4+256*a*e^3)^-1*(d^4+-1*d^2*(d^4+-64*a*e^3)^(1/2)+128*a*e^3)*arctanh((-2*(d^4+-64*a*e^3)^(1/2)+3*d^2)^-1//2*(d+4*e*x))+24*e*(d^4+-64*a*e^3)^-3//2*(2*(d^4+-64*a*e^3)^(1/2)+3*d^2)^-1//2*(5*d^4+256*a*e^3)^-1*(d^4+d^2*(d^4+-64*a*e^3)^(1/2)+128*a*e^3)*arctanh((2*(d^4+-64*a*e^3)^(1/2)+3*d^2)^-1//2*(d+4*e*x)))
@test integrate((8+-1*x^3+8x+8*x^4)^4, x) == :(-448*x^12+-128*x^16+1168*x^14+1376*x^8+1408*x^9+3584*x^4+4096x+6784*x^7+7168*x^6+8192*x^2+8192*x^3+128//5*x^15+4096//17*x^17+10241//13*x^13+14336//5*x^5+21488//5*x^10+25312//11*x^11)
@test integrate((8+-1*x^3+8x+8*x^4)^3, x) == :(-45*x^8+-16*x^12+80*x^4+128*x^9+480*x^6+512x+512*x^3+768*x^2+24//11*x^11+307//2*x^10+512//13*x^13+1152//5*x^5+1560//7*x^7)
@test integrate((8+-1*x^3+8x+8*x^4)^2, x) == :(-4*x^4+-2*x^8+64x+64*x^2+1//7*x^7+64//3*x^3+64//3*x^6+64//9*x^9+112//5*x^5)
@test integrate(8+-1*x^3+8x+8*x^4, x) == :(4*x^2+8x+-1//4*x^4+8//5*x^5)
@test integrate((8+-1*x^3+8x+8*x^4)^-1, x) == :(-1//12*(109//1218+67//1218*29^(1/2))^(1/2)*arctan((-6+6*29^(1/2))^-1//2*(2+(6+6*29^(1/2))^(1/2)+8*x^-1))+-1//12*(109//1218+67//1218*29^(1/2))^(1/2)*arctan((-6+6*29^(1/2))^-1//2*(2+-1*(6+6*29^(1/2))^(1/2)+8*x^-1))+-1//24*(-109//1218+67//1218*29^(1/2))^(1/2)*log((1+4*x^-1)^2+3*29^(1/2)+-1*(6+6*29^(1/2))^(1/2)*(1+4*x^-1))+-1//84*7^(1/2)*arctan(1//42*7^(1/2)*(3+-1*(1+4*x^-1)^2))+1//24*(-109//1218+67//1218*29^(1/2))^(1/2)*log((1+4*x^-1)^2+3*29^(1/2)+(6+6*29^(1/2))^(1/2)*(1+4*x^-1)))
@test integrate((8+-1*x^3+8x+8*x^4)^-2, x) == :(-1*(87696+-2016*(1+4*x^-1)^2+336*(1+4*x^-1)^4)^-1*(207+29*(1+4*x^-1)^2)+-17//7056*7^(1/2)*arctan(1//42*7^(1/2)*(3+-1*(1+4*x^-1)^2))+-1//87696*(180983329//1218+1583563//42*29^(1/2))^(1/2)*arctan((-6+6*29^(1/2))^-1//2*(2+(6+6*29^(1/2))^(1/2)+8*x^-1))+-1//87696*(180983329//1218+1583563//42*29^(1/2))^(1/2)*arctan((-6+6*29^(1/2))^-1//2*(2+-1*(6+6*29^(1/2))^(1/2)+8*x^-1))+-1//175392*(-180983329//1218+1583563//42*29^(1/2))^(1/2)*log((1+4*x^-1)^2+3*29^(1/2)+-1*(6+6*29^(1/2))^(1/2)*(1+4*x^-1))+1//175392*(-180983329//1218+1583563//42*29^(1/2))^(1/2)*log((1+4*x^-1)^2+3*29^(1/2)+(6+6*29^(1/2))^(1/2)*(1+4*x^-1))+(22888656+-526176*(1+4*x^-1)^2+87696*(1+4*x^-1)^4)^-1*(1+4*x^-1)*(25785+995*(1+4*x^-1)^2))
@test integrate((1+4x+4*x^2+4*x^4)^4, x) == :(x+8*x^2+112*x^4+256*x^12+384*x^10+448*x^8+112//3*x^3+256//17*x^17+512//7*x^14+992//3*x^6+1024//15*x^15+1136//5*x^5+1792//13*x^13+2752//7*x^7+3328//11*x^11+4192//9*x^9)
@test integrate((1+4x+4*x^2+4*x^4)^3, x) == :(x+6*x^2+20*x^3+40*x^4+48*x^6+48*x^8+64//13*x^13+80//3*x^9+96//5*x^10+192//11*x^11+252//5*x^5+352//7*x^7)
@test integrate((1+4x+4*x^2+4*x^4)^2, x) == :(x+4*x^2+8*x^3+8*x^4+16//3*x^6+16//9*x^9+24//5*x^5+32//7*x^7)
@test integrate(1+4x+4*x^2+4*x^4, x) == :(x+2*x^2+4//3*x^3+4//5*x^5)
@test integrate((1+4x+4*x^2+4*x^4)^-1, x) == :((1/2)*arctan(-1//2+(1/2)*(1+x^-1)^2)+-1//2*(2//5+1//5*5^(1/2))^(1/2)*arctan((-2+2*5^(1/2))^-1//2*(2+(2+2*5^(1/2))^(1/2)+2*x^-1))+-1//2*(2//5+1//5*5^(1/2))^(1/2)*arctan((-2+2*5^(1/2))^-1//2*(2+-1*(2+2*5^(1/2))^(1/2)+2*x^-1))+-1//4*(-2//5+1//5*5^(1/2))^(1/2)*log(5^(1/2)+(1+x^-1)^2+-1*(2+2*5^(1/2))^(1/2)*(1+x^-1))+1//4*(-2//5+1//5*5^(1/2))^(1/2)*log(5^(1/2)+(1+x^-1)^2+(2+2*5^(1/2))^(1/2)*(1+x^-1)))
@test integrate((1+4x+4*x^2+4*x^4)^-2, x) == :(7//4*arctan(-1//2+(1/2)*(1+x^-1)^2)+-1*(10+-4*(1+x^-1)^2+2*(1+x^-1)^4)^-1*(17+-1*(1+x^-1)^2)+-1//20*(5959//10+533//2*5^(1/2))^(1/2)*arctan((-2+2*5^(1/2))^-1//2*(2+(2+2*5^(1/2))^(1/2)+2*x^-1))+-1//20*(5959//10+533//2*5^(1/2))^(1/2)*arctan((-2+2*5^(1/2))^-1//2*(2+-1*(2+2*5^(1/2))^(1/2)+2*x^-1))+-1//40*(-5959//10+533//2*5^(1/2))^(1/2)*log(5^(1/2)+(1+x^-1)^2+(2+2*5^(1/2))^(1/2)*(1+x^-1))+1//40*(-5959//10+533//2*5^(1/2))^(1/2)*log(5^(1/2)+(1+x^-1)^2+-1*(2+2*5^(1/2))^(1/2)*(1+x^-1))+(50+-20*(1+x^-1)^2+10*(1+x^-1)^4)^-1*(1+x^-1)*(59+-17*(1+x^-1)^2))
@test integrate((8+-15*x^3+8*x^2+8*x^4+24x)^4, x) == :(-30720*x^6+-1920*x^16+4096x+24576*x^2+31128*x^12+36384*x^8+139776*x^4+-566912//7*x^7+-331040//11*x^11+-169584//5*x^10+-75504//7*x^14+-12095//13*x^13+4096//17*x^17+102784//15*x^15+237568//3*x^3+538624//5*x^5+641152//9*x^9)
@test integrate((8+-15*x^3+8*x^2+8*x^4+24x)^3, x) == :(-2976*x^6+-240*x^12+512x+2097*x^8+2304*x^2+5040*x^4+5120*x^3+-4527//10*x^10+-2936//3*x^9+-384//5*x^5+512//13*x^13+5528//7*x^7+6936//11*x^11)
@test integrate((8+-15*x^3+8*x^2+8*x^4+24x)^2, x) == :(-30*x^8+24*x^6+36*x^4+64x+192*x^2+-528//5*x^5+64//9*x^9+353//7*x^7+704//3*x^3)
@test integrate(8+-15*x^3+8*x^2+8*x^4+24x, x) == :(8x+12*x^2+-15//4*x^4+8//3*x^3+8//5*x^5)
@test integrate((8+-15*x^3+8*x^2+8*x^4+24x)^-1, x) == :(-1//4*(5167//40326+5//858*517^(1/2))^(1/2)*arctan((-38+2*517^(1/2))^-1//2*(6+(38+2*517^(1/2))^(1/2)+8*x^-1))+-1//4*(5167//40326+5//858*517^(1/2))^(1/2)*arctan((-38+2*517^(1/2))^-1//2*(6+-1*(38+2*517^(1/2))^(1/2)+8*x^-1))+-1//8*(-5167//40326+5//858*517^(1/2))^(1/2)*log(517^(1/2)+(3+4*x^-1)^2+-1*(38+2*517^(1/2))^(1/2)*(3+4*x^-1))+1//8*(-5167//40326+5//858*517^(1/2))^(1/2)*log(517^(1/2)+(3+4*x^-1)^2+(38+2*517^(1/2))^(1/2)*(3+4*x^-1))+1//52*39^(1/2)*arctan(1//39*39^(1/2)*x^-2*(8+-5*x^2+12x)))
@test integrate((8+-15*x^3+8*x^2+8*x^4+24x)^-2, x) == :(-1*(107536+-7904*(3+4*x^-1)^2+208*(3+4*x^-1)^4)^-1*(10077+-321*(3+4*x^-1)^2)+-1//645216*(-59644114671451//40326+5073830635//78*517^(1/2))^(1/2)*log(517^(1/2)+(3+4*x^-1)^2+-1*(38+2*517^(1/2))^(1/2)*(3+4*x^-1))+1//645216*(-59644114671451//40326+5073830635//78*517^(1/2))^(1/2)*log(517^(1/2)+(3+4*x^-1)^2+(38+2*517^(1/2))^(1/2)*(3+4*x^-1))+73//2704*39^(1/2)*arctan(1//39*39^(1/2)*x^-2*(8+-5*x^2+12x))+(166788336+-12259104*(3+4*x^-1)^2+322608*(3+4*x^-1)^4)^-1*(3+4*x^-1)*(3327931+-129631*(3+4*x^-1)^2)+-1//645216*(19//40326+1//40326*517^(1/2))^(1/2)*(1678181+74897*517^(1/2))*arctan((-38+2*517^(1/2))^-1//2*(6+(38+2*517^(1/2))^(1/2)+8*x^-1))+-1//645216*(19//40326+1//40326*517^(1/2))^(1/2)*(1678181+74897*517^(1/2))*arctan((-38+2*517^(1/2))^-1//2*(6+-1*(38+2*517^(1/2))^(1/2)+8*x^-1)))
@test integrate((a^5+b^5*x^5+5*a*b^4*x^4+5*b*x*a^4+10*a^2*b^3*x^3+10*a^3*b^2*x^2)^3, x) == :(1//16*b^-1*(a+b*x)^16)
@test integrate((a^5+b^5*x^5+5*a*b^4*x^4+5*b*x*a^4+10*a^2*b^3*x^3+10*a^3*b^2*x^2)^2, x) == :(1//11*b^-1*(a+b*x)^11)
@test integrate((a^5+b^5*x^5+5*a*b^4*x^4+5*b*x*a^4+10*a^2*b^3*x^3+10*a^3*b^2*x^2)^-1, x) == :(-1//4*b^-1*(a+b*x)^-4)
@test integrate((a^5+b^5*x^5+5*a*b^4*x^4+5*b*x*a^4+10*a^2*b^3*x^3+10*a^3*b^2*x^2)^-2, x) == :(-1//9*b^-1*(a+b*x)^-9)
@test integrate((a^5+b^5*x^5+5*a*b^4*x^4+5*b*x*a^4+10*a^2*b^3*x^3+10*a^3*b^2*x^2)^-3, x) == :(-1//14*b^-1*(a+b*x)^-14)
@test integrate((1+x^2+x^3+x^5)^-1, x) == :((1/2)*arctan(x)+-1//3*log(1+x^2+-1x)+1//4*log(1+x^2)+1//6*log(1+x))
@test integrate((3+-19*x^2+-16*x^6+32*x^4)^4, x) == :(-684*x^3+81x+4590*x^5+-4014080//19*x^19+-1841600//11*x^11+-1094656//3*x^15+-524288//23*x^23+-149700//7*x^7+65536//25*x^25+634321//9*x^9+1884160//21*x^21+3764416//13*x^13+5633536//17*x^17)
@test integrate((3+-19*x^2+-16*x^6+32*x^4)^3, x) == :(-2605*x^7+-171*x^3+27x+-84912//11*x^11+-21248//5*x^15+-4096//19*x^19+4113//5*x^5+16448//3*x^9+24576//17*x^17+93440//13*x^13)
@test integrate((3+-19*x^2+-16*x^6+32*x^4)^2, x) == :(-38*x^3+9x+-1312//7*x^7+-1024//11*x^11+256//13*x^13+544//3*x^9+553//5*x^5)
@test integrate(3+-19*x^2+-16*x^6+32*x^4, x) == :(3x+-19//3*x^3+-16//7*x^7+32//5*x^5)
@test integrate((3+-19*x^2+-16*x^6+32*x^4)^-1, x) == :(1//3*arctanh(x)+1//3*arctanh(2x)+-1//3*3^(1/2)*arctanh(2//3*x*3^(1/2)))
@test integrate((3+-19*x^2+-16*x^6+32*x^4)^-2, x) == :((18+-36x)^-1+(36+-36x)^-1+-1*(18+36x)^-1+-1*(36+36x)^-1+-7//27*arctanh(2x)+67//54*arctanh(x)+2*x*(9+-12*x^2)^-1+-5//9*3^(1/2)*arctanh(2//3*x*3^(1/2)))
@test integrate((3+-19*x^2+-16*x^6+32*x^4)^-3, x) == :(-67*(432+432x)^-1+-7*(108+-216x)^-1+7*(108+216x)^-1+67*(432+-432x)^-1+-1//108*(1+2x)^-2+-1//432*(1+x)^-2+1//108*(1+-2x)^-2+1//432*(1+-1x)^-2+67//162*arctanh(2x)+3913//648*arctanh(x)+5*x*(9+-12*x^2)^-1+-67//18*3^(1/2)*arctanh(2//3*x*3^(1/2))+-2//3*x*(3+-4*x^2)^-2)
@test integrate(x^3*(c+(a+b*x)^2)^-1, x) == :((1/2)*b^-4*(a+b*x)^2+(1/2)*b^-4*(-1c+3*a^2)*log(c+(a+b*x)^2)+-3*a*x*b^-3+-1*a*b^-4*c^-1//2*(a^2+-3c)*arctan(c^-1//2*(a+b*x)))
@test integrate(x^2*(c+(a+b*x)^2)^-1, x) == :(x*b^-2+-1*a*b^-3*log(c+(a+b*x)^2)+b^-3*c^-1//2*(a^2+-1c)*arctan(c^-1//2*(a+b*x)))
@test integrate(x*(c+(a+b*x)^2)^-1, x) == :((1/2)*b^-2*log(c+(a+b*x)^2)+-1*a*b^-2*c^-1//2*arctan(c^-1//2*(a+b*x)))
@test integrate((c+(a+b*x)^2)^-1, x) == :(b^-1*c^-1//2*arctan(c^-1//2*(a+b*x)))
@test integrate(x^-1*(c+(a+b*x)^2)^-1, x) == :((c+a^2)^-1*log(x)+-1*(2c+2*a^2)^-1*log(c+(a+b*x)^2)+-1*a*c^-1//2*(c+a^2)^-1*arctan(c^-1//2*(a+b*x)))
@test integrate(x^-2*(c+(a+b*x)^2)^-1, x) == :(-1*x^-1*(c+a^2)^-1+a*b*(c+a^2)^-2*log(c+(a+b*x)^2)+-2*a*b*(c+a^2)^-2*log(x)+b*c^-1//2*(c+a^2)^-2*(a^2+-1c)*arctan(c^-1//2*(a+b*x)))
@test integrate(x^-3*(c+(a+b*x)^2)^-1, x) == :(-1*x^-2*(2c+2*a^2)^-1+b^2*(c+a^2)^-3*(-1c+3*a^2)*log(x)+2*a*b*x^-1*(c+a^2)^-2+-1//2*b^2*(c+a^2)^-3*(-1c+3*a^2)*log(c+(a+b*x)^2)+-1*a*b^2*c^-1//2*(c+a^2)^-3*(a^2+-3c)*arctan(c^-1//2*(a+b*x)))
@test integrate((a+b*(c+d*x)^2)^-1, x) == :(a^-1//2*b^-1//2*d^-1*arctan(a^-1//2*b^(1/2)*(c+d*x)))
@test integrate((a+b*(c+d*x)^2)^-2, x) == :((1/2)*a^-1*d^-1*(a+b*(c+d*x)^2)^-1*(c+d*x)+(1/2)*a^-3//2*b^-1//2*d^-1*arctan(a^-1//2*b^(1/2)*(c+d*x)))
@test integrate((a+b*(c+d*x)^2)^-3, x) == :(1//4*a^-1*d^-1*(a+b*(c+d*x)^2)^-2*(c+d*x)+1//8*a^-2*d^-1*(a+b*(c+d*x)^2)^-1*(3c+3*d*x)+3//8*a^-5//2*b^-1//2*d^-1*arctan(a^-1//2*b^(1/2)*(c+d*x)))
@test integrate(((-1a)^(1/2)+b*(c+d*x)^2)^-1, x) == :(b^-1//2*d^-1*(-1a)^-1//4*arctan(b^(1/2)*(-1a)^-1//4*(c+d*x)))
@test integrate((1+(c+d*x)^2)^-1, x) == :(d^-1*arctan(c+d*x))
@test integrate((1+(c+d*x)^2)^-2, x) == :((1/2)*d^-1*arctan(c+d*x)+(1/2)*d^-1*(1+(c+d*x)^2)^-1*(c+d*x))
@test integrate((1+(c+d*x)^2)^-3, x) == :(3//8*d^-1*arctan(c+d*x)+1//4*d^-1*(1+(c+d*x)^2)^-2*(c+d*x)+1//8*d^-1*(1+(c+d*x)^2)^-1*(3c+3*d*x))
@test integrate((1+-1*(c+d*x)^2)^-1, x) == :(d^-1*arctanh(c+d*x))
@test integrate((1+-1*(c+d*x)^2)^-2, x) == :((1/2)*d^-1*arctanh(c+d*x)+(1/2)*d^-1*(1+-1*(c+d*x)^2)^-1*(c+d*x))
@test integrate((1+-1*(c+d*x)^2)^-3, x) == :(3//8*d^-1*arctanh(c+d*x)+1//4*d^-1*(1+-1*(c+d*x)^2)^-2*(c+d*x)+1//8*d^-1*(1+-1*(c+d*x)^2)^-1*(3c+3*d*x))
@test integrate((1+-1*(1+x)^2)^-1, x) == :(arctanh(1+x))
@test integrate((1+-1*(1+x)^2)^-2, x) == :((1/2)*arctanh(1+x)+(2+-2*(1+x)^2)^-1*(1+x))
@test integrate((1+-1*(1+x)^2)^-3, x) == :(3//8*arctanh(1+x)+(8+-8*(1+x)^2)^-1*(3+3x)+1//4*(1+-1*(1+x)^2)^-2*(1+x))
@test integrate(x^-1*(1+(a+b*x)^2)^2, x) == :(1//4*(a+b*x)^4+(1+a^2)^2*log(x)+(a+b*x)^2*(1+(1/2)*a^2)+1//3*a*(a+b*x)^3+a*b*x*(2+a^2))
@test integrate(x^2*(1+(-1+x)^2)^-1, x) == :(x+log(1+(-1+x)^2))
@test integrate(x^2*(1+-1*(1+x)^2)^-1//2, x) == :(3//2*(1+-1*(1+x)^2)^(1/2)+3//2*arcsin(1+x)+-1//2*x*(1+-1*(1+x)^2)^(1/2))
@test integrate(x^2*(1+-1*(a+b*x)^2)^-1//2, x) == :((1/2)*b^-3*(1+2*a^2)*arcsin(a+b*x)+-1//2*x*b^-2*(1+-1*(a+b*x)^2)^(1/2)+3//2*a*b^-3*(1+-1*(a+b*x)^2)^(1/2))
@test integrate(x^2*(1+(a+b*x)^2)^-1//2, x) == :((1/2)*x*b^-2*(1+(a+b*x)^2)^(1/2)+-3//2*a*b^-3*(1+(a+b*x)^2)^(1/2)+-1//2*b^-3*(1+-2*a^2)*arcsinh(a+b*x))
@test integrate(x^3*(a+b*(c+d*x)^3)^-1, x) == :(x*b^-1*d^-3+-1*c*b^-1*d^-4*log(a+b*(c+d*x)^3)+-1//3*a^-2//3*b^-4//3*d^-4*(a+b*c^3+3*a^1//3*b^2//3*c^2)*log(a^1//3+b^1//3*(c+d*x))+1//6*a^-2//3*b^-4//3*d^-4*(a+b*c^3+3*a^1//3*b^2//3*c^2)*log(a^2//3+b^2//3*(c+d*x)^2+-1*a^1//3*b^1//3*(c+d*x))+1//3*3^(1/2)*a^-2//3*b^-4//3*d^-4*(a+b*c^3+-3*a^1//3*b^2//3*c^2)*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+-2*b^1//3*(c+d*x))))
@test integrate(x^2*(a+b*(c+d*x)^3)^-1, x) == :(1//3*b^-1*d^-3*log(a+b*(c+d*x)^3)+-1//6*c*a^-2//3*b^-2//3*d^-3*(2*a^1//3+c*b^1//3)*log(a^2//3+b^2//3*(c+d*x)^2+-1*a^1//3*b^1//3*(c+d*x))+1//3*c*a^-2//3*b^-2//3*d^-3*(2*a^1//3+c*b^1//3)*log(a^1//3+b^1//3*(c+d*x))+1//3*c*3^(1/2)*a^-2//3*b^-2//3*d^-3*(2*a^1//3+-1*c*b^1//3)*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+-2*b^1//3*(c+d*x))))
@test integrate(x*(a+b*(c+d*x)^3)^-1, x) == :(-1//3*a^-2//3*b^-2//3*d^-2*(a^1//3+c*b^1//3)*log(a^1//3+b^1//3*(c+d*x))+1//6*a^-2//3*b^-2//3*d^-2*(a^1//3+c*b^1//3)*log(a^2//3+b^2//3*(c+d*x)^2+-1*a^1//3*b^1//3*(c+d*x))+-1//3*3^(1/2)*a^-2//3*b^-2//3*d^-2*(a^1//3+-1*c*b^1//3)*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+-2*b^1//3*(c+d*x))))
@test integrate((a+b*(c+d*x)^3)^-1, x) == :(-1//6*a^-2//3*b^-1//3*d^-1*log(a^2//3+b^2//3*(c+d*x)^2+-1*a^1//3*b^1//3*(c+d*x))+1//3*a^-2//3*b^-1//3*d^-1*log(a^1//3+b^1//3*(c+d*x))+-1//3*3^(1/2)*a^-2//3*b^-1//3*d^-1*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+-2*b^1//3*(c+d*x))))
@test integrate(x^-2*(a+b*(c+d*x)^3)^-1, x) == :(-1*x^-1*(a+b*c^3)^-1+b*d*c^2*(a+b*c^3)^-2*log(a+b*(c+d*x)^3)+-3*b*d*c^2*(a+b*c^3)^-2*log(x)+-1//6*d*a^-2//3*b^1//3*(a+b*c^3)^-2*(a^1//3*(a+-2*b*c^3)+-1*c*b^1//3*(2a+-1*b*c^3))*log(a^2//3+b^2//3*(c+d*x)^2+-1*a^1//3*b^1//3*(c+d*x))+1//3*d*a^-2//3*b^1//3*(a+b*c^3)^-2*(a^1//3*(a+-2*b*c^3)+-1*c*b^1//3*(2a+-1*b*c^3))*log(a^1//3+b^1//3*(c+d*x))+1//3*d*3^(1/2)*a^-2//3*b^1//3*(a+b*c^3)^-2*(a^1//3+c*b^1//3)^3*(a^1//3+-1*c*b^1//3)*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+-2*b^1//3*(c+d*x))))
@test integrate(x^-3*(a+b*(c+d*x)^3)^-1, x) == :(-1*x^-2*(2a+2*b*c^3)^-1+3*b*d*c^2*x^-1*(a+b*c^3)^-2+b*c*d^2*(a+b*c^3)^-3*(a+-2*b*c^3)*log(a+b*(c+d*x)^3)+-3*b*c*d^2*(a+b*c^3)^-3*(a+-2*b*c^3)*log(x)+-1//3*a^-2//3*b^2//3*d^2*(a+b*c^3)^-3*(a^2+b^2*c^6+-7*a*b*c^3+-3*a^1//3*b^5//3*c^5+6*a^4//3*b^2//3*c^2)*log(a^1//3+b^1//3*(c+d*x))+1//6*a^-2//3*b^2//3*d^2*(a+b*c^3)^-3*(a^2+b^2*c^6+-7*a*b*c^3+-3*a^1//3*b^5//3*c^5+6*a^4//3*b^2//3*c^2)*log(a^2//3+b^2//3*(c+d*x)^2+-1*a^1//3*b^1//3*(c+d*x))+1//3*3^(1/2)*a^-2//3*b^2//3*d^2*(a+b*c^3)^-3*(a^1//3+c*b^1//3)^3*(a+b*c^3+-3*c*a^2//3*b^1//3)*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+-2*b^1//3*(c+d*x))))
@test integrate(x^3*(a+b*(c+d*x)^4)^-1, x) == :(1//4*b^-1*d^-4*log(a+b*(c+d*x)^4)+3//2*a^-1//2*b^-1//2*c^2*d^-4*arctan(a^-1//2*b^(1/2)*(c+d*x)^2)+-1//4*c*2^(1/2)*a^-3//4*b^-3//4*d^-4*(3*a^(1/2)+b^(1/2)*c^2)*arctan(1+2^(1/2)*a^-1//4*b^1//4*(c+d*x))+-1//8*c*2^(1/2)*a^-3//4*b^-3//4*d^-4*(3*a^(1/2)+-1*b^(1/2)*c^2)*log(a^(1/2)+b^(1/2)*(c+d*x)^2+-1*2^(1/2)*a^1//4*b^1//4*(c+d*x))+1//4*c*2^(1/2)*a^-3//4*b^-3//4*d^-4*(3*a^(1/2)+b^(1/2)*c^2)*arctan(1+-1*2^(1/2)*a^-1//4*b^1//4*(c+d*x))+1//8*c*2^(1/2)*a^-3//4*b^-3//4*d^-4*(3*a^(1/2)+-1*b^(1/2)*c^2)*log(a^(1/2)+b^(1/2)*(c+d*x)^2+2^(1/2)*a^1//4*b^1//4*(c+d*x)))
@test integrate(x^2*(a+b*(c+d*x)^4)^-1, x) == :(-1*c*a^-1//2*b^-1//2*d^-3*arctan(a^-1//2*b^(1/2)*(c+d*x)^2)+-1//4*2^(1/2)*a^-3//4*b^-3//4*d^-3*(a^(1/2)+b^(1/2)*c^2)*arctan(1+-1*2^(1/2)*a^-1//4*b^1//4*(c+d*x))+-1//8*2^(1/2)*a^-3//4*b^-3//4*d^-3*(a^(1/2)+-1*b^(1/2)*c^2)*log(a^(1/2)+b^(1/2)*(c+d*x)^2+2^(1/2)*a^1//4*b^1//4*(c+d*x))+1//4*2^(1/2)*a^-3//4*b^-3//4*d^-3*(a^(1/2)+b^(1/2)*c^2)*arctan(1+2^(1/2)*a^-1//4*b^1//4*(c+d*x))+1//8*2^(1/2)*a^-3//4*b^-3//4*d^-3*(a^(1/2)+-1*b^(1/2)*c^2)*log(a^(1/2)+b^(1/2)*(c+d*x)^2+-1*2^(1/2)*a^1//4*b^1//4*(c+d*x)))
@test integrate(x*(a+b*(c+d*x)^4)^-1, x) == :((1/2)*a^-1//2*b^-1//2*d^-2*arctan(a^-1//2*b^(1/2)*(c+d*x)^2)+-1//4*c*2^(1/2)*a^-3//4*b^-1//4*d^-2*arctan(1+2^(1/2)*a^-1//4*b^1//4*(c+d*x))+-1//8*c*2^(1/2)*a^-3//4*b^-1//4*d^-2*log(a^(1/2)+b^(1/2)*(c+d*x)^2+2^(1/2)*a^1//4*b^1//4*(c+d*x))+1//4*c*2^(1/2)*a^-3//4*b^-1//4*d^-2*arctan(1+-1*2^(1/2)*a^-1//4*b^1//4*(c+d*x))+1//8*c*2^(1/2)*a^-3//4*b^-1//4*d^-2*log(a^(1/2)+b^(1/2)*(c+d*x)^2+-1*2^(1/2)*a^1//4*b^1//4*(c+d*x)))
@test integrate((a+b*(c+d*x)^4)^-1, x) == :(-1//4*2^(1/2)*a^-3//4*b^-1//4*d^-1*arctan(1+-1*2^(1/2)*a^-1//4*b^1//4*(c+d*x))+-1//8*2^(1/2)*a^-3//4*b^-1//4*d^-1*log(a^(1/2)+b^(1/2)*(c+d*x)^2+-1*2^(1/2)*a^1//4*b^1//4*(c+d*x))+1//4*2^(1/2)*a^-3//4*b^-1//4*d^-1*arctan(1+2^(1/2)*a^-1//4*b^1//4*(c+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*2^(1/2)*a^-3//4*b^1//4*(a+b*c^4)^-2*(a^(1/2)*(a+-3*b*c^4)+-1*b^(1/2)*c^2*(3a+-1*b*c^4))*log(a^(1/2)+b^(1/2)*(c+d*x)^2+-1*2^(1/2)*a^1//4*b^1//4*(c+d*x))+1//4*d*2^(1/2)*a^-3//4*b^1//4*(a+b*c^4)^-2*(a^(1/2)*(a+-3*b*c^4)+b^(1/2)*c^2*(3a+-1*b*c^4))*arctan(1+-1*2^(1/2)*a^-1//4*b^1//4*(c+d*x))+1//8*d*2^(1/2)*a^-3//4*b^1//4*(a+b*c^4)^-2*(a^(1/2)*(a+-3*b*c^4)+-1*b^(1/2)*c^2*(3a+-1*b*c^4))*log(a^(1/2)+b^(1/2)*(c+d*x)^2+2^(1/2)*a^1//4*b^1//4*(c+d*x)))
@test integrate((a+-1*x^4+-8*x^2+4*x^3+8x)^4, x) == :(1//17*(-1+x)^17+8//15*(-1+x)^15+x*(3+a)^4+(-1+x)^13*(12//13+-4//13*a)+-1*(-1+x)^9*(74//9+-2//3*a^2+4//3*a)+-1*(-1+x)^11*(40//11+24//11*a)+-8//3*(-1+x)^3*(3+a)^3+(-1+x)^5*(3+a)^2*(12//5+-4//5*a)+(-1+x)^7*(5+3a)*(24//7+8//7*a))
@test integrate((a+-1*x^4+-8*x^2+4*x^3+8x)^3, x) == :(x^12+28*x^10+-72//11*x^11+-1//13*x^13+x*a^3+x^4*(128+-96a+3*a^2)+x^6*(384+-40a)+x^8*(192+-3a)+-1*x^5*(1536//5+-384//5*a+3//5*a^2)+-1*x^7*(320+-96//7*a)+-1*x^9*(256//3+-1//3*a)+12*a^2*x^2+a*x^3*(64+-8a))
@test integrate((a+-1*x^4+-8*x^2+4*x^3+8x)^2, x) == :(-1*x^8+-40//3*x^6+1//9*x^9+32//7*x^7+x*a^2+x^3*(64//3+-16//3*a)+x^5*(128//5+-2//5*a)+-1*x^4*(32+-2a)+8*a*x^2)
@test integrate(a+-1*x^4+-8*x^2+4*x^3+8x, x) == :(x^4+4*x^2+-8//3*x^3+-1//5*x^5+a*x)
@test integrate((a+-1*x^4+-8*x^2+4*x^3+8x)^-1, x) == :((1/2)*(1+(4+a)^(1/2))^-1//2*(4+a)^-1//2*arctan((1+(4+a)^(1/2))^-1//2*(-1+x))+-1//2*(1+-1*(4+a)^(1/2))^-1//2*(4+a)^-1//2*arctan((1+-1*(4+a)^(1/2))^-1//2*(-1+x)))
@test integrate((a+-1*x^4+-8*x^2+4*x^3+8x)^-2, x) == :((48+4*a^2+28a)^-1*(3+a+-1*(-1+x)^4+-2*(-1+x)^2)^-1*(-1+x)*(5+a+(-1+x)^2)+(1+(4+a)^(1/2))^-1//2*(4+a)^-3//2*(24+8a)^-1*(10+-1*(4+a)^(1/2)+3a)*arctan((1+(4+a)^(1/2))^-1//2*(-1+x))+-1*(1+-1*(4+a)^(1/2))^-1//2*(4+a)^-3//2*(24+8a)^-1*(10+(4+a)^(1/2)+3a)*arctan((1+-1*(4+a)^(1/2))^-1//2*(-1+x)))
@test integrate(x*(a+-1*x^4+-8*x^2+4*x^3+8x)^4, x) == :(8*x^16+-224//5*x^15+-16//17*x^17+1//18*x^18+x^6*(2048//3+-1024a+128*a^2+-2//3*a^3)+x^10*(4096+-1536//5*a+3//5*a^2)+x^12*(4192//3+-24a)+x^14*(1280//7+-2//7*a)+(1/2)*a^4*x^2+-1*x^7*(16384//7+-9216//7*a+480//7*a^2)+-1*x^9*(14336//3+-2048//3*a+16//3*a^2)+-1*x^11*(29696//11+-1120//11*a)+-1*x^13*(7424//13+-48//13*a)+32//3*a^3*x^3+a^2*x^4*(96+-8a)+x^8*(4+-1a)*(1024+-24a)+16//5*a*x^5*(128+a^2+-48a))
@test integrate(x*(a+-1*x^4+-8*x^2+4*x^3+8x)^3, x) == :(-6*x^12+-1//14*x^14+12//13*x^13+280//11*x^11+x^5*(512//5+-384//5*a+12//5*a^2)+x^7*(2304//7+-240//7*a)+x^9*(512//3+-8//3*a)+(1/2)*a^3*x^2+-1*x^6*(256+(1/2)*a^2+-64a)+-1*x^8*(280+-12a)+-1*x^10*(384//5+-3//10*a)+8*a^2*x^3+a*x^4*(48+-6a))
@test integrate(x*(a+-1*x^4+-8*x^2+4*x^3+8x)^2, x) == :(4*x^8+-80//7*x^7+-8//9*x^9+1//10*x^10+x^4*(16+-4a)+x^6*(64//3+-1//3*a)+(1/2)*a^2*x^2+-1*x^5*(128//5+-8//5*a)+16//3*a*x^3)
@test integrate(x*(a+-1*x^4+-8*x^2+4*x^3+8x), x) == :(-2*x^4+-1//6*x^6+4//5*x^5+8//3*x^3+(1/2)*a*x^2)
@test integrate(x*(a+-1*x^4+-8*x^2+4*x^3+8x)^-1, x) == :((1/2)*(4+a)^-1//2*arctanh((4+a)^-1//2*(1+(-1+x)^2))+(1/2)*(1+(4+a)^(1/2))^-1//2*(4+a)^-1//2*arctan((1+(4+a)^(1/2))^-1//2*(-1+x))+-1//2*(1+-1*(4+a)^(1/2))^-1//2*(4+a)^-1//2*arctan((1+-1*(4+a)^(1/2))^-1//2*(-1+x)))
@test integrate(x*(a+-1*x^4+-8*x^2+4*x^3+8x)^-2, x) == :(1//4*(4+a)^-3//2*arctanh((4+a)^-1//2*(1+(-1+x)^2))+(16+4a)^-1*(3+a+-1*(-1+x)^4+-2*(-1+x)^2)^-1*(1+(-1+x)^2)+(48+4*a^2+28a)^-1*(3+a+-1*(-1+x)^4+-2*(-1+x)^2)^-1*(-1+x)*(5+a+(-1+x)^2)+(1+(4+a)^(1/2))^-1//2*(4+a)^-3//2*(24+8a)^-1*(10+-1*(4+a)^(1/2)+3a)*arctan((1+(4+a)^(1/2))^-1//2*(-1+x))+-1*(1+-1*(4+a)^(1/2))^-1//2*(4+a)^-3//2*(24+8a)^-1*(10+(4+a)^(1/2)+3a)*arctan((1+-1*(4+a)^(1/2))^-1//2*(-1+x)))
@test integrate(x^2*(a+-1*x^4+-8*x^2+4*x^3+8x)^4, x) == :(-42*x^16+-8//9*x^18+1//19*x^19+128//17*x^17+x^7*(4096//7+-6144//7*a+-4//7*a^3+768//7*a^2)+x^11*(40960//11+-3072//11*a+6//11*a^2)+x^13*(16768//13+-288//13*a)+x^15*(512//3+-4//15*a)+-1*x^8*(2048+-1152a+60*a^2)+-1*x^10*(21504//5+-3072//5*a+24//5*a^2)+-1*x^12*(7424//3+-280//3*a)+-1*x^14*(3712//7+-24//7*a)+8*a^3*x^4+1//3*a^4*x^3+a^2*x^5*(384//5+-32//5*a)+x^9*(4+-1a)*(8192//9+-64//3*a)+8//3*a*x^6*(128+a^2+-48a))
@test integrate(x^2*(a+-1*x^4+-8*x^2+4*x^3+8x)^3, x) == :(-72//13*x^13+-1//15*x^15+6//7*x^14+70//3*x^12+x^6*(256//3+-64a+2*a^2)+x^8*(288+-30a)+x^10*(768//5+-12//5*a)+-1*x^7*(1536//7+-384//7*a+3//7*a^2)+-1*x^9*(2240//9+-32//3*a)+-1*x^11*(768//11+-3//11*a)+6*a^2*x^4+1//3*a^3*x^3+a*x^5*(192//5+-24//5*a))
@test integrate(x^2*(a+-1*x^4+-8*x^2+4*x^3+8x)^2, x) == :(-10*x^8+-4//5*x^10+1//11*x^11+32//9*x^9+x^5*(64//5+-16//5*a)+x^7*(128//7+-2//7*a)+-1*x^6*(64//3+-4//3*a)+4*a*x^4+1//3*a^2*x^3)
@test integrate(x^2*(a+-1*x^4+-8*x^2+4*x^3+8x), x) == :(2*x^4+-8//5*x^5+-1//7*x^7+2//3*x^6+1//3*a*x^3)
@test integrate(x^2*(a+-1*x^4+-8*x^2+4*x^3+8x)^-1, x) == :((4+a)^-1//2*arctanh((4+a)^-1//2*(1+(-1+x)^2))+-1//2*(1+(4+a)^(1/2))^-1//2*arctan((1+(4+a)^(1/2))^-1//2*(-1+x))+-1//2*(1+-1*(4+a)^(1/2))^-1//2*arctan((1+-1*(4+a)^(1/2))^-1//2*(-1+x)))
@test integrate(x^2*(a+-1*x^4+-8*x^2+4*x^3+8x)^-2, x) == :((1/2)*(4+a)^-3//2*arctanh((4+a)^-1//2*(1+(-1+x)^2))+(8+2a)^-1*(3+a+-1*(-1+x)^4+-2*(-1+x)^2)^-1*(1+(-1+x)^2)+(48+4*a^2+28a)^-1*(3+a+-1*(-1+x)^4+-2*(-1+x)^2)^-1*(-1+x)*(2+(-1+x)^2)*(4+a)+-1*(1+(4+a)^(1/2))^-1//2*(4+a)^-1*(24+8a)^-1*(4+a+-1*(4+a)^(1/2))*arctan((1+(4+a)^(1/2))^-1//2*(-1+x))+-1*(1+-1*(4+a)^(1/2))^-1//2*(4+a)^-1*(24+8a)^-1*(4+a+(4+a)^(1/2))*arctan((1+-1*(4+a)^(1/2))^-1//2*(-1+x)))
@test integrate(x^4*(27*a^3+b^3*x^6+9*a*b^2*x^4+27*b*a^2*x^2+27*c*a^2*x^3)^-1, x) == :(-1//18*a^-2//3*b^-2*c^-1//3*log(3a+b*x^2+3*x*a^2//3*c^1//3)+1//6*a^-2//3*b^-2*c^-1//3*(1+(-1)^1//3)^-2*log(3a+b*x^2+-3*x*(-1)^1//3*a^2//3*c^1//3)+1//18*(-1)^1//3*a^-2//3*b^-2*c^-1//3*log(3a+b*x^2+3*x*(-1)^2//3*a^2//3*c^1//3)+-1//27*3^(1/2)*a^-5//6*b^-2*c^-2//3*(4b+-3*a^1//3*c^2//3)^-1//2*(2b+-3*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*a^1//3*c^2//3)^-1//2*(2*b*x+3*a^2//3*c^1//3))+-1//9*(-1)^1//3*3^(1/2)*a^-5//6*b^-2*c^-2//3*(1+(-1)^1//3)^-2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(2*b*(-1)^1//3+3*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(-2*b*x+3*(-1)^1//3*a^2//3*c^1//3))+-1//9*(-1)^2//3*3^(1/2)*a^-5//6*b^-2*c^-2//3*(1+(-1)^1//3)^-2*(1+-1*(-1)^1//3)^-1*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(2b+3*(-1)^1//3*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(2*b*x+3*(-1)^2//3*a^2//3*c^1//3)))
@test integrate(x^3*(27*a^3+b^3*x^6+9*a*b^2*x^4+27*b*a^2*x^2+27*c*a^2*x^3)^-1, x) == :(1//54*a^-4//3*b^-1*c^-2//3*log(3a+b*x^2+3*x*a^2//3*c^1//3)+1//54*(-1)^2//3*a^-4//3*b^-1*c^-2//3*log(3a+b*x^2+3*x*(-1)^2//3*a^2//3*c^1//3)+-1//18*(-1)^2//3*a^-4//3*b^-1*c^-2//3*(1+(-1)^1//3)^-2*log(3a+b*x^2+-3*x*(-1)^1//3*a^2//3*c^1//3)+-1//27*3^(1/2)*a^-7//6*b^-1*c^-1//3*(4b+-3*a^1//3*c^2//3)^-1//2*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*a^1//3*c^2//3)^-1//2*(2*b*x+3*a^2//3*c^1//3))+-1//9*3^(1/2)*a^-7//6*b^-1*c^-1//3*(1+(-1)^1//3)^-2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(-2*b*x+3*(-1)^1//3*a^2//3*c^1//3))+1//9*(-1)^1//3*3^(1/2)*a^-7//6*b^-1*c^-1//3*(1+(-1)^1//3)^-2*(1+-1*(-1)^1//3)^-1*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*arctan(1//3*3^(1/2)*a^-1//2*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(2*b*x+3*(-1)^2//3*a^2//3*c^1//3)))
@test integrate(x^2*(27*a^3+b^3*x^6+9*a*b^2*x^4+27*b*a^2*x^2+27*c*a^2*x^3)^-1, x) == :(2//81*3^(1/2)*a^-11//6*c^-2//3*(4b+-3*a^1//3*c^2//3)^-1//2*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*a^1//3*c^2//3)^-1//2*(2*b*x+3*a^2//3*c^1//3))+2//27*(-1)^2//3*3^(1/2)*a^-11//6*c^-2//3*(1+(-1)^1//3)^-2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(-2*b*x+3*(-1)^1//3*a^2//3*c^1//3))+2//27*(-1)^2//3*3^(1/2)*a^-11//6*c^-2//3*(1+(-1)^1//3)^-2*(1+-1*(-1)^1//3)^-1*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*arctan(1//3*3^(1/2)*a^-1//2*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(2*b*x+3*(-1)^2//3*a^2//3*c^1//3)))
@test integrate(x*(27*a^3+b^3*x^6+9*a*b^2*x^4+27*b*a^2*x^2+27*c*a^2*x^3)^-1, x) == :(-1//162*a^-7//3*c^-2//3*log(3a+b*x^2+3*x*a^2//3*c^1//3)+-1//162*(-1)^2//3*a^-7//3*c^-2//3*log(3a+b*x^2+3*x*(-1)^2//3*a^2//3*c^1//3)+-1//81*3^(1/2)*a^-13//6*c^-1//3*(4b+-3*a^1//3*c^2//3)^-1//2*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*a^1//3*c^2//3)^-1//2*(2*b*x+3*a^2//3*c^1//3))+1//54*(-1)^2//3*a^-7//3*c^-2//3*(1+(-1)^1//3)^-2*log(3a+b*x^2+-3*x*(-1)^1//3*a^2//3*c^1//3)+-1//27*3^(1/2)*a^-13//6*c^-1//3*(1+(-1)^1//3)^-2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(-2*b*x+3*(-1)^1//3*a^2//3*c^1//3))+1//27*(-1)^1//3*3^(1/2)*a^-13//6*c^-1//3*(1+(-1)^1//3)^-2*(1+-1*(-1)^1//3)^-1*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*arctan(1//3*3^(1/2)*a^-1//2*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(2*b*x+3*(-1)^2//3*a^2//3*c^1//3)))
@test integrate((27*a^3+b^3*x^6+9*a*b^2*x^4+27*b*a^2*x^2+27*c*a^2*x^3)^-1, x) == :(1//162*a^-8//3*c^-1//3*log(3a+b*x^2+3*x*a^2//3*c^1//3)+-1//54*a^-8//3*c^-1//3*(1+(-1)^1//3)^-2*log(3a+b*x^2+-3*x*(-1)^1//3*a^2//3*c^1//3)+-1//162*(-1)^1//3*a^-8//3*c^-1//3*log(3a+b*x^2+3*x*(-1)^2//3*a^2//3*c^1//3)+-1//243*3^(1/2)*a^-17//6*c^-2//3*(4b+-3*a^1//3*c^2//3)^-1//2*(2b+-3*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*a^1//3*c^2//3)^-1//2*(2*b*x+3*a^2//3*c^1//3))+-1//81*(-1)^1//3*3^(1/2)*a^-17//6*c^-2//3*(1+(-1)^1//3)^-2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(2*b*(-1)^1//3+3*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(-2*b*x+3*(-1)^1//3*a^2//3*c^1//3))+-1//81*3^(1/2)*a^-17//6*c^-2//3*(1+(-1)^1//3)^-2*(1+-1*(-1)^1//3)^-1*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(-3*a^1//3*c^2//3+2*b*(-1)^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(2*b*x+3*(-1)^2//3*a^2//3*c^1//3)))
@test integrate(x^-1*(27*a^3+b^3*x^6+9*a*b^2*x^4+27*b*a^2*x^2+27*c*a^2*x^3)^-1, x) == :(1//27*a^-3*log(x)+-1//486*a^-10//3*(3*a^1//3+-1*b*c^-2//3)*log(3a+b*x^2+3*x*a^2//3*c^1//3)+-1//486*a^-10//3*(3*a^1//3+-1*b*(-1)^2//3*c^-2//3)*log(3a+b*x^2+3*x*(-1)^2//3*a^2//3*c^1//3)+-1//972*a^-10//3*c^-2//3*(b+6*a^1//3*c^2//3+im*b*3^(1/2))*log(3a+b*x^2+-3*x*(-1)^1//3*a^2//3*c^1//3)+1//81*3^(1/2)*a^-19//6*c^-1//3*(4b+-3*a^1//3*c^2//3)^-1//2*(b+-1*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*a^1//3*c^2//3)^-1//2*(2*b*x+3*a^2//3*c^1//3))+1//27*3^(1/2)*a^-19//6*c^-1//3*(1+(-1)^1//3)^-2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(b+-1*(-1)^2//3*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(-2*b*x+3*(-1)^1//3*a^2//3*c^1//3))+1//27*(-1)^2//3*3^(1/2)*a^-19//6*c^-1//3*(1+(-1)^1//3)^-2*(1+-1*(-1)^1//3)^-1*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(b*(-1)^2//3+-1*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(2*b*x+3*(-1)^2//3*a^2//3*c^1//3)))
@test integrate(x^-2*(27*a^3+b^3*x^6+9*a*b^2*x^4+27*b*a^2*x^2+27*c*a^2*x^3)^-1, x) == :(-1//27*a^-3*x^-1+-1//486*a^-11//3*c^-1//3*(2b+-3*a^1//3*c^2//3)*log(3a+b*x^2+3*x*a^2//3*c^1//3)+1//162*a^-11//3*c^-1//3*(1+(-1)^1//3)^-2*(2b+-3*(-1)^2//3*a^1//3*c^2//3)*log(3a+b*x^2+-3*x*(-1)^1//3*a^2//3*c^1//3)+1//486*(-1)^1//3*a^-11//3*c^-1//3*(2b+3*(-1)^1//3*a^1//3*c^2//3)*log(3a+b*x^2+3*x*(-1)^2//3*a^2//3*c^1//3)+1//729*3^(1/2)*a^-23//6*c^-2//3*(4b+-3*a^1//3*c^2//3)^-1//2*(2*b^2+9*a^2//3*c^4//3+-12*b*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*a^1//3*c^2//3)^-1//2*(2*b*x+3*a^2//3*c^1//3))+1//243*3^(1/2)*a^-23//6*c^-2//3*(1+(-1)^1//3)^-2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(2*(-1)^2//3*b^2+9*a^2//3*c^4//3+12*b*(-1)^1//3*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+-3*(-1)^2//3*a^1//3*c^2//3)^-1//2*(-2*b*x+3*(-1)^1//3*a^2//3*c^1//3))+1//243*(-1)^2//3*3^(1/2)*a^-23//6*c^-2//3*(1+(-1)^1//3)^-2*(1+-1*(-1)^1//3)^-1*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(2*b^2+9*(-1)^2//3*a^2//3*c^4//3+12*b*(-1)^1//3*a^1//3*c^2//3)*arctan(1//3*3^(1/2)*a^-1//2*(4b+3*(-1)^1//3*a^1//3*c^2//3)^-1//2*(2*b*x+3*(-1)^2//3*a^2//3*c^1//3)))
@test integrate(x^5*(216+x^6+18*x^4+108*x^2+324*x^3)^-1, x) == :((1//6+-1//108*(-2)^2//3*3^1//3)*log(6+x^2+3*x*(-2)^2//3*3^1//3)+(1//6+-1//108*2^2//3*3^1//3)*log(6+x^2+3*x*2^2//3*3^1//3)+(1//6+1//216*2^2//3*3^1//3*(1+im*3^(1/2)))*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+-1//3*(-2)^1//3*3^1//6*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1//2*(1+(-2)^1//3*3^2//3)*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+-1//6*2^5//6*3^1//6*(-4+3*2^1//3*3^2//3)^-1//2*(1+-1*2^1//3*3^2//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+(1/2)*2^5//6*3^1//6*(1+(-1)^1//3)^-2*(4+-3*(-3)^2//3*2^1//3)^-1//2*(1+-1*(-3)^2//3*2^1//3)*arctan(2^1//6*(12+-9*(-3)^2//3*2^1//3)^-1//2*(3*(-3)^1//3+-1*x*2^1//3)))
@test integrate(x^4*(216+x^6+18*x^4+108*x^2+324*x^3)^-1, x) == :(-1//27*(-24+18*2^1//3*3^2//3)^-1//2*(9+-1*2^2//3*3^1//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+-1//108*2^1//3*3^2//3*log(6+x^2+3*x*2^2//3*3^1//3)+1//27*(24+9*2^1//3*3^2//3+27*im*2^1//3*3^1//6)^-1//2*(9+-1*(-2)^2//3*3^1//3)*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//108*(-2)^1//3*3^2//3*log(6+x^2+3*x*(-2)^2//3*3^1//3)+1//36*2^1//3*3^2//3*(1+(-1)^1//3)^-2*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+1//27*(-1)^2//3*3^5//6*(1+(-1)^1//3)^-2*(8+-6*(-3)^2//3*2^1//3)^-1//2*(-1*2^2//3+3*(-3)^2//3)*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3)))
@test integrate(x^3*(216+x^6+18*x^4+108*x^2+324*x^3)^-1, x) == :(1//648*(-2)^2//3*3^1//3*log(6+x^2+3*x*(-2)^2//3*3^1//3)+1//648*2^2//3*3^1//3*log(6+x^2+3*x*2^2//3*3^1//3)+-1//216*(-2)^2//3*3^1//3*(1+(-1)^1//3)^-2*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+1//54*(-2)^1//3*3^1//6*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1//2*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//108*2^5//6*3^1//6*(-4+3*2^1//3*3^2//3)^-1//2*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+-1//36*2^5//6*3^1//6*(1+(-1)^1//3)^-2*(4+-3*(-3)^2//3*2^1//3)^-1//2*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3)))
@test integrate(x^2*(216+x^6+18*x^4+108*x^2+324*x^3)^-1, x) == :(-1//486*2^1//6*3^5//6*(-4+3*2^1//3*3^2//3)^-1//2*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+1//486*(-2)^2//3*3^5//6*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1//2*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//162*(-1)^2//3*2^1//6*3^5//6*(1+(-1)^1//3)^-2*(4+-3*(-3)^2//3*2^1//3)^-1//2*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3)))
@test integrate(x*(216+x^6+18*x^4+108*x^2+324*x^3)^-1, x) == :(-1//3888*(-2)^2//3*3^1//3*log(6+x^2+3*x*(-2)^2//3*3^1//3)+-1//3888*2^2//3*3^1//3*log(6+x^2+3*x*2^2//3*3^1//3)+1//324*(-2)^1//3*3^1//6*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1//2*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//648*2^5//6*3^1//6*(-4+3*2^1//3*3^2//3)^-1//2*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+1//1296*(-2)^2//3*3^1//3*(1+(-1)^1//3)^-2*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+-1//216*2^5//6*3^1//6*(1+(-1)^1//3)^-2*(4+-3*(-3)^2//3*2^1//3)^-1//2*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3)))
@test integrate((216+x^6+18*x^4+108*x^2+324*x^3)^-1, x) == :(-1//972*(-24+18*2^1//3*3^2//3)^-1//2*(9+-1*2^2//3*3^1//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+-1//3888*(-2)^1//3*3^2//3*log(6+x^2+3*x*(-2)^2//3*3^1//3)+1//972*(24+9*2^1//3*3^2//3+27*im*2^1//3*3^1//6)^-1//2*(9+-1*(-2)^2//3*3^1//3)*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//3888*2^1//3*3^2//3*log(6+x^2+3*x*2^2//3*3^1//3)+-1//1296*2^1//3*3^2//3*(1+(-1)^1//3)^-2*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+1//972*(-1)^2//3*3^5//6*(1+(-1)^1//3)^-2*(8+-6*(-3)^2//3*2^1//3)^-1//2*(-1*2^2//3+3*(-3)^2//3)*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3)))
@test integrate(x^-1*(216+x^6+18*x^4+108*x^2+324*x^3)^-1, x) == :(1//216*log(x)+-1//23328*(18+-1*(-2)^2//3*3^1//3)*log(6+x^2+3*x*(-2)^2//3*3^1//3)+-1//23328*(18+-1*2^2//3*3^1//3)*log(6+x^2+3*x*2^2//3*3^1//3)+-1//46656*(36+2^2//3*3^1//3*(1+im*3^(1/2)))*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+-1//1296*2^5//6*3^1//6*(-4+3*2^1//3*3^2//3)^-1//2*(1+-1*2^1//3*3^2//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+1//1296*(-2)^2//3*3^1//6*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1//2*((-2)^2//3+-2*3^2//3)*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+-1//1296*(-1)^2//3*6^5//6*(1+(-1)^1//3)^-2*(4+-3*(-3)^2//3*2^1//3)^-1//2*((-3)^1//3+3*2^1//3)*arctan(2^1//6*(12+-9*(-3)^2//3*2^1//3)^-1//2*(3*(-3)^1//3+-1*x*2^1//3)))
@test integrate(x^-2*(216+x^6+18*x^4+108*x^2+324*x^3)^-1, x) == :(-1//216*x^-1+-1//23328*6^2//3*(2^2//3+-3*3^2//3)*log(6+x^2+3*x*2^2//3*3^1//3)+1//23328*3^2//3*(2*(-2)^1//3+3*(-6)^2//3)*log(6+x^2+3*x*(-2)^2//3*3^1//3)+-1//17496*3^5//6*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1//2*(-1*(-2)^2//3+12*3^2//3+27*(-6)^1//3)*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+-1//34992*6^5//6*(-4+3*2^1//3*3^2//3)^-1//2*(2^1//3+-6*6^2//3+27*3^1//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+-1//7776*(-2)^2//3*3^1//3*(1+(-1)^1//3)^-2*(9+(-3)^1//3*2^2//3)*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+-1//11664*(-1)^2//3*6^5//6*(1+(-1)^1//3)^-2*(4+-3*(-3)^2//3*2^1//3)^-1//2*(-1*2^1//3+6*(-6)^2//3+27*(-3)^1//3)*arctan(2^1//6*(12+-9*(-3)^2//3*2^1//3)^-1//2*(3*(-3)^1//3+-1*x*2^1//3)))
@test integrate(x^8*(216+x^6+18*x^4+108*x^2+324*x^3)^-2, x) == :(-1//52488*2^2//3*3^1//3*log(6+x^2+3*x*2^2//3*3^1//3)+-1//5832*2^2//3*3^1//3*(1+(-1)^1//3)^-4*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+-1//4374*(-2)^1//3*3^2//3*(6+x^2+3*x*(-2)^2//3*3^1//3)^-1*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1*(54+x*(2+12*(-2)^1//3*3^2//3+27*(-2)^2//3*3^1//3)+-9*(-2)^2//3*3^1//3)+-1//8748*2^5//6*3^1//6*(-4+3*2^1//3*3^2//3)^-1//2*(1+3*2^1//3*3^2//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+1//5832*im*2^2//3*3^5//6*(1+(-1)^1//3)^-5*log(6+x^2+3*x*(-2)^2//3*3^1//3)+1//8748*2^1//3*3^2//3*(4+-3*2^1//3*3^2//3)^-1*(6+x^2+3*x*2^2//3*3^1//3)^-1*(54+x*(2+2^2//3*(-6*6^2//3+27*3^1//3))+-9*2^2//3*3^1//3)+-1//972*(-2)^1//3*3^2//3*(1+(-1)^1//3)^-4*(4+-3*(-3)^2//3*2^1//3)^-1*(6+x^2+-3*x*(-3)^1//3*2^2//3)^-1*(54+x*(2+-1*2^2//3*(6*(-6)^2//3+27*(-3)^1//3))+9*(-3)^1//3*2^2//3)+1//972*2^1//6*3^2//3*(1+(-1)^1//3)^-5*(4+-3*(-3)^2//3*2^1//3)^-1//2*(-9*3^1//6+im*2^2//3+-3*im*3^2//3)*arctan(2^1//6*(12+-9*(-3)^2//3*2^1//3)^-1//2*(3*(-3)^1//3+-1*x*2^1//3))+-1//486*(-1)^1//3*2^(1/2)*3^1//6*(1+(-1)^1//3)^-4*(4+-3*(-3)^2//3*2^1//3)^-3//2*(-1*2^1//3+6*(-6)^2//3+27*(-3)^1//3)*arctan(2^1//6*(12+-9*(-3)^2//3*2^1//3)^-1//2*(3*(-3)^1//3+-1*x*2^1//3))+-1//972*im*2^1//6*3^2//3*(1+(-1)^1//3)^-5*(4+3*(-2)^1//3*3^2//3)^-1//2*((-2)^2//3+6*3^2//3)*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//486*2^(1/2)*3^1//6*(1+(-1)^1//3)^-4*(1+-1*(-1)^1//3)^-2*(-4+3*2^1//3*3^2//3)^-3//2*(2^1//3+-6*6^2//3+27*3^1//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+-1//972*(-1)^1//3*2^5//6*3^1//6*(1+(-1)^1//3)^-4*(1+-1*(-1)^1//3)^-2*(4+3*(-2)^1//3*3^2//3)^-3//2*(2+12*(-2)^1//3*3^2//3+27*(-2)^2//3*3^1//3)*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3)))
@test integrate(x^7*(216+x^6+18*x^4+108*x^2+324*x^3)^-2, x) == :(-1*(6+x^2+3*x*(-2)^2//3*3^1//3)^-1*(34992+13122*2^1//3*3^2//3+39366*im*2^1//3*3^1//6)^-1*((-6)^1//3*(2*3^1//3+9*(-2)^1//3)+-1*x*(9+9*(-2)^1//3*3^2//3))+-1//104976*2^1//3*3^2//3*log(6+x^2+3*x*2^2//3*3^1//3)+1//5832*(1+(-1)^1//3)^-5*(8+-6*(-3)^2//3*2^1//3)^-1//2*(9im+3^1//3*(-9*3^1//6+2*im*2^2//3+2*2^2//3*3^(1/2)))*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3))+1//78732*3^5//6*(-8+6*2^1//3*3^2//3)^-1//2*(2*2^2//3+3*3^2//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+-1//1944*2^1//3*(1+(-1)^1//3)^-4*(4+-3*(-3)^2//3*2^1//3)^-1*(6+x^2+-3*x*(-3)^1//3*2^2//3)^-1*(18*6^1//3+-1*x*(9*(-2)^2//3+18*(-1)^1//3*3^2//3)+4*(-1)^1//3*3^2//3)+-1//7776*2^1//3*3^1//6*(1+(-1)^1//3)^-5*(im+3^(1/2))*log(6+x^2+3*x*(-2)^2//3*3^1//3)+1//3888*im*2^1//3*3^1//6*(1+(-1)^1//3)^-5*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+1//5832*3^1//3*(1+(-1)^1//3)^-5*(8+6*(-2)^1//3*3^2//3)^-1//2*(9*3^1//6+im*(-3*3^2//3+4*2^2//3))*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//17496*2^1//3*3^2//3*(4+-3*2^1//3*3^2//3)^-1*(6+x^2+3*x*2^2//3*3^1//3)^-1*(4+-1*x*(18+-3*2^2//3*3^1//3)+-6*2^1//3*3^2//3)+1//324*6^(1/2)*(1+(-1)^1//3)^-4*(1+-1*(-1)^1//3)^-2*(-4+3*2^1//3*3^2//3)^-3//2*(1+-1*2^1//3*3^2//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+1//324*6^(1/2)*(1+(-1)^1//3)^-4*(1+-1*(-1)^1//3)^-2*(4+3*(-2)^1//3*3^2//3)^-3//2*(1+(-2)^1//3*3^2//3)*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+-1//324*(-1)^1//3*2^(1/2)*3^1//6*(1+(-1)^1//3)^-4*(4+-3*(-3)^2//3*2^1//3)^-3//2*((-3)^1//3+3*2^1//3)*arctan(2^1//6*(12+-9*(-3)^2//3*2^1//3)^-1//2*(3*(-3)^1//3+-1*x*2^1//3)))
@test integrate(x^6*(216+x^6+18*x^4+108*x^2+324*x^3)^-2, x) == :(1//314928*2^2//3*3^1//3*log(6+x^2+3*x*2^2//3*3^1//3)+1//26244*2^1//3*(6+x^2+3*x*(-2)^2//3*3^1//3)^-1*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1*(9*2^2//3+x*(-1)^1//3*3^2//3*(2+3*(-2)^1//3*3^2//3))+-1//34992*im*2^2//3*3^5//6*(1+(-1)^1//3)^-5*log(6+x^2+3*x*(-2)^2//3*3^1//3)+1//5832*2^1//3*(1+(-1)^1//3)^-4*(4+-3*(-3)^2//3*2^1//3)^-1*(6+x^2+-3*x*(-3)^1//3*2^2//3)^-1*(9*(-2)^2//3+x*6^1//3*(9+(-3)^1//3*2^2//3))+1//34992*(-1)^1//6*2^2//3*3^5//6*(1+(-1)^1//3)^-5*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+1//52488*2^1//3*3^2//3*(4+-3*2^1//3*3^2//3)^-1*(6+x^2+3*x*2^2//3*3^1//3)^-1*(-1*x*(2+-3*2^1//3*3^2//3)+3*2^2//3*3^1//3)+-1//2916*6^1//6*(1+(-1)^1//3)^-4*(1+-1*(-1)^1//3)^-2*(-4+3*2^1//3*3^2//3)^-3//2*(2^2//3+-3*3^2//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+1//2916*(-1)^1//3*6^1//6*(1+(-1)^1//3)^-4*(4+-3*(-3)^2//3*2^1//3)^-3//2*(-1*2^2//3+3*(-3)^2//3)*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3))+1//2916*6^1//6*(1+(-1)^1//3)^-4*(1+-1*(-1)^1//3)^-2*(4+3*(-2)^1//3*3^2//3)^-3//2*(3*(-3)^2//3+(-1)^1//3*2^2//3)*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3)))
@test integrate(x^5*(216+x^6+18*x^4+108*x^2+324*x^3)^-2, x) == :(-1//13122*3^(1/2)*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-3//2*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+-1//52488*6^(1/2)*(-4+3*2^1//3*3^2//3)^-3//2*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+1//13122*3^(1/2)*(8+3*2^1//3*3^2//3+-9*im*2^1//3*3^1//6)^-3//2*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3))+-1//236196*2^1//6*3^5//6*(-4+3*2^1//3*3^2//3)^-1//2*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+-1//26244*2^1//6*3^5//6*(1+(-1)^1//3)^-4*(4+-3*(-3)^2//3*2^1//3)^-1//2*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3))+-1//104976*2^1//3*3^2//3*(4+-3*2^1//3*3^2//3)^-1*(6+x^2+3*x*2^2//3*3^1//3)^-1*(4+x*2^2//3*3^1//3)+1//52488*(-2)^1//3*3^2//3*(6+x^2+3*x*(-2)^2//3*3^1//3)^-1*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1*(4+x*(-2)^2//3*3^1//3)+-1//8748*im*2^1//6*3^1//3*(1+(-1)^1//3)^-5*(4+3*(-2)^1//3*3^2//3)^-1//2*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//11664*(-2)^1//3*3^2//3*(1+(-1)^1//3)^-4*(4+-3*(-3)^2//3*2^1//3)^-1*(6+x^2+-3*x*(-3)^1//3*2^2//3)^-1*(4+-1*x*(-3)^1//3*2^2//3))
@test integrate(x^4*(216+x^6+18*x^4+108*x^2+324*x^3)^-2, x) == :(-1*(-209952*3^1//3+472392*2^1//3)^-1*(6+x^2+3*x*2^2//3*3^1//3)^-1*(3*3^1//3+x*2^1//3)+-1//1889568*2^2//3*3^1//3*log(6+x^2+3*x*2^2//3*3^1//3)+-1//209952*2^2//3*3^1//3*(1+(-1)^1//3)^-4*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+1//157464*2^5//6*3^1//6*(-4+3*2^1//3*3^2//3)^-3//2*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+1//314928*2^5//6*3^1//6*(-4+3*2^1//3*3^2//3)^-1//2*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+-1//157464*(-2)^1//3*3^2//3*(6+x^2+3*x*(-2)^2//3*3^1//3)^-1*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-1*(2x+3*(-2)^2//3*3^1//3)+1//4374*(-2)^1//3*3^1//6*(1+(-1)^1//3)^-4*(8+3*2^1//3*3^2//3+-9*im*2^1//3*3^1//6)^-3//2*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3))+1//209952*im*2^2//3*3^5//6*(1+(-1)^1//3)^-5*log(6+x^2+3*x*(-2)^2//3*3^1//3)+-1//34992*im*2^5//6*3^2//3*(1+(-1)^1//3)^-5*(4+-3*(-3)^2//3*2^1//3)^-1//2*arctan(2^1//6*(12+-9*(-3)^2//3*2^1//3)^-1//2*(3*(-3)^1//3+-1*x*2^1//3))+-1//69984*2^5//6*3^2//3*(1+(-1)^1//3)^-5*(4+3*(-2)^1//3*3^2//3)^-1//2*(im+3^(1/2))*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//34992*(-2)^1//3*3^2//3*(1+(-1)^1//3)^-4*(4+-3*(-3)^2//3*2^1//3)^-1*(6+x^2+-3*x*(-3)^1//3*2^2//3)^-1*(-2x+3*(-3)^1//3*2^2//3)+-1//17496*(-1)^1//3*2^5//6*3^1//6*(1+(-1)^1//3)^-4*(1+-1*(-1)^1//3)^-2*(4+3*(-2)^1//3*3^2//3)^-3//2*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3)))
@test integrate(x^3*(216+x^6+18*x^4+108*x^2+324*x^3)^-2, x) == :((6+x^2+-3*x*(-3)^1//3*2^2//3)^-1*(1259712+472392*2^1//3*3^2//3+-1417176*im*2^1//3*3^1//6)^-1*(-3x+(-6)^1//3*(2*(-3)^1//3+9*2^1//3))+-1*(-419904*3^1//3+944784*2^1//3)^-1*(6+x^2+3*x*2^2//3*3^1//3)^-1*(-3*6^2//3+2*2^1//3+-1*x*3^1//3)+-1*(6+x^2+3*x*(-2)^2//3*3^1//3)^-1*(1259712+472392*2^1//3*3^2//3+1417176*im*2^1//3*3^1//6)^-1*(3x+(-6)^1//3*(2*3^1//3+9*(-2)^1//3))+-1//78732*3^(1/2)*(8+3*2^1//3*3^2//3+9*im*2^1//3*3^1//6)^-3//2*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+-1//314928*6^(1/2)*(-4+3*2^1//3*3^2//3)^-3//2*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+1//78732*3^(1/2)*(8+3*2^1//3*3^2//3+-9*im*2^1//3*3^1//6)^-3//2*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3))+1//3779136*2^1//3*3^2//3*log(6+x^2+3*x*2^2//3*3^1//3)+-1//209952*(1+(-1)^1//3)^-5*(8+-6*(-3)^2//3*2^1//3)^-1//2*(9im+-1*3^1//3*(9*3^1//6+2*im*2^2//3+2*2^2//3*3^(1/2)))*arctan((24+-18*(-3)^2//3*2^1//3)^-1//2*(-2x+3*(-3)^1//3*2^2//3))+1//209952*(1+(-1)^1//3)^-5*(8+6*(-2)^1//3*3^2//3)^-1//2*(9im+3^1//3*(-9*3^1//6+4*im*2^2//3))*arctan((24+18*(-2)^1//3*3^2//3)^-1//2*(2x+3*(-2)^2//3*3^1//3))+1//2834352*3^5//6*(-8+6*2^1//3*3^2//3)^-1//2*(-3*3^2//3+2*2^2//3)*arctanh(2^1//6*(-12+9*2^1//3*3^2//3)^-1//2*(3*3^1//3+x*2^1//3))+-1//139968*im*2^1//3*3^1//6*(1+(-1)^1//3)^-5*log(6+x^2+-3*x*(-3)^1//3*2^2//3)+1//279936*2^1//3*3^1//6*(1+(-1)^1//3)^-5*(im+3^(1/2))*log(6+x^2+3*x*(-2)^2//3*3^1//3))
@test integrate((c+d*x)^-1*(c*a^2+c*b^2*x^4+d*x*a^2+d*b^2*x^5+2*a*b*c*x^2+2*a*b*d*x^3), x) == :(x*a^2+1//5*b^2*x^5+2//3*a*b*x^3)
@test integrate((c+d*x)^-2*(c*a^2+c*b^2*x^4+d*x*a^2+d*b^2*x^5+2*a*b*c*x^2+2*a*b*d*x^3), x) == :(d^-5*(a*d^2+b*c^2)^2*log(c+d*x)+1//4*b^2*d^-1*x^4+(1/2)*b*d^-3*x^2*(b*c^2+2*a*d^2)+-1//3*c*b^2*d^-2*x^3+-1*b*c*x*d^-4*(b*c^2+2*a*d^2))
@test integrate((b*x+c*x^2)^13*(b+2*c*x), x) == :(1//14*(b*x+c*x^2)^14)
@test integrate(x^14*(b*x+c*x^3)^13*(b+2*c*x^2), x) == :(1//28*x^28*(b+c*x^2)^14)
@test integrate(x^28*(b*x+c*x^4)^13*(b+2*c*x^3), x) == :(1//42*x^42*(b+c*x^3)^14)
@test integrate(x^(-14+14n)*(b*x+c*x^(1+n))^13*(b+2*c*x^n), x) == :(1//14*n^-1*x^(14n)*(b+c*x^n)^14)
@test integrate((b*x+c*x^2)^-1*(b+2*c*x), x) == :(log(b*x+c*x^2))
@test integrate((b*x+c*x^3)^-1*(b+2*c*x^2), x) == :((1/2)*log(b+c*x^2)+log(x))
@test integrate((b*x+c*x^4)^-1*(b+2*c*x^3), x) == :(1//3*log(b+c*x^3)+log(x))
@test integrate((b*x+c*x^(1+n))^-1*(b+2*c*x^n), x) == :(n^-1*log(b+c*x^n)+log(x))
@test integrate((b*x+c*x^2)^-8*(b+2*c*x), x) == :(-1//7*(b*x+c*x^2)^-7)
@test integrate(x^-7*(b*x+c*x^3)^-8*(b+2*c*x^2), x) == :(-1//14*x^-14*(b+c*x^2)^-7)
@test integrate(x^-14*(b*x+c*x^4)^-8*(b+2*c*x^3), x) == :(-1//21*x^-21*(b+c*x^3)^-7)
@test integrate(x^(7+-7n)*(b*x+c*x^(1+n))^-8*(b+2*c*x^n), x) == :(-1//7*n^-1*x^(-7n)*(b+c*x^n)^-7)
@test integrate((b*x+c*x^2)^p*(b+2*c*x), x) == :((1+p)^-1*(b*x+c*x^2)^(1+p))
@test integrate(x^(1+p)*(b*x+c*x^3)^p*(b+2*c*x^2), x) == :(x^(1+p)*(2+2p)^-1*(b*x+c*x^3)^(1+p))
@test integrate(b*x^(1+p)*(b*x+c*x^3)^p+2*c*x^(3+p)*(b*x+c*x^3)^p, x) == :(x^(1+p)*(2+2p)^-1*(b*x+c*x^3)^(1+p))
@test integrate(x^(2+2p)*(b*x+c*x^4)^p*(b+2*c*x^3), x) == :(x^(2+2p)*(3+3p)^-1*(b*x+c*x^4)^(1+p))
@test integrate(x^((1+p)*(-1+n))*(b*x+c*x^(1+n))^p*(b+2*c*x^n), x) == :(n^-1*x^(-1*(1+p)*(1+-1n))*(1+p)^-1*(b*x+c*x^(1+n))^(1+p))
@test integrate((a+b*x^2)^-1*(c*a^2+c*b^2*x^4+d*x*a^2+d*b^2*x^5+2*a*b*c*x^2+2*a*b*d*x^3), x) == :(a*c*x+(1/2)*a*d*x^2+1//3*b*c*x^3+1//4*b*d*x^4)
@test integrate((a+b*x^2)^-2*(c*a^2+c*b^2*x^4+d*x*a^2+d*b^2*x^5+2*a*b*c*x^2+2*a*b*d*x^3), x) == :(c*x+(1/2)*d*x^2)
@test integrate((a+b*x^2)^-3*(c*a^2+c*b^2*x^4+d*x*a^2+d*b^2*x^5+2*a*b*c*x^2+2*a*b*d*x^3), x) == :((1/2)*d*b^-1*log(a+b*x^2)+c*a^-1//2*b^-1//2*arctan(x*a^-1//2*b^(1/2)))
@test integrate((a+b*x+c*x^2+d*x^3)^n*(b+2*c*x+3*d*x^2), x) == :((1+n)^-1*(a+b*x+c*x^2+d*x^3)^(1+n))
@test integrate((b*x+c*x^2+d*x^3)^n*(b+2*c*x+3*d*x^2), x) == :((1+n)^-1*(b*x+c*x^2+d*x^3)^(1+n))
@test integrate(x^n*(b+c*x+d*x^2)^n*(b+2*c*x+3*d*x^2), x) == :(x^(1+n)*(1+n)^-1*(b+c*x+d*x^2)^(1+n))
@test integrate((a+b*x+d*x^3)^n*(b+3*d*x^2), x) == :((1+n)^-1*(a+b*x+d*x^3)^(1+n))
@test integrate((b*x+d*x^3)^n*(b+3*d*x^2), x) == :((1+n)^-1*(b*x+d*x^3)^(1+n))
@test integrate(x^n*(b+d*x^2)^n*(b+3*d*x^2), x) == :(x^(1+n)*(1+n)^-1*(b+d*x^2)^(1+n))
@test integrate((a+c*x^2+d*x^3)^n*(2*c*x+3*d*x^2), x) == :((1+n)^-1*(a+c*x^2+d*x^3)^(1+n))
@test integrate((c*x^2+d*x^3)^n*(2*c*x+3*d*x^2), x) == :((1+n)^-1*(c*x^2+d*x^3)^(1+n))
@test integrate(x^n*(c*x+d*x^2)^n*(2*c*x+3*d*x^2), x) == :(x^(1+n)*(1+n)^-1*(c*x+d*x^2)^(1+n))
@test integrate(x^(2n)*(c+d*x)^n*(2*c*x+3*d*x^2), x) == :(x^(2+2n)*(1+n)^-1*(c+d*x)^(1+n))
@test integrate(x*(a+c*x^2+d*x^3)^n*(2c+3*d*x), x) == :((1+n)^-1*(a+c*x^2+d*x^3)^(1+n))
@test integrate(x*(c*x^2+d*x^3)^n*(2c+3*d*x), x) == :((1+n)^-1*(c*x^2+d*x^3)^(1+n))
@test integrate((a+b*x+c*x^2+d*x^3)^7*(b+2*c*x+3*d*x^2), x) == :(1//8*(a+b*x+c*x^2+d*x^3)^8)
@test integrate((b*x+c*x^2+d*x^3)^7*(b+2*c*x+3*d*x^2), x) == :(1//8*(b*x+c*x^2+d*x^3)^8)
@test integrate(x^7*(b+c*x+d*x^2)^7*(b+2*c*x+3*d*x^2), x) == :(1//8*x^8*(b+c*x+d*x^2)^8)
@test integrate((a+b*x+d*x^3)^7*(b+3*d*x^2), x) == :(1//8*(a+b*x+d*x^3)^8)
@test integrate((b*x+d*x^3)^7*(b+3*d*x^2), x) == :(1//8*(b*x+d*x^3)^8)
@test integrate(x^7*(b+d*x^2)^7*(b+3*d*x^2), x) == :(1//8*x^8*(b+d*x^2)^8)
@test integrate((a+c*x^2+d*x^3)^7*(2*c*x+3*d*x^2), x) == :(1//8*(a+c*x^2+d*x^3)^8)
@test integrate((c*x^2+d*x^3)^7*(2*c*x+3*d*x^2), x) == :(1//8*(c*x^2+d*x^3)^8)
@test integrate(x^7*(c*x+d*x^2)^7*(2*c*x+3*d*x^2), x) == :(1//8*x^16*(c+d*x)^8)
@test integrate(x^14*(c+d*x)^7*(2*c*x+3*d*x^2), x) == :(1//8*x^16*(c+d*x)^8)
@test integrate(x*(a+c*x^2+d*x^3)^7*(2c+3*d*x), x) == :(1//8*(a+c*x^2+d*x^3)^8)
@test integrate(x*(c*x^2+d*x^3)^7*(2c+3*d*x), x) == :(1//8*x^16*(c+d*x)^8)
@test integrate(x^8*(c*x+d*x^2)^7*(2c+3*d*x), x) == :(1//8*x^8*(c*x+d*x^2)^8)
@test integrate(x^15*(c+d*x)^7*(2c+3*d*x), x) == :(1//8*x^16*(c+d*x)^8)
@test integrate((1+(a*x+(1/2)*b*x^2)^4)*(a+b*x), x) == :(a*x+(1/2)*b*x^2+1//160*x^5*(2a+b*x)^5)
@test integrate((1+(c+a*x+(1/2)*b*x^2)^4)*(a+b*x), x) == :(1//5*(c+a*x+(1/2)*b*x^2)^5+a*x+(1/2)*b*x^2)
@test integrate((1+(a*x+(1/2)*b*x^2)^n)*(a+b*x), x) == :(a*x+(1+n)^-1*(a*x+(1/2)*b*x^2)^(1+n)+(1/2)*b*x^2)
@test integrate((1+(c+a*x+(1/2)*b*x^2)^n)*(a+b*x), x) == :(a*x+(1+n)^-1*(c+a*x+(1/2)*b*x^2)^(1+n)+(1/2)*b*x^2)
@test integrate((1+(a*x+1//3*c*x^3)^5)*(a+c*x^2), x) == :(1//6*(a*x+1//3*c*x^3)^6+a*x+1//3*c*x^3)
@test integrate((1+(d+a*x+1//3*c*x^3)^5)*(a+c*x^2), x) == :(1//6*(d+a*x+1//3*c*x^3)^6+a*x+1//3*c*x^3)
@test integrate((1+((1/2)*b*x^2+1//3*c*x^3)^5)*(b*x+c*x^2), x) == :((1/2)*b*x^2+1//3*c*x^3+1//279936*x^12*(3b+2*c*x)^6)
@test integrate((1+(d+(1/2)*b*x^2+1//3*c*x^3)^5)*(b*x+c*x^2), x) == :(1//6*(d+(1/2)*b*x^2+1//3*c*x^3)^6+(1/2)*b*x^2+1//3*c*x^3)
@test integrate((1+(a*x+(1/2)*b*x^2+1//3*c*x^3)^5)*(a+b*x+c*x^2), x) == :(1//6*(a*x+(1/2)*b*x^2+1//3*c*x^3)^6+a*x+(1/2)*b*x^2+1//3*c*x^3)
@test integrate((1+(d+a*x+(1/2)*b*x^2+1//3*c*x^3)^5)*(a+b*x+c*x^2), x) == :(1//6*(d+a*x+(1/2)*b*x^2+1//3*c*x^3)^6+a*x+(1/2)*b*x^2+1//3*c*x^3)
@test integrate((1+(a*x+1//3*c*x^3)^n)*(a+c*x^2), x) == :(a*x+(1+n)^-1*(a*x+1//3*c*x^3)^(1+n)+1//3*c*x^3)
@test integrate((1+((1/2)*b*x^2+1//3*c*x^3)^n)*(b*x+c*x^2), x) == :((1+n)^-1*((1/2)*b*x^2+1//3*c*x^3)^(1+n)+(1/2)*b*x^2+1//3*c*x^3)
@test integrate((1+(a*x+(1/2)*b*x^2+1//3*c*x^3)^n)*(a+b*x+c*x^2), x) == :(a*x+(1+n)^-1*(a*x+(1/2)*b*x^2+1//3*c*x^3)^(1+n)+(1/2)*b*x^2+1//3*c*x^3)
@test integrate((-4+x^2+4x)*(5+x^3+-12x+6*x^2), x) == :(1//6*(5+x^3+-12x+6*x^2)^2)
@test integrate((x^3+2x)*(1+x^4+4*x^2), x) == :(1//8*(1+x^4+4*x^2)^2)
@test integrate((-18+7*(x+x^2)^3)^2*(x+x^2)^3*(1+2x), x) == :(-36*x^7*(1+x)^7+81*x^4*(1+x)^4+49//10*x^10*(1+x)^10)
@test integrate(x^3*(1+x)^3*(-18+7*x^3*(1+x)^3)^2*(1+2x), x) == :(-36*x^7*(1+x)^7+81*x^4*(1+x)^4+49//10*x^10*(1+x)^10)
@test integrate((1+x^3+-6x)^-5*(2+-1*x^2), x) == :(1//12*(1+x^3+-6x)^-4)
@test integrate((4+x^3+3*x^2)^-1*(x^2+2x), x) == :(1//3*log(4+x^3+3*x^2))
@test integrate((x^4+2*x^2+4x)^-1*(1+x+x^3), x) == :(1//4*log(x^4+2*x^2+4x))
@test integrate((c+d*x+e*x^2+f*x^3)^-2*(b*c+-1*a*d+-1*b*e*x^2+-3*a*f*x^2+-2*a*e*x+-2*b*f*x^3), x) == :(a*(c+d*x+e*x^2+f*x^3)^-1+b*x*(c+d*x+e*x^2+f*x^3)^-1)
@test integrate((a+a*x^4+b*x+b*x^3+c*x^2)^-1*(A+B*x+C*x^2+D*x^3), x) == :(-1//4*a^-1*(b^2+8*a^2+-4*a*c)^-1//2*(D*(b+-1*(b^2+8*a^2+-4*a*c)^(1/2))+2*a*(A+-1C))*log(2a+x*(b+-1*(b^2+8*a^2+-4*a*c)^(1/2))+2*a*x^2)+1//4*a^-1*(b^2+8*a^2+-4*a*c)^-1//2*(D*(b+(b^2+8*a^2+-4*a*c)^(1/2))+2*a*(A+-1C))*log(2a+x*(b+(b^2+8*a^2+-4*a*c)^(1/2))+2*a*x^2)+(1/2)*2^(1/2)*a^-1*(b^2+8*a^2+-4*a*c)^-1//2*(4*a^2+-1*b*(b+-1*(b^2+8*a^2+-4*a*c)^(1/2))+2*a*c)^-1//2*(-1*a*(A*(b+-1*(b^2+8*a^2+-4*a*c)^(1/2))+C*b+-1*C*(b^2+8*a^2+-4*a*c)^(1/2)+2*D*c)+4*B*a^2+D*b*(b+-1*(b^2+8*a^2+-4*a*c)^(1/2)))*arctan((1/2)*2^(1/2)*(4*a^2+-1*b*(b+-1*(b^2+8*a^2+-4*a*c)^(1/2))+2*a*c)^-1//2*(b+-1*(b^2+8*a^2+-4*a*c)^(1/2)+4*a*x))+-1//2*2^(1/2)*a^-1*(b^2+8*a^2+-4*a*c)^-1//2*(4*a^2+-1*b*(b+(b^2+8*a^2+-4*a*c)^(1/2))+2*a*c)^-1//2*(-1*a*(A*(b+(b^2+8*a^2+-4*a*c)^(1/2))+C*b+C*(b^2+8*a^2+-4*a*c)^(1/2)+2*D*c)+4*B*a^2+D*b*(b+(b^2+8*a^2+-4*a*c)^(1/2)))*arctan((1/2)*2^(1/2)*(4*a^2+-1*b*(b+(b^2+8*a^2+-4*a*c)^(1/2))+2*a*c)^-1//2*(b+(b^2+8*a^2+-4*a*c)^(1/2)+4*a*x)))
@test integrate((1+x^2+x^4+-1x+-1*x^3)^-1*(2+x+-4*x^2+2*x^3), x) == :(-2*(1+5^(1/2))^-1*log(2+2*x^2+-1*x*(1+5^(1/2)))+-2*(1+-1*5^(1/2))^-1*log(2+2*x^2+-1*x*(1+-1*5^(1/2))))
@test integrate((1+x^4+4x+4*x^3+6*x^2)^-1*(x^3+3x+3*x^2), x) == :(1//3*(1+x)^-3+log(1+x))
@test integrate((1+x^4+4x+4*x^3+6*x^2)^-1*(-1+x^3+-3*x^2+3x), x) == :(-6*(1+x)^-2+6*(1+x)^-1+8//3*(1+x)^-3+log(1+x))
@test integrate((3+x^4+2*x^2)^-3*(9+-40x+-39*x^8+-18*x^2+24*x^5+26*x^6+174*x^4), x) == :((3+x^4+2*x^2)^-2*(2+-4*x^2)+13*x*(3+x^4+2*x^2)^-1+-2*x*(3+x^4+2*x^2)^-2*(18+13*x^2))
@test integrate((1+x+x^5)^-2*(-1+4*x^5), x) == :(-1*x*(1+x+x^5)^-1)
@test integrate(x^m*(a+b*x+c*x^2+d*x^3)^p*(a*(1+m)+x*(b*(2+m+p)+x*(c*(3+m+2p)+d*x*(4+m+3p)))), x) == :(x^(1+m)*(a+b*x+c*x^2+d*x^3)^(1+p))
@test integrate(x^2*(a+b*x+c*x^2+d*x^3)^p*(3a+b*x*(4+p)+c*x^2*(5+2p)+d*x^3*(6+3p)), x) == :(x^3*(a+b*x+c*x^2+d*x^3)^(1+p))
@test integrate(x*(a+b*x+c*x^2+d*x^3)^p*(2a+b*x*(3+p)+c*x^2*(4+2p)+d*x^3*(5+3p)), x) == :(x^2*(a+b*x+c*x^2+d*x^3)^(1+p))
@test integrate((a+b*x+c*x^2+d*x^3)^p*(a+b*x*(2+p)+c*x^2*(3+2p)+d*x^3*(4+3p)), x) == :(x*(a+b*x+c*x^2+d*x^3)^(1+p))
@test integrate(x^-1*(a+b*x+c*x^2+d*x^3)^p*(b*x*(1+p)+c*x^2*(2+2p)+d*x^3*(3+3p)), x) == :((a+b*x+c*x^2+d*x^3)^(1+p))
@test integrate(x^-2*(a+b*x+c*x^2+d*x^3)^p*(-1a+b*p*x+c*x^2*(1+2p)+d*x^3*(2+3p)), x) == :(x^-1*(a+b*x+c*x^2+d*x^3)^(1+p))
@test integrate(x^-3*(a+b*x+c*x^2+d*x^3)^p*(-2a+b*x*(-1+p)+d*x^3*(1+3p)+2*c*p*x^2), x) == :(x^-2*(a+b*x+c*x^2+d*x^3)^(1+p))
@test integrate(x^-4*(a+b*x+c*x^2+d*x^3)^p*(-3a+b*x*(-2+p)+c*x^2*(-1+2p)+3*d*p*x^3), x) == :(x^-3*(a+b*x+c*x^2+d*x^3)^(1+p))
@test integrate(x^4*(2+x+x^3+2*x^4+3*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(-13//48*log(2+-1x+2*x^2)+-3//4*x^2+1//3*x^3+1//3*log(1+x+x^2)+1//4*x^4+5//4*x+-10//9*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x))+1//72*15^(1/2)*arctan(1//15*15^(1/2)*(1+-4x)))
@test integrate(x^3*(2+x+x^3+2*x^4+3*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :((1/2)*x^2+-3//2*x+-1//24*log(2+-1x+2*x^2)+1//3*x^3+2//3*log(1+x+x^2)+5//36*15^(1/2)*arctan(1//15*15^(1/2)*(1+-4x))+8//9*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x)))
@test integrate(x^2*(2+x+x^3+2*x^4+3*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(x+(1/2)*x^2+-1*log(1+x+x^2)+1//4*log(2+-1x+2*x^2)+1//18*15^(1/2)*arctan(1//15*15^(1/2)*(1+-4x))+2//9*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x)))
@test integrate(x*(2+x+x^3+2*x^4+3*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(x+1//3*log(1+x+x^2)+1//6*log(2+-1x+2*x^2)+-10//9*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x))+-1//9*15^(1/2)*arctan(1//15*15^(1/2)*(1+-4x)))
@test integrate((2+x+x^3+2*x^4+3*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(-1//6*log(2+-1x+2*x^2)+2//3*log(1+x+x^2)+-1//9*15^(1/2)*arctan(1//15*15^(1/2)*(1+-4x))+8//9*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x)))
@test integrate(x^-1*(2+x+x^3+2*x^4+3*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(-1*log(1+x+x^2)+-1//4*log(2+-1x+2*x^2)+5//2*log(x)+1//18*15^(1/2)*arctan(1//15*15^(1/2)*(1+-4x))+2//9*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x)))
@test integrate(x^-2*(2+x+x^3+2*x^4+3*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(-5//2*x^-1+-3//4*log(x)+1//3*log(1+x+x^2)+1//24*log(2+-1x+2*x^2)+-10//9*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x))+5//36*15^(1/2)*arctan(1//15*15^(1/2)*(1+-4x)))
@test integrate(x^-3*(2+x+x^3+2*x^4+3*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(-15//8*log(x)+-5//4*x^-2+2//3*log(1+x+x^2)+3//4*x^-1+13//48*log(2+-1x+2*x^2)+1//72*15^(1/2)*arctan(1//15*15^(1/2)*(1+-4x))+8//9*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x)))
@test integrate(x^3*(2+x+x^3+2*x^4+5*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(x*(-5//4+9//28*im*7^(1/2))+x^2*(1//4+-5//28*im*7^(1/2))+x^2*(1//4+5//28*im*7^(1/2))+x^3*(1//6+-5//42*im*7^(1/2))+x^3*(1//6+5//42*im*7^(1/2))+(3//16+-33//112*im*7^(1/2))*log(4+4*x^2+x*(1+-1*im*7^(1/2)))+(3//16+33//112*im*7^(1/2))*log(4+4*x^2+x*(1+im*7^(1/2)))+-1*x*(5//4+9//28*im*7^(1/2))+-1//4*(490+-14*im*7^(1/2))^-1//2*(-55*7^(1/2)+99im)*arctan((70+-2*im*7^(1/2))^-1//2*(1+8x+im*7^(1/2)))+1//4*(490+14*im*7^(1/2))^-1//2*(55*7^(1/2)+99im)*arctan((70+2*im*7^(1/2))^-1//2*(1+8x+-1*im*7^(1/2))))
@test integrate(x^2*(2+x+x^3+2*x^4+5*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(x*(1/2+-5//14*im*7^(1/2))+x*(1/2+5//14*im*7^(1/2))+x^2*(1//4+-5//28*im*7^(1/2))+x^2*(1//4+5//28*im*7^(1/2))+-1*(5//8+-9//56*im*7^(1/2))*log(4+4*x^2+x*(1+im*7^(1/2)))+-1*(5//8+9//56*im*7^(1/2))*log(4+4*x^2+x*(1+-1*im*7^(1/2)))+(1/2)*(490+-14*im*7^(1/2))^-1//2*(-1*7^(1/2)+53im)*arctan((70+-2*im*7^(1/2))^-1//2*(1+8x+im*7^(1/2)))+-1//2*(490+14*im*7^(1/2))^-1//2*(7^(1/2)+53im)*arctan((70+2*im*7^(1/2))^-1//2*(1+8x+-1*im*7^(1/2))))
@test integrate(x*(2+x+x^3+2*x^4+5*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :(x*(1/2+-5//14*im*7^(1/2))+x*(1/2+5//14*im*7^(1/2))+(1//4+-5//28*im*7^(1/2))*log(4+4*x^2+x*(1+im*7^(1/2)))+(1//4+5//28*im*7^(1/2))*log(4+4*x^2+x*(1+-1*im*7^(1/2)))+(490+-14*im*7^(1/2))^-1//2*(-7*7^(1/2)+19im)*arctan((70+-2*im*7^(1/2))^-1//2*(1+8x+im*7^(1/2)))+-1*(490+14*im*7^(1/2))^-1//2*(7*7^(1/2)+19im)*arctan((70+2*im*7^(1/2))^-1//2*(1+8x+-1*im*7^(1/2))))
@test integrate((2+x+x^3+2*x^4+5*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :((1//4+-5//28*im*7^(1/2))*log(4+4*x^2+x*(1+im*7^(1/2)))+(1//4+5//28*im*7^(1/2))*log(4+4*x^2+x*(1+-1*im*7^(1/2)))+(490+14*im*7^(1/2))^-1//2*(7*7^(1/2)+19im)*arctan((70+2*im*7^(1/2))^-1//2*(1+8x+-1*im*7^(1/2)))+-1*(490+-14*im*7^(1/2))^-1//2*(-7*7^(1/2)+19im)*arctan((70+-2*im*7^(1/2))^-1//2*(1+8x+im*7^(1/2))))
@test integrate(x^-1*(2+x+x^3+2*x^4+5*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :((5//4+-9//28*im*7^(1/2))*log(x)+(5//4+9//28*im*7^(1/2))*log(x)+-1*(5//8+-9//56*im*7^(1/2))*log(4im+x*(im+-1*7^(1/2))+4*im*x^2)+-1*(5//8+9//56*im*7^(1/2))*log(4im+x*(im+7^(1/2))+4*im*x^2)+(1/2)*(490+14*im*7^(1/2))^-1//2*(53+-1*im*7^(1/2))*arctanh((70+2*im*7^(1/2))^-1//2*(im+7^(1/2)+8*im*x))+-1//2*(490+-14*im*7^(1/2))^-1//2*(53+im*7^(1/2))*arctanh((70+-2*im*7^(1/2))^-1//2*(im+-1*7^(1/2)+8*im*x)))
@test integrate(x^-2*(2+x+x^3+2*x^4+5*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :((3//16+-33//112*im*7^(1/2))*log(4im+x*(im+7^(1/2))+4*im*x^2)+(3//16+33//112*im*7^(1/2))*log(4im+x*(im+-1*7^(1/2))+4*im*x^2)+-1*(3//8+-33//56*im*7^(1/2))*log(x)+-1*(3//8+33//56*im*7^(1/2))*log(x)+-1//28*x^-1*(35+-9*im*7^(1/2))+-1//28*x^-1*(35+9*im*7^(1/2))+-1//4*(490+14*im*7^(1/2))^-1//2*(99+-55*im*7^(1/2))*arctanh((70+2*im*7^(1/2))^-1//2*(im+7^(1/2)+8*im*x))+1//4*(490+-14*im*7^(1/2))^-1//2*(99+55*im*7^(1/2))*arctanh((70+-2*im*7^(1/2))^-1//2*(im+-1*7^(1/2)+8*im*x)))
@test integrate(x^-3*(2+x+x^3+2*x^4+5*x^2)^-1*(5+x+2*x^3+3*x^2), x) == :((35//32+-9//32*im*7^(1/2))*log(4im+x*(im+-1*7^(1/2))+4*im*x^2)+(35//32+9//32*im*7^(1/2))*log(4im+x*(im+7^(1/2))+4*im*x^2)+-1*(35//16+-9//16*im*7^(1/2))*log(x)+-1*(35//16+9//16*im*7^(1/2))*log(x)+-1//56*x^-2*(35+-9*im*7^(1/2))+-1//56*x^-2*(35+9*im*7^(1/2))+1//56*x^-1*(21+-33*im*7^(1/2))+1//56*x^-1*(21+33*im*7^(1/2))+-1//8*(490+14*im*7^(1/2))^-1//2*(355+73*im*7^(1/2))*arctanh((70+2*im*7^(1/2))^-1//2*(im+7^(1/2)+8*im*x))+1//8*(490+-14*im*7^(1/2))^-1//2*(355+-73*im*7^(1/2))*arctanh((70+-2*im*7^(1/2))^-1//2*(im+-1*7^(1/2)+8*im*x)))
@test integrate(x^2*(a^2+b^2*x^4+c^2*x^6+2*a*b*x^2)^-1*(3a+b*x^2), x) == :(c^-1*arctan(c*x^3*(a+b*x^2)^-1))
@test integrate((1+x^2)^-2*(-2+x)^-1*(1+-3*x^4), x) == :(-47//25*log(2+-1x)+-46//25*arctan(x)+-14//25*log(1+x^2)+-1*(5+5*x^2)^-1*(1+-2x))
@test integrate((x^3+-9x)^-1*(-9+-9x+2*x^2), x) == :(-1*log(3+-1x)+2*log(3+x)+log(x))
@test integrate((x^3+-1x)^-1*(1+x^5+2*x^2), x) == :(x+-1*log(x)+2*log(1+-1x)+1//3*x^3+log(1+x))
@test integrate(x^-1*(-1+x)^-2*(3+2*x^2), x) == :(-1*log(1+-1x)+3*log(x)+5*(1+-1x)^-1)
@test integrate((1+x^2)^-1*(-1+4x)^-1*(-1+2*x^2), x) == :(-7//34*log(1+-4x)+3//17*arctan(x)+6//17*log(1+x^2))
@test integrate((1+x^2)^-1*(-3+x^3+-3*x^2+2x), x) == :((1/2)*x^2+(1/2)*log(1+x^2)+-3x)
@test integrate((10+x^2+6x)^-1*(x+x^4+6*x^3+10*x^2), x) == :((1/2)*log(10+x^2+6x)+-3*arctan(3+x)+1//3*x^3)
@test integrate((-18+x^4+-7*x^2+-3*x^3+27x)^-1, x) == :(-1//5*log(2+-1x)+-1//120*log(3+x)+1//8*log(1+-1x)+1//12*log(3+-1x))
@test integrate((-2+x)^-1*(1+x^3), x) == :(x^2+4x+9*log(2+-1x)+1//3*x^3)
@test integrate((1+x^2)^-1*(-4*x^2+3x+3*x^3), x) == :(-4x+4*arctan(x)+3//2*x^2)
@test integrate((1+x^3+-1x+-1*x^2)^-1*(5+3x), x) == :(4*(1+-1x)^-1+arctanh(x))
@test integrate((x^3+-1*x^2)^-1*(-1+x^4+-1x+-1*x^3), x) == :((1/2)*x^2+-1*x^-1+-2*log(1+-1x)+2*log(x))
@test integrate((2+x^4+3*x^2)^-1*(2+x+x^2+x^3), x) == :((1/2)*log(2+x^2)+arctan(x))
@test integrate((2+x^2)^-3*(-4+x^5+-1*x^4+-4*x^2+4*x^3+8x), x) == :((1/2)*log(2+x^2)+-1*(2+x^2)^-2+-1//2*2^(1/2)*arctan((1/2)*x*2^(1/2)))
@test integrate((x^2+x^3+-2x)^-1*(-1+x^2+-3x), x) == :((1/2)*log(x)+-1*log(1+-1x)+3//2*log(2+x))
@test integrate((x^3+-2*x^2+3x)^-1*(3+x^4+-1x+-2*x^3+3*x^2), x) == :((1/2)*x^2+-1//2*log(3+x^2+-2x)+log(x))
@test integrate((1+x^2)^-2*(-1+x+x^3), x) == :((1/2)*log(1+x^2)+-1//2*arctan(x)+-1*x*(2+2*x^2)^-1)
@test integrate((1+x^3)^-1*(x+x^2)^-1*(1+x^4+-1*x^2+2x+8*x^3), x) == :(-3*(1+x)^-1+-2*log(1+x)+-2//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+-2x))+log(x)+log(1+x^2+-1x))
@test integrate((5+x^2)^-1*(3+x^2+2x)^-1*(15+x^2+x^3+-5x), x) == :((1/2)*log(3+x^2+2x)+-1*5^(1/2)*arctan(1//5*x*5^(1/2))+5//2*2^(1/2)*arctan((1/2)*2^(1/2)*(1+x)))
@test integrate((1+x^2)^-2*(2+x+x^2)^-2*(-3+x^6+7*x^5+15*x^4+23*x^2+25x+32*x^3), x) == :((2+x+x^2)^-1+-1*log(2+x+x^2)+-3*(1+x^2)^-1+log(1+x^2))
@test integrate((1+x^2)^-1*(4+x^2)^-1, x) == :(-1//6*arctan((1/2)*x)+1//3*arctan(x))
@test integrate((1+x^2)^-1*(a+b*x^3), x) == :(a*arctan(x)+(1/2)*b*x^2+-1//2*b*log(1+x^2))
@test integrate((-4+x^2)^-1*(4+x)^-1*(x+x^2), x) == :(-1//2*arctanh((1/2)*x)+log(4+x))
@test integrate((1+x^2)^-1*(2+x^2)^-1*(4+x^2), x) == :(3*arctan(x)+-1*2^(1/2)*arctan((1/2)*x*2^(1/2)))
@test integrate((1+x^2)^-1*(-1+x)^-2*(5+x^4+-4x+3*x^2), x) == :(x+(1/2)*log(1+-1x)+2*arctan(x)+5*(2+-2x)^-1+3//4*log(1+x^2))
@test integrate((2+x^2)^-1*(1+x^4), x) == :(-2x+1//3*x^3+5//2*2^(1/2)*arctan((1/2)*x*2^(1/2)))
@test integrate((x^4+x^5)^-1*(2+x^4+2x), x) == :(-2//3*x^-3+log(1+x))
@test integrate((2+x^3+-1x+-2*x^2)^-1*(-1+-5x+2*x^2), x) == :(-1*log(2+-1x)+2*log(1+-1x)+log(1+x))
@test integrate((1+x^4+2*x^2)^-1*(2+x+x^3), x) == :((1/2)*log(1+x^2)+x*(1+x^2)^-1+arctan(x))
@test integrate((1+x^4+2*x^2)^-1*(1+x^2+x^3+2x), x) == :((1/2)*log(1+x^2)+-1*(2+2*x^2)^-1+arctan(x))
@test integrate((1+x^2)^-1*(2+x^2)^-1*(3+4x), x) == :(-2*log(2+x^2)+2*log(1+x^2)+3*arctan(x)+-3//2*2^(1/2)*arctan((1/2)*x*2^(1/2)))
@test integrate((1+x^2)^-1*(4+x^2)^-1*(2+x), x) == :(-1//3*arctan((1/2)*x)+-1//6*log(4+x^2)+1//6*log(1+x^2)+2//3*arctan(x))
@test integrate((-7+x^2+-6x)^-1*(2+x^3+-1x), x) == :((1/2)*x^2+6x+-1//4*log(1+x)+169//4*log(7+-1x))
@test integrate((-1+x^2)^-1*(-1+x^5), x) == :((1/2)*x^2+1//4*x^4+log(1+x))
@test integrate((1+x+x^2)^-1*(5+x^3+-1*x^2+2x), x) == :((1/2)*x^2+-2x+3//2*log(1+x+x^2)+11//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x)))
@test integrate((10+-8x+2*x^2)^-1*(-3+x+x^4+-2*x^3), x) == :((1/2)*x^2+6*arctan(2+-1x)+1//6*x^3+3//2*x+3//4*log(5+x^2+-4x))
@test integrate((-1+x)^-1*(-3+x)^-1*(-2+x)^-1*(1+x^3+2x+3*x^2), x) == :(x+-25*log(2+-1x)+7//2*log(1+-1x)+61//2*log(3+-1x))
@test integrate((-24+x^2+x^3+-14x)^-1*(2+x^2+x^4+-1*x^3+-7x), x) == :((1/2)*x^2+-2x+20*log(3+x)+-22//3*log(2+x)+13//3*log(4+-1x))
@test integrate(x^-1*(1+x)^-1*(-1+x)^-2*(2+x^2), x) == :(2*log(x)+3*(2+-2x)^-1+-5//4*log(1+-1x)+-3//4*log(1+x))
@test integrate((2+x^2)^-2*(3+x^2+x^3), x) == :((1/2)*log(2+x^2)+(8+4*x^2)^-1*(4+x)+5//8*2^(1/2)*arctan((1/2)*x*2^(1/2)))
@test integrate((17+x^2+-2x)^-1*(26+x^2+-10x)^-1*(-35+-4*x^2+2*x^3+70x), x) == :(-15033//1025*arctan(5+-1x)+-4607//4100*arctan(-1//4+1//4*x)+22//1025*log(17+x^2+-2x)+1003//1025*log(26+x^2+-10x))
@test integrate((-5+x)^-1*(-3+x)^-1*(4+x)^-1*(2+x^2), x) == :(-11//14*log(3+-1x)+2//7*log(4+x)+3//2*log(5+-1x))
@test integrate(x^4*(-1+x)^-1*(2+x^2)^-1, x) == :(x+(1/2)*x^2+-2//3*log(2+x^2)+1//3*log(1+-1x)+-2//3*2^(1/2)*arctan((1/2)*x*2^(1/2)))
@test integrate((-1+x^2+x^3+-1x)^-1*(-1+2*x^2+7x), x) == :(-3*(1+x)^-1+2*log(1+-1x))
@test integrate((-1+x^3+-3*x^2+3x)^-1*(1+2x), x) == :(2*(1+-1x)^-1+-3//2*(1+-1x)^-2)
@test integrate((1+x)^-3*(-1+x)^-2*(5+x^3+-5x+7*x^2), x) == :((1+-1x)^-1+-2*(1+x)^-2)
@test integrate((1+x^3+2x+2*x^2)^-1*(1+3x+3*x^2), x) == :(-2//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x))+log(1+x)+log(1+x+x^2))
@test integrate((-2x+2*x^3+3*x^2)^-1*(-1+x^2+2x), x) == :((1/2)*log(x)+-1//10*log(2+x)+1//10*log(1+-2x))
@test integrate((1+x^3+-1x+-1*x^2)^-1*(1+x^4+-2*x^2+4x), x) == :(x+(1/2)*x^2+-1*log(1+x)+2*(1+-1x)^-1+log(1+-1x))
@test integrate((x^3+4x)^-1*(4+-1x+2*x^2), x) == :((1/2)*log(4+x^2)+-1//2*arctan((1/2)*x)+log(x))
@test integrate(x^-1*(1+x^2)^-3*(-1+x)^-1*(1+x+x^2)^-1*(1+x^2+x^3), x) == :(-1*log(x)+-1//2*log(1+x+x^2)+1//8*log(1+-1x)+7//16*arctan(x)+15//16*log(1+x^2)+-1*(8+8*x^2)^-1*(3+-3x)+3*x*(16+16*x^2)^-1+-1//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x))+1//8*(1+x^2)^-2*(1+x))
@test integrate((1+x^2)^-2*(1+-1*x^3+-3x+2*x^2), x) == :(-1//2*log(1+x^2)+3//2*arctan(x)+(2+2*x^2)^-1*(2+-1x))
@test integrate(x^-1*(1+x^2)^-2*(1+-1*x^3+-3x+2*x^2), x) == :(-2*arctan(x)+-1//2*log(1+x^2)+-1*(2+2*x^2)^-1*(1+2x)+log(x))
@test integrate((x^3+-1x)^-1*(1+x^3+x^4+-1x+-1*x^2), x) == :(x+(1/2)*x^2+(1/2)*log(1+-1*x^2)+-1*log(x))
@test integrate((1+x^2)^-1*(2+x^2)^-1*(2+x^3+-4*x^2), x) == :(6*arctan(x)+-1//2*log(1+x^2)+-5*2^(1/2)*arctan((1/2)*x*2^(1/2))+log(2+x^2))
@test integrate((1+x^2)^-1*(4+x^2)^-2*(1+x^2+x^4), x) == :(1//9*arctan(x)+25//144*arctan((1/2)*x)+-13*x*(96+24*x^2)^-1)
@test integrate((x^3+x^4+2*x^2)^-1*(1+x^2+x^3), x) == :(-1//2*x^-1+-1//4*log(x)+5//8*log(2+x+x^2)+1//28*7^(1/2)*arctan(1//7*7^(1/2)*(1+2x)))
@test integrate((x^3+-3x+2*x^2)^-1*(-3+5x+6*x^2), x) == :(2*log(1+-1x)+3*log(3+x)+log(x))
@test integrate((x^3+2*x^2)^-1*(-2+3x+5*x^2), x) == :(x^-1+2*log(x)+3*log(2+x))
@test integrate((-6+x+x^3+4*x^2)^-1*(18+-4*x^2+-2x), x) == :(-3*log(3+x)+-2*log(2+x)+log(1+-1x))
@test integrate((4+x^4+5*x^2)^-1*(1+x+x^3+-2*x^2), x) == :((1/2)*log(4+x^2)+-3//2*arctan((1/2)*x)+arctan(x))
@test integrate((-70+-299x+-286*x^2+-13*x^4+30*x^5+50*x^3)^-1*(-32+-27*x^2+4*x^3+5x), x) == :(-3146//80155*log(7+-3x)+-334//323*log(1+2x)+4822//4879*log(2+5x)+11049//260015*log(5+x+x^2)+3988//260015*19^(1/2)*arctan(1//19*19^(1/2)*(1+2x)))
@test integrate(x^-2*(9+x^2)^-1*(9+x^4), x) == :(x+-1*x^-1+-10//3*arctan(1//3*x))
@test integrate((1+x^2)^-1*(x^4+2x), x) == :(-1x+1//3*x^3+arctan(x)+log(1+x^2))
@test integrate((1+x^2)^-1*(-1+x)^-2*(x^3+-1x), x) == :(arctan(x)+log(1+-1x))
@test integrate((1+x+x^2)^-1*(2+2*x^3+3*x^2+5x), x) == :(x+x^2+log(1+x+x^2))
@test integrate(x^-3*(-1+x+x^2)^-1*(3+-5*x^2+-4x+3*x^3), x) == :(-1*x^-1+3*log(x)+3//2*x^-2+-1*(3//2+-1//10*5^(1/2))*log(1+-1*5^(1/2)+2x)+-1*(3//2+1//10*5^(1/2))*log(1+5^(1/2)+2x))
@test integrate((2+x^2+2x)^-2*(4+2*x^3+5*x^2+8x), x) == :(-1*(2+x^2+2x)^-1+-1*arctan(1+x)+log(2+x^2+2x))
@test integrate(x^4*(1+x^2)^-1*(-1+x)^4, x) == :(x^5+-4*arctan(x)+4x+-4//3*x^3+-2//3*x^6+1//7*x^7)
@test integrate((9+x^4+-10*x^2)^-1*(-20x+4*x^2), x) == :(-2*log(3+x)+-1//2*log(3+-1x)+3//2*log(1+x)+log(1+-1x))
@test integrate(x^-2*(1+x^2)^-1*(-1+x)^-1*(-1+x+4*x^3), x) == :(-1*x^-1+-1*log(1+x^2)+2*log(1+-1x)+arctan(x))
@test integrate((1+x^2)^-3*(1+x^4+-4*x^3+-3x+2*x^2), x) == :(2*(1+x^2)^-1+-1//4*(1+x^2)^-2+arctan(x))
@test integrate((1+x^6+3*x^2+3*x^4)^-1*(1+x^4+-4*x^3+-3x+2*x^2), x) == :(2*(1+x^2)^-1+-1//4*(1+x^2)^-2+arctan(x))
@test integrate((x^2+x^3+x^4)^-1*(1+x+2*x^2+2*x^3), x) == :(-1*x^-1+log(1+x+x^2))
@test integrate(x^2*(a+b*x^3)^-1*(c+d*x)^2, x) == :((1/2)*b^-1*d^2*x^2+1//3*b^-1*c^2*log(a+b*x^3)+2*c*d*x*b^-1+-1//3*d*a^1//3*b^-5//3*(-1*d*a^1//3+2*c*b^1//3)*log(a^1//3+x*b^1//3)+1//6*d*a^1//3*b^-5//3*(-1*d*a^1//3+2*c*b^1//3)*log(a^2//3+b^2//3*x^2+-1*x*a^1//3*b^1//3)+1//3*d*3^(1/2)*a^1//3*b^-5//3*(d*a^1//3+2*c*b^1//3)*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+-2*x*b^1//3)))
@test integrate((3+x^4+2*x^2)^-2*(-1x+2*x^3+4*x^5), x) == :((24+8*x^4+16*x^2)^-1*(5+-7*x^2)+9//16*2^(1/2)*arctan((1/2)*2^(1/2)*(1+x^2)))
@test integrate((1+2*x^2+2*x^4)^-3*(x+x^5), x) == :((2+4*x^2+4*x^4)^-1*(1+2*x^2)+1//16*(1+2*x^2+2*x^4)^-2*(3+4*x^2)+arctan(1+2*x^2))
@test integrate((d+e*x^2+f*x^4)^-1*(a+b*x+c*x^2), x) == :(-1*b*(e^2+-4*d*f)^-1//2*arctanh((e^2+-4*d*f)^-1//2*(e+2*f*x^2))+(1/2)*2^(1/2)*f^-1//2*(e+(e^2+-4*d*f)^(1/2))^-1//2*(c+(e^2+-4*d*f)^-1//2*(c*e+-2*a*f))*arctan(x*2^(1/2)*f^(1/2)*(e+(e^2+-4*d*f)^(1/2))^-1//2)+(1/2)*2^(1/2)*f^-1//2*(e+-1*(e^2+-4*d*f)^(1/2))^-1//2*(c+-1*(e^2+-4*d*f)^-1//2*(c*e+-2*a*f))*arctan(x*2^(1/2)*f^(1/2)*(e+-1*(e^2+-4*d*f)^(1/2))^-1//2))
@test integrate((d+e*x)^2*(a+b*x^2+c*x^4)^-1, x) == :(-2*d*e*(b^2+-4*a*c)^-1//2*arctanh((b^2+-4*a*c)^-1//2*(b+2*c*x^2))+(1/2)*2^(1/2)*c^-1//2*(b+(b^2+-4*a*c)^(1/2))^-1//2*(e^2+-1*(b^2+-4*a*c)^-1//2*(-1*b*e^2+2*c*d^2))*arctan(x*2^(1/2)*c^(1/2)*(b+(b^2+-4*a*c)^(1/2))^-1//2)+(1/2)*2^(1/2)*c^-1//2*(b+-1*(b^2+-4*a*c)^(1/2))^-1//2*(e^2+(b^2+-4*a*c)^-1//2*(-1*b*e^2+2*c*d^2))*arctan(x*2^(1/2)*c^(1/2)*(b+-1*(b^2+-4*a*c)^(1/2))^-1//2))
@test integrate(x^2*(a+b*x)^-1*(c+d*x)^-1, x) == :(x*b^-1*d^-1+a^2*b^-2*(b*c+-1*a*d)^-1*log(a+b*x)+-1*c^2*d^-2*(b*c+-1*a*d)^-1*log(c+d*x))
@test integrate(x^2*(a+b*x^2)^-1*(c+d*x)^-1, x) == :(c^2*d^-1*(a*d^2+b*c^2)^-1*log(c+d*x)+(1/2)*a*d*b^-1*(a*d^2+b*c^2)^-1*log(a+b*x^2)+-1*c*a^(1/2)*b^-1//2*(a*d^2+b*c^2)^-1*arctan(x*a^-1//2*b^(1/2)))
@test integrate(x^2*(a+b*x^3)^-1*(c+d*x)^-1, x) == :(c^2*(-3*a*d^3+3*b*c^3)^-1*log(a+b*x^3)+-1*c^2*(b*c^3+-1*a*d^3)^-1*log(c+d*x)+-1//3*d*3^(1/2)*a^1//3*b^-2//3*(a^2//3*d^2+b^2//3*c^2+c*d*a^1//3*b^1//3)^-1*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+-2*x*b^1//3))+-1//6*d*a^1//3*b^-2//3*(b*c^3+-1*a*d^3)^-1*(c*b^1//3+d*a^1//3)*log(a^2//3+b^2//3*x^2+-1*x*a^1//3*b^1//3)+1//3*d*a^1//3*b^-2//3*(b*c^3+-1*a*d^3)^-1*(c*b^1//3+d*a^1//3)*log(a^1//3+x*b^1//3))
@test integrate(x^2*(a+b*x^4)^-1*(c+d*x)^-1, x) == :(d*c^2*(a*d^4+b*c^4)^-1*log(c+d*x)+-1*d*c^2*(4*a*d^4+4*b*c^4)^-1*log(a+b*x^4)+(1/2)*a^(1/2)*b^-1//2*d^3*(a*d^4+b*c^4)^-1*arctan(a^-1//2*b^(1/2)*x^2)+-1//4*c*2^(1/2)*a^-1//4*b^-1//4*(a*d^4+b*c^4)^-1*(b^(1/2)*c^2+-1*a^(1/2)*d^2)*arctan(1+-1*x*2^(1/2)*a^-1//4*b^1//4)+-1//8*c*2^(1/2)*a^-1//4*b^-1//4*(a*d^4+b*c^4)^-1*(a^(1/2)*d^2+b^(1/2)*c^2)*log(a^(1/2)+b^(1/2)*x^2+x*2^(1/2)*a^1//4*b^1//4)+1//4*c*2^(1/2)*a^-1//4*b^-1//4*(a*d^4+b*c^4)^-1*(b^(1/2)*c^2+-1*a^(1/2)*d^2)*arctan(1+x*2^(1/2)*a^-1//4*b^1//4)+1//8*c*2^(1/2)*a^-1//4*b^-1//4*(a*d^4+b*c^4)^-1*(a^(1/2)*d^2+b^(1/2)*c^2)*log(a^(1/2)+b^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*b^1//4))
@test integrate(x*(1+x)^-2*(1+-1x)^-1, x) == :((2+2x)^-1+(1/2)*arctanh(x))
@test integrate(x^2*(1+x^2)^-2*(1+-1*x^2)^-1, x) == :(1//4*arctanh(x)+-1*x*(4+4*x^2)^-1)
@test integrate(x^3*(1+x^3)^-2*(1+-1*x^3)^-1, x) == :(-1//12*log(1+-1x)+-1//36*log(1+x)+1//24*log(1+x+x^2)+1//72*log(1+x^2+-1x)+-1*x*(6+6*x^3)^-1+1//12*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x))+1//36*3^(1/2)*arctan(1//3*3^(1/2)*(1+-2x)))
@test integrate((1+x^2)^-1*(3+x^2)^-1*(9+x+x^3+3*x^2), x) == :((1/2)*log(3+x^2)+3*arctan(x))
@test integrate((1+x^2)^-1*(3+x^2)^-1*(3+x+x^2+x^3), x) == :((1/2)*log(3+x^2)+arctan(x))
@test integrate((1+x^2)^-1*(2+x^2)^-1*(-4+-1*x^2+3*x^3+6x), x) == :(-3*arctan(x)+3//2*log(1+x^2)+2^(1/2)*arctan((1/2)*x*2^(1/2)))
@test integrate((4+x^2+-4x)^-1*(5+x^2+-4x)^-1, x) == :((2+-1x)^-1+arctan(2+-1x))
@test integrate(x^-2*(-3+x)^-1*(-3+x+x^2), x) == :(-1*x^-1+log(3+-1x))
@test integrate((x+4*x^3)^-1*(1+x+4*x^2), x) == :((1/2)*arctan(2x)+log(x))
@test integrate((x^3+-1*x^2)^-1*(1+-1x+3*x^2), x) == :(x^-1+3*log(1+-1x))
@test integrate((x+x^2)^-1*(4+x^2+3x), x) == :(x+-2*log(1+x)+4*log(x))
@test integrate((x+x^3)^-1*(4+x+3*x^2), x) == :(4*log(x)+-1//2*log(1+x^2)+arctan(x))
@test integrate((1+x^2)^-1*(1+4x)^-1*(7+-4x+8*x^2), x) == :(-1*arctan(x)+2*log(1+4x))
@test integrate(x^2*(-1+x)^-1*(1+x^2+2x)^-1, x) == :((2+2x)^-1+1//4*log(1+-1x)+3//4*log(1+x))
@test integrate((-1+2x)^-2*(3+2x)^-1*(-4+x^2+3x), x) == :(-9*(32+-64x)^-1+-25//128*log(3+2x)+41//128*log(1+-2x))
@test integrate((1+x^2)^-1*(-1+x)^-1*(5+-4x+3*x^2), x) == :((1/2)*log(1+x^2)+-3*arctan(x)+2*log(1+-1x))
@test integrate((1+x^2)^-1*(-1+x)^-2*(-1+x^2+-2x), x) == :((-1+x)^-1+-1//2*log(1+x^2)+arctan(x)+log(1+-1x))
@test integrate((1/2+x^2+-1x)^-1*(10+x^2+-6x)^-1*(5+x^3), x) == :(-1026//221*arctan(3+-1x)+-261//221*arctan(1+-2x)+56//221*log(10+x^2+-6x)+109//442*log(1+-2x+2*x^2))
@test integrate((-1+x)^-1*(-3+x)^-1*(-2+x)^-1*(4+x^2+3x), x) == :(-14*log(2+-1x)+4*log(1+-1x)+11*log(3+-1x))
@test integrate((-3+2x)^-1*(5+x)^-2*(1+x+x^2)^-1*(1+16x), x) == :(-79*(1365+273x)^-1+-481//5586*log(1+x+x^2)+200//3211*log(3+-2x)+2731//24843*log(5+x)+451//8379*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x)))
@test integrate((1+x+x^2)^-1*(-1+x^3), x) == :((1/2)*x^2+-1x)
@test integrate((-7+x^2+-6x)^-1*(-3+x^3), x) == :((1/2)*x^2+(1/2)*log(1+x)+6x+85//2*log(7+-1x))
@test integrate((13+x^2+4x)^-2*(1+x^3), x) == :((1/2)*log(13+x^2+4x)+-61//54*arctan(2//3+1//3*x)+(234+18*x^2+72x)^-1*(67+47x))
@test integrate(x^-1*(1+x^2)^-1*(4+x^2)^-2*(-32+-42*x^2+-10*x^4+3*x^5+21*x^3+36x), x) == :((4+x^2)^-1+(1/2)*arctan((1/2)*x)+-2*log(x)+2*arctan(x)+log(4+x^2))
@test integrate((-7+x^8+6*x^4)^-1*(-1+x^4+x^9+7*x^5), x) == :((1/2)*x^2+-1//2*arctanh(x^2)+-1//28*2^(1/2)*7^1//4*arctan(1+-1//7*x*2^(1/2)*7^3//4)+-1//56*2^(1/2)*7^1//4*log(7^(1/2)+x^2+-1*x*2^(1/2)*7^1//4)+1//28*2^(1/2)*7^1//4*arctan(1+1//7*x*2^(1/2)*7^3//4)+1//56*2^(1/2)*7^1//4*log(7^(1/2)+x^2+x*2^(1/2)*7^1//4))
@test integrate((x+x^5)^-1*(1+x^3+x^6), x) == :((1/2)*x^2+-1//2*arctan(x^2)+-1//4*log(1+x^4)+-1//4*2^(1/2)*arctan(1+-1*x*2^(1/2))+-1//8*2^(1/2)*log(1+x^2+x*2^(1/2))+1//4*2^(1/2)*arctan(1+x*2^(1/2))+1//8*2^(1/2)*log(1+x^2+-1*x*2^(1/2))+log(x))
@test integrate((x^2+-1x)^-1*(1+x^2), x) == :(x+-1*log(x)+2*log(1+-1x))
@test integrate((x^3+-1x)^-1*(1+x^3), x) == :(x+-1*log(x)+log(1+-1x))
@test integrate((x^3+-1*x^2)^-1*(1+x^3), x) == :(x+x^-1+-1*log(x)+2*log(1+-1x))
@test integrate((x^3+-1x)^-1*(-1+x^5), x) == :(x+-1*log(1+x)+1//3*x^3+log(x))
@test integrate((x^3+x^5)^-1*(1+x^4), x) == :(-1*log(x)+-1//2*x^-2+log(1+x^2))
@test integrate((x+x^3+2*x^2)^-1*(1+x^2), x) == :(2*(1+x)^-1+log(x))
@test integrate((x^3+-10x+-3*x^2)^-1*(1+x^5), x) == :(19x+-31//14*log(2+x)+-1//10*log(x)+1//3*x^3+3//2*x^2+3126//35*log(5+-1x))
@test integrate((5+x^2)^-1*(3+x^2+2x)^-1*(15+x^2+x^3+-5x), x) == :((1/2)*log(3+x^2+2x)+-1*5^(1/2)*arctan(1//5*x*5^(1/2))+5//2*2^(1/2)*arctan((1/2)*2^(1/2)*(1+x)))
@test integrate((1+x^2)^-1*(3+10*x*(1+x^2)^-1)^-1, x) == :(-1//8*log(3+x)+1//8*log(1+3x))
@test integrate(x^3*(13+2*x^-1+15x)^-1, x) == :(-16//567*log(2+3x)+-13//450*x^2+1//45*x^3+1//4375*log(1+5x)+139//3375*x)
@test integrate(x^2*(13+2*x^-1+15x)^-1, x) == :(-13//225*x+-1//875*log(1+5x)+1//30*x^2+8//189*log(2+3x))
@test integrate(x*(13+2*x^-1+15x)^-1, x) == :(-4//63*log(2+3x)+1//15*x+1//175*log(1+5x))
@test integrate((13+2*x^-1+15x)^-1, x) == :(-1//35*log(1+5x)+2//21*log(2+3x))
@test integrate(x^-1*(13+2*x^-1+15x)^-1, x) == :(-1//7*log(2+3x)+1//7*log(1+5x))
@test integrate(x^-2*(13+2*x^-1+15x)^-1, x) == :((1/2)*log(x)+-5//7*log(1+5x)+3//14*log(2+3x))
@test integrate(x^-3*(13+2*x^-1+15x)^-1, x) == :(-13//4*log(x)+-9//28*log(2+3x)+-1//2*x^-1+25//7*log(1+5x))
@test integrate(x^-4*(13+2*x^-1+15x)^-1, x) == :(-125//7*log(1+5x)+-1//4*x^-2+13//4*x^-1+27//56*log(2+3x)+139//8*log(x))
@test integrate(x^-5*(13+2*x^-1+15x)^-1, x) == :(-1417//16*log(x)+-139//8*x^-1+-81//112*log(2+3x)+-1//6*x^-3+13//8*x^-2+625//7*log(1+5x))
@test integrate(x^2*(2+-1*(1+x^2)^4)^-1, x) == :(-1//8*2^1//4*(1+2^1//4)^(1/2)*arctan(x*(1+2^1//4)^-1//2)+1//8*2^1//4*(-1+2^1//4)^(1/2)*arctanh(x*(-1+2^1//4)^-1//2)+-1//8*im*2^1//4*(1+im*2^1//4)^(1/2)*arctan(x*(1+im*2^1//4)^-1//2)+1//8*im*2^1//4*(1+-1*im*2^1//4)^(1/2)*arctan(x*(1+-1*im*2^1//4)^-1//2))
@test integrate(x^2*(2+-1*(1+-1*x^2)^4)^-1, x) == :(-1//8*2^1//4*(-1+2^1//4)^(1/2)*arctan(x*(-1+2^1//4)^-1//2)+1//8*2^1//4*(1+2^1//4)^(1/2)*arctanh(x*(1+2^1//4)^-1//2)+-1//8*im*2^1//4*(1+-1*im*2^1//4)^(1/2)*arctanh(x*(1+-1*im*2^1//4)^-1//2)+1//8*im*2^1//4*(1+im*2^1//4)^(1/2)*arctanh(x*(1+im*2^1//4)^-1//2))
@test integrate(x^2*(2+(1+x^2)^4)^-1, x) == :(-1//8*(-2)^1//4*(1+(-2)^1//4)^(1/2)*arctan(x*(1+(-2)^1//4)^-1//2)+1//8*(-2)^1//4*(1+-1*(-2)^1//4)^(1/2)*arctan(x*(1+-1*(-2)^1//4)^-1//2)+-1//8*(-1)^3//4*2^1//4*(1+(-1)^3//4*2^1//4)^(1/2)*arctan(x*(1+(-1)^3//4*2^1//4)^-1//2)+1//8*im*((1+im+2^3//4)^-1*(1+im))^(1/2)*((-2)^1//4+2^(1/2))*arctan(x*((1+im+2^3//4)^-1*(1+im))^(1/2)))
@test integrate(x^2*(2+(1+-1*x^2)^4)^-1, x) == :(-1//8*(-2)^1//4*(1+-1*(-2)^1//4)^(1/2)*arctanh(x*(1+-1*(-2)^1//4)^-1//2)+1//8*(-2)^1//4*(1+(-2)^1//4)^(1/2)*arctanh(x*(1+(-2)^1//4)^-1//2)+-1//8*im*((1+im+2^3//4)^-1*(1+im))^(1/2)*((-2)^1//4+2^(1/2))*arctanh(x*((1+im+2^3//4)^-1*(1+im))^(1/2))+1//8*(-1)^3//4*2^1//4*(1+(-1)^3//4*2^1//4)^(1/2)*arctanh(x*(1+(-1)^3//4*2^1//4)^-1//2))
@test integrate((a+b*(1+-1*x^2)^4)^-1*(1+-1*x^2), x) == :(-1//4*b^-3//8*(-1a)^-1//2*((-1a)^1//4+-1*b^1//4)^-1//2*arctan(x*b^1//8*((-1a)^1//4+-1*b^1//4)^-1//2)+1//4*b^-3//8*(-1a)^-1//2*(b^1//4+(-1a)^1//4)^-1//2*arctanh(x*b^1//8*(b^1//4+(-1a)^1//4)^-1//2)+-1//8*2^(1/2)*b^-3//8*(-1a)^-1//2*(b^(1/2)+(-1a)^(1/2))^-1//2*((b^(1/2)+(-1a)^(1/2))^(1/2)+-1*b^1//4)^(1/2)*arctan(((b^(1/2)+(-1a)^(1/2))^(1/2)+-1*b^1//4)^-1//2*((b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)+-1*x*2^(1/2)*b^1//8))+-1//16*2^(1/2)*b^-3//8*(-1a)^-1//2*(b^(1/2)+(-1a)^(1/2))^-1//2*(b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)*log((b^(1/2)+(-1a)^(1/2))^(1/2)+b^1//4*x^2+x*2^(1/2)*b^1//8*(b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2))+1//8*2^(1/2)*b^-3//8*(-1a)^-1//2*(b^(1/2)+(-1a)^(1/2))^-1//2*((b^(1/2)+(-1a)^(1/2))^(1/2)+-1*b^1//4)^(1/2)*arctan(((b^(1/2)+(-1a)^(1/2))^(1/2)+-1*b^1//4)^-1//2*((b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)+x*2^(1/2)*b^1//8))+1//16*2^(1/2)*b^-3//8*(-1a)^-1//2*(b^(1/2)+(-1a)^(1/2))^-1//2*(b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)*log((b^(1/2)+(-1a)^(1/2))^(1/2)+b^1//4*x^2+-1*x*2^(1/2)*b^1//8*(b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)))
@test integrate((a+b*(-1+x^2)^4)^-1*(1+-1*x^2), x) == :(-1//4*b^-3//8*(-1a)^-1//2*((-1a)^1//4+-1*b^1//4)^-1//2*arctan(x*b^1//8*((-1a)^1//4+-1*b^1//4)^-1//2)+1//4*b^-3//8*(-1a)^-1//2*(b^1//4+(-1a)^1//4)^-1//2*arctanh(x*b^1//8*(b^1//4+(-1a)^1//4)^-1//2)+-1//8*2^(1/2)*b^-3//8*(-1a)^-1//2*(b^(1/2)+(-1a)^(1/2))^-1//2*((b^(1/2)+(-1a)^(1/2))^(1/2)+-1*b^1//4)^(1/2)*arctan(((b^(1/2)+(-1a)^(1/2))^(1/2)+-1*b^1//4)^-1//2*((b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)+-1*x*2^(1/2)*b^1//8))+-1//16*2^(1/2)*b^-3//8*(-1a)^-1//2*(b^(1/2)+(-1a)^(1/2))^-1//2*(b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)*log((b^(1/2)+(-1a)^(1/2))^(1/2)+b^1//4*x^2+x*2^(1/2)*b^1//8*(b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2))+1//8*2^(1/2)*b^-3//8*(-1a)^-1//2*(b^(1/2)+(-1a)^(1/2))^-1//2*((b^(1/2)+(-1a)^(1/2))^(1/2)+-1*b^1//4)^(1/2)*arctan(((b^(1/2)+(-1a)^(1/2))^(1/2)+-1*b^1//4)^-1//2*((b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)+x*2^(1/2)*b^1//8))+1//16*2^(1/2)*b^-3//8*(-1a)^-1//2*(b^(1/2)+(-1a)^(1/2))^-1//2*(b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)*log((b^(1/2)+(-1a)^(1/2))^(1/2)+b^1//4*x^2+-1*x*2^(1/2)*b^1//8*(b^1//4+(b^(1/2)+(-1a)^(1/2))^(1/2))^(1/2)))
@test integrate((1+x^2)^2*(a*x^6+b*(1+x^2)^3)^-1, x) == :(1//3*b^-5//6*(a^1//3+b^1//3)^-1//2*arctan(x*b^-1//6*(a^1//3+b^1//3)^(1/2))+1//3*b^-5//6*(b^1//3+(-1)^2//3*a^1//3)^-1//2*arctan(x*b^-1//6*(b^1//3+(-1)^2//3*a^1//3)^(1/2))+1//3*b^-5//6*(b^1//3+-1*(-1)^1//3*a^1//3)^-1//2*arctan(x*b^-1//6*(b^1//3+-1*(-1)^1//3*a^1//3)^(1/2)))
@test integrate((a+c*x^4)^-1*(d+e*x)^3, x) == :(1//4*c^-1*e^3*log(a+c*x^4)+3//2*e*a^-1//2*c^-1//2*d^2*arctan(a^-1//2*c^(1/2)*x^2)+-1//4*d*2^(1/2)*a^-3//4*c^-3//4*(c^(1/2)*d^2+3*a^(1/2)*e^2)*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-1//8*d*2^(1/2)*a^-3//4*c^-3//4*(c^(1/2)*d^2+-3*a^(1/2)*e^2)*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+1//4*d*2^(1/2)*a^-3//4*c^-3//4*(c^(1/2)*d^2+3*a^(1/2)*e^2)*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+1//8*d*2^(1/2)*a^-3//4*c^-3//4*(c^(1/2)*d^2+-3*a^(1/2)*e^2)*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-1*(d+e*x)^2, x) == :(d*e*a^-1//2*c^-1//2*arctan(a^-1//2*c^(1/2)*x^2)+-1//4*2^(1/2)*a^-3//4*c^-3//4*(a^(1/2)*e^2+c^(1/2)*d^2)*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-1//8*2^(1/2)*a^-3//4*c^-3//4*(c^(1/2)*d^2+-1*a^(1/2)*e^2)*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+1//4*2^(1/2)*a^-3//4*c^-3//4*(a^(1/2)*e^2+c^(1/2)*d^2)*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+1//8*2^(1/2)*a^-3//4*c^-3//4*(c^(1/2)*d^2+-1*a^(1/2)*e^2)*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-1*(d+e*x), x) == :((1/2)*e*a^-1//2*c^-1//2*arctan(a^-1//2*c^(1/2)*x^2)+-1//4*d*2^(1/2)*a^-3//4*c^-1//4*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-1//8*d*2^(1/2)*a^-3//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+1//4*d*2^(1/2)*a^-3//4*c^-1//4*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+1//8*d*2^(1/2)*a^-3//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-1, x) == :(-1//4*2^(1/2)*a^-3//4*c^-1//4*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-1//8*2^(1/2)*a^-3//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+1//4*2^(1/2)*a^-3//4*c^-1//4*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+1//8*2^(1/2)*a^-3//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-1*(d+e*x)^-1, x) == :(e^3*(a*e^4+c*d^4)^-1*log(d+e*x)+-1*e^3*(4*a*e^4+4*c*d^4)^-1*log(a+c*x^4)+-1//2*e*a^-1//2*c^(1/2)*d^2*(a*e^4+c*d^4)^-1*arctan(a^-1//2*c^(1/2)*x^2)+-1//4*d*2^(1/2)*a^-3//4*c^1//4*(a*e^4+c*d^4)^-1*(a^(1/2)*e^2+c^(1/2)*d^2)*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-1//8*d*2^(1/2)*a^-3//4*c^1//4*(a*e^4+c*d^4)^-1*(c^(1/2)*d^2+-1*a^(1/2)*e^2)*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+1//4*d*2^(1/2)*a^-3//4*c^1//4*(a*e^4+c*d^4)^-1*(a^(1/2)*e^2+c^(1/2)*d^2)*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+1//8*d*2^(1/2)*a^-3//4*c^1//4*(a*e^4+c*d^4)^-1*(c^(1/2)*d^2+-1*a^(1/2)*e^2)*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-1*(d+e*x)^-2, x) == :(-1*e^3*(d+e*x)^-1*(a*e^4+c*d^4)^-1+-1*c*d^3*e^3*(a*e^4+c*d^4)^-2*log(a+c*x^4)+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4*(a^(1/2)*e^2+c^(1/2)*d^2)*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+3//32*d*2^(1/2)*a^-7//4*c^-3//4*(c^(1/2)*d^2+-1*a^(1/2)*e^2)*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-2*(d+e*x)^2, x) == :(1//4*x*a^-1*(a+c*x^4)^-1*(d+e*x)^2+(1/2)*d*e*a^-3//2*c^-1//2*arctan(a^-1//2*c^(1/2)*x^2)+-1//16*2^(1/2)*a^-7//4*c^-3//4*(a^(1/2)*e^2+3*c^(1/2)*d^2)*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-1//32*2^(1/2)*a^-7//4*c^-3//4*(-1*a^(1/2)*e^2+3*c^(1/2)*d^2)*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+1//16*2^(1/2)*a^-7//4*c^-3//4*(a^(1/2)*e^2+3*c^(1/2)*d^2)*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+1//32*2^(1/2)*a^-7//4*c^-3//4*(-1*a^(1/2)*e^2+3*c^(1/2)*d^2)*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-2*(d+e*x), x) == :(1//4*e*a^-3//2*c^-1//2*arctan(a^-1//2*c^(1/2)*x^2)+1//4*x*a^-1*(a+c*x^4)^-1*(d+e*x)+-3//16*d*2^(1/2)*a^-7//4*c^-1//4*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-3//32*d*2^(1/2)*a^-7//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+3//16*d*2^(1/2)*a^-7//4*c^-1//4*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+3//32*d*2^(1/2)*a^-7//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-2, x) == :(1//4*x*a^-1*(a+c*x^4)^-1+-3//16*2^(1/2)*a^-7//4*c^-1//4*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-3//32*2^(1/2)*a^-7//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+3//16*2^(1/2)*a^-7//4*c^-1//4*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+3//32*2^(1/2)*a^-7//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-2*(d+e*x)^-1, x) == :(e^7*(a*e^4+c*d^4)^-2*log(d+e*x)+-1//4*e^7*(a*e^4+c*d^4)^-2*log(a+c*x^4)+1//4*a^-1*(a+c*x^4)^-1*(a*e^4+c*d^4)^-1*(a*e^3+c*x*(d^3+d*e^2*x^2+-1*e*x*d^2))+-1//2*a^-1//2*c^(1/2)*d^2*e^5*(a*e^4+c*d^4)^-2*arctan(a^-1//2*c^(1/2)*x^2)+-1//4*e*a^-3//2*c^(1/2)*d^2*(a*e^4+c*d^4)^-1*arctan(a^-1//2*c^(1/2)*x^2)+-1//16*d*2^(1/2)*a^-7//4*c^1//4*(a*e^4+c*d^4)^-1*(a^(1/2)*e^2+3*c^(1/2)*d^2)*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-1//32*d*2^(1/2)*a^-7//4*c^1//4*(a*e^4+c*d^4)^-1*(-1*a^(1/2)*e^2+3*c^(1/2)*d^2)*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+1//16*d*2^(1/2)*a^-7//4*c^1//4*(a*e^4+c*d^4)^-1*(a^(1/2)*e^2+3*c^(1/2)*d^2)*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+1//32*d*2^(1/2)*a^-7//4*c^1//4*(a*e^4+c*d^4)^-1*(-1*a^(1/2)*e^2+3*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1//4))
@test integrate((a+c*x^4)^-3*(d+e*x)^3, x) == :(-1//8*a^-1*c^-1*(a+c*x^4)^-2*(a*e^3+-1*c*x*(d^3+3*d*e^2*x^2+3*e*x*d^2))+1//32*x*a^-2*(a+c*x^4)^-1*(7*d^3+15*d*e^2*x^2+18*e*x*d^2)+9//16*e*a^-5//2*c^-1//2*d^2*arctan(a^-1//2*c^(1/2)*x^2)+-3//128*d*2^(1/2)*a^-11//4*c^-3//4*(5*a^(1/2)*e^2+7*c^(1/2)*d^2)*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-3//256*d*2^(1/2)*a^-11//4*c^-3//4*(-5*a^(1/2)*e^2+7*c^(1/2)*d^2)*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+3//128*d*2^(1/2)*a^-11//4*c^-3//4*(5*a^(1/2)*e^2+7*c^(1/2)*d^2)*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+3//256*d*2^(1/2)*a^-11//4*c^-3//4*(-5*a^(1/2)*e^2+7*c^(1/2)*d^2)*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-3*(d+e*x)^2, x) == :(1//8*x*a^-1*(a+c*x^4)^-2*(d+e*x)^2+1//32*x*a^-2*(a+c*x^4)^-1*(7*d^2+5*e^2*x^2+12*d*e*x)+-1//128*2^(1/2)*a^-11//4*c^-3//4*(5*a^(1/2)*e^2+21*c^(1/2)*d^2)*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-1//256*2^(1/2)*a^-11//4*c^-3//4*(-5*a^(1/2)*e^2+21*c^(1/2)*d^2)*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+1//128*2^(1/2)*a^-11//4*c^-3//4*(5*a^(1/2)*e^2+21*c^(1/2)*d^2)*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+1//256*2^(1/2)*a^-11//4*c^-3//4*(-5*a^(1/2)*e^2+21*c^(1/2)*d^2)*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4)+3//8*d*e*a^-5//2*c^-1//2*arctan(a^-1//2*c^(1/2)*x^2))
@test integrate((a+c*x^4)^-3*(d+e*x), x) == :(1//8*x*a^-1*(a+c*x^4)^-2*(d+e*x)+1//32*x*a^-2*(a+c*x^4)^-1*(7d+6*e*x)+3//16*e*a^-5//2*c^-1//2*arctan(a^-1//2*c^(1/2)*x^2)+-21//128*d*2^(1/2)*a^-11//4*c^-1//4*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-21//256*d*2^(1/2)*a^-11//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+21//128*d*2^(1/2)*a^-11//4*c^-1//4*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+21//256*d*2^(1/2)*a^-11//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-3, x) == :(1//8*x*a^-1*(a+c*x^4)^-2+7//32*x*a^-2*(a+c*x^4)^-1+-21//128*2^(1/2)*a^-11//4*c^-1//4*arctan(1+-1*x*2^(1/2)*a^-1//4*c^1//4)+-21//256*2^(1/2)*a^-11//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+-1*x*2^(1/2)*a^1//4*c^1//4)+21//128*2^(1/2)*a^-11//4*c^-1//4*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+21//256*2^(1/2)*a^-11//4*c^-1//4*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((a+c*x^4)^-3*(d+e*x)^-1, x) == :(e^11*(a*e^4+c*d^4)^-3*log(d+e*x)+-1//4*e^11*(a*e^4+c*d^4)^-3*log(a+c*x^4)+1//8*a^-1*(a+c*x^4)^-2*(a*e^4+c*d^4)^-1*(a*e^3+c*x*(d^3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*c^2*d^8+-16*a*c*d^4*e^4+2*a^(1/2)*c^(1/2)*d^2*e^2*(-5*a*e^4+11*c*d^4))*arctan(1+x*2^(1/2)*a^-1//4*c^1//4)+3//8*d*2^(1/2)*a^-3//4*c^3//4*e^8*(a*e^4+c*d^4)^-5*(a^2*e^8+15*c^2*d^8+-16*a*c*d^4*e^4+-2*a^(1/2)*c^(1/2)*d^2*e^2*(-5*a*e^4+11*c*d^4))*log(a^(1/2)+c^(1/2)*x^2+x*2^(1/2)*a^1//4*c^1//4))
@test integrate((1+x^2+-1x)^-1*(-1+x), x) == :((1/2)*log(1+x^2+-1x)+1//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+-2x)))
@test integrate((1+x^3)^-1*(-1+x^2), x) == :((1/2)*log(1+x^2+-1x)+1//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+-2x)))
@test integrate((4+x^2+-2x)^-1*(-4+3x), x) == :(3//2*log(4+x^2+-2x)+1//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+-1x)))
@test integrate((8+x^3)^-1*(-8+2x+3*x^2), x) == :(3//2*log(4+x^2+-2x)+1//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+-1x)))
@test integrate((-1+x^2+2x)^-1*(2+x), x) == :((1/2+-1//4*2^(1/2))*log(1+x+2^(1/2))+(1/2+1//4*2^(1/2))*log(1+x+-1*2^(1/2)))
@test integrate((2+x^3+-5x)^-1*(-4+x^2), x) == :((1/2+-1//4*2^(1/2))*log(1+x+2^(1/2))+(1/2+1//4*2^(1/2))*log(1+x+-1*2^(1/2)))
@test integrate(2*(-1+4*x^2)^-1, x) == :(-1*arctanh(2x))
@test integrate((-1+2x)^-1+-1*(1+2x)^-1, x) == :((1/2)*log(1+-2x)+-1//2*log(1+2x))
@test integrate(x*(1+-1*x^2)^-5, x) == :(1//8*(1+-1*x^2)^-4)
@test integrate((-1+x^6)^-1*(1+x^6), x) == :(x+-2//3*arctanh(x)+-1//6*log(1+x+x^2)+1//6*log(1+x^2+-1x)+-1//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x))+1//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+-2x)))
@test integrate((x^3+-1*x^-3)^-1*(x^-3+x^3), x) == :(x+-2//3*arctanh(x)+-1//6*log(1+x+x^2)+1//6*log(1+x^2+-1x)+-1//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+2x))+1//3*3^(1/2)*arctan(1//3*3^(1/2)*(1+-2x)))
@test integrate((6+2x)^-1*(x^3+-1x), x) == :(-12*log(3+x)+4x+-3//4*x^2+1//6*x^3)
@test integrate((-1+x)^-1*(x+x^3), x) == :((1/2)*x^2+2x+2*log(1+-1x)+1//3*x^3)
@test integrate(a*c+x*(d+b*c), x) == :(x^2*((1/2)*d+(1/2)*b*c)+a*c*x)
@test integrate(c*(a+b*x)+d*x, x) == :((1/2)*d*x^2+(1/2)*c*b^-1*(a+b*x)^2)
@test integrate(x^-2*(1+x^2)^-1*(4+4x), x) == :(-4*x^-1+-4*arctan(x)+-2*log(1+x^2)+4*log(x))
@test integrate(x^-1*(-4+x^2)^-1*(24+8x), x) == :(-6*log(x)+5*log(2+-1x)+log(2+x))
@test integrate((x^3+-2x)^-1*(-1+x^2), x) == :((1/2)*log(x)+1//4*log(2+-1*x^2))
@test integrate((x^3+3x)^-1*(1+x^2), x) == :(1//3*log(x^3+3x))
@test integrate((a*x+b*x^3)^-1*(a+3*b*x^2), x) == :(log(a*x+b*x^3))
@test integrate((x^3+-1x)^-1*(-2+4x), x) == :(-3*log(1+x)+2*log(x)+log(1+-1x))
@test integrate((x^3+4x)^-1*(4+x), x) == :((1/2)*arctan((1/2)*x)+-1//2*log(4+x^2)+log(x))
@test integrate((1+x^4+-1*x^2)^-1*(-1x+2*x^3), x) == :((1/2)*log(1+x^4+-1*x^2))
@test integrate((x^3+2x+3*x^2)^-1*(-3+x), x) == :(4*log(1+x)+-5//2*log(2+x)+-3//2*log(x))
@test integrate((x^2+x^4+2*x^3)^-1*(2+4x), x) == :(-2*x^-1*(1+x)^-1)
@test integrate((x^2+x^3+-6x)^-1*(1+x), x) == :(-2//15*log(3+x)+-1//6*log(x)+3//10*log(2+-1x))
@test integrate((x+x^3)^-1*(x^3+4*x^2), x) == :(x+-1*arctan(x)+2*log(1+x^2))
@test integrate((x^2+x^4)^-3*(x+2*x^3), x) == :(-1//4*(x^2+x^4)^-2)
@test integrate((c*x^2+d*x^3)^-1*(a*x^2+b*x^3), x) == :(b*x*d^-1+-1*d^-2*(b*c+-1*a*d)*log(c+d*x))
@test integrate((x^3+-1*x^2+-2x)^-1*(x+x^2), x) == :(log(2+-1x))
@test integrate(x^-3*(1+x^2)^-1*(1+-5*x^2), x) == :(-6*log(x)+3*log(1+x^2)+-1//2*x^-2)
@test integrate(2*x*(-1+x)^-1*(5+x^2)^-1, x) == :(-1//6*log(5+x^2)+1//3*log(1+-1x)+1//3*5^(1/2)*arctan(1//5*x*5^(1/2)))
@test integrate((2+x)^-1*(2+x^2), x) == :((1/2)*x^2+-2x+6*log(2+x))
@test integrate((-3+x)^-1*(4+x^2)^-1, x) == :(-3//26*arctan((1/2)*x)+-1//26*log(4+x^2)+1//13*log(3+-1x))
@test integrate(x^-1*(5+2*x^6)^-1*(-2+3*x^6), x) == :(-2//5*log(x)+19//60*log(5+2*x^6))
@test integrate((-2+x)^-1*(5+x)^-1*(3+2x), x) == :(log(2+-1x)+log(5+x))
@test integrate(x^4*(4+x^4+5*x^2)^-1, x) == :(x+-8//3*arctan((1/2)*x)+1//3*arctan(x))
@test integrate((1+x)^-1*(2+x)^-2*(3+x)^-3, x) == :((2+x)^-1+2*log(2+x)+5*(12+4x)^-1+-17//8*log(3+x)+1//4*(3+x)^-2+1//8*log(1+x))
@test integrate(x*(-1+x^2)^-1, x) == :((1/2)*log(1+-1*x^2))
@test integrate((-1+x^2)^-2, x) == :((1/2)*arctanh(x)+x*(2+-2*x^2)^-1)
@test integrate(x^2*(1+x^2)^-2, x) == :((1/2)*arctan(x)+-1*x*(2+2*x^2)^-1)
@test integrate((2+3x)^-1, x) == :(1//3*log(2+3x))
@test integrate((a^2+x^2)^-1, x) == :(a^-1*arctan(x*a^-1))
@test integrate((a+b*x^2)^-1, x) == :(a^-1//2*b^-1//2*arctan(x*a^-1//2*b^(1/2)))
@test integrate((2+x^2+-1x)^-1, x) == :(-2//7*7^(1/2)*arctan(1//7*7^(1/2)*(1+-2x)))
@test integrate(x^2*(4+-1*x^2)^2, x) == :(-8//5*x^5+1//7*x^7+16//3*x^3)
@test integrate(x*(1+-1*x^3)^2, x) == :((1/2)*x^2+-2//5*x^5+1//8*x^8)
@test integrate(x^-2*(-4+x^3+5*x^2), x) == :((1/2)*x^2+4*x^-1+5x)
@test integrate((3+-4x+3*x^2)^-1*(-1+x), x) == :(1//6*log(3+-4x+3*x^2)+1//15*5^(1/2)*arctan(1//5*5^(1/2)*(2+-3x)))
@test integrate((2+x^3)^2, x) == :(x^4+4x+1//7*x^7)
@test integrate((2+x)^-1*(-4+x^2), x) == :((1/2)*x^2+-2x)
@test integrate((1+x^2)^-1*(2+x)^-1, x) == :(-1//10*log(1+x^2)+1//5*log(2+x)+2//5*arctan(x))
@test integrate((1+x)^-1*(1+x^2)^-1, x) == :((1/2)*arctan(x)+(1/2)*log(1+x)+-1//4*log(1+x^2))
@test integrate(x*(1+x)^-1*(1+x^2)^-1, x) == :((1/2)*arctan(x)+-1//2*log(1+x)+1//4*log(1+x^2))
@test integrate((4+2*x^4+9*x^2)^-1*(-10+x^2), x) == :(-3//2*2^(1/2)*arctan(x*2^(1/2))+arctan((1/2)*x))
@test integrate((11+-4x+3*x^2)^-1*(31+5x), x) == :(5//6*log(11+-4x+3*x^2)+-103//87*29^(1/2)*arctan(1//29*29^(1/2)*(2+-3x)))
@test integrate(x^-4*(-2+x^2+x^3), x) == :(-1*x^-1+2//3*x^-3+log(x))
@test integrate(x^-2*(1+x+x^3), x) == :((1/2)*x^2+-1*x^-1+log(x))
@test integrate(x^-1*(2+x^2)^-1*(-2+x^2), x) == :(-1*log(x)+log(2+x^2))
@test integrate((-7+4*x^2)*(-3+x), x) == :(-4*x^3+21x+1//16*(7+-4*x^2)^2)
@test integrate((-2+7x)^3, x) == :(1//28*(2+-7x)^4)
@test integrate((3+2x)^-1*(-7+4*x^2), x) == :(x^2+-3x+log(3+2x))
@test integrate(x^-2*(-1+x)^-1*(1+x), x) == :(x^-1+-2*log(x)+2*log(1+-1x))
@test integrate((x^4+4*x^2+4*x^3)^-1, x) == :((1/2)*arctanh(1+x)+(2+-2*(1+x)^2)^-1*(1+x))
@test integrate((1+x)^-1*(1+x^2), x) == :((1/2)*x^2+-1x+2*log(1+x))
@test integrate(x^-2*(-1+x^3+-3*x^2+3x), x) == :(x^-1+(1/2)*x^2+-3x+3*log(x))
@test integrate((3//2+x+(1/2)*37^(1/2))*(3//2+x+-1//2*37^(1/2)), x) == :(-7x+1//3*x^3+3//2*x^2)
@test integrate((1+x)^-4*(4+2*x^3+3*x^2), x) == :(2*log(1+x)+3*(1+x)^-1+-5//3*(1+x)^-3)
@test integrate(x*(1+x)^-2*(1+x^2)^-1, x) == :((2+2x)^-1+(1/2)*arctan(x))
@test integrate((2+x)^-1*(7+x^4+-1*x^3+-2x+3*x^2), x) == :(-1*x^3+-20x+47*log(2+x)+1//4*x^4+9//2*x^2)
@test integrate((-1+x)^-1*(-1+x^3), x) == :(x+(1/2)*x^2+1//3*x^3)
@test integrate((1+x^2)^-1*(-1+x)^-3*(2+2x), x) == :((-1+x)^-1+-1*(1+-1x)^-2+arctan(x))
@test integrate((b*x+c*(d+e*x)^2)^-1, x) == :(-2*b^-1//2*(b+4*c*d*e)^-1//2*arctanh(b^-1//2*(b+4*c*d*e)^-1//2*(b+2*c*e*(d+e*x))))
@test integrate((a+b*x+c*(d+e*x)^2)^-1, x) == :(-2*(b^2+-4*a*c*e^2+4*b*c*d*e)^-1//2*arctanh((b^2+-4*a*c*e^2+4*b*c*d*e)^-1//2*(b+2*c*e*(d+e*x))))
@test integrate(x^2*(1+(-1+x^2)^2)^-1, x) == :((1/2)*(1/2+(1/2)*2^(1/2))^(1/2)*arctan((-2+2*2^(1/2))^-1//2*((2+2*2^(1/2))^(1/2)+2x))+-1//2*(1/2+(1/2)*2^(1/2))^(1/2)*arctan((-2+2*2^(1/2))^-1//2*((2+2*2^(1/2))^(1/2)+-2x))+-1//4*(2+2*2^(1/2))^-1//2*log(2^(1/2)+x^2+x*(2+2*2^(1/2))^(1/2))+1//4*(2+2*2^(1/2))^-1//2*log(2^(1/2)+x^2+-1*x*(2+2*2^(1/2))^(1/2)))
@test integrate(-1*(3+x+x^4)^-4*(15+-36x+-34*x^4+-30*x^9+5*x^2+8*x^7+12*x^3+15*x^6+140*x^5), x) == :(2*(3+x+x^4)^-3+x^4*(3+x+x^4)^-3+-5*x^6*(3+x+x^4)^-3+-3*x*(3+x+x^4)^-3+5*x^2*(3+x+x^4)^-3)
@test integrate((3+x+x^4)^-4*(-141+57*x^3+360*x^2+684x)+(3+x+x^4)^-3*(42+-320x+-75*x^2+-8*x^3)+30*x*(3+x+x^4)^-2, x) == :((3+x+x^4)^-3*(2+x^4+-5*x^6+-3x+5*x^2))
@test integrate((3+x+x^4)^-3*(-3+-30*x^5+4*x^3+10x)+-1*(3+x+x^4)^-4*(3+12*x^3)*(2+x^4+-5*x^6+-3x+5*x^2), x) == :((3+x+x^4)^-3*(2+x^4+-5*x^6+-3x+5*x^2))

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