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

@test integrate((c+d*x)^4*sin(a+b*x), x) == :(-1*b^-1*(c+d*x)^4*cos(a+b*x)+-24*b^-5*d^4*cos(a+b*x)+-24*b^-4*d^3*(c+d*x)*sin(a+b*x)+4*d*b^-2*(c+d*x)^3*sin(a+b*x)+12*b^-3*d^2*(c+d*x)^2*cos(a+b*x))
@test integrate((c+d*x)^3*sin(a+b*x), x) == :(-1*b^-1*(c+d*x)^3*cos(a+b*x)+-6*b^-4*d^3*sin(a+b*x)+3*d*b^-2*(c+d*x)^2*sin(a+b*x)+6*b^-3*d^2*(c+d*x)*cos(a+b*x))
@test integrate((c+d*x)^2*sin(a+b*x), x) == :(-1*b^-1*(c+d*x)^2*cos(a+b*x)+2*b^-3*d^2*cos(a+b*x)+2*d*b^-2*(c+d*x)*sin(a+b*x))
@test integrate((c+d*x)*sin(a+b*x), x) == :(d*b^-2*sin(a+b*x)+-1*b^-1*(c+d*x)*cos(a+b*x))
@test integrate((c+d*x)^-1*sin(a+b*x), x) == :(d^-1*cos(a+-1*b*c*d^-1)*sinintegral(b*x+b*c*d^-1)+d^-1*cosintegral(b*x+b*c*d^-1)*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^-2*sin(a+b*x), x) == :(-1*d^-1*(c+d*x)^-1*sin(a+b*x)+b*d^-2*cos(a+-1*b*c*d^-1)*cosintegral(b*x+b*c*d^-1)+-1*b*d^-2*sin(a+-1*b*c*d^-1)*sinintegral(b*x+b*c*d^-1))
@test integrate((c+d*x)^-3*sin(a+b*x), x) == :(-1//2*d^-1*(c+d*x)^-2*sin(a+b*x)+-1//2*b*d^-2*(c+d*x)^-1*cos(a+b*x)+-1//2*b^2*d^-3*cos(a+-1*b*c*d^-1)*sinintegral(b*x+b*c*d^-1)+-1//2*b^2*d^-3*cosintegral(b*x+b*c*d^-1)*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^4*sin(a+b*x)^2, x) == :(1//10*d^-1*(c+d*x)^5+-1//2*d*b^-2*(c+d*x)^3+3//4*x*b^-4*d^4+d*b^-2*(c+d*x)^3*sin(a+b*x)^2+-3//2*b^-4*d^3*sin(a+b*x)^2*(c+d*x)+-3//4*b^-5*d^4*cos(a+b*x)*sin(a+b*x)+-1//2*b^-1*(c+d*x)^4*cos(a+b*x)*sin(a+b*x)+3//2*b^-3*d^2*(c+d*x)^2*cos(a+b*x)*sin(a+b*x))
@test integrate((c+d*x)^3*sin(a+b*x)^2, x) == :(1//8*d^-1*(c+d*x)^4+-3//8*b^-4*d^3*sin(a+b*x)^2+-3//8*b^-2*d^3*x^2+-3//4*c*x*b^-2*d^2+-1//2*b^-1*(c+d*x)^3*cos(a+b*x)*sin(a+b*x)+3//4*d*b^-2*(c+d*x)^2*sin(a+b*x)^2+3//4*b^-3*d^2*(c+d*x)*cos(a+b*x)*sin(a+b*x))
@test integrate((c+d*x)^2*sin(a+b*x)^2, x) == :(1//6*d^-1*(c+d*x)^3+-1//4*x*b^-2*d^2+(1/2)*d*b^-2*sin(a+b*x)^2*(c+d*x)+-1//2*b^-1*(c+d*x)^2*cos(a+b*x)*sin(a+b*x)+1//4*b^-3*d^2*cos(a+b*x)*sin(a+b*x))
@test integrate(sin(a+b*x)^2*(c+d*x), x) == :((1/2)*c*x+1//4*d*x^2+1//4*d*b^-2*sin(a+b*x)^2+-1//2*b^-1*(c+d*x)*cos(a+b*x)*sin(a+b*x))
@test integrate((c+d*x)^-1*sin(a+b*x)^2, x) == :((1/2)*d^-1*log(c+d*x)+(1/2)*d^-1*sin(2a+-2*b*c*d^-1)*sinintegral(2*b*x+2*b*c*d^-1)+-1//2*d^-1*cos(2a+-2*b*c*d^-1)*cosintegral(2*b*x+2*b*c*d^-1))
@test integrate((c+d*x)^-2*sin(a+b*x)^2, x) == :(-1*d^-1*(c+d*x)^-1*sin(a+b*x)^2+b*d^-2*cos(2a+-2*b*c*d^-1)*sinintegral(2*b*x+2*b*c*d^-1)+b*d^-2*cosintegral(2*b*x+2*b*c*d^-1)*sin(2a+-2*b*c*d^-1))
@test integrate((c+d*x)^-3*sin(a+b*x)^2, x) == :(-1//2*d^-1*(c+d*x)^-2*sin(a+b*x)^2+b^2*d^-3*cos(2a+-2*b*c*d^-1)*cosintegral(2*b*x+2*b*c*d^-1)+-1*b^2*d^-3*sin(2a+-2*b*c*d^-1)*sinintegral(2*b*x+2*b*c*d^-1)+-1*b*d^-2*(c+d*x)^-1*cos(a+b*x)*sin(a+b*x))
@test integrate((c+d*x)^-4*sin(a+b*x)^2, x) == :(-1//3*b^2*d^-3*(c+d*x)^-1+-1//3*d^-1*(c+d*x)^-3*sin(a+b*x)^2+-2//3*b^3*d^-4*cos(2a+-2*b*c*d^-1)*sinintegral(2*b*x+2*b*c*d^-1)+-2//3*b^3*d^-4*cosintegral(2*b*x+2*b*c*d^-1)*sin(2a+-2*b*c*d^-1)+2//3*b^2*d^-3*(c+d*x)^-1*sin(a+b*x)^2+-1//3*b*d^-2*(c+d*x)^-2*cos(a+b*x)*sin(a+b*x))
@test integrate((c+d*x)^4*sin(a+b*x)^3, x) == :(-488//27*b^-5*d^4*cos(a+b*x)+-2//3*b^-1*(c+d*x)^4*cos(a+b*x)+8//81*b^-5*d^4*cos(a+b*x)^3+-160//9*b^-4*d^3*(c+d*x)*sin(a+b*x)+-8//27*b^-4*d^3*sin(a+b*x)^3*(c+d*x)+-1//3*b^-1*(c+d*x)^4*sin(a+b*x)^2*cos(a+b*x)+4//9*d*b^-2*(c+d*x)^3*sin(a+b*x)^3+8//3*d*b^-2*(c+d*x)^3*sin(a+b*x)+80//9*b^-3*d^2*(c+d*x)^2*cos(a+b*x)+4//9*b^-3*d^2*(c+d*x)^2*sin(a+b*x)^2*cos(a+b*x))
@test integrate((c+d*x)^3*sin(a+b*x)^3, x) == :(-40//9*b^-4*d^3*sin(a+b*x)+-2//3*b^-1*(c+d*x)^3*cos(a+b*x)+-2//27*b^-4*d^3*sin(a+b*x)^3+2*d*b^-2*(c+d*x)^2*sin(a+b*x)+-1//3*b^-1*(c+d*x)^3*sin(a+b*x)^2*cos(a+b*x)+1//3*d*b^-2*(c+d*x)^2*sin(a+b*x)^3+40//9*b^-3*d^2*(c+d*x)*cos(a+b*x)+2//9*b^-3*d^2*sin(a+b*x)^2*(c+d*x)*cos(a+b*x))
@test integrate((c+d*x)^2*sin(a+b*x)^3, x) == :(-2//3*b^-1*(c+d*x)^2*cos(a+b*x)+-2//27*b^-3*d^2*cos(a+b*x)^3+14//9*b^-3*d^2*cos(a+b*x)+-1//3*b^-1*(c+d*x)^2*sin(a+b*x)^2*cos(a+b*x)+2//9*d*b^-2*sin(a+b*x)^3*(c+d*x)+4//3*d*b^-2*(c+d*x)*sin(a+b*x))
@test integrate(sin(a+b*x)^3*(c+d*x), x) == :(-1//3*b^-1*(2c+2*d*x)*cos(a+b*x)+1//9*d*b^-2*sin(a+b*x)^3+2//3*d*b^-2*sin(a+b*x)+-1//3*b^-1*sin(a+b*x)^2*(c+d*x)*cos(a+b*x))
@test integrate((c+d*x)^-1*sin(a+b*x)^3, x) == :(-1//4*d^-1*cos(3a+-3*b*c*d^-1)*sinintegral(3*b*x+3*b*c*d^-1)+-1//4*d^-1*cosintegral(3*b*x+3*b*c*d^-1)*sin(3a+-3*b*c*d^-1)+3//4*d^-1*cos(a+-1*b*c*d^-1)*sinintegral(b*x+b*c*d^-1)+3//4*d^-1*cosintegral(b*x+b*c*d^-1)*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^-2*sin(a+b*x)^3, x) == :(-1*d^-1*(c+d*x)^-1*sin(a+b*x)^3+-3//4*b*d^-2*cos(3a+-3*b*c*d^-1)*cosintegral(3*b*x+3*b*c*d^-1)+-3//4*b*d^-2*sin(a+-1*b*c*d^-1)*sinintegral(b*x+b*c*d^-1)+3//4*b*d^-2*cos(a+-1*b*c*d^-1)*cosintegral(b*x+b*c*d^-1)+3//4*b*d^-2*sin(3a+-3*b*c*d^-1)*sinintegral(3*b*x+3*b*c*d^-1))
@test integrate((c+d*x)^-3*sin(a+b*x)^3, x) == :(-1//2*d^-1*(c+d*x)^-2*sin(a+b*x)^3+-3//8*b^2*d^-3*cos(a+-1*b*c*d^-1)*sinintegral(b*x+b*c*d^-1)+-3//8*b^2*d^-3*cosintegral(b*x+b*c*d^-1)*sin(a+-1*b*c*d^-1)+9//8*b^2*d^-3*cos(3a+-3*b*c*d^-1)*sinintegral(3*b*x+3*b*c*d^-1)+9//8*b^2*d^-3*cosintegral(3*b*x+3*b*c*d^-1)*sin(3a+-3*b*c*d^-1)+-3//2*b*d^-2*(c+d*x)^-1*sin(a+b*x)^2*cos(a+b*x))
@test integrate((c+d*x)^3*csc(a+b*x), x) == :(-2*b^-1*(c+d*x)^3*arctanh(exp(im*(a+b*x)))+-6*im*b^-4*d^3*Polylogarithms.polylog(4,-1*exp(im*(a+b*x)))+-6*b^-3*d^2*(c+d*x)*Polylogarithms.polylog(3,-1*exp(im*(a+b*x)))+6*im*b^-4*d^3*Polylogarithms.polylog(4,exp(im*(a+b*x)))+6*b^-3*d^2*(c+d*x)*Polylogarithms.polylog(3,exp(im*(a+b*x)))+-3*im*d*b^-2*(c+d*x)^2*Polylogarithms.polylog(2,exp(im*(a+b*x)))+3*im*d*b^-2*(c+d*x)^2*Polylogarithms.polylog(2,-1*exp(im*(a+b*x))))
@test integrate((c+d*x)^2*csc(a+b*x), x) == :(-2*b^-1*(c+d*x)^2*arctanh(exp(im*(a+b*x)))+-2*b^-3*d^2*Polylogarithms.polylog(3,-1*exp(im*(a+b*x)))+2*b^-3*d^2*Polylogarithms.polylog(3,exp(im*(a+b*x)))+-2*im*d*b^-2*(c+d*x)*Polylogarithms.polylog(2,exp(im*(a+b*x)))+2*im*d*b^-2*(c+d*x)*Polylogarithms.polylog(2,-1*exp(im*(a+b*x))))
@test integrate((c+d*x)*csc(a+b*x), x) == :(-1*b^-1*(2c+2*d*x)*arctanh(exp(im*(a+b*x)))+im*d*b^-2*Polylogarithms.polylog(2,-1*exp(im*(a+b*x)))+-1*im*d*b^-2*Polylogarithms.polylog(2,exp(im*(a+b*x))))
@test integrate((c+d*x)^3*csc(a+b*x)^2, x) == :(-1*im*b^-1*(c+d*x)^3+-1*b^-1*(c+d*x)^3*cot(a+b*x)+3//2*b^-4*d^3*Polylogarithms.polylog(3,exp(2*im*(a+b*x)))+3*d*b^-2*(c+d*x)^2*log(1+-1*exp(2*im*(a+b*x)))+-3*im*b^-3*d^2*(c+d*x)*Polylogarithms.polylog(2,exp(2*im*(a+b*x))))
@test integrate((c+d*x)^2*csc(a+b*x)^2, x) == :(-1*im*b^-1*(c+d*x)^2+-1*b^-1*(c+d*x)^2*cot(a+b*x)+-1*im*b^-3*d^2*Polylogarithms.polylog(2,exp(2*im*(a+b*x)))+2*d*b^-2*(c+d*x)*log(1+-1*exp(2*im*(a+b*x))))
@test integrate(csc(a+b*x)^2*(c+d*x), x) == :(d*b^-2*log(sin(a+b*x))+-1*b^-1*(c+d*x)*cot(a+b*x))
@test integrate((c+d*x)^3*csc(a+b*x)^3, x) == :(-1*b^-1*(c+d*x)^3*arctanh(exp(im*(a+b*x)))+-6*b^-3*d^2*(c+d*x)*arctanh(exp(im*(a+b*x)))+-3*im*b^-4*d^3*Polylogarithms.polylog(2,exp(im*(a+b*x)))+-3*im*b^-4*d^3*Polylogarithms.polylog(4,-1*exp(im*(a+b*x)))+-3*b^-3*d^2*(c+d*x)*Polylogarithms.polylog(3,-1*exp(im*(a+b*x)))+3*im*b^-4*d^3*Polylogarithms.polylog(2,-1*exp(im*(a+b*x)))+3*im*b^-4*d^3*Polylogarithms.polylog(4,exp(im*(a+b*x)))+3*b^-3*d^2*(c+d*x)*Polylogarithms.polylog(3,exp(im*(a+b*x)))+-3//2*d*b^-2*(c+d*x)^2*csc(a+b*x)+-1//2*b^-1*(c+d*x)^3*cot(a+b*x)*csc(a+b*x)+-3//2*im*d*b^-2*(c+d*x)^2*Polylogarithms.polylog(2,exp(im*(a+b*x)))+3//2*im*d*b^-2*(c+d*x)^2*Polylogarithms.polylog(2,-1*exp(im*(a+b*x))))
@test integrate((c+d*x)^2*csc(a+b*x)^3, x) == :(b^-3*d^2*Polylogarithms.polylog(3,exp(im*(a+b*x)))+-1*b^-1*(c+d*x)^2*arctanh(exp(im*(a+b*x)))+-1*b^-3*d^2*Polylogarithms.polylog(3,-1*exp(im*(a+b*x)))+-1*b^-3*d^2*arctanh(cos(a+b*x))+-1*d*b^-2*(c+d*x)*csc(a+b*x)+-1//2*b^-1*(c+d*x)^2*cot(a+b*x)*csc(a+b*x)+im*d*b^-2*(c+d*x)*Polylogarithms.polylog(2,-1*exp(im*(a+b*x)))+-1*im*d*b^-2*(c+d*x)*Polylogarithms.polylog(2,exp(im*(a+b*x))))
@test integrate(csc(a+b*x)^3*(c+d*x), x) == :(-1*b^-1*(c+d*x)*arctanh(exp(im*(a+b*x)))+-1//2*d*b^-2*csc(a+b*x)+(1/2)*im*d*b^-2*Polylogarithms.polylog(2,-1*exp(im*(a+b*x)))+-1//2*im*d*b^-2*Polylogarithms.polylog(2,exp(im*(a+b*x)))+-1//2*b^-1*(c+d*x)*cot(a+b*x)*csc(a+b*x))
@test integrate((c+d*x)^5//2*sin(a+b*x), x) == :(-1*b^-1*(c+d*x)^5//2*cos(a+b*x)+5//2*d*b^-2*(c+d*x)^3//2*sin(a+b*x)+15//4*b^-3*d^2*(c+d*x)^(1/2)*cos(a+b*x)+-15//8*2^(1/2)*pi^(1/2)*b^-7//2*d^5//2*cos(a+-1*b*c*d^-1)*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+15//8*2^(1/2)*pi^(1/2)*b^-7//2*d^5//2*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^3//2*sin(a+b*x), x) == :(-1*b^-1*(c+d*x)^3//2*cos(a+b*x)+3//2*d*b^-2*(c+d*x)^(1/2)*sin(a+b*x)+-3//4*2^(1/2)*pi^(1/2)*b^-5//2*d^3//2*cos(a+-1*b*c*d^-1)*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-3//4*2^(1/2)*pi^(1/2)*b^-5//2*d^3//2*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^(1/2)*sin(a+b*x), x) == :(-1*b^-1*(c+d*x)^(1/2)*cos(a+b*x)+(1/2)*2^(1/2)*pi^(1/2)*b^-3//2*d^(1/2)*cos(a+-1*b*c*d^-1)*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-1//2*2^(1/2)*pi^(1/2)*b^-3//2*d^(1/2)*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^-1//2*sin(a+b*x), x) == :(2^(1/2)*pi^(1/2)*b^-1//2*d^-1//2*cos(a+-1*b*c*d^-1)*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+2^(1/2)*pi^(1/2)*b^-1//2*d^-1//2*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^-3//2*sin(a+b*x), x) == :(-2*d^-1*(c+d*x)^-1//2*sin(a+b*x)+-2*2^(1/2)*pi^(1/2)*b^(1/2)*d^-3//2*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1)+2*2^(1/2)*pi^(1/2)*b^(1/2)*d^-3//2*cos(a+-1*b*c*d^-1)*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2)))
@test integrate((c+d*x)^-5//2*sin(a+b*x), x) == :(-2//3*d^-1*(c+d*x)^-3//2*sin(a+b*x)+-4//3*b*d^-2*(c+d*x)^-1//2*cos(a+b*x)+-4//3*2^(1/2)*pi^(1/2)*b^3//2*d^-5//2*cos(a+-1*b*c*d^-1)*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-4//3*2^(1/2)*pi^(1/2)*b^3//2*d^-5//2*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^-7//2*sin(a+b*x), x) == :(-2//5*d^-1*(c+d*x)^-5//2*sin(a+b*x)+-4//15*b*d^-2*(c+d*x)^-3//2*cos(a+b*x)+8//15*b^2*d^-3*(c+d*x)^-1//2*sin(a+b*x)+-8//15*2^(1/2)*pi^(1/2)*b^5//2*d^-7//2*cos(a+-1*b*c*d^-1)*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+8//15*2^(1/2)*pi^(1/2)*b^5//2*d^-7//2*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^5//2*sin(a+b*x)^2, x) == :(1//7*d^-1*(c+d*x)^7//2+-5//16*d*b^-2*(c+d*x)^3//2+-1//2*b^-1*(c+d*x)^5//2*cos(a+b*x)*sin(a+b*x)+5//8*d*b^-2*(c+d*x)^3//2*sin(a+b*x)^2+15//64*b^-3*d^2*(c+d*x)^(1/2)*sin(2a+2*b*x)+-15//128*pi^(1/2)*b^-7//2*d^5//2*cos(2a+-2*b*c*d^-1)*fresnels(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-15//128*pi^(1/2)*b^-7//2*d^5//2*fresnelc(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(2a+-2*b*c*d^-1))
@test integrate((c+d*x)^3//2*sin(a+b*x)^2, x) == :(1//5*d^-1*(c+d*x)^5//2+-3//16*d*b^-2*(c+d*x)^(1/2)+-1//2*b^-1*(c+d*x)^3//2*cos(a+b*x)*sin(a+b*x)+3//8*d*b^-2*(c+d*x)^(1/2)*sin(a+b*x)^2+-3//32*pi^(1/2)*b^-5//2*d^3//2*fresnels(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(2a+-2*b*c*d^-1)+3//32*pi^(1/2)*b^-5//2*d^3//2*cos(2a+-2*b*c*d^-1)*fresnelc(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2)))
@test integrate((c+d*x)^(1/2)*sin(a+b*x)^2, x) == :(1//3*d^-1*(c+d*x)^3//2+-1//4*b^-1*(c+d*x)^(1/2)*sin(2a+2*b*x)+1//8*pi^(1/2)*b^-3//2*d^(1/2)*cos(2a+-2*b*c*d^-1)*fresnels(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+1//8*pi^(1/2)*b^-3//2*d^(1/2)*fresnelc(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(2a+-2*b*c*d^-1))
@test integrate((c+d*x)^-1//2*sin(a+b*x)^2, x) == :(d^-1*(c+d*x)^(1/2)+(1/2)*pi^(1/2)*b^-1//2*d^-1//2*fresnels(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(2a+-2*b*c*d^-1)+-1//2*pi^(1/2)*b^-1//2*d^-1//2*cos(2a+-2*b*c*d^-1)*fresnelc(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2)))
@test integrate((c+d*x)^-3//2*sin(a+b*x)^2, x) == :(-2*d^-1*(c+d*x)^-1//2*sin(a+b*x)^2+2*pi^(1/2)*b^(1/2)*d^-3//2*cos(2a+-2*b*c*d^-1)*fresnels(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+2*pi^(1/2)*b^(1/2)*d^-3//2*fresnelc(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(2a+-2*b*c*d^-1))
@test integrate((c+d*x)^-5//2*sin(a+b*x)^2, x) == :(-2//3*d^-1*(c+d*x)^-3//2*sin(a+b*x)^2+-8//3*b*d^-2*(c+d*x)^-1//2*cos(a+b*x)*sin(a+b*x)+-8//3*pi^(1/2)*b^3//2*d^-5//2*fresnels(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(2a+-2*b*c*d^-1)+8//3*pi^(1/2)*b^3//2*d^-5//2*cos(2a+-2*b*c*d^-1)*fresnelc(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2)))
@test integrate((c+d*x)^-7//2*sin(a+b*x)^2, x) == :(-16//15*b^2*d^-3*(c+d*x)^-1//2+-2//5*d^-1*(c+d*x)^-5//2*sin(a+b*x)^2+32//15*b^2*d^-3*(c+d*x)^-1//2*sin(a+b*x)^2+-32//15*pi^(1/2)*b^5//2*d^-7//2*cos(2a+-2*b*c*d^-1)*fresnels(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-32//15*pi^(1/2)*b^5//2*d^-7//2*fresnelc(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(2a+-2*b*c*d^-1)+-8//15*b*d^-2*(c+d*x)^-3//2*cos(a+b*x)*sin(a+b*x))
@test integrate((c+d*x)^-9//2*sin(a+b*x)^2, x) == :(-16//105*b^2*d^-3*(c+d*x)^-3//2+-2//7*d^-1*(c+d*x)^-7//2*sin(a+b*x)^2+32//105*b^2*d^-3*(c+d*x)^-3//2*sin(a+b*x)^2+-128//105*pi^(1/2)*b^7//2*d^-9//2*cos(2a+-2*b*c*d^-1)*fresnelc(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-8//35*b*d^-2*(c+d*x)^-5//2*cos(a+b*x)*sin(a+b*x)+128//105*pi^(1/2)*b^7//2*d^-9//2*fresnels(2*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(2a+-2*b*c*d^-1)+128//105*b^3*d^-4*(c+d*x)^-1//2*cos(a+b*x)*sin(a+b*x))
@test integrate((c+d*x)^5//2*sin(a+b*x)^3, x) == :(-2//3*b^-1*(c+d*x)^5//2*cos(a+b*x)+-5//144*b^-3*d^2*(c+d*x)^(1/2)*cos(3a+3*b*x)+-1//3*b^-1*(c+d*x)^5//2*sin(a+b*x)^2*cos(a+b*x)+5//3*d*b^-2*(c+d*x)^3//2*sin(a+b*x)+5//18*d*b^-2*(c+d*x)^3//2*sin(a+b*x)^3+45//16*b^-3*d^2*(c+d*x)^(1/2)*cos(a+b*x)+-45//32*2^(1/2)*pi^(1/2)*b^-7//2*d^5//2*cos(a+-1*b*c*d^-1)*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-5//864*6^(1/2)*pi^(1/2)*b^-7//2*d^5//2*fresnels(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(3a+-3*b*c*d^-1)+5//864*6^(1/2)*pi^(1/2)*b^-7//2*d^5//2*cos(3a+-3*b*c*d^-1)*fresnelc(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+45//32*2^(1/2)*pi^(1/2)*b^-7//2*d^5//2*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^3//2*sin(a+b*x)^3, x) == :(-2//3*b^-1*(c+d*x)^3//2*cos(a+b*x)+d*b^-2*(c+d*x)^(1/2)*sin(a+b*x)+-1//3*b^-1*(c+d*x)^3//2*sin(a+b*x)^2*cos(a+b*x)+1//6*d*b^-2*(c+d*x)^(1/2)*sin(a+b*x)^3+-9//16*2^(1/2)*pi^(1/2)*b^-5//2*d^3//2*cos(a+-1*b*c*d^-1)*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-9//16*2^(1/2)*pi^(1/2)*b^-5//2*d^3//2*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1)+1//144*6^(1/2)*pi^(1/2)*b^-5//2*d^3//2*cos(3a+-3*b*c*d^-1)*fresnels(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+1//144*6^(1/2)*pi^(1/2)*b^-5//2*d^3//2*fresnelc(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(3a+-3*b*c*d^-1))
@test integrate((c+d*x)^(1/2)*sin(a+b*x)^3, x) == :(-3//4*b^-1*(c+d*x)^(1/2)*cos(a+b*x)+1//12*b^-1*(c+d*x)^(1/2)*cos(3a+3*b*x)+-3//8*2^(1/2)*pi^(1/2)*b^-3//2*d^(1/2)*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1)+-1//72*6^(1/2)*pi^(1/2)*b^-3//2*d^(1/2)*cos(3a+-3*b*c*d^-1)*fresnelc(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+1//72*6^(1/2)*pi^(1/2)*b^-3//2*d^(1/2)*fresnels(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(3a+-3*b*c*d^-1)+3//8*2^(1/2)*pi^(1/2)*b^-3//2*d^(1/2)*cos(a+-1*b*c*d^-1)*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2)))
@test integrate((c+d*x)^-1//2*sin(a+b*x)^3, x) == :(-1//12*6^(1/2)*pi^(1/2)*b^-1//2*d^-1//2*cos(3a+-3*b*c*d^-1)*fresnels(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-1//12*6^(1/2)*pi^(1/2)*b^-1//2*d^-1//2*fresnelc(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(3a+-3*b*c*d^-1)+3//4*2^(1/2)*pi^(1/2)*b^-1//2*d^-1//2*cos(a+-1*b*c*d^-1)*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+3//4*2^(1/2)*pi^(1/2)*b^-1//2*d^-1//2*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^-3//2*sin(a+b*x)^3, x) == :(-2*d^-1*(c+d*x)^-1//2*sin(a+b*x)^3+(1/2)*6^(1/2)*pi^(1/2)*b^(1/2)*d^-3//2*fresnels(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(3a+-3*b*c*d^-1)+-3//2*2^(1/2)*pi^(1/2)*b^(1/2)*d^-3//2*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1)+-1//2*6^(1/2)*pi^(1/2)*b^(1/2)*d^-3//2*cos(3a+-3*b*c*d^-1)*fresnelc(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+3//2*2^(1/2)*pi^(1/2)*b^(1/2)*d^-3//2*cos(a+-1*b*c*d^-1)*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2)))
@test integrate((c+d*x)^-5//2*sin(a+b*x)^3, x) == :(-2//3*d^-1*(c+d*x)^-3//2*sin(a+b*x)^3+-4*b*d^-2*(c+d*x)^-1//2*sin(a+b*x)^2*cos(a+b*x)+6^(1/2)*pi^(1/2)*b^3//2*d^-5//2*cos(3a+-3*b*c*d^-1)*fresnels(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+6^(1/2)*pi^(1/2)*b^3//2*d^-5//2*fresnelc(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(3a+-3*b*c*d^-1)+-1*2^(1/2)*pi^(1/2)*b^3//2*d^-5//2*cos(a+-1*b*c*d^-1)*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+-1*2^(1/2)*pi^(1/2)*b^3//2*d^-5//2*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1))
@test integrate((c+d*x)^-7//2*sin(a+b*x)^3, x) == :(-2//5*d^-1*(c+d*x)^-5//2*sin(a+b*x)^3+-16//5*b^2*d^-3*(c+d*x)^-1//2*sin(a+b*x)+24//5*b^2*d^-3*(c+d*x)^-1//2*sin(a+b*x)^3+-4//5*b*d^-2*(c+d*x)^-3//2*sin(a+b*x)^2*cos(a+b*x)+-6//5*6^(1/2)*pi^(1/2)*b^5//2*d^-7//2*fresnels(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(3a+-3*b*c*d^-1)+-2//5*2^(1/2)*pi^(1/2)*b^5//2*d^-7//2*cos(a+-1*b*c*d^-1)*fresnelc(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))+2//5*2^(1/2)*pi^(1/2)*b^5//2*d^-7//2*fresnels(2^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2))*sin(a+-1*b*c*d^-1)+6//5*6^(1/2)*pi^(1/2)*b^5//2*d^-7//2*cos(3a+-3*b*c*d^-1)*fresnelc(6^(1/2)*pi^-1//2*b^(1/2)*d^-1//2*(c+d*x)^(1/2)))
@test integrate((d*x)^3//2*sin(f*x), x) == :(-1*f^-1*(d*x)^3//2*cos(f*x)+3//2*d*f^-2*(d*x)^(1/2)*sin(f*x)+-3//4*2^(1/2)*pi^(1/2)*d^3//2*f^-5//2*fresnels(2^(1/2)*pi^-1//2*d^-1//2*f^(1/2)*(d*x)^(1/2)))
@test integrate((d*x)^(1/2)*sin(f*x), x) == :(-1*f^-1*(d*x)^(1/2)*cos(f*x)+(1/2)*2^(1/2)*pi^(1/2)*d^(1/2)*f^-3//2*fresnelc(2^(1/2)*pi^-1//2*d^-1//2*f^(1/2)*(d*x)^(1/2)))
@test integrate((d*x)^-1//2*sin(f*x), x) == :(2^(1/2)*pi^(1/2)*d^-1//2*f^-1//2*fresnels(2^(1/2)*pi^-1//2*d^-1//2*f^(1/2)*(d*x)^(1/2)))
@test integrate((d*x)^-3//2*sin(f*x), x) == :(-2*d^-1*(d*x)^-1//2*sin(f*x)+2*2^(1/2)*pi^(1/2)*d^-3//2*f^(1/2)*fresnelc(2^(1/2)*pi^-1//2*d^-1//2*f^(1/2)*(d*x)^(1/2)))
@test integrate((d*x)^-5//2*sin(f*x), x) == :(-2//3*d^-1*(d*x)^-3//2*sin(f*x)+-4//3*f*d^-2*(d*x)^-1//2*cos(f*x)+-4//3*2^(1/2)*pi^(1/2)*d^-5//2*f^3//2*fresnels(2^(1/2)*pi^-1//2*d^-1//2*f^(1/2)*(d*x)^(1/2)))
@test integrate(x*sin(e+f*x)^(1/2)+x*sin(e+f*x)^-3//2, x) == :(4*f^-2*sin(e+f*x)^(1/2)+-2*x*f^-1*sin(e+f*x)^-1//2*cos(e+f*x))
@test integrate(x^2*sin(e+f*x)^(1/2)+x^2*sin(e+f*x)^-3//2, x) == :(-16*f^-3*Elliptic.E((1/2)*e+-1//4*pi+(1/2)*f*x,2)+8*x*f^-2*sin(e+f*x)^(1/2)+-2*f^-1*x^2*sin(e+f*x)^-1//2*cos(e+f*x))
@test integrate(x*sin(e+f*x)^-5//2+-1//3*x*sin(e+f*x)^-1//2, x) == :(-4//3*f^-2*sin(e+f*x)^-1//2+-2//3*x*f^-1*sin(e+f*x)^-3//2*cos(e+f*x))
@test integrate(x*sin(e+f*x)^-7//2+3//5*x*sin(e+f*x)^(1/2), x) == :(-4//15*f^-2*sin(e+f*x)^-3//2+12//5*f^-2*sin(e+f*x)^(1/2)+-6//5*x*f^-1*sin(e+f*x)^-1//2*cos(e+f*x)+-2//5*x*f^-1*sin(e+f*x)^-5//2*cos(e+f*x))
@test integrate((c+d*x)^m*sin(a+b*x)^3, x) == :(-3//8*b^-1*(im*b*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,im*b*d^-1*(c+d*x))*exp(-1*im*(a+-1*b*c*d^-1))+-3//8*b^-1*(-1*im*b*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-1*im*b*d^-1*(c+d*x))*exp(im*(a+-1*b*c*d^-1))+1//8*3^(-1+-1m)*b^-1*(im*b*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,3*im*b*d^-1*(c+d*x))*exp(-3*im*(a+-1*b*c*d^-1))+1//8*3^(-1+-1m)*b^-1*(-1*im*b*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-3*im*b*d^-1*(c+d*x))*exp(3*im*(a+-1*b*c*d^-1)))
@test integrate((c+d*x)^m*sin(a+b*x)^2, x) == :((1/2)*d^-1*(1+m)^-1*(c+d*x)^(1+m)+im*2^(-3+-1m)*b^-1*(-1*im*b*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-2*im*b*d^-1*(c+d*x))*exp(2*im*(a+-1*b*c*d^-1))+-1*im*2^(-3+-1m)*b^-1*(im*b*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,2*im*b*d^-1*(c+d*x))*exp(-2*im*(a+-1*b*c*d^-1)))
@test integrate((c+d*x)^m*sin(a+b*x), x) == :(-1//2*b^-1*(im*b*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,im*b*d^-1*(c+d*x))*exp(-1*im*(a+-1*b*c*d^-1))+-1//2*b^-1*(-1*im*b*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-1*im*b*d^-1*(c+d*x))*exp(im*(a+-1*b*c*d^-1)))
@test integrate(x^(3+m)*sin(a+b*x), x) == :((1/2)*im*b^-4*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(4+m,-1*im*b*x)*exp(im*a)+-1//2*im*b^-4*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(4+m,im*b*x)*exp(-1*im*a))
@test integrate(x^(2+m)*sin(a+b*x), x) == :((1/2)*b^-3*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(3+m,im*b*x)*exp(-1*im*a)+(1/2)*b^-3*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(3+m,-1*im*b*x)*exp(im*a))
@test integrate(x^(1+m)*sin(a+b*x), x) == :((1/2)*im*b^-2*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(2+m,im*b*x)*exp(-1*im*a)+-1//2*im*b^-2*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(2+m,-1*im*b*x)*exp(im*a))
@test integrate(x^m*sin(a+b*x), x) == :(-1//2*b^-1*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(1+m,im*b*x)*exp(-1*im*a)+-1//2*b^-1*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(1+m,-1*im*b*x)*exp(im*a))
@test integrate(x^(-1+m)*sin(a+b*x), x) == :((1/2)*im*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(m,-1*im*b*x)*exp(im*a)+-1//2*im*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(m,im*b*x)*exp(-1*im*a))
@test integrate(x^(-2+m)*sin(a+b*x), x) == :((1/2)*b*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(-1+m,im*b*x)*exp(-1*im*a)+(1/2)*b*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(-1+m,-1*im*b*x)*exp(im*a))
@test integrate(x^(-3+m)*sin(a+b*x), x) == :((1/2)*im*b^2*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(-2+m,im*b*x)*exp(-1*im*a)+-1//2*im*b^2*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(-2+m,-1*im*b*x)*exp(im*a))
@test integrate(x^(3+m)*sin(a+b*x)^2, x) == :(x^(4+m)*(8+2m)^-1+2^(-6+-1m)*b^-4*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(4+m,2*im*b*x)*exp(-2*im*a)+2^(-6+-1m)*b^-4*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(4+m,-2*im*b*x)*exp(2*im*a))
@test integrate(x^(2+m)*sin(a+b*x)^2, x) == :(x^(3+m)*(6+2m)^-1+im*2^(-5+-1m)*b^-3*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(3+m,2*im*b*x)*exp(-2*im*a)+-1*im*2^(-5+-1m)*b^-3*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(3+m,-2*im*b*x)*exp(2*im*a))
@test integrate(x^(1+m)*sin(a+b*x)^2, x) == :(x^(2+m)*(4+2m)^-1+-1*2^(-4+-1m)*b^-2*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(2+m,2*im*b*x)*exp(-2*im*a)+-1*2^(-4+-1m)*b^-2*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(2+m,-2*im*b*x)*exp(2*im*a))
@test integrate(x^m*sin(a+b*x)^2, x) == :(x^(1+m)*(2+2m)^-1+im*2^(-3+-1m)*b^-1*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(1+m,-2*im*b*x)*exp(2*im*a)+-1*im*2^(-3+-1m)*b^-1*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(1+m,2*im*b*x)*exp(-2*im*a))
@test integrate(x^(-1+m)*sin(a+b*x)^2, x) == :((1/2)*m^-1*x^m+2^(-2+-1m)*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(m,2*im*b*x)*exp(-2*im*a)+2^(-2+-1m)*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(m,-2*im*b*x)*exp(2*im*a))
@test integrate(x^(-2+m)*sin(a+b*x)^2, x) == :(-1*x^(-1+m)*(2+-2m)^-1+im*b*2^(-1+-1m)*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(-1+m,2*im*b*x)*exp(-2*im*a)+-1*im*b*2^(-1+-1m)*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(-1+m,-2*im*b*x)*exp(2*im*a))
@test integrate(x^(-3+m)*sin(a+b*x)^2, x) == :(-1*x^(-2+m)*(4+-2m)^-1+-1*2^(-1m)*b^2*x^m*(im*b*x)^(-1m)*SpecialFunctions.gamma(-2+m,2*im*b*x)*exp(-2*im*a)+-1*2^(-1m)*b^2*x^m*(-1*im*b*x)^(-1m)*SpecialFunctions.gamma(-2+m,-2*im*b*x)*exp(2*im*a))
@test integrate(x*csc(e+f*x)^-3//2+-1//3*x*csc(e+f*x)^(1/2), x) == :(4//9*f^-2*csc(e+f*x)^-3//2+-2//3*x*f^-1*csc(e+f*x)^-1//2*cos(e+f*x))
@test integrate(x^2*csc(e+f*x)^-3//2+-1//3*x^2*csc(e+f*x)^(1/2), x) == :(8//9*x*f^-2*csc(e+f*x)^-3//2+16//27*f^-3*csc(e+f*x)^-1//2*cos(e+f*x)+-16//27*f^-3*csc(e+f*x)^(1/2)*sin(e+f*x)^(1/2)*Elliptic.F((1/2)*e+-1//4*pi+(1/2)*f*x,2)+-2//3*f^-1*x^2*csc(e+f*x)^-1//2*cos(e+f*x))
@test integrate(x*csc(e+f*x)^-5//2+-3//5*x*csc(e+f*x)^-1//2, x) == :(4//25*f^-2*csc(e+f*x)^-5//2+-2//5*x*f^-1*csc(e+f*x)^-3//2*cos(e+f*x))
@test integrate(x*csc(e+f*x)^-7//2+-5//21*x*csc(e+f*x)^(1/2), x) == :(4//49*f^-2*csc(e+f*x)^-7//2+20//63*f^-2*csc(e+f*x)^-3//2+-10//21*x*f^-1*csc(e+f*x)^-1//2*cos(e+f*x)+-2//7*x*f^-1*csc(e+f*x)^-5//2*cos(e+f*x))
@test integrate((c+d*x)^3*(a+a*sin(e+f*x)), x) == :(1//4*a*d^-1*(c+d*x)^4+-1*a*f^-1*(c+d*x)^3*cos(e+f*x)+-6*a*d^3*f^-4*sin(e+f*x)+3*a*d*f^-2*(c+d*x)^2*sin(e+f*x)+6*a*d^2*f^-3*(c+d*x)*cos(e+f*x))
@test integrate((c+d*x)^2*(a+a*sin(e+f*x)), x) == :(1//3*a*d^-1*(c+d*x)^3+-1*a*f^-1*(c+d*x)^2*cos(e+f*x)+2*a*d^2*f^-3*cos(e+f*x)+2*a*d*f^-2*(c+d*x)*sin(e+f*x))
@test integrate((a+a*sin(e+f*x))*(c+d*x), x) == :((1/2)*a*d^-1*(c+d*x)^2+a*d*f^-2*sin(e+f*x)+-1*a*f^-1*(c+d*x)*cos(e+f*x))
@test integrate((c+d*x)^-1*(a+a*sin(e+f*x)), x) == :(a*d^-1*log(c+d*x)+a*d^-1*cos(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1)+-1*a*d^-1*cosintegral(f*x+c*f*d^-1)*sin(-1*e+c*f*d^-1))
@test integrate((c+d*x)^-2*(a+a*sin(e+f*x)), x) == :(-1*a*d^-1*(c+d*x)^-1+-1*a*d^-1*(c+d*x)^-1*sin(e+f*x)+a*f*d^-2*cos(-1*e+c*f*d^-1)*cosintegral(f*x+c*f*d^-1)+a*f*d^-2*sin(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1))
@test integrate((c+d*x)^-3*(a+a*sin(e+f*x)), x) == :(-1//2*a*d^-1*(c+d*x)^-2+-1//2*a*d^-1*(c+d*x)^-2*sin(e+f*x)+(1/2)*a*d^-3*f^2*cosintegral(f*x+c*f*d^-1)*sin(-1*e+c*f*d^-1)+-1//2*a*f*d^-2*(c+d*x)^-1*cos(e+f*x)+-1//2*a*d^-3*f^2*cos(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1))
@test integrate((a+a*sin(e+f*x))^2*(c+d*x)^3, x) == :(3//8*a^2*d^-1*(c+d*x)^4+-12*a^2*d^3*f^-4*sin(e+f*x)+-2*a^2*f^-1*(c+d*x)^3*cos(e+f*x)+-3//8*a^2*d^3*f^-4*sin(e+f*x)^2+-3//8*a^2*d^3*f^-2*x^2+6*d*a^2*f^-2*(c+d*x)^2*sin(e+f*x)+12*a^2*d^2*f^-3*(c+d*x)*cos(e+f*x)+-3//4*c*x*a^2*d^2*f^-2+-1//2*a^2*f^-1*(c+d*x)^3*cos(e+f*x)*sin(e+f*x)+3//4*d*a^2*f^-2*(c+d*x)^2*sin(e+f*x)^2+3//4*a^2*d^2*f^-3*(c+d*x)*cos(e+f*x)*sin(e+f*x))
@test integrate((a+a*sin(e+f*x))^2*(c+d*x)^2, x) == :((1/2)*a^2*d^-1*(c+d*x)^3+-2*a^2*f^-1*(c+d*x)^2*cos(e+f*x)+4*a^2*d^2*f^-3*cos(e+f*x)+-1//4*x*a^2*d^2*f^-2+(1/2)*d*a^2*f^-2*sin(e+f*x)^2*(c+d*x)+4*d*a^2*f^-2*(c+d*x)*sin(e+f*x)+-1//2*a^2*f^-1*(c+d*x)^2*cos(e+f*x)*sin(e+f*x)+1//4*a^2*d^2*f^-3*cos(e+f*x)*sin(e+f*x))
@test integrate((a+a*sin(e+f*x))^2*(c+d*x), x) == :((1/2)*c*x*a^2+(1/2)*a^2*d^-1*(c+d*x)^2+1//4*d*a^2*x^2+-2*a^2*f^-1*(c+d*x)*cos(e+f*x)+2*d*a^2*f^-2*sin(e+f*x)+1//4*d*a^2*f^-2*sin(e+f*x)^2+-1//2*a^2*f^-1*(c+d*x)*cos(e+f*x)*sin(e+f*x))
@test integrate((a+a*sin(e+f*x))^2*(c+d*x)^-1, x) == :(3//2*a^2*d^-1*log(c+d*x)+-2*a^2*d^-1*cosintegral(f*x+c*f*d^-1)*sin(-1*e+c*f*d^-1)+2*a^2*d^-1*cos(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1)+-1//2*a^2*d^-1*cos(-2*e+2*c*f*d^-1)*cosintegral(2*f*x+2*c*f*d^-1)+-1//2*a^2*d^-1*sin(-2*e+2*c*f*d^-1)*sinintegral(2*f*x+2*c*f*d^-1))
@test integrate((a+a*sin(e+f*x))^2*(c+d*x)^-2, x) == :(-4*a^2*d^-1*(c+d*x)^-1*sin((1/2)*e+1//4*pi+(1/2)*f*x)^4+f*a^2*d^-2*cos(-2*e+2*c*f*d^-1)*sinintegral(2*f*x+2*c*f*d^-1)+-1*f*a^2*d^-2*cosintegral(2*f*x+2*c*f*d^-1)*sin(-2*e+2*c*f*d^-1)+2*f*a^2*d^-2*cos(-1*e+c*f*d^-1)*cosintegral(f*x+c*f*d^-1)+2*f*a^2*d^-2*sin(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1))
@test integrate((a+a*sin(e+f*x))^2*(c+d*x)^-3, x) == :(-2*a^2*d^-1*(c+d*x)^-2*sin((1/2)*e+1//4*pi+(1/2)*f*x)^4+a^2*d^-3*f^2*cos(-2*e+2*c*f*d^-1)*cosintegral(2*f*x+2*c*f*d^-1)+a^2*d^-3*f^2*cosintegral(f*x+c*f*d^-1)*sin(-1*e+c*f*d^-1)+a^2*d^-3*f^2*sin(-2*e+2*c*f*d^-1)*sinintegral(2*f*x+2*c*f*d^-1)+-1*a^2*d^-3*f^2*cos(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1)+-4*f*a^2*d^-2*(c+d*x)^-1*sin((1/2)*e+1//4*pi+(1/2)*f*x)^3*cos((1/2)*e+1//4*pi+(1/2)*f*x))
@test integrate((a+a*sin(e+f*x))^-1*(c+d*x)^3, x) == :(-1*im*a^-1*f^-1*(c+d*x)^3+-1*a^-1*f^-1*(c+d*x)^3*cot((1/2)*e+1//4*pi+(1/2)*f*x)+12*a^-1*d^3*f^-4*Polylogarithms.polylog(3,im*exp(im*(e+f*x)))+6*d*a^-1*f^-2*(c+d*x)^2*log(1+-1*im*exp(im*(e+f*x)))+-12*im*a^-1*d^2*f^-3*(c+d*x)*Polylogarithms.polylog(2,im*exp(im*(e+f*x))))
@test integrate((a+a*sin(e+f*x))^-1*(c+d*x)^2, x) == :(-1*im*a^-1*f^-1*(c+d*x)^2+-1*a^-1*f^-1*(c+d*x)^2*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-4*im*a^-1*d^2*f^-3*Polylogarithms.polylog(2,im*exp(im*(e+f*x)))+4*d*a^-1*f^-2*(c+d*x)*log(1+-1*im*exp(im*(e+f*x))))
@test integrate((a+a*sin(e+f*x))^-1*(c+d*x), x) == :(-1*a^-1*f^-1*(c+d*x)*cot((1/2)*e+1//4*pi+(1/2)*f*x)+2*d*a^-1*f^-2*log(sin((1/2)*e+1//4*pi+(1/2)*f*x)))
@test integrate((a+a*sin(e+f*x))^-2*(c+d*x)^3, x) == :(4*a^-2*d^3*f^-4*Polylogarithms.polylog(3,im*exp(im*(e+f*x)))+4*a^-2*d^3*f^-4*log(sin((1/2)*e+1//4*pi+(1/2)*f*x))+-1//3*im*a^-2*f^-1*(c+d*x)^3+-1//3*a^-2*f^-1*(c+d*x)^3*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-2*a^-2*d^2*f^-3*(c+d*x)*cot((1/2)*e+1//4*pi+(1/2)*f*x)+2*d*a^-2*f^-2*(c+d*x)^2*log(1+-1*im*exp(im*(e+f*x)))+-1//2*d*a^-2*f^-2*(c+d*x)^2*csc((1/2)*e+1//4*pi+(1/2)*f*x)^2+-1//6*a^-2*f^-1*(c+d*x)^3*csc((1/2)*e+1//4*pi+(1/2)*f*x)^2*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-4*im*a^-2*d^2*f^-3*(c+d*x)*Polylogarithms.polylog(2,im*exp(im*(e+f*x))))
@test integrate((a+a*sin(e+f*x))^-2*(c+d*x)^2, x) == :(-2//3*a^-2*d^2*f^-3*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-1//3*im*a^-2*f^-1*(c+d*x)^2+-1//3*a^-2*f^-1*(c+d*x)^2*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-4//3*im*a^-2*d^2*f^-3*Polylogarithms.polylog(2,im*exp(im*(e+f*x)))+-1//3*d*a^-2*f^-2*csc((1/2)*e+1//4*pi+(1/2)*f*x)^2*(c+d*x)+-1//6*a^-2*f^-1*(c+d*x)^2*csc((1/2)*e+1//4*pi+(1/2)*f*x)^2*cot((1/2)*e+1//4*pi+(1/2)*f*x)+4//3*d*a^-2*f^-2*(c+d*x)*log(1+-1*im*exp(im*(e+f*x))))
@test integrate((a+a*sin(e+f*x))^-2*(c+d*x), x) == :(-1//3*a^-2*f^-1*(c+d*x)*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-1//6*d*a^-2*f^-2*csc((1/2)*e+1//4*pi+(1/2)*f*x)^2+2//3*d*a^-2*f^-2*log(sin((1/2)*e+1//4*pi+(1/2)*f*x))+-1//6*a^-2*f^-1*csc((1/2)*e+1//4*pi+(1/2)*f*x)^2*(c+d*x)*cot((1/2)*e+1//4*pi+(1/2)*f*x))
@test integrate((a+-1*a*sin(e+f*x))^-1*(c+d*x)^3, x) == :(a^-1*f^-1*(c+d*x)^3*tan((1/2)*e+1//4*pi+(1/2)*f*x)+-1*im*a^-1*f^-1*(c+d*x)^3+12*a^-1*d^3*f^-4*Polylogarithms.polylog(3,-1*im*exp(im*(e+f*x)))+6*d*a^-1*f^-2*(c+d*x)^2*log(1+im*exp(im*(e+f*x)))+-12*im*a^-1*d^2*f^-3*(c+d*x)*Polylogarithms.polylog(2,-1*im*exp(im*(e+f*x))))
@test integrate((a+-1*a*sin(e+f*x))^-1*(c+d*x)^2, x) == :(a^-1*f^-1*(c+d*x)^2*tan((1/2)*e+1//4*pi+(1/2)*f*x)+-1*im*a^-1*f^-1*(c+d*x)^2+-4*im*a^-1*d^2*f^-3*Polylogarithms.polylog(2,-1*im*exp(im*(e+f*x)))+4*d*a^-1*f^-2*(c+d*x)*log(1+im*exp(im*(e+f*x))))
@test integrate((a+-1*a*sin(e+f*x))^-1*(c+d*x), x) == :(a^-1*f^-1*(c+d*x)*tan((1/2)*e+1//4*pi+(1/2)*f*x)+2*d*a^-1*f^-2*log(cos((1/2)*e+1//4*pi+(1/2)*f*x)))
@test integrate(x^3*(a+a*sin(c+d*x))^(1/2), x) == :(-96*d^-4*(a+a*sin(c+d*x))^(1/2)+12*d^-2*x^2*(a+a*sin(c+d*x))^(1/2)+-2*d^-1*x^3*(a+a*sin(c+d*x))^(1/2)*cot((1/2)*c+1//4*pi+(1/2)*d*x)+48*x*d^-3*(a+a*sin(c+d*x))^(1/2)*cot((1/2)*c+1//4*pi+(1/2)*d*x))
@test integrate(x^2*(a+a*sin(c+d*x))^(1/2), x) == :(8*x*d^-2*(a+a*sin(c+d*x))^(1/2)+16*d^-3*(a+a*sin(c+d*x))^(1/2)*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-2*d^-1*x^2*(a+a*sin(c+d*x))^(1/2)*cot((1/2)*c+1//4*pi+(1/2)*d*x))
@test integrate(x*(a+a*sin(c+d*x))^(1/2), x) == :(4*d^-2*(a+a*sin(c+d*x))^(1/2)+-2*x*d^-1*(a+a*sin(c+d*x))^(1/2)*cot((1/2)*c+1//4*pi+(1/2)*d*x))
@test integrate(x^-1*(a+a*sin(c+d*x))^(1/2), x) == :((a+a*sin(c+d*x))^(1/2)*cos((1/2)*c+1//4*pi)*csc((1/2)*c+1//4*pi+(1/2)*d*x)*sinintegral((1/2)*d*x)+(a+a*sin(c+d*x))^(1/2)*cosintegral((1/2)*d*x)*csc((1/2)*c+1//4*pi+(1/2)*d*x)*sin((1/2)*c+1//4*pi))
@test integrate(x^-2*(a+a*sin(c+d*x))^(1/2), x) == :(-1*x^-1*(a+a*sin(c+d*x))^(1/2)+(1/2)*d*(a+a*sin(c+d*x))^(1/2)*cos((1/2)*c+1//4*pi)*cosintegral((1/2)*d*x)*csc((1/2)*c+1//4*pi+(1/2)*d*x)+-1//2*d*(a+a*sin(c+d*x))^(1/2)*csc((1/2)*c+1//4*pi+(1/2)*d*x)*sin((1/2)*c+1//4*pi)*sinintegral((1/2)*d*x))
@test integrate(x^-3*(a+a*sin(c+d*x))^(1/2), x) == :(-1//2*x^-2*(a+a*sin(c+d*x))^(1/2)+-1//4*d*x^-1*(a+a*sin(c+d*x))^(1/2)*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-1//8*d^2*(a+a*sin(c+d*x))^(1/2)*cos((1/2)*c+1//4*pi)*csc((1/2)*c+1//4*pi+(1/2)*d*x)*sinintegral((1/2)*d*x)+-1//8*d^2*(a+a*sin(c+d*x))^(1/2)*cosintegral((1/2)*d*x)*csc((1/2)*c+1//4*pi+(1/2)*d*x)*sin((1/2)*c+1//4*pi))
@test integrate(x^3*(a+a*sin(e+f*x))^3//2, x) == :(-1280//9*a*f^-4*(a+a*sin(e+f*x))^(1/2)+16*a*f^-2*x^2*(a+a*sin(e+f*x))^(1/2)+-64//27*a*f^-4*(a+a*sin(e+f*x))^(1/2)*sin((1/2)*e+1//4*pi+(1/2)*f*x)^2+-8//3*a*f^-1*x^3*(a+a*sin(e+f*x))^(1/2)*cot((1/2)*e+1//4*pi+(1/2)*f*x)+8//3*a*f^-2*x^2*(a+a*sin(e+f*x))^(1/2)*sin((1/2)*e+1//4*pi+(1/2)*f*x)^2+640//9*a*x*f^-3*(a+a*sin(e+f*x))^(1/2)*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-4//3*a*f^-1*x^3*(a+a*sin(e+f*x))^(1/2)*cos((1/2)*e+1//4*pi+(1/2)*f*x)*sin((1/2)*e+1//4*pi+(1/2)*f*x)+32//9*a*x*f^-3*(a+a*sin(e+f*x))^(1/2)*cos((1/2)*e+1//4*pi+(1/2)*f*x)*sin((1/2)*e+1//4*pi+(1/2)*f*x))
@test integrate(x^2*(a+a*sin(e+f*x))^3//2, x) == :(32//3*a*x*f^-2*(a+a*sin(e+f*x))^(1/2)+224//9*a*f^-3*(a+a*sin(e+f*x))^(1/2)*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-32//27*a*f^-3*(a+a*sin(e+f*x))^(1/2)*cos((1/2)*e+1//4*pi+(1/2)*f*x)^2*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-8//3*a*f^-1*x^2*(a+a*sin(e+f*x))^(1/2)*cot((1/2)*e+1//4*pi+(1/2)*f*x)+16//9*a*x*f^-2*(a+a*sin(e+f*x))^(1/2)*sin((1/2)*e+1//4*pi+(1/2)*f*x)^2+-4//3*a*f^-1*x^2*(a+a*sin(e+f*x))^(1/2)*cos((1/2)*e+1//4*pi+(1/2)*f*x)*sin((1/2)*e+1//4*pi+(1/2)*f*x))
@test integrate(x*(a+a*sin(e+f*x))^3//2, x) == :(16//3*a*f^-2*(a+a*sin(e+f*x))^(1/2)+8//9*a*f^-2*(a+a*sin(e+f*x))^(1/2)*sin((1/2)*e+1//4*pi+(1/2)*f*x)^2+-8//3*a*x*f^-1*(a+a*sin(e+f*x))^(1/2)*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-4//3*a*x*f^-1*(a+a*sin(e+f*x))^(1/2)*cos((1/2)*e+1//4*pi+(1/2)*f*x)*sin((1/2)*e+1//4*pi+(1/2)*f*x))
@test integrate(x^-1*(a+a*sin(e+f*x))^3//2, x) == :((1/2)*a*(a+a*sin(e+f*x))^(1/2)*csc((1/2)*e+1//4*pi+(1/2)*f*x)*sin(1//4*pi+3//2*e)*sinintegral(3//2*f*x)+-1//2*a*(a+a*sin(e+f*x))^(1/2)*cos(1//4*pi+3//2*e)*cosintegral(3//2*f*x)*csc((1/2)*e+1//4*pi+(1/2)*f*x)+3//2*a*(a+a*sin(e+f*x))^(1/2)*cos((1/2)*e+1//4*pi)*csc((1/2)*e+1//4*pi+(1/2)*f*x)*sinintegral((1/2)*f*x)+3//2*a*(a+a*sin(e+f*x))^(1/2)*cosintegral((1/2)*f*x)*csc((1/2)*e+1//4*pi+(1/2)*f*x)*sin((1/2)*e+1//4*pi))
@test integrate(x^-2*(a+a*sin(e+f*x))^3//2, x) == :(-2*a*x^-1*(a+a*sin(e+f*x))^(1/2)*sin((1/2)*e+1//4*pi+(1/2)*f*x)^2+-3//4*a*f*(a+a*sin(e+f*x))^(1/2)*csc((1/2)*e+1//4*pi+(1/2)*f*x)*sin((1/2)*e+1//4*pi)*sinintegral((1/2)*f*x)+3//4*a*f*(a+a*sin(e+f*x))^(1/2)*cos((1/2)*e+1//4*pi)*cosintegral((1/2)*f*x)*csc((1/2)*e+1//4*pi+(1/2)*f*x)+3//4*a*f*(a+a*sin(e+f*x))^(1/2)*cos(1//4*pi+3//2*e)*csc((1/2)*e+1//4*pi+(1/2)*f*x)*sinintegral(3//2*f*x)+3//4*a*f*(a+a*sin(e+f*x))^(1/2)*cosintegral(3//2*f*x)*csc((1/2)*e+1//4*pi+(1/2)*f*x)*sin(1//4*pi+3//2*e))
@test integrate(x^-3*(a+a*sin(e+f*x))^3//2, x) == :(-1*a*x^-2*(a+a*sin(e+f*x))^(1/2)*sin((1/2)*e+1//4*pi+(1/2)*f*x)^2+-9//16*a*f^2*(a+a*sin(e+f*x))^(1/2)*csc((1/2)*e+1//4*pi+(1/2)*f*x)*sin(1//4*pi+3//2*e)*sinintegral(3//2*f*x)+-3//2*a*f*x^-1*(a+a*sin(e+f*x))^(1/2)*cos((1/2)*e+1//4*pi+(1/2)*f*x)*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-3//16*a*f^2*(a+a*sin(e+f*x))^(1/2)*cos((1/2)*e+1//4*pi)*csc((1/2)*e+1//4*pi+(1/2)*f*x)*sinintegral((1/2)*f*x)+-3//16*a*f^2*(a+a*sin(e+f*x))^(1/2)*cosintegral((1/2)*f*x)*csc((1/2)*e+1//4*pi+(1/2)*f*x)*sin((1/2)*e+1//4*pi)+9//16*a*f^2*(a+a*sin(e+f*x))^(1/2)*cos(1//4*pi+3//2*e)*cosintegral(3//2*f*x)*csc((1/2)*e+1//4*pi+(1/2)*f*x))
@test integrate(x^3*(a+a*sin(c+d*x))^-1//2, x) == :(-96*im*d^-4*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(4,-1*exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+-48*x*d^-3*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(3,-1*exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+-4*d^-1*x^3*(a+a*sin(c+d*x))^-1//2*arctanh(exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+48*x*d^-3*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(3,exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+96*im*d^-4*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(4,exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+-12*im*d^-2*x^2*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(2,exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+12*im*d^-2*x^2*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(2,-1*exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x))
@test integrate(x^2*(a+a*sin(c+d*x))^-1//2, x) == :(-16*d^-3*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(3,-1*exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+16*d^-3*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(3,exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+-4*d^-1*x^2*(a+a*sin(c+d*x))^-1//2*arctanh(exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+-8*im*x*d^-2*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(2,exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+8*im*x*d^-2*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(2,-1*exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x))
@test integrate(x*(a+a*sin(c+d*x))^-1//2, x) == :(-4*im*d^-2*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(2,exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+-4*x*d^-1*(a+a*sin(c+d*x))^-1//2*arctanh(exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x)+4*im*d^-2*(a+a*sin(c+d*x))^-1//2*Polylogarithms.polylog(2,-1*exp(1//4*im*(pi+2c+2*d*x)))*sin((1/2)*c+1//4*pi+(1/2)*d*x))
@test integrate(x^3*(a+a*sin(e+f*x))^-3//2, x) == :(-3*a^-1*f^-2*x^2*(a+a*sin(e+f*x))^-1//2+-1//2*a^-1*f^-1*x^3*(a+a*sin(e+f*x))^-1//2*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-1*a^-1*f^-1*x^3*(a+a*sin(e+f*x))^-1//2*arctanh(exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-24*im*a^-1*f^-4*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-24*im*a^-1*f^-4*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(4,-1*exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-24*x*a^-1*f^-3*(a+a*sin(e+f*x))^-1//2*arctanh(exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-12*x*a^-1*f^-3*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(3,-1*exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+12*x*a^-1*f^-3*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(3,exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+24*im*a^-1*f^-4*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,-1*exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+24*im*a^-1*f^-4*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(4,exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-3*im*a^-1*f^-2*x^2*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+3*im*a^-1*f^-2*x^2*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,-1*exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x))
@test integrate(x^2*(a+a*sin(e+f*x))^-3//2, x) == :(-2*x*a^-1*f^-2*(a+a*sin(e+f*x))^-1//2+-4*a^-1*f^-3*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(3,-1*exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-4*a^-1*f^-3*(a+a*sin(e+f*x))^-1//2*arctanh(cos((1/2)*e+1//4*pi+(1/2)*f*x))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+4*a^-1*f^-3*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(3,exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-1//2*a^-1*f^-1*x^2*(a+a*sin(e+f*x))^-1//2*cot((1/2)*e+1//4*pi+(1/2)*f*x)+-1*a^-1*f^-1*x^2*(a+a*sin(e+f*x))^-1//2*arctanh(exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-2*im*x*a^-1*f^-2*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+2*im*x*a^-1*f^-2*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,-1*exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x))
@test integrate(x*(a+a*sin(e+f*x))^-3//2, x) == :(-1*a^-1*f^-2*(a+a*sin(e+f*x))^-1//2+-1//2*x*a^-1*f^-1*(a+a*sin(e+f*x))^-1//2*cot((1/2)*e+1//4*pi+(1/2)*f*x)+im*a^-1*f^-2*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,-1*exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-1*im*a^-1*f^-2*(a+a*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x)+-1*x*a^-1*f^-1*(a+a*sin(e+f*x))^-1//2*arctanh(exp(1//4*im*(pi+2*e+2*f*x)))*sin((1/2)*e+1//4*pi+(1/2)*f*x))
@test integrate((a+a*sin(e+f*x))^3*(c+d*x)^m, x) == :(5//2*a^3*d^-1*(1+m)^-1*(c+d*x)^(1+m)+-15//8*a^3*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,im*f*d^-1*(c+d*x))*exp(-1*im*(e+-1*c*f*d^-1))+-15//8*a^3*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-1*im*f*d^-1*(c+d*x))*exp(im*(e+-1*c*f*d^-1))+1//8*3^(-1+-1m)*a^3*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,3*im*f*d^-1*(c+d*x))*exp(-3*im*(e+-1*c*f*d^-1))+1//8*3^(-1+-1m)*a^3*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-3*im*f*d^-1*(c+d*x))*exp(3*im*(e+-1*c*f*d^-1))+-3*im*2^(-3+-1m)*a^3*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,2*im*f*d^-1*(c+d*x))*exp(-2*im*(e+-1*c*f*d^-1))+3*im*2^(-3+-1m)*a^3*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-2*im*f*d^-1*(c+d*x))*exp(2*im*(e+-1*c*f*d^-1)))
@test integrate((a+a*sin(e+f*x))^2*(c+d*x)^m, x) == :(3//2*a^2*d^-1*(1+m)^-1*(c+d*x)^(1+m)+-1*a^2*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,im*f*d^-1*(c+d*x))*exp(-1*im*(e+-1*c*f*d^-1))+-1*a^2*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-1*im*f*d^-1*(c+d*x))*exp(im*(e+-1*c*f*d^-1))+im*2^(-3+-1m)*a^2*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-2*im*f*d^-1*(c+d*x))*exp(2*im*(e+-1*c*f*d^-1))+-1*im*2^(-3+-1m)*a^2*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,2*im*f*d^-1*(c+d*x))*exp(-2*im*(e+-1*c*f*d^-1)))
@test integrate((c+d*x)^m*(a+a*sin(e+f*x)), x) == :(a*d^-1*(1+m)^-1*(c+d*x)^(1+m)+-1//2*a*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,im*f*d^-1*(c+d*x))*exp(-1*im*(e+-1*c*f*d^-1))+-1//2*a*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-1*im*f*d^-1*(c+d*x))*exp(im*(e+-1*c*f*d^-1)))
@test integrate((c+d*x)^3*(a+b*sin(e+f*x)), x) == :(1//4*a*d^-1*(c+d*x)^4+-1*b*f^-1*(c+d*x)^3*cos(e+f*x)+-6*b*d^3*f^-4*sin(e+f*x)+3*b*d*f^-2*(c+d*x)^2*sin(e+f*x)+6*b*d^2*f^-3*(c+d*x)*cos(e+f*x))
@test integrate((c+d*x)^2*(a+b*sin(e+f*x)), x) == :(1//3*a*d^-1*(c+d*x)^3+-1*b*f^-1*(c+d*x)^2*cos(e+f*x)+2*b*d^2*f^-3*cos(e+f*x)+2*b*d*f^-2*(c+d*x)*sin(e+f*x))
@test integrate((a+b*sin(e+f*x))*(c+d*x), x) == :((1/2)*a*d^-1*(c+d*x)^2+b*d*f^-2*sin(e+f*x)+-1*b*f^-1*(c+d*x)*cos(e+f*x))
@test integrate((c+d*x)^-1*(a+b*sin(e+f*x)), x) == :(a*d^-1*log(c+d*x)+b*d^-1*cos(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1)+-1*b*d^-1*cosintegral(f*x+c*f*d^-1)*sin(-1*e+c*f*d^-1))
@test integrate((c+d*x)^-2*(a+b*sin(e+f*x)), x) == :(-1*a*d^-1*(c+d*x)^-1+-1*b*d^-1*(c+d*x)^-1*sin(e+f*x)+b*f*d^-2*cos(-1*e+c*f*d^-1)*cosintegral(f*x+c*f*d^-1)+b*f*d^-2*sin(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1))
@test integrate((c+d*x)^-3*(a+b*sin(e+f*x)), x) == :(-1//2*a*d^-1*(c+d*x)^-2+-1//2*b*d^-1*(c+d*x)^-2*sin(e+f*x)+(1/2)*b*d^-3*f^2*cosintegral(f*x+c*f*d^-1)*sin(-1*e+c*f*d^-1)+-1//2*b*f*d^-2*(c+d*x)^-1*cos(e+f*x)+-1//2*b*d^-3*f^2*cos(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1))
@test integrate((a+b*sin(e+f*x))^2*(c+d*x)^3, x) == :(1//4*a^2*d^-1*(c+d*x)^4+1//8*b^2*d^-1*(c+d*x)^4+-3//8*b^2*d^3*f^-4*sin(e+f*x)^2+-3//8*b^2*d^3*f^-2*x^2+-12*a*b*d^3*f^-4*sin(e+f*x)+-2*a*b*f^-1*(c+d*x)^3*cos(e+f*x)+-3//4*c*x*b^2*d^2*f^-2+-1//2*b^2*f^-1*(c+d*x)^3*cos(e+f*x)*sin(e+f*x)+3//4*d*b^2*f^-2*(c+d*x)^2*sin(e+f*x)^2+6*a*b*d*f^-2*(c+d*x)^2*sin(e+f*x)+12*a*b*d^2*f^-3*(c+d*x)*cos(e+f*x)+3//4*b^2*d^2*f^-3*(c+d*x)*cos(e+f*x)*sin(e+f*x))
@test integrate((a+b*sin(e+f*x))^2*(c+d*x)^2, x) == :(1//3*a^2*d^-1*(c+d*x)^3+1//6*b^2*d^-1*(c+d*x)^3+-1//4*x*b^2*d^2*f^-2+(1/2)*d*b^2*f^-2*sin(e+f*x)^2*(c+d*x)+-2*a*b*f^-1*(c+d*x)^2*cos(e+f*x)+4*a*b*d^2*f^-3*cos(e+f*x)+-1//2*b^2*f^-1*(c+d*x)^2*cos(e+f*x)*sin(e+f*x)+1//4*b^2*d^2*f^-3*cos(e+f*x)*sin(e+f*x)+4*a*b*d*f^-2*(c+d*x)*sin(e+f*x))
@test integrate((a+b*sin(e+f*x))^2*(c+d*x), x) == :((1/2)*c*x*b^2+(1/2)*a^2*d^-1*(c+d*x)^2+1//4*d*b^2*x^2+1//4*d*b^2*f^-2*sin(e+f*x)^2+-2*a*b*f^-1*(c+d*x)*cos(e+f*x)+2*a*b*d*f^-2*sin(e+f*x)+-1//2*b^2*f^-1*(c+d*x)*cos(e+f*x)*sin(e+f*x))
@test integrate((a+b*sin(e+f*x))^2*(c+d*x)^-1, x) == :(a^2*d^-1*log(c+d*x)+(1/2)*b^2*d^-1*log(c+d*x)+-1//2*b^2*d^-1*cos(-2*e+2*c*f*d^-1)*cosintegral(2*f*x+2*c*f*d^-1)+-1//2*b^2*d^-1*sin(-2*e+2*c*f*d^-1)*sinintegral(2*f*x+2*c*f*d^-1)+-2*a*b*d^-1*cosintegral(f*x+c*f*d^-1)*sin(-1*e+c*f*d^-1)+2*a*b*d^-1*cos(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1))
@test integrate((a+b*sin(e+f*x))^2*(c+d*x)^-2, x) == :(-1*a^2*d^-1*(c+d*x)^-1+-1*b^2*d^-1*(c+d*x)^-1*sin(e+f*x)^2+f*b^2*d^-2*cos(-2*e+2*c*f*d^-1)*sinintegral(2*f*x+2*c*f*d^-1)+-1*f*b^2*d^-2*cosintegral(2*f*x+2*c*f*d^-1)*sin(-2*e+2*c*f*d^-1)+-2*a*b*d^-1*(c+d*x)^-1*sin(e+f*x)+2*a*b*f*d^-2*cos(-1*e+c*f*d^-1)*cosintegral(f*x+c*f*d^-1)+2*a*b*f*d^-2*sin(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1))
@test integrate((a+b*sin(e+f*x))^2*(c+d*x)^-3, x) == :(-1//2*a^2*d^-1*(c+d*x)^-2+-1//2*b^2*d^-1*(c+d*x)^-2*sin(e+f*x)^2+b^2*d^-3*f^2*cos(-2*e+2*c*f*d^-1)*cosintegral(2*f*x+2*c*f*d^-1)+b^2*d^-3*f^2*sin(-2*e+2*c*f*d^-1)*sinintegral(2*f*x+2*c*f*d^-1)+-1*a*b*d^-1*(c+d*x)^-2*sin(e+f*x)+a*b*d^-3*f^2*cosintegral(f*x+c*f*d^-1)*sin(-1*e+c*f*d^-1)+-1*a*b*f*d^-2*(c+d*x)^-1*cos(e+f*x)+-1*a*b*d^-3*f^2*cos(-1*e+c*f*d^-1)*sinintegral(f*x+c*f*d^-1)+-1*f*b^2*d^-2*(c+d*x)^-1*cos(e+f*x)*sin(e+f*x))
@test integrate((a+b*sin(e+f*x))^-1*(c+d*x)^3, x) == :(-6*d^3*f^-4*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+6*d^3*f^-4*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+im*f^-1*(c+d*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-1*im*f^-1*(c+d*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-3*d*f^-2*(c+d*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+3*d*f^-2*(c+d*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-6*im*d^2*f^-3*(a^2+-1*b^2)^-1//2*(c+d*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+6*im*d^2*f^-3*(a^2+-1*b^2)^-1//2*(c+d*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x))))
@test integrate((a+b*sin(e+f*x))^-1*(c+d*x)^2, x) == :(im*f^-1*(c+d*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-1*im*f^-1*(c+d*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-2*im*d^2*f^-3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-2*d*f^-2*(a^2+-1*b^2)^-1//2*(c+d*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+2*im*d^2*f^-3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+2*d*f^-2*(a^2+-1*b^2)^-1//2*(c+d*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x))))
@test integrate((a+b*sin(e+f*x))^-1*(c+d*x), x) == :(d*f^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-1*d*f^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+im*f^-1*(a^2+-1*b^2)^-1//2*(c+d*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-1*im*f^-1*(a^2+-1*b^2)^-1//2*(c+d*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x))))
@test integrate((a+b*sin(e+f*x))^-2*(c+d*x)^3, x) == :(im*f^-1*(c+d*x)^3*(a^2+-1*b^2)^-1+-6*d^3*f^-4*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-6*d^3*f^-4*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-6*a*d^3*f^-4*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-3*d*f^-2*(c+d*x)^2*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-3*d*f^-2*(c+d*x)^2*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+6*a*d^3*f^-4*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+im*a*f^-1*(c+d*x)^3*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+b*f^-1*(a+b*sin(e+f*x))^-1*(c+d*x)^3*(a^2+-1*b^2)^-1*cos(e+f*x)+-1*im*a*f^-1*(c+d*x)^3*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-3*a*d*f^-2*(c+d*x)^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+3*a*d*f^-2*(c+d*x)^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+6*im*d^2*f^-3*(a^2+-1*b^2)^-1*(c+d*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+6*im*d^2*f^-3*(a^2+-1*b^2)^-1*(c+d*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-6*im*a*d^2*f^-3*(a^2+-1*b^2)^-3//2*(c+d*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+6*im*a*d^2*f^-3*(a^2+-1*b^2)^-3//2*(c+d*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x))))
@test integrate((a+b*sin(e+f*x))^-2*(c+d*x)^2, x) == :(im*f^-1*(c+d*x)^2*(a^2+-1*b^2)^-1+-2*d*f^-2*(a^2+-1*b^2)^-1*(c+d*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-2*d*f^-2*(a^2+-1*b^2)^-1*(c+d*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+2*im*d^2*f^-3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+2*im*d^2*f^-3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+im*a*f^-1*(c+d*x)^2*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+b*f^-1*(a+b*sin(e+f*x))^-1*(c+d*x)^2*(a^2+-1*b^2)^-1*cos(e+f*x)+-1*im*a*f^-1*(c+d*x)^2*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-2*im*a*d^2*f^-3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-2*a*d*f^-2*(a^2+-1*b^2)^-3//2*(c+d*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+2*im*a*d^2*f^-3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+2*a*d*f^-2*(a^2+-1*b^2)^-3//2*(c+d*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x))))
@test integrate((a+b*sin(e+f*x))^-2*(c+d*x), x) == :(-1*d*f^-2*(a^2+-1*b^2)^-1*log(a+b*sin(e+f*x))+a*d*f^-2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+-1*a*d*f^-2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+im*a*f^-1*(a^2+-1*b^2)^-3//2*(c+d*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x)))+b*f^-1*(a+b*sin(e+f*x))^-1*(a^2+-1*b^2)^-1*(c+d*x)*cos(e+f*x)+-1*im*a*f^-1*(a^2+-1*b^2)^-3//2*(c+d*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(e+f*x))))
@test integrate((a+b*sin(e+f*x))^3*(c+d*x)^m, x) == :(a^3*d^-1*(1+m)^-1*(c+d*x)^(1+m)+3//2*a*b^2*d^-1*(1+m)^-1*(c+d*x)^(1+m)+-3//8*b^3*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,im*f*d^-1*(c+d*x))*exp(-1*im*(e+-1*c*f*d^-1))+-3//8*b^3*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-1*im*f*d^-1*(c+d*x))*exp(im*(e+-1*c*f*d^-1))+-3//2*b*a^2*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,im*f*d^-1*(c+d*x))*exp(-1*im*(e+-1*c*f*d^-1))+-3//2*b*a^2*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-1*im*f*d^-1*(c+d*x))*exp(im*(e+-1*c*f*d^-1))+1//8*3^(-1+-1m)*b^3*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,3*im*f*d^-1*(c+d*x))*exp(-3*im*(e+-1*c*f*d^-1))+1//8*3^(-1+-1m)*b^3*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-3*im*f*d^-1*(c+d*x))*exp(3*im*(e+-1*c*f*d^-1))+-3*im*a*2^(-3+-1m)*b^2*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,2*im*f*d^-1*(c+d*x))*exp(-2*im*(e+-1*c*f*d^-1))+3*im*a*2^(-3+-1m)*b^2*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-2*im*f*d^-1*(c+d*x))*exp(2*im*(e+-1*c*f*d^-1)))
@test integrate((a+b*sin(e+f*x))^2*(c+d*x)^m, x) == :(a^2*d^-1*(1+m)^-1*(c+d*x)^(1+m)+(1/2)*b^2*d^-1*(1+m)^-1*(c+d*x)^(1+m)+-1*a*b*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,im*f*d^-1*(c+d*x))*exp(-1*im*(e+-1*c*f*d^-1))+-1*a*b*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-1*im*f*d^-1*(c+d*x))*exp(im*(e+-1*c*f*d^-1))+im*2^(-3+-1m)*b^2*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-2*im*f*d^-1*(c+d*x))*exp(2*im*(e+-1*c*f*d^-1))+-1*im*2^(-3+-1m)*b^2*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,2*im*f*d^-1*(c+d*x))*exp(-2*im*(e+-1*c*f*d^-1)))
@test integrate((c+d*x)^m*(a+b*sin(e+f*x)), x) == :(a*d^-1*(1+m)^-1*(c+d*x)^(1+m)+-1//2*b*f^-1*(im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,im*f*d^-1*(c+d*x))*exp(-1*im*(e+-1*c*f*d^-1))+-1//2*b*f^-1*(-1*im*f*d^-1*(c+d*x))^(-1m)*(c+d*x)^m*SpecialFunctions.gamma(1+m,-1*im*f*d^-1*(c+d*x))*exp(im*(e+-1*c*f*d^-1)))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*sin(c+d*x), x) == :(1//4*a^-1*f^-1*(e+f*x)^4+im*a^-1*d^-1*(e+f*x)^3+a^-1*d^-1*(e+f*x)^3*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-12*a^-1*d^-4*f^3*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+-6*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*im*exp(im*(c+d*x)))+12*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*sin(c+d*x), x) == :(1//3*a^-1*f^-1*(e+f*x)^3+im*a^-1*d^-1*(e+f*x)^2+a^-1*d^-1*(e+f*x)^2*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-4*f*a^-1*d^-2*(e+f*x)*log(1+-1*im*exp(im*(c+d*x)))+4*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)*sin(c+d*x), x) == :(e*x*a^-1+(1/2)*f*a^-1*x^2+a^-1*d^-1*(e+f*x)*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-2*f*a^-1*d^-2*log(sin((1/2)*c+1//4*pi+(1/2)*d*x)))
@test integrate((a+a*sin(c+d*x))^-1*sin(c+d*x), x) == :(x*a^-1+d^-1*(a+a*sin(c+d*x))^-1*cos(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*sin(c+d*x)^2, x) == :(-1//4*a^-1*f^-1*(e+f*x)^4+-1*im*a^-1*d^-1*(e+f*x)^3+-1*a^-1*d^-1*(e+f*x)^3*cos(c+d*x)+-1*a^-1*d^-1*(e+f*x)^3*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-6*a^-1*d^-4*f^3*sin(c+d*x)+12*a^-1*d^-4*f^3*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+3*f*a^-1*d^-2*(e+f*x)^2*sin(c+d*x)+6*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*im*exp(im*(c+d*x)))+6*a^-1*d^-3*f^2*(e+f*x)*cos(c+d*x)+-12*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*sin(c+d*x)^2, x) == :(-1//3*a^-1*f^-1*(e+f*x)^3+-1*im*a^-1*d^-1*(e+f*x)^2+-1*a^-1*d^-1*(e+f*x)^2*cos(c+d*x)+-1*a^-1*d^-1*(e+f*x)^2*cot((1/2)*c+1//4*pi+(1/2)*d*x)+2*a^-1*d^-3*f^2*cos(c+d*x)+-4*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+2*f*a^-1*d^-2*(e+f*x)*sin(c+d*x)+4*f*a^-1*d^-2*(e+f*x)*log(1+-1*im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*sin(c+d*x)^2*(e+f*x), x) == :(-1*e*x*a^-1+-1//2*f*a^-1*x^2+f*a^-1*d^-2*sin(c+d*x)+-1*a^-1*d^-1*(e+f*x)*cos(c+d*x)+-1*a^-1*d^-1*(e+f*x)*cot((1/2)*c+1//4*pi+(1/2)*d*x)+2*f*a^-1*d^-2*log(sin((1/2)*c+1//4*pi+(1/2)*d*x)))
@test integrate((a+a*sin(c+d*x))^-1*sin(c+d*x)^2, x) == :(-1*x*a^-1+-1*a^-1*d^-1*cos(c+d*x)+-1*a^-1*d^-1*(1+sin(c+d*x))^-1*cos(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*sin(c+d*x)^3, x) == :(3//8*a^-1*f^-1*(e+f*x)^4+im*a^-1*d^-1*(e+f*x)^3+a^-1*d^-1*(e+f*x)^3*cos(c+d*x)+a^-1*d^-1*(e+f*x)^3*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-12*a^-1*d^-4*f^3*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+6*a^-1*d^-4*f^3*sin(c+d*x)+-3//8*a^-1*d^-4*f^3*sin(c+d*x)^2+-3//8*a^-1*d^-2*f^3*x^2+-6*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*im*exp(im*(c+d*x)))+-6*a^-1*d^-3*f^2*(e+f*x)*cos(c+d*x)+-3*f*a^-1*d^-2*(e+f*x)^2*sin(c+d*x)+-3//4*e*x*a^-1*d^-2*f^2+-1//2*a^-1*d^-1*(e+f*x)^3*cos(c+d*x)*sin(c+d*x)+3//4*f*a^-1*d^-2*(e+f*x)^2*sin(c+d*x)^2+12*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+3//4*a^-1*d^-3*f^2*(e+f*x)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*sin(c+d*x)^3, x) == :((1/2)*a^-1*f^-1*(e+f*x)^3+im*a^-1*d^-1*(e+f*x)^2+a^-1*d^-1*(e+f*x)^2*cos(c+d*x)+a^-1*d^-1*(e+f*x)^2*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-2*a^-1*d^-3*f^2*cos(c+d*x)+-1//4*x*a^-1*d^-2*f^2+(1/2)*f*a^-1*d^-2*sin(c+d*x)^2*(e+f*x)+-4*f*a^-1*d^-2*(e+f*x)*log(1+-1*im*exp(im*(c+d*x)))+-2*f*a^-1*d^-2*(e+f*x)*sin(c+d*x)+4*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-1//2*a^-1*d^-1*(e+f*x)^2*cos(c+d*x)*sin(c+d*x)+1//4*a^-1*d^-3*f^2*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*sin(c+d*x)^3*(e+f*x), x) == :(3//2*e*x*a^-1+3//4*f*a^-1*x^2+a^-1*d^-1*(e+f*x)*cos(c+d*x)+a^-1*d^-1*(e+f*x)*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-1*f*a^-1*d^-2*sin(c+d*x)+-2*f*a^-1*d^-2*log(sin((1/2)*c+1//4*pi+(1/2)*d*x))+1//4*f*a^-1*d^-2*sin(c+d*x)^2+-1//2*a^-1*d^-1*(e+f*x)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*sin(c+d*x)^3, x) == :(3//2*x*a^-1+2*a^-1*d^-1*cos(c+d*x)+d^-1*(a+a*sin(c+d*x))^-1*sin(c+d*x)^2*cos(c+d*x)+-3//2*a^-1*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*csc(c+d*x), x) == :(im*a^-1*d^-1*(e+f*x)^3+a^-1*d^-1*(e+f*x)^3*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-12*a^-1*d^-4*f^3*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+-2*a^-1*d^-1*(e+f*x)^3*arctanh(exp(im*(c+d*x)))+-6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,-1*exp(im*(c+d*x)))+-6*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*im*exp(im*(c+d*x)))+-6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,exp(im*(c+d*x)))+6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+12*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*csc(c+d*x), x) == :(im*a^-1*d^-1*(e+f*x)^2+a^-1*d^-1*(e+f*x)^2*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-2*a^-1*d^-1*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+-2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-4*f*a^-1*d^-2*(e+f*x)*log(1+-1*im*exp(im*(c+d*x)))+4*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x)))+2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)*csc(c+d*x), x) == :(a^-1*d^-1*(e+f*x)*cot((1/2)*c+1//4*pi+(1/2)*d*x)+a^-1*d^-1*(-2*e+-2*f*x)*arctanh(exp(im*(c+d*x)))+-2*f*a^-1*d^-2*log(sin((1/2)*c+1//4*pi+(1/2)*d*x))+im*f*a^-1*d^-2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-1*im*f*a^-1*d^-2*Polylogarithms.polylog(2,exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*csc(c+d*x), x) == :(d^-1*(a+a*sin(c+d*x))^-1*cos(c+d*x)+-1*a^-1*d^-1*arctanh(cos(c+d*x)))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*csc(c+d*x)^2, x) == :(-1*a^-1*d^-1*(e+f*x)^3*cot(c+d*x)+-1*a^-1*d^-1*(e+f*x)^3*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-2*im*a^-1*d^-1*(e+f*x)^3+2*a^-1*d^-1*(e+f*x)^3*arctanh(exp(im*(c+d*x)))+12*a^-1*d^-4*f^3*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+3//2*a^-1*d^-4*f^3*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+-6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,exp(im*(c+d*x)))+-6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(im*(c+d*x)))+3*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*exp(2*im*(c+d*x)))+6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,-1*exp(im*(c+d*x)))+6*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*im*exp(im*(c+d*x)))+6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+-12*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-3*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*csc(c+d*x)^2, x) == :(-1*a^-1*d^-1*(e+f*x)^2*cot(c+d*x)+-1*a^-1*d^-1*(e+f*x)^2*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-2*im*a^-1*d^-1*(e+f*x)^2+-2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,exp(im*(c+d*x)))+2*a^-1*d^-1*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+-1*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+-4*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+2*f*a^-1*d^-2*(e+f*x)*log(1+-1*exp(2*im*(c+d*x)))+4*f*a^-1*d^-2*(e+f*x)*log(1+-1*im*exp(im*(c+d*x)))+-2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*csc(c+d*x)^2*(e+f*x), x) == :(f*a^-1*d^-2*log(sin(c+d*x))+a^-1*d^-1*(2*e+2*f*x)*arctanh(exp(im*(c+d*x)))+-1*a^-1*d^-1*(e+f*x)*cot(c+d*x)+-1*a^-1*d^-1*(e+f*x)*cot((1/2)*c+1//4*pi+(1/2)*d*x)+2*f*a^-1*d^-2*log(sin((1/2)*c+1//4*pi+(1/2)*d*x))+im*f*a^-1*d^-2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+-1*im*f*a^-1*d^-2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*csc(c+d*x)^2, x) == :(a^-1*d^-1*arctanh(cos(c+d*x))+d^-1*(a+a*sin(c+d*x))^-1*cot(c+d*x)+-2*a^-1*d^-1*cot(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*csc(c+d*x)^3, x) == :(a^-1*d^-1*(e+f*x)^3*cot(c+d*x)+a^-1*d^-1*(e+f*x)^3*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-12*a^-1*d^-4*f^3*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+-3*a^-1*d^-1*(e+f*x)^3*arctanh(exp(im*(c+d*x)))+2*im*a^-1*d^-1*(e+f*x)^3+-3//2*a^-1*d^-4*f^3*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+-9*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,-1*exp(im*(c+d*x)))+-9*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+-6*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*im*exp(im*(c+d*x)))+-6*a^-1*d^-3*f^2*(e+f*x)*arctanh(exp(im*(c+d*x)))+-3*im*a^-1*d^-4*f^3*Polylogarithms.polylog(2,exp(im*(c+d*x)))+-3*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*exp(2*im*(c+d*x)))+3*im*a^-1*d^-4*f^3*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+9*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,exp(im*(c+d*x)))+9*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-3//2*f*a^-1*d^-2*(e+f*x)^2*csc(c+d*x)+-1//2*a^-1*d^-1*(e+f*x)^3*cot(c+d*x)*csc(c+d*x)+3*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+12*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-9//2*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+9//2*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*csc(c+d*x)^3, x) == :(a^-1*d^-1*(e+f*x)^2*cot(c+d*x)+a^-1*d^-1*(e+f*x)^2*cot((1/2)*c+1//4*pi+(1/2)*d*x)+-1*a^-1*d^-3*f^2*arctanh(cos(c+d*x))+-3*a^-1*d^-1*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+-3*a^-1*d^-3*f^2*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+2*im*a^-1*d^-1*(e+f*x)^2+3*a^-1*d^-3*f^2*Polylogarithms.polylog(3,exp(im*(c+d*x)))+im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+-1*f*a^-1*d^-2*(e+f*x)*csc(c+d*x)+-4*f*a^-1*d^-2*(e+f*x)*log(1+-1*im*exp(im*(c+d*x)))+-2*f*a^-1*d^-2*(e+f*x)*log(1+-1*exp(2*im*(c+d*x)))+4*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-1//2*a^-1*d^-1*(e+f*x)^2*cot(c+d*x)*csc(c+d*x)+-3*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x)))+3*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*csc(c+d*x)^3*(e+f*x), x) == :(a^-1*d^-1*(e+f*x)*cot(c+d*x)+a^-1*d^-1*(e+f*x)*cot((1/2)*c+1//4*pi+(1/2)*d*x)+a^-1*d^-1*(-3*e+-3*f*x)*arctanh(exp(im*(c+d*x)))+-1*f*a^-1*d^-2*log(sin(c+d*x))+-2*f*a^-1*d^-2*log(sin((1/2)*c+1//4*pi+(1/2)*d*x))+-1//2*f*a^-1*d^-2*csc(c+d*x)+-3//2*im*f*a^-1*d^-2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+-1//2*a^-1*d^-1*(e+f*x)*cot(c+d*x)*csc(c+d*x)+3//2*im*f*a^-1*d^-2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*csc(c+d*x)^3, x) == :(2*a^-1*d^-1*cot(c+d*x)+-3//2*a^-1*d^-1*arctanh(cos(c+d*x))+d^-1*(a+a*sin(c+d*x))^-1*cot(c+d*x)*csc(c+d*x)+-3//2*a^-1*d^-1*cot(c+d*x)*csc(c+d*x))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*sin(c+d*x), x) == :(1//4*b^-1*f^-1*(e+f*x)^4+-6*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*a*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*a*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*sin(c+d*x), x) == :(1//3*b^-1*f^-1*(e+f*x)^3+im*a*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*a*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*a*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)*sin(c+d*x), x) == :(e*x*b^-1+(1/2)*f*b^-1*x^2+a*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a*b^-1*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a*b^-1*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*sin(c+d*x), x) == :(x*b^-1+-2*a*b^-1*d^-1*(a^2+-1*b^2)^-1//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*sin(c+d*x)^2, x) == :(-1*b^-1*d^-1*(e+f*x)^3*cos(c+d*x)+-6*b^-1*d^-4*f^3*sin(c+d*x)+-1//4*a*b^-2*f^-1*(e+f*x)^4+3*f*b^-1*d^-2*(e+f*x)^2*sin(c+d*x)+6*b^-1*d^-3*f^2*(e+f*x)*cos(c+d*x)+-6*a^2*b^-2*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*a^2*b^-2*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^2*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^2*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*a^2*b^-2*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*a^2*b^-2*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^2*b^-2*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^2*b^-2*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*sin(c+d*x)^2, x) == :(-1*b^-1*d^-1*(e+f*x)^2*cos(c+d*x)+2*b^-1*d^-3*f^2*cos(c+d*x)+-1//3*a*b^-2*f^-1*(e+f*x)^3+2*f*b^-1*d^-2*(e+f*x)*sin(c+d*x)+im*a^2*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^2*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*a^2*b^-2*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*a^2*b^-2*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*a^2*b^-2*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*f*a^2*b^-2*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*sin(c+d*x)^2*(e+f*x), x) == :(f*b^-1*d^-2*sin(c+d*x)+-1*a*e*x*b^-2+-1*b^-1*d^-1*(e+f*x)*cos(c+d*x)+-1//2*a*f*b^-2*x^2+f*a^2*b^-2*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*f*a^2*b^-2*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^2*b^-2*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^2*b^-2*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*sin(c+d*x)^2, x) == :(-1*a*x*b^-2+-1*b^-1*d^-1*cos(c+d*x)+2*a^2*b^-2*d^-1*(a^2+-1*b^2)^-1//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*sin(c+d*x)^3, x) == :(1//8*b^-1*f^-1*(e+f*x)^4+-3//8*b^-1*d^-4*f^3*sin(c+d*x)^2+-3//8*b^-1*d^-2*f^3*x^2+1//4*a^2*b^-3*f^-1*(e+f*x)^4+a*b^-2*d^-1*(e+f*x)^3*cos(c+d*x)+6*a*b^-2*d^-4*f^3*sin(c+d*x)+-3//4*e*x*b^-1*d^-2*f^2+-1//2*b^-1*d^-1*(e+f*x)^3*cos(c+d*x)*sin(c+d*x)+3//4*f*b^-1*d^-2*(e+f*x)^2*sin(c+d*x)^2+-6*a*b^-2*d^-3*f^2*(e+f*x)*cos(c+d*x)+-6*a^3*b^-3*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*a*f*b^-2*d^-2*(e+f*x)^2*sin(c+d*x)+6*a^3*b^-3*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//4*b^-1*d^-3*f^2*(e+f*x)*cos(c+d*x)*sin(c+d*x)+im*a^3*b^-3*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^3*b^-3*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*a^3*b^-3*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*a^3*b^-3*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^3*b^-3*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^3*b^-3*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*sin(c+d*x)^3, x) == :(1//6*b^-1*f^-1*(e+f*x)^3+-1//4*x*b^-1*d^-2*f^2+1//3*a^2*b^-3*f^-1*(e+f*x)^3+a*b^-2*d^-1*(e+f*x)^2*cos(c+d*x)+(1/2)*f*b^-1*d^-2*sin(c+d*x)^2*(e+f*x)+-2*a*b^-2*d^-3*f^2*cos(c+d*x)+-1//2*b^-1*d^-1*(e+f*x)^2*cos(c+d*x)*sin(c+d*x)+1//4*b^-1*d^-3*f^2*cos(c+d*x)*sin(c+d*x)+-2*a*f*b^-2*d^-2*(e+f*x)*sin(c+d*x)+im*a^3*b^-3*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^3*b^-3*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*a^3*b^-3*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*a^3*b^-3*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*a^3*b^-3*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*f*a^3*b^-3*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*sin(c+d*x)^3*(e+f*x), x) == :((1/2)*e*x*b^-1+1//4*f*b^-1*x^2+e*x*a^2*b^-3+(1/2)*f*a^2*b^-3*x^2+1//4*f*b^-1*d^-2*sin(c+d*x)^2+a*b^-2*d^-1*(e+f*x)*cos(c+d*x)+-1*a*f*b^-2*d^-2*sin(c+d*x)+-1//2*b^-1*d^-1*(e+f*x)*cos(c+d*x)*sin(c+d*x)+f*a^3*b^-3*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*f*a^3*b^-3*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^3*b^-3*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^3*b^-3*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*sin(c+d*x)^3, x) == :((1/2)*x*b^-3*(b^2+2*a^2)+a*b^-2*d^-1*cos(c+d*x)+-1//2*b^-1*d^-1*cos(c+d*x)*sin(c+d*x)+-2*a^3*b^-3*d^-1*(a^2+-1*b^2)^-1//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*csc(c+d*x), x) == :(-2*a^-1*d^-1*(e+f*x)^3*arctanh(exp(im*(c+d*x)))+-6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,-1*exp(im*(c+d*x)))+-6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,exp(im*(c+d*x)))+6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-6*b*a^-1*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+6*b*a^-1*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*b*a^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*b*a^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*b*f*a^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*b*f*a^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*b*a^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*b*a^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*csc(c+d*x), x) == :(-2*a^-1*d^-1*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+-2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x)))+2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+im*b*a^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*b*a^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*b*a^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*b*f*a^-1*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*b*a^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*b*f*a^-1*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)*csc(c+d*x), x) == :(a^-1*d^-1*(-2*e+-2*f*x)*arctanh(exp(im*(c+d*x)))+im*f*a^-1*d^-2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-1*im*f*a^-1*d^-2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+b*f*a^-1*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b*f*a^-1*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*b*a^-1*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*b*a^-1*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*csc(c+d*x), x) == :(-1*a^-1*d^-1*arctanh(cos(c+d*x))+-2*b*a^-1*d^-1*(a^2+-1*b^2)^-1//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*csc(c+d*x)^2, x) == :(-1*im*a^-1*d^-1*(e+f*x)^3+-1*a^-1*d^-1*(e+f*x)^3*cot(c+d*x)+3//2*a^-1*d^-4*f^3*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+2*b*a^-2*d^-1*(e+f*x)^3*arctanh(exp(im*(c+d*x)))+3*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*exp(2*im*(c+d*x)))+-6*im*b*a^-2*d^-4*f^3*Polylogarithms.polylog(4,exp(im*(c+d*x)))+-6*b*a^-2*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-6*a^-2*b^2*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+6*im*b*a^-2*d^-4*f^3*Polylogarithms.polylog(4,-1*exp(im*(c+d*x)))+6*b*a^-2*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+6*a^-2*b^2*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^-2*b^2*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-2*b^2*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*b*f*a^-2*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-3*f*a^-2*b^2*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*b*f*a^-2*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+3*f*a^-2*b^2*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^-2*b^2*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^-2*b^2*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*csc(c+d*x)^2, x) == :(-1*im*a^-1*d^-1*(e+f*x)^2+-1*a^-1*d^-1*(e+f*x)^2*cot(c+d*x)+-1*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+-2*b*a^-2*d^-3*f^2*Polylogarithms.polylog(3,exp(im*(c+d*x)))+2*b*a^-2*d^-1*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+2*b*a^-2*d^-3*f^2*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+2*f*a^-1*d^-2*(e+f*x)*log(1+-1*exp(2*im*(c+d*x)))+im*a^-2*b^2*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-2*b^2*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*b*f*a^-2*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-2*im*a^-2*b^2*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*a^-2*b^2*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*b*f*a^-2*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x)))+2*im*a^-2*b^2*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*f*a^-2*b^2*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*csc(c+d*x)^2*(e+f*x), x) == :(f*a^-1*d^-2*log(sin(c+d*x))+-1*a^-1*d^-1*(e+f*x)*cot(c+d*x)+2*b*a^-2*d^-1*(e+f*x)*arctanh(exp(im*(c+d*x)))+im*b*f*a^-2*d^-2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+f*a^-2*b^2*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*b*f*a^-2*d^-2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-1*f*a^-2*b^2*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^-2*b^2*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-2*b^2*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*csc(c+d*x)^2, x) == :(-1*a^-1*d^-1*cot(c+d*x)+b*a^-2*d^-1*arctanh(cos(c+d*x))+2*a^-2*b^2*d^-1*(a^2+-1*b^2)^-1//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-2*(e+f*x)*sin(c+d*x), x) == :(f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*b^-1*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a*f*b^-1*d^-2*(a^2+-1*b^2)^-1*log(a+b*sin(c+d*x))+f*a^2*b^-1*d^-2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*b^-1*d^-1*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a*d^-1*(a+b*sin(c+d*x))^-1*(a^2+-1*b^2)^-1*(e+f*x)*cos(c+d*x)+-1*f*a^2*b^-1*d^-2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^2*b^-1*d^-1*(a^2+-1*b^2)^-3//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^2*b^-1*d^-1*(a^2+-1*b^2)^-3//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-2*(e+f*x)^2*sin(c+d*x), x) == :(im*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1+-1*im*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a*d^-1*(a+b*sin(c+d*x))^-1*(e+f*x)^2*(a^2+-1*b^2)^-1*cos(c+d*x)+-2*im*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^2*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^2*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*a^2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*a^2*b^-1*d^-2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*a^2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*a*f*b^-1*d^-2*(a^2+-1*b^2)^-1*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*a*f*b^-1*d^-2*(a^2+-1*b^2)^-1*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*f*a^2*b^-1*d^-2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-2*(e+f*x)^3*sin(c+d*x), x) == :(-6*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1+-1*im*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a*d^-1*(a+b*sin(c+d*x))^-1*(e+f*x)^3*(a^2+-1*b^2)^-1*cos(c+d*x)+-6*a^2*b^-1*d^-4*f^3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*a^2*b^-1*d^-4*f^3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^2*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^2*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*a^2*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*a*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*a*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*a^2*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-3*(e+f*x)*sin(c+d*x), x) == :(d^-1*(a+b*sin(c+d*x))^-1*(a^2+-1*b^2)^-1*(e+f*x)*cos(c+d*x)+-1*f*b^-1*d^-2*(a^2+-1*b^2)^-1*log(a+b*sin(c+d*x))+-1*a*d^-1*(a+b*sin(c+d*x))^-2*(-2*b^2+2*a^2)^-1*(e+f*x)*cos(c+d*x)+-3//2*a*f*b^-1*d^-2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*f*a^3*b^-1*d^-2*(a^2+-1*b^2)^-5//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*a^2*d^-1*(a+b*sin(c+d*x))^-1*(a^2+-1*b^2)^-2*(e+f*x)*cos(c+d*x)+-1//2*a*f*b^-1*d^-2*(a+b*sin(c+d*x))^-1*(a^2+-1*b^2)^-1+3//2*a*f*b^-1*d^-2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//2*f*a^2*b^-1*d^-2*(a^2+-1*b^2)^-2*log(a+b*sin(c+d*x))+3//2*f*a^3*b^-1*d^-2*(a^2+-1*b^2)^-5//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*im*a*b^-1*d^-1*(a^2+-1*b^2)^-3//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*im*a^3*b^-1*d^-1*(a^2+-1*b^2)^-5//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//2*im*a*b^-1*d^-1*(a^2+-1*b^2)^-3//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//2*im*a^3*b^-1*d^-1*(a^2+-1*b^2)^-5//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-3*(e+f*x)^2*sin(c+d*x), x) == :(im*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1+d^-1*(a+b*sin(c+d*x))^-1*(e+f*x)^2*(a^2+-1*b^2)^-1*cos(c+d*x)+-1*a*d^-1*(a+b*sin(c+d*x))^-2*(e+f*x)^2*(-2*b^2+2*a^2)^-1*cos(c+d*x)+-2*f*b^-1*d^-2*(a^2+-1*b^2)^-1*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*b^-1*d^-2*(a^2+-1*b^2)^-1*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x)))+-3//2*im*a^2*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-2+-3//2*a^2*d^-1*(a+b*sin(c+d*x))^-1*(e+f*x)^2*(a^2+-1*b^2)^-2*cos(c+d*x)+-1*a*f*b^-1*d^-2*(a+b*sin(c+d*x))^-1*(a^2+-1*b^2)^-1*(e+f*x)+-3*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*a^2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*a^2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*a^3*b^-1*d^-3*f^2*(a^2+-1*b^2)^-5//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*a*f*b^-1*d^-2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*a^3*b^-1*d^-2*(a^2+-1*b^2)^-5//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*a^3*b^-1*d^-3*f^2*(a^2+-1*b^2)^-5//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*a*f*b^-1*d^-2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*a^2*b^-1*d^-2*(a^2+-1*b^2)^-2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*a^2*b^-1*d^-2*(a^2+-1*b^2)^-2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*a^3*b^-1*d^-2*(a^2+-1*b^2)^-5//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*im*a*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*im*a^3*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-5//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//2*im*a*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//2*im*a^3*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-5//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-3*(e+f*x)^3*sin(c+d*x), x) == :(im*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1+d^-1*(a+b*sin(c+d*x))^-1*(e+f*x)^3*(a^2+-1*b^2)^-1*cos(c+d*x)+-6*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a*d^-1*(a+b*sin(c+d*x))^-2*(e+f*x)^3*(-2*b^2+2*a^2)^-1*cos(c+d*x)+-9*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-9*a^3*b^-1*d^-4*f^3*(a^2+-1*b^2)^-5//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9*a^2*b^-1*d^-4*f^3*(a^2+-1*b^2)^-2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9*a^2*b^-1*d^-4*f^3*(a^2+-1*b^2)^-2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9*a^3*b^-1*d^-4*f^3*(a^2+-1*b^2)^-5//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*im*a^2*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-2+-3//2*a^2*d^-1*(a+b*sin(c+d*x))^-1*(e+f*x)^3*(a^2+-1*b^2)^-2*cos(c+d*x)+6*im*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-9//2*a*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-9//2*f*a^3*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-5//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*im*a*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*im*a^3*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-5//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*a*f*b^-1*d^-2*(a+b*sin(c+d*x))^-1*(e+f*x)^2*(a^2+-1*b^2)^-1+3//2*im*a*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//2*im*a^3*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-5//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9//2*a*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9//2*f*a^2*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9//2*f*a^2*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9//2*f*a^3*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-5//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-9*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-9*im*a^2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-9*im*a^2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-9*im*a^3*b^-1*d^-3*f^2*(a^2+-1*b^2)^-5//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9*im*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+9*im*a^3*b^-1*d^-3*f^2*(a^2+-1*b^2)^-5//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x), x) == :(2*a^-1*d^-1*(e+f*x)^3*log(1+-1*im*exp(im*(c+d*x)))+-1//4*im*a^-1*f^-1*(e+f*x)^4+12*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,im*exp(im*(c+d*x)))+12*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+-6*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x), x) == :(2*a^-1*d^-1*(e+f*x)^2*log(1+-1*im*exp(im*(c+d*x)))+4*a^-1*d^-3*f^2*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+-1//3*im*a^-1*f^-1*(e+f*x)^3+-4*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)*cos(c+d*x), x) == :(a^-1*d^-1*(2*e+2*f*x)*log(1+-1*im*exp(im*(c+d*x)))+-1//2*im*a^-1*f^-1*(e+f*x)^2+-2*im*f*a^-1*d^-2*Polylogarithms.polylog(2,im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*cos(c+d*x), x) == :(a^-1*d^-1*log(1+sin(c+d*x)))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x)^2, x) == :(1//4*a^-1*f^-1*(e+f*x)^4+a^-1*d^-1*(e+f*x)^3*cos(c+d*x)+6*a^-1*d^-4*f^3*sin(c+d*x)+-6*a^-1*d^-3*f^2*(e+f*x)*cos(c+d*x)+-3*f*a^-1*d^-2*(e+f*x)^2*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x)^2, x) == :(1//3*a^-1*f^-1*(e+f*x)^3+a^-1*d^-1*(e+f*x)^2*cos(c+d*x)+-2*a^-1*d^-3*f^2*cos(c+d*x)+-2*f*a^-1*d^-2*(e+f*x)*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*cos(c+d*x)^2*(e+f*x), x) == :(e*x*a^-1+(1/2)*f*a^-1*x^2+a^-1*d^-1*(e+f*x)*cos(c+d*x)+-1*f*a^-1*d^-2*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*cos(c+d*x)^2, x) == :(x*a^-1+a^-1*d^-1*cos(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^-1*cos(c+d*x)^2, x) == :(a^-1*f^-1*log(e+f*x)+-1*a^-1*f^-1*cos(c+-1*d*e*f^-1)*sinintegral(d*x+d*e*f^-1)+-1*a^-1*f^-1*cosintegral(d*x+d*e*f^-1)*sin(c+-1*d*e*f^-1))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^-2*cos(c+d*x)^2, x) == :(-1*a^-1*f^-1*(e+f*x)^-1+a^-1*f^-1*(e+f*x)^-1*sin(c+d*x)+d*a^-1*f^-2*sin(c+-1*d*e*f^-1)*sinintegral(d*x+d*e*f^-1)+-1*d*a^-1*f^-2*cos(c+-1*d*e*f^-1)*cosintegral(d*x+d*e*f^-1))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x)^3, x) == :(1//4*a^-1*d^-1*(e+f*x)^3+a^-1*d^-1*(e+f*x)^3*sin(c+d*x)+-6*a^-1*d^-4*f^3*cos(c+d*x)+-3//8*x*a^-1*d^-3*f^3+-1//2*a^-1*d^-1*(e+f*x)^3*sin(c+d*x)^2+-6*a^-1*d^-3*f^2*(e+f*x)*sin(c+d*x)+3*f*a^-1*d^-2*(e+f*x)^2*cos(c+d*x)+3//4*a^-1*d^-3*f^2*sin(c+d*x)^2*(e+f*x)+3//8*a^-1*d^-4*f^3*cos(c+d*x)*sin(c+d*x)+-3//4*f*a^-1*d^-2*(e+f*x)^2*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x)^3, x) == :(a^-1*d^-1*(e+f*x)^2*sin(c+d*x)+-2*a^-1*d^-3*f^2*sin(c+d*x)+-1//2*a^-1*d^-1*(e+f*x)^2*sin(c+d*x)^2+1//4*a^-1*d^-1*f^2*x^2+1//4*a^-1*d^-3*f^2*sin(c+d*x)^2+(1/2)*e*f*x*a^-1*d^-1+2*f*a^-1*d^-2*(e+f*x)*cos(c+d*x)+-1//2*f*a^-1*d^-2*(e+f*x)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*cos(c+d*x)^3*(e+f*x), x) == :(f*a^-1*d^-2*cos(c+d*x)+a^-1*d^-1*(e+f*x)*sin(c+d*x)+-1//2*a^-1*d^-1*sin(c+d*x)^2*(e+f*x)+1//4*f*x*a^-1*d^-1+-1//4*f*a^-1*d^-2*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*cos(c+d*x)^3, x) == :(a^-1*d^-1*sin(c+d*x)+-1//2*a^-1*d^-1*sin(c+d*x)^2)
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^-1*cos(c+d*x)^3, x) == :(a^-1*f^-1*cos(c+-1*d*e*f^-1)*cosintegral(d*x+d*e*f^-1)+-1*a^-1*f^-1*sin(c+-1*d*e*f^-1)*sinintegral(d*x+d*e*f^-1)+-1//2*a^-1*f^-1*cos(2c+-2*d*e*f^-1)*sinintegral(2*d*x+2*d*e*f^-1)+-1//2*a^-1*f^-1*cosintegral(2*d*x+2*d*e*f^-1)*sin(2c+-2*d*e*f^-1))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^-2*cos(c+d*x)^3, x) == :((1/2)*a^-1*f^-1*(e+f*x)^-1*sin(2c+2*d*x)+-1*a^-1*f^-1*(e+f*x)^-1*cos(c+d*x)+d*a^-1*f^-2*sin(2c+-2*d*e*f^-1)*sinintegral(2*d*x+2*d*e*f^-1)+-1*d*a^-1*f^-2*cos(c+-1*d*e*f^-1)*sinintegral(d*x+d*e*f^-1)+-1*d*a^-1*f^-2*cos(2c+-2*d*e*f^-1)*cosintegral(2*d*x+2*d*e*f^-1)+-1*d*a^-1*f^-2*cosintegral(d*x+d*e*f^-1)*sin(c+-1*d*e*f^-1))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*sec(c+d*x), x) == :(-1//2*a^-1*d^-1*(e+f*x)^3*sec(c+d*x)^2+(1/2)*a^-1*d^-1*(e+f*x)^3*sec(c+d*x)*tan(c+d*x)+-1*im*a^-1*d^-1*(e+f*x)^3*arctan(exp(im*(c+d*x)))+-3*im*a^-1*d^-4*f^3*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-3*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,-1*im*exp(im*(c+d*x)))+-3*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*im*exp(im*(c+d*x)))+3*im*a^-1*d^-4*f^3*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x)))+3*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,im*exp(im*(c+d*x)))+3*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+3*a^-1*d^-3*f^2*(e+f*x)*log(1+exp(2*im*(c+d*x)))+-3//2*im*f*a^-1*d^-2*(e+f*x)^2+-3//2*im*a^-1*d^-4*f^3*Polylogarithms.polylog(2,-1*exp(2*im*(c+d*x)))+-3//2*f*a^-1*d^-2*(e+f*x)^2*sec(c+d*x)+3//2*f*a^-1*d^-2*(e+f*x)^2*tan(c+d*x)+-6*im*a^-1*d^-3*f^2*(e+f*x)*arctan(exp(im*(c+d*x)))+-3//2*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+3//2*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*sec(c+d*x), x) == :(a^-1*d^-3*f^2*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+a^-1*d^-3*f^2*arctanh(sin(c+d*x))+a^-1*d^-3*f^2*log(cos(c+d*x))+-1*a^-1*d^-3*f^2*Polylogarithms.polylog(3,-1*im*exp(im*(c+d*x)))+-1//2*a^-1*d^-1*(e+f*x)^2*sec(c+d*x)^2+f*a^-1*d^-2*(e+f*x)*tan(c+d*x)+(1/2)*a^-1*d^-1*(e+f*x)^2*sec(c+d*x)*tan(c+d*x)+-1*im*a^-1*d^-1*(e+f*x)^2*arctan(exp(im*(c+d*x)))+-1*f*a^-1*d^-2*(e+f*x)*sec(c+d*x)+im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x)))+-1*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)*sec(c+d*x), x) == :((1/2)*f*a^-1*d^-2*tan(c+d*x)+-1//2*f*a^-1*d^-2*sec(c+d*x)+-1//2*a^-1*d^-1*sec(c+d*x)^2*(e+f*x)+(1/2)*im*f*a^-1*d^-2*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x)))+(1/2)*a^-1*d^-1*(e+f*x)*sec(c+d*x)*tan(c+d*x)+-1*im*a^-1*d^-1*(e+f*x)*arctan(exp(im*(c+d*x)))+-1//2*im*f*a^-1*d^-2*Polylogarithms.polylog(2,im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*sec(c+d*x), x) == :(-1//2*d^-1*(a+a*sin(c+d*x))^-1+(1/2)*a^-1*d^-1*arctanh(sin(c+d*x)))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*sec(c+d*x)^2, x) == :(a^-1*d^-4*f^3*Polylogarithms.polylog(3,-1*exp(2*im*(c+d*x)))+a^-1*d^-4*f^3*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+a^-1*d^-4*f^3*arctanh(sin(c+d*x))+a^-1*d^-4*f^3*log(cos(c+d*x))+-1*a^-1*d^-4*f^3*Polylogarithms.polylog(3,-1*im*exp(im*(c+d*x)))+-2//3*im*a^-1*d^-1*(e+f*x)^3+-1//3*a^-1*d^-1*(e+f*x)^3*sec(c+d*x)^3+2//3*a^-1*d^-1*(e+f*x)^3*tan(c+d*x)+a^-1*d^-3*f^2*(e+f*x)*tan(c+d*x)+-1*a^-1*d^-3*f^2*(e+f*x)*sec(c+d*x)+2*f*a^-1*d^-2*(e+f*x)^2*log(1+exp(2*im*(c+d*x)))+-1//2*f*a^-1*d^-2*(e+f*x)^2*sec(c+d*x)^2+1//3*a^-1*d^-1*(e+f*x)^3*sec(c+d*x)^2*tan(c+d*x)+im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x)))+(1/2)*f*a^-1*d^-2*(e+f*x)^2*sec(c+d*x)*tan(c+d*x)+-1*im*f*a^-1*d^-2*(e+f*x)^2*arctan(exp(im*(c+d*x)))+-1*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-2*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(2*im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*sec(c+d*x)^2, x) == :(-2//3*im*a^-1*d^-1*(e+f*x)^2+-1//3*a^-1*d^-1*(e+f*x)^2*sec(c+d*x)^3+-1//3*a^-1*d^-3*f^2*sec(c+d*x)+1//3*a^-1*d^-3*f^2*tan(c+d*x)+2//3*a^-1*d^-1*(e+f*x)^2*tan(c+d*x)+-2//3*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,-1*exp(2*im*(c+d*x)))+-1//3*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-1//3*f*a^-1*d^-2*sec(c+d*x)^2*(e+f*x)+1//3*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x)))+1//3*a^-1*d^-1*(e+f*x)^2*sec(c+d*x)^2*tan(c+d*x)+4//3*f*a^-1*d^-2*(e+f*x)*log(1+exp(2*im*(c+d*x)))+-2//3*im*f*a^-1*d^-2*(e+f*x)*arctan(exp(im*(c+d*x)))+1//3*f*a^-1*d^-2*(e+f*x)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*sec(c+d*x)^2*(e+f*x), x) == :(-1//3*a^-1*d^-1*sec(c+d*x)^3*(e+f*x)+-1//6*f*a^-1*d^-2*sec(c+d*x)^2+1//3*a^-1*d^-1*(2*e+2*f*x)*tan(c+d*x)+1//6*f*a^-1*d^-2*arctanh(sin(c+d*x))+2//3*f*a^-1*d^-2*log(cos(c+d*x))+1//3*a^-1*d^-1*sec(c+d*x)^2*(e+f*x)*tan(c+d*x)+1//6*f*a^-1*d^-2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*sec(c+d*x)^2, x) == :(-1//3*d^-1*(a+a*sin(c+d*x))^-1*sec(c+d*x)+2//3*a^-1*d^-1*tan(c+d*x))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^3*sec(c+d*x)^3, x) == :(-1//4*a^-1*d^-1*(e+f*x)^3*sec(c+d*x)^4+-1//4*a^-1*d^-4*f^3*sec(c+d*x)+1//4*a^-1*d^-4*f^3*tan(c+d*x)+a^-1*d^-3*f^2*(e+f*x)*log(1+exp(2*im*(c+d*x)))+(1/2)*f*a^-1*d^-2*(e+f*x)^2*tan(c+d*x)+-9//4*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,-1*im*exp(im*(c+d*x)))+-9//4*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*im*exp(im*(c+d*x)))+-9//8*f*a^-1*d^-2*(e+f*x)^2*sec(c+d*x)+-5//2*im*a^-1*d^-4*f^3*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-3//4*im*a^-1*d^-1*(e+f*x)^3*arctan(exp(im*(c+d*x)))+-1//2*im*f*a^-1*d^-2*(e+f*x)^2+-1//2*im*a^-1*d^-4*f^3*Polylogarithms.polylog(2,-1*exp(2*im*(c+d*x)))+-1//4*f*a^-1*d^-2*(e+f*x)^2*sec(c+d*x)^3+-1//4*a^-1*d^-3*f^2*sec(c+d*x)^2*(e+f*x)+1//4*a^-1*d^-1*(e+f*x)^3*sec(c+d*x)^3*tan(c+d*x)+3//8*a^-1*d^-1*(e+f*x)^3*sec(c+d*x)*tan(c+d*x)+5//2*im*a^-1*d^-4*f^3*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x)))+9//4*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,im*exp(im*(c+d*x)))+9//4*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+-5*im*a^-1*d^-3*f^2*(e+f*x)*arctan(exp(im*(c+d*x)))+-9//8*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+1//4*f*a^-1*d^-2*(e+f*x)^2*sec(c+d*x)^2*tan(c+d*x)+1//4*a^-1*d^-3*f^2*(e+f*x)*sec(c+d*x)*tan(c+d*x)+9//8*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^2*sec(c+d*x)^3, x) == :(-3//4*a^-1*d^-3*f^2*Polylogarithms.polylog(3,-1*im*exp(im*(c+d*x)))+-1//4*a^-1*d^-1*(e+f*x)^2*sec(c+d*x)^4+-1//12*a^-1*d^-3*f^2*sec(c+d*x)^2+1//3*a^-1*d^-3*f^2*log(cos(c+d*x))+3//4*a^-1*d^-3*f^2*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+5//6*a^-1*d^-3*f^2*arctanh(sin(c+d*x))+-3//4*im*a^-1*d^-1*(e+f*x)^2*arctan(exp(im*(c+d*x)))+-3//4*f*a^-1*d^-2*(e+f*x)*sec(c+d*x)+-1//6*f*a^-1*d^-2*sec(c+d*x)^3*(e+f*x)+1//3*f*a^-1*d^-2*(e+f*x)*tan(c+d*x)+1//4*a^-1*d^-1*(e+f*x)^2*sec(c+d*x)^3*tan(c+d*x)+1//12*a^-1*d^-3*f^2*sec(c+d*x)*tan(c+d*x)+3//8*a^-1*d^-1*(e+f*x)^2*sec(c+d*x)*tan(c+d*x)+-3//4*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+1//6*f*a^-1*d^-2*sec(c+d*x)^2*(e+f*x)*tan(c+d*x)+3//4*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*sec(c+d*x)^3*(e+f*x), x) == :(-3//8*f*a^-1*d^-2*sec(c+d*x)+-1//4*a^-1*d^-1*sec(c+d*x)^4*(e+f*x)+-1//12*f*a^-1*d^-2*sec(c+d*x)^3+1//4*f*a^-1*d^-2*tan(c+d*x)+1//12*f*a^-1*d^-2*tan(c+d*x)^3+-3//4*im*a^-1*d^-1*(e+f*x)*arctan(exp(im*(c+d*x)))+-3//8*im*f*a^-1*d^-2*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+1//4*a^-1*d^-1*sec(c+d*x)^3*(e+f*x)*tan(c+d*x)+1//8*a^-1*d^-1*(3*e+3*f*x)*sec(c+d*x)*tan(c+d*x)+3//8*im*f*a^-1*d^-2*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x))))
@test integrate((a+a*sin(c+d*x))^-1*sec(c+d*x)^3, x) == :(-1//4*d^-1*(a+a*sin(c+d*x))^-1+1//8*d^-1*(a+-1*a*sin(c+d*x))^-1+-1//8*a*d^-1*(a+a*sin(c+d*x))^-2+3//8*a^-1*d^-1*arctanh(sin(c+d*x)))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^m*cos(c+d*x)^4, x) == :((1/2)*a^-1*f^-1*(1+m)^-1*(e+f*x)^(1+m)+1//8*a^-1*d^-1*(im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,im*d*f^-1*(e+f*x))*exp(-1*im*(c+-1*d*e*f^-1))+1//8*a^-1*d^-1*(-1*im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,-1*im*d*f^-1*(e+f*x))*exp(im*(c+-1*d*e*f^-1))+1//8*3^(-1+-1m)*a^-1*d^-1*(im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,3*im*d*f^-1*(e+f*x))*exp(-3*im*(c+-1*d*e*f^-1))+1//8*3^(-1+-1m)*a^-1*d^-1*(-1*im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,-3*im*d*f^-1*(e+f*x))*exp(3*im*(c+-1*d*e*f^-1))+im*2^(-3+-1m)*a^-1*d^-1*(im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,2*im*d*f^-1*(e+f*x))*exp(-2*im*(c+-1*d*e*f^-1))+-1*im*2^(-3+-1m)*a^-1*d^-1*(-1*im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,-2*im*d*f^-1*(e+f*x))*exp(2*im*(c+-1*d*e*f^-1)))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^m*cos(c+d*x)^3, x) == :(2^(-3+-1m)*a^-1*d^-1*(im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,2*im*d*f^-1*(e+f*x))*exp(-2*im*(c+-1*d*e*f^-1))+2^(-3+-1m)*a^-1*d^-1*(-1*im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,-2*im*d*f^-1*(e+f*x))*exp(2*im*(c+-1*d*e*f^-1))+(1/2)*im*a^-1*d^-1*(im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,im*d*f^-1*(e+f*x))*exp(-1*im*(c+-1*d*e*f^-1))+-1//2*im*a^-1*d^-1*(-1*im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,-1*im*d*f^-1*(e+f*x))*exp(im*(c+-1*d*e*f^-1)))
@test integrate((a+a*sin(c+d*x))^-1*(e+f*x)^m*cos(c+d*x)^2, x) == :(a^-1*f^-1*(1+m)^-1*(e+f*x)^(1+m)+(1/2)*a^-1*d^-1*(im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,im*d*f^-1*(e+f*x))*exp(-1*im*(c+-1*d*e*f^-1))+(1/2)*a^-1*d^-1*(-1*im*d*f^-1*(e+f*x))^(-1m)*(e+f*x)^m*SpecialFunctions.gamma(1+m,-1*im*d*f^-1*(e+f*x))*exp(im*(c+-1*d*e*f^-1)))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x), x) == :(b^-1*d^-1*(e+f*x)^3*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+b^-1*d^-1*(e+f*x)^3*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1//4*im*b^-1*f^-1*(e+f*x)^4+6*im*b^-1*d^-4*f^3*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*b^-1*d^-4*f^3*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*b^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*b^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*f*b^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*f*b^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x), x) == :(b^-1*d^-1*(e+f*x)^2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+b^-1*d^-1*(e+f*x)^2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*b^-1*d^-3*f^2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*b^-1*d^-3*f^2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1//3*im*b^-1*f^-1*(e+f*x)^3+-2*im*f*b^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*f*b^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)*cos(c+d*x), x) == :(b^-1*d^-1*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+b^-1*d^-1*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1//2*im*b^-1*f^-1*(e+f*x)^2+-1*im*f*b^-1*d^-2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*f*b^-1*d^-2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x), x) == :(b^-1*d^-1*log(a+b*sin(c+d*x)))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x)^2, x) == :(b^-1*d^-1*(e+f*x)^3*cos(c+d*x)+6*b^-1*d^-4*f^3*sin(c+d*x)+1//4*a*b^-2*f^-1*(e+f*x)^4+-6*b^-1*d^-3*f^2*(e+f*x)*cos(c+d*x)+-6*b^-2*d^-4*f^3*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*b^-1*d^-2*(e+f*x)^2*sin(c+d*x)+6*b^-2*d^-4*f^3*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)^(1/2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)^(1/2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*b^-2*d^-2*(e+f*x)^2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*b^-2*d^-2*(e+f*x)^2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*b^-2*d^-3*f^2*(a^2+-1*b^2)^(1/2)*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*b^-2*d^-3*f^2*(a^2+-1*b^2)^(1/2)*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x)^2, x) == :(b^-1*d^-1*(e+f*x)^2*cos(c+d*x)+-2*b^-1*d^-3*f^2*cos(c+d*x)+1//3*a*b^-2*f^-1*(e+f*x)^3+-2*f*b^-1*d^-2*(e+f*x)*sin(c+d*x)+im*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)^(1/2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)^(1/2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*b^-2*d^-3*f^2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*b^-2*d^-2*(a^2+-1*b^2)^(1/2)*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*b^-2*d^-3*f^2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*f*b^-2*d^-2*(a^2+-1*b^2)^(1/2)*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^2*(e+f*x), x) == :(a*e*x*b^-2+b^-1*d^-1*(e+f*x)*cos(c+d*x)+(1/2)*a*f*b^-2*x^2+-1*f*b^-1*d^-2*sin(c+d*x)+f*b^-2*d^-2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*f*b^-2*d^-2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*b^-2*d^-1*(a^2+-1*b^2)^(1/2)*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*b^-2*d^-1*(a^2+-1*b^2)^(1/2)*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^2, x) == :(a*x*b^-2+b^-1*d^-1*cos(c+d*x)+-2*b^-2*d^-1*(a^2+-1*b^2)^(1/2)*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x)^3, x) == :(1//4*b^-1*d^-1*(e+f*x)^3+-3//8*x*b^-1*d^-3*f^3+-1//2*b^-1*d^-1*(e+f*x)^3*sin(c+d*x)^2+a*b^-2*d^-1*(e+f*x)^3*sin(c+d*x)+-1*b^-3*d^-1*(e+f*x)^3*(a^2+-1*b^2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b^-3*d^-1*(e+f*x)^3*(a^2+-1*b^2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*a*b^-2*d^-4*f^3*cos(c+d*x)+1//4*im*b^-3*f^-1*(e+f*x)^4*(a^2+-1*b^2)+3//4*b^-1*d^-3*f^2*sin(c+d*x)^2*(e+f*x)+3//8*b^-1*d^-4*f^3*cos(c+d*x)*sin(c+d*x)+-1*b^-3*d^-3*f^2*(e+f*x)*(-6*b^2+6*a^2)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b^-3*d^-3*f^2*(e+f*x)*(-6*b^2+6*a^2)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*b^-3*d^-4*f^3*(a^2+-1*b^2)*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*b^-3*d^-4*f^3*(a^2+-1*b^2)*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*a*b^-2*d^-3*f^2*(e+f*x)*sin(c+d*x)+3*a*f*b^-2*d^-2*(e+f*x)^2*cos(c+d*x)+-3//4*f*b^-1*d^-2*(e+f*x)^2*cos(c+d*x)*sin(c+d*x)+3*im*f*b^-3*d^-2*(e+f*x)^2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*f*b^-3*d^-2*(e+f*x)^2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x)^3, x) == :(-1//2*b^-1*d^-1*(e+f*x)^2*sin(c+d*x)^2+1//4*b^-1*d^-1*f^2*x^2+1//4*b^-1*d^-3*f^2*sin(c+d*x)^2+a*b^-2*d^-1*(e+f*x)^2*sin(c+d*x)+(1/2)*e*f*x*b^-1*d^-1+-1*b^-3*d^-1*(e+f*x)^2*(a^2+-1*b^2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b^-3*d^-1*(e+f*x)^2*(a^2+-1*b^2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b^-3*d^-3*f^2*(-2*b^2+2*a^2)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b^-3*d^-3*f^2*(-2*b^2+2*a^2)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*a*b^-2*d^-3*f^2*sin(c+d*x)+1//3*im*b^-3*f^-1*(e+f*x)^3*(a^2+-1*b^2)+2*a*f*b^-2*d^-2*(e+f*x)*cos(c+d*x)+-1//2*f*b^-1*d^-2*(e+f*x)*cos(c+d*x)*sin(c+d*x)+2*im*f*b^-3*d^-2*(e+f*x)*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*f*b^-3*d^-2*(e+f*x)*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^3*(e+f*x), x) == :(-1//2*b^-1*d^-1*sin(c+d*x)^2*(e+f*x)+1//4*f*x*b^-1*d^-1+a*f*b^-2*d^-2*cos(c+d*x)+a*b^-2*d^-1*(e+f*x)*sin(c+d*x)+(1/2)*im*b^-3*f^-1*(e+f*x)^2*(a^2+-1*b^2)+-1*b^-3*d^-1*(e+f*x)*(a^2+-1*b^2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b^-3*d^-1*(e+f*x)*(a^2+-1*b^2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1//4*f*b^-1*d^-2*cos(c+d*x)*sin(c+d*x)+im*f*b^-3*d^-2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*f*b^-3*d^-2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^3, x) == :(-1//2*b^-1*d^-1*sin(c+d*x)^2+a*b^-2*d^-1*sin(c+d*x)+-1*b^-3*d^-1*(a^2+-1*b^2)*log(a+b*sin(c+d*x)))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*sec(c+d*x), x) == :(b*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1*log(1+exp(2*im*(c+d*x)))+-1*b*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(4,-1*im*exp(im*(c+d*x)))+-6*im*b*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*b*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*a*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(3,-1*im*exp(im*(c+d*x)))+-6*b*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*b*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*a*d^-1*(e+f*x)^3*(a^2+-1*b^2)^-1*arctan(exp(im*(c+d*x)))+3*im*b*d^-4*f^3*(-4*b^2+4*a^2)^-1*Polylogarithms.polylog(4,-1*exp(2*im*(c+d*x)))+3*b*d^-3*f^2*(-2*b^2+2*a^2)^-1*(e+f*x)*Polylogarithms.polylog(3,-1*exp(2*im*(c+d*x)))+6*im*a*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(4,im*exp(im*(c+d*x)))+6*a*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+-3*im*a*f*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-3*im*b*f*d^-2*(e+f*x)^2*(-2*b^2+2*a^2)^-1*Polylogarithms.polylog(2,-1*exp(2*im*(c+d*x)))+3*im*a*f*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x)))+3*im*b*f*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*b*f*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*sec(c+d*x), x) == :(b*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1*log(1+exp(2*im*(c+d*x)))+b*d^-3*f^2*(-2*b^2+2*a^2)^-1*Polylogarithms.polylog(3,-1*exp(2*im*(c+d*x)))+-1*b*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*a*d^-3*f^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,-1*im*exp(im*(c+d*x)))+-2*b*d^-3*f^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*b*d^-3*f^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*a*d^-3*f^2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(3,im*exp(im*(c+d*x)))+-2*im*a*d^-1*(e+f*x)^2*(a^2+-1*b^2)^-1*arctan(exp(im*(c+d*x)))+-1*im*b*f*d^-2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(2,-1*exp(2*im*(c+d*x)))+-2*im*a*f*d^-2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+2*im*a*f*d^-2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x)))+2*im*b*f*d^-2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*b*f*d^-2*(a^2+-1*b^2)^-1*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)*sec(c+d*x), x) == :(b*d^-1*(a^2+-1*b^2)^-1*(e+f*x)*log(1+exp(2*im*(c+d*x)))+-1*b*d^-1*(a^2+-1*b^2)^-1*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*b*d^-1*(a^2+-1*b^2)^-1*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a*f*d^-2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,-1*im*exp(im*(c+d*x)))+im*b*f*d^-2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*b*f*d^-2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a*f*d^-2*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*exp(im*(c+d*x)))+-1*im*b*f*d^-2*(-2*b^2+2*a^2)^-1*Polylogarithms.polylog(2,-1*exp(2*im*(c+d*x)))+-2*im*a*d^-1*(a^2+-1*b^2)^-1*(e+f*x)*arctan(exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*sec(c+d*x), x) == :(d^-1*(-2b+2a)^-1*log(1+sin(c+d*x))+-1*d^-1*(2a+2b)^-1*log(1+-1*sin(c+d*x))+-1*b*d^-1*(a^2+-1*b^2)^-1*log(a+b*sin(c+d*x)))
@test integrate((a+b*sin(c+d*x))^-1*sec(c+d*x)^2, x) == :(-1*d^-1*(a^2+-1*b^2)^-1*(b+-1*a*sin(c+d*x))*sec(c+d*x)+-2*b^2*d^-1*(a^2+-1*b^2)^-3//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-2*(e+f*x)*cos(c+d*x), x) == :(-1*b^-1*d^-1*(a+b*sin(c+d*x))^-1*(e+f*x)+2*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-2*(e+f*x)^2*cos(c+d*x), x) == :(-1*b^-1*d^-1*(a+b*sin(c+d*x))^-1*(e+f*x)^2+-2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*f*b^-1*d^-2*(a^2+-1*b^2)^-1//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-2*(e+f*x)^3*cos(c+d*x), x) == :(-1*b^-1*d^-1*(a+b*sin(c+d*x))^-1*(e+f*x)^3+-6*im*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-3*(e+f*x)*cos(c+d*x), x) == :(-1//2*b^-1*d^-1*(a+b*sin(c+d*x))^-2*(e+f*x)+f*d^-2*(a+b*sin(c+d*x))^-1*(-2*b^2+2*a^2)^-1*cos(c+d*x)+a*f*b^-1*d^-2*(a^2+-1*b^2)^-3//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-3*(e+f*x)^2*cos(c+d*x), x) == :(-1//2*b^-1*d^-1*(a+b*sin(c+d*x))^-2*(e+f*x)^2+-1*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*log(a+b*sin(c+d*x))+a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+f*d^-2*(a+b*sin(c+d*x))^-1*(a^2+-1*b^2)^-1*(e+f*x)*cos(c+d*x)+-1*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a*f*b^-1*d^-2*(a^2+-1*b^2)^-3//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a*f*b^-1*d^-2*(a^2+-1*b^2)^-3//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-3*(e+f*x)^3*cos(c+d*x), x) == :(-1//2*b^-1*d^-1*(a+b*sin(c+d*x))^-2*(e+f*x)^3+-3*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*b^-1*d^-3*f^2*(a^2+-1*b^2)^-1*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*b^-1*d^-4*f^3*(a^2+-1*b^2)^-1*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*d^-2*(a+b*sin(c+d*x))^-1*(e+f*x)^2*(-2*b^2+2*a^2)^-1*cos(c+d*x)+3//2*im*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-1+-3*im*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*a*b^-1*d^-4*f^3*(a^2+-1*b^2)^-3//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*a*b^-1*d^-3*f^2*(a^2+-1*b^2)^-3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*im*a*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//2*im*a*f*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^-3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x)*cot(c+d*x), x) == :(-1//4*b^-1*f^-1*(e+f*x)^4+-2*a^-1*d^-1*(e+f*x)^3*arctanh(exp(im*(c+d*x)))+-6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,-1*exp(im*(c+d*x)))+-6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,exp(im*(c+d*x)))+6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-6*a^-1*b^-1*d^-4*f^3*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+6*a^-1*b^-1*d^-4*f^3*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^-1*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^(1/2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-1*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)^(1/2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*f*a^-1*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*a^-1*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^-1*b^-1*d^-3*f^2*(a^2+-1*b^2)^(1/2)*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^-1*b^-1*d^-3*f^2*(a^2+-1*b^2)^(1/2)*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x)*cot(c+d*x), x) == :(-1//3*b^-1*f^-1*(e+f*x)^3+-2*a^-1*d^-1*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+-2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x)))+2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+im*a^-1*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^(1/2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-1*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)^(1/2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*a^-1*b^-1*d^-3*f^2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*a^-1*b^-1*d^-2*(a^2+-1*b^2)^(1/2)*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*a^-1*b^-1*d^-3*f^2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*f*a^-1*b^-1*d^-2*(a^2+-1*b^2)^(1/2)*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)*cos(c+d*x)*cot(c+d*x), x) == :(-1*e*x*b^-1+-1//2*f*b^-1*x^2+-1*a^-1*d^-1*(2*e+2*f*x)*arctanh(exp(im*(c+d*x)))+im*f*a^-1*d^-2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-1*im*f*a^-1*d^-2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+f*a^-1*b^-1*d^-2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*f*a^-1*b^-1*d^-2*(a^2+-1*b^2)^(1/2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^-1*b^-1*d^-1*(a^2+-1*b^2)^(1/2)*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-1*b^-1*d^-1*(a^2+-1*b^2)^(1/2)*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)*cot(c+d*x), x) == :(-1*x*b^-1+-1*a^-1*d^-1*arctanh(cos(c+d*x))+2*a^-1*b^-1*d^-1*(a^2+-1*b^2)^(1/2)*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x)^2*cot(c+d*x), x) == :(a^-1*d^-1*(e+f*x)^3*log(1+-1*exp(2*im*(c+d*x)))+-1*b^-1*d^-1*(e+f*x)^3*sin(c+d*x)+6*b^-1*d^-4*f^3*cos(c+d*x)+-1//4*im*a^-1*f^-1*(e+f*x)^4+-3*f*b^-1*d^-2*(e+f*x)^2*cos(c+d*x)+6*b^-1*d^-3*f^2*(e+f*x)*sin(c+d*x)+3//2*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+3//4*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,exp(2*im*(c+d*x)))+a^-1*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-1*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3//2*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+-1//4*im*a^-1*b^-2*f^-1*(e+f*x)^4*(a^2+-1*b^2)+a^-1*b^-2*d^-3*f^2*(e+f*x)*(-6*b^2+6*a^2)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-1*b^-2*d^-3*f^2*(e+f*x)*(-6*b^2+6*a^2)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^-1*b^-2*d^-4*f^3*(a^2+-1*b^2)*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^-1*b^-2*d^-4*f^3*(a^2+-1*b^2)*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*f*a^-1*b^-2*d^-2*(e+f*x)^2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*f*a^-1*b^-2*d^-2*(e+f*x)^2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x)^2*cot(c+d*x), x) == :(a^-1*d^-1*(e+f*x)^2*log(1+-1*exp(2*im*(c+d*x)))+(1/2)*a^-1*d^-3*f^2*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+-1*b^-1*d^-1*(e+f*x)^2*sin(c+d*x)+2*b^-1*d^-3*f^2*sin(c+d*x)+-1//3*im*a^-1*f^-1*(e+f*x)^3+-2*f*b^-1*d^-2*(e+f*x)*cos(c+d*x)+a^-1*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-1*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-1*b^-2*d^-3*f^2*(-2*b^2+2*a^2)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-1*b^-2*d^-3*f^2*(-2*b^2+2*a^2)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+-1//3*im*a^-1*b^-2*f^-1*(e+f*x)^3*(a^2+-1*b^2)+-2*im*f*a^-1*b^-2*d^-2*(e+f*x)*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*f*a^-1*b^-2*d^-2*(e+f*x)*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^2*(e+f*x)*cot(c+d*x), x) == :(a^-1*d^-1*(e+f*x)*log(1+-1*exp(2*im*(c+d*x)))+-1*f*b^-1*d^-2*cos(c+d*x)+-1*b^-1*d^-1*(e+f*x)*sin(c+d*x)+-1//2*im*a^-1*f^-1*(e+f*x)^2+-1//2*im*f*a^-1*d^-2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+a^-1*b^-2*d^-1*(e+f*x)*(a^2+-1*b^2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-1*b^-2*d^-1*(e+f*x)*(a^2+-1*b^2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1//2*im*a^-1*b^-2*f^-1*(e+f*x)^2*(a^2+-1*b^2)+-1*im*f*a^-1*b^-2*d^-2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*f*a^-1*b^-2*d^-2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^2*cot(c+d*x), x) == :(a^-1*d^-1*log(sin(c+d*x))+-1*b^-1*d^-1*sin(c+d*x)+a^-1*b^-2*d^-1*(a^2+-1*b^2)*log(a+b*sin(c+d*x)))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x)^3*cot(c+d*x), x) == :(-1//8*b^-1*f^-1*(e+f*x)^4+a^-1*d^-1*(e+f*x)^3*cos(c+d*x)+-2*a^-1*d^-1*(e+f*x)^3*arctanh(exp(im*(c+d*x)))+6*a^-1*d^-4*f^3*sin(c+d*x)+1//4*b^-3*f^-1*(e+f*x)^4*(a^2+-1*b^2)+3//8*b^-1*d^-4*f^3*cos(c+d*x)^2+3//8*b^-1*d^-2*f^3*x^2+-6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,-1*exp(im*(c+d*x)))+-6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+-6*a^-1*d^-3*f^2*(e+f*x)*cos(c+d*x)+-3*f*a^-1*d^-2*(e+f*x)^2*sin(c+d*x)+6*im*a^-1*d^-4*f^3*Polylogarithms.polylog(4,exp(im*(c+d*x)))+6*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-3//4*f*b^-1*d^-2*(e+f*x)^2*cos(c+d*x)^2+-1//2*b^-1*d^-1*(e+f*x)^3*cos(c+d*x)*sin(c+d*x)+3//4*e*x*b^-1*d^-2*f^2+a^-1*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)*cos(c+d*x)+a^-1*b^-2*d^-4*f^3*(-6*b^2+6*a^2)*sin(c+d*x)+-6*a^-1*b^-3*d^-4*f^3*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+3*im*f*a^-1*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+6*a^-1*b^-3*d^-4*f^3*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//4*b^-1*d^-3*f^2*(e+f*x)*cos(c+d*x)*sin(c+d*x)+im*a^-1*b^-3*d^-1*(e+f*x)^3*(a^2+-1*b^2)^3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-1*b^-3*d^-1*(e+f*x)^3*(a^2+-1*b^2)^3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*f*a^-1*b^-2*d^-2*(e+f*x)^2*(-3*b^2+3*a^2)*sin(c+d*x)+-1*a^-1*b^-2*d^-3*f^2*(e+f*x)*(-6*b^2+6*a^2)*cos(c+d*x)+-3*f*a^-1*b^-3*d^-2*(e+f*x)^2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*f*a^-1*b^-3*d^-2*(e+f*x)^2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^-1*b^-3*d^-3*f^2*(a^2+-1*b^2)^3//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^-1*b^-3*d^-3*f^2*(a^2+-1*b^2)^3//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x)^3*cot(c+d*x), x) == :(-1//6*b^-1*f^-1*(e+f*x)^3+a^-1*d^-1*(e+f*x)^2*cos(c+d*x)+-2*a^-1*d^-1*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+-2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+-2*a^-1*d^-3*f^2*cos(c+d*x)+2*a^-1*d^-3*f^2*Polylogarithms.polylog(3,exp(im*(c+d*x)))+1//3*b^-3*f^-1*(e+f*x)^3*(a^2+-1*b^2)+1//4*x*b^-1*d^-2*f^2+-2*f*a^-1*d^-2*(e+f*x)*sin(c+d*x)+-1//2*f*b^-1*d^-2*cos(c+d*x)^2*(e+f*x)+-1//2*b^-1*d^-1*(e+f*x)^2*cos(c+d*x)*sin(c+d*x)+1//4*b^-1*d^-3*f^2*cos(c+d*x)*sin(c+d*x)+a^-1*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)*cos(c+d*x)+-1*a^-1*b^-2*d^-3*f^2*(-2*b^2+2*a^2)*cos(c+d*x)+-2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x)))+2*im*f*a^-1*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+im*a^-1*b^-3*d^-1*(e+f*x)^2*(a^2+-1*b^2)^3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-1*b^-3*d^-1*(e+f*x)^2*(a^2+-1*b^2)^3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*f*a^-1*b^-2*d^-2*(e+f*x)*(-2*b^2+2*a^2)*sin(c+d*x)+-2*im*a^-1*b^-3*d^-3*f^2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*a^-1*b^-3*d^-2*(a^2+-1*b^2)^3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*a^-1*b^-3*d^-3*f^2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*f*a^-1*b^-3*d^-2*(a^2+-1*b^2)^3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^3*(e+f*x)*cot(c+d*x), x) == :(-1//2*e*x*b^-1+-1//4*f*b^-1*x^2+e*x*b^-3*(a^2+-1*b^2)+a^-1*d^-1*(e+f*x)*cos(c+d*x)+(1/2)*f*b^-3*x^2*(a^2+-1*b^2)+-1*f*a^-1*d^-2*sin(c+d*x)+-1*a^-1*d^-1*(2*e+2*f*x)*arctanh(exp(im*(c+d*x)))+-1//4*f*b^-1*d^-2*cos(c+d*x)^2+im*f*a^-1*d^-2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-1*im*f*a^-1*d^-2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+-1//2*b^-1*d^-1*(e+f*x)*cos(c+d*x)*sin(c+d*x)+f*a^-1*b^-3*d^-2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-1*b^-2*d^-1*(e+f*x)*(a^2+-1*b^2)*cos(c+d*x)+-1*f*a^-1*b^-3*d^-2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*f*a^-1*b^-2*d^-2*(a^2+-1*b^2)*sin(c+d*x)+im*a^-1*b^-3*d^-1*(a^2+-1*b^2)^3//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-1*b^-3*d^-1*(a^2+-1*b^2)^3//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^3*cot(c+d*x), x) == :((1/2)*x*b^-3*(-3*b^2+2*a^2)+-1*a^-1*d^-1*arctanh(cos(c+d*x))+a*b^-2*d^-1*cos(c+d*x)+-1//2*b^-1*d^-1*cos(c+d*x)*sin(c+d*x)+-2*a^-1*b^-3*d^-1*(a^2+-1*b^2)^3//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*cot(c+d*x)^2*cos(c+d*x), x) == :(-1*a^-1*d^-1*(e+f*x)^3*csc(c+d*x)+-6*a^-1*d^-4*f^3*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+6*a^-1*d^-4*f^3*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-1*b*a^-2*d^-1*(e+f*x)^3*log(1+-1*exp(2*im*(c+d*x)))+-6*f*a^-1*d^-2*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+1//4*im*b*a^-2*f^-1*(e+f*x)^4+-1*a^-2*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a^-2*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x)))+6*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-3//2*b*a^-2*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+-3//4*im*b*a^-2*d^-4*f^3*Polylogarithms.polylog(4,exp(2*im*(c+d*x)))+1//4*im*a^-2*b^-1*f^-1*(e+f*x)^4*(a^2+-1*b^2)+-1*a^-2*b^-1*d^-3*f^2*(e+f*x)*(-6*b^2+6*a^2)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a^-2*b^-1*d^-3*f^2*(e+f*x)*(-6*b^2+6*a^2)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^-2*b^-1*d^-4*f^3*(a^2+-1*b^2)*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^-2*b^-1*d^-4*f^3*(a^2+-1*b^2)*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3//2*im*b*f*a^-2*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+3*im*f*a^-2*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*f*a^-2*b^-1*d^-2*(e+f*x)^2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*cot(c+d*x)^2*cos(c+d*x), x) == :(-1*a^-1*d^-1*(e+f*x)^2*csc(c+d*x)+-1*b*a^-2*d^-1*(e+f*x)^2*log(1+-1*exp(2*im*(c+d*x)))+-4*f*a^-1*d^-2*(e+f*x)*arctanh(exp(im*(c+d*x)))+-2*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+2*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-1//2*b*a^-2*d^-3*f^2*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+1//3*im*b*a^-2*f^-1*(e+f*x)^3+-1*a^-2*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a^-2*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a^-2*b^-1*d^-3*f^2*(-2*b^2+2*a^2)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a^-2*b^-1*d^-3*f^2*(-2*b^2+2*a^2)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+1//3*im*a^-2*b^-1*f^-1*(e+f*x)^3*(a^2+-1*b^2)+im*b*f*a^-2*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+2*im*f*a^-2*b^-1*d^-2*(e+f*x)*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*f*a^-2*b^-1*d^-2*(e+f*x)*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cot(c+d*x)^2*(e+f*x)*cos(c+d*x), x) == :(-1*f*a^-1*d^-2*arctanh(cos(c+d*x))+-1*a^-1*d^-1*(e+f*x)*csc(c+d*x)+(1/2)*im*b*a^-2*f^-1*(e+f*x)^2+-1*b*a^-2*d^-1*(e+f*x)*log(1+-1*exp(2*im*(c+d*x)))+(1/2)*im*b*f*a^-2*d^-2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+(1/2)*im*a^-2*b^-1*f^-1*(e+f*x)^2*(a^2+-1*b^2)+-1*a^-2*b^-1*d^-1*(e+f*x)*(a^2+-1*b^2)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a^-2*b^-1*d^-1*(e+f*x)*(a^2+-1*b^2)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*f*a^-2*b^-1*d^-2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*f*a^-2*b^-1*d^-2*(a^2+-1*b^2)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cot(c+d*x)^2*cos(c+d*x), x) == :(-1*a^-1*d^-1*csc(c+d*x)+-1*b*a^-2*d^-1*log(sin(c+d*x))+-1*b^-1*d^-1*(1+-1*a^-2*b^2)*log(a+b*sin(c+d*x)))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x)^2*cot(c+d*x)^2, x) == :(-1//4*a^-1*f^-1*(e+f*x)^4+-1*im*a^-1*d^-1*(e+f*x)^3+-1*a^-1*d^-1*(e+f*x)^3*cot(c+d*x)+3//2*a^-1*d^-4*f^3*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+-1*b*a^-2*d^-1*(e+f*x)^3*cos(c+d*x)+-6*b*a^-2*d^-4*f^3*sin(c+d*x)+2*b*a^-2*d^-1*(e+f*x)^3*arctanh(exp(im*(c+d*x)))+3*f*a^-1*d^-2*(e+f*x)^2*log(1+-1*exp(2*im*(c+d*x)))+-1//4*a^-1*b^-2*f^-1*(e+f*x)^4*(a^2+-1*b^2)+-1*a^-2*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)*cos(c+d*x)+-1*a^-2*b^-1*d^-4*f^3*(-6*b^2+6*a^2)*sin(c+d*x)+-6*im*b*a^-2*d^-4*f^3*Polylogarithms.polylog(4,exp(im*(c+d*x)))+-6*b*a^-2*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(im*(c+d*x)))+-6*a^-2*b^-2*d^-4*f^3*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+3*b*f*a^-2*d^-2*(e+f*x)^2*sin(c+d*x)+6*im*b*a^-2*d^-4*f^3*Polylogarithms.polylog(4,-1*exp(im*(c+d*x)))+6*b*a^-2*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+6*b*a^-2*d^-3*f^2*(e+f*x)*cos(c+d*x)+6*a^-2*b^-2*d^-4*f^3*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+im*a^-2*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)^3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+f*a^-2*b^-1*d^-2*(e+f*x)^2*(-3*b^2+3*a^2)*sin(c+d*x)+a^-2*b^-1*d^-3*f^2*(e+f*x)*(-6*b^2+6*a^2)*cos(c+d*x)+-1*im*a^-2*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)^3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*b*f*a^-2*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-3*f*a^-2*b^-2*d^-2*(e+f*x)^2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+3*im*b*f*a^-2*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+3*f*a^-2*b^-2*d^-2*(e+f*x)^2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-6*im*a^-2*b^-2*d^-3*f^2*(a^2+-1*b^2)^3//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^-2*b^-2*d^-3*f^2*(a^2+-1*b^2)^3//2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x)^2*cot(c+d*x)^2, x) == :(-1//3*a^-1*f^-1*(e+f*x)^3+-1*im*a^-1*d^-1*(e+f*x)^2+-1*a^-1*d^-1*(e+f*x)^2*cot(c+d*x)+-1*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+-1*b*a^-2*d^-1*(e+f*x)^2*cos(c+d*x)+-2*b*a^-2*d^-3*f^2*Polylogarithms.polylog(3,exp(im*(c+d*x)))+2*b*a^-2*d^-1*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+2*b*a^-2*d^-3*f^2*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+2*b*a^-2*d^-3*f^2*cos(c+d*x)+2*f*a^-1*d^-2*(e+f*x)*log(1+-1*exp(2*im*(c+d*x)))+-1//3*a^-1*b^-2*f^-1*(e+f*x)^3*(a^2+-1*b^2)+a^-2*b^-1*d^-3*f^2*(-2*b^2+2*a^2)*cos(c+d*x)+-1*a^-2*b^-1*d^-1*(e+f*x)^2*(a^2+-1*b^2)*cos(c+d*x)+2*b*f*a^-2*d^-2*(e+f*x)*sin(c+d*x)+im*a^-2*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)^3//2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+f*a^-2*b^-1*d^-2*(e+f*x)*(-2*b^2+2*a^2)*sin(c+d*x)+-1*im*a^-2*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)^3//2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*b*f*a^-2*d^-2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-2*im*a^-2*b^-2*d^-3*f^2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*f*a^-2*b^-2*d^-2*(a^2+-1*b^2)^3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*im*b*f*a^-2*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x)))+2*im*a^-2*b^-2*d^-3*f^2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*f*a^-2*b^-2*d^-2*(a^2+-1*b^2)^3//2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^2*cot(c+d*x)^2*(e+f*x), x) == :(-1*e*x*a^-1+-1//2*f*a^-1*x^2+e*x*a^-1*(1+-1*a^2*b^-2)+f*a^-1*d^-2*log(sin(c+d*x))+(1/2)*f*a^-1*x^2*(1+-1*a^2*b^-2)+-1*a^-1*d^-1*(e+f*x)*cot(c+d*x)+b*f*a^-2*d^-2*sin(c+d*x)+-1*b*a^-2*d^-1*(e+f*x)*cos(c+d*x)+2*b*a^-2*d^-1*(e+f*x)*arctanh(exp(im*(c+d*x)))+im*b*f*a^-2*d^-2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+f*a^-2*b^-1*d^-2*(a^2+-1*b^2)*sin(c+d*x)+f*a^-2*b^-2*d^-2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*b*f*a^-2*d^-2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-1*f*a^-2*b^-2*d^-2*(a^2+-1*b^2)^3//2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*a^-2*b^-1*d^-1*(e+f*x)*(a^2+-1*b^2)*cos(c+d*x)+im*a^-2*b^-2*d^-1*(a^2+-1*b^2)^3//2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*a^-2*b^-2*d^-1*(a^2+-1*b^2)^3//2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^2*cot(c+d*x)^2, x) == :(-1*a*x*b^-2+-1*a^-1*d^-1*cot(c+d*x)+-1*b^-1*d^-1*cos(c+d*x)+b*a^-2*d^-1*arctanh(cos(c+d*x))+2*a^-2*b^-2*d^-1*(a^2+-1*b^2)^3//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*c+(1/2)*d*x))))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^3*cos(c+d*x)^3*cot(c+d*x)^2, x) == :(-1*a^-1*d^-1*(e+f*x)^3*csc(c+d*x)+-1*a^-1*d^-1*(e+f*x)^3*sin(c+d*x)+-6*a^-1*d^-4*f^3*Polylogarithms.polylog(3,-1*exp(im*(c+d*x)))+6*a^-1*d^-4*f^3*Polylogarithms.polylog(3,exp(im*(c+d*x)))+6*a^-1*d^-4*f^3*cos(c+d*x)+-1//4*b*a^-2*d^-1*(e+f*x)^3+(1/2)*b*a^-2*d^-1*(e+f*x)^3*sin(c+d*x)^2+-1*b*a^-2*d^-1*(e+f*x)^3*log(1+-1*exp(2*im*(c+d*x)))+-6*f*a^-1*d^-2*(e+f*x)^2*arctanh(exp(im*(c+d*x)))+-3*f*a^-1*d^-2*(e+f*x)^2*cos(c+d*x)+6*a^-1*d^-3*f^2*(e+f*x)*sin(c+d*x)+-1//4*a^-2*b^-1*d^-1*(e+f*x)^3*(a^2+-1*b^2)+1//4*im*b*a^-2*f^-1*(e+f*x)^4+3//8*b*x*a^-2*d^-3*f^3+a^-1*b^-2*d^-4*f^3*(-6*b^2+6*a^2)*cos(c+d*x)+a^-2*b^-3*d^-1*(e+f*x)^3*(a^2+-1*b^2)^2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-2*b^-3*d^-1*(e+f*x)^3*(a^2+-1*b^2)^2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+(1/2)*a^-2*b^-1*d^-1*(e+f*x)^3*sin(c+d*x)^2*(a^2+-1*b^2)+-1*a^-1*b^-2*d^-1*(e+f*x)^3*(a^2+-1*b^2)*sin(c+d*x)+-6*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,exp(im*(c+d*x)))+6*im*a^-1*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-3//2*b*a^-2*d^-3*f^2*(e+f*x)*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+-3//4*im*b*a^-2*d^-4*f^3*Polylogarithms.polylog(4,exp(2*im*(c+d*x)))+-3//4*b*a^-2*d^-3*f^2*sin(c+d*x)^2*(e+f*x)+-3//8*b*a^-2*d^-4*f^3*cos(c+d*x)*sin(c+d*x)+-1//4*im*a^-2*b^-3*f^-1*(e+f*x)^4*(a^2+-1*b^2)^2+1//8*x*a^-2*b^-1*d^-3*f^3*(-3*b^2+3*a^2)+a^-1*b^-2*d^-3*f^2*(e+f*x)*(-6*b^2+6*a^2)*sin(c+d*x)+-1*f*a^-1*b^-2*d^-2*(e+f*x)^2*(-3*b^2+3*a^2)*cos(c+d*x)+6*im*a^-2*b^-3*d^-4*f^3*(a^2+-1*b^2)^2*Polylogarithms.polylog(4,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*im*a^-2*b^-3*d^-4*f^3*(a^2+-1*b^2)^2*Polylogarithms.polylog(4,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*a^-2*b^-3*d^-3*f^2*(a^2+-1*b^2)^2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+6*a^-2*b^-3*d^-3*f^2*(a^2+-1*b^2)^2*(e+f*x)*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1//4*a^-2*b^-1*d^-3*f^2*sin(c+d*x)^2*(e+f*x)*(-3*b^2+3*a^2)+-1//8*a^-2*b^-1*d^-4*f^3*(-3*b^2+3*a^2)*cos(c+d*x)*sin(c+d*x)+3//2*im*b*f*a^-2*d^-2*(e+f*x)^2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+3//4*b*f*a^-2*d^-2*(e+f*x)^2*cos(c+d*x)*sin(c+d*x)+-3*im*f*a^-2*b^-3*d^-2*(e+f*x)^2*(a^2+-1*b^2)^2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-3*im*f*a^-2*b^-3*d^-2*(e+f*x)^2*(a^2+-1*b^2)^2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+1//4*f*a^-2*b^-1*d^-2*(e+f*x)^2*(-3*b^2+3*a^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*sin(c+d*x))^-1*(e+f*x)^2*cos(c+d*x)^3*cot(c+d*x)^2, x) == :(-1*a^-1*d^-1*(e+f*x)^2*csc(c+d*x)+-1*a^-1*d^-1*(e+f*x)^2*sin(c+d*x)+2*a^-1*d^-3*f^2*sin(c+d*x)+(1/2)*b*a^-2*d^-1*(e+f*x)^2*sin(c+d*x)^2+-1*b*a^-2*d^-1*(e+f*x)^2*log(1+-1*exp(2*im*(c+d*x)))+-4*f*a^-1*d^-2*(e+f*x)*arctanh(exp(im*(c+d*x)))+-2*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,exp(im*(c+d*x)))+-2*f*a^-1*d^-2*(e+f*x)*cos(c+d*x)+2*im*a^-1*d^-3*f^2*Polylogarithms.polylog(2,-1*exp(im*(c+d*x)))+-1//2*b*a^-2*d^-3*f^2*Polylogarithms.polylog(3,exp(2*im*(c+d*x)))+-1//4*b*a^-2*d^-1*f^2*x^2+-1//4*b*a^-2*d^-3*f^2*sin(c+d*x)^2+1//3*im*b*a^-2*f^-1*(e+f*x)^3+a^-1*b^-2*d^-3*f^2*(-2*b^2+2*a^2)*sin(c+d*x)+a^-2*b^-3*d^-1*(e+f*x)^2*(a^2+-1*b^2)^2*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-2*b^-3*d^-1*(e+f*x)^2*(a^2+-1*b^2)^2*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+(1/2)*a^-2*b^-1*d^-1*(e+f*x)^2*sin(c+d*x)^2*(a^2+-1*b^2)+-1*a^-1*b^-2*d^-1*(e+f*x)^2*(a^2+-1*b^2)*sin(c+d*x)+2*a^-2*b^-3*d^-3*f^2*(a^2+-1*b^2)^2*Polylogarithms.polylog(3,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+2*a^-2*b^-3*d^-3*f^2*(a^2+-1*b^2)^2*Polylogarithms.polylog(3,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1//2*b*e*f*x*a^-2*d^-1+-1//3*im*a^-2*b^-3*f^-1*(e+f*x)^3*(a^2+-1*b^2)^2+-1//4*a^-2*b^-1*d^-1*f^2*x^2*(a^2+-1*b^2)+-1//4*a^-2*b^-1*d^-3*f^2*sin(c+d*x)^2*(a^2+-1*b^2)+im*b*f*a^-2*d^-2*(e+f*x)*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+(1/2)*b*f*a^-2*d^-2*(e+f*x)*cos(c+d*x)*sin(c+d*x)+-1*f*a^-1*b^-2*d^-2*(e+f*x)*(-2*b^2+2*a^2)*cos(c+d*x)+-1//2*e*f*x*a^-2*b^-1*d^-1*(a^2+-1*b^2)+(1/2)*f*a^-2*b^-1*d^-2*(e+f*x)*(a^2+-1*b^2)*cos(c+d*x)*sin(c+d*x)+-2*im*f*a^-2*b^-3*d^-2*(a^2+-1*b^2)^2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-2*im*f*a^-2*b^-3*d^-2*(a^2+-1*b^2)^2*(e+f*x)*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x))))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^3*cot(c+d*x)^2*(e+f*x), x) == :(-1*f*a^-1*d^-2*arctanh(cos(c+d*x))+-1*f*a^-1*d^-2*cos(c+d*x)+-1*a^-1*d^-1*(e+f*x)*csc(c+d*x)+-1*a^-1*d^-1*(e+f*x)*sin(c+d*x)+(1/2)*im*b*a^-2*f^-1*(e+f*x)^2+(1/2)*b*a^-2*d^-1*sin(c+d*x)^2*(e+f*x)+-1*b*a^-2*d^-1*(e+f*x)*log(1+-1*exp(2*im*(c+d*x)))+-1//4*b*f*x*a^-2*d^-1+a^-2*b^-3*d^-1*(a^2+-1*b^2)^2*(e+f*x)*log(1+-1*im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+a^-2*b^-3*d^-1*(a^2+-1*b^2)^2*(e+f*x)*log(1+-1*im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+(1/2)*im*b*f*a^-2*d^-2*Polylogarithms.polylog(2,exp(2*im*(c+d*x)))+(1/2)*a^-2*b^-1*d^-1*sin(c+d*x)^2*(e+f*x)*(a^2+-1*b^2)+-1*f*a^-1*b^-2*d^-2*(a^2+-1*b^2)*cos(c+d*x)+-1*a^-1*b^-2*d^-1*(e+f*x)*(a^2+-1*b^2)*sin(c+d*x)+-1//2*im*a^-2*b^-3*f^-1*(e+f*x)^2*(a^2+-1*b^2)^2+-1//4*f*x*a^-2*b^-1*d^-1*(a^2+-1*b^2)+1//4*b*f*a^-2*d^-2*cos(c+d*x)*sin(c+d*x)+-1*im*f*a^-2*b^-3*d^-2*(a^2+-1*b^2)^2*Polylogarithms.polylog(2,im*b*(a+(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+-1*im*f*a^-2*b^-3*d^-2*(a^2+-1*b^2)^2*Polylogarithms.polylog(2,im*b*(a+-1*(a^2+-1*b^2)^(1/2))^-1*exp(im*(c+d*x)))+1//4*f*a^-2*b^-1*d^-2*(a^2+-1*b^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*sin(c+d*x))^-1*cos(c+d*x)^3*cot(c+d*x)^2, x) == :((1/2)*b^-1*d^-1*sin(c+d*x)^2+-1*a^-1*d^-1*csc(c+d*x)+-1*a*b^-2*d^-1*sin(c+d*x)+-1*b*a^-2*d^-1*log(sin(c+d*x))+a^-2*b^-3*d^-1*(a^2+-1*b^2)^2*log(a+b*sin(c+d*x)))

max_stars_repo_path: test/4 Trig functions/4.1 Sine/4.1.10 (c+d x)^m (a+b sin)^n.jl