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

@test integrate(sec(c+d*x)^10*(a+im*a*tan(c+d*x)), x) == :(a*d^-1*tan(c+d*x)+1//9*a*d^-1*tan(c+d*x)^9+4//3*a*d^-1*tan(c+d*x)^3+4//7*a*d^-1*tan(c+d*x)^7+6//5*a*d^-1*tan(c+d*x)^5+1//10*im*a*d^-1*sec(c+d*x)^10)
@test integrate(sec(c+d*x)^8*(a+im*a*tan(c+d*x)), x) == :(a*d^-1*tan(c+d*x)^3+a*d^-1*tan(c+d*x)+1//7*a*d^-1*tan(c+d*x)^7+3//5*a*d^-1*tan(c+d*x)^5+1//8*im*a*d^-1*sec(c+d*x)^8)
@test integrate(sec(c+d*x)^6*(a+im*a*tan(c+d*x)), x) == :(a*d^-1*tan(c+d*x)+1//5*a*d^-1*tan(c+d*x)^5+2//3*a*d^-1*tan(c+d*x)^3+1//6*im*a*d^-1*sec(c+d*x)^6)
@test integrate(sec(c+d*x)^4*(a+im*a*tan(c+d*x)), x) == :(a*d^-1*tan(c+d*x)+1//3*a*d^-1*tan(c+d*x)^3+1//4*im*a*d^-1*sec(c+d*x)^4)
@test integrate(a+im*a*tan(c+d*x), x) == :(a*x+-1*im*a*d^-1*log(cos(c+d*x)))
@test integrate(cos(c+d*x)^2*(a+im*a*tan(c+d*x)), x) == :((1/2)*a*x+(1/2)*a*d^-1*cos(c+d*x)*sin(c+d*x)+-1//2*im*a*d^-1*cos(c+d*x)^2)
@test integrate(cos(c+d*x)^4*(a+im*a*tan(c+d*x)), x) == :(3//8*a*x+-1//4*im*a*d^-1*cos(c+d*x)^4+1//4*a*d^-1*cos(c+d*x)^3*sin(c+d*x)+3//8*a*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(cos(c+d*x)^6*(a+im*a*tan(c+d*x)), x) == :(5//16*a*x+-1//6*im*a*d^-1*cos(c+d*x)^6+1//6*a*d^-1*cos(c+d*x)^5*sin(c+d*x)+5//16*a*d^-1*cos(c+d*x)*sin(c+d*x)+5//24*a*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate(cos(c+d*x)^8*(a+im*a*tan(c+d*x)), x) == :(35//128*a*x+-1//8*im*a*d^-1*cos(c+d*x)^8+1//8*a*d^-1*cos(c+d*x)^7*sin(c+d*x)+7//48*a*d^-1*cos(c+d*x)^5*sin(c+d*x)+35//128*a*d^-1*cos(c+d*x)*sin(c+d*x)+35//192*a*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate(sec(c+d*x)^7*(a+im*a*tan(c+d*x)), x) == :(5//16*a*d^-1*arctanh(sin(c+d*x))+1//6*a*d^-1*sec(c+d*x)^5*tan(c+d*x)+1//7*im*a*d^-1*sec(c+d*x)^7+5//16*a*d^-1*sec(c+d*x)*tan(c+d*x)+5//24*a*d^-1*sec(c+d*x)^3*tan(c+d*x))
@test integrate(sec(c+d*x)^5*(a+im*a*tan(c+d*x)), x) == :(3//8*a*d^-1*arctanh(sin(c+d*x))+1//4*a*d^-1*sec(c+d*x)^3*tan(c+d*x)+1//5*im*a*d^-1*sec(c+d*x)^5+3//8*a*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^3*(a+im*a*tan(c+d*x)), x) == :((1/2)*a*d^-1*arctanh(sin(c+d*x))+(1/2)*a*d^-1*sec(c+d*x)*tan(c+d*x)+1//3*im*a*d^-1*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))*sec(c+d*x), x) == :(a*d^-1*arctanh(sin(c+d*x))+im*a*d^-1*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))*cos(c+d*x), x) == :(a*d^-1*sin(c+d*x)+-1*im*a*d^-1*cos(c+d*x))
@test integrate(cos(c+d*x)^3*(a+im*a*tan(c+d*x)), x) == :(a*d^-1*sin(c+d*x)+-1//3*a*d^-1*sin(c+d*x)^3+-1//3*im*a*d^-1*cos(c+d*x)^3)
@test integrate(cos(c+d*x)^5*(a+im*a*tan(c+d*x)), x) == :(a*d^-1*sin(c+d*x)+-2//3*a*d^-1*sin(c+d*x)^3+1//5*a*d^-1*sin(c+d*x)^5+-1//5*im*a*d^-1*cos(c+d*x)^5)
@test integrate(cos(c+d*x)^7*(a+im*a*tan(c+d*x)), x) == :(a*d^-1*sin(c+d*x)+-1*a*d^-1*sin(c+d*x)^3+-1//7*a*d^-1*sin(c+d*x)^7+3//5*a*d^-1*sin(c+d*x)^5+-1//7*im*a*d^-1*cos(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^2*sec(c+d*x)^8, x) == :(-4//3*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^6+-3//4*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^8+1//9*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^9+12//7*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^7)
@test integrate((a+im*a*tan(c+d*x))^2*sec(c+d*x)^6, x) == :(-4//5*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^5+-1//7*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^7+2//3*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^6)
@test integrate((a+im*a*tan(c+d*x))^2*sec(c+d*x)^4, x) == :(-1//2*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^4+1//5*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^5)
@test integrate((a+im*a*tan(c+d*x))^2*sec(c+d*x)^2, x) == :(-1//3*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^3)
@test integrate((a+im*a*tan(c+d*x))^2, x) == :(2*x*a^2+-1*a^2*d^-1*tan(c+d*x)+-2*im*a^2*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^2*cos(c+d*x)^2, x) == :(-1*im*a^3*d^-1*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^2*cos(c+d*x)^4, x) == :(1//4*x*a^2+-1//4*im*a^3*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-1//4*im*a^4*d^-1*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^2*cos(c+d*x)^6, x) == :(1//4*x*a^2+-3//16*im*a^3*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-1//8*im*a^4*d^-1*(a+-1*im*a*tan(c+d*x))^-2+-1//12*im*a^5*d^-1*(a+-1*im*a*tan(c+d*x))^-3+1//16*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^2*cos(c+d*x)^8, x) == :(15//64*x*a^2+-5//32*im*a^3*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-3//32*im*a^4*d^-1*(a+-1*im*a*tan(c+d*x))^-2+-1//16*im*a^5*d^-1*(a+-1*im*a*tan(c+d*x))^-3+-1//32*im*a^6*d^-1*(a+-1*im*a*tan(c+d*x))^-4+1//64*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-2+5//64*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^2*sec(c+d*x)^5, x) == :(7//16*a^2*d^-1*arctanh(sin(c+d*x))+1//6*im*d^-1*sec(c+d*x)^5*(a^2+im*a^2*tan(c+d*x))+7//16*a^2*d^-1*sec(c+d*x)*tan(c+d*x)+7//24*a^2*d^-1*sec(c+d*x)^3*tan(c+d*x)+7//30*im*a^2*d^-1*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^2*sec(c+d*x)^3, x) == :(5//8*a^2*d^-1*arctanh(sin(c+d*x))+1//4*im*d^-1*sec(c+d*x)^3*(a^2+im*a^2*tan(c+d*x))+5//8*a^2*d^-1*sec(c+d*x)*tan(c+d*x)+5//12*im*a^2*d^-1*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^2*sec(c+d*x), x) == :(3//2*a^2*d^-1*arctanh(sin(c+d*x))+(1/2)*im*d^-1*(a^2+im*a^2*tan(c+d*x))*sec(c+d*x)+3//2*im*a^2*d^-1*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^2*cos(c+d*x), x) == :(-1*a^2*d^-1*arctanh(sin(c+d*x))+-2*im*d^-1*(a^2+im*a^2*tan(c+d*x))*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^2*cos(c+d*x)^3, x) == :(1//3*a^2*d^-1*sin(c+d*x)+-2//3*im*d^-1*cos(c+d*x)^3*(a^2+im*a^2*tan(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^2*cos(c+d*x)^5, x) == :(-1//5*a^2*d^-1*sin(c+d*x)^3+3//5*a^2*d^-1*sin(c+d*x)+-2//5*im*d^-1*cos(c+d*x)^5*(a^2+im*a^2*tan(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^2*cos(c+d*x)^7, x) == :(-10//21*a^2*d^-1*sin(c+d*x)^3+1//7*a^2*d^-1*sin(c+d*x)^5+5//7*a^2*d^-1*sin(c+d*x)+-2//7*im*d^-1*cos(c+d*x)^7*(a^2+im*a^2*tan(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^2*cos(c+d*x)^9, x) == :(-7//9*a^2*d^-1*sin(c+d*x)^3+-1//9*a^2*d^-1*sin(c+d*x)^7+7//9*a^2*d^-1*sin(c+d*x)+7//15*a^2*d^-1*sin(c+d*x)^5+-2//9*im*d^-1*cos(c+d*x)^9*(a^2+im*a^2*tan(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^3*sec(c+d*x)^8, x) == :(-8//7*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^7+-2//3*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^9+1//10*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^10+3//2*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^8)
@test integrate((a+im*a*tan(c+d*x))^3*sec(c+d*x)^6, x) == :(-2//3*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^6+-1//8*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^8+4//7*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^7)
@test integrate((a+im*a*tan(c+d*x))^3*sec(c+d*x)^4, x) == :(-2//5*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^5+1//6*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^6)
@test integrate((a+im*a*tan(c+d*x))^3*sec(c+d*x)^2, x) == :(-1//4*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^4)
@test integrate((a+im*a*tan(c+d*x))^3, x) == :(4*x*a^3+-2*a^3*d^-1*tan(c+d*x)+(1/2)*im*a*d^-1*(a+im*a*tan(c+d*x))^2+-4*im*a^3*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^3*cos(c+d*x)^2, x) == :(-1*x*a^3+im*a^3*d^-1*log(cos(c+d*x))+-2*im*a^4*d^-1*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^3*cos(c+d*x)^4, x) == :(-1//2*im*a^5*d^-1*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^3*cos(c+d*x)^6, x) == :(1//8*x*a^3+-1//6*im*a^6*d^-1*(a+-1*im*a*tan(c+d*x))^-3+-1//8*im*a^4*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-1//8*im*a^5*d^-1*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^3*cos(c+d*x)^8, x) == :(5//32*x*a^3+-3//32*im*a^5*d^-1*(a+-1*im*a*tan(c+d*x))^-2+-1//8*im*a^4*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-1//12*im*a^6*d^-1*(a+-1*im*a*tan(c+d*x))^-3+-1//16*im*a^7*d^-1*(a+-1*im*a*tan(c+d*x))^-4+1//32*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^3*sec(c+d*x)^3, x) == :(7//8*a^3*d^-1*arctanh(sin(c+d*x))+7//8*a^3*d^-1*sec(c+d*x)*tan(c+d*x)+7//12*im*a^3*d^-1*sec(c+d*x)^3+7//20*im*d^-1*sec(c+d*x)^3*(a^3+im*a^3*tan(c+d*x))+1//5*im*a*d^-1*(a+im*a*tan(c+d*x))^2*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^3*sec(c+d*x), x) == :(5//2*a^3*d^-1*arctanh(sin(c+d*x))+5//2*im*a^3*d^-1*sec(c+d*x)+5//6*im*d^-1*(a^3+im*a^3*tan(c+d*x))*sec(c+d*x)+1//3*im*a*d^-1*(a+im*a*tan(c+d*x))^2*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^3*cos(c+d*x), x) == :(-3*a^3*d^-1*arctanh(sin(c+d*x))+-3*im*a^3*d^-1*sec(c+d*x)+-2*im*a*d^-1*(a+im*a*tan(c+d*x))^2*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^3*cos(c+d*x)^3, x) == :(-1//3*im*d^-1*(a+im*a*tan(c+d*x))^3*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^3*cos(c+d*x)^5, x) == :(-1//15*a^3*d^-1*sin(c+d*x)^3+1//5*a^3*d^-1*sin(c+d*x)+-1//15*im*a^3*d^-1*cos(c+d*x)^3+-2//5*im*a*d^-1*(a+im*a*tan(c+d*x))^2*cos(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^3*cos(c+d*x)^7, x) == :(-2//7*a^3*d^-1*sin(c+d*x)^3+3//7*a^3*d^-1*sin(c+d*x)+3//35*a^3*d^-1*sin(c+d*x)^5+-3//35*im*a^3*d^-1*cos(c+d*x)^5+-2//7*im*a*d^-1*(a+im*a*tan(c+d*x))^2*cos(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^3*cos(c+d*x)^9, x) == :(-5//9*a^3*d^-1*sin(c+d*x)^3+-5//63*a^3*d^-1*sin(c+d*x)^7+1//3*a^3*d^-1*sin(c+d*x)^5+5//9*a^3*d^-1*sin(c+d*x)+-5//63*im*a^3*d^-1*cos(c+d*x)^7+-2//9*im*a*d^-1*(a+im*a*tan(c+d*x))^2*cos(c+d*x)^9)
@test integrate((a+im*a*tan(c+d*x))^4*sec(c+d*x)^3, x) == :(21//16*a^4*d^-1*arctanh(sin(c+d*x))+3//10*im*d^-1*(a^2+im*a^2*tan(c+d*x))^2*sec(c+d*x)^3+7//8*im*a^4*d^-1*sec(c+d*x)^3+21//16*a^4*d^-1*sec(c+d*x)*tan(c+d*x)+21//40*im*d^-1*sec(c+d*x)^3*(a^4+im*a^4*tan(c+d*x))+1//6*im*a*d^-1*(a+im*a*tan(c+d*x))^3*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^4*sec(c+d*x), x) == :(35//8*a^4*d^-1*arctanh(sin(c+d*x))+7//12*im*d^-1*(a^2+im*a^2*tan(c+d*x))^2*sec(c+d*x)+35//8*im*a^4*d^-1*sec(c+d*x)+35//24*im*d^-1*(a^4+im*a^4*tan(c+d*x))*sec(c+d*x)+1//4*im*a*d^-1*(a+im*a*tan(c+d*x))^3*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^4*cos(c+d*x), x) == :(-15//2*a^4*d^-1*arctanh(sin(c+d*x))+-15//2*im*a^4*d^-1*sec(c+d*x)+-5//2*im*d^-1*(a^4+im*a^4*tan(c+d*x))*sec(c+d*x)+-2*im*a*d^-1*(a+im*a*tan(c+d*x))^3*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^4*cos(c+d*x)^3, x) == :(a^4*d^-1*arctanh(sin(c+d*x))+2*im*d^-1*(a^4+im*a^4*tan(c+d*x))*cos(c+d*x)+-2//3*im*a*d^-1*(a+im*a*tan(c+d*x))^3*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^4*cos(c+d*x)^5, x) == :(-1//5*im*d^-1*(a+im*a*tan(c+d*x))^4*cos(c+d*x)^5+-1//15*im*a*d^-1*(a+im*a*tan(c+d*x))^3*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^4*cos(c+d*x)^7, x) == :(-1//35*a^4*d^-1*sin(c+d*x)^3+3//35*a^4*d^-1*sin(c+d*x)+-2//35*im*d^-1*cos(c+d*x)^5*(a^4+im*a^4*tan(c+d*x))+-2//7*im*a*d^-1*(a+im*a*tan(c+d*x))^3*cos(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^4*cos(c+d*x)^9, x) == :(-10//63*a^4*d^-1*sin(c+d*x)^3+1//21*a^4*d^-1*sin(c+d*x)^5+5//21*a^4*d^-1*sin(c+d*x)+-2//21*im*d^-1*cos(c+d*x)^7*(a^4+im*a^4*tan(c+d*x))+-2//9*im*a*d^-1*(a+im*a*tan(c+d*x))^3*cos(c+d*x)^9)
@test integrate((a+im*a*tan(c+d*x))^5*sec(c+d*x)^8, x) == :(-8//9*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^9+-6//11*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^11+1//12*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^12+6//5*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^10)
@test integrate((a+im*a*tan(c+d*x))^5*sec(c+d*x)^6, x) == :(-1//2*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^8+-1//10*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^10+4//9*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^9)
@test integrate((a+im*a*tan(c+d*x))^5*sec(c+d*x)^4, x) == :(-2//7*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^7+1//8*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^8)
@test integrate((a+im*a*tan(c+d*x))^5*sec(c+d*x)^2, x) == :(-1//6*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^6)
@test integrate((a+im*a*tan(c+d*x))^5, x) == :(16*x*a^5+-8*a^5*d^-1*tan(c+d*x)+-16*im*a^5*d^-1*log(cos(c+d*x))+2*im*a*d^-1*(a^2+im*a^2*tan(c+d*x))^2+1//4*im*a*d^-1*(a+im*a*tan(c+d*x))^4+2//3*im*a^2*d^-1*(a+im*a*tan(c+d*x))^3)
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^2, x) == :(-12*x*a^5+5*a^5*d^-1*tan(c+d*x)+(1/2)*im*a^5*d^-1*tan(c+d*x)^2+-8*im*a^6*d^-1*(a+-1*im*a*tan(c+d*x))^-1+12*im*a^5*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^4, x) == :(x*a^5+-1*im*a^5*d^-1*log(cos(c+d*x))+-2*im*a^7*d^-1*(a+-1*im*a*tan(c+d*x))^-2+4*im*a^6*d^-1*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^6, x) == :((1/2)*im*a^7*d^-1*(a+-1*im*a*tan(c+d*x))^-2+-2//3*im*a^8*d^-1*(a+-1*im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^8, x) == :(-1//4*im*a^9*d^-1*(a+-1*im*a*tan(c+d*x))^-4)
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^10, x) == :(1//32*x*a^5+-1//10*im*a^10*d^-1*(a+-1*im*a*tan(c+d*x))^-5+-1//16*im*a^9*d^-1*(a+-1*im*a*tan(c+d*x))^-4+-1//24*im*a^8*d^-1*(a+-1*im*a*tan(c+d*x))^-3+-1//32*im*a^6*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-1//32*im*a^7*d^-1*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^12, x) == :(7//128*x*a^5+-5//128*im*a^7*d^-1*(a+-1*im*a*tan(c+d*x))^-2+-3//64*im*a^6*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-3//64*im*a^9*d^-1*(a+-1*im*a*tan(c+d*x))^-4+-1//20*im*a^10*d^-1*(a+-1*im*a*tan(c+d*x))^-5+-1//24*im*a^8*d^-1*(a+-1*im*a*tan(c+d*x))^-3+-1//24*im*a^11*d^-1*(a+-1*im*a*tan(c+d*x))^-6+1//128*im*a^6*d^-1*(a+im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^5*sec(c+d*x), x) == :(63//8*a^5*d^-1*arctanh(sin(c+d*x))+21//8*im*d^-1*(a^5+im*a^5*tan(c+d*x))*sec(c+d*x)+63//8*im*a^5*d^-1*sec(c+d*x)+1//5*im*a*d^-1*(a+im*a*tan(c+d*x))^4*sec(c+d*x)+9//20*im*a^2*d^-1*(a+im*a*tan(c+d*x))^3*sec(c+d*x)+21//20*im*a*d^-1*(a^2+im*a^2*tan(c+d*x))^2*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x), x) == :(-35//2*a^5*d^-1*arctanh(sin(c+d*x))+-35//2*im*a^5*d^-1*sec(c+d*x)+-35//6*im*d^-1*(a^5+im*a^5*tan(c+d*x))*sec(c+d*x)+-2*im*a*d^-1*(a+im*a*tan(c+d*x))^4*cos(c+d*x)+-7//3*im*a^3*d^-1*(a+im*a*tan(c+d*x))^2*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^3, x) == :(5*a^5*d^-1*arctanh(sin(c+d*x))+5*im*a^5*d^-1*sec(c+d*x)+-2//3*im*a*d^-1*(a+im*a*tan(c+d*x))^4*cos(c+d*x)^3+10//3*im*a^3*d^-1*(a+im*a*tan(c+d*x))^2*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^5, x) == :(-1//5*im*d^-1*(a+im*a*tan(c+d*x))^5*cos(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^7, x) == :(-1//7*im*d^-1*(a+im*a*tan(c+d*x))^5*cos(c+d*x)^7+-2//35*im*a*d^-1*(a+im*a*tan(c+d*x))^4*cos(c+d*x)^5+-2//105*im*a^2*d^-1*(a+im*a*tan(c+d*x))^3*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^9, x) == :(-2//63*a^5*d^-1*sin(c+d*x)^3+1//21*a^5*d^-1*sin(c+d*x)+1//105*a^5*d^-1*sin(c+d*x)^5+-1//105*im*a^5*d^-1*cos(c+d*x)^5+-2//9*im*a*d^-1*(a+im*a*tan(c+d*x))^4*cos(c+d*x)^9+-2//63*im*a^3*d^-1*(a+im*a*tan(c+d*x))^2*cos(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^5*cos(c+d*x)^11, x) == :(-5//33*a^5*d^-1*sin(c+d*x)^3+-5//231*a^5*d^-1*sin(c+d*x)^7+1//11*a^5*d^-1*sin(c+d*x)^5+5//33*a^5*d^-1*sin(c+d*x)+-5//231*im*a^5*d^-1*cos(c+d*x)^7+-2//11*im*a*d^-1*(a+im*a*tan(c+d*x))^4*cos(c+d*x)^11+-2//33*im*a^3*d^-1*(a+im*a*tan(c+d*x))^2*cos(c+d*x)^9)
@test integrate((a+im*a*tan(c+d*x))^8*sec(c+d*x)^8, x) == :(-3//7*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^14+-2//3*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^12+1//15*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^15+12//13*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^13)
@test integrate((a+im*a*tan(c+d*x))^8*sec(c+d*x)^6, x) == :(-4//11*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^11+-1//13*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^13+1//3*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^12)
@test integrate((a+im*a*tan(c+d*x))^8*sec(c+d*x)^4, x) == :(-1//5*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^10+1//11*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^11)
@test integrate((a+im*a*tan(c+d*x))^8*sec(c+d*x)^2, x) == :(-1//9*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^9)
@test integrate((a+im*a*tan(c+d*x))^8, x) == :(128*x*a^8+-64*a^8*d^-1*tan(c+d*x)+2*im*d^-1*(a^2+im*a^2*tan(c+d*x))^4+16*im*d^-1*(a^4+im*a^4*tan(c+d*x))^2+-128*im*a^8*d^-1*log(cos(c+d*x))+1//3*im*a^2*d^-1*(a+im*a*tan(c+d*x))^6+1//7*im*a*d^-1*(a+im*a*tan(c+d*x))^7+4//5*im*a^3*d^-1*(a+im*a*tan(c+d*x))^5+16//3*im*a^2*d^-1*(a^2+im*a^2*tan(c+d*x))^3)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^2, x) == :(-192*x*a^8+-10*a^8*d^-1*tan(c+d*x)^3+129*a^8*d^-1*tan(c+d*x)+1//5*a^8*d^-1*tan(c+d*x)^5+-64*im*a^9*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-2*im*a^8*d^-1*tan(c+d*x)^4+36*im*a^8*d^-1*tan(c+d*x)^2+192*im*a^8*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^4, x) == :(80*x*a^8+-31*a^8*d^-1*tan(c+d*x)+1//3*a^8*d^-1*tan(c+d*x)^3+-80*im*a^8*d^-1*log(cos(c+d*x))+-16*im*a^10*d^-1*(a+-1*im*a*tan(c+d*x))^-2+-4*im*a^8*d^-1*tan(c+d*x)^2+80*im*a^9*d^-1*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^6, x) == :(-8*x*a^8+a^8*d^-1*tan(c+d*x)+-24*im*a^9*d^-1*(a+-1*im*a*tan(c+d*x))^-1+8*im*a^8*d^-1*log(cos(c+d*x))+16*im*a^10*d^-1*(a+-1*im*a*tan(c+d*x))^-2+-16//3*im*a^11*d^-1*(a+-1*im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^8, x) == :(-1//8*im*d^-1*(a+-1*im*a*tan(c+d*x))^-4*(a^3+im*a^3*tan(c+d*x))^4)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^10, x) == :(im*a^12*d^-1*(a+-1*im*a*tan(c+d*x))^-4+-4//5*im*a^13*d^-1*(a+-1*im*a*tan(c+d*x))^-5+-1//3*im*a^11*d^-1*(a+-1*im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^12, x) == :(-1//3*im*a^14*d^-1*(a+-1*im*a*tan(c+d*x))^-6+1//5*im*a^13*d^-1*(a+-1*im*a*tan(c+d*x))^-5)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^14, x) == :(-1//7*im*a^15*d^-1*(a+-1*im*a*tan(c+d*x))^-7)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^16, x) == :(1//256*x*a^8+-1//16*im*a^16*d^-1*(a+-1*im*a*tan(c+d*x))^-8+-1//28*im*a^15*d^-1*(a+-1*im*a*tan(c+d*x))^-7+-1//48*im*a^14*d^-1*(a+-1*im*a*tan(c+d*x))^-6+-1//80*im*a^13*d^-1*(a+-1*im*a*tan(c+d*x))^-5+-1//128*im*a^12*d^-1*(a+-1*im*a*tan(c+d*x))^-4+-1//192*im*a^11*d^-1*(a+-1*im*a*tan(c+d*x))^-3+-1//256*im*a^9*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-1//256*im*a^10*d^-1*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^18, x) == :(5//512*x*a^8+-9//1024*im*a^9*d^-1*(a+-1*im*a*tan(c+d*x))^-1+-7//768*im*a^11*d^-1*(a+-1*im*a*tan(c+d*x))^-3+-3//112*im*a^15*d^-1*(a+-1*im*a*tan(c+d*x))^-7+-3//256*im*a^12*d^-1*(a+-1*im*a*tan(c+d*x))^-4+-1//32*im*a^16*d^-1*(a+-1*im*a*tan(c+d*x))^-8+-1//36*im*a^17*d^-1*(a+-1*im*a*tan(c+d*x))^-9+-1//48*im*a^14*d^-1*(a+-1*im*a*tan(c+d*x))^-6+-1//64*im*a^13*d^-1*(a+-1*im*a*tan(c+d*x))^-5+-1//128*im*a^10*d^-1*(a+-1*im*a*tan(c+d*x))^-2+1//1024*im*a^9*d^-1*(a+im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x), x) == :(-3003//16*a^8*d^-1*arctanh(sin(c+d*x))+-3003//16*im*a^8*d^-1*sec(c+d*x)+-1001//16*im*d^-1*(a^8+im*a^8*tan(c+d*x))*sec(c+d*x)+-1001//40*im*d^-1*(a^4+im*a^4*tan(c+d*x))^2*sec(c+d*x)+-143//30*im*d^-1*(a^2+im*a^2*tan(c+d*x))^4*sec(c+d*x)+-2*im*a*d^-1*(a+im*a*tan(c+d*x))^7*cos(c+d*x)+-429//40*im*a^2*d^-1*(a^2+im*a^2*tan(c+d*x))^3*sec(c+d*x)+-13//6*im*a^3*d^-1*(a+im*a*tan(c+d*x))^5*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^3, x) == :(1155//8*a^8*d^-1*arctanh(sin(c+d*x))+77//4*im*d^-1*(a^4+im*a^4*tan(c+d*x))^2*sec(c+d*x)+385//8*im*d^-1*(a^8+im*a^8*tan(c+d*x))*sec(c+d*x)+1155//8*im*a^8*d^-1*sec(c+d*x)+-2//3*im*a*d^-1*(a+im*a*tan(c+d*x))^7*cos(c+d*x)^3+22//3*im*a^3*d^-1*(a+im*a*tan(c+d*x))^5*cos(c+d*x)+33//4*im*a^2*d^-1*(a^2+im*a^2*tan(c+d*x))^3*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^5, x) == :(-63//2*a^8*d^-1*arctanh(sin(c+d*x))+-63//2*im*a^8*d^-1*sec(c+d*x)+-21//2*im*d^-1*(a^8+im*a^8*tan(c+d*x))*sec(c+d*x)+-42//5*im*a^2*d^-1*(a^2+im*a^2*tan(c+d*x))^3*cos(c+d*x)+-2//5*im*a*d^-1*(a+im*a*tan(c+d*x))^7*cos(c+d*x)^5+6//5*im*a^3*d^-1*(a+im*a*tan(c+d*x))^5*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^7, x) == :(a^8*d^-1*arctanh(sin(c+d*x))+2*im*d^-1*(a^8+im*a^8*tan(c+d*x))*cos(c+d*x)+-2//3*im*a^2*d^-1*(a^2+im*a^2*tan(c+d*x))^3*cos(c+d*x)^3+-2//7*im*a*d^-1*(a+im*a*tan(c+d*x))^7*cos(c+d*x)^7+2//5*im*a^3*d^-1*(a+im*a*tan(c+d*x))^5*cos(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^9, x) == :(-1//9*im*d^-1*(a+im*a*tan(c+d*x))^8*cos(c+d*x)^9+-1//63*im*a*d^-1*(a+im*a*tan(c+d*x))^7*cos(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^11, x) == :(-1//11*im*d^-1*(a+im*a*tan(c+d*x))^8*cos(c+d*x)^11+-2//231*im*a^2*d^-1*(a+im*a*tan(c+d*x))^6*cos(c+d*x)^7+-2//1155*im*a^3*d^-1*(a+im*a*tan(c+d*x))^5*cos(c+d*x)^5+-1//33*im*a*d^-1*(a+im*a*tan(c+d*x))^7*cos(c+d*x)^9)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^13, x) == :(-8//3003*im*d^-1*(a^2+im*a^2*tan(c+d*x))^4*cos(c+d*x)^5+-1//13*im*d^-1*(a+im*a*tan(c+d*x))^8*cos(c+d*x)^13+-20//1287*im*a^2*d^-1*(a+im*a*tan(c+d*x))^6*cos(c+d*x)^9+-20//3003*im*a^3*d^-1*(a+im*a*tan(c+d*x))^5*cos(c+d*x)^7+-8//9009*im*a^2*d^-1*(a^2+im*a^2*tan(c+d*x))^3*cos(c+d*x)^3+-5//143*im*a*d^-1*(a+im*a*tan(c+d*x))^7*cos(c+d*x)^11)
@test integrate((a+im*a*tan(c+d*x))^8*cos(c+d*x)^15, x) == :(-7//1287*a^8*d^-1*sin(c+d*x)^3+-1//1287*a^8*d^-1*sin(c+d*x)^7+7//1287*a^8*d^-1*sin(c+d*x)+7//2145*a^8*d^-1*sin(c+d*x)^5+-2//1287*im*d^-1*cos(c+d*x)^9*(a^8+im*a^8*tan(c+d*x))+-2//15*im*a*d^-1*(a+im*a*tan(c+d*x))^7*cos(c+d*x)^15+-2//195*im*a^3*d^-1*(a+im*a*tan(c+d*x))^5*cos(c+d*x)^13+-2//715*im*a^2*d^-1*(a^2+im*a^2*tan(c+d*x))^3*cos(c+d*x)^11)
@test integrate((a+im*a*tan(c+d*x))^-1*sec(c+d*x)^10, x) == :(-2*im*a^-7*d^-1*(a+-1*im*a*tan(c+d*x))^6+-1//8*im*a^-9*d^-1*(a+-1*im*a*tan(c+d*x))^8+6//7*im*a^-8*d^-1*(a+-1*im*a*tan(c+d*x))^7+8//5*im*a^-6*d^-1*(a+-1*im*a*tan(c+d*x))^5)
@test integrate((a+im*a*tan(c+d*x))^-1*sec(c+d*x)^8, x) == :(im*a^-5*d^-1*(a+-1*im*a*tan(c+d*x))^4+-4//5*im*a^-6*d^-1*(a+-1*im*a*tan(c+d*x))^5+1//6*im*a^-7*d^-1*(a+-1*im*a*tan(c+d*x))^6)
@test integrate((a+im*a*tan(c+d*x))^-1*sec(c+d*x)^6, x) == :(-1//4*im*a^-5*d^-1*(a+-1*im*a*tan(c+d*x))^4+2//3*im*a^-4*d^-1*(a+-1*im*a*tan(c+d*x))^3)
@test integrate((a+im*a*tan(c+d*x))^-1*sec(c+d*x)^4, x) == :(a^-1*d^-1*tan(c+d*x)+-1//2*im*a^-1*d^-1*tan(c+d*x)^2)
@test integrate((a+im*a*tan(c+d*x))^-1*sec(c+d*x)^2, x) == :(x*a^-1+im*a^-1*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-1, x) == :((1/2)*x*a^-1+(1/2)*im*d^-1*(a+im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^-1*cos(c+d*x)^2, x) == :(3//8*x*a^-1+-1//8*im*d^-1*(a+-1*im*a*tan(c+d*x))^-1+1//4*im*d^-1*(a+im*a*tan(c+d*x))^-1+1//8*im*a*d^-1*(a+im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-1*cos(c+d*x)^4, x) == :(5//16*x*a^-1+-1//8*im*d^-1*(a+-1*im*a*tan(c+d*x))^-1+3//16*im*d^-1*(a+im*a*tan(c+d*x))^-1+-1//32*im*a*d^-1*(a+-1*im*a*tan(c+d*x))^-2+1//24*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-3+3//32*im*a*d^-1*(a+im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-1*sec(c+d*x)^7, x) == :(3//8*a^-1*d^-1*arctanh(sin(c+d*x))+-1//5*im*a^-1*d^-1*sec(c+d*x)^5+1//4*a^-1*d^-1*sec(c+d*x)^3*tan(c+d*x)+3//8*a^-1*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-1*sec(c+d*x)^5, x) == :((1/2)*a^-1*d^-1*arctanh(sin(c+d*x))+(1/2)*a^-1*d^-1*sec(c+d*x)*tan(c+d*x)+-1//3*im*a^-1*d^-1*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-1*sec(c+d*x)^3, x) == :(a^-1*d^-1*arctanh(sin(c+d*x))+-1*im*a^-1*d^-1*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-1*sec(c+d*x), x) == :(im*d^-1*(a+im*a*tan(c+d*x))^-1*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-1*cos(c+d*x), x) == :(2//3*a^-1*d^-1*sin(c+d*x)+1//3*im*d^-1*(a+im*a*tan(c+d*x))^-1*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-1*cos(c+d*x)^3, x) == :(-4//15*a^-1*d^-1*sin(c+d*x)^3+4//5*a^-1*d^-1*sin(c+d*x)+1//5*im*d^-1*(a+im*a*tan(c+d*x))^-1*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-1*cos(c+d*x)^5, x) == :(-4//7*a^-1*d^-1*sin(c+d*x)^3+6//7*a^-1*d^-1*sin(c+d*x)+6//35*a^-1*d^-1*sin(c+d*x)^5+1//7*im*d^-1*(a+im*a*tan(c+d*x))^-1*cos(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x)^10, x) == :(-2//3*im*a^-8*d^-1*(a+-1*im*a*tan(c+d*x))^6+1//7*im*a^-9*d^-1*(a+-1*im*a*tan(c+d*x))^7+4//5*im*a^-7*d^-1*(a+-1*im*a*tan(c+d*x))^5)
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x)^8, x) == :((1/2)*im*a^-6*d^-1*(a+-1*im*a*tan(c+d*x))^4+-1//5*im*a^-7*d^-1*(a+-1*im*a*tan(c+d*x))^5)
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x)^6, x) == :(1//3*im*a^-5*d^-1*(a+-1*im*a*tan(c+d*x))^3)
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x)^4, x) == :(2*x*a^-2+-1*a^-2*d^-1*tan(c+d*x)+2*im*a^-2*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x)^2, x) == :(im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^-2, x) == :(1//4*x*a^-2+1//4*im*d^-1*(a+im*a*tan(c+d*x))^-2+1//4*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^-2*cos(c+d*x)^2, x) == :(1//4*x*a^-2+-1//16*im*d^-1*(a^2+-1*im*a^2*tan(c+d*x))^-1+1//8*im*d^-1*(a+im*a*tan(c+d*x))^-2+3//16*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1+1//12*im*a*d^-1*(a+im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^-2*cos(c+d*x)^4, x) == :(15//64*x*a^-2+-5//64*im*d^-1*(a^2+-1*im*a^2*tan(c+d*x))^-1+-1//64*im*d^-1*(a+-1*im*a*tan(c+d*x))^-2+3//32*im*d^-1*(a+im*a*tan(c+d*x))^-2+5//32*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1+1//16*im*a*d^-1*(a+im*a*tan(c+d*x))^-3+1//32*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-4)
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x)^9, x) == :(7//16*a^-2*d^-1*arctanh(sin(c+d*x))+-2//5*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1*sec(c+d*x)^7+7//16*a^-2*d^-1*sec(c+d*x)*tan(c+d*x)+7//24*a^-2*d^-1*sec(c+d*x)^3*tan(c+d*x)+7//30*a^-2*d^-1*sec(c+d*x)^5*tan(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x)^7, x) == :(5//8*a^-2*d^-1*arctanh(sin(c+d*x))+-2//3*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1*sec(c+d*x)^5+5//8*a^-2*d^-1*sec(c+d*x)*tan(c+d*x)+5//12*a^-2*d^-1*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x)^5, x) == :(3//2*a^-2*d^-1*arctanh(sin(c+d*x))+-2*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1*sec(c+d*x)^3+3//2*a^-2*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x)^3, x) == :(-1*a^-2*d^-1*arctanh(sin(c+d*x))+2*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-2*sec(c+d*x), x) == :(1//3*im*d^-1*(a+im*a*tan(c+d*x))^-2*sec(c+d*x)+1//3*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-2*cos(c+d*x), x) == :(-1//5*a^-2*d^-1*sin(c+d*x)^3+3//5*a^-2*d^-1*sin(c+d*x)+2//5*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-2*cos(c+d*x)^3, x) == :(-10//21*a^-2*d^-1*sin(c+d*x)^3+1//7*a^-2*d^-1*sin(c+d*x)^5+5//7*a^-2*d^-1*sin(c+d*x)+2//7*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-2*cos(c+d*x)^5, x) == :(-7//9*a^-2*d^-1*sin(c+d*x)^3+-1//9*a^-2*d^-1*sin(c+d*x)^7+7//9*a^-2*d^-1*sin(c+d*x)+7//15*a^-2*d^-1*sin(c+d*x)^5+2//9*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^14, x) == :(-3//2*im*a^-11*d^-1*(a+-1*im*a*tan(c+d*x))^8+-1//10*im*a^-13*d^-1*(a+-1*im*a*tan(c+d*x))^10+2//3*im*a^-12*d^-1*(a+-1*im*a*tan(c+d*x))^9+8//7*im*a^-10*d^-1*(a+-1*im*a*tan(c+d*x))^7)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^12, x) == :(-4//7*im*a^-10*d^-1*(a+-1*im*a*tan(c+d*x))^7+1//8*im*a^-11*d^-1*(a+-1*im*a*tan(c+d*x))^8+2//3*im*a^-9*d^-1*(a+-1*im*a*tan(c+d*x))^6)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^10, x) == :(-1//6*im*a^-9*d^-1*(a+-1*im*a*tan(c+d*x))^6+2//5*im*a^-8*d^-1*(a+-1*im*a*tan(c+d*x))^5)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^8, x) == :(1//4*im*a^-7*d^-1*(a+-1*im*a*tan(c+d*x))^4)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^6, x) == :(4*x*a^-3+-3*a^-3*d^-1*tan(c+d*x)+(1/2)*im*a^-3*d^-1*tan(c+d*x)^2+4*im*a^-3*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^4, x) == :(-1*x*a^-3+2*im*d^-1*(a^3+im*a^3*tan(c+d*x))^-1+-1*im*a^-3*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^2, x) == :((1/2)*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-3, x) == :(1//8*x*a^-3+1//6*im*d^-1*(a+im*a*tan(c+d*x))^-3+1//8*im*d^-1*(a^3+im*a^3*tan(c+d*x))^-1+1//8*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-3*cos(c+d*x)^2, x) == :(5//32*x*a^-3+-1//32*im*d^-1*(a^3+-1*im*a^3*tan(c+d*x))^-1+1//8*im*d^-1*(a^3+im*a^3*tan(c+d*x))^-1+1//12*im*d^-1*(a+im*a*tan(c+d*x))^-3+1//16*im*a*d^-1*(a+im*a*tan(c+d*x))^-4+3//32*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-3*cos(c+d*x)^4, x) == :(21//128*x*a^-3+-3//64*im*d^-1*(a^3+-1*im*a^3*tan(c+d*x))^-1+1//16*im*d^-1*(a+im*a*tan(c+d*x))^-3+15//128*im*d^-1*(a^3+im*a^3*tan(c+d*x))^-1+-1//128*im*a^-1*d^-1*(a+-1*im*a*tan(c+d*x))^-2+1//40*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-5+3//64*im*a*d^-1*(a+im*a*tan(c+d*x))^-4+5//64*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^9, x) == :(7//8*a^-3*d^-1*arctanh(sin(c+d*x))+-7//15*im*a^-3*d^-1*sec(c+d*x)^5+7//8*a^-3*d^-1*sec(c+d*x)*tan(c+d*x)+7//12*a^-3*d^-1*sec(c+d*x)^3*tan(c+d*x)+-2//3*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-2*sec(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^7, x) == :(5//2*a^-3*d^-1*arctanh(sin(c+d*x))+-5//3*im*a^-3*d^-1*sec(c+d*x)^3+5//2*a^-3*d^-1*sec(c+d*x)*tan(c+d*x)+-2*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-2*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^5, x) == :(-3*a^-3*d^-1*arctanh(sin(c+d*x))+3*im*a^-3*d^-1*sec(c+d*x)+2*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-2*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x)^3, x) == :(1//3*im*d^-1*(a+im*a*tan(c+d*x))^-3*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-3*sec(c+d*x), x) == :(1//5*im*d^-1*(a+im*a*tan(c+d*x))^-3*sec(c+d*x)+2//15*im*d^-1*(a^3+im*a^3*tan(c+d*x))^-1*sec(c+d*x)+2//15*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-2*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-3*cos(c+d*x), x) == :(-4//35*a^-3*d^-1*sin(c+d*x)^3+12//35*a^-3*d^-1*sin(c+d*x)+1//7*im*d^-1*(a+im*a*tan(c+d*x))^-3*cos(c+d*x)+8//35*im*d^-1*(a^3+im*a^3*tan(c+d*x))^-1*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-3*cos(c+d*x)^3, x) == :(-20//63*a^-3*d^-1*sin(c+d*x)^3+2//21*a^-3*d^-1*sin(c+d*x)^5+10//21*a^-3*d^-1*sin(c+d*x)+1//9*im*d^-1*(a+im*a*tan(c+d*x))^-3*cos(c+d*x)^3+4//21*im*d^-1*(a^3+im*a^3*tan(c+d*x))^-1*cos(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-3*cos(c+d*x)^5, x) == :(-56//99*a^-3*d^-1*sin(c+d*x)^3+-8//99*a^-3*d^-1*sin(c+d*x)^7+56//99*a^-3*d^-1*sin(c+d*x)+56//165*a^-3*d^-1*sin(c+d*x)^5+1//11*im*d^-1*(a+im*a*tan(c+d*x))^-3*cos(c+d*x)^5+16//99*im*d^-1*(a^3+im*a^3*tan(c+d*x))^-1*cos(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^14, x) == :(-1//2*im*a^-12*d^-1*(a+-1*im*a*tan(c+d*x))^8+1//9*im*a^-13*d^-1*(a+-1*im*a*tan(c+d*x))^9+4//7*im*a^-11*d^-1*(a+-1*im*a*tan(c+d*x))^7)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^12, x) == :(-1//7*im*a^-11*d^-1*(a+-1*im*a*tan(c+d*x))^7+1//3*im*a^-10*d^-1*(a+-1*im*a*tan(c+d*x))^6)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^10, x) == :(1//5*im*a^-9*d^-1*(a+-1*im*a*tan(c+d*x))^5)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^8, x) == :(8*x*a^-4+-4*a^-4*d^-1*tan(c+d*x)+-1*im*a^-6*d^-1*(a+-1*im*a*tan(c+d*x))^2+8*im*a^-4*d^-1*log(cos(c+d*x))+-1//3*im*a^-7*d^-1*(a+-1*im*a*tan(c+d*x))^3)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^6, x) == :(-4*x*a^-4+a^-4*d^-1*tan(c+d*x)+4*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1+-4*im*a^-4*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^4, x) == :(d^-1*(a^2+im*a^2*tan(c+d*x))^-2*tan(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^2, x) == :(1//3*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^-4, x) == :(1//16*x*a^-4+1//8*im*d^-1*(a+im*a*tan(c+d*x))^-4+1//16*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-2+1//16*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1+1//12*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^-4*cos(c+d*x)^2, x) == :(3//32*x*a^-4+-1//64*im*d^-1*(a^4+-1*im*a^4*tan(c+d*x))^-1+1//16*im*d^-1*(a+im*a*tan(c+d*x))^-4+1//16*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-2+5//64*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1+1//16*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3+1//20*im*a*d^-1*(a+im*a*tan(c+d*x))^-5)
@test integrate((a+im*a*tan(c+d*x))^-4*cos(c+d*x)^4, x) == :(7//64*x*a^-4+-7//256*im*d^-1*(a^4+-1*im*a^4*tan(c+d*x))^-1+-1//256*im*d^-1*(a^2+-1*im*a^2*tan(c+d*x))^-2+3//64*im*d^-1*(a+im*a*tan(c+d*x))^-4+15//256*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-2+21//256*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1+1//48*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-6+3//80*im*a*d^-1*(a+im*a*tan(c+d*x))^-5+5//96*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^9, x) == :(35//8*a^-4*d^-1*arctanh(sin(c+d*x))+-14//3*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1*sec(c+d*x)^5+35//8*a^-4*d^-1*sec(c+d*x)*tan(c+d*x)+35//12*a^-4*d^-1*sec(c+d*x)^3*tan(c+d*x)+-2*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3*sec(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^7, x) == :(-15//2*a^-4*d^-1*arctanh(sin(c+d*x))+10*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1*sec(c+d*x)^3+-15//2*a^-4*d^-1*sec(c+d*x)*tan(c+d*x)+2*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^5, x) == :(a^-4*d^-1*arctanh(sin(c+d*x))+-2*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1*sec(c+d*x)+2//3*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x)^3, x) == :(1//5*im*d^-1*(a+im*a*tan(c+d*x))^-4*sec(c+d*x)^3+1//15*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-4*sec(c+d*x), x) == :(1//7*im*d^-1*(a+im*a*tan(c+d*x))^-4*sec(c+d*x)+2//35*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-2*sec(c+d*x)+2//35*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1*sec(c+d*x)+3//35*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-4*cos(c+d*x), x) == :(-4//63*a^-4*d^-1*sin(c+d*x)^3+4//21*a^-4*d^-1*sin(c+d*x)+1//9*im*d^-1*(a+im*a*tan(c+d*x))^-4*cos(c+d*x)+8//63*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1*cos(c+d*x)^3+5//63*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-4*cos(c+d*x)^3, x) == :(-20//99*a^-4*d^-1*sin(c+d*x)^3+2//33*a^-4*d^-1*sin(c+d*x)^5+10//33*a^-4*d^-1*sin(c+d*x)+1//11*im*d^-1*(a+im*a*tan(c+d*x))^-4*cos(c+d*x)^3+4//33*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1*cos(c+d*x)^5+7//99*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-4*cos(c+d*x)^5, x) == :(-56//143*a^-4*d^-1*sin(c+d*x)^3+-8//143*a^-4*d^-1*sin(c+d*x)^7+56//143*a^-4*d^-1*sin(c+d*x)+168//715*a^-4*d^-1*sin(c+d*x)^5+1//13*im*d^-1*(a+im*a*tan(c+d*x))^-4*cos(c+d*x)^5+16//143*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-1*cos(c+d*x)^7+9//143*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3*cos(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^14, x) == :(-192*x*a^-8+-10*a^-8*d^-1*tan(c+d*x)^3+64*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1+129*a^-8*d^-1*tan(c+d*x)+1//5*a^-8*d^-1*tan(c+d*x)^5+-192*im*a^-8*d^-1*log(cos(c+d*x))+-36*im*a^-8*d^-1*tan(c+d*x)^2+2*im*a^-8*d^-1*tan(c+d*x)^4)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^12, x) == :(80*x*a^-8+-80*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1+-31*a^-8*d^-1*tan(c+d*x)+16*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-2+1//3*a^-8*d^-1*tan(c+d*x)^3+4*im*a^-8*d^-1*tan(c+d*x)^2+80*im*a^-8*d^-1*log(cos(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^10, x) == :(-8*x*a^-8+a^-8*d^-1*tan(c+d*x)+-16*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-2+24*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1+-8*im*a^-8*d^-1*log(cos(c+d*x))+16//3*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^8, x) == :(1//8*im*d^-1*(a+-1*im*a*tan(c+d*x))^4*(a^3+im*a^3*tan(c+d*x))^-4)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^6, x) == :(-1*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-4+1//3*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^-3+4//5*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^4, x) == :(-1//5*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5+1//3*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-6)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^2, x) == :(1//7*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7)
@test integrate((a+im*a*tan(c+d*x))^-8, x) == :(1//256*x*a^-8+1//16*im*d^-1*(a+im*a*tan(c+d*x))^-8+1//128*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-4+1//256*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-2+1//256*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1+1//28*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7+1//48*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-6+1//80*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5+1//192*im*a^-2*d^-1*(a^2+im*a^2*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^-8*cos(c+d*x)^2, x) == :(5//512*x*a^-8+-1//1024*im*d^-1*(a^8+-1*im*a^8*tan(c+d*x))^-1+1//32*im*d^-1*(a+im*a*tan(c+d*x))^-8+1//128*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-2+3//256*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-4+9//1024*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1+1//36*im*a*d^-1*(a+im*a*tan(c+d*x))^-9+1//48*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-6+1//64*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5+3//112*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7+7//768*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^-8*cos(c+d*x)^4, x) == :(33//2048*x*a^-8+-11//4096*im*d^-1*(a^8+-1*im*a^8*tan(c+d*x))^-1+-1//4096*im*d^-1*(a^4+-1*im*a^4*tan(c+d*x))^-2+3//128*im*d^-1*(a+im*a*tan(c+d*x))^-8+7//512*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-4+45//4096*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-2+55//4096*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1+1//48*im*a*d^-1*(a+im*a*tan(c+d*x))^-9+1//80*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-10+3//256*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^-3+5//224*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7+5//256*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-6+21//1280*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^13, x) == :(1155//8*a^-8*d^-1*arctanh(sin(c+d*x))+-154*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1*sec(c+d*x)^5+385//4*a^-8*d^-1*sec(c+d*x)^3*tan(c+d*x)+1155//8*a^-8*d^-1*sec(c+d*x)*tan(c+d*x)+-66*im*a^-2*d^-1*(a^2+im*a^2*tan(c+d*x))^-3*sec(c+d*x)^7+-22//3*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5*sec(c+d*x)^9+2//3*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7*sec(c+d*x)^11)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^11, x) == :(-63//2*a^-8*d^-1*arctanh(sin(c+d*x))+42*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1*sec(c+d*x)^3+-63//2*a^-8*d^-1*sec(c+d*x)*tan(c+d*x)+-6//5*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5*sec(c+d*x)^7+2//5*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7*sec(c+d*x)^9+42//5*im*a^-2*d^-1*(a^2+im*a^2*tan(c+d*x))^-3*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^9, x) == :(a^-8*d^-1*arctanh(sin(c+d*x))+-2*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1*sec(c+d*x)+-2//5*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5*sec(c+d*x)^5+2//3*im*a^-2*d^-1*(a^2+im*a^2*tan(c+d*x))^-3*sec(c+d*x)^3+2//7*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7*sec(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^7, x) == :(1//9*im*d^-1*(a+im*a*tan(c+d*x))^-8*sec(c+d*x)^7+1//63*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7*sec(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^5, x) == :(1//11*im*d^-1*(a+im*a*tan(c+d*x))^-8*sec(c+d*x)^5+1//33*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7*sec(c+d*x)^5+2//231*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-6*sec(c+d*x)^5+2//1155*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x)^3, x) == :(1//13*im*d^-1*(a+im*a*tan(c+d*x))^-8*sec(c+d*x)^3+8//3003*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-4*sec(c+d*x)^3+5//143*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7*sec(c+d*x)^3+8//9009*im*a^-2*d^-1*(a^2+im*a^2*tan(c+d*x))^-3*sec(c+d*x)^3+20//1287*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-6*sec(c+d*x)^3+20//3003*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-8*sec(c+d*x), x) == :(1//15*im*d^-1*(a+im*a*tan(c+d*x))^-8*sec(c+d*x)+8//1287*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-4*sec(c+d*x)+16//6435*im*d^-1*(a^4+im*a^4*tan(c+d*x))^-2*sec(c+d*x)+16//6435*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1*sec(c+d*x)+7//195*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7*sec(c+d*x)+8//2145*im*a^-2*d^-1*(a^2+im*a^2*tan(c+d*x))^-3*sec(c+d*x)+14//715*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-6*sec(c+d*x)+14//1287*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-8*cos(c+d*x), x) == :(-64//12155*a^-8*d^-1*sin(c+d*x)^3+192//12155*a^-8*d^-1*sin(c+d*x)+1//17*im*d^-1*(a+im*a*tan(c+d*x))^-8*cos(c+d*x)+112//12155*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-4*cos(c+d*x)+128//12155*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1*cos(c+d*x)^3+3//85*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7*cos(c+d*x)+16//2431*im*a^-2*d^-1*(a^2+im*a^2*tan(c+d*x))^-3*cos(c+d*x)+24//1105*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-6*cos(c+d*x)+168//12155*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-8*cos(c+d*x)^3, x) == :(-320//12597*a^-8*d^-1*sin(c+d*x)^3+32//4199*a^-8*d^-1*sin(c+d*x)^5+160//4199*a^-8*d^-1*sin(c+d*x)+1//19*im*d^-1*(a+im*a*tan(c+d*x))^-8*cos(c+d*x)^3+48//4199*im*d^-1*(a^2+im*a^2*tan(c+d*x))^-4*cos(c+d*x)^3+64//4199*im*d^-1*(a^8+im*a^8*tan(c+d*x))^-1*cos(c+d*x)^5+11//323*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-7*cos(c+d*x)^3+22//969*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-6*cos(c+d*x)^3+66//4199*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-5*cos(c+d*x)^3+112//12597*im*a^-2*d^-1*(a^2+im*a^2*tan(c+d*x))^-3*cos(c+d*x)^3)
@test integrate((e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x)), x) == :(2//7*im*a*d^-1*(e*sec(c+d*x))^7//2+2//5*a*e*d^-1*(e*sec(c+d*x))^5//2*sin(c+d*x)+6//5*a*d^-1*e^3*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-6//5*a*d^-1*e^4*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x)), x) == :(2//5*im*a*d^-1*(e*sec(c+d*x))^5//2+2//3*a*e*d^-1*(e*sec(c+d*x))^3//2*sin(c+d*x)+2//3*a*d^-1*e^2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x)), x) == :(2//3*im*a*d^-1*(e*sec(c+d*x))^3//2+2*a*e*d^-1*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-2*a*d^-1*e^2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x)), x) == :(2*im*a*d^-1*(e*sec(c+d*x))^(1/2)+2*a*d^-1*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x)), x) == :(-2*im*a*d^-1*(e*sec(c+d*x))^-1//2+2*a*d^-1*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x)), x) == :(-2//3*im*a*d^-1*(e*sec(c+d*x))^-3//2+2//3*a*d^-1*e^-1*(e*sec(c+d*x))^-1//2*sin(c+d*x)+2//3*a*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x)), x) == :(-2//5*im*a*d^-1*(e*sec(c+d*x))^-5//2+2//5*a*d^-1*e^-1*(e*sec(c+d*x))^-3//2*sin(c+d*x)+6//5*a*d^-1*e^-2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x)), x) == :(-2//7*im*a*d^-1*(e*sec(c+d*x))^-7//2+2//7*a*d^-1*e^-1*(e*sec(c+d*x))^-5//2*sin(c+d*x)+10//21*a*d^-1*e^-3*(e*sec(c+d*x))^-1//2*sin(c+d*x)+10//21*a*d^-1*e^-4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^2, x) == :(2//5*im*d^-1*(e*sec(c+d*x))^3//2*(a^2+im*a^2*tan(c+d*x))+14//15*im*a^2*d^-1*(e*sec(c+d*x))^3//2+14//5*e*a^2*d^-1*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-14//5*a^2*d^-1*e^2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^2, x) == :(2//3*im*d^-1*(e*sec(c+d*x))^(1/2)*(a^2+im*a^2*tan(c+d*x))+10//3*im*a^2*d^-1*(e*sec(c+d*x))^(1/2)+10//3*a^2*d^-1*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^2, x) == :(-4*im*d^-1*(e*sec(c+d*x))^-1//2*(a^2+im*a^2*tan(c+d*x))+-6*a^2*d^-1*e^-1*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+6*a^2*d^-1*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^2, x) == :(-4//3*im*d^-1*(e*sec(c+d*x))^-3//2*(a^2+im*a^2*tan(c+d*x))+-2//3*a^2*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^2, x) == :(-4//5*im*d^-1*(e*sec(c+d*x))^-5//2*(a^2+im*a^2*tan(c+d*x))+2//5*a^2*d^-1*e^-2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^2, x) == :(-4//7*im*d^-1*(e*sec(c+d*x))^-7//2*(a^2+im*a^2*tan(c+d*x))+2//7*a^2*d^-1*e^-3*(e*sec(c+d*x))^-1//2*sin(c+d*x)+2//7*a^2*d^-1*e^-4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^2, x) == :(-4//9*im*d^-1*(e*sec(c+d*x))^-9//2*(a^2+im*a^2*tan(c+d*x))+2//9*a^2*d^-1*e^-3*(e*sec(c+d*x))^-3//2*sin(c+d*x)+2//3*a^2*d^-1*e^-4*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-11//2*(a+im*a*tan(c+d*x))^2, x) == :(-4//11*im*d^-1*(e*sec(c+d*x))^-11//2*(a^2+im*a^2*tan(c+d*x))+2//11*a^2*d^-1*e^-3*(e*sec(c+d*x))^-5//2*sin(c+d*x)+10//33*a^2*d^-1*e^-5*(e*sec(c+d*x))^-1//2*sin(c+d*x)+10//33*a^2*d^-1*e^-6*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^3, x) == :(10//21*im*a^3*d^-1*(e*sec(c+d*x))^7//2+10//33*im*d^-1*(e*sec(c+d*x))^7//2*(a^3+im*a^3*tan(c+d*x))+2*a^3*d^-1*e^3*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+2//3*e*a^3*d^-1*(e*sec(c+d*x))^5//2*sin(c+d*x)+2//11*im*a*d^-1*(e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^2+-2*a^3*d^-1*e^4*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^3, x) == :(26//35*im*a^3*d^-1*(e*sec(c+d*x))^5//2+26//63*im*d^-1*(e*sec(c+d*x))^5//2*(a^3+im*a^3*tan(c+d*x))+2//9*im*a*d^-1*(e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^2+26//21*e*a^3*d^-1*(e*sec(c+d*x))^3//2*sin(c+d*x)+26//21*a^3*d^-1*e^2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^3, x) == :(22//15*im*a^3*d^-1*(e*sec(c+d*x))^3//2+22//35*im*d^-1*(e*sec(c+d*x))^3//2*(a^3+im*a^3*tan(c+d*x))+2//7*im*a*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^2+22//5*e*a^3*d^-1*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-22//5*a^3*d^-1*e^2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^3, x) == :(6*im*a^3*d^-1*(e*sec(c+d*x))^(1/2)+6//5*im*d^-1*(e*sec(c+d*x))^(1/2)*(a^3+im*a^3*tan(c+d*x))+6*a^3*d^-1*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*im*a*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^2)
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^3, x) == :(-10//3*im*a^3*d^-1*e^-2*(e*sec(c+d*x))^(1/2)+-4//3*im*a*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^2+-10//3*a^3*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^3, x) == :(-4//5*im*a*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^2+6//5*im*a^3*d^-1*e^-2*(e*sec(c+d*x))^-1//2+-6//5*a^3*d^-1*e^-2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^3, x) == :(-2//7*im*d^-1*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^3+-4//21*im*d^-1*e^-2*(e*sec(c+d*x))^-3//2*(a^3+im*a^3*tan(c+d*x))+-2//21*a^3*d^-1*e^-4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^3, x) == :(-2//9*im*d^-1*(e*sec(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^3+-4//15*im*d^-1*e^-2*(e*sec(c+d*x))^-5//2*(a^3+im*a^3*tan(c+d*x))+2//15*a^3*d^-1*e^-4*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-11//2*(a+im*a*tan(c+d*x))^3, x) == :(-2//11*im*d^-1*(e*sec(c+d*x))^-11//2*(a+im*a*tan(c+d*x))^3+-20//77*im*d^-1*e^-2*(e*sec(c+d*x))^-7//2*(a^3+im*a^3*tan(c+d*x))+10//77*a^3*d^-1*e^-5*(e*sec(c+d*x))^-1//2*sin(c+d*x)+10//77*a^3*d^-1*e^-6*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-13//2*(a+im*a*tan(c+d*x))^3, x) == :(-2//13*im*d^-1*(e*sec(c+d*x))^-13//2*(a+im*a*tan(c+d*x))^3+-28//117*im*d^-1*e^-2*(e*sec(c+d*x))^-9//2*(a^3+im*a^3*tan(c+d*x))+14//117*a^3*d^-1*e^-5*(e*sec(c+d*x))^-3//2*sin(c+d*x)+14//39*a^3*d^-1*e^-6*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-15//2*(a+im*a*tan(c+d*x))^3, x) == :(-2//15*im*d^-1*(e*sec(c+d*x))^-15//2*(a+im*a*tan(c+d*x))^3+-12//55*im*d^-1*e^-2*(e*sec(c+d*x))^-11//2*(a^3+im*a^3*tan(c+d*x))+2//11*a^3*d^-1*e^-7*(e*sec(c+d*x))^-1//2*sin(c+d*x)+6//55*a^3*d^-1*e^-5*(e*sec(c+d*x))^-5//2*sin(c+d*x)+2//11*a^3*d^-1*e^-8*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^4, x) == :(10//21*im*d^-1*(e*sec(c+d*x))^3//2*(a^2+im*a^2*tan(c+d*x))^2+22//9*im*a^4*d^-1*(e*sec(c+d*x))^3//2+22//21*im*d^-1*(e*sec(c+d*x))^3//2*(a^4+im*a^4*tan(c+d*x))+2//9*im*a*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^3+22//3*e*a^4*d^-1*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-22//3*a^4*d^-1*e^2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^4, x) == :(26//35*im*d^-1*(e*sec(c+d*x))^(1/2)*(a^2+im*a^2*tan(c+d*x))^2+78//7*im*a^4*d^-1*(e*sec(c+d*x))^(1/2)+78//35*im*d^-1*(e*sec(c+d*x))^(1/2)*(a^4+im*a^4*tan(c+d*x))+2//7*im*a*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^3+78//7*a^4*d^-1*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^4, x) == :(-4*im*a*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^3+-154//5*a^4*d^-1*e^-1*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-154//15*im*a^4*d^-1*e^-2*(e*sec(c+d*x))^3//2+-22//5*im*d^-1*e^-2*(e*sec(c+d*x))^3//2*(a^4+im*a^4*tan(c+d*x))+154//5*a^4*d^-1*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^4, x) == :(-10*im*a^4*d^-1*e^-2*(e*sec(c+d*x))^(1/2)+-2*im*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*(a^4+im*a^4*tan(c+d*x))+-4//3*im*a*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^3+-10*a^4*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^4, x) == :(-4//5*im*a*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^3+28//5*im*d^-1*e^-2*(e*sec(c+d*x))^-1//2*(a^4+im*a^4*tan(c+d*x))+42//5*a^4*d^-1*e^-3*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-42//5*a^4*d^-1*e^-2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^4, x) == :(-4//7*im*a*d^-1*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^3+20//21*im*d^-1*e^-2*(e*sec(c+d*x))^-3//2*(a^4+im*a^4*tan(c+d*x))+10//21*a^4*d^-1*e^-4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^4, x) == :(-4//9*im*a*d^-1*(e*sec(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^3+4//15*im*d^-1*e^-2*(e*sec(c+d*x))^-5//2*(a^4+im*a^4*tan(c+d*x))+-2//15*a^4*d^-1*e^-4*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-11//2*(a+im*a*tan(c+d*x))^4, x) == :(-4//11*im*a*d^-1*(e*sec(c+d*x))^-11//2*(a+im*a*tan(c+d*x))^3+-2//77*a^4*d^-1*e^-5*(e*sec(c+d*x))^-1//2*sin(c+d*x)+4//77*im*d^-1*e^-2*(e*sec(c+d*x))^-7//2*(a^4+im*a^4*tan(c+d*x))+-2//77*a^4*d^-1*e^-6*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-13//2*(a+im*a*tan(c+d*x))^4, x) == :(-4//13*im*a*d^-1*(e*sec(c+d*x))^-13//2*(a+im*a*tan(c+d*x))^3+-4//117*im*d^-1*e^-2*(e*sec(c+d*x))^-9//2*(a^4+im*a^4*tan(c+d*x))+2//117*a^4*d^-1*e^-5*(e*sec(c+d*x))^-3//2*sin(c+d*x)+2//39*a^4*d^-1*e^-6*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-15//2*(a+im*a*tan(c+d*x))^4, x) == :(-4//15*im*a*d^-1*(e*sec(c+d*x))^-15//2*(a+im*a*tan(c+d*x))^3+-4//55*im*d^-1*e^-2*(e*sec(c+d*x))^-11//2*(a^4+im*a^4*tan(c+d*x))+2//33*a^4*d^-1*e^-7*(e*sec(c+d*x))^-1//2*sin(c+d*x)+2//55*a^4*d^-1*e^-5*(e*sec(c+d*x))^-5//2*sin(c+d*x)+2//33*a^4*d^-1*e^-8*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^11//2*(a+im*a*tan(c+d*x))^-1, x) == :(-2//7*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^7//2+2//5*a^-1*d^-1*e^3*(e*sec(c+d*x))^5//2*sin(c+d*x)+6//5*a^-1*d^-1*e^5*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-6//5*a^-1*d^-1*e^6*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^9//2*(a+im*a*tan(c+d*x))^-1, x) == :(-2//5*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^5//2+2//3*a^-1*d^-1*e^3*(e*sec(c+d*x))^3//2*sin(c+d*x)+2//3*a^-1*d^-1*e^4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-1, x) == :(2*a^-1*d^-1*e^3*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-2//3*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^3//2+-2*a^-1*d^-1*e^4*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-1, x) == :(-2*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^(1/2)+2*a^-1*d^-1*e^2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-1, x) == :(2*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^-1//2+2*a^-1*d^-1*e^2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1, x) == :(2//3*im*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1+2//3*a^-1*d^-1*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1, x) == :(2//5*im*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1+6//5*a^-1*d^-1*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-1, x) == :(2//7*im*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-1+10//21*a^-1*d^-1*e^-1*(e*sec(c+d*x))^-1//2*sin(c+d*x)+10//21*a^-1*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-1, x) == :(2//9*im*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-1+14//45*a^-1*d^-1*e^-1*(e*sec(c+d*x))^-3//2*sin(c+d*x)+14//15*a^-1*d^-1*e^-2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1, x) == :(2//11*im*d^-1*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1+18//77*a^-1*d^-1*e^-1*(e*sec(c+d*x))^-5//2*sin(c+d*x)+30//77*a^-1*d^-1*e^-3*(e*sec(c+d*x))^-1//2*sin(c+d*x)+30//77*a^-1*d^-1*e^-4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^15//2*(a+im*a*tan(c+d*x))^-2, x) == :(-4//7*im*d^-1*e^2*(e*sec(c+d*x))^11//2*(a^2+im*a^2*tan(c+d*x))^-1+22//15*a^-2*d^-1*e^7*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+22//45*a^-2*d^-1*e^5*(e*sec(c+d*x))^5//2*sin(c+d*x)+22//63*a^-2*d^-1*e^3*(e*sec(c+d*x))^9//2*sin(c+d*x)+-22//15*a^-2*d^-1*e^8*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^13//2*(a+im*a*tan(c+d*x))^-2, x) == :(-4//5*im*d^-1*e^2*(e*sec(c+d*x))^9//2*(a^2+im*a^2*tan(c+d*x))^-1+6//7*a^-2*d^-1*e^5*(e*sec(c+d*x))^3//2*sin(c+d*x)+18//35*a^-2*d^-1*e^3*(e*sec(c+d*x))^7//2*sin(c+d*x)+6//7*a^-2*d^-1*e^6*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^11//2*(a+im*a*tan(c+d*x))^-2, x) == :(-4//3*im*d^-1*e^2*(e*sec(c+d*x))^7//2*(a^2+im*a^2*tan(c+d*x))^-1+14//5*a^-2*d^-1*e^5*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+14//15*a^-2*d^-1*e^3*(e*sec(c+d*x))^5//2*sin(c+d*x)+-14//5*a^-2*d^-1*e^6*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^9//2*(a+im*a*tan(c+d*x))^-2, x) == :(-4*im*d^-1*e^2*(e*sec(c+d*x))^5//2*(a^2+im*a^2*tan(c+d*x))^-1+10//3*a^-2*d^-1*e^3*(e*sec(c+d*x))^3//2*sin(c+d*x)+10//3*a^-2*d^-1*e^4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-2, x) == :(-6*a^-2*d^-1*e^3*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+4*im*d^-1*e^2*(e*sec(c+d*x))^3//2*(a^2+im*a^2*tan(c+d*x))^-1+6*a^-2*d^-1*e^4*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-2, x) == :(4//3*im*d^-1*e^2*(e*sec(c+d*x))^(1/2)*(a^2+im*a^2*tan(c+d*x))^-1+-2//3*a^-2*d^-1*e^2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-2, x) == :(4//5*im*d^-1*e^2*(e*sec(c+d*x))^-1//2*(a^2+im*a^2*tan(c+d*x))^-1+2//5*a^-2*d^-1*e^2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-2, x) == :(2//7*e*a^-2*d^-1*(e*sec(c+d*x))^-1//2*sin(c+d*x)+2//7*a^-2*d^-1*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//7*im*d^-1*e^2*(e*sec(c+d*x))^-3//2*(a^2+im*a^2*tan(c+d*x))^-1)
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-2, x) == :(2//3*a^-2*d^-1*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//9*e*a^-2*d^-1*(e*sec(c+d*x))^-3//2*sin(c+d*x)+4//9*im*d^-1*e^2*(e*sec(c+d*x))^-5//2*(a^2+im*a^2*tan(c+d*x))^-1)
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-2, x) == :(2//11*e*a^-2*d^-1*(e*sec(c+d*x))^-5//2*sin(c+d*x)+4//11*im*d^-1*e^2*(e*sec(c+d*x))^-7//2*(a^2+im*a^2*tan(c+d*x))^-1+10//33*a^-2*d^-1*e^-1*(e*sec(c+d*x))^-1//2*sin(c+d*x)+10//33*a^-2*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-2, x) == :(2//13*e*a^-2*d^-1*(e*sec(c+d*x))^-7//2*sin(c+d*x)+4//13*im*d^-1*e^2*(e*sec(c+d*x))^-9//2*(a^2+im*a^2*tan(c+d*x))^-1+14//65*a^-2*d^-1*e^-1*(e*sec(c+d*x))^-3//2*sin(c+d*x)+42//65*a^-2*d^-1*e^-2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-2, x) == :(2//7*a^-2*d^-1*e^-3*(e*sec(c+d*x))^-1//2*sin(c+d*x)+2//15*e*a^-2*d^-1*(e*sec(c+d*x))^-9//2*sin(c+d*x)+4//15*im*d^-1*e^2*(e*sec(c+d*x))^-11//2*(a^2+im*a^2*tan(c+d*x))^-1+6//35*a^-2*d^-1*e^-1*(e*sec(c+d*x))^-5//2*sin(c+d*x)+2//7*a^-2*d^-1*e^-4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^15//2*(a+im*a*tan(c+d*x))^-3, x) == :(-22//21*im*a^-3*d^-1*e^4*(e*sec(c+d*x))^7//2+22//5*a^-3*d^-1*e^7*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+22//15*a^-3*d^-1*e^5*(e*sec(c+d*x))^5//2*sin(c+d*x)+-22//5*a^-3*d^-1*e^8*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-4//3*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^11//2*(a+im*a*tan(c+d*x))^-2)
@test integrate((e*sec(c+d*x))^13//2*(a+im*a*tan(c+d*x))^-3, x) == :(6*a^-3*d^-1*e^5*(e*sec(c+d*x))^3//2*sin(c+d*x)+-18//5*im*a^-3*d^-1*e^4*(e*sec(c+d*x))^5//2+-4*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^9//2*(a+im*a*tan(c+d*x))^-2+6*a^-3*d^-1*e^6*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^11//2*(a+im*a*tan(c+d*x))^-3, x) == :(-14*a^-3*d^-1*e^5*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+14//3*im*a^-3*d^-1*e^4*(e*sec(c+d*x))^3//2+4*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-2+14*a^-3*d^-1*e^6*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^9//2*(a+im*a*tan(c+d*x))^-3, x) == :(10//3*im*a^-3*d^-1*e^4*(e*sec(c+d*x))^(1/2)+-10//3*a^-3*d^-1*e^4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//3*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-2)
@test integrate((e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-3, x) == :(-6//5*im*a^-3*d^-1*e^4*(e*sec(c+d*x))^-1//2+-6//5*a^-3*d^-1*e^4*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//5*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-2)
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-3, x) == :(-2//21*im*d^-1*e^2*(e*sec(c+d*x))^(1/2)*(a^3+im*a^3*tan(c+d*x))^-1+-2//21*a^-3*d^-1*e^2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//7*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-2)
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-3, x) == :(2//45*im*d^-1*e^2*(e*sec(c+d*x))^-1//2*(a^3+im*a^3*tan(c+d*x))^-1+2//15*a^-3*d^-1*e^2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//9*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-2)
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-3, x) == :(2//11*im*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-3+10//77*e*a^-3*d^-1*(e*sec(c+d*x))^-1//2*sin(c+d*x)+10//77*a^-3*d^-1*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+20//77*im*d^-1*e^2*(e*sec(c+d*x))^-3//2*(a^3+im*a^3*tan(c+d*x))^-1)
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-3, x) == :(2//13*im*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-3+14//39*a^-3*d^-1*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+14//117*e*a^-3*d^-1*(e*sec(c+d*x))^-3//2*sin(c+d*x)+28//117*im*d^-1*e^2*(e*sec(c+d*x))^-5//2*(a^3+im*a^3*tan(c+d*x))^-1)
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-3, x) == :(2//15*im*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-3+2//11*a^-3*d^-1*e^-1*(e*sec(c+d*x))^-1//2*sin(c+d*x)+6//55*e*a^-3*d^-1*(e*sec(c+d*x))^-5//2*sin(c+d*x)+12//55*im*d^-1*e^2*(e*sec(c+d*x))^-7//2*(a^3+im*a^3*tan(c+d*x))^-1+2//11*a^-3*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^15//2*(a+im*a*tan(c+d*x))^-4, x) == :(-154//5*a^-4*d^-1*e^7*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-154//15*a^-4*d^-1*e^5*(e*sec(c+d*x))^5//2*sin(c+d*x)+44//3*im*d^-1*e^4*(e*sec(c+d*x))^7//2*(a^4+im*a^4*tan(c+d*x))^-1+4*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^11//2*(a+im*a*tan(c+d*x))^-3+154//5*a^-4*d^-1*e^8*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^13//2*(a+im*a*tan(c+d*x))^-4, x) == :(-10*a^-4*d^-1*e^5*(e*sec(c+d*x))^3//2*sin(c+d*x)+12*im*d^-1*e^4*(e*sec(c+d*x))^5//2*(a^4+im*a^4*tan(c+d*x))^-1+-10*a^-4*d^-1*e^6*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//3*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^9//2*(a+im*a*tan(c+d*x))^-3)
@test integrate((e*sec(c+d*x))^11//2*(a+im*a*tan(c+d*x))^-4, x) == :(-28//5*im*d^-1*e^4*(e*sec(c+d*x))^3//2*(a^4+im*a^4*tan(c+d*x))^-1+42//5*a^-4*d^-1*e^5*(e*sec(c+d*x))^(1/2)*sin(c+d*x)+-42//5*a^-4*d^-1*e^6*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//5*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-3)
@test integrate((e*sec(c+d*x))^9//2*(a+im*a*tan(c+d*x))^-4, x) == :(-20//21*im*d^-1*e^4*(e*sec(c+d*x))^(1/2)*(a^4+im*a^4*tan(c+d*x))^-1+4//7*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-3+10//21*a^-4*d^-1*e^4*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-4, x) == :(-4//15*im*d^-1*e^4*(e*sec(c+d*x))^-1//2*(a^4+im*a^4*tan(c+d*x))^-1+-2//15*a^-4*d^-1*e^4*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//9*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-3)
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-4, x) == :(-4//77*im*d^-1*e^4*(e*sec(c+d*x))^-3//2*(a^4+im*a^4*tan(c+d*x))^-1+-2//77*a^-4*d^-1*e^3*(e*sec(c+d*x))^-1//2*sin(c+d*x)+-2//77*a^-4*d^-1*e^2*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//11*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-3)
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-4, x) == :(2//117*a^-4*d^-1*e^3*(e*sec(c+d*x))^-3//2*sin(c+d*x)+4//117*im*d^-1*e^4*(e*sec(c+d*x))^-5//2*(a^4+im*a^4*tan(c+d*x))^-1+2//39*a^-4*d^-1*e^2*(e*sec(c+d*x))^-1//2*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//13*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-3)
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-4, x) == :(2//15*im*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-4+2//33*e*a^-4*d^-1*(e*sec(c+d*x))^-1//2*sin(c+d*x)+2//33*a^-4*d^-1*(e*sec(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//33*im*d^-1*e^2*(e*sec(c+d*x))^-3//2*(a^4+im*a^4*tan(c+d*x))^-1+14//165*im*a^-1*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^8, x) == :(-16//9*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^9//2+-12//13*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^13//2+2//15*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^15//2+24//11*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^11//2)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^6, x) == :(-8//7*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^7//2+-2//11*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^11//2+8//9*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^9//2)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^4, x) == :(-4//5*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^5//2+2//7*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^7//2)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^2, x) == :(-2//3*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^3//2)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^2, x) == :(3//4*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2+-3//8*im*2^(1/2)*a^(1/2)*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//2*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^4, x) == :(35//64*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2+35//96*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-3//2+-35//128*im*2^(1/2)*a^(1/2)*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-7//16*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-3//2*(a+-1*im*a*tan(c+d*x))^-1+-1//4*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-3//2*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^6, x) == :(77//256*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-3//2+231//512*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2+231//640*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-5//2+-231//1024*im*2^(1/2)*a^(1/2)*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-33//64*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-5//2*(a+-1*im*a*tan(c+d*x))^-1+-11//48*im*a^5*d^-1*(a+im*a*tan(c+d*x))^-5//2*(a+-1*im*a*tan(c+d*x))^-2+-1//6*im*a^6*d^-1*(a+im*a*tan(c+d*x))^-5//2*(a+-1*im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^7, x) == :(2//13*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^7+24//143*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^7+64//429*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^7+256//3003*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^5, x) == :(2//9*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^5+16//63*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^5+64//315*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^3, x) == :(2//5*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^3+8//15*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x), x) == :(2*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x), x) == :(-1*im*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+(1/2)*im*2^(1/2)*a^(1/2)*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3, x) == :(-5//8*im*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-1//3*im*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+5//12*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+5//16*im*2^(1/2)*a^(1/2)*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^5, x) == :(-63//128*im*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-21//80*im*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+-1//5*im*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^5+9//40*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^3+21//64*im*a*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+63//256*im*2^(1/2)*a^(1/2)*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^3//2*sec(c+d*x)^8, x) == :(-16//11*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^11//2+-4//5*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^15//2+2//17*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^17//2+24//13*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^13//2)
@test integrate((a+im*a*tan(c+d*x))^3//2*sec(c+d*x)^6, x) == :(-8//9*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^9//2+-2//13*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^13//2+8//11*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^11//2)
@test integrate((a+im*a*tan(c+d*x))^3//2*sec(c+d*x)^4, x) == :(-4//7*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^7//2+2//9*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^9//2)
@test integrate((a+im*a*tan(c+d*x))^3//2*sec(c+d*x)^2, x) == :(-2//5*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^5//2)
@test integrate((a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^2, x) == :(-1//2*im*a^2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^-1+-1//4*im*2^(1/2)*a^3//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^4, x) == :(15//32*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-1//2+-15//64*im*2^(1/2)*a^3//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-5//16*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1+-1//4*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^6, x) == :(35//128*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-3//2+105//256*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-1//2+-105//512*im*2^(1/2)*a^3//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-21//64*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-3//2*(a+-1*im*a*tan(c+d*x))^-1+-3//16*im*a^5*d^-1*(a+im*a*tan(c+d*x))^-3//2*(a+-1*im*a*tan(c+d*x))^-2+-1//6*im*a^6*d^-1*(a+im*a*tan(c+d*x))^-3//2*(a+-1*im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^3//2*sec(c+d*x)^5, x) == :(2//11*im*a*d^-1*(a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^5+8//33*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^5+64//231*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^5+256//1155*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^3//2*sec(c+d*x)^3, x) == :(2//7*im*a*d^-1*(a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^3+16//35*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^3+64//105*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^3//2*sec(c+d*x), x) == :(2//3*im*a*d^-1*(a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)+8//3*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^3//2*cos(c+d*x), x) == :(-2*im*a*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^3, x) == :(-1//3*im*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^3+-1//2*im*a*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+1//4*im*2^(1/2)*a^3//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^5, x) == :(-1//5*im*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^5+-7//16*im*a*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-7//30*im*a*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+7//24*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+7//32*im*2^(1/2)*a^3//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^5//2*sec(c+d*x)^8, x) == :(-16//13*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^13//2+-12//17*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^17//2+2//19*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^19//2+8//5*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^15//2)
@test integrate((a+im*a*tan(c+d*x))^5//2*sec(c+d*x)^6, x) == :(-8//11*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^11//2+-2//15*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^15//2+8//13*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^13//2)
@test integrate((a+im*a*tan(c+d*x))^5//2*sec(c+d*x)^4, x) == :(-4//9*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^9//2+2//11*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^11//2)
@test integrate((a+im*a*tan(c+d*x))^5//2*sec(c+d*x)^2, x) == :(-2//7*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^7//2)
@test integrate((a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^2, x) == :((1/2)*im*2^(1/2)*a^5//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^4, x) == :(-3//16*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^-1+-3//32*im*2^(1/2)*a^5//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//4*im*a^4*d^-1*(a+im*a*tan(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^6, x) == :(35//128*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-1//2+-35//192*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1+-35//256*im*2^(1/2)*a^5//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-7//48*im*a^5*d^-1*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-2+-1//6*im*a^6*d^-1*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^5//2*sec(c+d*x)^3, x) == :(2//9*im*a*d^-1*(a+im*a*tan(c+d*x))^3//2*sec(c+d*x)^3+8//21*im*a^2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^3+64//105*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^3+256//315*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^5//2*sec(c+d*x), x) == :(2//5*im*a*d^-1*(a+im*a*tan(c+d*x))^3//2*sec(c+d*x)+16//15*im*a^2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)+64//15*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^5//2*cos(c+d*x), x) == :(-8*im*a^2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+2*im*a*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^3, x) == :(-2//3*im*a*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^5, x) == :(-1//5*im*d^-1*(a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^5+-1//4*im*a^2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-1//6*im*a*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^3+1//8*im*2^(1/2)*a^5//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^7, x) == :(-1//7*im*d^-1*(a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^7+-9//32*im*a^2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-9//70*im*a*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^5+-3//20*im*a^2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+3//16*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+9//64*im*2^(1/2)*a^5//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^7//2*sec(c+d*x)^8, x) == :(-16//15*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^15//2+-12//19*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^19//2+2//21*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^21//2+24//17*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^17//2)
@test integrate((a+im*a*tan(c+d*x))^7//2*sec(c+d*x)^6, x) == :(-8//13*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^13//2+-2//17*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^17//2+8//15*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^15//2)
@test integrate((a+im*a*tan(c+d*x))^7//2*sec(c+d*x)^4, x) == :(-4//11*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^11//2+2//13*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^13//2)
@test integrate((a+im*a*tan(c+d*x))^7//2*sec(c+d*x)^2, x) == :(-2//9*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^9//2)
@test integrate((a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^2, x) == :(-3*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)+-1*im*a^3*d^-1*(a+im*a*tan(c+d*x))^3//2*(a+-1*im*a*tan(c+d*x))^-1+3*im*2^(1/2)*a^7//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^4, x) == :(-1//2*im*a^5*d^-1*(a+im*a*tan(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^-2+1//8*im*a^4*d^-1*(a+im*a*tan(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^-1+1//16*im*2^(1/2)*a^7//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^6, x) == :(-5//48*im*a^5*d^-1*(a+im*a*tan(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^-2+-5//64*im*a^4*d^-1*(a+im*a*tan(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^-1+-5//128*im*2^(1/2)*a^7//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//6*im*a^6*d^-1*(a+im*a*tan(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^7//2*sec(c+d*x), x) == :(2//7*im*a*d^-1*(a+im*a*tan(c+d*x))^5//2*sec(c+d*x)+24//35*im*a^2*d^-1*(a+im*a*tan(c+d*x))^3//2*sec(c+d*x)+64//35*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)+256//35*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^7//2*cos(c+d*x), x) == :(-64//3*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+2//3*im*a*d^-1*(a+im*a*tan(c+d*x))^5//2*cos(c+d*x)+16//3*im*a^2*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^3, x) == :(-2*im*a*d^-1*(a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^3+8//3*im*a^2*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^5, x) == :(-2//5*im*a*d^-1*(a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^7, x) == :(-1//7*im*d^-1*(a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^7+-1//8*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-1//10*im*a*d^-1*(a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^5+-1//12*im*a^2*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^3+1//16*im*2^(1/2)*a^7//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^9, x) == :(-1//9*im*d^-1*(a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^9+-11//64*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-11//120*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+-11//126*im*a*d^-1*(a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^7+-11//140*im*a^2*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^5+11//96*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+11//128*im*2^(1/2)*a^7//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^11, x) == :(-1//11*im*d^-1*(a+im*a*tan(c+d*x))^7//2*cos(c+d*x)^11+-195//1024*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-65//924*im*a^2*d^-1*(a+im*a*tan(c+d*x))^3//2*cos(c+d*x)^7+-13//128*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+-13//168*im*a^3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^5+-5//66*im*a*d^-1*(a+im*a*tan(c+d*x))^5//2*cos(c+d*x)^9+39//448*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^3+65//512*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+195//2048*im*2^(1/2)*a^7//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^8, x) == :(-16//7*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^7//2+-12//11*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^11//2+2//13*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^13//2+8//3*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^9//2)
@test integrate((a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^6, x) == :(-8//5*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^5//2+-2//9*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^9//2+8//7*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^7//2)
@test integrate((a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^4, x) == :(-4//3*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^3//2+2//5*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^5//2)
@test integrate((a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^2, x) == :(-2*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^(1/2))
@test integrate((a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^2, x) == :(5//8*im*d^-1*(a+im*a*tan(c+d*x))^-1//2+5//12*im*a*d^-1*(a+im*a*tan(c+d*x))^-3//2+-5//16*im*2^(1/2)*a^-1//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//2*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-3//2*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^4, x) == :(63//128*im*d^-1*(a+im*a*tan(c+d*x))^-1//2+21//64*im*a*d^-1*(a+im*a*tan(c+d*x))^-3//2+63//160*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-5//2+-63//256*im*2^(1/2)*a^-1//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-9//16*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-5//2*(a+-1*im*a*tan(c+d*x))^-1+-1//4*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-5//2*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^6, x) == :(429//1024*im*d^-1*(a+im*a*tan(c+d*x))^-1//2+143//512*im*a*d^-1*(a+im*a*tan(c+d*x))^-3//2+429//896*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-7//2+429//1280*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-5//2+-429//2048*im*2^(1/2)*a^-1//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-143//192*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-7//2*(a+-1*im*a*tan(c+d*x))^-1+-13//48*im*a^5*d^-1*(a+im*a*tan(c+d*x))^-7//2*(a+-1*im*a*tan(c+d*x))^-2+-1//6*im*a^6*d^-1*(a+im*a*tan(c+d*x))^-7//2*(a+-1*im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^9, x) == :(2//15*im*a*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^9+8//65*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^9+64//715*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^9+256//6435*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-9//2*sec(c+d*x)^9)
@test integrate((a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^7, x) == :(2//11*im*a*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^7+16//99*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^7+64//693*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^5, x) == :(2//7*im*a*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^5+8//35*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^3, x) == :(2//3*im*a*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-1//2*sec(c+d*x), x) == :(im*2^(1/2)*a^-1//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-1//2*cos(c+d*x), x) == :((1/2)*im*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+-3//4*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+3//8*im*2^(1/2)*a^-1//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^3, x) == :(1//4*im*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^3+35//96*im*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+-35//64*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-7//24*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+35//128*im*2^(1/2)*a^-1//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^8, x) == :(-16//5*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^5//2+-4//3*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^9//2+2//11*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^11//2+24//7*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^7//2)
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^6, x) == :(-8//3*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^3//2+-2//7*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^7//2+8//5*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^5//2)
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^4, x) == :(-4*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^(1/2)+2//3*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^3//2)
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^2, x) == :(2*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)^2, x) == :(7//24*im*d^-1*(a+im*a*tan(c+d*x))^-3//2+7//16*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-1//2+7//20*im*a*d^-1*(a+im*a*tan(c+d*x))^-5//2+-7//32*im*2^(1/2)*a^-3//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//2*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-5//2*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)^4, x) == :(33//128*im*d^-1*(a+im*a*tan(c+d*x))^-3//2+99//224*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-7//2+99//256*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-1//2+99//320*im*a*d^-1*(a+im*a*tan(c+d*x))^-5//2+-99//512*im*2^(1/2)*a^-3//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-11//16*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-7//2*(a+-1*im*a*tan(c+d*x))^-1+-1//4*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-7//2*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)^6, x) == :(715//3072*im*d^-1*(a+im*a*tan(c+d*x))^-3//2+143//512*im*a*d^-1*(a+im*a*tan(c+d*x))^-5//2+715//1152*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-9//2+715//1792*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-7//2+715//2048*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-1//2+-715//4096*im*2^(1/2)*a^-3//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-65//64*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-9//2*(a+-1*im*a*tan(c+d*x))^-1+-5//16*im*a^5*d^-1*(a+im*a*tan(c+d*x))^-9//2*(a+-1*im*a*tan(c+d*x))^-2+-1//6*im*a^6*d^-1*(a+im*a*tan(c+d*x))^-9//2*(a+-1*im*a*tan(c+d*x))^-3)
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^11, x) == :(2//17*im*a*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^11+8//85*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^11+64//1105*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-9//2*sec(c+d*x)^11+256//12155*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-11//2*sec(c+d*x)^11)
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^9, x) == :(2//13*im*a*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^9+16//143*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^9+64//1287*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-9//2*sec(c+d*x)^9)
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^7, x) == :(2//9*im*a*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^7+8//63*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^5, x) == :(2//5*im*a*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^3, x) == :(-2*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)+2*im*2^(1/2)*a^-3//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-3//2*sec(c+d*x), x) == :((1/2)*im*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)+1//4*im*2^(1/2)*a^-3//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-3//2*cos(c+d*x), x) == :(1//4*im*d^-1*(a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)+-15//32*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+5//16*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+15//64*im*2^(1/2)*a^-3//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)^3, x) == :(1//6*im*d^-1*(a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)^3+-105//256*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-7//32*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+3//16*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^3+35//128*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+105//512*im*2^(1/2)*a^-3//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^10, x) == :(-32//5*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^5//2+-16//3*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^9//2+-2//13*im*a^-9*d^-1*(a+im*a*tan(c+d*x))^13//2+16//11*im*a^-8*d^-1*(a+im*a*tan(c+d*x))^11//2+64//7*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^7//2)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^8, x) == :(-16//3*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^3//2+-12//7*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^7//2+2//9*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^9//2+24//5*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^5//2)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^6, x) == :(-8*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^(1/2)+-2//5*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^5//2+8//3*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^3//2)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^4, x) == :(2*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^(1/2)+4*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^2, x) == :(2//3*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3//2)
@test integrate((a+im*a*tan(c+d*x))^-5//2*cos(c+d*x)^2, x) == :(9//40*im*d^-1*(a+im*a*tan(c+d*x))^-5//2+3//16*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3//2+9//28*im*a*d^-1*(a+im*a*tan(c+d*x))^-7//2+9//32*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-1//2+-9//64*im*2^(1/2)*a^-5//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//2*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-7//2*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^-5//2*cos(c+d*x)^4, x) == :(143//640*im*d^-1*(a+im*a*tan(c+d*x))^-5//2+143//288*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-9//2+143//448*im*a*d^-1*(a+im*a*tan(c+d*x))^-7//2+143//512*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-1//2+143//768*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3//2+-143//1024*im*2^(1/2)*a^-5//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-13//16*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-9//2*(a+-1*im*a*tan(c+d*x))^-1+-1//4*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-9//2*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^13, x) == :(2//19*im*a*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^13+24//323*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-9//2*sec(c+d*x)^13+64//1615*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-11//2*sec(c+d*x)^13+256//20995*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-13//2*sec(c+d*x)^13)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^11, x) == :(2//15*im*a*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^11+16//195*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-9//2*sec(c+d*x)^11+64//2145*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-11//2*sec(c+d*x)^11)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^9, x) == :(2//11*im*a*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^9+8//99*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-9//2*sec(c+d*x)^9)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^7, x) == :(2//7*im*a*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^7)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^5, x) == :(-4*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)+4*im*2^(1/2)*a^-5//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x))+-2//3*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^3)
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^3, x) == :(im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)+-1//2*im*2^(1/2)*a^-5//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-5//2*sec(c+d*x), x) == :(1//4*im*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)+3//16*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)+3//32*im*2^(1/2)*a^-5//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-5//2*cos(c+d*x), x) == :(1//6*im*d^-1*(a+im*a*tan(c+d*x))^-5//2*cos(c+d*x)+-35//128*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+7//48*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)+35//192*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+35//256*im*2^(1/2)*a^-5//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-5//2*cos(c+d*x)^3, x) == :(1//8*im*d^-1*(a+im*a*tan(c+d*x))^-5//2*cos(c+d*x)^3+-1155//4096*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-77//512*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+11//96*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)^3+33//256*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^3+385//2048*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+1155//8192*im*2^(1/2)*a^-5//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^10, x) == :(-48//7*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^7//2+-32//3*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^3//2+-2//11*im*a^-9*d^-1*(a+im*a*tan(c+d*x))^11//2+16//9*im*a^-8*d^-1*(a+im*a*tan(c+d*x))^9//2+64//5*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^5//2)
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^8, x) == :(-16*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^(1/2)+8*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^3//2+-12//5*im*a^-6*d^-1*(a+im*a*tan(c+d*x))^5//2+2//7*im*a^-7*d^-1*(a+im*a*tan(c+d*x))^7//2)
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^6, x) == :(8*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^(1/2)+8*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-1//2+-2//3*im*a^-5*d^-1*(a+im*a*tan(c+d*x))^3//2)
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^4, x) == :(-2*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-1//2+4//3*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-3//2)
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^2, x) == :(2//5*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-5//2)
@test integrate((a+im*a*tan(c+d*x))^-7//2*cos(c+d*x)^2, x) == :(11//56*im*d^-1*(a+im*a*tan(c+d*x))^-7//2+11//36*im*a*d^-1*(a+im*a*tan(c+d*x))^-9//2+11//64*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-1//2+11//80*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-5//2+11//96*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-3//2+-11//128*im*2^(1/2)*a^-7//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//2*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-9//2*(a+-1*im*a*tan(c+d*x))^-1)
@test integrate((a+im*a*tan(c+d*x))^-7//2*cos(c+d*x)^4, x) == :(195//896*im*d^-1*(a+im*a*tan(c+d*x))^-7//2+39//256*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-5//2+65//192*im*a*d^-1*(a+im*a*tan(c+d*x))^-9//2+65//512*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-3//2+195//352*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-11//2+195//1024*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-1//2+-195//2048*im*2^(1/2)*a^-7//2*d^-1*arctanh((1/2)*2^(1/2)*a^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-15//16*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-11//2*(a+-1*im*a*tan(c+d*x))^-1+-1//4*im*a^4*d^-1*(a+im*a*tan(c+d*x))^-11//2*(a+-1*im*a*tan(c+d*x))^-2)
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^13, x) == :(2//17*im*a*d^-1*(a+im*a*tan(c+d*x))^-9//2*sec(c+d*x)^13+16//255*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-11//2*sec(c+d*x)^13+64//3315*im*a^3*d^-1*(a+im*a*tan(c+d*x))^-13//2*sec(c+d*x)^13)
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^11, x) == :(2//13*im*a*d^-1*(a+im*a*tan(c+d*x))^-9//2*sec(c+d*x)^11+8//143*im*a^2*d^-1*(a+im*a*tan(c+d*x))^-11//2*sec(c+d*x)^11)
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^9, x) == :(2//9*im*a*d^-1*(a+im*a*tan(c+d*x))^-9//2*sec(c+d*x)^9)
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^7, x) == :(-8*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)+8*im*2^(1/2)*a^-7//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x))+-4//3*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)^3+-2//5*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^5)
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^5, x) == :(-3*im*2^(1/2)*a^-7//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x))+-2*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)^3+6*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x))
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)^3, x) == :((1/2)*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)+-1//8*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)+-1//16*im*2^(1/2)*a^-7//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-7//2*sec(c+d*x), x) == :(1//6*im*d^-1*(a+im*a*tan(c+d*x))^-7//2*sec(c+d*x)+5//48*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-5//2*sec(c+d*x)+5//64*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-3//2*sec(c+d*x)+5//128*im*2^(1/2)*a^-7//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-7//2*cos(c+d*x), x) == :(1//8*im*d^-1*(a+im*a*tan(c+d*x))^-7//2*cos(c+d*x)+-315//2048*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+3//32*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-5//2*cos(c+d*x)+21//256*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)+105//1024*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+315//4096*im*2^(1/2)*a^-7//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((a+im*a*tan(c+d*x))^-7//2*cos(c+d*x)^3, x) == :(1//10*im*d^-1*(a+im*a*tan(c+d*x))^-7//2*cos(c+d*x)^3+-3003//16384*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)+-1001//10240*im*a^-4*d^-1*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^3+13//160*im*a^-1*d^-1*(a+im*a*tan(c+d*x))^-5//2*cos(c+d*x)^3+143//1920*im*a^-2*d^-1*(a+im*a*tan(c+d*x))^-3//2*cos(c+d*x)^3+429//5120*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^3+1001//8192*im*a^-3*d^-1*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)+3003//32768*im*2^(1/2)*a^-7//2*d^-1*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^(1/2), x) == :(im*a*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-1//2+(1/2)*im*2^(1/2)*a^3//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1//2*im*2^(1/2)*a^3//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1//4*im*2^(1/2)*a^3//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+1//4*im*2^(1/2)*a^3//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2), x) == :(im*2^(1/2)*a^(1/2)*d^-1*e^(1/2)*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+(1/2)*im*2^(1/2)*a^(1/2)*d^-1*e^(1/2)*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1*im*2^(1/2)*a^(1/2)*d^-1*e^(1/2)*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//2*im*2^(1/2)*a^(1/2)*d^-1*e^(1/2)*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2), x) == :(-2*im*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^(1/2), x) == :(-2//3*im*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^(1/2)+4//3*im*a*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^(1/2), x) == :(-2//5*im*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^(1/2)+-16//15*im*d^-1*e^-2*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)+8//15*im*a*d^-1*e^-2*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^(1/2), x) == :(-2//7*im*d^-1*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^(1/2)+-16//35*im*d^-1*e^-2*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^(1/2)+12//35*im*a*d^-1*e^-2*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-1//2+32//35*im*a*d^-1*e^-4*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^3//2, x) == :(1//3*im*a*d^-1*(e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^(1/2)+7//12*im*a^2*d^-1*(e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-1//2+-7//8*im*a*d^-1*e^2*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2)+-7//16*im*2^(1/2)*a^3//2*d^-1*e^5//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-7//32*im*2^(1/2)*a^3//2*d^-1*e^5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+7//16*im*2^(1/2)*a^3//2*d^-1*e^5//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+7//32*im*2^(1/2)*a^3//2*d^-1*e^5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^3//2, x) == :((1/2)*im*a*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^(1/2)+5//4*im*a^2*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-1//2+-5//8*im*2^(1/2)*a^5//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-5//16*im*2^(1/2)*a^5//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+5//8*im*2^(1/2)*a^5//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+5//16*im*2^(1/2)*a^5//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^3//2, x) == :(im*a*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2)+-3//2*im*2^(1/2)*a^3//2*d^-1*e^(1/2)*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-3//4*im*2^(1/2)*a^3//2*d^-1*e^(1/2)*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+3//2*im*2^(1/2)*a^3//2*d^-1*e^(1/2)*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+3//4*im*2^(1/2)*a^3//2*d^-1*e^(1/2)*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^3//2, x) == :(-4*im*a*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)+im*2^(1/2)*a^5//2*d^-1*e^-1//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+(1/2)*im*2^(1/2)*a^5//2*d^-1*e^-1//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1*im*2^(1/2)*a^5//2*d^-1*e^-1//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1//2*im*2^(1/2)*a^5//2*d^-1*e^-1//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^3//2, x) == :(-2//3*im*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^3//2)
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^3//2, x) == :(-2//5*im*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^3//2+-4//5*im*a*d^-1*e^-2*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^3//2, x) == :(-2//7*im*d^-1*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^3//2+-8//21*im*a*d^-1*e^-2*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^(1/2)+16//21*im*a^2*d^-1*e^-4*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^3//2, x) == :(-2//9*im*d^-1*(e*sec(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^3//2+-32//45*im*a*d^-1*e^-4*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)+-4//15*im*a*d^-1*e^-2*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^(1/2)+16//45*im*a^2*d^-1*e^-4*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^5//2, x) == :(1//3*im*a*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^3//2+3//4*im*a^2*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^(1/2)+15//8*im*a^3*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-1//2+-15//16*im*2^(1/2)*a^7//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-15//32*im*2^(1/2)*a^7//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+15//16*im*2^(1/2)*a^7//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+15//32*im*2^(1/2)*a^7//2*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^5//2, x) == :((1/2)*im*a*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^3//2+7//4*im*a^2*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2)+-21//8*im*2^(1/2)*a^5//2*d^-1*e^(1/2)*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-21//16*im*2^(1/2)*a^5//2*d^-1*e^(1/2)*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+21//8*im*2^(1/2)*a^5//2*d^-1*e^(1/2)*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+21//16*im*2^(1/2)*a^5//2*d^-1*e^(1/2)*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^5//2, x) == :(im*a*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^3//2+-10*im*a^2*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)+-5//2*im*2^(1/2)*a^7//2*d^-1*e^-1//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-5//4*im*2^(1/2)*a^7//2*d^-1*e^-1//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+5//2*im*2^(1/2)*a^7//2*d^-1*e^-1//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+5//4*im*2^(1/2)*a^7//2*d^-1*e^-1//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^5//2, x) == :(-4//3*im*a*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^3//2+im*2^(1/2)*a^5//2*d^-1*e^-3//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+(1/2)*im*2^(1/2)*a^5//2*d^-1*e^-3//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1*im*2^(1/2)*a^5//2*d^-1*e^-3//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//2*im*2^(1/2)*a^5//2*d^-1*e^-3//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^5//2, x) == :(-2//5*im*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^5//2)
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^5//2, x) == :(-2//7*im*d^-1*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^5//2+-4//21*im*a*d^-1*e^-2*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^3//2)
@test integrate((e*sec(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^5//2, x) == :(-2//9*im*d^-1*(e*sec(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^5//2+-16//45*im*a^2*d^-1*e^-4*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)+-8//45*im*a*d^-1*e^-2*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^3//2)
@test integrate((e*sec(c+d*x))^-11//2*(a+im*a*tan(c+d*x))^5//2, x) == :(-2//11*im*d^-1*(e*sec(c+d*x))^-11//2*(a+im*a*tan(c+d*x))^5//2+-16//77*im*a^2*d^-1*e^-4*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^(1/2)+-12//77*im*a*d^-1*e^-2*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^3//2+32//77*im*a^3*d^-1*e^-6*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-1//2, x) == :((1/2)*im*2^(1/2)*a^-1//2*d^-1*e^5//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2)+-1//2*im*2^(1/2)*a^-1//2*d^-1*e^5//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//4*im*2^(1/2)*a^-1//2*d^-1*e^5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+1//4*im*2^(1/2)*a^-1//2*d^-1*e^5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(im*2^(1/2)*a^(1/2)*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+(1/2)*im*2^(1/2)*a^(1/2)*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1*im*2^(1/2)*a^(1/2)*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1//2*im*2^(1/2)*a^(1/2)*d^-1*e^3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2, x) == :(2*im*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(2//3*im*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2+-4//3*im*a^-1*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(2//5*im*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-1//2+-8//15*im*a^-1*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^(1/2)+16//15*im*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(2//7*im*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-1//2+-12//35*im*a^-1*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^(1/2)+16//35*im*d^-1*e^-2*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2+-32//35*im*a^-1*d^-1*e^-2*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))
@test integrate((e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(2//9*im*d^-1*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2+-16//63*im*a^-1*d^-1*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^(1/2)+32//105*im*d^-1*e^-2*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-1//2+256//315*im*d^-1*e^-4*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2+-128//315*im*a^-1*d^-1*e^-2*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^(1/2))
@test integrate((e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-3//2, x) == :(-1*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-1//2+-3//2*im*2^(1/2)*a^-1//2*d^-1*e^7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-3//4*im*2^(1/2)*a^-1//2*d^-1*e^7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+3//2*im*2^(1/2)*a^-1//2*d^-1*e^7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+3//4*im*2^(1/2)*a^-1//2*d^-1*e^7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-3//2, x) == :(im*2^(1/2)*a^-3//2*d^-1*e^5//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+(1/2)*im*2^(1/2)*a^-3//2*d^-1*e^5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1*im*2^(1/2)*a^-3//2*d^-1*e^5//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+4*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2+-1//2*im*2^(1/2)*a^-3//2*d^-1*e^5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-3//2, x) == :(2//3*im*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-3//2)
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-3//2, x) == :(2//5*im*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-3//2+4//5*im*a^-1*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-3//2, x) == :(2//7*im*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-3//2+-16//21*im*a^-2*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)+8//21*im*a^-1*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-3//2, x) == :(2//9*im*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-3//2+-16//45*im*a^-2*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^(1/2)+4//15*im*a^-1*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-1//2+32//45*im*a^-1*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-3//2, x) == :(2//11*im*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-3//2+-96//385*im*a^-2*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^(1/2)+16//77*im*a^-1*d^-1*(e*sec(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-1//2+-256//385*im*a^-2*d^-1*e^-2*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)+128//385*im*a^-1*d^-1*e^-2*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^9//2*(a+im*a*tan(c+d*x))^-5//2, x) == :(4*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-3//2+5*im*a^-3*d^-1*e^4*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2)+-5//2*im*2^(1/2)*a^-5//2*d^-1*e^9//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-5//4*im*2^(1/2)*a^-5//2*d^-1*e^9//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+5//2*im*2^(1/2)*a^-5//2*d^-1*e^9//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+5//4*im*2^(1/2)*a^-5//2*d^-1*e^9//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*sec(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-5//2, x) == :(4//3*im*a^-1*d^-1*e^2*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-3//2+im*2^(1/2)*a^-3//2*d^-1*e^7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+(1/2)*im*2^(1/2)*a^-3//2*d^-1*e^7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1*im*2^(1/2)*a^-3//2*d^-1*e^7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1//2*im*2^(1/2)*a^-3//2*d^-1*e^7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-5//2, x) == :(2//5*im*d^-1*(e*sec(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-5//2)
@test integrate((e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-5//2, x) == :(2//7*im*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-5//2+4//21*im*a^-1*d^-1*(e*sec(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-3//2)
@test integrate((e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-5//2, x) == :(2//9*im*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-5//2+8//45*im*a^-1*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-3//2+16//45*im*a^-2*d^-1*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-5//2, x) == :(2//11*im*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-5//2+-32//77*im*a^-3*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)+12//77*im*a^-1*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-3//2+16//77*im*a^-2*d^-1*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-5//2, x) == :(2//13*im*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-5//2+-128//585*im*a^-3*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^(1/2)+16//117*im*a^-1*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-3//2+32//195*im*a^-2*d^-1*(e*sec(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-1//2+256//585*im*a^-2*d^-1*e^-2*(e*sec(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-7//3, x) == :(1//4*im*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-7//3+5//24*im*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a^2+im*a^2*tan(e+f*x))^-1+-5//144*x*2^1//3*a^-5//3*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3+-5//48*im*2^1//3*a^-5//3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3*log(-1*(a+-1*im*a*tan(e+f*x))^1//3+2^1//3*a^1//3)+-5//144*im*2^1//3*a^-5//3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3*log(cos(e+f*x))+5//72*im*2^1//3*3^(1/2)*a^-5//3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+2^2//3*(a+-1*im*a*tan(e+f*x))^1//3)))
@test integrate((d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-4//3, x) == :((1/2)*im*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-4//3+-1//12*x*2^1//3*a^-2//3*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3+-1//4*im*2^1//3*a^-2//3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3*log(-1*(a+-1*im*a*tan(e+f*x))^1//3+2^1//3*a^1//3)+-1//12*im*2^1//3*a^-2//3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3*log(cos(e+f*x))+1//6*im*2^1//3*3^(1/2)*a^-2//3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+2^2//3*(a+-1*im*a*tan(e+f*x))^1//3)))
@test integrate((d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3, x) == :(-1//4*x*2^1//3*a^1//3*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3+-3//4*im*2^1//3*a^1//3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3*log(-1*(a+-1*im*a*tan(e+f*x))^1//3+2^1//3*a^1//3)+-1//4*im*2^1//3*a^1//3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3*log(cos(e+f*x))+(1/2)*im*2^1//3*3^(1/2)*a^1//3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3*(a+-1*im*a*tan(e+f*x))^-1//3*arctan(1//3*3^(1/2)*a^-1//3*(a^1//3+2^2//3*(a+-1*im*a*tan(e+f*x))^1//3)))
@test integrate((d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^2//3, x) == :(3*im*a*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3)
@test integrate((d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^5//3, x) == :(3//4*im*a*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^2//3+9//2*im*a^2*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3)
@test integrate((d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^8//3, x) == :(3//7*im*a*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^5//3+9//7*im*a^2*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^2//3+54//7*im*a^3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3)
@test integrate((d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^11//3, x) == :(3//10*im*a*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^8//3+27//35*im*a^2*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^5//3+81//35*im*a^3*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^2//3+486//35*im*a^4*f^-1*(d*sec(e+f*x))^2//3*(a+im*a*tan(e+f*x))^-1//3)
@test integrate((a+im*a*tan(c+d*x))^n*sec(c+d*x)^6, x) == :(-1*im*a^-5*d^-1*(5+n)^-1*(a+im*a*tan(c+d*x))^(5+n)+-4*im*a^-3*d^-1*(3+n)^-1*(a+im*a*tan(c+d*x))^(3+n)+4*im*a^-4*d^-1*(4+n)^-1*(a+im*a*tan(c+d*x))^(4+n))
@test integrate((a+im*a*tan(c+d*x))^n*sec(c+d*x)^4, x) == :(im*a^-3*d^-1*(3+n)^-1*(a+im*a*tan(c+d*x))^(3+n)+-2*im*a^-2*d^-1*(2+n)^-1*(a+im*a*tan(c+d*x))^(2+n))
@test integrate((a+im*a*tan(c+d*x))^n*sec(c+d*x)^2, x) == :(-1*im*a^-1*d^-1*(1+n)^-1*(a+im*a*tan(c+d*x))^(1+n))
@test integrate((e*sec(c+d*x))^(-4+-1n)*(a+im*a*tan(c+d*x))^n, x) == :(im*d^-1*(e*sec(c+d*x))^(-4+-1n)*(4+-1n)^-1*(a+im*a*tan(c+d*x))^n+4*im*a^-1*d^-1*(e*sec(c+d*x))^(-4+-1n)*(a+im*a*tan(c+d*x))^(1+n)*(8+n^2+-6n)^-1+-24*im*a^-4*d^-1*n^-1*(e*sec(c+d*x))^(-4+-1n)*(a+im*a*tan(c+d*x))^(4+n)*(64+n^4+-20*n^2)^-1+-12*im*a^-2*d^-1*n^-1*(e*sec(c+d*x))^(-4+-1n)*(2+-1n)^-1*(4+-1n)^-1*(a+im*a*tan(c+d*x))^(2+n)+24*im*a^-3*d^-1*n^-1*(e*sec(c+d*x))^(-4+-1n)*(4+-1n)^-1*(4+-1*n^2)^-1*(a+im*a*tan(c+d*x))^(3+n))
@test integrate((e*sec(c+d*x))^(-3+-1n)*(a+im*a*tan(c+d*x))^n, x) == :(im*d^-1*(e*sec(c+d*x))^(-3+-1n)*(3+-1n)^-1*(a+im*a*tan(c+d*x))^n+3*im*a^-1*d^-1*(e*sec(c+d*x))^(-3+-1n)*(a+im*a*tan(c+d*x))^(1+n)*(3+n^2+-4n)^-1+6*im*a^-3*d^-1*(e*sec(c+d*x))^(-3+-1n)*(a+im*a*tan(c+d*x))^(3+n)*(9+n^4+-10*n^2)^-1+-6*im*a^-2*d^-1*(e*sec(c+d*x))^(-3+-1n)*(1+-1*n^2)^-1*(3+-1n)^-1*(a+im*a*tan(c+d*x))^(2+n))
@test integrate((e*sec(c+d*x))^(-2+-1n)*(a+im*a*tan(c+d*x))^n, x) == :(im*d^-1*(e*sec(c+d*x))^(-2+-1n)*(2+-1n)^-1*(a+im*a*tan(c+d*x))^n+-2*im*a^-1*d^-1*n^-1*(e*sec(c+d*x))^(-2+-1n)*(2+-1n)^-1*(a+im*a*tan(c+d*x))^(1+n)+2*im*a^-2*d^-1*n^-1*(e*sec(c+d*x))^(-2+-1n)*(4+-1*n^2)^-1*(a+im*a*tan(c+d*x))^(2+n))
@test integrate((e*sec(c+d*x))^(-1+-1n)*(a+im*a*tan(c+d*x))^n, x) == :(im*d^-1*(e*sec(c+d*x))^(-1+-1n)*(1+-1n)^-1*(a+im*a*tan(c+d*x))^n+-1*im*a^-1*d^-1*(e*sec(c+d*x))^(-1+-1n)*(1+-1*n^2)^-1*(a+im*a*tan(c+d*x))^(1+n))
@test integrate((e*sec(c+d*x))^(-1n)*(a+im*a*tan(c+d*x))^n, x) == :(-1*im*d^-1*n^-1*(e*sec(c+d*x))^(-1n)*(a+im*a*tan(c+d*x))^n)
@test integrate((e*sec(c+d*x))^(2+-2n)*(a+im*a*tan(c+d*x))^n, x) == :(im*a*d^-1*(e*sec(c+d*x))^(2+-2n)*(1+-1n)^-1*(a+im*a*tan(c+d*x))^(-1+n))
@test integrate((d*sec(e+f*x))^(2n)*(a+im*a*tan(e+f*x))^(1+-1n), x) == :(im*a*f^-1*n^-1*(d*sec(e+f*x))^(2n)*(a+im*a*tan(e+f*x))^(-1n))
@test integrate((d*sec(e+f*x))^(2n)*(a+im*a*tan(e+f*x))^(2+-1n), x) == :(im*a*f^-1*(d*sec(e+f*x))^(2n)*(1+n)^-1*(a+im*a*tan(e+f*x))^(1+-1n)+2*im*a^2*f^-1*n^-1*(d*sec(e+f*x))^(2n)*(1+n)^-1*(a+im*a*tan(e+f*x))^(-1n))
@test integrate((d*sec(e+f*x))^(2n)*(a+im*a*tan(e+f*x))^(3+-1n), x) == :(im*a*f^-1*(d*sec(e+f*x))^(2n)*(2+n)^-1*(a+im*a*tan(e+f*x))^(2+-1n)+4*im*a^2*f^-1*(d*sec(e+f*x))^(2n)*(a+im*a*tan(e+f*x))^(1+-1n)*(2+n^2+3n)^-1+8*im*a^3*f^-1*n^-1*(d*sec(e+f*x))^(2n)*(a+im*a*tan(e+f*x))^(-1n)*(2+n^2+3n)^-1)
@test integrate(sec(c+d*x)^6*(a+b*tan(c+d*x)), x) == :(a*d^-1*tan(c+d*x)+1//5*a*d^-1*tan(c+d*x)^5+1//6*b*d^-1*sec(c+d*x)^6+2//3*a*d^-1*tan(c+d*x)^3)
@test integrate(sec(c+d*x)^5*(a+b*tan(c+d*x)), x) == :(1//5*b*d^-1*sec(c+d*x)^5+3//8*a*d^-1*arctanh(sin(c+d*x))+1//4*a*d^-1*sec(c+d*x)^3*tan(c+d*x)+3//8*a*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^4*(a+b*tan(c+d*x)), x) == :(a*d^-1*tan(c+d*x)+1//3*a*d^-1*tan(c+d*x)^3+1//4*b*d^-1*sec(c+d*x)^4)
@test integrate(sec(c+d*x)^3*(a+b*tan(c+d*x)), x) == :((1/2)*a*d^-1*arctanh(sin(c+d*x))+1//3*b*d^-1*sec(c+d*x)^3+(1/2)*a*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^2*(a+b*tan(c+d*x)), x) == :(a*d^-1*tan(c+d*x)+(1/2)*b*d^-1*sec(c+d*x)^2)
@test integrate((a+b*tan(c+d*x))*sec(c+d*x), x) == :(a*d^-1*arctanh(sin(c+d*x))+b*d^-1*sec(c+d*x))
@test integrate((a+b*tan(c+d*x))*cos(c+d*x), x) == :(a*d^-1*sin(c+d*x)+-1*b*d^-1*cos(c+d*x))
@test integrate(cos(c+d*x)^2*(a+b*tan(c+d*x)), x) == :((1/2)*a*x+-1//2*b*d^-1*cos(c+d*x)^2+(1/2)*a*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(cos(c+d*x)^3*(a+b*tan(c+d*x)), x) == :(a*d^-1*sin(c+d*x)+-1//3*a*d^-1*sin(c+d*x)^3+-1//3*b*d^-1*cos(c+d*x)^3)
@test integrate(cos(c+d*x)^4*(a+b*tan(c+d*x)), x) == :(3//8*a*x+-1//4*b*d^-1*cos(c+d*x)^4+1//4*a*d^-1*cos(c+d*x)^3*sin(c+d*x)+3//8*a*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*tan(c+d*x))^2*sec(c+d*x)^8, x) == :(a^2*d^-1*tan(c+d*x)+1//3*d^-1*tan(c+d*x)^3*(b^2+3*a^2)+1//5*d^-1*tan(c+d*x)^5*(3*a^2+3*b^2)+1//7*d^-1*tan(c+d*x)^7*(a^2+3*b^2)+1//9*b^2*d^-1*tan(c+d*x)^9+1//4*a*b*d^-1*sec(c+d*x)^8)
@test integrate((a+b*tan(c+d*x))^2*sec(c+d*x)^6, x) == :(a^2*d^-1*tan(c+d*x)+1//3*d^-1*tan(c+d*x)^3*(b^2+2*a^2)+1//5*d^-1*tan(c+d*x)^5*(a^2+2*b^2)+1//7*b^2*d^-1*tan(c+d*x)^7+1//3*a*b*d^-1*sec(c+d*x)^6)
@test integrate((a+b*tan(c+d*x))^2*sec(c+d*x)^4, x) == :(1//5*b^-3*d^-1*(a+b*tan(c+d*x))^5+-1//2*a*b^-3*d^-1*(a+b*tan(c+d*x))^4+1//3*b^-3*d^-1*(a+b*tan(c+d*x))^3*(a^2+b^2))
@test integrate((a+b*tan(c+d*x))^2*sec(c+d*x)^2, x) == :(1//3*b^-1*d^-1*(a+b*tan(c+d*x))^3)
@test integrate((a+b*tan(c+d*x))^2*cos(c+d*x)^2, x) == :(x*((1/2)*a^2+(1/2)*b^2)+-1//2*d^-1*cos(c+d*x)^2*(a+b*tan(c+d*x))*(b+-1*a*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^2*cos(c+d*x)^4, x) == :(x*(1//8*b^2+3//8*a^2)+-1//8*d^-1*cos(c+d*x)^2*(-1*(b^2+3*a^2)*tan(c+d*x)+2*a*b)+-1//4*d^-1*cos(c+d*x)^4*(a+b*tan(c+d*x))*(b+-1*a*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^2*sec(c+d*x)^7, x) == :(1//128*d^-1*(-5*b^2+40*a^2)*arctanh(sin(c+d*x))+1//8*b*d^-1*sec(c+d*x)^7*(a+b*tan(c+d*x))+1//48*d^-1*sec(c+d*x)^5*(-1*b^2+8*a^2)*tan(c+d*x)+1//128*d^-1*(-5*b^2+40*a^2)*sec(c+d*x)*tan(c+d*x)+1//192*d^-1*sec(c+d*x)^3*(-5*b^2+40*a^2)*tan(c+d*x)+9//56*a*b*d^-1*sec(c+d*x)^7)
@test integrate((a+b*tan(c+d*x))^2*sec(c+d*x)^5, x) == :(1//16*d^-1*(-1*b^2+6*a^2)*arctanh(sin(c+d*x))+1//6*b*d^-1*sec(c+d*x)^5*(a+b*tan(c+d*x))+1//16*d^-1*(-1*b^2+6*a^2)*sec(c+d*x)*tan(c+d*x)+1//24*d^-1*sec(c+d*x)^3*(-1*b^2+6*a^2)*tan(c+d*x)+7//30*a*b*d^-1*sec(c+d*x)^5)
@test integrate((a+b*tan(c+d*x))^2*sec(c+d*x)^3, x) == :(1//8*d^-1*(-1*b^2+4*a^2)*arctanh(sin(c+d*x))+1//4*b*d^-1*sec(c+d*x)^3*(a+b*tan(c+d*x))+1//8*d^-1*(-1*b^2+4*a^2)*sec(c+d*x)*tan(c+d*x)+5//12*a*b*d^-1*sec(c+d*x)^3)
@test integrate((a+b*tan(c+d*x))^2*sec(c+d*x), x) == :((1/2)*d^-1*(-1*b^2+2*a^2)*arctanh(sin(c+d*x))+(1/2)*b*d^-1*(a+b*tan(c+d*x))*sec(c+d*x)+3//2*a*b*d^-1*sec(c+d*x))
@test integrate((a+b*tan(c+d*x))^2*cos(c+d*x), x) == :(b^2*d^-1*arctanh(sin(c+d*x))+d^-1*(a^2+-1*b^2)*sin(c+d*x)+-2*a*b*d^-1*cos(c+d*x))
@test integrate((a+b*tan(c+d*x))^2*cos(c+d*x)^3, x) == :((1/2)*d^-1*(b^2+2*a^2)*sin(c+d*x)+-1//6*d^-1*sin(c+d*x)^3*(b^2+2*a^2)+-1//2*b*d^-1*cos(c+d*x)^3*(a+b*tan(c+d*x))+-1//6*a*b*d^-1*cos(c+d*x)^3)
@test integrate((a+b*tan(c+d*x))^2*cos(c+d*x)^5, x) == :(-1//6*d^-1*sin(c+d*x)^3*(b^2+4*a^2)+1//4*d^-1*(b^2+4*a^2)*sin(c+d*x)+1//20*d^-1*sin(c+d*x)^5*(b^2+4*a^2)+-3//20*a*b*d^-1*cos(c+d*x)^5+-1//4*b*d^-1*cos(c+d*x)^5*(a+b*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^2*cos(c+d*x)^7, x) == :(-1//6*d^-1*sin(c+d*x)^3*(b^2+6*a^2)+-1//42*d^-1*sin(c+d*x)^7*(b^2+6*a^2)+1//6*d^-1*(b^2+6*a^2)*sin(c+d*x)+1//10*d^-1*sin(c+d*x)^5*(b^2+6*a^2)+-5//42*a*b*d^-1*cos(c+d*x)^7+-1//6*b*d^-1*cos(c+d*x)^7*(a+b*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^3*sec(c+d*x)^8, x) == :(a^3*d^-1*tan(c+d*x)+(1/2)*b^3*d^-1*tan(c+d*x)^6+1//4*b^3*d^-1*tan(c+d*x)^4+1//10*b^3*d^-1*tan(c+d*x)^10+3//8*b^3*d^-1*tan(c+d*x)^8+a*d^-1*tan(c+d*x)^3*(a^2+b^2)+1//3*a*b^2*d^-1*tan(c+d*x)^9+1//7*a*d^-1*tan(c+d*x)^7*(a^2+9*b^2)+3//5*a*d^-1*tan(c+d*x)^5*(a^2+3*b^2)+3//8*b*a^2*d^-1*sec(c+d*x)^8)
@test integrate((a+b*tan(c+d*x))^3*sec(c+d*x)^6, x) == :(1//8*b^-5*d^-1*(a+b*tan(c+d*x))^8+-4//7*a*b^-5*d^-1*(a+b*tan(c+d*x))^7+1//3*b^-5*d^-1*(a+b*tan(c+d*x))^6*(b^2+3*a^2)+1//4*b^-5*d^-1*(a+b*tan(c+d*x))^4*(a^2+b^2)^2+-4//5*a*b^-5*d^-1*(a+b*tan(c+d*x))^5*(a^2+b^2))
@test integrate((a+b*tan(c+d*x))^3*sec(c+d*x)^4, x) == :(1//6*b^-3*d^-1*(a+b*tan(c+d*x))^6+-2//5*a*b^-3*d^-1*(a+b*tan(c+d*x))^5+1//4*b^-3*d^-1*(a+b*tan(c+d*x))^4*(a^2+b^2))
@test integrate((a+b*tan(c+d*x))^3*sec(c+d*x)^2, x) == :(1//4*b^-1*d^-1*(a+b*tan(c+d*x))^4)
@test integrate((a+b*tan(c+d*x))^3*cos(c+d*x)^2, x) == :((1/2)*a*x*(a^2+3*b^2)+-1*b^3*d^-1*log(cos(c+d*x))+-1//2*a*b^2*d^-1*tan(c+d*x)+-1//2*d^-1*(a+b*tan(c+d*x))^2*cos(c+d*x)^2*(b+-1*a*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^3*cos(c+d*x)^4, x) == :(3//8*a*x*(a^2+b^2)+1//4*d^-1*(a+b*tan(c+d*x))^3*cos(c+d*x)^3*sin(c+d*x)+-3//8*a*d^-1*cos(c+d*x)^2*(a+b*tan(c+d*x))*(b+-1*a*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^3*cos(c+d*x)^3, x) == :(-1//3*d^-1*(a+b*tan(c+d*x))^2*cos(c+d*x)^3*(b+-1*a*tan(c+d*x))+-1//3*d^-1*(b+-1*a*tan(c+d*x))*(2*a^2+2*b^2)*cos(c+d*x))
@test integrate((a+b*tan(c+d*x))^3*cos(c+d*x)^5, x) == :(-1//15*d^-1*(a+b*tan(c+d*x))^2*cos(c+d*x)^3*(b+-4*a*tan(c+d*x))+-1//15*d^-1*(b+-1*a*tan(c+d*x))*(2*b^2+8*a^2)*cos(c+d*x)+1//5*d^-1*(a+b*tan(c+d*x))^3*cos(c+d*x)^4*sin(c+d*x))
@test integrate((a+b*tan(c+d*x))^3*cos(c+d*x)^7, x) == :(-2//35*d^-1*cos(c+d*x)^3*(b*(b^2+6*a^2)+-1*a*(-1*b^2+4*a^2)*tan(c+d*x))+-3//35*d^-1*(a+b*tan(c+d*x))^2*cos(c+d*x)^5*(b+-2*a*tan(c+d*x))+1//7*d^-1*(a+b*tan(c+d*x))^3*cos(c+d*x)^6*sin(c+d*x)+8//35*a*d^-1*(b^2+2*a^2)*sin(c+d*x))
@test integrate((a+b*tan(c+d*x))^-1*sec(c+d*x)^6, x) == :(1//4*b^-1*d^-1*tan(c+d*x)^4+b^-5*d^-1*(a^2+b^2)^2*log(a+b*tan(c+d*x))+(1/2)*b^-3*d^-1*tan(c+d*x)^2*(a^2+2*b^2)+-1//3*a*b^-2*d^-1*tan(c+d*x)^3+-1*a*b^-4*d^-1*(a^2+2*b^2)*tan(c+d*x))
@test integrate((a+b*tan(c+d*x))^-1*sec(c+d*x)^4, x) == :((1/2)*b^-1*d^-1*tan(c+d*x)^2+b^-3*d^-1*(a^2+b^2)*log(a+b*tan(c+d*x))+-1*a*b^-2*d^-1*tan(c+d*x))
@test integrate((a+b*tan(c+d*x))^-1*sec(c+d*x)^2, x) == :(b^-1*d^-1*log(a+b*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^-1*cos(c+d*x)^2, x) == :(b^3*d^-1*(a^2+b^2)^-2*log(a*cos(c+d*x)+b*sin(c+d*x))+d^-1*(2*a^2+2*b^2)^-1*cos(c+d*x)^2*(b+a*tan(c+d*x))+(1/2)*a*x*(a^2+b^2)^-2*(a^2+3*b^2))
@test integrate((a+b*tan(c+d*x))^-1*cos(c+d*x)^4, x) == :(b^5*d^-1*(a^2+b^2)^-3*log(a*cos(c+d*x)+b*sin(c+d*x))+d^-1*(4*a^2+4*b^2)^-1*cos(c+d*x)^4*(b+a*tan(c+d*x))+1//8*a*x*(a^2+b^2)^-3*(3*a^4+15*b^4+10*a^2*b^2)+1//8*d^-1*(a^2+b^2)^-2*cos(c+d*x)^2*(4*b^3+a*(3*a^2+7*b^2)*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^-1*sec(c+d*x)^3, x) == :(b^-1*d^-1*sec(c+d*x)+-1*a*b^-2*d^-1*arctanh(sin(c+d*x))+-1*b^-2*d^-1*(a^2+b^2)^(1/2)*arctanh((a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x))*cos(c+d*x)))
@test integrate((a+b*tan(c+d*x))^-1*sec(c+d*x), x) == :(-1*d^-1*(a^2+b^2)^-1//2*arctanh((a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x))*cos(c+d*x)))
@test integrate((a+b*tan(c+d*x))^-1*cos(c+d*x), x) == :(a*d^-1*(a^2+b^2)^-1*sin(c+d*x)+b*d^-1*(a^2+b^2)^-1*cos(c+d*x)+-1*b^2*d^-1*(a^2+b^2)^-3//2*arctanh((a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x))*cos(c+d*x)))
@test integrate((a+b*tan(c+d*x))^-1*cos(c+d*x)^3, x) == :(a*d^-1*(a^2+b^2)^-1*sin(c+d*x)+b*d^-1*(3*a^2+3*b^2)^-1*cos(c+d*x)^3+b^3*d^-1*(a^2+b^2)^-2*cos(c+d*x)+-1*a*d^-1*(3*a^2+3*b^2)^-1*sin(c+d*x)^3+-1*b^4*d^-1*(a^2+b^2)^-5//2*arctanh((a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x))*cos(c+d*x))+a*b^2*d^-1*(a^2+b^2)^-2*sin(c+d*x))
@test integrate((a+b*tan(c+d*x))^-2*sec(c+d*x)^8, x) == :(1//5*b^-2*d^-1*tan(c+d*x)^5+b^-6*d^-1*(3*b^4+5*a^4+9*a^2*b^2)*tan(c+d*x)+b^-4*d^-1*tan(c+d*x)^3*(a^2+b^2)+-1*b^-7*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^3+-1//2*a*b^-3*d^-1*tan(c+d*x)^4+-1*a*b^-5*d^-1*tan(c+d*x)^2*(2*a^2+3*b^2)+-6*a*b^-7*d^-1*(a^2+b^2)^2*log(a+b*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^-2*sec(c+d*x)^6, x) == :(1//3*b^-2*d^-1*tan(c+d*x)^3+b^-4*d^-1*(2*b^2+3*a^2)*tan(c+d*x)+-1*a*b^-3*d^-1*tan(c+d*x)^2+-1*b^-5*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^2+-4*a*b^-5*d^-1*(a^2+b^2)*log(a+b*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^-2*sec(c+d*x)^4, x) == :(b^-2*d^-1*tan(c+d*x)+-1*b^-3*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)+-2*a*b^-3*d^-1*log(a+b*tan(c+d*x)))
@test integrate((a+b*tan(c+d*x))^-2*sec(c+d*x)^2, x) == :(-1*b^-1*d^-1*(a+b*tan(c+d*x))^-1)
@test integrate((a+b*tan(c+d*x))^-2*cos(c+d*x)^2, x) == :((1/2)*x*(a^2+b^2)^-3*(a^4+-3*b^4+6*a^2*b^2)+d^-1*(a+b*tan(c+d*x))^-1*(2*a^2+2*b^2)^-1*cos(c+d*x)^2*(b+a*tan(c+d*x))+(1/2)*b*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-2*(a^2+-3*b^2)+4*a*b^3*d^-1*(a^2+b^2)^-3*log(a*cos(c+d*x)+b*sin(c+d*x)))
@test integrate((a+b*tan(c+d*x))^-2*cos(c+d*x)^4, x) == :(1//8*x*(a^2+b^2)^-4*(-15*b^6+3*a^6+15*a^4*b^2+45*a^2*b^4)+d^-1*(a+b*tan(c+d*x))^-1*(4*a^2+4*b^2)^-1*cos(c+d*x)^4*(b+a*tan(c+d*x))+6*a*b^5*d^-1*(a^2+b^2)^-4*log(a*cos(c+d*x)+b*sin(c+d*x))+-1//8*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-2*cos(c+d*x)^2*(b*(a^2+-5*b^2)+-3*a*(a^2+3*b^2)*tan(c+d*x))+3//8*b*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-3*(a^2+-1*b^2)*(a^2+5*b^2))
@test integrate((a+b*tan(c+d*x))^-2*sec(c+d*x)^7, x) == :(-1*b^-1*d^-1*(a+b*tan(c+d*x))^-1*sec(c+d*x)^5+-5//8*b^-5*d^-1*(8*a*(a^2+b^2)+-1*b*(3*b^2+4*a^2)*tan(c+d*x))*sec(c+d*x)+-5//12*b^-3*d^-1*sec(c+d*x)^3*(4a+-3*b*tan(c+d*x))+1//8*b^-6*d^-1*(sec(c+d*x)^2)^-1//2*(15*b^4+40*a^4+60*a^2*b^2)*arcsinh(tan(c+d*x))*sec(c+d*x)+5*a*b^-6*d^-1*(sec(c+d*x)^2)^-1//2*(a^2+b^2)^3//2*arctanh((sec(c+d*x)^2)^-1//2*(a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x)))*sec(c+d*x))
@test integrate((a+b*tan(c+d*x))^-2*sec(c+d*x)^5, x) == :(-1*b^-1*d^-1*(a+b*tan(c+d*x))^-1*sec(c+d*x)^3+-3//2*b^-3*d^-1*(2a+-1*b*tan(c+d*x))*sec(c+d*x)+(1/2)*b^-4*d^-1*(sec(c+d*x)^2)^-1//2*(3*b^2+6*a^2)*arcsinh(tan(c+d*x))*sec(c+d*x)+3*a*b^-4*d^-1*(sec(c+d*x)^2)^-1//2*(a^2+b^2)^(1/2)*arctanh((sec(c+d*x)^2)^-1//2*(a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x)))*sec(c+d*x))
@test integrate((a+b*tan(c+d*x))^-2*cos(c+d*x), x) == :(d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-1*(b+a*tan(c+d*x))*cos(c+d*x)+b*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-2*(a^2+-2*b^2)*sec(c+d*x)+-3*a*b^2*d^-1*(sec(c+d*x)^2)^(1/2)*(a^2+b^2)^-5//2*arctanh((sec(c+d*x)^2)^-1//2*(a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x)))*cos(c+d*x))
@test integrate((a+b*tan(c+d*x))^-2*cos(c+d*x)^3, x) == :(d^-1*(a+b*tan(c+d*x))^-1*(3*a^2+3*b^2)^-1*cos(c+d*x)^3*(b+a*tan(c+d*x))+-1//3*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-2*(b*(a^2+-4*b^2)+-1*a*(2*a^2+7*b^2)*tan(c+d*x))*cos(c+d*x)+1//3*b*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-3*(-8*b^4+2*a^4+9*a^2*b^2)*sec(c+d*x)+-5*a*b^4*d^-1*(sec(c+d*x)^2)^(1/2)*(a^2+b^2)^-7//2*arctanh((sec(c+d*x)^2)^-1//2*(a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x)))*cos(c+d*x))
@test integrate((a+b*tan(c+d*x))^-3*sec(c+d*x)^8, x) == :(1//4*b^-3*d^-1*tan(c+d*x)^4+(1/2)*b^-5*d^-1*tan(c+d*x)^2*(3*b^2+6*a^2)+-1*a*b^-4*d^-1*tan(c+d*x)^3+-1//2*b^-7*d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2)^3+b^-7*d^-1*(b^2+5*a^2)*(3*a^2+3*b^2)*log(a+b*tan(c+d*x))+-1*a*b^-6*d^-1*(9*b^2+10*a^2)*tan(c+d*x)+6*a*b^-7*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^2)
@test integrate((a+b*tan(c+d*x))^-3*sec(c+d*x)^6, x) == :((1/2)*b^-3*d^-1*tan(c+d*x)^2+b^-5*d^-1*(2*b^2+6*a^2)*log(a+b*tan(c+d*x))+-3*a*b^-4*d^-1*tan(c+d*x)+-1//2*b^-5*d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2)^2+4*a*b^-5*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2))
@test integrate((a+b*tan(c+d*x))^-3*sec(c+d*x)^4, x) == :(b^-3*d^-1*log(a+b*tan(c+d*x))+2*a*b^-3*d^-1*(a+b*tan(c+d*x))^-1+-1//2*b^-3*d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2))
@test integrate((a+b*tan(c+d*x))^-3*sec(c+d*x)^2, x) == :(-1//2*b^-1*d^-1*(a+b*tan(c+d*x))^-2)
@test integrate((a+b*tan(c+d*x))^-3*cos(c+d*x)^2, x) == :((1/2)*a*x*(a^2+b^2)^-4*(a^4+-15*b^4+10*a^2*b^2)+d^-1*(a+b*tan(c+d*x))^-2*(2*a^2+2*b^2)^-1*cos(c+d*x)^2*(b+a*tan(c+d*x))+(1/2)*b*d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2)^-2*(a^2+-2*b^2)+2*b^3*d^-1*(a^2+b^2)^-4*(-1*b^2+5*a^2)*log(a*cos(c+d*x)+b*sin(c+d*x))+(1/2)*a*b*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-3*(a^2+-11*b^2))
@test integrate((a+b*tan(c+d*x))^-3*cos(c+d*x)^4, x) == :(3//8*a*x*(a^2+b^2)^-5*(a^6+-35*b^6+7*a^4*b^2+35*a^2*b^4)+d^-1*(a+b*tan(c+d*x))^-2*(4*a^2+4*b^2)^-1*cos(c+d*x)^4*(b+a*tan(c+d*x))+3*b^5*d^-1*(a^2+b^2)^-5*(-1*b^2+7*a^2)*log(a*cos(c+d*x)+b*sin(c+d*x))+-1//8*d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2)^-2*cos(c+d*x)^2*(2*b*(a^2+-3*b^2)+-1*a*(3*a^2+11*b^2)*tan(c+d*x))+3//8*b*d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2)^-3*(a^4+-4*b^4+5*a^2*b^2)+3//8*a*b*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-4*(a^4+-27*b^4+6*a^2*b^2))
@test integrate((a+b*tan(c+d*x))^-3*sec(c+d*x)^7, x) == :(-1//2*b^-1*d^-1*(a+b*tan(c+d*x))^-2*sec(c+d*x)^5+5//2*b^-5*d^-1*(b^2+4*a^2+-2*a*b*tan(c+d*x))*sec(c+d*x)+5//6*b^-3*d^-1*(a+b*tan(c+d*x))^-1*sec(c+d*x)^3*(4a+b*tan(c+d*x))+-5//2*a*b^-6*d^-1*(sec(c+d*x)^2)^-1//2*(3*b^2+4*a^2)*arcsinh(tan(c+d*x))*sec(c+d*x)+-5//2*b^-6*d^-1*(sec(c+d*x)^2)^-1//2*(a^2+b^2)^(1/2)*(b^2+4*a^2)*arctanh((sec(c+d*x)^2)^-1//2*(a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x)))*sec(c+d*x))
@test integrate((a+b*tan(c+d*x))^-3*sec(c+d*x), x) == :(-1*b*d^-1*(a+b*tan(c+d*x))^-2*(2*a^2+2*b^2)^-1*sec(c+d*x)+-3//2*a*b*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-2*sec(c+d*x)+-1//2*d^-1*(sec(c+d*x)^2)^-1//2*(a^2+b^2)^-5//2*(-1*b^2+2*a^2)*arctanh((sec(c+d*x)^2)^-1//2*(a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x)))*sec(c+d*x))
@test integrate((a+b*tan(c+d*x))^-3*cos(c+d*x), x) == :(d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2)^-1*(b+a*tan(c+d*x))*cos(c+d*x)+(1/2)*b*d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2)^-2*(-3*b^2+2*a^2)*sec(c+d*x)+(1/2)*a*b*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-3*(-13*b^2+2*a^2)*sec(c+d*x)+-3//2*b^2*d^-1*(sec(c+d*x)^2)^(1/2)*(a^2+b^2)^-7//2*(-1*b^2+4*a^2)*arctanh((sec(c+d*x)^2)^-1//2*(a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x)))*cos(c+d*x))
@test integrate((a+b*tan(c+d*x))^-3*cos(c+d*x)^3, x) == :(d^-1*(a+b*tan(c+d*x))^-2*(3*a^2+3*b^2)^-1*cos(c+d*x)^3*(b+a*tan(c+d*x))+-1//3*d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2)^-2*(b*(-5*b^2+2*a^2)+-1*a*(2*a^2+9*b^2)*tan(c+d*x))*cos(c+d*x)+1//6*b*d^-1*(a+b*tan(c+d*x))^-2*(a^2+b^2)^-3*(-15*b^4+4*a^4+24*a^2*b^2)*sec(c+d*x)+-5//2*b^4*d^-1*(sec(c+d*x)^2)^(1/2)*(a^2+b^2)^-9//2*(-1*b^2+6*a^2)*arctanh((sec(c+d*x)^2)^-1//2*(a^2+b^2)^-1//2*(b+-1*a*tan(c+d*x)))*cos(c+d*x)+1//6*a*b*d^-1*(a+b*tan(c+d*x))^-1*(a^2+b^2)^-4*(-81*b^4+4*a^4+28*a^2*b^2)*sec(c+d*x))
@test integrate((d*sec(e+f*x))^7//2*(a+b*tan(e+f*x)), x) == :(2//7*b*f^-1*(d*sec(e+f*x))^7//2+2//5*a*d*f^-1*(d*sec(e+f*x))^5//2*sin(e+f*x)+6//5*a*d^3*f^-1*(d*sec(e+f*x))^(1/2)*sin(e+f*x)+-6//5*a*d^4*f^-1*(d*sec(e+f*x))^-1//2*cos(e+f*x)^-1//2*Elliptic.E((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^5//2*(a+b*tan(e+f*x)), x) == :(2//5*b*f^-1*(d*sec(e+f*x))^5//2+2//3*a*d*f^-1*(d*sec(e+f*x))^3//2*sin(e+f*x)+2//3*a*d^2*f^-1*(d*sec(e+f*x))^(1/2)*cos(e+f*x)^(1/2)*Elliptic.F((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^3//2*(a+b*tan(e+f*x)), x) == :(2//3*b*f^-1*(d*sec(e+f*x))^3//2+2*a*d*f^-1*(d*sec(e+f*x))^(1/2)*sin(e+f*x)+-2*a*d^2*f^-1*(d*sec(e+f*x))^-1//2*cos(e+f*x)^-1//2*Elliptic.E((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^(1/2)*(a+b*tan(e+f*x)), x) == :(2*b*f^-1*(d*sec(e+f*x))^(1/2)+2*a*f^-1*(d*sec(e+f*x))^(1/2)*cos(e+f*x)^(1/2)*Elliptic.F((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^-1//2*(a+b*tan(e+f*x)), x) == :(-2*b*f^-1*(d*sec(e+f*x))^-1//2+2*a*f^-1*(d*sec(e+f*x))^-1//2*cos(e+f*x)^-1//2*Elliptic.E((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^-3//2*(a+b*tan(e+f*x)), x) == :(-2//3*b*f^-1*(d*sec(e+f*x))^-3//2+2//3*a*d^-1*f^-1*(d*sec(e+f*x))^-1//2*sin(e+f*x)+2//3*a*d^-2*f^-1*(d*sec(e+f*x))^(1/2)*cos(e+f*x)^(1/2)*Elliptic.F((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^-5//2*(a+b*tan(e+f*x)), x) == :(-2//5*b*f^-1*(d*sec(e+f*x))^-5//2+2//5*a*d^-1*f^-1*(d*sec(e+f*x))^-3//2*sin(e+f*x)+6//5*a*d^-2*f^-1*(d*sec(e+f*x))^-1//2*cos(e+f*x)^-1//2*Elliptic.E((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^-7//2*(a+b*tan(e+f*x)), x) == :(-2//7*b*f^-1*(d*sec(e+f*x))^-7//2+2//7*a*d^-1*f^-1*(d*sec(e+f*x))^-5//2*sin(e+f*x)+10//21*a*d^-3*f^-1*(d*sec(e+f*x))^-1//2*sin(e+f*x)+10//21*a*d^-4*f^-1*(d*sec(e+f*x))^(1/2)*cos(e+f*x)^(1/2)*Elliptic.F((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^5//2*(a+b*tan(e+f*x))^2, x) == :(2//7*b*f^-1*(d*sec(e+f*x))^5//2*(a+b*tan(e+f*x))+18//35*a*b*f^-1*(d*sec(e+f*x))^5//2+1//21*d*f^-1*(d*sec(e+f*x))^3//2*(-4*b^2+14*a^2)*sin(e+f*x)+1//21*d^2*f^-1*(d*sec(e+f*x))^(1/2)*cos(e+f*x)^(1/2)*(-4*b^2+14*a^2)*Elliptic.F((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^3//2*(a+b*tan(e+f*x))^2, x) == :(2//5*b*f^-1*(d*sec(e+f*x))^3//2*(a+b*tan(e+f*x))+14//15*a*b*f^-1*(d*sec(e+f*x))^3//2+1//5*d*f^-1*(d*sec(e+f*x))^(1/2)*(-4*b^2+10*a^2)*sin(e+f*x)+-1//5*d^2*f^-1*(d*sec(e+f*x))^-1//2*cos(e+f*x)^-1//2*(-4*b^2+10*a^2)*Elliptic.E((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^(1/2)*(a+b*tan(e+f*x))^2, x) == :(2//3*b*f^-1*(d*sec(e+f*x))^(1/2)*(a+b*tan(e+f*x))+10//3*a*b*f^-1*(d*sec(e+f*x))^(1/2)+1//3*f^-1*(d*sec(e+f*x))^(1/2)*cos(e+f*x)^(1/2)*(-4*b^2+6*a^2)*Elliptic.F((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^-1//2*(a+b*tan(e+f*x))^2, x) == :(-6*a*b*f^-1*(d*sec(e+f*x))^-1//2+2*b*f^-1*(d*sec(e+f*x))^-1//2*(a+b*tan(e+f*x))+f^-1*(d*sec(e+f*x))^-1//2*cos(e+f*x)^-1//2*(-4*b^2+2*a^2)*Elliptic.E((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^-3//2*(a+b*tan(e+f*x))^2, x) == :(-2*b*f^-1*(d*sec(e+f*x))^-3//2*(a+b*tan(e+f*x))+2//3*a*b*f^-1*(d*sec(e+f*x))^-3//2+1//3*d^-1*f^-1*(d*sec(e+f*x))^-1//2*(2*a^2+4*b^2)*sin(e+f*x)+1//3*d^-2*f^-1*(d*sec(e+f*x))^(1/2)*cos(e+f*x)^(1/2)*(2*a^2+4*b^2)*Elliptic.F((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^-5//2*(a+b*tan(e+f*x))^2, x) == :(-2//3*b*f^-1*(d*sec(e+f*x))^-5//2*(a+b*tan(e+f*x))+-2//15*a*b*f^-1*(d*sec(e+f*x))^-5//2+1//15*d^-1*f^-1*(d*sec(e+f*x))^-3//2*(4*b^2+6*a^2)*sin(e+f*x)+1//5*d^-2*f^-1*(d*sec(e+f*x))^-1//2*cos(e+f*x)^-1//2*(4*b^2+6*a^2)*Elliptic.E((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^-7//2*(a+b*tan(e+f*x))^2, x) == :(-6//35*a*b*f^-1*(d*sec(e+f*x))^-7//2+-2//5*b*f^-1*(d*sec(e+f*x))^-7//2*(a+b*tan(e+f*x))+1//21*d^-3*f^-1*(d*sec(e+f*x))^-1//2*(4*b^2+10*a^2)*sin(e+f*x)+1//35*d^-1*f^-1*(d*sec(e+f*x))^-5//2*(4*b^2+10*a^2)*sin(e+f*x)+1//21*d^-4*f^-1*(d*sec(e+f*x))^(1/2)*cos(e+f*x)^(1/2)*(4*b^2+10*a^2)*Elliptic.F((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^-9//2*(a+b*tan(e+f*x))^2, x) == :(-10//63*a*b*f^-1*(d*sec(e+f*x))^-9//2+-2//7*b*f^-1*(d*sec(e+f*x))^-9//2*(a+b*tan(e+f*x))+1//45*d^-3*f^-1*(d*sec(e+f*x))^-3//2*(4*b^2+14*a^2)*sin(e+f*x)+1//63*d^-1*f^-1*(d*sec(e+f*x))^-7//2*(4*b^2+14*a^2)*sin(e+f*x)+1//15*d^-4*f^-1*(d*sec(e+f*x))^-1//2*cos(e+f*x)^-1//2*(4*b^2+14*a^2)*Elliptic.E((1/2)*e+(1/2)*f*x,2))
@test integrate((d*sec(e+f*x))^5//2*(a+b*tan(e+f*x))^3, x) == :(2//9*b*d^2*f^-1*(d*sec(e+f*x))^(1/2)*(a+b*tan(e+f*x))^2*sec(e+f*x)^2+2//21*a*d^2*f^-1*(d*sec(e+f*x))^(1/2)*(-6*b^2+7*a^2)*tan(e+f*x)+2//315*b*d^2*f^-1*(d*sec(e+f*x))^(1/2)*sec(e+f*x)^2*(-28*b^2+154*a^2+65*a*b*tan(e+f*x))+2//21*a*d^2*f^-1*(sec(e+f*x)^2)^-1//4*(d*sec(e+f*x))^(1/2)*(-6*b^2+7*a^2)*Elliptic.F((1/2)*arctan(tan(e+f*x)),2))
@test integrate((d*sec(e+f*x))^3//2*(a+b*tan(e+f*x))^3, x) == :(2//7*b*f^-1*(d*sec(e+f*x))^3//2*(a+b*tan(e+f*x))^2+2//105*b*f^-1*(d*sec(e+f*x))^3//2*(-20*b^2+90*a^2+33*a*b*tan(e+f*x))+-2//5*a*f^-1*(sec(e+f*x)^2)^-3//4*(d*sec(e+f*x))^3//2*(-6*b^2+5*a^2)*Elliptic.E((1/2)*arctan(tan(e+f*x)),2)+2//5*a*f^-1*(d*sec(e+f*x))^3//2*(-6*b^2+5*a^2)*cos(e+f*x)*sin(e+f*x))
@test integrate((d*sec(e+f*x))^(1/2)*(a+b*tan(e+f*x))^3, x) == :(2//5*b*f^-1*(d*sec(e+f*x))^(1/2)*(a+b*tan(e+f*x))^2+2//5*b*f^-1*(d*sec(e+f*x))^(1/2)*(-4*b^2+14*a^2+3*a*b*tan(e+f*x))+2*a*f^-1*(sec(e+f*x)^2)^-1//4*(d*sec(e+f*x))^(1/2)*(a^2+-2*b^2)*Elliptic.F((1/2)*arctan(tan(e+f*x)),2))
@test integrate((d*sec(e+f*x))^-1//2*(a+b*tan(e+f*x))^3, x) == :(-1*f^-1*(d*sec(e+f*x))^-1//2*(a+b*tan(e+f*x))^2*(2b+-2*a*tan(e+f*x))+-2*a*f^-1*(d*sec(e+f*x))^-1//2*(a^2+-6*b^2)*tan(e+f*x)+-2//3*b*f^-1*(d*sec(e+f*x))^-1//2*sec(e+f*x)^2*(-4*b^2+6*a^2+3*a*b*tan(e+f*x))+2*a*f^-1*(sec(e+f*x)^2)^1//4*(d*sec(e+f*x))^-1//2*(a^2+-6*b^2)*Elliptic.E((1/2)*arctan(tan(e+f*x)),2))
@test integrate((d*sec(e+f*x))^-3//2*(a+b*tan(e+f*x))^3, x) == :(-1//3*f^-1*(d*sec(e+f*x))^-3//2*(a+b*tan(e+f*x))^2*(2b+-2*a*tan(e+f*x))+-2//3*b*f^-1*(d*sec(e+f*x))^-3//2*sec(e+f*x)^2*(-4*b^2+2*a^2+a*b*tan(e+f*x))+2//3*a*f^-1*(sec(e+f*x)^2)^3//4*(d*sec(e+f*x))^-3//2*(a^2+6*b^2)*Elliptic.F((1/2)*arctan(tan(e+f*x)),2))
@test integrate((d*sec(e+f*x))^-5//2*(a+b*tan(e+f*x))^3, x) == :(-1//5*d^-2*f^-1*(d*sec(e+f*x))^-1//2*(4*b*(a^2+2*b^2)+-2*a*(3*a^2+5*b^2)*tan(e+f*x))+-6//5*a*d^-2*f^-1*(d*sec(e+f*x))^-1//2*(a^2+2*b^2)*tan(e+f*x)+-2//5*d^-2*f^-1*(d*sec(e+f*x))^-1//2*(a+b*tan(e+f*x))^2*cos(e+f*x)^2*(b+-1*a*tan(e+f*x))+6//5*a*d^-2*f^-1*(sec(e+f*x)^2)^1//4*(d*sec(e+f*x))^-1//2*(a^2+2*b^2)*Elliptic.E((1/2)*arctan(tan(e+f*x)),2))
@test integrate((d*sec(e+f*x))^-7//2*(a+b*tan(e+f*x))^3, x) == :(-1//21*d^-2*f^-1*(d*sec(e+f*x))^-3//2*(4*b*(2*b^2+3*a^2)+-2*a*(3*b^2+5*a^2)*tan(e+f*x))+-2//7*d^-2*f^-1*(d*sec(e+f*x))^-3//2*(a+b*tan(e+f*x))^2*cos(e+f*x)^2*(b+-1*a*tan(e+f*x))+2//21*a*d^-2*f^-1*(sec(e+f*x)^2)^3//4*(d*sec(e+f*x))^-3//2*(5*a^2+6*b^2)*Elliptic.F((1/2)*arctan(tan(e+f*x)),2))
@test integrate((d*sec(e+f*x))^-9//2*(a+b*tan(e+f*x))^3, x) == :(-2//45*d^-4*f^-1*(d*sec(e+f*x))^-1//2*cos(e+f*x)^2*(2*b*(2*b^2+5*a^2)+-1*a*(b^2+7*a^2)*tan(e+f*x))+-2//9*d^-4*f^-1*(d*sec(e+f*x))^-1//2*(a+b*tan(e+f*x))^2*cos(e+f*x)^4*(b+-1*a*tan(e+f*x))+2//15*a*d^-4*f^-1*(sec(e+f*x)^2)^1//4*(d*sec(e+f*x))^-1//2*(6*b^2+7*a^2)*Elliptic.E((1/2)*arctan(tan(e+f*x)),2))
@test integrate((d*sec(e+f*x))^-11//2*(a+b*tan(e+f*x))^3, x) == :(-2//77*d^-4*f^-1*(d*sec(e+f*x))^-3//2*cos(e+f*x)^2*(2*b*(2*b^2+7*a^2)+-1*a*(-1*b^2+9*a^2)*tan(e+f*x))+-2//11*d^-4*f^-1*(d*sec(e+f*x))^-3//2*(a+b*tan(e+f*x))^2*cos(e+f*x)^4*(b+-1*a*tan(e+f*x))+10//77*a*d^-4*f^-1*(d*sec(e+f*x))^-3//2*(2*b^2+3*a^2)*tan(e+f*x)+10//77*a*d^-4*f^-1*(sec(e+f*x)^2)^3//4*(d*sec(e+f*x))^-3//2*(2*b^2+3*a^2)*Elliptic.F((1/2)*arctan(tan(e+f*x)),2))
@test integrate((a+b*tan(c+d*x))^n*sec(c+d*x)^6, x) == :(b^-5*d^-1*(5+n)^-1*(a+b*tan(c+d*x))^(5+n)+b^-5*d^-1*(1+n)^-1*(a+b*tan(c+d*x))^(1+n)*(a^2+b^2)^2+b^-5*d^-1*(3+n)^-1*(a+b*tan(c+d*x))^(3+n)*(2*b^2+6*a^2)+-4*a*b^-5*d^-1*(4+n)^-1*(a+b*tan(c+d*x))^(4+n)+-4*a*b^-5*d^-1*(2+n)^-1*(a+b*tan(c+d*x))^(2+n)*(a^2+b^2))
@test integrate((a+b*tan(c+d*x))^n*sec(c+d*x)^4, x) == :(b^-3*d^-1*(3+n)^-1*(a+b*tan(c+d*x))^(3+n)+b^-3*d^-1*(1+n)^-1*(a+b*tan(c+d*x))^(1+n)*(a^2+b^2)+-2*a*b^-3*d^-1*(2+n)^-1*(a+b*tan(c+d*x))^(2+n))
@test integrate((a+b*tan(c+d*x))^n*sec(c+d*x)^2, x) == :(b^-1*d^-1*(1+n)^-1*(a+b*tan(c+d*x))^(1+n))
@test integrate((e*cos(c+d*x))^7//2*(a+im*a*tan(c+d*x)), x) == :(-2//7*im*a*d^-1*(e*cos(c+d*x))^7//2+2//7*a*d^-1*(e*cos(c+d*x))^7//2*tan(c+d*x)+10//21*a*d^-1*(e*cos(c+d*x))^7//2*cos(c+d*x)^-7//2*Elliptic.F((1/2)*c+(1/2)*d*x,2)+10//21*a*d^-1*(e*cos(c+d*x))^7//2*sec(c+d*x)^2*tan(c+d*x))
@test integrate((e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x)), x) == :(-2//5*im*a*d^-1*(e*cos(c+d*x))^5//2+2//5*a*d^-1*(e*cos(c+d*x))^5//2*tan(c+d*x)+6//5*a*d^-1*(e*cos(c+d*x))^5//2*cos(c+d*x)^-5//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*cos(c+d*x))^3//2*(a+im*a*tan(c+d*x)), x) == :(-2//3*im*a*d^-1*(e*cos(c+d*x))^3//2+2//3*a*d^-1*(e*cos(c+d*x))^3//2*tan(c+d*x)+2//3*a*d^-1*(e*cos(c+d*x))^3//2*cos(c+d*x)^-3//2*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x)), x) == :(-2*im*a*d^-1*(e*cos(c+d*x))^(1/2)+2*a*d^-1*(e*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*cos(c+d*x))^-1//2*(a+im*a*tan(c+d*x)), x) == :(2*im*a*d^-1*(e*cos(c+d*x))^-1//2+2*a*d^-1*(e*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*cos(c+d*x))^-5//2*(a+im*a*tan(c+d*x)), x) == :(2//5*im*a*d^-1*(e*cos(c+d*x))^-5//2+2//3*a*d^-1*(e*cos(c+d*x))^-5//2*cos(c+d*x)^5//2*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*(e*cos(c+d*x))^-5//2*cos(c+d*x)*sin(c+d*x))
@test integrate((e*cos(c+d*x))^-7//2*(a+im*a*tan(c+d*x)), x) == :(2//7*im*a*d^-1*(e*cos(c+d*x))^-7//2+-6//5*a*d^-1*(e*cos(c+d*x))^-7//2*cos(c+d*x)^7//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//5*a*d^-1*(e*cos(c+d*x))^-7//2*cos(c+d*x)*sin(c+d*x)+6//5*a*d^-1*(e*cos(c+d*x))^-7//2*cos(c+d*x)^3*sin(c+d*x))
@test integrate((e*cos(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-2, x) == :(6//35*a^-2*d^-1*(e*cos(c+d*x))^7//2*tan(c+d*x)+2//7*a^-2*d^-1*(e*cos(c+d*x))^7//2*cos(c+d*x)^-7//2*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*a^-2*d^-1*(e*cos(c+d*x))^7//2*sec(c+d*x)^2*tan(c+d*x)+2//15*a^-2*d^-1*(e*cos(c+d*x))^7//2*cos(c+d*x)*sin(c+d*x)+4//15*im*d^-1*(e*cos(c+d*x))^7//2*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^2)
@test integrate((e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-2, x) == :(14//65*a^-2*d^-1*(e*cos(c+d*x))^5//2*tan(c+d*x)+2//13*a^-2*d^-1*(e*cos(c+d*x))^5//2*cos(c+d*x)*sin(c+d*x)+4//13*im*d^-1*(e*cos(c+d*x))^5//2*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^2+42//65*a^-2*d^-1*(e*cos(c+d*x))^5//2*cos(c+d*x)^-5//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*cos(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-2, x) == :(10//33*a^-2*d^-1*(e*cos(c+d*x))^3//2*tan(c+d*x)+2//11*a^-2*d^-1*(e*cos(c+d*x))^3//2*cos(c+d*x)*sin(c+d*x)+4//11*im*d^-1*(e*cos(c+d*x))^3//2*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^2+10//33*a^-2*d^-1*(e*cos(c+d*x))^3//2*cos(c+d*x)^-3//2*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*cos(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-2, x) == :(2//5*a^-2*d^-1*(e*cos(c+d*x))^-3//2*cos(c+d*x)^3//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//5*im*d^-1*(e*cos(c+d*x))^-3//2*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^2)
@test integrate((e*cos(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-2, x) == :(-2//3*a^-2*d^-1*(e*cos(c+d*x))^-5//2*cos(c+d*x)^5//2*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//3*im*d^-1*(e*cos(c+d*x))^-5//2*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^2)
@test integrate((e*cos(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-2, x) == :(-6*a^-2*d^-1*(e*cos(c+d*x))^-7//2*cos(c+d*x)^3*sin(c+d*x)+4*im*d^-1*(e*cos(c+d*x))^-7//2*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^2+6*a^-2*d^-1*(e*cos(c+d*x))^-7//2*cos(c+d*x)^7//2*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((e*cos(c+d*x))^-9//2*(a+im*a*tan(c+d*x))^-2, x) == :(-4*im*d^-1*(e*cos(c+d*x))^-9//2*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^2+10//3*a^-2*d^-1*(e*cos(c+d*x))^-9//2*cos(c+d*x)^3*sin(c+d*x)+10//3*a^-2*d^-1*(e*cos(c+d*x))^-9//2*cos(c+d*x)^9//2*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((e*cos(c+d*x))^-11//2*(a+im*a*tan(c+d*x))^-2, x) == :(-14//5*a^-2*d^-1*(e*cos(c+d*x))^-11//2*cos(c+d*x)^11//2*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-4//3*im*d^-1*(e*cos(c+d*x))^-11//2*(a^2+im*a^2*tan(c+d*x))^-1*cos(c+d*x)^2+14//5*a^-2*d^-1*(e*cos(c+d*x))^-11//2*cos(c+d*x)^5*sin(c+d*x)+14//15*a^-2*d^-1*(e*cos(c+d*x))^-11//2*cos(c+d*x)^3*sin(c+d*x))
@test integrate((e*cos(c+d*x))^7//2*(a+im*a*tan(c+d*x))^(1/2), x) == :(-2//7*im*d^-1*(e*cos(c+d*x))^7//2*(a+im*a*tan(c+d*x))^(1/2)+-16//35*im*d^-1*(e*cos(c+d*x))^7//2*(a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^2+12//35*im*a*d^-1*(e*cos(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^2+32//35*im*a*d^-1*(e*cos(c+d*x))^7//2*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^4)
@test integrate((e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^(1/2), x) == :(-2//5*im*d^-1*(e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^(1/2)+-16//15*im*d^-1*(e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^2+8//15*im*a*d^-1*(e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^2)
@test integrate((e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2), x) == :(-2*im*d^-1*(e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2))
@test integrate((e*cos(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2), x) == :(im*2^(1/2)*a^(1/2)*d^-1*e^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^-1//2*(e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2))+(1/2)*im*2^(1/2)*a^(1/2)*d^-1*e^-1//2*log(a*e^(1/2)+e^(1/2)*(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*(e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2))+-1*im*2^(1/2)*a^(1/2)*d^-1*e^-1//2*arctan(1+2^(1/2)*a^-1//2*e^-1//2*(e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2))+-1//2*im*2^(1/2)*a^(1/2)*d^-1*e^-1//2*log(a*e^(1/2)+e^(1/2)*(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*(e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*cos(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^(1/2), x) == :((1/2)*im*a*d^-1*(e*cos(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-1//2+-3//4*im*d^-1*(e*cos(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^2+-3//8*im*2^(1/2)*a^(1/2)*d^-1*e^5//2*(e*cos(c+d*x))^-5//2*(e*sec(c+d*x))^-5//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-3//16*im*2^(1/2)*a^(1/2)*d^-1*e^5//2*(e*cos(c+d*x))^-5//2*(e*sec(c+d*x))^-5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+3//8*im*2^(1/2)*a^(1/2)*d^-1*e^5//2*(e*cos(c+d*x))^-5//2*(e*sec(c+d*x))^-5//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+3//16*im*2^(1/2)*a^(1/2)*d^-1*e^5//2*(e*cos(c+d*x))^-5//2*(e*sec(c+d*x))^-5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*cos(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^(1/2), x) == :(-5//12*im*d^-1*(e*cos(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^2+1//3*im*a*d^-1*(e*cos(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2+5//8*im*a*d^-1*(e*cos(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^2+-5//16*im*2^(1/2)*a^3//2*d^-1*e^7//2*(e*cos(c+d*x))^-7//2*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-5//32*im*2^(1/2)*a^3//2*d^-1*e^7//2*(e*cos(c+d*x))^-7//2*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+5//16*im*2^(1/2)*a^3//2*d^-1*e^7//2*(e*cos(c+d*x))^-7//2*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+5//32*im*2^(1/2)*a^3//2*d^-1*e^7//2*(e*cos(c+d*x))^-7//2*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(2//7*im*d^-1*(e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-1//2+-12//35*im*a^-1*d^-1*(e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^(1/2)+16//35*im*d^-1*(e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^2+-32//35*im*a^-1*d^-1*(e*cos(c+d*x))^5//2*(a+im*a*tan(c+d*x))^(1/2)*sec(c+d*x)^2)
@test integrate((e*cos(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(2//5*im*d^-1*(e*cos(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-1//2+-8//15*im*a^-1*d^-1*(e*cos(c+d*x))^3//2*(a+im*a*tan(c+d*x))^(1/2)+16//15*im*d^-1*(e*cos(c+d*x))^3//2*(a+im*a*tan(c+d*x))^-1//2*sec(c+d*x)^2)
@test integrate((e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2, x) == :(2//3*im*d^-1*(e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^-1//2+-4//3*im*a^-1*d^-1*(e*cos(c+d*x))^(1/2)*(a+im*a*tan(c+d*x))^(1/2))
@test integrate((e*cos(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(2*im*d^-1*(e*cos(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^-1//2)
@test integrate((e*cos(c+d*x))^-3//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(im*2^(1/2)*a^(1/2)*d^-1*e^-3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^-1//2*(e*cos(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+(1/2)*im*2^(1/2)*a^(1/2)*d^-1*e^-3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a*e^(1/2)+e^(1/2)*(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*(e*cos(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1*im*2^(1/2)*a^(1/2)*d^-1*e^-3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^-1//2*(e*cos(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-1//2*im*2^(1/2)*a^(1/2)*d^-1*e^-3//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a*e^(1/2)+e^(1/2)*(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*(e*cos(c+d*x))^(1/2)*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))
@test integrate((e*cos(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(-1*im*a^-1*d^-1*(e*cos(c+d*x))^-5//2*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^2+(1/2)*im*2^(1/2)*a^-1//2*d^-1*e^5//2*(e*cos(c+d*x))^-5//2*(e*sec(c+d*x))^-5//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//2*im*2^(1/2)*a^-1//2*d^-1*e^5//2*(e*cos(c+d*x))^-5//2*(e*sec(c+d*x))^-5//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+-1//4*im*2^(1/2)*a^-1//2*d^-1*e^5//2*(e*cos(c+d*x))^-5//2*(e*sec(c+d*x))^-5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2))+1//4*im*2^(1/2)*a^-1//2*d^-1*e^5//2*(e*cos(c+d*x))^-5//2*(e*sec(c+d*x))^-5//2*log(a+(a+im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+im*a*tan(c+d*x))^(1/2)))
@test integrate((e*cos(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2, x) == :(3//4*im*d^-1*(e*cos(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*cos(c+d*x)^2+-1//2*im*a^-1*d^-1*(e*cos(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^(1/2)*cos(c+d*x)^2+-3//8*im*2^(1/2)*a^(1/2)*d^-1*e^7//2*(e*cos(c+d*x))^-7//2*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+-1*2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+-3//16*im*2^(1/2)*a^(1/2)*d^-1*e^7//2*(e*cos(c+d*x))^-7//2*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+3//8*im*2^(1/2)*a^(1/2)*d^-1*e^7//2*(e*cos(c+d*x))^-7//2*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*arctan(1+2^(1/2)*a^-1//2*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x)+3//16*im*2^(1/2)*a^(1/2)*d^-1*e^7//2*(e*cos(c+d*x))^-7//2*(e*sec(c+d*x))^-7//2*(a+im*a*tan(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^-1//2*log(a+(a+-1*im*a*tan(c+d*x))*cos(c+d*x)+-1*2^(1/2)*a^(1/2)*e^(1/2)*(e*sec(c+d*x))^-1//2*(a+-1*im*a*tan(c+d*x))^(1/2))*sec(c+d*x))

max_stars_repo_path: test/4 Trig functions/4.3 Tangent/4.3.1.2 (d sec)^m (a+b tan)^n.jl