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

@test integrate(x^4*Polylogarithms.polylog(2,a*x), x) == :(-1//125*x^5+-1//25*x*a^-4+-1//25*a^-5*log(1+-1*a*x)+-1//50*a^-3*x^2+-1//75*a^-2*x^3+-1//100*a^-1*x^4+1//5*x^5*Polylogarithms.polylog(2,a*x)+1//25*x^5*log(1+-1*a*x))
@test integrate(x^3*Polylogarithms.polylog(2,a*x), x) == :(-1//64*x^4+-1//16*x*a^-3+-1//16*a^-4*log(1+-1*a*x)+-1//32*a^-2*x^2+-1//48*a^-1*x^3+1//4*x^4*Polylogarithms.polylog(2,a*x)+1//16*x^4*log(1+-1*a*x))
@test integrate(x^2*Polylogarithms.polylog(2,a*x), x) == :(-1//27*x^3+-1//9*x*a^-2+-1//9*a^-3*log(1+-1*a*x)+-1//18*a^-1*x^2+1//3*x^3*Polylogarithms.polylog(2,a*x)+1//9*x^3*log(1+-1*a*x))
@test integrate(x*Polylogarithms.polylog(2,a*x), x) == :(-1//8*x^2+(1/2)*x^2*Polylogarithms.polylog(2,a*x)+-1//4*x*a^-1+-1//4*a^-2*log(1+-1*a*x)+1//4*x^2*log(1+-1*a*x))
@test integrate(Polylogarithms.polylog(2,a*x), x) == :(-1x+x*Polylogarithms.polylog(2,a*x)+-1*a^-1*(1+-1*a*x)*log(1+-1*a*x))
@test integrate(x^-1*Polylogarithms.polylog(2,a*x), x) == :(Polylogarithms.polylog(3,a*x))
@test integrate(x^-2*Polylogarithms.polylog(2,a*x), x) == :(a*log(x)+x^-1*log(1+-1*a*x)+-1*a*log(1+-1*a*x)+-1*x^-1*Polylogarithms.polylog(2,a*x))
@test integrate(x^-3*Polylogarithms.polylog(2,a*x), x) == :(-1//2*x^-2*Polylogarithms.polylog(2,a*x)+-1//4*a*x^-1+-1//4*a^2*log(1+-1*a*x)+1//4*a^2*log(x)+1//4*x^-2*log(1+-1*a*x))
@test integrate(x^-4*Polylogarithms.polylog(2,a*x), x) == :(-1//3*x^-3*Polylogarithms.polylog(2,a*x)+-1//9*a^2*x^-1+-1//9*a^3*log(1+-1*a*x)+-1//18*a*x^-2+1//9*a^3*log(x)+1//9*x^-3*log(1+-1*a*x))
@test integrate(x^-5*Polylogarithms.polylog(2,a*x), x) == :(-1//4*x^-4*Polylogarithms.polylog(2,a*x)+-1//16*a^3*x^-1+-1//16*a^4*log(1+-1*a*x)+-1//32*a^2*x^-2+-1//48*a*x^-3+1//16*a^4*log(x)+1//16*x^-4*log(1+-1*a*x))
@test integrate(x^3*Polylogarithms.polylog(3,a*x), x) == :(1//256*x^4+-1//16*x^4*Polylogarithms.polylog(2,a*x)+-1//64*x^4*log(1+-1*a*x)+1//4*x^4*Polylogarithms.polylog(3,a*x)+1//64*x*a^-3+1//64*a^-4*log(1+-1*a*x)+1//128*a^-2*x^2+1//192*a^-1*x^3)
@test integrate(x^2*Polylogarithms.polylog(3,a*x), x) == :(1//81*x^3+-1//9*x^3*Polylogarithms.polylog(2,a*x)+-1//27*x^3*log(1+-1*a*x)+1//3*x^3*Polylogarithms.polylog(3,a*x)+1//27*x*a^-2+1//27*a^-3*log(1+-1*a*x)+1//54*a^-1*x^2)
@test integrate(x*Polylogarithms.polylog(3,a*x), x) == :(1//16*x^2+(1/2)*x^2*Polylogarithms.polylog(3,a*x)+-1//4*x^2*Polylogarithms.polylog(2,a*x)+-1//8*x^2*log(1+-1*a*x)+1//8*x*a^-1+1//8*a^-2*log(1+-1*a*x))
@test integrate(Polylogarithms.polylog(3,a*x), x) == :(x+x*Polylogarithms.polylog(3,a*x)+-1*x*Polylogarithms.polylog(2,a*x)+a^-1*(1+-1*a*x)*log(1+-1*a*x))
@test integrate(x^-1*Polylogarithms.polylog(3,a*x), x) == :(Polylogarithms.polylog(4,a*x))
@test integrate(x^-2*Polylogarithms.polylog(3,a*x), x) == :(a*log(x)+x^-1*log(1+-1*a*x)+-1*a*log(1+-1*a*x)+-1*x^-1*Polylogarithms.polylog(2,a*x)+-1*x^-1*Polylogarithms.polylog(3,a*x))
@test integrate(x^-3*Polylogarithms.polylog(3,a*x), x) == :(-1//2*x^-2*Polylogarithms.polylog(3,a*x)+-1//4*x^-2*Polylogarithms.polylog(2,a*x)+-1//8*a*x^-1+-1//8*a^2*log(1+-1*a*x)+1//8*a^2*log(x)+1//8*x^-2*log(1+-1*a*x))
@test integrate(x^-4*Polylogarithms.polylog(3,a*x), x) == :(-1//3*x^-3*Polylogarithms.polylog(3,a*x)+-1//9*x^-3*Polylogarithms.polylog(2,a*x)+-1//27*a^2*x^-1+-1//27*a^3*log(1+-1*a*x)+-1//54*a*x^-2+1//27*a^3*log(x)+1//27*x^-3*log(1+-1*a*x))
@test integrate(x^5*Polylogarithms.polylog(2,a*x^2), x) == :(-1//54*x^6+-1//18*a^-3*log(1+-1*a*x^2)+-1//18*a^-2*x^2+-1//36*a^-1*x^4+1//6*x^6*Polylogarithms.polylog(2,a*x^2)+1//18*x^6*log(1+-1*a*x^2))
@test integrate(x^3*Polylogarithms.polylog(2,a*x^2), x) == :(-1//16*x^4+-1//8*a^-1*x^2+-1//8*a^-2*log(1+-1*a*x^2)+1//4*x^4*Polylogarithms.polylog(2,a*x^2)+1//8*x^4*log(1+-1*a*x^2))
@test integrate(x*Polylogarithms.polylog(2,a*x^2), x) == :(-1//2*x^2+(1/2)*x^2*Polylogarithms.polylog(2,a*x^2)+-1//2*a^-1*(1+-1*a*x^2)*log(1+-1*a*x^2))
@test integrate(x^-1*Polylogarithms.polylog(2,a*x^2), x) == :((1/2)*Polylogarithms.polylog(3,a*x^2))
@test integrate(x^-3*Polylogarithms.polylog(2,a*x^2), x) == :(a*log(x)+(1/2)*x^-2*log(1+-1*a*x^2)+-1//2*a*log(1+-1*a*x^2)+-1//2*x^-2*Polylogarithms.polylog(2,a*x^2))
@test integrate(x^-5*Polylogarithms.polylog(2,a*x^2), x) == :(-1//4*x^-4*Polylogarithms.polylog(2,a*x^2)+-1//8*a*x^-2+-1//8*a^2*log(1+-1*a*x^2)+1//4*a^2*log(x)+1//8*x^-4*log(1+-1*a*x^2))
@test integrate(x^-7*Polylogarithms.polylog(2,a*x^2), x) == :(-1//6*x^-6*Polylogarithms.polylog(2,a*x^2)+-1//18*a^2*x^-2+-1//18*a^3*log(1+-1*a*x^2)+-1//36*a*x^-4+1//9*a^3*log(x)+1//18*x^-6*log(1+-1*a*x^2))
@test integrate(x^4*Polylogarithms.polylog(2,a*x^2), x) == :(-4//125*x^5+-4//25*x*a^-2+-4//75*a^-1*x^3+1//5*x^5*Polylogarithms.polylog(2,a*x^2)+2//25*x^5*log(1+-1*a*x^2)+4//25*a^-5//2*arctanh(x*a^(1/2)))
@test integrate(x^2*Polylogarithms.polylog(2,a*x^2), x) == :(-4//27*x^3+-4//9*x*a^-1+1//3*x^3*Polylogarithms.polylog(2,a*x^2)+2//9*x^3*log(1+-1*a*x^2)+4//9*a^-3//2*arctanh(x*a^(1/2)))
@test integrate(Polylogarithms.polylog(2,a*x^2), x) == :(-4x+x*Polylogarithms.polylog(2,a*x^2)+2*x*log(1+-1*a*x^2)+4*a^-1//2*arctanh(x*a^(1/2)))
@test integrate(x^-2*Polylogarithms.polylog(2,a*x^2), x) == :(-1*x^-1*Polylogarithms.polylog(2,a*x^2)+2*x^-1*log(1+-1*a*x^2)+4*a^(1/2)*arctanh(x*a^(1/2)))
@test integrate(x^-4*Polylogarithms.polylog(2,a*x^2), x) == :(-4//9*a*x^-1+-1//3*x^-3*Polylogarithms.polylog(2,a*x^2)+2//9*x^-3*log(1+-1*a*x^2)+4//9*a^3//2*arctanh(x*a^(1/2)))
@test integrate(x^-6*Polylogarithms.polylog(2,a*x^2), x) == :(-4//25*a^2*x^-1+-4//75*a*x^-3+-1//5*x^-5*Polylogarithms.polylog(2,a*x^2)+2//25*x^-5*log(1+-1*a*x^2)+4//25*a^5//2*arctanh(x*a^(1/2)))
@test integrate(x^5*Polylogarithms.polylog(3,a*x^2), x) == :(1//162*x^6+-1//18*x^6*Polylogarithms.polylog(2,a*x^2)+-1//54*x^6*log(1+-1*a*x^2)+1//6*x^6*Polylogarithms.polylog(3,a*x^2)+1//54*a^-3*log(1+-1*a*x^2)+1//54*a^-2*x^2+1//108*a^-1*x^4)
@test integrate(x^3*Polylogarithms.polylog(3,a*x^2), x) == :(1//32*x^4+-1//8*x^4*Polylogarithms.polylog(2,a*x^2)+-1//16*x^4*log(1+-1*a*x^2)+1//4*x^4*Polylogarithms.polylog(3,a*x^2)+1//16*a^-1*x^2+1//16*a^-2*log(1+-1*a*x^2))
@test integrate(x*Polylogarithms.polylog(3,a*x^2), x) == :((1/2)*x^2+(1/2)*x^2*Polylogarithms.polylog(3,a*x^2)+-1//2*x^2*Polylogarithms.polylog(2,a*x^2)+(1/2)*a^-1*(1+-1*a*x^2)*log(1+-1*a*x^2))
@test integrate(x^-1*Polylogarithms.polylog(3,a*x^2), x) == :((1/2)*Polylogarithms.polylog(4,a*x^2))
@test integrate(x^-3*Polylogarithms.polylog(3,a*x^2), x) == :(a*log(x)+(1/2)*x^-2*log(1+-1*a*x^2)+-1//2*a*log(1+-1*a*x^2)+-1//2*x^-2*Polylogarithms.polylog(2,a*x^2)+-1//2*x^-2*Polylogarithms.polylog(3,a*x^2))
@test integrate(x^-5*Polylogarithms.polylog(3,a*x^2), x) == :(-1//4*x^-4*Polylogarithms.polylog(3,a*x^2)+-1//8*x^-4*Polylogarithms.polylog(2,a*x^2)+-1//16*a*x^-2+-1//16*a^2*log(1+-1*a*x^2)+1//8*a^2*log(x)+1//16*x^-4*log(1+-1*a*x^2))
@test integrate(x^-7*Polylogarithms.polylog(3,a*x^2), x) == :(-1//6*x^-6*Polylogarithms.polylog(3,a*x^2)+-1//18*x^-6*Polylogarithms.polylog(2,a*x^2)+-1//54*a^2*x^-2+-1//54*a^3*log(1+-1*a*x^2)+-1//108*a*x^-4+1//27*a^3*log(x)+1//54*x^-6*log(1+-1*a*x^2))
@test integrate(x^4*Polylogarithms.polylog(3,a*x^2), x) == :(8//625*x^5+-8//125*a^-5//2*arctanh(x*a^(1/2))+-4//125*x^5*log(1+-1*a*x^2)+-2//25*x^5*Polylogarithms.polylog(2,a*x^2)+1//5*x^5*Polylogarithms.polylog(3,a*x^2)+8//125*x*a^-2+8//375*a^-1*x^3)
@test integrate(x^2*Polylogarithms.polylog(3,a*x^2), x) == :(8//81*x^3+-8//27*a^-3//2*arctanh(x*a^(1/2))+-4//27*x^3*log(1+-1*a*x^2)+-2//9*x^3*Polylogarithms.polylog(2,a*x^2)+1//3*x^3*Polylogarithms.polylog(3,a*x^2)+8//27*x*a^-1)
@test integrate(Polylogarithms.polylog(3,a*x^2), x) == :(8x+x*Polylogarithms.polylog(3,a*x^2)+-8*a^-1//2*arctanh(x*a^(1/2))+-4*x*log(1+-1*a*x^2)+-2*x*Polylogarithms.polylog(2,a*x^2))
@test integrate(x^-2*Polylogarithms.polylog(3,a*x^2), x) == :(-1*x^-1*Polylogarithms.polylog(3,a*x^2)+-2*x^-1*Polylogarithms.polylog(2,a*x^2)+4*x^-1*log(1+-1*a*x^2)+8*a^(1/2)*arctanh(x*a^(1/2)))
@test integrate(x^-4*Polylogarithms.polylog(3,a*x^2), x) == :(-8//27*a*x^-1+-2//9*x^-3*Polylogarithms.polylog(2,a*x^2)+-1//3*x^-3*Polylogarithms.polylog(3,a*x^2)+4//27*x^-3*log(1+-1*a*x^2)+8//27*a^3//2*arctanh(x*a^(1/2)))
@test integrate(x^-6*Polylogarithms.polylog(3,a*x^2), x) == :(-8//125*a^2*x^-1+-8//375*a*x^-3+-2//25*x^-5*Polylogarithms.polylog(2,a*x^2)+-1//5*x^-5*Polylogarithms.polylog(3,a*x^2)+4//125*x^-5*log(1+-1*a*x^2)+8//125*a^5//2*arctanh(x*a^(1/2)))
@test integrate(x^-1*Polylogarithms.polylog(2,a*x^q), x) == :(q^-1*Polylogarithms.polylog(3,a*x^q))
@test integrate(x^-1*Polylogarithms.polylog(3,a*x^q), x) == :(q^-1*Polylogarithms.polylog(4,a*x^q))
@test integrate((d*x)^3//2*Polylogarithms.polylog(2,a*x), x) == :(-8//75*a^-1*(d*x)^3//2+-8//125*d^-1*(d*x)^5//2+-8//25*d*a^-2*(d*x)^(1/2)+2//5*d^-1*(d*x)^5//2*Polylogarithms.polylog(2,a*x)+4//25*d^-1*(d*x)^5//2*log(1+-1*a*x)+8//25*a^-5//2*d^3//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^(1/2)*Polylogarithms.polylog(2,a*x), x) == :(-8//9*a^-1*(d*x)^(1/2)+-8//27*d^-1*(d*x)^3//2+2//3*d^-1*(d*x)^3//2*Polylogarithms.polylog(2,a*x)+4//9*d^-1*(d*x)^3//2*log(1+-1*a*x)+8//9*a^-3//2*d^(1/2)*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-1//2*Polylogarithms.polylog(2,a*x), x) == :(-8*d^-1*(d*x)^(1/2)+2*d^-1*(d*x)^(1/2)*Polylogarithms.polylog(2,a*x)+4*d^-1*(d*x)^(1/2)*log(1+-1*a*x)+8*a^-1//2*d^-1//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-3//2*Polylogarithms.polylog(2,a*x), x) == :(-2*d^-1*(d*x)^-1//2*Polylogarithms.polylog(2,a*x)+4*d^-1*(d*x)^-1//2*log(1+-1*a*x)+8*a^(1/2)*d^-3//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-5//2*Polylogarithms.polylog(2,a*x), x) == :(-8//9*a*d^-2*(d*x)^-1//2+-2//3*d^-1*(d*x)^-3//2*Polylogarithms.polylog(2,a*x)+4//9*d^-1*(d*x)^-3//2*log(1+-1*a*x)+8//9*a^3//2*d^-5//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-7//2*Polylogarithms.polylog(2,a*x), x) == :(-8//25*a^2*d^-3*(d*x)^-1//2+-8//75*a*d^-2*(d*x)^-3//2+-2//5*d^-1*(d*x)^-5//2*Polylogarithms.polylog(2,a*x)+4//25*d^-1*(d*x)^-5//2*log(1+-1*a*x)+8//25*a^5//2*d^-7//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^5//2*Polylogarithms.polylog(3,a*x), x) == :(16//1715*a^-1*(d*x)^5//2+16//2401*d^-1*(d*x)^7//2+-16//343*a^-7//2*d^5//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2))+-8//343*d^-1*(d*x)^7//2*log(1+-1*a*x)+-4//49*d^-1*(d*x)^7//2*Polylogarithms.polylog(2,a*x)+2//7*d^-1*(d*x)^7//2*Polylogarithms.polylog(3,a*x)+16//343*a^-3*d^2*(d*x)^(1/2)+16//1029*d*a^-2*(d*x)^3//2)
@test integrate((d*x)^3//2*Polylogarithms.polylog(3,a*x), x) == :(16//375*a^-1*(d*x)^3//2+16//625*d^-1*(d*x)^5//2+-16//125*a^-5//2*d^3//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2))+-8//125*d^-1*(d*x)^5//2*log(1+-1*a*x)+-4//25*d^-1*(d*x)^5//2*Polylogarithms.polylog(2,a*x)+2//5*d^-1*(d*x)^5//2*Polylogarithms.polylog(3,a*x)+16//125*d*a^-2*(d*x)^(1/2))
@test integrate((d*x)^(1/2)*Polylogarithms.polylog(3,a*x), x) == :(16//27*a^-1*(d*x)^(1/2)+16//81*d^-1*(d*x)^3//2+-16//27*a^-3//2*d^(1/2)*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2))+-8//27*d^-1*(d*x)^3//2*log(1+-1*a*x)+-4//9*d^-1*(d*x)^3//2*Polylogarithms.polylog(2,a*x)+2//3*d^-1*(d*x)^3//2*Polylogarithms.polylog(3,a*x))
@test integrate((d*x)^-1//2*Polylogarithms.polylog(3,a*x), x) == :(16*d^-1*(d*x)^(1/2)+-16*a^-1//2*d^-1//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2))+-8*d^-1*(d*x)^(1/2)*log(1+-1*a*x)+-4*d^-1*(d*x)^(1/2)*Polylogarithms.polylog(2,a*x)+2*d^-1*(d*x)^(1/2)*Polylogarithms.polylog(3,a*x))
@test integrate((d*x)^-3//2*Polylogarithms.polylog(3,a*x), x) == :(-4*d^-1*(d*x)^-1//2*Polylogarithms.polylog(2,a*x)+-2*d^-1*(d*x)^-1//2*Polylogarithms.polylog(3,a*x)+8*d^-1*(d*x)^-1//2*log(1+-1*a*x)+16*a^(1/2)*d^-3//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-5//2*Polylogarithms.polylog(3,a*x), x) == :(-16//27*a*d^-2*(d*x)^-1//2+-4//9*d^-1*(d*x)^-3//2*Polylogarithms.polylog(2,a*x)+-2//3*d^-1*(d*x)^-3//2*Polylogarithms.polylog(3,a*x)+8//27*d^-1*(d*x)^-3//2*log(1+-1*a*x)+16//27*a^3//2*d^-5//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-7//2*Polylogarithms.polylog(3,a*x), x) == :(-16//125*a^2*d^-3*(d*x)^-1//2+-16//375*a*d^-2*(d*x)^-3//2+-4//25*d^-1*(d*x)^-5//2*Polylogarithms.polylog(2,a*x)+-2//5*d^-1*(d*x)^-5//2*Polylogarithms.polylog(3,a*x)+8//125*d^-1*(d*x)^-5//2*log(1+-1*a*x)+16//125*a^5//2*d^-7//2*arctanh(a^(1/2)*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^3//2*Polylogarithms.polylog(2,a*x^2), x) == :(-32//125*d^-1*(d*x)^5//2+-32//25*d*a^-1*(d*x)^(1/2)+2//5*d^-1*(d*x)^5//2*Polylogarithms.polylog(2,a*x^2)+8//25*d^-1*(d*x)^5//2*log(1+-1*a*x^2)+16//25*a^-5//4*d^3//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+16//25*a^-5//4*d^3//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^(1/2)*Polylogarithms.polylog(2,a*x^2), x) == :(-32//27*d^-1*(d*x)^3//2+-16//9*a^-3//4*d^(1/2)*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+2//3*d^-1*(d*x)^3//2*Polylogarithms.polylog(2,a*x^2)+8//9*d^-1*(d*x)^3//2*log(1+-1*a*x^2)+16//9*a^-3//4*d^(1/2)*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-1//2*Polylogarithms.polylog(2,a*x^2), x) == :(-32*d^-1*(d*x)^(1/2)+2*d^-1*(d*x)^(1/2)*Polylogarithms.polylog(2,a*x^2)+8*d^-1*(d*x)^(1/2)*log(1+-1*a*x^2)+16*a^-1//4*d^-1//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+16*a^-1//4*d^-1//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-3//2*Polylogarithms.polylog(2,a*x^2), x) == :(-16*a^1//4*d^-3//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+-2*d^-1*(d*x)^-1//2*Polylogarithms.polylog(2,a*x^2)+8*d^-1*(d*x)^-1//2*log(1+-1*a*x^2)+16*a^1//4*d^-3//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-5//2*Polylogarithms.polylog(2,a*x^2), x) == :(-2//3*d^-1*(d*x)^-3//2*Polylogarithms.polylog(2,a*x^2)+8//9*d^-1*(d*x)^-3//2*log(1+-1*a*x^2)+16//9*a^3//4*d^-5//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+16//9*a^3//4*d^-5//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-7//2*Polylogarithms.polylog(2,a*x^2), x) == :(-32//25*a*d^-3*(d*x)^-1//2+-16//25*a^5//4*d^-7//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+-2//5*d^-1*(d*x)^-5//2*Polylogarithms.polylog(2,a*x^2)+8//25*d^-1*(d*x)^-5//2*log(1+-1*a*x^2)+16//25*a^5//4*d^-7//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^5//2*Polylogarithms.polylog(3,a*x^2), x) == :(128//2401*d^-1*(d*x)^7//2+-64//343*a^-7//4*d^5//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2))+-32//343*d^-1*(d*x)^7//2*log(1+-1*a*x^2)+-8//49*d^-1*(d*x)^7//2*Polylogarithms.polylog(2,a*x^2)+2//7*d^-1*(d*x)^7//2*Polylogarithms.polylog(3,a*x^2)+64//343*a^-7//4*d^5//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+128//1029*d*a^-1*(d*x)^3//2)
@test integrate((d*x)^3//2*Polylogarithms.polylog(3,a*x^2), x) == :(128//625*d^-1*(d*x)^5//2+-64//125*a^-5//4*d^3//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+-64//125*a^-5//4*d^3//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2))+-32//125*d^-1*(d*x)^5//2*log(1+-1*a*x^2)+-8//25*d^-1*(d*x)^5//2*Polylogarithms.polylog(2,a*x^2)+2//5*d^-1*(d*x)^5//2*Polylogarithms.polylog(3,a*x^2)+128//125*d*a^-1*(d*x)^(1/2))
@test integrate((d*x)^(1/2)*Polylogarithms.polylog(3,a*x^2), x) == :(128//81*d^-1*(d*x)^3//2+-64//27*a^-3//4*d^(1/2)*arctanh(a^1//4*d^-1//2*(d*x)^(1/2))+-32//27*d^-1*(d*x)^3//2*log(1+-1*a*x^2)+-8//9*d^-1*(d*x)^3//2*Polylogarithms.polylog(2,a*x^2)+2//3*d^-1*(d*x)^3//2*Polylogarithms.polylog(3,a*x^2)+64//27*a^-3//4*d^(1/2)*arctan(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-1//2*Polylogarithms.polylog(3,a*x^2), x) == :(128*d^-1*(d*x)^(1/2)+-64*a^-1//4*d^-1//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+-64*a^-1//4*d^-1//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2))+-32*d^-1*(d*x)^(1/2)*log(1+-1*a*x^2)+-8*d^-1*(d*x)^(1/2)*Polylogarithms.polylog(2,a*x^2)+2*d^-1*(d*x)^(1/2)*Polylogarithms.polylog(3,a*x^2))
@test integrate((d*x)^-3//2*Polylogarithms.polylog(3,a*x^2), x) == :(-64*a^1//4*d^-3//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+-8*d^-1*(d*x)^-1//2*Polylogarithms.polylog(2,a*x^2)+-2*d^-1*(d*x)^-1//2*Polylogarithms.polylog(3,a*x^2)+32*d^-1*(d*x)^-1//2*log(1+-1*a*x^2)+64*a^1//4*d^-3//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-5//2*Polylogarithms.polylog(3,a*x^2), x) == :(-8//9*d^-1*(d*x)^-3//2*Polylogarithms.polylog(2,a*x^2)+-2//3*d^-1*(d*x)^-3//2*Polylogarithms.polylog(3,a*x^2)+32//27*d^-1*(d*x)^-3//2*log(1+-1*a*x^2)+64//27*a^3//4*d^-5//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+64//27*a^3//4*d^-5//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-7//2*Polylogarithms.polylog(3,a*x^2), x) == :(-128//125*a*d^-3*(d*x)^-1//2+-64//125*a^5//4*d^-7//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+-8//25*d^-1*(d*x)^-5//2*Polylogarithms.polylog(2,a*x^2)+-2//5*d^-1*(d*x)^-5//2*Polylogarithms.polylog(3,a*x^2)+32//125*d^-1*(d*x)^-5//2*log(1+-1*a*x^2)+64//125*a^5//4*d^-7//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate((d*x)^-9//2*Polylogarithms.polylog(3,a*x^2), x) == :(-128//1029*a*d^-3*(d*x)^-3//2+-8//49*d^-1*(d*x)^-7//2*Polylogarithms.polylog(2,a*x^2)+-2//7*d^-1*(d*x)^-7//2*Polylogarithms.polylog(3,a*x^2)+32//343*d^-1*(d*x)^-7//2*log(1+-1*a*x^2)+64//343*a^7//4*d^-9//2*arctan(a^1//4*d^-1//2*(d*x)^(1/2))+64//343*a^7//4*d^-9//2*arctanh(a^1//4*d^-1//2*(d*x)^(1/2)))
@test integrate(Polylogarithms.polylog(-3//2,a*x)+Polylogarithms.polylog(-1//2,a*x), x) == :(x*Polylogarithms.polylog(-1//2,a*x))
@test integrate(x^-1*Polylogarithms.polylog(n,a*x), x) == :(Polylogarithms.polylog(1+n,a*x))
@test integrate(x^-1*Polylogarithms.polylog(n,a*x^q), x) == :(q^-1*Polylogarithms.polylog(1+n,a*x^q))
@test integrate(x^2*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//27*x^3+1//3*x^3*Polylogarithms.polylog(2,c*(a+b*x))+1//9*x^3*log(1+-1*a*c+-1*b*c*x)+-1//3*x*a^2*b^-2+1//3*a^3*b^-3*Polylogarithms.polylog(2,c*(a+b*x))+1//12*a*b^-1*x^2+-1//6*a*b^-1*x^2*log(1+-1*a*c+-1*b*c*x)+-1//9*x*b^-2*c^-2*(1+-1*a*c)^2+-1//9*b^-3*c^-3*(1+-1*a*c)^3*log(1+-1*a*c+-1*b*c*x)+-1//18*b^-1*c^-1*x^2*(1+-1*a*c)+-1//3*a^2*b^-3*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+1//6*a*x*b^-2*c^-1*(1+-1*a*c)+1//6*a*b^-3*c^-2*(1+-1*a*c)^2*log(1+-1*a*c+-1*b*c*x))
@test integrate(x*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//8*x^2+(1/2)*x^2*Polylogarithms.polylog(2,c*(a+b*x))+1//4*x^2*log(1+-1*a*c+-1*b*c*x)+(1/2)*a*x*b^-1+-1//2*a^2*b^-2*Polylogarithms.polylog(2,c*(a+b*x))+-1//4*x*b^-1*c^-1*(1+-1*a*c)+-1//4*b^-2*c^-2*(1+-1*a*c)^2*log(1+-1*a*c+-1*b*c*x)+(1/2)*a*b^-2*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x))
@test integrate(Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1x+x*Polylogarithms.polylog(2,c*(a+b*x))+a*b^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1*b^-1*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x))
@test integrate(x^-1*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1*Polylogarithms.polylog(3,-1*b*x*a^-1)+-1*Polylogarithms.polylog(3,-1*b*c*x*(1+-1*c*(a+b*x))^-1)+-1*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))^2*((1/2)*log(c*(a+b*x))+-1//2*log(1+b*x*a^-1))+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))^2*((1/2)*log((1+-1*c*(a+b*x))^-1*(1+-1*a*c))+(1/2)*log(1+b*x*a^-1)+-1//2*log(a^-1*(1+-1*c*(a+b*x))^-1*(1+-1*a*c)*(a+b*x)))+(-1*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,-1*b*x*a^-1)+(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+Polylogarithms.polylog(2,c*(a+b*x))*log(x)+Polylogarithms.polylog(2,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+-1*Polylogarithms.polylog(2,-1*b*c*x*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+log(x)*log(1+-1*c*(a+b*x))*log(1+b*x*a^-1)+Polylogarithms.polylog(3,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1))
@test integrate(x^-2*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1*x^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1*b*a^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1*b*a^-1*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+-1*b*a^-1*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x))
@test integrate(x^-3*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//2*x^-2*Polylogarithms.polylog(2,c*(a+b*x))+(1/2)*a^-2*b^2*Polylogarithms.polylog(2,c*(a+b*x))+(1/2)*a^-2*b^2*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+(1/2)*b*a^-1*x^-1*log(1+-1*a*c+-1*b*c*x)+(1/2)*a^-2*b^2*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+(1/2)*c*a^-1*b^2*(1+-1*a*c)^-1*log(x)+-1//2*c*a^-1*b^2*(1+-1*a*c)^-1*log(1+-1*a*c+-1*b*c*x))
@test integrate(x^-4*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//3*x^-3*Polylogarithms.polylog(2,c*(a+b*x))+-1//3*a^-3*b^3*Polylogarithms.polylog(2,c*(a+b*x))+-1//3*a^-3*b^3*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+-1//3*a^-3*b^3*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+-1//3*a^-2*b^2*x^-1*log(1+-1*a*c+-1*b*c*x)+1//6*b*a^-1*x^-2*log(1+-1*a*c+-1*b*c*x)+-1//3*c*a^-2*b^3*(1+-1*a*c)^-1*log(x)+-1//6*c*a^-1*b^2*x^-1*(1+-1*a*c)^-1+-1//6*a^-1*b^3*c^2*(1+-1*a*c)^-2*log(1+-1*a*c+-1*b*c*x)+1//3*c*a^-2*b^3*(1+-1*a*c)^-1*log(1+-1*a*c+-1*b*c*x)+1//6*a^-1*b^3*c^2*(1+-1*a*c)^-2*log(x))
@test integrate(x^2*Polylogarithms.polylog(3,c*(a+b*x)), x) == :(1//81*x^3+-1//9*x^3*Polylogarithms.polylog(2,c*(a+b*x))+-1//27*x^3*log(1+-1*a*c+-1*b*c*x)+-11//18*a^3*b^-3*Polylogarithms.polylog(2,c*(a+b*x))+-5//72*a*b^-1*x^2+-1//3*b^-3*(a^3+-1*b^3*x^3)*Polylogarithms.polylog(3,c*(a+b*x))+2//3*a^3*b^-3*Polylogarithms.polylog(3,c*(a+b*x))+11//18*x*a^2*b^-2+-1//3*x*a^2*b^-2*Polylogarithms.polylog(2,c*(a+b*x))+1//6*a*b^-1*x^2*Polylogarithms.polylog(2,c*(a+b*x))+1//27*x*b^-2*c^-2*(1+-1*a*c)^2+1//27*b^-3*c^-3*(1+-1*a*c)^3*log(1+-1*a*c+-1*b*c*x)+1//54*b^-1*c^-1*x^2*(1+-1*a*c)+5//36*a*b^-1*x^2*log(1+-1*a*c+-1*b*c*x)+-5//36*a*x*b^-2*c^-1*(1+-1*a*c)+-5//36*a*b^-3*c^-2*(1+-1*a*c)^2*log(1+-1*a*c+-1*b*c*x)+11//18*a^2*b^-3*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x))
@test integrate(x*Polylogarithms.polylog(3,c*(a+b*x)), x) == :(1//16*x^2+-1//4*x^2*Polylogarithms.polylog(2,c*(a+b*x))+-1//8*x^2*log(1+-1*a*c+-1*b*c*x)+-3//4*a*x*b^-1+-1//2*b^-2*(a^2+-1*b^2*x^2)*Polylogarithms.polylog(3,c*(a+b*x))+3//4*a^2*b^-2*Polylogarithms.polylog(2,c*(a+b*x))+(1/2)*a*x*b^-1*Polylogarithms.polylog(2,c*(a+b*x))+1//8*x*b^-1*c^-1*(1+-1*a*c)+1//8*b^-2*c^-2*(1+-1*a*c)^2*log(1+-1*a*c+-1*b*c*x)+-3//4*a*b^-2*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x))
@test integrate(Polylogarithms.polylog(3,c*(a+b*x)), x) == :(x+x*Polylogarithms.polylog(3,c*(a+b*x))+-1*x*Polylogarithms.polylog(2,c*(a+b*x))+a*b^-1*Polylogarithms.polylog(3,c*(a+b*x))+-1*a*b^-1*Polylogarithms.polylog(2,c*(a+b*x))+b^-1*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x))
@test integrate(x^-2*Polylogarithms.polylog(3,c*(a+b*x)), x) == :(b*a^-1*Polylogarithms.polylog(3,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)+a^-1*(b+-1*a*x^-1)*Polylogarithms.polylog(3,c*(a+b*x))+-1*b*a^-1*Polylogarithms.polylog(3,-1*b*x*a^-1)+-1*b*a^-1*Polylogarithms.polylog(3,-1*b*c*x*(1+-1*c*(a+b*x))^-1)+-1*b*a^-1*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+-2*b*a^-1*Polylogarithms.polylog(3,c*(a+b*x))+b*a^-1*(-1*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,-1*b*x*a^-1)+b*a^-1*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+b*a^-1*Polylogarithms.polylog(2,c*(a+b*x))*log(x)+b*a^-1*Polylogarithms.polylog(2,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+(1/2)*b*a^-1*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))^2*(-1*log(1+b*x*a^-1)+log(c*(a+b*x)))+(1/2)*b*a^-1*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))^2*(-1*log(a^-1*(1+-1*c*(a+b*x))^-1*(1+-1*a*c)*(a+b*x))+log((1+-1*c*(a+b*x))^-1*(1+-1*a*c))+log(1+b*x*a^-1))+-1*b*a^-1*Polylogarithms.polylog(2,-1*b*c*x*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+b*a^-1*log(x)*log(1+-1*c*(a+b*x))*log(1+b*x*a^-1))
@test integrate(x^-3*Polylogarithms.polylog(3,c*(a+b*x)), x) == :((1/2)*a^-2*b^2*Polylogarithms.polylog(3,-1*b*x*a^-1)+(1/2)*a^-2*b^2*Polylogarithms.polylog(3,-1*b*c*x*(1+-1*c*(a+b*x))^-1)+(1/2)*a^-2*b^2*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+(1/2)*a^-2*(b^2+-1*a^2*x^-2)*Polylogarithms.polylog(3,c*(a+b*x))+-1//2*a^-2*b^2*Polylogarithms.polylog(2,c*(a+b*x))+-1//2*a^-2*b^2*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+-1//2*a^-2*b^2*Polylogarithms.polylog(3,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)+(1/2)*a^-2*b^2*Polylogarithms.polylog(2,-1*b*c*x*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+-1//2*b*a^-1*x^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1//2*a^-2*b^2*(-1*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,-1*b*x*a^-1)+-1//2*a^-2*b^2*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+-1//2*a^-2*b^2*Polylogarithms.polylog(2,c*(a+b*x))*log(x)+-1//2*a^-2*b^2*Polylogarithms.polylog(2,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+-1//2*a^-2*b^2*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+-1//4*a^-2*b^2*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))^2*(-1*log(1+b*x*a^-1)+log(c*(a+b*x)))+-1//4*a^-2*b^2*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))^2*(-1*log(a^-1*(1+-1*c*(a+b*x))^-1*(1+-1*a*c)*(a+b*x))+log((1+-1*c*(a+b*x))^-1*(1+-1*a*c))+log(1+b*x*a^-1))+-1//2*a^-2*b^2*log(x)*log(1+-1*c*(a+b*x))*log(1+b*x*a^-1))
@test integrate((d+e*x)^3*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//64*e^-1*(d+e*x)^4+-1//4*x*b^-3*(b*d+-1*a*e)^3+1//4*e^-1*(d+e*x)^4*Polylogarithms.polylog(2,c*(a+b*x))+1//16*e^-1*(d+e*x)^4*log(1+-1*a*c+-1*b*c*x)+-1//4*b^-4*e^-1*(b*d+-1*a*e)^4*Polylogarithms.polylog(2,c*(a+b*x))+-1//16*x*b^-3*c^-3*(e+b*c*d+-1*a*c*e)^3+-1//16*b^-2*e^-1*(d+e*x)^2*(b*d+-1*a*e)^2+-1//36*b^-1*e^-1*(d+e*x)^3*(b*d+-1*a*e)+-1//4*b^-4*c^-1*(b*d+-1*a*e)^3*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+-1//8*x*b^-3*c^-1*(b*d+-1*a*e)^2*(e+b*c*d+-1*a*c*e)+-1//12*x*b^-3*c^-2*(e+b*c*d+-1*a*c*e)^2*(b*d+-1*a*e)+-1//16*b^-4*c^-4*e^-1*(e+b*c*d+-1*a*c*e)^4*log(1+-1*a*c+-1*b*c*x)+-1//32*b^-2*c^-2*e^-1*(d+e*x)^2*(e+b*c*d+-1*a*c*e)^2+-1//48*b^-1*c^-1*e^-1*(d+e*x)^3*(e+b*c*d+-1*a*c*e)+1//8*b^-2*e^-1*(d+e*x)^2*(b*d+-1*a*e)^2*log(1+-1*a*c+-1*b*c*x)+1//12*b^-1*e^-1*(d+e*x)^3*(b*d+-1*a*e)*log(1+-1*a*c+-1*b*c*x)+-1//8*b^-4*c^-2*e^-1*(b*d+-1*a*e)^2*(e+b*c*d+-1*a*c*e)^2*log(1+-1*a*c+-1*b*c*x)+-1//12*b^-4*c^-3*e^-1*(e+b*c*d+-1*a*c*e)^3*(b*d+-1*a*e)*log(1+-1*a*c+-1*b*c*x)+-1//24*b^-2*c^-1*e^-1*(d+e*x)^2*(b*d+-1*a*e)*(e+b*c*d+-1*a*c*e))
@test integrate((d+e*x)^2*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//27*e^-1*(d+e*x)^3+-1//3*x*b^-2*(b*d+-1*a*e)^2+1//3*e^-1*(d+e*x)^3*Polylogarithms.polylog(2,c*(a+b*x))+1//9*e^-1*(d+e*x)^3*log(1+-1*a*c+-1*b*c*x)+-1//3*b^-3*e^-1*(b*d+-1*a*e)^3*Polylogarithms.polylog(2,c*(a+b*x))+-1//9*x*b^-2*c^-2*(e+b*c*d+-1*a*c*e)^2+-1//12*b^-1*e^-1*(d+e*x)^2*(b*d+-1*a*e)+-1//3*b^-3*c^-1*(b*d+-1*a*e)^2*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+-1//6*x*b^-2*c^-1*(b*d+-1*a*e)*(e+b*c*d+-1*a*c*e)+-1//9*b^-3*c^-3*e^-1*(e+b*c*d+-1*a*c*e)^3*log(1+-1*a*c+-1*b*c*x)+-1//18*b^-1*c^-1*e^-1*(d+e*x)^2*(e+b*c*d+-1*a*c*e)+1//6*b^-1*e^-1*(d+e*x)^2*(b*d+-1*a*e)*log(1+-1*a*c+-1*b*c*x)+-1//6*b^-3*c^-2*e^-1*(e+b*c*d+-1*a*c*e)^2*(b*d+-1*a*e)*log(1+-1*a*c+-1*b*c*x))
@test integrate((d+e*x)*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//8*e^-1*(d+e*x)^2+(1/2)*e^-1*(d+e*x)^2*Polylogarithms.polylog(2,c*(a+b*x))+-1//2*x*b^-1*(b*d+-1*a*e)+1//4*e^-1*(d+e*x)^2*log(1+-1*a*c+-1*b*c*x)+-1//2*b^-2*e^-1*(b*d+-1*a*e)^2*Polylogarithms.polylog(2,c*(a+b*x))+-1//4*x*b^-1*c^-1*(e+b*c*d+-1*a*c*e)+-1//2*b^-2*c^-1*(b*d+-1*a*e)*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+-1//4*b^-2*c^-2*e^-1*(e+b*c*d+-1*a*c*e)^2*log(1+-1*a*c+-1*b*c*x))
@test integrate(Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1x+x*Polylogarithms.polylog(2,c*(a+b*x))+a*b^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1*b^-1*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x))
@test integrate((d+e*x)^-1*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(e^-1*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+-1*e^-1*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+-1*e^-1*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+-1*e^-1*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+e^-1*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+e^-1*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+e^-1*Polylogarithms.polylog(2,c*(a+b*x))*log(d+e*x)+e^-1*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+(1/2)*e^-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+-1*e^-1*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//2*e^-1*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+e^-1*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x))
@test integrate((d+e*x)^-2*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1*e^-1*(d+e*x)^-1*Polylogarithms.polylog(2,c*(a+b*x))+b*e^-1*(b*d+-1*a*e)^-1*Polylogarithms.polylog(2,c*(a+b*x))+b*e^-1*(b*d+-1*a*e)^-1*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+b*e^-1*(b*d+-1*a*e)^-1*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x))
@test integrate((d+e*x)^-3*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//2*e^-1*(d+e*x)^-2*Polylogarithms.polylog(2,c*(a+b*x))+(1/2)*b^2*e^-1*(b*d+-1*a*e)^-2*Polylogarithms.polylog(2,c*(a+b*x))+(1/2)*b^2*e^-1*(b*d+-1*a*e)^-2*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+(1/2)*b^2*e^-1*(b*d+-1*a*e)^-2*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+-1//2*b*e^-1*(d+e*x)^-1*(b*d+-1*a*e)^-1*log(1+-1*a*c+-1*b*c*x)+(1/2)*c*b^2*e^-1*(b*d+-1*a*e)^-1*(e+b*c*d+-1*a*c*e)^-1*log(1+-1*a*c+-1*b*c*x)+-1//2*c*b^2*e^-1*(b*d+-1*a*e)^-1*(e+b*c*d+-1*a*c*e)^-1*log(d+e*x))
@test integrate((d+e*x)^-4*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//3*e^-1*(d+e*x)^-3*Polylogarithms.polylog(2,c*(a+b*x))+1//3*b^3*e^-1*(b*d+-1*a*e)^-3*Polylogarithms.polylog(2,c*(a+b*x))+1//3*b^3*e^-1*(b*d+-1*a*e)^-3*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+-1//3*b^2*e^-1*(d+e*x)^-1*(b*d+-1*a*e)^-2*log(1+-1*a*c+-1*b*c*x)+-1//6*b*e^-1*(d+e*x)^-2*(b*d+-1*a*e)^-1*log(1+-1*a*c+-1*b*c*x)+1//3*b^3*e^-1*(b*d+-1*a*e)^-3*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+-1//3*c*b^3*e^-1*(b*d+-1*a*e)^-2*(e+b*c*d+-1*a*c*e)^-1*log(d+e*x)+-1//6*b^3*c^2*e^-1*(b*d+-1*a*e)^-1*(e+b*c*d+-1*a*c*e)^-2*log(d+e*x)+1//3*c*b^3*e^-1*(b*d+-1*a*e)^-2*(e+b*c*d+-1*a*c*e)^-1*log(1+-1*a*c+-1*b*c*x)+1//6*c*b^2*e^-1*(d+e*x)^-1*(b*d+-1*a*e)^-1*(e+b*c*d+-1*a*c*e)^-1+1//6*b^3*c^2*e^-1*(b*d+-1*a*e)^-1*(e+b*c*d+-1*a*c*e)^-2*log(1+-1*a*c+-1*b*c*x))
@test integrate((-1+x)^-1*Polylogarithms.polylog(2,x), x) == :(-2*Polylogarithms.polylog(3,1+-1x)+log(1+-1x)^2*log(x)+Polylogarithms.polylog(2,x)*log(1+-1x)+2*Polylogarithms.polylog(2,1+-1x)*log(1+-1x))
@test integrate(-1*(1+-1x)^-1*Polylogarithms.polylog(2,x), x) == :(-2*Polylogarithms.polylog(3,1+-1x)+log(1+-1x)^2*log(x)+Polylogarithms.polylog(2,x)*log(1+-1x)+2*Polylogarithms.polylog(2,1+-1x)*log(1+-1x))
@test integrate(x^-1*(-1+x)^-1*Polylogarithms.polylog(2,x), x) == :(-1*Polylogarithms.polylog(3,x)+-2*Polylogarithms.polylog(3,1+-1x)+log(1+-1x)^2*log(x)+Polylogarithms.polylog(2,x)*log(1+-1x)+2*Polylogarithms.polylog(2,1+-1x)*log(1+-1x))
@test integrate(-1*x^-1*(1+-1x)^-1*Polylogarithms.polylog(2,x), x) == :(-1*Polylogarithms.polylog(3,x)+-2*Polylogarithms.polylog(3,1+-1x)+log(1+-1x)^2*log(x)+Polylogarithms.polylog(2,x)*log(1+-1x)+2*Polylogarithms.polylog(2,1+-1x)*log(1+-1x))
@test integrate((a+b*x)^-1*(c+d*x)^-1*Polylogarithms.polylog(n,e*((c+d*x)^-1*(a+b*x))^n), x) == :(n^-1*(b*c+-1*a*d)^-1*Polylogarithms.polylog(1+n,e*((c+d*x)^-1*(a+b*x))^n))
@test integrate((a+b*x)^-1*(c+d*x)^-1*Polylogarithms.polylog(3,e*((c+d*x)^-1*(a+b*x))^n), x) == :(n^-1*(b*c+-1*a*d)^-1*Polylogarithms.polylog(4,e*((c+d*x)^-1*(a+b*x))^n))
@test integrate((a+b*x)^-1*(c+d*x)^-1*Polylogarithms.polylog(2,e*((c+d*x)^-1*(a+b*x))^n), x) == :(n^-1*(b*c+-1*a*d)^-1*Polylogarithms.polylog(3,e*((c+d*x)^-1*(a+b*x))^n))
@test integrate((a+b*x)^-1*(c+d*x)^-1*Polylogarithms.polylog(1,e*((c+d*x)^-1*(a+b*x))^n), x) == :(n^-1*(b*c+-1*a*d)^-1*Polylogarithms.polylog(2,e*((c+d*x)^-1*(a+b*x))^n))
@test integrate((a+b*x)^-1*(c+d*x)^-1*Polylogarithms.polylog(0,e*((c+d*x)^-1*(a+b*x))^n), x) == :(n^-1*(b*c+-1*a*d)^-1*Polylogarithms.polylog(1,e*((c+d*x)^-1*(a+b*x))^n))
@test integrate((a+b*x)^-1*(c+d*x)^-1*Polylogarithms.polylog(-1,e*((c+d*x)^-1*(a+b*x))^n), x) == :(n^-1*(1+-1*e*((c+d*x)^-1*(a+b*x))^n)^-1*(b*c+-1*a*d)^-1)
@test integrate((a+b*x)^-1*(c+d*x)^-1*Polylogarithms.polylog(-2,e*((c+d*x)^-1*(a+b*x))^n), x) == :(n^-1*(b*c+-1*a*d)^-1*Polylogarithms.polylog(-1,e*((c+d*x)^-1*(a+b*x))^n))
@test integrate(x^3*Polylogarithms.polylog(n,d*(F^(c*(a+b*x)))^p), x) == :(-6*b^-4*c^-4*p^-4*log(F)^-4*Polylogarithms.polylog(4+n,d*(F^(c*(a+b*x)))^p)+b^-1*c^-1*p^-1*x^3*log(F)^-1*Polylogarithms.polylog(1+n,d*(F^(c*(a+b*x)))^p)+-3*b^-2*c^-2*p^-2*x^2*log(F)^-2*Polylogarithms.polylog(2+n,d*(F^(c*(a+b*x)))^p)+6*x*b^-3*c^-3*p^-3*log(F)^-3*Polylogarithms.polylog(3+n,d*(F^(c*(a+b*x)))^p))
@test integrate(x^2*Polylogarithms.polylog(n,d*(F^(c*(a+b*x)))^p), x) == :(2*b^-3*c^-3*p^-3*log(F)^-3*Polylogarithms.polylog(3+n,d*(F^(c*(a+b*x)))^p)+b^-1*c^-1*p^-1*x^2*log(F)^-1*Polylogarithms.polylog(1+n,d*(F^(c*(a+b*x)))^p)+-2*x*b^-2*c^-2*p^-2*log(F)^-2*Polylogarithms.polylog(2+n,d*(F^(c*(a+b*x)))^p))
@test integrate(x*Polylogarithms.polylog(n,d*(F^(c*(a+b*x)))^p), x) == :(-1*b^-2*c^-2*p^-2*log(F)^-2*Polylogarithms.polylog(2+n,d*(F^(c*(a+b*x)))^p)+x*b^-1*c^-1*p^-1*log(F)^-1*Polylogarithms.polylog(1+n,d*(F^(c*(a+b*x)))^p))
@test integrate(Polylogarithms.polylog(n,d*(F^(c*(a+b*x)))^p), x) == :(b^-1*c^-1*p^-1*log(F)^-1*Polylogarithms.polylog(1+n,d*(F^(c*(a+b*x)))^p))
@test integrate(x^3*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(3//256*x^4+(1/2)*c^-4*Polylogarithms.polylog(3,1+-1*c*x)+-3//64*x^4*log(1+-1*c*x)+-1//16*c^-4*log(1+-1*c*x)^2+-1//16*x^4*Polylogarithms.polylog(2,c*x)+1//16*x^4*log(1+-1*c*x)^2+67//1728*c^-1*x^3+139//576*c^-4*log(1+-1*c*x)+139//1152*c^-2*x^2+355//576*x*c^-3+-5//72*c^-1*x^3*log(1+-1*c*x)+-1//2*c^-4*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+-1//4*x*c^-3*Polylogarithms.polylog(2,c*x)+-1//4*c^-4*log(1+-1*c*x)^2*log(c*x)+-1//4*c^-4*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//8*c^-2*x^2*Polylogarithms.polylog(2,c*x)+-1//8*c^-2*x^2*log(1+-1*c*x)+-1//12*c^-1*x^3*Polylogarithms.polylog(2,c*x)+1//4*x^4*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+1//8*c^-4*(3+-3*c*x)*log(1+-1*c*x))
@test integrate(x^2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(1//27*x^3+-1//9*c^-3*log(1+-1*c*x)^2+-1//9*x^3*Polylogarithms.polylog(2,c*x)+-1//9*x^3*log(1+-1*c*x)+1//9*x^3*log(1+-1*c*x)^2+2//3*c^-3*Polylogarithms.polylog(3,1+-1*c*x)+11//36*c^-3*log(1+-1*c*x)+11//72*c^-1*x^2+31//36*x*c^-2+-7//36*c^-1*x^2*log(1+-1*c*x)+-2//3*c^-3*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+-1//3*x*c^-2*Polylogarithms.polylog(2,c*x)+-1//3*c^-3*log(1+-1*c*x)^2*log(c*x)+-1//3*c^-3*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//6*c^-1*x^2*Polylogarithms.polylog(2,c*x)+1//3*x^3*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+1//9*c^-3*(5+-5*c*x)*log(1+-1*c*x))
@test integrate(x*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(1//16*x^2+c^-2*Polylogarithms.polylog(3,1+-1*c*x)+-1//4*x^2*Polylogarithms.polylog(2,c*x)+-1//8*x^2*log(1+-1*c*x)+1//8*c^-2*(1+-1*c*x)^2+1//8*c^-2*log(1+-1*c*x)+13//8*x*c^-1+(1/2)*c^-2*(3+-3*c*x)*log(1+-1*c*x)+(1/2)*x^2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1*c^-2*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+-1//2*x*c^-1*Polylogarithms.polylog(2,c*x)+-1//2*c^-2*log(1+-1*c*x)^2*(1+-1*c*x)+-1//2*c^-2*log(1+-1*c*x)^2*log(c*x)+-1//2*c^-2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//4*c^-2*(1+-1*c*x)^2*log(1+-1*c*x)+1//4*c^-2*(1+-1*c*x)^2*log(1+-1*c*x)^2)
@test integrate(Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(3x+-1*x*Polylogarithms.polylog(2,c*x)+2*c^-1*Polylogarithms.polylog(3,1+-1*c*x)+x*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+c^-1*(3+-3*c*x)*log(1+-1*c*x)+-1*c^-1*log(1+-1*c*x)^2*(1+-1*c*x)+-1*c^-1*log(1+-1*c*x)^2*log(c*x)+-1*c^-1*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-2*c^-1*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x))
@test integrate(x^-1*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(-1//2*Polylogarithms.polylog(2,c*x)^2)
@test integrate(x^-2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(-1*c*Polylogarithms.polylog(3,c*x)+-2*c*Polylogarithms.polylog(2,c*x)+-2*c*Polylogarithms.polylog(3,1+-1*c*x)+c*log(1+-1*c*x)^2*log(c*x)+c*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+x^-1*log(1+-1*c*x)^2*(1+-1*c*x)+-1*x^-1*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+2*c*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x))
@test integrate(x^-3*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(c^2*log(1+-1*c*x)+-1*c^2*Polylogarithms.polylog(3,1+-1*c*x)+-1*c^2*log(x)+-1//2*c^2*Polylogarithms.polylog(2,c*x)+-1//2*c^2*Polylogarithms.polylog(3,c*x)+-1//4*c^2*log(1+-1*c*x)^2+1//4*x^-2*log(1+-1*c*x)^2+c^2*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+(1/2)*c*x^-1*Polylogarithms.polylog(2,c*x)+(1/2)*c^2*log(1+-1*c*x)^2*log(c*x)+(1/2)*c^2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1*c*x^-1*log(1+-1*c*x)+-1//2*x^-2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x))
@test integrate(x^-4*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(-3//4*c^3*log(x)+-2//3*c^3*Polylogarithms.polylog(3,1+-1*c*x)+-2//9*c^3*Polylogarithms.polylog(2,c*x)+-1//3*c^3*Polylogarithms.polylog(3,c*x)+-1//9*c^3*log(1+-1*c*x)^2+1//9*x^-3*log(1+-1*c*x)^2+3//4*c^3*log(1+-1*c*x)+7//36*c^2*x^-1+-7//36*c*x^-2*log(1+-1*c*x)+-5//9*c^2*x^-1*log(1+-1*c*x)+-1//3*x^-3*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+1//3*c^2*x^-1*Polylogarithms.polylog(2,c*x)+1//3*c^3*log(1+-1*c*x)^2*log(c*x)+1//3*c^3*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+1//6*c*x^-2*Polylogarithms.polylog(2,c*x)+2//3*c^3*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x))
@test integrate(x^-5*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(-41//72*c^4*log(x)+-1//2*c^4*Polylogarithms.polylog(3,1+-1*c*x)+-1//4*c^4*Polylogarithms.polylog(3,c*x)+-1//8*c^4*Polylogarithms.polylog(2,c*x)+-1//16*c^4*log(1+-1*c*x)^2+1//16*x^-4*log(1+-1*c*x)^2+5//144*c^2*x^-2+7//36*c^3*x^-1+41//72*c^4*log(1+-1*c*x)+(1/2)*c^4*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+-5//72*c*x^-3*log(1+-1*c*x)+-3//8*c^3*x^-1*log(1+-1*c*x)+-1//4*x^-4*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//8*c^2*x^-2*log(1+-1*c*x)+1//4*c^3*x^-1*Polylogarithms.polylog(2,c*x)+1//4*c^4*log(1+-1*c*x)^2*log(c*x)+1//4*c^4*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+1//8*c^2*x^-2*Polylogarithms.polylog(2,c*x)+1//12*c*x^-3*Polylogarithms.polylog(2,c*x))
@test integrate(x^2*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x), x) == :(1//81*h*x^3+-2//81*h*c^-3*(1+-1*c*x)^3+-1//6*c^-3*(1+-1*c*x)^2*(g+2*h*log(1+-1*c*x))+-1//9*h*x^3*Polylogarithms.polylog(2,c*x)+-1//9*c^-3*(g+2*h*log(1+-1*c*x))*log(1+-1*c*x)+-1//27*h*x^3*log(1+-1*c*x)+1//3*c^-3*(1+-1*c*x)*(g+2*h*log(1+-1*c*x))+1//3*x^3*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x)+1//6*h*c^-3*(1+-1*c*x)^2+1//9*h*c^-3*log(1+-1*c*x)^2+1//9*x^3*(g+h*log(1+-1*c*x))*log(1+-1*c*x)+1//27*c^-3*(1+-1*c*x)^3*(g+2*h*log(1+-1*c*x))+2//3*h*c^-3*Polylogarithms.polylog(3,1+-1*c*x)+13//108*h*c^-3*log(1+-1*c*x)+13//216*h*c^-1*x^2+121//108*h*x*c^-2+-2//3*h*c^-3*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+-1//3*h*x*c^-2*Polylogarithms.polylog(2,c*x)+-1//3*h*c^-3*log(1+-1*c*x)^2*log(c*x)+-1//3*h*c^-3*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//6*h*c^-1*x^2*Polylogarithms.polylog(2,c*x)+-1//12*h*c^-1*x^2*log(1+-1*c*x)+1//3*h*c^-3*(1+-1*c*x)*log(1+-1*c*x))
@test integrate(x*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x), x) == :(1//16*h*x^2+h*c^-2*Polylogarithms.polylog(3,1+-1*c*x)+(1/2)*c^-2*(1+-1*c*x)*(g+2*h*log(1+-1*c*x))+(1/2)*x^2*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x)+-1//4*h*x^2*Polylogarithms.polylog(2,c*x)+-1//4*c^-2*(g+2*h*log(1+-1*c*x))*log(1+-1*c*x)+-1//8*h*x^2*log(1+-1*c*x)+-1//8*c^-2*(1+-1*c*x)^2*(g+2*h*log(1+-1*c*x))+1//4*h*c^-2*log(1+-1*c*x)^2+1//4*x^2*(g+h*log(1+-1*c*x))*log(1+-1*c*x)+1//8*h*c^-2*(1+-1*c*x)^2+1//8*h*c^-2*log(1+-1*c*x)+13//8*h*x*c^-1+(1/2)*h*c^-2*(1+-1*c*x)*log(1+-1*c*x)+-1*h*c^-2*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+-1//2*h*x*c^-1*Polylogarithms.polylog(2,c*x)+-1//2*h*c^-2*log(1+-1*c*x)^2*log(c*x)+-1//2*h*c^-2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x))
@test integrate((g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x), x) == :(-1*g*x+3*h*x+x*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x)+-1*h*x*Polylogarithms.polylog(2,c*x)+2*h*c^-1*Polylogarithms.polylog(3,1+-1*c*x)+-1*g*c^-1*(1+-1*c*x)*log(1+-1*c*x)+-1*h*c^-1*log(1+-1*c*x)^2*(1+-1*c*x)+-1*h*c^-1*log(1+-1*c*x)^2*log(c*x)+-1*h*c^-1*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-2*h*c^-1*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+3*h*c^-1*(1+-1*c*x)*log(1+-1*c*x))
@test integrate(x^-1*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x), x) == :(g*Polylogarithms.polylog(3,c*x)+-1//2*h*Polylogarithms.polylog(2,c*x)^2)
@test integrate(x^-2*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x), x) == :(c*(g+2*h*log(1+-1*c*x))*log(1+-1*(1+-1*c*x)^-1)+x^-1*(g+h*log(1+-1*c*x))*log(1+-1*c*x)+-1*c*h*Polylogarithms.polylog(3,c*x)+-1*x^-1*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x)+-2*c*h*Polylogarithms.polylog(2,(1+-1*c*x)^-1)+-2*c*h*Polylogarithms.polylog(3,1+-1*c*x)+c*h*log(1+-1*c*x)^2*log(c*x)+c*h*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+2*c*h*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x))
@test integrate(x^-3*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x), x) == :((1/2)*h*c^2*log(1+-1*c*x)+-1*h*c^2*Polylogarithms.polylog(3,1+-1*c*x)+-1*h*c^2*log(x)+-1//2*h*c^2*Polylogarithms.polylog(2,(1+-1*c*x)^-1)+-1//2*h*c^2*Polylogarithms.polylog(3,c*x)+-1//2*x^-2*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x)+1//4*c^2*(g+2*h*log(1+-1*c*x))*log(1+-1*(1+-1*c*x)^-1)+1//4*x^-2*(g+h*log(1+-1*c*x))*log(1+-1*c*x)+h*c^2*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+(1/2)*c*h*x^-1*Polylogarithms.polylog(2,c*x)+(1/2)*h*c^2*log(1+-1*c*x)^2*log(c*x)+(1/2)*h*c^2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//2*c*h*x^-1*log(1+-1*c*x)+-1//4*c*x^-1*(1+-1*c*x)*(g+2*h*log(1+-1*c*x)))
@test integrate(x^-4*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x), x) == :(-3//4*h*c^3*log(x)+-2//3*h*c^3*Polylogarithms.polylog(3,1+-1*c*x)+-2//9*h*c^3*Polylogarithms.polylog(2,(1+-1*c*x)^-1)+-1//3*h*c^3*Polylogarithms.polylog(3,c*x)+-1//3*x^-3*(g+h*log(1+-1*c*x))*Polylogarithms.polylog(2,c*x)+-1//18*c*x^-2*(g+2*h*log(1+-1*c*x))+1//9*c^3*(g+2*h*log(1+-1*c*x))*log(1+-1*(1+-1*c*x)^-1)+1//9*x^-3*(g+h*log(1+-1*c*x))*log(1+-1*c*x)+7//36*h*c^2*x^-1+19//36*h*c^3*log(1+-1*c*x)+-1//3*h*c^2*x^-1*log(1+-1*c*x)+-1//9*c^2*x^-1*(1+-1*c*x)*(g+2*h*log(1+-1*c*x))+-1//12*c*h*x^-2*log(1+-1*c*x)+1//3*h*c^2*x^-1*Polylogarithms.polylog(2,c*x)+1//3*h*c^3*log(1+-1*c*x)^2*log(c*x)+1//3*h*c^3*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+1//6*c*h*x^-2*Polylogarithms.polylog(2,c*x)+2//3*h*c^3*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x))
@test integrate(x^2*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//27*x^3*(g+h*log(f*(d+e*x)^n))+1//3*x^3*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x))+1//9*x^3*(g+h*log(f*(d+e*x)^n))*log(1+-1*a*c+-1*b*c*x)+1//27*h*n*x^3+-2//27*h*n*x^3*log(1+-1*a*c+-1*b*c*x)+-1//3*g*x*a^2*b^-2+-1//9*h*n*x^3*Polylogarithms.polylog(2,c*(a+b*x))+1//3*g*a^3*b^-3*Polylogarithms.polylog(2,c*(a+b*x))+1//12*a*b^-1*x^2*(g+h*log(f*(d+e*x)^n))+-19//216*d*h*n*e^-1*x^2+-1//3*h*n*a^3*b^-3*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+-1//3*h*n*d^3*e^-3*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+-1//3*h*n*d^3*e^-3*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+-1//3*h*n*d^3*e^-3*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+-1//3*h*a^3*b^-3*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*Polylogarithms.polylog(2,c*(a+b*x))+-1//6*a*b^-1*x^2*(g+h*log(f*(d+e*x)^n))*log(1+-1*a*c+-1*b*c*x)+-1//9*a*h*n*b^-1*x^2+-1//9*g*x*b^-2*c^-2*(1+-1*a*c)^2+-1//9*h*n*a^3*b^-3*Polylogarithms.polylog(2,c*(a+b*x))+-1//9*b^-3*c^-3*(1+-1*a*c)^3*(g+h*log(f*(d+e*x)^n))*log(e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+-1//18*b^-1*c^-1*x^2*(1+-1*a*c)*(g+h*log(f*(d+e*x)^n))+-1//27*h*n*d^3*e^-3*log(d+e*x)+1//3*h*n*a^3*b^-3*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+1//3*h*n*a^3*b^-3*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+1//3*h*n*a^3*b^-3*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+1//3*h*n*d^3*e^-3*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+1//3*x*a^2*b^-2*(g+h*log(f*(d+e*x)^n))*log(1+-1*a*c+-1*b*c*x)+1//9*h*n*d^3*e^-3*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+7//9*h*n*x*a^2*b^-2+13//27*h*n*x*d^2*e^-2+-1//3*h*n*x*d^2*e^-2*Polylogarithms.polylog(2,c*(a+b*x))+-1//3*h*n*a^3*b^-3*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+-1//3*h*n*a^3*b^-3*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+-1//3*h*n*a^3*b^-3*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//3*h*n*d^3*e^-3*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//3*h*a^2*b^-2*e^-1*(d+e*x)*log(f*(d+e*x)^n)+-1//3*a^2*b^-3*c^-1*(1+-1*a*c)*(g+h*log(f*(d+e*x)^n))*log(e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+-1//6*h*n*a^3*b^-3*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+-1//6*h*n*d^3*e^-3*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+-1//9*h*n*b^-3*c^-3*(1+-1*a*c)^3*Polylogarithms.polylog(2,b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))+1//3*h*n*a^3*b^-3*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+1//3*h*n*d^3*e^-3*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+1//3*h*n*d^3*e^-3*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+1//3*h*n*d^3*e^-3*Polylogarithms.polylog(2,c*(a+b*x))*log(d+e*x)+1//3*h*n*d^3*e^-3*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+1//6*a*g*x*b^-2*c^-1*(1+-1*a*c)+1//6*a*b^-3*c^-2*(1+-1*a*c)^2*(g+h*log(f*(d+e*x)^n))*log(e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+1//6*d*h*n*e^-1*x^2*Polylogarithms.polylog(2,c*(a+b*x))+1//6*h*n*a^3*b^-3*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+1//6*h*n*d^3*e^-3*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+1//9*h*n*d^3*e^-3*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+1//108*h*n*b^-1*c^-1*x^2*(7+-7*a*c)+2//27*h*n*b^-3*c^-3*(1+-1*a*c)^3*log(1+-1*a*c+-1*b*c*x)+5//27*h*n*x*b^-2*c^-2*(1+-1*a*c)^2+5//36*a*h*n*b^-1*x^2*log(1+-1*a*c+-1*b*c*x)+5//36*d*h*n*e^-1*x^2*log(1+-1*a*c+-1*b*c*x)+-11//36*a*h*n*x*b^-2*c^-1*(1+-1*a*c)+-5//36*a*h*n*b^-3*c^-2*(1+-1*a*c)^2*log(1+-1*a*c+-1*b*c*x)+-1//3*a*h*n*b^-1*d^2*e^-2*Polylogarithms.polylog(2,c*(a+b*x))+-1//3*h*n*a^2*b^-3*c^-1*(1+-1*a*c)*Polylogarithms.polylog(2,b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))+-1//3*h*n*a^3*b^-3*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x)+-1//6*d*h*n*a^2*b^-2*e^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1//9*h*b^-2*c^-2*e^-1*(1+-1*a*c)^2*(d+e*x)*log(f*(d+e*x)^n)+-1//12*a*h*n*b^-1*d^2*e^-2*log(d+e*x)+1//3*d*h*n*a^2*b^-2*e^-1*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+1//3*h*n*d^3*e^-3*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x)+1//6*a*h*n*b^-1*d^2*e^-2*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+1//6*a*h*n*b^-3*c^-2*(1+-1*a*c)^2*Polylogarithms.polylog(2,b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))+4//9*h*n*a^2*b^-3*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+5//12*a*d*h*n*x*b^-1*e^-1+-5//36*d*h*n*b^-2*c^-2*e^-1*(1+-1*a*c)^2*log(1+-1*a*c+-1*b*c*x)+-1//36*d*h*n*x*b^-1*c^-1*e^-1*(7+-7*a*c)+1//3*d*h*n*a^2*b^-2*e^-1*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+1//6*a*h*n*b^-1*d^2*e^-2*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+1//6*a*h*b^-2*c^-1*e^-1*(1+-1*a*c)*(d+e*x)*log(f*(d+e*x)^n)+1//18*h*n*b^-1*c^-1*d^2*e^-2*(1+-1*a*c)*log(d+e*x)+4//9*h*n*b^-1*c^-1*d^2*e^-2*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+1//3*a*d*h*n*b^-2*c^-1*e^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x))
@test integrate(x*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//8*x^2*(g+h*log(f*(d+e*x)^n))+(1/2)*x^2*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x))+1//4*x^2*(g+h*log(f*(d+e*x)^n))*log(1+-1*a*c+-1*b*c*x)+3//16*h*n*x^2+(1/2)*a*g*x*b^-1+-1//2*g*a^2*b^-2*Polylogarithms.polylog(2,c*(a+b*x))+-1//4*h*n*x^2*Polylogarithms.polylog(2,c*(a+b*x))+-1//4*h*n*x^2*log(1+-1*a*c+-1*b*c*x)+(1/2)*h*n*a^2*b^-2*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+(1/2)*h*n*d^2*e^-2*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+(1/2)*h*n*d^2*e^-2*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+(1/2)*h*n*d^2*e^-2*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+(1/2)*h*a^2*b^-2*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*Polylogarithms.polylog(2,c*(a+b*x))+-7//8*d*h*n*x*e^-1+-5//4*a*h*n*x*b^-1+-1//2*a*x*b^-1*(g+h*log(f*(d+e*x)^n))*log(1+-1*a*c+-1*b*c*x)+-1//2*h*n*a^2*b^-2*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+-1//2*h*n*a^2*b^-2*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+-1//2*h*n*a^2*b^-2*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+-1//2*h*n*d^2*e^-2*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+-1//4*g*x*b^-1*c^-1*(1+-1*a*c)+-1//4*h*n*d^2*e^-2*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+-1//4*b^-2*c^-2*(1+-1*a*c)^2*(g+h*log(f*(d+e*x)^n))*log(e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+1//4*h*n*a^2*b^-2*Polylogarithms.polylog(2,c*(a+b*x))+1//8*h*n*d^2*e^-2*log(d+e*x)+(1/2)*a*h*b^-1*e^-1*(d+e*x)*log(f*(d+e*x)^n)+(1/2)*a*b^-2*c^-1*(1+-1*a*c)*(g+h*log(f*(d+e*x)^n))*log(e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+(1/2)*d*h*n*x*e^-1*Polylogarithms.polylog(2,c*(a+b*x))+(1/2)*h*n*x*b^-1*c^-1*(1+-1*a*c)+(1/2)*h*n*a^2*b^-2*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+(1/2)*h*n*a^2*b^-2*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+(1/2)*h*n*a^2*b^-2*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+(1/2)*h*n*d^2*e^-2*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//2*h*n*a^2*b^-2*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//2*h*n*d^2*e^-2*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+-1//2*h*n*d^2*e^-2*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+-1//2*h*n*d^2*e^-2*Polylogarithms.polylog(2,c*(a+b*x))*log(d+e*x)+-1//2*h*n*d^2*e^-2*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//4*h*n*a^2*b^-2*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+-1//4*h*n*b^-2*c^-2*(1+-1*a*c)^2*Polylogarithms.polylog(2,b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))+-1//4*h*n*d^2*e^-2*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+-1//4*h*n*d^2*e^-2*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+1//4*h*n*a^2*b^-2*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+1//4*h*n*b^-2*c^-2*(1+-1*a*c)^2*log(1+-1*a*c+-1*b*c*x)+1//4*h*n*d^2*e^-2*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+(1/2)*a*d*h*n*b^-1*e^-1*Polylogarithms.polylog(2,c*(a+b*x))+(1/2)*a*h*n*b^-2*c^-1*(1+-1*a*c)*Polylogarithms.polylog(2,b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))+(1/2)*h*n*a^2*b^-2*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x)+-3//4*a*h*n*b^-2*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+-1//2*a*d*h*n*b^-1*e^-1*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+-1//2*h*n*d^2*e^-2*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x)+-1//4*h*b^-1*c^-1*e^-1*(1+-1*a*c)*(d+e*x)*log(f*(d+e*x)^n)+-3//4*d*h*n*b^-1*c^-1*e^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+-1//2*a*d*h*n*b^-1*e^-1*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x))
@test integrate((g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1*g*x+x*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x))+3*h*n*x+a*g*b^-1*Polylogarithms.polylog(2,c*(a+b*x))+h*x*log(f*(d+e*x)^n)*log(1+-1*a*c+-1*b*c*x)+-1*h*n*x*Polylogarithms.polylog(2,a*c+b*c*x)+-1*h*e^-1*(d+e*x)*log(f*(d+e*x)^n)+a*h*n*b^-1*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+a*h*n*b^-1*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+a*h*n*b^-1*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+d*h*n*e^-1*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+d*h*n*e^-1*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(b*d+-1*a*e)*(1+-1*a*c+-1*b*c*x))+-1*a*h*n*b^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1*a*h*n*b^-1*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+-1*a*h*b^-1*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*Polylogarithms.polylog(2,c*(a+b*x))+-1*d*h*n*e^-1*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+-1*d*h*n*e^-1*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))+-1*d*h*n*e^-1*Polylogarithms.polylog(3,1+-1*a*c+-1*b*c*x)+-1*g*b^-1*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+a*h*n*b^-1*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+d*h*n*e^-1*(-1*log(b*(b*d+-1*a*e)^-1*(1+-1*a*c+-1*b*c*x)^-1*(d+e*x))+log(-1d+-1*e*x))*Polylogarithms.polylog(2,1+-1*a*c+-1*b*c*x)+d*h*n*e^-1*(log(b*(b*d+-1*a*e)^-1*(1+-1*a*c+-1*b*c*x)^-1*(d+e*x))+log(1+-1*a*c+-1*b*c*x))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+d*h*n*e^-1*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(b*d+-1*a*e)*(1+-1*a*c+-1*b*c*x))*log(b*(b*d+-1*a*e)^-1*(1+-1*a*c+-1*b*c*x)^-1*(d+e*x))+d*h*n*e^-1*Polylogarithms.polylog(2,a*c+b*c*x)*log(-1d+-1*e*x)+d*h*n*e^-1*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+(1/2)*a*h*n*b^-1*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+(1/2)*d*h*n*e^-1*log(b*(b*d+-1*a*e)^-1*(1+-1*a*c+-1*b*c*x)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+-1*a*h*n*b^-1*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+-1*a*h*n*b^-1*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+-1*a*h*n*b^-1*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1*d*h*n*e^-1*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))*log(b*(b*d+-1*a*e)^-1*(1+-1*a*c+-1*b*c*x)^-1*(d+e*x))+-1*h*n*b^-1*c^-1*(1+-1*a*c)*Polylogarithms.polylog(2,b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))+-1*h*b^-1*c^-1*(1+-1*a*c)*log(f*(d+e*x)^n)*log(e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+2*h*n*b^-1*c^-1*(1+-1*a*c+-1*b*c*x)*log(1+-1*a*c+-1*b*c*x)+-1//2*a*h*n*b^-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+-1//2*d*h*n*e^-1*(log(b*(b*d+-1*a*e)^-1*(1+-1*a*c+-1*b*c*x)^-1*(d+e*x))+log(1+-1*a*c+-1*b*c*x))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+d*h*n*e^-1*log(c*(a+b*x))*log(-1d+-1*e*x)*log(1+-1*a*c+-1*b*c*x)+-1*a*h*n*b^-1*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x))
@test integrate(x^-2*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1*x^-1*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x))+-1*b*g*a^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1*b*g*a^-1*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+b*h*n*a^-1*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+b*h*n*a^-1*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))+b*h*n*a^-1*Polylogarithms.polylog(3,1+e*x*d^-1)+b*h*n*a^-1*Polylogarithms.polylog(3,1+-1*b*c*x*(1+-1*a*c)^-1)+b*h*a^-1*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*Polylogarithms.polylog(2,c*(a+b*x))+b*h*a^-1*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+e*h*n*d^-1*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+e*h*n*d^-1*Polylogarithms.polylog(3,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)+e*h*n*d^-1*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+-1*b*g*a^-1*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+-1*b*h*n*a^-1*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+-1*b*h*n*a^-1*Polylogarithms.polylog(3,d*(1+-1*a*c)^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))+-1*b*h*n*a^-1*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+-1*b*h*n*a^-1*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+-1*e*h*n*d^-1*Polylogarithms.polylog(3,-1*b*x*a^-1)+-1*e*h*n*d^-1*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+-1*e*h*n*d^-1*Polylogarithms.polylog(3,-1*b*c*x*(1+-1*c*(a+b*x))^-1)+b*h*n*a^-1*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+b*h*n*a^-1*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+b*h*n*a^-1*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+b*h*n*a^-1*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+b*h*a^-1*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+e*h*n*d^-1*(-1*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,-1*b*x*a^-1)+e*h*n*d^-1*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+e*h*n*d^-1*Polylogarithms.polylog(2,c*(a+b*x))*log(x)+e*h*n*d^-1*Polylogarithms.polylog(2,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+e*h*n*d^-1*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+(1/2)*b*h*n*a^-1*(log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+log(1+-1*a*c+-1*b*c*x))^2*(-1*log(-1*e*x*d^-1)+log(b*c*x*(1+-1*a*c)^-1))+(1/2)*b*h*n*a^-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+(1/2)*e*h*n*d^-1*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))^2*(-1*log(1+b*x*a^-1)+log(c*(a+b*x)))+(1/2)*e*h*n*d^-1*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+(1/2)*e*h*n*d^-1*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))^2*(-1*log(a^-1*(1+-1*c*(a+b*x))^-1*(1+-1*a*c)*(a+b*x))+log((1+-1*c*(a+b*x))^-1*(1+-1*a*c))+log(1+b*x*a^-1))+-1*b*h*n*a^-1*(-1*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+-1*b*h*n*a^-1*(log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+log(1+-1*a*c+-1*b*c*x))*Polylogarithms.polylog(2,1+e*x*d^-1)+-1*b*h*n*a^-1*Polylogarithms.polylog(2,d*(1+-1*a*c)^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+-1*b*h*n*a^-1*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1*e*h*n*d^-1*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+-1*e*h*n*d^-1*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+-1*e*h*n*d^-1*Polylogarithms.polylog(2,c*(a+b*x))*log(d+e*x)+-1*e*h*n*d^-1*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1*e*h*n*d^-1*Polylogarithms.polylog(2,-1*b*c*x*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+-1//2*b*h*n*a^-1*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+-1//2*b*h*n*a^-1*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))^2*(-1*log(x*(1+-1*a*c)^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e))+log(b*c*x*(1+-1*a*c)^-1)+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+-1//2*e*h*n*d^-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+b*h*n*a^-1*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x)+e*h*n*d^-1*log(x)*log(1+-1*c*(a+b*x))*log(1+b*x*a^-1)+-1*b*h*n*a^-1*log(b*c*x*(1+-1*a*c)^-1)*log(d+e*x)*log(1+-1*a*c+-1*b*c*x)+-1*e*h*n*d^-1*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x))
@test integrate(x^-3*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//2*x^-2*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x))+(1/2)*g*a^-2*b^2*Polylogarithms.polylog(2,c*(a+b*x))+(1/2)*g*a^-2*b^2*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+(1/2)*b*a^-1*x^-1*(g+h*log(f*(d+e*x)^n))*log(1+-1*a*c+-1*b*c*x)+(1/2)*g*a^-2*b^2*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+(1/2)*h*n*a^-2*b^2*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+(1/2)*h*n*a^-2*b^2*Polylogarithms.polylog(3,d*(1+-1*a*c)^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))+(1/2)*h*n*a^-2*b^2*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+(1/2)*h*n*a^-2*b^2*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+(1/2)*h*n*d^-2*e^2*Polylogarithms.polylog(3,-1*b*x*a^-1)+(1/2)*h*n*d^-2*e^2*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+(1/2)*h*n*d^-2*e^2*Polylogarithms.polylog(3,-1*b*c*x*(1+-1*c*(a+b*x))^-1)+-1//2*h*n*a^-2*b^2*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+-1//2*h*n*a^-2*b^2*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))+-1//2*h*n*a^-2*b^2*Polylogarithms.polylog(3,1+e*x*d^-1)+-1//2*h*n*a^-2*b^2*Polylogarithms.polylog(3,1+-1*b*c*x*(1+-1*a*c)^-1)+-1//2*h*n*d^-2*e^2*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+-1//2*h*n*d^-2*e^2*Polylogarithms.polylog(3,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)+-1//2*h*n*d^-2*e^2*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+-1//2*h*a^-2*b^2*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*Polylogarithms.polylog(2,c*(a+b*x))+-1//2*h*a^-2*b^2*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+(1/2)*c*a^-1*b^2*(1+-1*a*c)^-1*(g+h*log(f*(d+e*x)^n))*log(-1*e*x*d^-1)+(1/2)*h*n*a^-2*b^2*(-1*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+(1/2)*h*n*a^-2*b^2*(log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+log(1+-1*a*c+-1*b*c*x))*Polylogarithms.polylog(2,1+e*x*d^-1)+(1/2)*h*n*a^-2*b^2*Polylogarithms.polylog(2,d*(1+-1*a*c)^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+(1/2)*h*n*a^-2*b^2*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+(1/2)*h*n*d^-2*e^2*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+(1/2)*h*n*d^-2*e^2*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+(1/2)*h*n*d^-2*e^2*Polylogarithms.polylog(2,c*(a+b*x))*log(d+e*x)+(1/2)*h*n*d^-2*e^2*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+(1/2)*h*n*d^-2*e^2*Polylogarithms.polylog(2,-1*b*c*x*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+-1//2*c*a^-1*b^2*(1+-1*a*c)^-1*(g+h*log(f*(d+e*x)^n))*log(e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+-1//2*e*h*n*d^-1*x^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1//2*h*n*a^-2*b^2*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+-1//2*h*n*a^-2*b^2*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+-1//2*h*n*a^-2*b^2*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//2*h*n*a^-2*b^2*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+-1//2*h*n*d^-2*e^2*(-1*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,-1*b*x*a^-1)+-1//2*h*n*d^-2*e^2*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+-1//2*h*n*d^-2*e^2*Polylogarithms.polylog(2,c*(a+b*x))*log(x)+-1//2*h*n*d^-2*e^2*Polylogarithms.polylog(2,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+-1//2*h*n*d^-2*e^2*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//2*h*a^-2*b^2*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+-1//4*h*n*a^-2*b^2*(log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+log(1+-1*a*c+-1*b*c*x))^2*(-1*log(-1*e*x*d^-1)+log(b*c*x*(1+-1*a*c)^-1))+-1//4*h*n*a^-2*b^2*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+-1//4*h*n*d^-2*e^2*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))^2*(-1*log(1+b*x*a^-1)+log(c*(a+b*x)))+-1//4*h*n*d^-2*e^2*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+-1//4*h*n*d^-2*e^2*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))^2*(-1*log(a^-1*(1+-1*c*(a+b*x))^-1*(1+-1*a*c)*(a+b*x))+log((1+-1*c*(a+b*x))^-1*(1+-1*a*c))+log(1+b*x*a^-1))+1//4*h*n*a^-2*b^2*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+1//4*h*n*a^-2*b^2*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))^2*(-1*log(x*(1+-1*a*c)^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e))+log(b*c*x*(1+-1*a*c)^-1)+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+1//4*h*n*d^-2*e^2*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+(1/2)*b*e*h*n*a^-1*d^-1*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+(1/2)*c*h*n*a^-1*b^2*(1+-1*a*c)^-1*Polylogarithms.polylog(2,1+e*x*d^-1)+(1/2)*h*n*a^-2*b^2*log(b*c*x*(1+-1*a*c)^-1)*log(d+e*x)*log(1+-1*a*c+-1*b*c*x)+(1/2)*h*n*d^-2*e^2*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x)+-1*b*e*h*n*a^-1*d^-1*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+-1//2*b*e*h*n*a^-1*d^-1*Polylogarithms.polylog(2,c*(a+b*x))+-1//2*c*h*n*a^-1*b^2*(1+-1*a*c)^-1*Polylogarithms.polylog(2,b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))+-1//2*h*n*a^-2*b^2*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x)+-1//2*h*n*d^-2*e^2*log(x)*log(1+-1*c*(a+b*x))*log(1+b*x*a^-1)+(1/2)*b*e*h*n*a^-1*d^-1*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+-1*b*e*h*n*a^-1*d^-1*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x))
@test integrate(x^-4*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x)), x) == :(-1//3*x^-3*(g+h*log(f*(d+e*x)^n))*Polylogarithms.polylog(2,c*(a+b*x))+-1//3*g*a^-3*b^3*Polylogarithms.polylog(2,c*(a+b*x))+-1//3*g*a^-3*b^3*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+-1//3*g*a^-3*b^3*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+-1//3*h*n*a^-3*b^3*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+-1//3*h*n*a^-3*b^3*Polylogarithms.polylog(3,d*(1+-1*a*c)^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))+-1//3*h*n*a^-3*b^3*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+-1//3*h*n*a^-3*b^3*Polylogarithms.polylog(3,1+-1*c*(a+b*x))+-1//3*h*n*d^-3*e^3*Polylogarithms.polylog(3,-1*b*x*a^-1)+-1//3*h*n*d^-3*e^3*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+-1//3*h*n*d^-3*e^3*Polylogarithms.polylog(3,-1*b*c*x*(1+-1*c*(a+b*x))^-1)+-1//3*a^-2*b^2*x^-1*(g+h*log(f*(d+e*x)^n))*log(1+-1*a*c+-1*b*c*x)+1//3*h*n*a^-3*b^3*Polylogarithms.polylog(3,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))+1//3*h*n*a^-3*b^3*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))+1//3*h*n*a^-3*b^3*Polylogarithms.polylog(3,1+e*x*d^-1)+1//3*h*n*a^-3*b^3*Polylogarithms.polylog(3,1+-1*b*c*x*(1+-1*a*c)^-1)+1//3*h*n*d^-3*e^3*Polylogarithms.polylog(3,b*(b*d+-1*a*e)^-1*(d+e*x))+1//3*h*n*d^-3*e^3*Polylogarithms.polylog(3,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)+1//3*h*n*d^-3*e^3*Polylogarithms.polylog(3,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))+1//3*h*a^-3*b^3*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*Polylogarithms.polylog(2,c*(a+b*x))+1//3*h*a^-3*b^3*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+1//6*b*a^-1*x^-2*(g+h*log(f*(d+e*x)^n))*log(1+-1*a*c+-1*b*c*x)+-1//3*c*a^-2*b^3*(1+-1*a*c)^-1*(g+h*log(f*(d+e*x)^n))*log(-1*e*x*d^-1)+-1//3*h*n*a^-3*b^3*(-1*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+-1//3*h*n*a^-3*b^3*(log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+log(1+-1*a*c+-1*b*c*x))*Polylogarithms.polylog(2,1+e*x*d^-1)+-1//3*h*n*a^-3*b^3*Polylogarithms.polylog(2,d*(1+-1*a*c)^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+-1//3*h*n*a^-3*b^3*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//3*h*n*d^-3*e^3*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+-1//3*h*n*d^-3*e^3*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+-1//3*h*n*d^-3*e^3*Polylogarithms.polylog(2,c*(a+b*x))*log(d+e*x)+-1//3*h*n*d^-3*e^3*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+-1//3*h*n*d^-3*e^3*Polylogarithms.polylog(2,-1*b*c*x*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+-1//6*c*a^-1*b^2*x^-1*(1+-1*a*c)^-1*(g+h*log(f*(d+e*x)^n))+-1//6*e*h*n*d^-1*x^-2*Polylogarithms.polylog(2,c*(a+b*x))+-1//6*h*n*a^-3*b^3*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+-1//6*h*n*a^-3*b^3*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))^2*(-1*log(x*(1+-1*a*c)^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e))+log(b*c*x*(1+-1*a*c)^-1)+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+-1//6*h*n*d^-3*e^3*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+-1//6*a^-1*b^3*c^2*(1+-1*a*c)^-2*(g+h*log(f*(d+e*x)^n))*log(e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+1//3*c*a^-2*b^3*(1+-1*a*c)^-1*(g+h*log(f*(d+e*x)^n))*log(e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+1//3*h*n*a^-3*b^3*(-1*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(d+e*x))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+1//3*h*n*a^-3*b^3*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,b*(b*d+-1*a*e)^-1*(d+e*x))+1//3*h*n*a^-3*b^3*Polylogarithms.polylog(2,b^-1*(d+e*x)^-1*(1+-1*c*(a+b*x))*(b*d+-1*a*e))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+1//3*h*n*a^-3*b^3*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*a*c+-1*b*c*x))*log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+1//3*h*n*d^-3*e^3*(-1*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+log(1+-1*c*(a+b*x)))*Polylogarithms.polylog(2,-1*b*x*a^-1)+1//3*h*n*d^-3*e^3*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))*Polylogarithms.polylog(2,1+-1*c*(a+b*x))+1//3*h*n*d^-3*e^3*Polylogarithms.polylog(2,c*(a+b*x))*log(x)+1//3*h*n*d^-3*e^3*Polylogarithms.polylog(2,-1*b*x*a^-1*(1+-1*c*(a+b*x))^-1)*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))+1//3*h*n*d^-3*e^3*Polylogarithms.polylog(2,-1*e*b^-1*c^-1*(d+e*x)^-1*(1+-1*c*(a+b*x)))*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+1//3*h*n*d^-2*e^2*x^-1*Polylogarithms.polylog(2,c*(a+b*x))+1//3*h*a^-3*b^3*(-1*log(f*(d+e*x)^n)+n*log(d+e*x))*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+1//6*h*n*a^-3*b^3*(log(d^-1*(1+-1*a*c+-1*b*c*x)^-1*(1+-1*a*c)*(d+e*x))+log(1+-1*a*c+-1*b*c*x))^2*(-1*log(-1*e*x*d^-1)+log(b*c*x*(1+-1*a*c)^-1))+1//6*h*n*a^-3*b^3*log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))^2*(-1*log(b^-1*(d+e*x)^-1*(a+b*x)*(e+b*c*d+-1*a*c*e))+log(c*(a+b*x))+log(b^-1*c^-1*(d+e*x)^-1*(e+b*c*d+-1*a*c*e)))+1//6*h*n*d^-3*e^3*(log(x)+log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x))))^2*(-1*log(1+b*x*a^-1)+log(c*(a+b*x)))+1//6*h*n*d^-3*e^3*(log(b*(1+-1*c*(a+b*x))^-1*(b*d+-1*a*e)^-1*(d+e*x))+log(1+-1*c*(a+b*x)))^2*(-1*log(-1*e*(b*d+-1*a*e)^-1*(a+b*x))+log(c*(a+b*x)))+1//6*h*n*d^-3*e^3*log(-1*a*b^-1*x^-1*(1+-1*c*(a+b*x)))^2*(-1*log(a^-1*(1+-1*c*(a+b*x))^-1*(1+-1*a*c)*(a+b*x))+log((1+-1*c*(a+b*x))^-1*(1+-1*a*c))+log(1+b*x*a^-1))+1//6*a^-1*b^3*c^2*(1+-1*a*c)^-2*(g+h*log(f*(d+e*x)^n))*log(-1*e*x*d^-1)+(1/2)*b*h*n*a^-1*d^-2*e^2*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+(1/2)*e*h*n*a^-2*b^2*d^-1*Polylogarithms.polylog(2,1+-1*b*c*x*(1+-1*a*c)^-1)+-1//3*c*h*n*a^-2*b^3*(1+-1*a*c)^-1*Polylogarithms.polylog(2,1+e*x*d^-1)+-1//3*e*h*n*a^-2*b^2*d^-1*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+-1//3*h*n*a^-3*b^3*log(b*c*x*(1+-1*a*c)^-1)*log(d+e*x)*log(1+-1*a*c+-1*b*c*x)+-1//3*h*n*d^-3*e^3*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x)+-1//6*b*h*n*a^-1*d^-2*e^2*Polylogarithms.polylog(2,e*(e+b*c*d+-1*a*c*e)^-1*(1+-1*a*c+-1*b*c*x))+-1//6*h*n*a^-1*b^3*c^2*(1+-1*a*c)^-2*Polylogarithms.polylog(2,b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))+1//3*b*h*n*a^-1*d^-2*e^2*Polylogarithms.polylog(2,c*(a+b*x))+1//3*c*h*n*a^-2*b^3*(1+-1*a*c)^-1*Polylogarithms.polylog(2,b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))+1//3*h*n*a^-3*b^3*log(c*(a+b*x))*log(1+-1*c*(a+b*x))*log(d+e*x)+1//3*h*n*d^-3*e^3*log(x)*log(1+-1*c*(a+b*x))*log(1+b*x*a^-1)+1//6*e*h*n*a^-2*b^2*d^-1*Polylogarithms.polylog(2,c*(a+b*x))+1//6*h*n*a^-1*b^3*c^2*(1+-1*a*c)^-2*Polylogarithms.polylog(2,1+e*x*d^-1)+(1/2)*b*h*n*a^-1*d^-2*e^2*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+(1/2)*e*h*n*a^-2*b^2*d^-1*log(b*c*x*(1+-1*a*c)^-1)*log(1+-1*a*c+-1*b*c*x)+-1//3*e*h*n*a^-2*b^2*d^-1*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+-1//6*b*h*n*a^-1*d^-2*e^2*log(b*c*(e+b*c*d+-1*a*c*e)^-1*(d+e*x))*log(1+-1*a*c+-1*b*c*x)+1//3*b*e*h*n*a^-1*d^-1*x^-1*log(1+-1*a*c+-1*b*c*x)+(1/2)*c*e*h*n*a^-1*b^2*d^-1*(1+-1*a*c)^-1*log(x)+-1//3*c*e*h*n*a^-1*b^2*d^-1*(1+-1*a*c)^-1*log(1+-1*a*c+-1*b*c*x)+-1//6*c*e*h*n*a^-1*b^2*d^-1*(1+-1*a*c)^-1*log(d+e*x))
@test integrate(x^2*(a+b*x)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(2//81*a*x^3+3//256*b*x^4+(1//3*a*x^3+1//4*b*x^4)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-3//64*b*x^4*log(1+-1*c*x)+-2//27*a*x^3*log(1+-1*c*x)+-1//9*a*c^-3*log(1+-1*c*x)^2+-1//16*b*c^-4*log(1+-1*c*x)^2+-1//16*b*x^4*Polylogarithms.polylog(2,c*x)+1//6*c^-4*(3b+4*a*c)*Polylogarithms.polylog(3,1+-1*c*x)+1//9*a*x^3*log(1+-1*c*x)^2+1//16*b*x^4*log(1+-1*c*x)^2+1//324*c^-1*x^3*(3b+4*a*c)+1//432*x*c^-3*(147b+196*a*c)+1//432*c^-4*(39b+52*a*c)*log(1+-1*c*x)+1//864*c^-2*x^2*(39b+52*a*c)+5//27*a*c^-3*log(1+-1*c*x)+5//54*a*c^-1*x^2+11//27*a*x*c^-2+17//576*b*c^-1*x^3+29//192*b*c^-4*log(1+-1*c*x)+29//384*b*c^-2*x^2+53//192*b*x*c^-3+-1//6*c^-4*(3b+4*a*c)*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+-1//9*a*c^-1*x^2*log(1+-1*c*x)+-1//12*x*c^-3*(3b+4*a*c)*Polylogarithms.polylog(2,c*x)+-1//12*c^-4*log(1+-1*c*x)^2*(3b+4*a*c)*log(c*x)+-1//12*c^-4*(3b+4*a*c)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//16*b*c^-2*x^2*log(1+-1*c*x)+-1//24*b*c^-1*x^3*log(1+-1*c*x)+-1//24*c^-2*x^2*(3b+4*a*c)*Polylogarithms.polylog(2,c*x)+-1//36*c^-1*x^3*(3b+4*a*c)*Polylogarithms.polylog(2,c*x)+-1//48*c^-2*x^2*(3b+4*a*c)*log(1+-1*c*x)+-1//108*c^-1*x^3*(3b+4*a*c)*log(1+-1*c*x)+1//8*b*c^-4*(1+-1*c*x)*log(1+-1*c*x)+1//12*c^-4*(1+-1*c*x)*(3b+4*a*c)*log(1+-1*c*x)+2//9*a*c^-3*(1+-1*c*x)*log(1+-1*c*x))
@test integrate(x*(a+b*x)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(1//27*b*x^3+a*x*c^-1+((1/2)*a*x^2+1//3*b*x^3)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//9*b*c^-3*log(1+-1*c*x)^2+-1//9*b*x^3*Polylogarithms.polylog(2,c*x)+-1//9*b*x^3*log(1+-1*c*x)+1//3*c^-3*(2b+3*a*c)*Polylogarithms.polylog(3,1+-1*c*x)+1//8*a*c^-2*(1+-1*c*x)^2+1//9*b*c^-1*x^2+1//9*b*x^3*log(1+-1*c*x)^2+1//24*x*c^-2*(10b+15*a*c)+1//24*c^-3*(2b+3*a*c)*log(1+-1*c*x)+1//48*c^-1*x^2*(2b+3*a*c)+2//9*b*c^-3*log(1+-1*c*x)+4//9*b*x*c^-2+a*c^-2*(1+-1*c*x)*log(1+-1*c*x)+-1//2*a*c^-2*log(1+-1*c*x)^2*(1+-1*c*x)+-1//3*c^-3*(2b+3*a*c)*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+-1//4*a*c^-2*(1+-1*c*x)^2*log(1+-1*c*x)+-1//6*x*c^-2*(2b+3*a*c)*Polylogarithms.polylog(2,c*x)+-1//6*c^-3*log(1+-1*c*x)^2*(2b+3*a*c)*log(c*x)+-1//6*c^-3*(2b+3*a*c)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//9*b*c^-1*x^2*log(1+-1*c*x)+-1//12*c^-1*x^2*(2b+3*a*c)*Polylogarithms.polylog(2,c*x)+-1//24*c^-1*x^2*(2b+3*a*c)*log(1+-1*c*x)+1//4*a*c^-2*(1+-1*c*x)^2*log(1+-1*c*x)^2+1//6*c^-3*(1+-1*c*x)*(2b+3*a*c)*log(1+-1*c*x)+2//9*b*c^-3*(1+-1*c*x)*log(1+-1*c*x))
@test integrate((a+b*x)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(2*a*x+1//16*b*x^2+c^-2*(b+2*a*c)*Polylogarithms.polylog(3,1+-1*c*x)+(a*x+(1/2)*b*x^2)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+(1/2)*x*c^-1*(b+2*a*c)+-1//4*b*x^2*Polylogarithms.polylog(2,c*x)+-1//8*b*x^2*log(1+-1*c*x)+1//8*b*c^-2*(1+-1*c*x)^2+1//8*b*c^-2*log(1+-1*c*x)+9//8*b*x*c^-1+b*c^-2*(1+-1*c*x)*log(1+-1*c*x)+(1/2)*c^-2*(1+-1*c*x)*(b+2*a*c)*log(1+-1*c*x)+-1*a*c^-1*log(1+-1*c*x)^2*(1+-1*c*x)+-1*c^-2*(b+2*a*c)*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+2*a*c^-1*(1+-1*c*x)*log(1+-1*c*x)+-1//2*b*c^-2*log(1+-1*c*x)^2*(1+-1*c*x)+-1//2*x*c^-1*(b+2*a*c)*Polylogarithms.polylog(2,c*x)+-1//2*c^-2*log(1+-1*c*x)^2*(b+2*a*c)*log(c*x)+-1//2*c^-2*(b+2*a*c)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1//4*b*c^-2*(1+-1*c*x)^2*log(1+-1*c*x)+1//4*b*c^-2*(1+-1*c*x)^2*log(1+-1*c*x)^2)
@test integrate(x^-1*(a+b*x)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(3*b*x+-1//2*a*Polylogarithms.polylog(2,c*x)^2+-1*b*x*Polylogarithms.polylog(2,c*x)+2*b*c^-1*Polylogarithms.polylog(3,1+-1*c*x)+b*x*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1*b*c^-1*log(1+-1*c*x)^2*(1+-1*c*x)+-1*b*c^-1*log(1+-1*c*x)^2*log(c*x)+-1*b*c^-1*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-2*b*c^-1*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+3*b*c^-1*(1+-1*c*x)*log(1+-1*c*x))
@test integrate(x^-2*(a+b*x)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(-1//2*b*Polylogarithms.polylog(2,c*x)^2+-1*a*c*Polylogarithms.polylog(3,c*x)+-2*a*c*Polylogarithms.polylog(2,c*x)+-2*a*c*Polylogarithms.polylog(3,1+-1*c*x)+a*c*log(1+-1*c*x)^2*log(c*x)+a*c*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+a*x^-1*log(1+-1*c*x)^2*(1+-1*c*x)+-1*a*x^-1*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+2*a*c*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x))
@test integrate(x^-3*(a+b*x)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(a*c^2*log(1+-1*c*x)+a^-1*b^2*Polylogarithms.polylog(3,1+-1*c*x)+-1*a*c^2*log(x)+-1*a^-1*(b+a*c)^2*Polylogarithms.polylog(3,1+-1*c*x)+-2*b*c*Polylogarithms.polylog(2,c*x)+-1//2*a*c^2*Polylogarithms.polylog(2,c*x)+-1//2*c*(2b+a*c)*Polylogarithms.polylog(3,c*x)+-1//4*a*c^2*log(1+-1*c*x)^2+1//4*a*x^-2*log(1+-1*c*x)^2+b*x^-1*log(1+-1*c*x)^2*(1+-1*c*x)+a^-1*(b+a*c)^2*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+(1/2)*a*c*x^-1*Polylogarithms.polylog(2,c*x)+(1/2)*a^-1*(b+a*c)^2*log(1+-1*c*x)^2*log(c*x)+(1/2)*a^-1*(b+a*c)^2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-1*a*c*x^-1*log(1+-1*c*x)+-1*a^-1*b^2*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+-1//2*a^-1*b^2*log(1+-1*c*x)^2*log(c*x)+-1//2*a^-1*x^-2*(a+b*x)^2*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x))
@test integrate(x^-4*(a+b*x)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :((1/2)*b*c^2*log(1+-1*c*x)+-1*((1/2)*b*x^-2+1//3*a*x^-3)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-5//12*a*c^3*log(x)+-2//9*a*c^3*Polylogarithms.polylog(2,c*x)+-1//2*b*c^2*Polylogarithms.polylog(2,c*x)+-1//2*b*c^2*log(x)+-1//3*c^2*(3b+2*a*c)*Polylogarithms.polylog(3,1+-1*c*x)+-1//4*b*c^2*log(1+-1*c*x)^2+-1//6*c^2*(3b+2*a*c)*Polylogarithms.polylog(3,c*x)+-1//6*c^2*(3b+2*a*c)*log(x)+-1//9*a*c^3*log(1+-1*c*x)^2+1//4*b*x^-2*log(1+-1*c*x)^2+1//6*c^2*(3b+2*a*c)*log(1+-1*c*x)+1//9*a*x^-3*log(1+-1*c*x)^2+5//12*a*c^3*log(1+-1*c*x)+7//36*a*c^2*x^-1+-7//36*a*c*x^-2*log(1+-1*c*x)+-2//9*a*c^2*x^-1*log(1+-1*c*x)+-1//2*b*c*x^-1*log(1+-1*c*x)+-1//6*c*x^-1*(3b+2*a*c)*log(1+-1*c*x)+1//3*c^2*(3b+2*a*c)*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+1//6*a*c*x^-2*Polylogarithms.polylog(2,c*x)+1//6*c*x^-1*(3b+2*a*c)*Polylogarithms.polylog(2,c*x)+1//6*c^2*log(1+-1*c*x)^2*(3b+2*a*c)*log(c*x)+1//6*c^2*(3b+2*a*c)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x))
@test integrate(x^-5*(a+b*x)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x), x) == :(-1*(1//3*b*x^-3+1//4*a*x^-4)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+-37//144*a*c^4*log(x)+-5//48*c^3*(4b+3*a*c)*log(x)+-2//9*b*c^3*Polylogarithms.polylog(2,c*x)+-1//3*b*c^3*log(x)+-1//6*c^3*(4b+3*a*c)*Polylogarithms.polylog(3,1+-1*c*x)+-1//8*a*c^4*Polylogarithms.polylog(2,c*x)+-1//9*b*c^3*log(1+-1*c*x)^2+-1//12*c^3*(4b+3*a*c)*Polylogarithms.polylog(3,c*x)+-1//16*a*c^4*log(1+-1*c*x)^2+1//3*b*c^3*log(1+-1*c*x)+1//9*b*c^2*x^-1+1//9*b*x^-3*log(1+-1*c*x)^2+1//16*a*x^-4*log(1+-1*c*x)^2+1//48*c^2*x^-1*(4b+3*a*c)+5//48*c^3*(4b+3*a*c)*log(1+-1*c*x)+5//144*a*c^2*x^-2+19//144*a*c^3*x^-1+37//144*a*c^4*log(1+-1*c*x)+-5//72*a*c*x^-3*log(1+-1*c*x)+-2//9*b*c^2*x^-1*log(1+-1*c*x)+-1//8*a*c^3*x^-1*log(1+-1*c*x)+-1//9*b*c*x^-2*log(1+-1*c*x)+-1//12*c^2*x^-1*(4b+3*a*c)*log(1+-1*c*x)+-1//16*a*c^2*x^-2*log(1+-1*c*x)+-1//48*c*x^-2*(4b+3*a*c)*log(1+-1*c*x)+1//6*c^3*(4b+3*a*c)*Polylogarithms.polylog(2,1+-1*c*x)*log(1+-1*c*x)+1//12*a*c*x^-3*Polylogarithms.polylog(2,c*x)+1//12*c^2*x^-1*(4b+3*a*c)*Polylogarithms.polylog(2,c*x)+1//12*c^3*log(1+-1*c*x)^2*(4b+3*a*c)*log(c*x)+1//12*c^3*(4b+3*a*c)*Polylogarithms.polylog(2,c*x)*log(1+-1*c*x)+1//24*c*x^-2*(4b+3*a*c)*Polylogarithms.polylog(2,c*x))
@test integrate(x*(a+b*x+c*x^2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x), x) == :(2//81*b*x^3+3//256*c*x^4+a*x*d^-1+((1/2)*a*x^2+1//3*b*x^3+1//4*c*x^4)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+-3//64*c*x^4*log(1+-1*d*x)+-2//27*b*x^3*log(1+-1*d*x)+-1//9*b*d^-3*log(1+-1*d*x)^2+-1//16*c*d^-4*log(1+-1*d*x)^2+-1//16*c*x^4*Polylogarithms.polylog(2,d*x)+1//6*d^-4*(3c+4*b*d+6*a*d^2)*Polylogarithms.polylog(3,1+-1*d*x)+1//8*a*d^-2*(1+-1*d*x)^2+1//9*b*x^3*log(1+-1*d*x)^2+1//16*c*x^4*log(1+-1*d*x)^2+1//48*x*d^-3*(15c+20*b*d+30*a*d^2)+1//48*d^-4*(3c+4*b*d+6*a*d^2)*log(1+-1*d*x)+1//96*d^-2*x^2*(3c+4*b*d+6*a*d^2)+1//108*x*d^-3*(3c+4*b*d)+1//108*d^-4*(3c+4*b*d)*log(1+-1*d*x)+1//216*d^-2*x^2*(3c+4*b*d)+1//324*d^-1*x^3*(3c+4*b*d)+5//27*b*d^-3*log(1+-1*d*x)+5//54*b*d^-1*x^2+11//27*b*x*d^-2+17//576*c*d^-1*x^3+29//192*c*d^-4*log(1+-1*d*x)+29//384*c*d^-2*x^2+53//192*c*x*d^-3+a*d^-2*(1+-1*d*x)*log(1+-1*d*x)+-1//2*a*d^-2*log(1+-1*d*x)^2*(1+-1*d*x)+-1//4*a*d^-2*(1+-1*d*x)^2*log(1+-1*d*x)+-1//6*d^-4*(3c+4*b*d+6*a*d^2)*Polylogarithms.polylog(2,1+-1*d*x)*log(1+-1*d*x)+-1//9*b*d^-1*x^2*log(1+-1*d*x)+-1//12*x*d^-3*(3c+4*b*d+6*a*d^2)*Polylogarithms.polylog(2,d*x)+-1//12*d^-4*log(1+-1*d*x)^2*(3c+4*b*d+6*a*d^2)*log(d*x)+-1//12*d^-4*(3c+4*b*d+6*a*d^2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+-1//16*c*d^-2*x^2*log(1+-1*d*x)+-1//24*c*d^-1*x^3*log(1+-1*d*x)+-1//24*d^-2*x^2*(3c+4*b*d+6*a*d^2)*Polylogarithms.polylog(2,d*x)+-1//36*d^-1*x^3*(3c+4*b*d)*Polylogarithms.polylog(2,d*x)+-1//48*d^-2*x^2*(3c+4*b*d+6*a*d^2)*log(1+-1*d*x)+-1//108*d^-1*x^3*(3c+4*b*d)*log(1+-1*d*x)+1//4*a*d^-2*(1+-1*d*x)^2*log(1+-1*d*x)^2+1//8*c*d^-4*(1+-1*d*x)*log(1+-1*d*x)+1//12*d^-4*(1+-1*d*x)*(3c+4*b*d+6*a*d^2)*log(1+-1*d*x)+2//9*b*d^-3*(1+-1*d*x)*log(1+-1*d*x))
@test integrate((a+b*x+c*x^2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x), x) == :(2*a*x+1//27*c*x^3+b*x*d^-1+(a*x+(1/2)*b*x^2+1//3*c*x^3)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+-1//9*c*d^-3*log(1+-1*d*x)^2+-1//9*c*x^3*Polylogarithms.polylog(2,d*x)+-1//9*c*x^3*log(1+-1*d*x)+1//3*d^-3*(2c+3*d*(b+2*a*d))*Polylogarithms.polylog(3,1+-1*d*x)+1//6*x*d^-2*(2c+3*d*(b+2*a*d))+1//8*b*d^-2*(1+-1*d*x)^2+1//9*c*d^-1*x^2+1//9*c*x^3*log(1+-1*d*x)^2+1//24*x*d^-2*(2c+3*b*d)+1//24*d^-3*(2c+3*b*d)*log(1+-1*d*x)+1//48*d^-1*x^2*(2c+3*b*d)+2//9*c*d^-3*log(1+-1*d*x)+4//9*c*x*d^-2+b*d^-2*(1+-1*d*x)*log(1+-1*d*x)+-1*a*d^-1*log(1+-1*d*x)^2*(1+-1*d*x)+2*a*d^-1*(1+-1*d*x)*log(1+-1*d*x)+-1//2*b*d^-2*log(1+-1*d*x)^2*(1+-1*d*x)+-1//3*d^-3*(2c+3*d*(b+2*a*d))*Polylogarithms.polylog(2,1+-1*d*x)*log(1+-1*d*x)+-1//4*b*d^-2*(1+-1*d*x)^2*log(1+-1*d*x)+-1//6*x*d^-2*(2c+3*d*(b+2*a*d))*Polylogarithms.polylog(2,d*x)+-1//6*d^-3*log(1+-1*d*x)^2*(2c+3*d*(b+2*a*d))*log(d*x)+-1//6*d^-3*(2c+3*d*(b+2*a*d))*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+-1//9*c*d^-1*x^2*log(1+-1*d*x)+-1//12*d^-1*x^2*(2c+3*b*d)*Polylogarithms.polylog(2,d*x)+-1//24*d^-1*x^2*(2c+3*b*d)*log(1+-1*d*x)+1//4*b*d^-2*(1+-1*d*x)^2*log(1+-1*d*x)^2+1//6*d^-3*(1+-1*d*x)*(2c+3*d*(b+2*a*d))*log(1+-1*d*x)+2//9*c*d^-3*(1+-1*d*x)*log(1+-1*d*x))
@test integrate(x^-1*(a+b*x+c*x^2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x), x) == :(2*b*x+-1//2*a*Polylogarithms.polylog(2,d*x)^2+1//16*c*x^2+d^-2*(c+2*b*d)*Polylogarithms.polylog(3,1+-1*d*x)+(b*x+(1/2)*c*x^2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+(1/2)*x*d^-1*(c+2*b*d)+-1//4*c*x^2*Polylogarithms.polylog(2,d*x)+-1//8*c*x^2*log(1+-1*d*x)+1//8*c*d^-2*(1+-1*d*x)^2+1//8*c*d^-2*log(1+-1*d*x)+9//8*c*x*d^-1+c*d^-2*(1+-1*d*x)*log(1+-1*d*x)+(1/2)*d^-2*(1+-1*d*x)*(c+2*b*d)*log(1+-1*d*x)+-1*b*d^-1*log(1+-1*d*x)^2*(1+-1*d*x)+-1*d^-2*(c+2*b*d)*Polylogarithms.polylog(2,1+-1*d*x)*log(1+-1*d*x)+2*b*d^-1*(1+-1*d*x)*log(1+-1*d*x)+-1//2*c*d^-2*log(1+-1*d*x)^2*(1+-1*d*x)+-1//2*x*d^-1*(c+2*b*d)*Polylogarithms.polylog(2,d*x)+-1//2*d^-2*log(1+-1*d*x)^2*(c+2*b*d)*log(d*x)+-1//2*d^-2*(c+2*b*d)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+-1//4*c*d^-2*(1+-1*d*x)^2*log(1+-1*d*x)+1//4*c*d^-2*(1+-1*d*x)^2*log(1+-1*d*x)^2)
@test integrate(x^-2*(a+b*x+c*x^2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x), x) == :(3*c*x+-1//2*b*Polylogarithms.polylog(2,d*x)^2+-1*a*d*Polylogarithms.polylog(3,d*x)+-1*c*x*Polylogarithms.polylog(2,d*x)+-1*d*(2a+-2*c*d^-2)*Polylogarithms.polylog(3,1+-1*d*x)+-1*(a*x^-1+-1*c*x)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+-2*a*d*Polylogarithms.polylog(2,d*x)+a*x^-1*log(1+-1*d*x)^2*(1+-1*d*x)+d*log(1+-1*d*x)^2*(a+-1*c*d^-2)*log(d*x)+d*(a+-1*c*d^-2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+d*(2a+-2*c*d^-2)*Polylogarithms.polylog(2,1+-1*d*x)*log(1+-1*d*x)+-1*c*d^-1*log(1+-1*d*x)^2*(1+-1*d*x)+3*c*d^-1*(1+-1*d*x)*log(1+-1*d*x))
@test integrate(x^-3*(a+b*x+c*x^2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x), x) == :(-1//2*c*Polylogarithms.polylog(2,d*x)^2+a*d^2*log(1+-1*d*x)+a^-1*b^2*Polylogarithms.polylog(3,1+-1*d*x)+-1*a*d^2*log(x)+-1*a^-1*(b+a*d)^2*Polylogarithms.polylog(3,1+-1*d*x)+-2*b*d*Polylogarithms.polylog(2,d*x)+-1//2*a*d^2*Polylogarithms.polylog(2,d*x)+-1//2*d*(2b+a*d)*Polylogarithms.polylog(3,d*x)+-1//4*a*d^2*log(1+-1*d*x)^2+1//4*a*x^-2*log(1+-1*d*x)^2+b*x^-1*log(1+-1*d*x)^2*(1+-1*d*x)+a^-1*(b+a*d)^2*Polylogarithms.polylog(2,1+-1*d*x)*log(1+-1*d*x)+(1/2)*a*d*x^-1*Polylogarithms.polylog(2,d*x)+(1/2)*a^-1*(b+a*d)^2*log(1+-1*d*x)^2*log(d*x)+(1/2)*a^-1*(b+a*d)^2*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+-1*a*d*x^-1*log(1+-1*d*x)+-1*a^-1*b^2*Polylogarithms.polylog(2,1+-1*d*x)*log(1+-1*d*x)+-1//2*a^-1*b^2*log(1+-1*d*x)^2*log(d*x)+-1//2*a^-1*x^-2*(a+b*x)^2*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x))
@test integrate(x^-4*(a+b*x+c*x^2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x), x) == :((1/2)*b*d^2*log(1+-1*d*x)+-1*(c*x^-1+(1/2)*b*x^-2+1//3*a*x^-3)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+-2*c*d*Polylogarithms.polylog(2,d*x)+-5//12*a*d^3*log(x)+-2//9*a*d^3*Polylogarithms.polylog(2,d*x)+-1//2*b*d^2*Polylogarithms.polylog(2,d*x)+-1//2*b*d^2*log(x)+-1//3*d*(6c+d*(3b+2*a*d))*Polylogarithms.polylog(3,1+-1*d*x)+-1//4*b*d^2*log(1+-1*d*x)^2+-1//6*d*(6c+d*(3b+2*a*d))*Polylogarithms.polylog(3,d*x)+-1//6*d^2*(3b+2*a*d)*log(x)+-1//9*a*d^3*log(1+-1*d*x)^2+1//4*b*x^-2*log(1+-1*d*x)^2+1//6*d^2*(3b+2*a*d)*log(1+-1*d*x)+1//9*a*x^-3*log(1+-1*d*x)^2+5//12*a*d^3*log(1+-1*d*x)+7//36*a*d^2*x^-1+c*x^-1*log(1+-1*d*x)^2*(1+-1*d*x)+-7//36*a*d*x^-2*log(1+-1*d*x)+-2//9*a*d^2*x^-1*log(1+-1*d*x)+-1//2*b*d*x^-1*log(1+-1*d*x)+-1//6*d*x^-1*(3b+2*a*d)*log(1+-1*d*x)+1//3*d*(6c+d*(3b+2*a*d))*Polylogarithms.polylog(2,1+-1*d*x)*log(1+-1*d*x)+1//6*a*d*x^-2*Polylogarithms.polylog(2,d*x)+1//6*d*x^-1*(3b+2*a*d)*Polylogarithms.polylog(2,d*x)+1//6*d*log(1+-1*d*x)^2*(6c+d*(3b+2*a*d))*log(d*x)+1//6*d*(6c+d*(3b+2*a*d))*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x))
@test integrate(x^-5*(a+b*x+c*x^2)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x), x) == :((1/2)*c*d^2*log(1+-1*d*x)+-1*((1/2)*c*x^-2+1//3*b*x^-3+1//4*a*x^-4)*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+-37//144*a*d^4*log(x)+-2//9*b*d^3*Polylogarithms.polylog(2,d*x)+-1//2*c*d^2*Polylogarithms.polylog(2,d*x)+-1//2*c*d^2*log(x)+-1//3*b*d^3*log(x)+-1//4*c*d^2*log(1+-1*d*x)^2+-1//6*d^2*(6c+d*(4b+3*a*d))*Polylogarithms.polylog(3,1+-1*d*x)+-1//8*a*d^4*Polylogarithms.polylog(2,d*x)+-1//9*b*d^3*log(1+-1*d*x)^2+-1//12*d^2*(6c+d*(4b+3*a*d))*Polylogarithms.polylog(3,d*x)+-1//12*d^2*(6c+d*(4b+3*a*d))*log(x)+-1//16*a*d^4*log(1+-1*d*x)^2+-1//48*d^3*(4b+3*a*d)*log(x)+1//3*b*d^3*log(1+-1*d*x)+1//4*c*x^-2*log(1+-1*d*x)^2+1//9*b*d^2*x^-1+1//9*b*x^-3*log(1+-1*d*x)^2+1//12*d^2*(6c+d*(4b+3*a*d))*log(1+-1*d*x)+1//16*a*x^-4*log(1+-1*d*x)^2+1//48*d^2*x^-1*(4b+3*a*d)+1//48*d^3*(4b+3*a*d)*log(1+-1*d*x)+5//144*a*d^2*x^-2+19//144*a*d^3*x^-1+37//144*a*d^4*log(1+-1*d*x)+-5//72*a*d*x^-3*log(1+-1*d*x)+-2//9*b*d^2*x^-1*log(1+-1*d*x)+-1//2*c*d*x^-1*log(1+-1*d*x)+-1//8*a*d^3*x^-1*log(1+-1*d*x)+-1//9*b*d*x^-2*log(1+-1*d*x)+-1//12*d*x^-1*(6c+d*(4b+3*a*d))*log(1+-1*d*x)+-1//16*a*d^2*x^-2*log(1+-1*d*x)+-1//48*d*x^-2*(4b+3*a*d)*log(1+-1*d*x)+1//6*d^2*(6c+d*(4b+3*a*d))*Polylogarithms.polylog(2,1+-1*d*x)*log(1+-1*d*x)+1//12*a*d*x^-3*Polylogarithms.polylog(2,d*x)+1//12*d*x^-1*(6c+d*(4b+3*a*d))*Polylogarithms.polylog(2,d*x)+1//12*d^2*log(1+-1*d*x)^2*(6c+d*(4b+3*a*d))*log(d*x)+1//12*d^2*(6c+d*(4b+3*a*d))*Polylogarithms.polylog(2,d*x)*log(1+-1*d*x)+1//24*d*x^-2*(4b+3*a*d)*Polylogarithms.polylog(2,d*x))

max_stars_repo_path: test/8 Special functions/8.8 Polylogarithm function.jl


text:
envpath = joinpath(ENV["HOME"], ".julia/environments")
using Pkg
pkg"activate"

if ispath(envpath) == false
   mkpath(envpath)
   cp("/opt/julia/environments", envpath, force = true)
   println("seeded")
end

ext: jl

max_stars_repo_name: ubcecon/vse-jupyterhub

max_issues_repo_name: ubcecon/vse-jupyterhub

max_forks_repo_name: ubcecon/vse-jupyterhub


text:
"""
Abstract setup recipe.
"""
abstract type AbstractSetup{T} end

"""
Setup recipe for a set of stacked plates.
"""
Base.@kwdef struct PlateSetup{T} <: AbstractSetup{T}
    name::String
    meshdir = "meshfiles"
    width::T
    depth::T
    heights::Vector{T}
    bend::T = 0
    twist::T = 0
    refinement::T = Inf
end

"""
Setup recipe for a set of cylinders immersed in a ECS.
"""
Base.@kwdef struct CylinderSetup{T} <: AbstractSetup{T}
    name::String
    meshdir = "meshfiles"
    ncell::Int
    rmin::T
    rmax::T
    dmin::T
    dmax::T
    height::T
    bend::T = 0
    twist::T = 0
    include_in::Bool = false
    in_ratio::T = 0.5
    ecs_shape::Symbol = :no_ecs
    ecs_ratio::T = 0.5
    refinement::T = Inf
end

"""
Setup recipe for a set of spheres immersed in a ECS.
"""
Base.@kwdef struct SphereSetup{T} <: AbstractSetup{T}
    name::String
    meshdir = "meshfiles"
    ncell::Int
    rmin::T
    rmax::T
    dmin::T
    dmax::T
    include_in::Bool = false
    in_ratio::T = 0.5
    ecs_shape::Symbol = :no_ecs
    ecs_ratio::T = 0.5
    refinement::T = Inf
end

"""
Setup recipe for a neuron, possibly wrapped in a ECS.
"""
Base.@kwdef struct NeuronSetup{T} <: AbstractSetup{T}
    name::String
    meshdir = "meshfiles"
    ecs_shape::Symbol = :no_ecs
    ecs_ratio::T = 0.5
    refinement::T = Inf
end


text:
using BigArrays
include("Indexes.jl")
include("BinDicts.jl")
#include("backends/S3Dicts.jl")
#include("backends/GSDicts.jl")


text:
## -------------  Saving figures

"""
    figsave(p, filePath)

Save a figure to a pdf file. `hdf5` figures also have their data saved to a separate file.

# Arguments
- io: If provided, display a short version of the file path there.
- `dataM`: If provided, write the data to a text file. A simple method of preserving underlying data.
"""
function figsave(p, filePath :: String;
    figNotes = nothing, io :: Union{Nothing, IO} = nothing,
    dataM = nothing)

    if !isempty(filePath)
        # If HDF5: save to file and reload with default backend
        # This does not work in Julia 1.3 (world age problems)
        # if isa(p, Plots.Plot{Plots.HDF5Backend})
        #     hdf5Path = make_hdf5_path(filePath);
        #     save_hdf5_plot(p, hdf5Path);
        #     # Make a rendered plot that can be saved to pdf
        #     gr();
        #     p = Plots.hdf5plot_read(hdf5Path);
        # end

		newPath = change_extension(filePath, ".pdf");
        fDir, fName = splitdir(newPath);
        if !isdir(fDir)
            mkpath(fDir);
        end
        savefig(p, newPath);
        # hdf5();
        if !isnothing(io)
            pathStr = fpath_to_show(filePath);
            println(io, "Saved figure:  $pathStr");
        end

        save_fig_notes(figNotes, filePath);
        save_fig_data(dataM, filePath);
	end
end

figsave(p, fDir :: String, fName :: String; figNotes = nothing) =
    figsave(p, joinpath(fDir, fName); figNotes = figNotes);

function fig_data_dir(fPath :: AbstractString)
    fDir, fName = splitdir(fPath);
    newDir = joinpath(fDir, "plot_data");
    isdir(newDir)  ||  mkpath(newDir);
    return newDir
end

function make_hdf5_path(fPath :: AbstractString)
    newDir = fig_data_dir(fPath);
    fDir, fName = splitdir(fPath);
    newPath = joinpath(newDir, change_extension(fName, ".hdf5"));
end

# Save a plot to an HDF5 file
function save_hdf5_plot(p, fPath :: AbstractString)
    fDir, _ = splitdir(fPath);
    isdir(fDir)  ||  mkpath(fDir);
    Plots.hdf5plot_write(p, fPath);
    return nothing
end

save_fig_notes(figNotes :: AbstractVector, fPath :: AbstractString) =
    save_text_file(fig_notes_path(fPath), figNotes);
save_fig_notes(figNotes :: AbstractString, fPath :: AbstractString) =
    save_fig_notes([figNotes], fPath);
function save_fig_notes(figNotes :: Nothing, fPath) end

function fig_notes_path(fPath :: AbstractString)
    newDir = fig_data_dir(fPath);
    fDir, fName = splitdir(fPath);
    newPath = joinpath(newDir, change_extension(fName, ".txt"));
    return newPath
end

function save_fig_data(dataM, filePath :: AbstractString)
    newPath = fig_data_path(filePath);
    make_dir(newPath);
    if !isnothing(dataM)
        open(newPath, "w") do io
            println(io, dataM);
        end
    end
end

function fig_data_path(fPath :: AbstractString)
    newDir = fig_data_dir(fPath);
    fDir, fName = splitdir(fPath);
    newPath = joinpath(newDir, change_extension("data_" * fName, ".txt"));
    return newPath
end

# --------------