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

@test integrate(cos(c+d*x)^2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(1//8*a*x*(3C+4A)+-1//15*a*d^-1*sin(c+d*x)^3*(4C+5A)+1//5*a*d^-1*(4C+5A)*sin(c+d*x)+1//4*C*a*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//5*C*a*d^-1*cos(c+d*x)^4*sin(c+d*x)+1//8*a*d^-1*(3C+4A)*cos(c+d*x)*sin(c+d*x))
@test integrate((A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x))*cos(c+d*x), x) == :(1//8*a*x*(3C+4A)+1//3*a*d^-1*(2C+3A)*sin(c+d*x)+1//3*C*a*d^-1*cos(c+d*x)^2*sin(c+d*x)+1//4*C*a*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//8*a*d^-1*(3C+4A)*cos(c+d*x)*sin(c+d*x))
@test integrate((A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :((1/2)*a*x*(C+2A)+1//3*a*d^-1*(C+3A)*sin(c+d*x)+-1//6*C*a*d^-1*cos(c+d*x)*sin(c+d*x)+1//3*C*a^-1*d^-1*(a+a*cos(c+d*x))^2*sin(c+d*x))
@test integrate((A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x))*sec(c+d*x), x) == :((1/2)*a*x*(C+2A)+A*a*d^-1*arctanh(sin(c+d*x))+C*a*d^-1*sin(c+d*x)+(1/2)*C*a*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(sec(c+d*x)^2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(C*a*x+A*a*d^-1*arctanh(sin(c+d*x))+A*a*d^-1*tan(c+d*x)+C*a*d^-1*sin(c+d*x))
@test integrate(sec(c+d*x)^3*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(C*a*x+A*a*d^-1*tan(c+d*x)+(1/2)*a*d^-1*(A+2C)*arctanh(sin(c+d*x))+(1/2)*A*a*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^4*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :((1/2)*a*d^-1*(A+2C)*arctanh(sin(c+d*x))+1//3*a*d^-1*(2A+3C)*tan(c+d*x)+(1/2)*A*a*d^-1*sec(c+d*x)*tan(c+d*x)+1//3*A*a*d^-1*sec(c+d*x)^2*tan(c+d*x))
@test integrate(sec(c+d*x)^5*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(1//3*a*d^-1*(2A+3C)*tan(c+d*x)+1//8*a*d^-1*(3A+4C)*arctanh(sin(c+d*x))+1//3*A*a*d^-1*sec(c+d*x)^2*tan(c+d*x)+1//4*A*a*d^-1*sec(c+d*x)^3*tan(c+d*x)+1//8*a*d^-1*(3A+4C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(1//16*x*a^2*(11C+14A)+-2//15*a^2*d^-1*sin(c+d*x)^3*(4C+5A)+2//5*a^2*d^-1*(4C+5A)*sin(c+d*x)+1//6*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^3*sin(c+d*x)+1//15*C*d^-1*cos(c+d*x)^3*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+1//16*a^2*d^-1*(11C+14A)*cos(c+d*x)*sin(c+d*x)+1//40*a^2*d^-1*cos(c+d*x)^3*(9C+10A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//4*x*a^2*(3C+4A)+1//3*a^2*d^-1*(3C+4A)*sin(c+d*x)+1//30*d^-1*(a+a*cos(c+d*x))^2*(3C+10A)*sin(c+d*x)+1//5*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^2*sin(c+d*x)+1//10*C*a^-1*d^-1*(a+a*cos(c+d*x))^3*sin(c+d*x)+1//12*a^2*d^-1*(3C+4A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*(A+C*cos(c+d*x)^2), x) == :(1//8*x*a^2*(7C+12A)+-1//12*C*d^-1*(a+a*cos(c+d*x))^2*sin(c+d*x)+1//6*a^2*d^-1*(7C+12A)*sin(c+d*x)+1//4*C*a^-1*d^-1*(a+a*cos(c+d*x))^3*sin(c+d*x)+1//24*a^2*d^-1*(7C+12A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(x*a^2*(C+2A)+A*a^2*d^-1*arctanh(sin(c+d*x))+a^2*d^-1*(A+C)*sin(c+d*x)+1//3*C*d^-1*(a+a*cos(c+d*x))^2*sin(c+d*x)+1//3*C*d^-1*(a^2+a^2*cos(c+d*x))*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*a^2*(2A+3C)+A*d^-1*(a+a*cos(c+d*x))^2*tan(c+d*x)+2*A*a^2*d^-1*arctanh(sin(c+d*x))+-1//2*a^2*d^-1*(-3C+2A)*sin(c+d*x)+-1//2*d^-1*(a^2+a^2*cos(c+d*x))*(-1C+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(2*C*x*a^2+A*d^-1*(a^2+a^2*cos(c+d*x))*tan(c+d*x)+(1/2)*a^2*d^-1*(2C+3A)*arctanh(sin(c+d*x))+-1//2*a^2*d^-1*(-2C+3A)*sin(c+d*x)+(1/2)*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(C*x*a^2+a^2*d^-1*(A+C)*tan(c+d*x)+a^2*d^-1*(A+2C)*arctanh(sin(c+d*x))+1//3*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^2*tan(c+d*x)+1//3*A*d^-1*(a^2+a^2*cos(c+d*x))*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(1//8*a^2*d^-1*(7A+12C)*arctanh(sin(c+d*x))+2//3*a^2*d^-1*(2A+3C)*tan(c+d*x)+1//4*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^3*tan(c+d*x)+1//6*A*d^-1*sec(c+d*x)^2*(a^2+a^2*cos(c+d*x))*tan(c+d*x)+1//24*a^2*d^-1*(11A+12C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^6*(A+C*cos(c+d*x)^2), x) == :(1//4*a^2*d^-1*(3A+4C)*arctanh(sin(c+d*x))+1//15*a^2*d^-1*(18A+25C)*tan(c+d*x)+1//4*a^2*d^-1*(3A+4C)*sec(c+d*x)*tan(c+d*x)+1//5*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^4*tan(c+d*x)+1//10*A*d^-1*sec(c+d*x)^3*(a^2+a^2*cos(c+d*x))*tan(c+d*x)+1//30*a^2*d^-1*sec(c+d*x)^2*(9A+10C)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(1//16*x*a^3*(21C+26A)+-1//105*a^3*d^-1*sin(c+d*x)^3*(108C+133A)+1//35*a^3*d^-1*(108C+133A)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^3*(A+C)*(a^3+a^3*cos(c+d*x))*sin(c+d*x)+1//7*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^3*sin(c+d*x)+1//16*a^3*d^-1*(21C+26A)*cos(c+d*x)*sin(c+d*x)+1//280*a^3*d^-1*cos(c+d*x)^3*(129C+154A)*sin(c+d*x)+1//14*C*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//16*x*a^3*(23C+30A)+-1//120*a^3*d^-1*sin(c+d*x)^3*(23C+30A)+1//10*a^3*d^-1*(23C+30A)*sin(c+d*x)+1//120*d^-1*(a+a*cos(c+d*x))^3*(7C+30A)*sin(c+d*x)+1//6*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^2*sin(c+d*x)+1//10*C*a^-1*d^-1*(a+a*cos(c+d*x))^4*sin(c+d*x)+3//80*a^3*d^-1*(23C+30A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*(A+C*cos(c+d*x)^2), x) == :(1//8*x*a^3*(13C+20A)+-1//20*C*d^-1*(a+a*cos(c+d*x))^3*sin(c+d*x)+-1//60*a^3*d^-1*sin(c+d*x)^3*(13C+20A)+1//5*a^3*d^-1*(13C+20A)*sin(c+d*x)+1//5*C*a^-1*d^-1*(a+a*cos(c+d*x))^4*sin(c+d*x)+3//40*a^3*d^-1*(13C+20A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//8*x*a^3*(15C+28A)+A*a^3*d^-1*arctanh(sin(c+d*x))+1//4*C*d^-1*(a+a*cos(c+d*x))^3*sin(c+d*x)+1//8*d^-1*(a^3+a^3*cos(c+d*x))*(4A+5C)*sin(c+d*x)+5//8*a^3*d^-1*(3C+4A)*sin(c+d*x)+1//4*C*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*a^3*(5C+6A)+A*d^-1*(a+a*cos(c+d*x))^3*tan(c+d*x)+3*A*a^3*d^-1*arctanh(sin(c+d*x))+-1//6*d^-1*(a^3+a^3*cos(c+d*x))*(-5C+6A)*sin(c+d*x)+5//2*C*a^3*d^-1*sin(c+d*x)+-1//3*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*(-1C+3A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*a^3*(2A+7C)+(1/2)*a^3*d^-1*(2C+7A)*arctanh(sin(c+d*x))+-5//2*a^3*d^-1*(A+-1C)*sin(c+d*x)+-1//2*d^-1*(a^3+a^3*cos(c+d*x))*(-1C+4A)*sin(c+d*x)+(1/2)*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)*tan(c+d*x)+3//2*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(3*C*x*a^3+(1/2)*a^3*d^-1*(5A+6C)*arctanh(sin(c+d*x))+-5//2*A*a^3*d^-1*sin(c+d*x)+1//3*d^-1*(a^3+a^3*cos(c+d*x))*(3C+5A)*tan(c+d*x)+1//3*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^2*tan(c+d*x)+(1/2)*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(C*x*a^3+1//8*a^3*d^-1*(15A+28C)*arctanh(sin(c+d*x))+5//8*a^3*d^-1*(3A+4C)*tan(c+d*x)+1//4*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^3*tan(c+d*x)+1//8*d^-1*(a^3+a^3*cos(c+d*x))*(4C+5A)*sec(c+d*x)*tan(c+d*x)+1//4*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^6*(A+C*cos(c+d*x)^2), x) == :(1//8*a^3*d^-1*(13A+20C)*arctanh(sin(c+d*x))+1//15*a^3*d^-1*(38A+55C)*tan(c+d*x)+1//5*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^4*tan(c+d*x)+1//30*d^-1*sec(c+d*x)^2*(a^3+a^3*cos(c+d*x))*(10C+11A)*tan(c+d*x)+1//120*a^3*d^-1*(109A+140C)*sec(c+d*x)*tan(c+d*x)+3//20*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^7*(A+C*cos(c+d*x)^2), x) == :(1//15*a^3*d^-1*(34A+45C)*tan(c+d*x)+1//16*a^3*d^-1*(23A+30C)*arctanh(sin(c+d*x))+1//6*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^5*tan(c+d*x)+1//16*a^3*d^-1*(23A+30C)*sec(c+d*x)*tan(c+d*x)+1//120*a^3*d^-1*sec(c+d*x)^2*(73A+90C)*tan(c+d*x)+1//120*d^-1*sec(c+d*x)^3*(a^3+a^3*cos(c+d*x))*(30C+31A)*tan(c+d*x)+1//10*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^4*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(1//128*x*a^4*(323C+392A)+-4//105*a^4*d^-1*sin(c+d*x)^3*(52C+63A)+4//35*a^4*d^-1*(52C+63A)*sin(c+d*x)+1//8*C*d^-1*(a+a*cos(c+d*x))^4*cos(c+d*x)^3*sin(c+d*x)+1//120*d^-1*cos(c+d*x)^3*(a^4+a^4*cos(c+d*x))*(49C+56A)*sin(c+d*x)+1//128*a^4*d^-1*(323C+392A)*cos(c+d*x)*sin(c+d*x)+1//336*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^3*(56A+61C)*sin(c+d*x)+1//2240*a^4*d^-1*cos(c+d*x)^3*(2007C+2408A)*sin(c+d*x)+1//14*C*a*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//4*x*a^4*(11C+14A)+-8//105*a^4*d^-1*sin(c+d*x)^3*(11C+14A)+1//105*d^-1*(a+a*cos(c+d*x))^4*(4C+21A)*sin(c+d*x)+16//35*a^4*d^-1*(11C+14A)*sin(c+d*x)+1//7*C*d^-1*(a+a*cos(c+d*x))^4*cos(c+d*x)^2*sin(c+d*x)+1//70*a^4*d^-1*cos(c+d*x)^3*(11C+14A)*sin(c+d*x)+2//21*C*a^-1*d^-1*(a+a*cos(c+d*x))^5*sin(c+d*x)+27//140*a^4*d^-1*(11C+14A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*(A+C*cos(c+d*x)^2), x) == :(7//16*x*a^4*(7C+10A)+-2//15*a^4*d^-1*sin(c+d*x)^3*(7C+10A)+-1//30*C*d^-1*(a+a*cos(c+d*x))^4*sin(c+d*x)+4//5*a^4*d^-1*(7C+10A)*sin(c+d*x)+1//6*C*a^-1*d^-1*(a+a*cos(c+d*x))^5*sin(c+d*x)+1//40*a^4*d^-1*cos(c+d*x)^3*(7C+10A)*sin(c+d*x)+27//80*a^4*d^-1*(7C+10A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :((1/2)*x*a^4*(7C+12A)+A*a^4*d^-1*arctanh(sin(c+d*x))+(1/2)*a^4*d^-1*(7C+10A)*sin(c+d*x)+1//5*C*d^-1*(a+a*cos(c+d*x))^4*sin(c+d*x)+1//6*d^-1*(a^4+a^4*cos(c+d*x))*(7C+8A)*sin(c+d*x)+1//15*d^-1*(a^2+a^2*cos(c+d*x))^2*(5A+7C)*sin(c+d*x)+1//5*C*a*d^-1*(a+a*cos(c+d*x))^3*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(1//8*x*a^4*(35C+52A)+A*d^-1*(a+a*cos(c+d*x))^4*tan(c+d*x)+4*A*a^4*d^-1*arctanh(sin(c+d*x))+-1//12*d^-1*(a^2+a^2*cos(c+d*x))^2*(-7C+12A)*sin(c+d*x)+-1//24*d^-1*(a^4+a^4*cos(c+d*x))*(-35C+12A)*sin(c+d*x)+5//8*a^4*d^-1*(4A+7C)*sin(c+d*x)+-1//4*a*d^-1*(a+a*cos(c+d*x))^3*(-1C+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(2*x*a^4*(2A+3C)+(1/2)*a^4*d^-1*(2C+13A)*arctanh(sin(c+d*x))+-5//2*a^4*d^-1*(A+-2C)*sin(c+d*x)+-1//3*d^-1*(a^4+a^4*cos(c+d*x))*(-4C+9A)*sin(c+d*x)+-1//6*d^-1*(a^2+a^2*cos(c+d*x))^2*(-2C+15A)*sin(c+d*x)+(1/2)*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)*tan(c+d*x)+2*A*a*d^-1*(a+a*cos(c+d*x))^3*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*a^4*(2A+13C)+2*a^4*d^-1*(2C+3A)*arctanh(sin(c+d*x))+-5//2*a^4*d^-1*(-1C+2A)*sin(c+d*x)+-1//6*d^-1*(a^4+a^4*cos(c+d*x))*(3C+22A)*sin(c+d*x)+1//3*d^-1*(a^2+a^2*cos(c+d*x))^2*(3C+8A)*tan(c+d*x)+1//3*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^2*tan(c+d*x)+2//3*A*a*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(4*C*x*a^4+-5//8*a^4*d^-1*(4C+7A)*sin(c+d*x)+1//8*a^4*d^-1*(35A+52C)*arctanh(sin(c+d*x))+1//12*d^-1*(a^4+a^4*cos(c+d*x))*(35A+36C)*tan(c+d*x)+1//4*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^3*tan(c+d*x)+1//8*d^-1*(a^2+a^2*cos(c+d*x))^2*(4C+7A)*sec(c+d*x)*tan(c+d*x)+1//3*A*a*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^6*(A+C*cos(c+d*x)^2), x) == :(C*x*a^4+(1/2)*a^4*d^-1*(7A+10C)*tan(c+d*x)+(1/2)*a^4*d^-1*(7A+12C)*arctanh(sin(c+d*x))+1//5*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^4*tan(c+d*x)+1//6*d^-1*(a^4+a^4*cos(c+d*x))*(7A+8C)*sec(c+d*x)*tan(c+d*x)+1//15*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^2*(5C+7A)*tan(c+d*x)+1//5*A*a*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^7*(A+C*cos(c+d*x)^2), x) == :(4//15*a^4*d^-1*(18A+25C)*tan(c+d*x)+7//16*a^4*d^-1*(7A+10C)*arctanh(sin(c+d*x))+1//6*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^5*tan(c+d*x)+1//60*d^-1*sec(c+d*x)^2*(a^4+a^4*cos(c+d*x))*(43A+50C)*tan(c+d*x)+1//120*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^3*(30C+37A)*tan(c+d*x)+1//240*a^4*d^-1*(417A+550C)*sec(c+d*x)*tan(c+d*x)+2//15*A*a*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^4*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^8*(A+C*cos(c+d*x)^2), x) == :(1//4*a^4*d^-1*(11A+14C)*arctanh(sin(c+d*x))+1//105*a^4*d^-1*(454A+581C)*tan(c+d*x)+1//4*a^4*d^-1*(11A+14C)*sec(c+d*x)*tan(c+d*x)+1//7*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^6*tan(c+d*x)+1//35*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^4*(7C+8A)*tan(c+d*x)+1//210*a^4*d^-1*sec(c+d*x)^2*(247A+308C)*tan(c+d*x)+1//210*d^-1*sec(c+d*x)^3*(a^4+a^4*cos(c+d*x))*(109A+126C)*tan(c+d*x)+2//21*A*a*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^5*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(1//8*x*a^-1*(12A+15C)+-1*a^-1*d^-1*(3A+4C)*sin(c+d*x)+1//3*a^-1*d^-1*sin(c+d*x)^3*(3A+4C)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^4*(A+C)*sin(c+d*x)+1//4*a^-1*d^-1*cos(c+d*x)^3*(4A+5C)*sin(c+d*x)+1//8*a^-1*d^-1*(12A+15C)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1//2*x*a^-1*(2A+3C)+a^-1*d^-1*(3A+4C)*sin(c+d*x)+-1//3*a^-1*d^-1*sin(c+d*x)^3*(3A+4C)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^3*(A+C)*sin(c+d*x)+-1//2*a^-1*d^-1*(2A+3C)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :((1/2)*x*a^-1*(2A+3C)+-1*a^-1*d^-1*(A+2C)*sin(c+d*x)+(1/2)*a^-1*d^-1*(2A+3C)*cos(c+d*x)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^2*(A+C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*(A+C*cos(c+d*x)^2), x) == :(-1*C*x*a^-1+C*a^-1*d^-1*sin(c+d*x)+a^-1*d^-1*(1+cos(c+d*x))^-1*(A+C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(C*x*a^-1+A*a^-1*d^-1*arctanh(sin(c+d*x))+-1*d^-1*(a+a*cos(c+d*x))^-1*(A+C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(C+2A)*tan(c+d*x)+-1*A*a^-1*d^-1*arctanh(sin(c+d*x))+-1*d^-1*(a+a*cos(c+d*x))^-1*(A+C)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-1*d^-1*(2C+3A)*arctanh(sin(c+d*x))+-1*a^-1*d^-1*(C+2A)*tan(c+d*x)+(1/2)*a^-1*d^-1*(2C+3A)*sec(c+d*x)*tan(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*(A+C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(3C+4A)*tan(c+d*x)+-1//2*a^-1*d^-1*(2C+3A)*arctanh(sin(c+d*x))+1//3*a^-1*d^-1*tan(c+d*x)^3*(3C+4A)+-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^2*(A+C)*tan(c+d*x)+-1//2*a^-1*d^-1*(2C+3A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(1//8*x*a^-2*(28A+55C)+-1*a^-2*d^-1*(8A+16C)*sin(c+d*x)+1//3*a^-2*d^-1*sin(c+d*x)^3*(8A+16C)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^5*(A+C)*sin(c+d*x)+1//8*a^-2*d^-1*(28A+55C)*cos(c+d*x)*sin(c+d*x)+1//12*a^-2*d^-1*cos(c+d*x)^3*(28A+55C)*sin(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^4*(2A+4C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-1*x*a^-2*(2A+5C)+a^-2*d^-1*(5A+12C)*sin(c+d*x)+-1//3*a^-2*d^-1*sin(c+d*x)^3*(5A+12C)+-1*a^-2*d^-1*(2A+5C)*cos(c+d*x)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^4*(A+C)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^3*(4A+10C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*a^-2*(2A+7C)+-1//3*a^-2*d^-1*(4A+16C)*sin(c+d*x)+(1/2)*a^-2*d^-1*(2A+7C)*cos(c+d*x)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3*(A+C)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^2*(2A+8C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-2*C*x*a^-2+1//3*a^-2*d^-1*(A+4C)*sin(c+d*x)+2*C*a^-2*d^-1*(1+cos(c+d*x))^-1*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^2*(A+C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*(A+C*cos(c+d*x)^2), x) == :(C*x*a^-2+1//3*d^-1*(a+a*cos(c+d*x))^-2*(A+C)*sin(c+d*x)+1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*(A+-5C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-2*d^-1*arctanh(sin(c+d*x))+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(A+C)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*(-2C+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-2*A*a^-2*d^-1*arctanh(sin(c+d*x))+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(A+C)*tan(c+d*x)+1//3*a^-2*d^-1*(C+10A)*tan(c+d*x)+-2*A*a^-2*d^-1*(1+cos(c+d*x))^-1*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-2*d^-1*(2C+7A)*arctanh(sin(c+d*x))+-1//3*a^-2*d^-1*(4C+16A)*tan(c+d*x)+(1/2)*a^-2*d^-1*(2C+7A)*sec(c+d*x)*tan(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(A+C)*sec(c+d*x)*tan(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*(2C+8A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(a^-2*d^-1*(5C+12A)*tan(c+d*x)+-1*a^-2*d^-1*(2C+5A)*arctanh(sin(c+d*x))+1//3*a^-2*d^-1*tan(c+d*x)^3*(5C+12A)+-1*a^-2*d^-1*(2C+5A)*sec(c+d*x)*tan(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^2*(A+C)*tan(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^2*(4C+10A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(-1//2*x*a^-3*(6A+23C)+-1//15*a^-3*d^-1*sin(c+d*x)^3*(36A+136C)+1//5*a^-3*d^-1*(36A+136C)*sin(c+d*x)+-1//2*a^-3*d^-1*(6A+23C)*cos(c+d*x)*sin(c+d*x)+-1//3*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^3*(6A+23C)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^5*(A+C)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^4*(3A+13C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*a^-3*(2A+13C)+-1//15*a^-3*d^-1*(22A+152C)*sin(c+d*x)+(1/2)*a^-3*d^-1*(2A+13C)*cos(c+d*x)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^4*(A+C)*sin(c+d*x)+-1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^2*(11A+76C)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3*(A+11C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-3*C*x*a^-3+3*C*d^-1*(a^3+a^3*cos(c+d*x))^-1*sin(c+d*x)+1//15*a^-3*d^-1*(2A+27C)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^3*(A+C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^2*(A+-9C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(C*x*a^-3+1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-29C+6A)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^2*(A+C)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-7C+3A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*(A+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(a+a*cos(c+d*x))^-3*(A+C)*sin(c+d*x)+1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(2A+7C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-8C+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-3*d^-1*arctanh(sin(c+d*x))+-1//5*d^-1*(a+a*cos(c+d*x))^-3*(A+C)*sin(c+d*x)+-1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-3C+22A)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-3C+7A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-3*A*a^-3*d^-1*arctanh(sin(c+d*x))+-3*A*d^-1*(a^3+a^3*cos(c+d*x))^-1*tan(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*(A+C)*tan(c+d*x)+1//15*a^-3*d^-1*(2C+72A)*tan(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-1C+9A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*(2C+13A)*arctanh(sin(c+d*x))+-1//15*a^-3*d^-1*(22C+152A)*tan(c+d*x)+(1/2)*a^-3*d^-1*(2C+13A)*sec(c+d*x)*tan(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*(A+C)*sec(c+d*x)*tan(c+d*x)+-1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(11C+76A)*sec(c+d*x)*tan(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(C+11A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(-1//2*a^-3*d^-1*(6C+23A)*arctanh(sin(c+d*x))+1//5*a^-3*d^-1*(36C+136A)*tan(c+d*x)+1//15*a^-3*d^-1*tan(c+d*x)^3*(36C+136A)+-1//2*a^-3*d^-1*(6C+23A)*sec(c+d*x)*tan(c+d*x)+-1//3*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^2*(6C+23A)*tan(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^2*(A+C)*tan(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^2*(3C+13A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*cos(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*a^-4*(2A+21C)+-1//105*a^-4*d^-1*(160A+1728C)*sin(c+d*x)+(1/2)*a^-4*d^-1*(2A+21C)*cos(c+d*x)*sin(c+d*x)+-1//7*d^-1*(a+a*cos(c+d*x))^-4*cos(c+d*x)^5*(A+C)*sin(c+d*x)+-2//5*C*a^-1*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^4*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^2*(80A+864C)*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*cos(c+d*x)^3*(10A+129C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-4*C*x*a^-4+1//105*a^-4*d^-1*(6A+244C)*sin(c+d*x)+4*C*a^-4*d^-1*(1+cos(c+d*x))^-1*sin(c+d*x)+-1//7*d^-1*(a+a*cos(c+d*x))^-4*cos(c+d*x)^4*(A+C)*sin(c+d*x)+1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^3*(-12C+2A)*sin(c+d*x)+1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*cos(c+d*x)^2*(-88C+3A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(C*x*a^-4+-1//7*d^-1*(a+a*cos(c+d*x))^-4*cos(c+d*x)^3*(A+C)*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(-55C+8A)*sin(c+d*x)+1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*(-215C+16A)*sin(c+d*x)+1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^2*(-10C+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//7*d^-1*(a+a*cos(c+d*x))^-4*cos(c+d*x)^2*(A+C)*sin(c+d*x)+-1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*(-8C+6A)*sin(c+d*x)+1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*(8A+36C)*sin(c+d*x)+1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(-54C+23A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*(A+C*cos(c+d*x)^2), x) == :(1//7*d^-1*(a+a*cos(c+d*x))^-4*(A+C)*sin(c+d*x)+1//105*d^-1*(a^2+a^2*cos(c+d*x))^-2*(6A+13C)*sin(c+d*x)+1//105*d^-1*(a^4+a^4*cos(c+d*x))^-1*(6A+13C)*sin(c+d*x)+1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*(-11C+3A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-4*d^-1*arctanh(sin(c+d*x))+-1//7*d^-1*(a+a*cos(c+d*x))^-4*(A+C)*sin(c+d*x)+-1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*(-4C+10A)*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*(-8C+160A)*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(-8C+55A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-4*A*a^-4*d^-1*arctanh(sin(c+d*x))+-1//7*d^-1*(a+a*cos(c+d*x))^-4*(A+C)*tan(c+d*x)+1//105*a^-4*d^-1*(6C+664A)*tan(c+d*x)+-4*A*a^-4*d^-1*(1+cos(c+d*x))^-1*tan(c+d*x)+-1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*(-2C+12A)*tan(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(-3C+88A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-4*d^-1*(2C+21A)*arctanh(sin(c+d*x))+-1//105*a^-4*d^-1*(160C+1728A)*tan(c+d*x)+(1/2)*a^-4*d^-1*(2C+21A)*sec(c+d*x)*tan(c+d*x)+-1//7*d^-1*(a+a*cos(c+d*x))^-4*(A+C)*sec(c+d*x)*tan(c+d*x)+-2//5*A*a^-1*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)*tan(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*(80C+864A)*sec(c+d*x)*tan(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(10C+129A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(-1*a^-4*d^-1*(4C+22A)*arctanh(sin(c+d*x))+1//35*a^-4*d^-1*(332C+1816A)*tan(c+d*x)+1//105*a^-4*d^-1*tan(c+d*x)^3*(332C+1816A)+-1*a^-4*d^-1*(4C+22A)*sec(c+d*x)*tan(c+d*x)+-1//7*d^-1*(a+a*cos(c+d*x))^-4*sec(c+d*x)^2*(A+C)*tan(c+d*x)+-1//3*a^-4*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^2*(8C+44A)*tan(c+d*x)+-1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^2*(2C+16A)*tan(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*sec(c+d*x)^2*(31C+178A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-1//3465*d^-1*(a+a*cos(c+d*x))^(1/2)*(640C+792A)*sin(c+d*x)+1//1155*a^-1*d^-1*(a+a*cos(c+d*x))^3//2*(320C+396A)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^4*sin(c+d*x)+4//495*a*d^-1*(a+a*cos(c+d*x))^-1//2*(80C+99A)*sin(c+d*x)+2//99*C*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^4*sin(c+d*x)+2//693*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(80C+99A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1//315*d^-1*(a+a*cos(c+d*x))^(1/2)*(64C+84A)*sin(c+d*x)+1//105*a^-1*d^-1*(a+a*cos(c+d*x))^3//2*(32C+42A)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3*sin(c+d*x)+2//45*a*d^-1*(a+a*cos(c+d*x))^-1//2*(16C+21A)*sin(c+d*x)+2//63*C*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//105*d^-1*(a+a*cos(c+d*x))^(1/2)*(36C+70A)*sin(c+d*x)+2//7*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^2*sin(c+d*x)+2//35*C*a^-1*d^-1*(a+a*cos(c+d*x))^3//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*(27C+35A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*(A+C*cos(c+d*x)^2), x) == :(-4//15*C*d^-1*(a+a*cos(c+d*x))^(1/2)*sin(c+d*x)+2//5*C*a^-1*d^-1*(a+a*cos(c+d*x))^3//2*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^-1//2*(7C+15A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^(1/2)*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*C*d^-1*(a+a*cos(c+d*x))^(1/2)*sin(c+d*x)+2//3*C*a*d^-1*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(A*a^(1/2)*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+A*d^-1*(a+a*cos(c+d*x))^(1/2)*tan(c+d*x)+-1*a*d^-1*(a+a*cos(c+d*x))^-1//2*(A+-2C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(1//4*a^(1/2)*d^-1*(3A+8C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)*tan(c+d*x)+1//4*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(1//8*a^(1/2)*d^-1*(5A+8C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//3*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^2*tan(c+d*x)+1//8*a*d^-1*(a+a*cos(c+d*x))^-1//2*(5A+8C)*tan(c+d*x)+1//12*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(1//64*a^(1/2)*d^-1*(35A+48C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3*tan(c+d*x)+1//64*a*d^-1*(a+a*cos(c+d*x))^-1//2*(35A+48C)*tan(c+d*x)+1//24*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*tan(c+d*x)+1//96*a*d^-1*(a+a*cos(c+d*x))^-1//2*(35A+48C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(1//385*d^-1*(a+a*cos(c+d*x))^3//2*(224C+286A)*sin(c+d*x)+-4//1155*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(112C+143A)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^3*sin(c+d*x)+2//165*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(112C+143A)*sin(c+d*x)+2//33*C*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3*sin(c+d*x)+2//231*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(28C+33A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//315*d^-1*(a+a*cos(c+d*x))^3//2*(44C+126A)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^2*sin(c+d*x)+2//21*C*a^-1*d^-1*(a+a*cos(c+d*x))^5//2*sin(c+d*x)+2//315*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(47C+63A)*sin(c+d*x)+8//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(47C+63A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*(A+C*cos(c+d*x)^2), x) == :(-4//35*C*d^-1*(a+a*cos(c+d*x))^3//2*sin(c+d*x)+2//7*C*a^-1*d^-1*(a+a*cos(c+d*x))^5//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(19C+35A)*sin(c+d*x)+8//105*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(19C+35A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^3//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//5*C*d^-1*(a+a*cos(c+d*x))^3//2*sin(c+d*x)+2//5*C*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sin(c+d*x)+2//5*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(4C+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(A*d^-1*(a+a*cos(c+d*x))^3//2*tan(c+d*x)+3*A*a^3//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//3*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(-2C+3A)*sin(c+d*x)+-1//3*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(-8C+3A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(1//4*a^3//2*d^-1*(7A+8C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)*tan(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(-8C+5A)*sin(c+d*x)+3//4*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(1//8*a^3//2*d^-1*(11A+24C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//3*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^2*tan(c+d*x)+1//24*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(19A+24C)*tan(c+d*x)+1//4*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(1//64*a^3//2*d^-1*(75A+112C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^3*tan(c+d*x)+1//64*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(75A+112C)*tan(c+d*x)+1//8*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^2*tan(c+d*x)+1//32*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(13A+16C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^6*(A+C*cos(c+d*x)^2), x) == :(1//128*a^3//2*d^-1*(133A+176C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//5*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^4*tan(c+d*x)+1//128*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(133A+176C)*tan(c+d*x)+1//192*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(133A+176C)*sec(c+d*x)*tan(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(67A+80C)*tan(c+d*x)+3//40*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-4//45045*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(8368C+10439A)*sin(c+d*x)+2//13*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^3*sin(c+d*x)+2//6435*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(8368C+10439A)*sin(c+d*x)+2//15015*a*d^-1*(a+a*cos(c+d*x))^3//2*(8368C+10439A)*sin(c+d*x)+2//1287*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3*(136C+143A)*sin(c+d*x)+2//9009*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(2224C+2717A)*sin(c+d*x)+10//143*C*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//693*d^-1*(a+a*cos(c+d*x))^5//2*(52C+198A)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^2*sin(c+d*x)+2//231*a*d^-1*(a+a*cos(c+d*x))^3//2*(25C+33A)*sin(c+d*x)+10//99*C*a^-1*d^-1*(a+a*cos(c+d*x))^7//2*sin(c+d*x)+16//693*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(25C+33A)*sin(c+d*x)+64//693*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(25C+33A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*(A+C*cos(c+d*x)^2), x) == :(-4//63*C*d^-1*(a+a*cos(c+d*x))^5//2*sin(c+d*x)+2//9*C*a^-1*d^-1*(a+a*cos(c+d*x))^7//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^3//2*(13C+21A)*sin(c+d*x)+16//315*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(13C+21A)*sin(c+d*x)+64//315*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(13C+21A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^5//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//7*C*d^-1*(a+a*cos(c+d*x))^5//2*sin(c+d*x)+2//7*C*a*d^-1*(a+a*cos(c+d*x))^3//2*sin(c+d*x)+2//21*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(7A+8C)*sin(c+d*x)+2//21*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(32C+49A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(A*d^-1*(a+a*cos(c+d*x))^5//2*tan(c+d*x)+5*A*a^5//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//5*a*d^-1*(a+a*cos(c+d*x))^3//2*(-2C+5A)*sin(c+d*x)+-1//15*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(-16C+15A)*sin(c+d*x)+1//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(15A+64C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(1//4*a^5//2*d^-1*(8C+19A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)*tan(c+d*x)+-1//12*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(-8C+21A)*sin(c+d*x)+-1//12*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(-56C+27A)*sin(c+d*x)+5//4*A*a*d^-1*(a+a*cos(c+d*x))^3//2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(5//8*a^5//2*d^-1*(5A+8C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//24*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(-24C+49A)*sin(c+d*x)+1//3*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^2*tan(c+d*x)+1//24*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(24C+31A)*tan(c+d*x)+5//12*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(1//64*a^5//2*d^-1*(163A+304C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^3*tan(c+d*x)+1//192*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(299A+432C)*tan(c+d*x)+1//32*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(16C+17A)*sec(c+d*x)*tan(c+d*x)+5//24*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^6*(A+C*cos(c+d*x)^2), x) == :(1//128*a^5//2*d^-1*(283A+400C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//5*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^4*tan(c+d*x)+1//128*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(283A+400C)*tan(c+d*x)+1//8*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^3*tan(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^2*(79A+80C)*tan(c+d*x)+1//960*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(787A+1040C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^7*(A+C*cos(c+d*x)^2), x) == :(1//512*a^5//2*d^-1*(1015A+1304C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//6*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^5*tan(c+d*x)+1//512*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(1015A+1304C)*tan(c+d*x)+1//12*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^4*tan(c+d*x)+1//96*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3*(23A+24C)*tan(c+d*x)+1//192*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(109A+136C)*tan(c+d*x)+1//768*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(1015A+1304C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(1//315*d^-1*(a+a*cos(c+d*x))^-1//2*(572C+588A)*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-2//63*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*sin(c+d*x)+-1//315*a^-1*d^-1*(a+a*cos(c+d*x))^(1/2)*(42A+58C)*sin(c+d*x)+1//105*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(38C+42A)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^4*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1//105*d^-1*(a+a*cos(c+d*x))^-1//2*(140A+148C)*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*(A+C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-2//35*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*sin(c+d*x)+1//105*a^-1*d^-1*(a+a*cos(c+d*x))^(1/2)*(62C+70A)*sin(c+d*x)+2//7*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//15*d^-1*(a+a*cos(c+d*x))^-1//2*(28C+30A)*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-2//15*C*a^-1*d^-1*(a+a*cos(c+d*x))^(1/2)*sin(c+d*x)+2//5*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*(A+C*cos(c+d*x)^2), x) == :(-4//3*C*d^-1*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*(A+C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*C*a^-1*d^-1*(a+a*cos(c+d*x))^(1/2)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^-1//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2*C*d^-1*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(A*d^-1*(a+a*cos(c+d*x))^-1//2*tan(c+d*x)+-1*A*a^-1//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2^(1/2)*a^-1//2*d^-1*(A+C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-1//4*A*d^-1*(a+a*cos(c+d*x))^-1//2*tan(c+d*x)+1//4*a^-1//2*d^-1*(7A+8C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)*tan(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(-1//8*a^-1//2*d^-1*(8C+9A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//8*d^-1*(a+a*cos(c+d*x))^-1//2*(7A+8C)*tan(c+d*x)+2^(1/2)*a^-1//2*d^-1*(A+C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//12*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)*tan(c+d*x)+1//3*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(-1//64*d^-1*(a+a*cos(c+d*x))^-1//2*(16C+21A)*tan(c+d*x)+1//64*a^-1//2*d^-1*(107A+112C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*2^(1/2)*a^-1//2*d^-1*(A+C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//24*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*tan(c+d*x)+1//4*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3*tan(c+d*x)+1//96*d^-1*(a+a*cos(c+d*x))^-1//2*(43A+48C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^4*(A+C)*sin(c+d*x)+-1//105*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(455A+799C)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(11A+19C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//210*a^-2*d^-1*(a+a*cos(c+d*x))^(1/2)*(245A+397C)*sin(c+d*x)+-1//70*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(35A+67C)*sin(c+d*x)+1//14*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(7A+11C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3*(A+C)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(7A+15C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//10*a^-2*d^-1*(a+a*cos(c+d*x))^(1/2)*(5A+13C)*sin(c+d*x)+1//5*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(15A+31C)*sin(c+d*x)+1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(5A+9C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^2*(A+C)*sin(c+d*x)+-1//3*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(3A+13C)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(3A+11C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//6*a^-2*d^-1*(a+a*cos(c+d*x))^(1/2)*(3A+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*(A+C*cos(c+d*x)^2), x) == :((1/2)*d^-1*(a+a*cos(c+d*x))^-3//2*(A+C)*sin(c+d*x)+2*C*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(A+-7C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^-3//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*(A+C)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(-3C+5A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-3*A*a^-3//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*(A+C)*tan(c+d*x)+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(C+3A)*tan(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(C+9A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(1//4*a^-3//2*d^-1*(8C+19A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*(A+C)*sec(c+d*x)*tan(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(5C+13A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(2C+7A)*tan(c+d*x)+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(C+2A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(-1//8*a^-3//2*d^-1*(24C+47A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^2*(A+C)*tan(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(9C+17A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//8*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(12C+21A)*tan(c+d*x)+-1//12*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(6C+13A)*sec(c+d*x)*tan(c+d*x)+1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(3C+5A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^4*(A+C)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*(75A+283C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//240*a^-3*d^-1*(a+a*cos(c+d*x))^(1/2)*(195A+787C)*sin(c+d*x)+1//120*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(465A+1729C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3*(5A+21C)*sin(c+d*x)+1//80*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(45A+157C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^3*(A+C)*sin(c+d*x)+-1//24*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(21A+197C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(19A+163C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//48*a^-3*d^-1*(a+a*cos(c+d*x))^(1/2)*(15A+95C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^2*(A+17C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^2*(A+C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-13C+3A)*sin(c+d*x)+1//4*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(A+9C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(-75C+5A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*(A+C*cos(c+d*x)^2), x) == :(1//4*d^-1*(a+a*cos(c+d*x))^-5//2*(A+C)*sin(c+d*x)+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-13C+3A)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(3A+19C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^-5//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*(A+C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-5C+11A)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*(-5C+43A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-5*A*a^-5//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*(A+C)*tan(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-1C+15A)*tan(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(3C+35A)*tan(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(3C+115A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(1//4*a^-5//2*d^-1*(8C+39A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*(A+C)*sec(c+d*x)*tan(c+d*x)+-1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(11C+63A)*tan(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*(43C+219A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(3C+19A)*sec(c+d*x)*tan(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(7C+31A)*sec(c+d*x)*tan(c+d*x))
@test integrate(cos(c+d*x)^5//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2//15*a*d^-1*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+10//231*a*d^-1*(9C+11A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*C*a*d^-1*cos(c+d*x)^7//2*sin(c+d*x)+2//11*C*a*d^-1*cos(c+d*x)^9//2*sin(c+d*x)+2//45*a*d^-1*cos(c+d*x)^3//2*(7C+9A)*sin(c+d*x)+2//77*a*d^-1*cos(c+d*x)^5//2*(9C+11A)*sin(c+d*x)+10//231*a*d^-1*cos(c+d*x)^(1/2)*(9C+11A)*sin(c+d*x))
@test integrate(cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2//15*a*d^-1*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*C*a*d^-1*cos(c+d*x)^5//2*sin(c+d*x)+2//9*C*a*d^-1*cos(c+d*x)^7//2*sin(c+d*x)+2//21*a*d^-1*cos(c+d*x)^(1/2)*(5C+7A)*sin(c+d*x)+2//45*a*d^-1*cos(c+d*x)^3//2*(7C+9A)*sin(c+d*x))
@test integrate(cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2//5*a*d^-1*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*C*a*d^-1*cos(c+d*x)^3//2*sin(c+d*x)+2//7*C*a*d^-1*cos(c+d*x)^5//2*sin(c+d*x)+2//21*a*d^-1*cos(c+d*x)^(1/2)*(5C+7A)*sin(c+d*x))
@test integrate(cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2//3*a*d^-1*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*a*d^-1*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*C*a*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x)+2//5*C*a*d^-1*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(-2*a*d^-1*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*a*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*C*a*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate(cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(-2*a*d^-1*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*a*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*A*a*d^-1*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(-2//5*a*d^-1*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*A*a*d^-1*cos(c+d*x)^-3//2*sin(c+d*x)+2//5*A*a*d^-1*cos(c+d*x)^-5//2*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^-1//2*(3A+5C)*sin(c+d*x))
@test integrate(cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(-2//5*a*d^-1*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(5A+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*A*a*d^-1*cos(c+d*x)^-5//2*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^-1//2*(3A+5C)*sin(c+d*x)+2//7*A*a*d^-1*cos(c+d*x)^-7//2*sin(c+d*x)+2//21*a*d^-1*cos(c+d*x)^-3//2*(5A+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(4//15*a^2*d^-1*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+8//231*a^2*d^-1*(25C+33A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//11*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^5//2*sin(c+d*x)+2//693*a^2*d^-1*cos(c+d*x)^5//2*(89C+99A)*sin(c+d*x)+4//45*a^2*d^-1*cos(c+d*x)^3//2*(7C+9A)*sin(c+d*x)+8//99*C*d^-1*cos(c+d*x)^5//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+8//231*a^2*d^-1*cos(c+d*x)^(1/2)*(25C+33A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(4//21*a^2*d^-1*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+16//15*a^2*d^-1*(2C+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//9*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^3//2*sin(c+d*x)+2//105*a^2*d^-1*cos(c+d*x)^3//2*(19C+21A)*sin(c+d*x)+4//21*a^2*d^-1*cos(c+d*x)^(1/2)*(5C+7A)*sin(c+d*x)+8//63*C*d^-1*cos(c+d*x)^3//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(4//5*a^2*d^-1*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+8//21*a^2*d^-1*(3C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^(1/2)*sin(c+d*x)+2//105*a^2*d^-1*cos(c+d*x)^(1/2)*(33C+35A)*sin(c+d*x)+8//35*C*d^-1*cos(c+d*x)^(1/2)*(a^2+a^2*cos(c+d*x))*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(4//3*a^2*d^-1*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+16//5*C*a^2*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-1//2*sin(c+d*x)+-2//15*a^2*d^-1*cos(c+d*x)^(1/2)*(-7C+15A)*sin(c+d*x)+-1//5*d^-1*cos(c+d*x)^(1/2)*(a^2+a^2*cos(c+d*x))*(-2C+10A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(-4*a^2*d^-1*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+8//3*a^2*d^-1*(A+C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//3*a^2*d^-1*cos(c+d*x)^(1/2)*(-1C+5A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-3//2*sin(c+d*x)+8//3*A*d^-1*cos(c+d*x)^-1//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(-16//5*A*a^2*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^2*d^-1*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-5//2*sin(c+d*x)+2//15*a^2*d^-1*cos(c+d*x)^-1//2*(15C+17A)*sin(c+d*x)+8//15*A*d^-1*cos(c+d*x)^-3//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(-4//5*a^2*d^-1*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+8//21*a^2*d^-1*(3A+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-7//2*sin(c+d*x)+2//105*a^2*d^-1*cos(c+d*x)^-3//2*(33A+35C)*sin(c+d*x)+4//5*a^2*d^-1*cos(c+d*x)^-1//2*(3A+5C)*sin(c+d*x)+8//35*A*d^-1*cos(c+d*x)^-5//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-11//2*(A+C*cos(c+d*x)^2), x) == :(-16//15*a^2*d^-1*(2A+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*(5A+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-9//2*sin(c+d*x)+2//105*a^2*d^-1*cos(c+d*x)^-5//2*(19A+21C)*sin(c+d*x)+4//21*a^2*d^-1*cos(c+d*x)^-3//2*(5A+7C)*sin(c+d*x)+8//63*A*d^-1*cos(c+d*x)^-7//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+16//15*a^2*d^-1*cos(c+d*x)^-1//2*(2A+3C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(4//195*a^3*d^-1*(175C+221A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^3*d^-1*(95C+121A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//1287*d^-1*cos(c+d*x)^5//2*(a^3+a^3*cos(c+d*x))*(286A+290C)*sin(c+d*x)+2//13*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^5//2*sin(c+d*x)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*(95C+121A)*sin(c+d*x)+4//585*a^3*d^-1*cos(c+d*x)^3//2*(175C+221A)*sin(c+d*x)+40//9009*a^3*d^-1*cos(c+d*x)^5//2*(118C+143A)*sin(c+d*x)+12//143*C*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(4//5*a^3*d^-1*(5C+7A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^3*d^-1*(105C+143A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*cos(c+d*x)^3//2*(a^3+a^3*cos(c+d*x))*(66A+70C)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^3//2*sin(c+d*x)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*(105C+143A)*sin(c+d*x)+8//385*a^3*d^-1*cos(c+d*x)^3//2*(35C+44A)*sin(c+d*x)+4//33*C*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(4//15*a^3*d^-1*(17C+27A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*(11C+21A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//315*d^-1*cos(c+d*x)^(1/2)*(a^3+a^3*cos(c+d*x))*(126A+146C)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^(1/2)*sin(c+d*x)+8//105*a^3*d^-1*cos(c+d*x)^(1/2)*(16C+21A)*sin(c+d*x)+4//21*C*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(4//5*a^3*d^-1*(5A+7C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*(13C+35A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-1//2*sin(c+d*x)+-4//105*a^3*d^-1*cos(c+d*x)^(1/2)*(-41C+35A)*sin(c+d*x)+-1//35*d^-1*cos(c+d*x)^(1/2)*(a^3+a^3*cos(c+d*x))*(-22C+70A)*sin(c+d*x)+-1//7*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(-2C+14A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(-4//5*a^3*d^-1*(-9C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^3*d^-1*(3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-8//15*a^3*d^-1*cos(c+d*x)^(1/2)*(-3C+10A)*sin(c+d*x)+-1//15*d^-1*cos(c+d*x)^(1/2)*(a^3+a^3*cos(c+d*x))*(-6C+70A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-3//2*sin(c+d*x)+4*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(-4//5*a^3*d^-1*(-5C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^3*d^-1*(3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-4//15*a^3*d^-1*cos(c+d*x)^(1/2)*(5C+21A)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^-1//2*(a^3+a^3*cos(c+d*x))*(10C+22A)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-5//2*sin(c+d*x)+4//5*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(-4//5*a^3*d^-1*(5C+7A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*(13A+35C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//15*d^-1*cos(c+d*x)^-3//2*(a^3+a^3*cos(c+d*x))*(10C+14A)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-7//2*sin(c+d*x)+8//105*a^3*d^-1*cos(c+d*x)^-1//2*(53A+70C)*sin(c+d*x)+12//35*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-11//2*(A+C*cos(c+d*x)^2), x) == :(-4//15*a^3*d^-1*(17A+27C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*(11A+21C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//315*d^-1*cos(c+d*x)^-5//2*(a^3+a^3*cos(c+d*x))*(126C+146A)*sin(c+d*x)+2//9*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-9//2*sin(c+d*x)+4//15*a^3*d^-1*cos(c+d*x)^-1//2*(17A+27C)*sin(c+d*x)+8//105*a^3*d^-1*cos(c+d*x)^-3//2*(16A+21C)*sin(c+d*x)+4//21*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-13//2*(A+C*cos(c+d*x)^2), x) == :(-4//5*a^3*d^-1*(5A+7C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^3*d^-1*(105A+143C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*cos(c+d*x)^-7//2*(a^3+a^3*cos(c+d*x))*(66C+70A)*sin(c+d*x)+2//11*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-11//2*sin(c+d*x)+4//5*a^3*d^-1*cos(c+d*x)^-1//2*(5A+7C)*sin(c+d*x)+4//231*a^3*d^-1*cos(c+d*x)^-3//2*(105A+143C)*sin(c+d*x)+8//385*a^3*d^-1*cos(c+d*x)^-5//2*(35A+44C)*sin(c+d*x)+4//33*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-9//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(1//5*a^-1*d^-1*(-21C+-15A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*a^-1*d^-1*(35A+45C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^7//2*(A+C)*sin(c+d*x)+-1//5*a^-1*d^-1*cos(c+d*x)^3//2*(5A+7C)*sin(c+d*x)+1//7*a^-1*d^-1*cos(c+d*x)^5//2*(7A+9C)*sin(c+d*x)+1//21*a^-1*d^-1*cos(c+d*x)^(1/2)*(35A+45C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(-1//3*a^-1*d^-1*(3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-1*d^-1*(15A+21C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^5//2*(A+C)*sin(c+d*x)+-1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*(3A+5C)*sin(c+d*x)+1//5*a^-1*d^-1*cos(c+d*x)^3//2*(5A+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(-1*a^-1*d^-1*(A+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-1*d^-1*(3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^3//2*(A+C)*sin(c+d*x)+1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*(3A+5C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(A+-1C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+a^-1*d^-1*(A+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1*a^-1*d^-1*(A+-1C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*a^-1*d^-1*(C+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+a^-1*d^-1*cos(c+d*x)^-1//2*(C+3A)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^-1//2*(A+C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(C+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-1*d^-1*(3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*a^-1*d^-1*cos(c+d*x)^-1//2*(C+3A)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^-3//2*(A+C)*sin(c+d*x)+1//3*a^-1*d^-1*cos(c+d*x)^-3//2*(3C+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(-1//3*a^-1*d^-1*(3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-1*d^-1*(-21A+-15C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^-5//2*(A+C)*sin(c+d*x)+-1//3*a^-1*d^-1*cos(c+d*x)^-3//2*(3C+5A)*sin(c+d*x)+1//5*a^-1*d^-1*cos(c+d*x)^-5//2*(5C+7A)*sin(c+d*x)+1//5*a^-1*d^-1*cos(c+d*x)^-1//2*(15C+21A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-1//3*a^-2*d^-1*(5A+15C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-2*d^-1*(20A+56C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*(5A+15C)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^7//2*(A+C)*sin(c+d*x)+1//15*a^-2*d^-1*cos(c+d*x)^3//2*(20A+56C)*sin(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^5//2*(A+3C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(-1*a^-2*d^-1*(A+7C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(2A+10C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^5//2*(A+C)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*(2A+10C)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^3//2*(A+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(4*C*a^-2*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(A+-5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3//2*(A+C)*sin(c+d*x)+1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+-5C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(a^-2*d^-1*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(2A+2C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^(1/2)*(A+C)*sin(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+-1C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-4*A*a^-2*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*(-1C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4*A*a^-2*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^-1//2*(A+C)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^-1//2*(-1C+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(a^-2*d^-1*(C+7A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(2C+10A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*a^-2*d^-1*cos(c+d*x)^-1//2*(C+7A)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^-3//2*(A+C)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^-3//2*(2C+10A)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^-3//2*(C+7A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(-1//6*a^-3*d^-1*(13A+63C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*(49A+231C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^9//2*(A+C)*sin(c+d*x)+-1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*(13A+63C)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^5//2*(13A+63C)*sin(c+d*x)+1//30*a^-3*d^-1*cos(c+d*x)^3//2*(49A+231C)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^7//2*(2A+12C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*(A+11C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//10*a^-3*d^-1*(9A+119C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+(1/2)*a^-3*d^-1*cos(c+d*x)^(1/2)*(A+11C)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^7//2*(A+C)*sin(c+d*x)+-1//30*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^3//2*(9A+119C)*sin(c+d*x)+-2//3*C*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(-1//10*a^-3*d^-1*(A+-49C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//6*a^-3*d^-1*(A+-13C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^5//2*(A+C)*sin(c+d*x)+1//6*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+-13C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3//2*(-8C+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//6*a^-3*d^-1*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*(A+-9C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^3//2*(A+C)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+-9C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^(1/2)*(-6C+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//6*a^-3*d^-1*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*(-1C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^(1/2)*(A+C)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(-1C+9A)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^(1/2)*(-4C+6A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//6*a^-3*d^-1*(-1C+13A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//10*a^-3*d^-1*(-1C+49A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^-1//2*(A+C)*sin(c+d*x)+-1//6*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^-1//2*(-1C+13A)*sin(c+d*x)+1//10*a^-3*d^-1*cos(c+d*x)^-1//2*(-1C+49A)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^-1//2*(-2C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*(C+11A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*(9C+119A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+(1/2)*a^-3*d^-1*cos(c+d*x)^-3//2*(C+11A)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^-3//2*(A+C)*sin(c+d*x)+-1//10*a^-3*d^-1*cos(c+d*x)^-1//2*(9C+119A)*sin(c+d*x)+-1//30*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^-3//2*(9C+119A)*sin(c+d*x)+-2//3*A*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(1//64*a^(1/2)*d^-1*(35C+48A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^5//2*sin(c+d*x)+1//24*C*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^5//2*sin(c+d*x)+1//64*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(35C+48A)*sin(c+d*x)+1//96*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(35C+48A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//8*a^(1/2)*d^-1*(5C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//3*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3//2*sin(c+d*x)+1//8*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(5C+8A)*sin(c+d*x)+1//12*C*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//4*a^(1/2)*d^-1*(3C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*sin(c+d*x)+1//4*C*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(C*a^(1/2)*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*sin(c+d*x)+-1*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-1C+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(2*C*a^(1/2)*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*sin(c+d*x)+2//3*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+2//15*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(8A+15C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+2//35*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(24A+35C)*sin(c+d*x)+4//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(24A+35C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*sin(c+d*x)+2//63*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(16A+21C)*sin(c+d*x)+8//315*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(16A+21C)*sin(c+d*x)+16//315*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(16A+21C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(1//128*a^3//2*d^-1*(133C+176A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//5*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^5//2*sin(c+d*x)+1//128*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(133C+176A)*sin(c+d*x)+1//192*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(133C+176A)*sin(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^5//2*(67C+80A)*sin(c+d*x)+3//40*C*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//64*a^3//2*d^-1*(75C+112A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^3//2*sin(c+d*x)+1//8*C*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3//2*sin(c+d*x)+1//32*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(13C+16A)*sin(c+d*x)+1//64*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(75C+112A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//8*a^3//2*d^-1*(11C+24A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//3*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^(1/2)*sin(c+d*x)+1//4*C*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*sin(c+d*x)+1//24*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(19C+24A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(1//4*a^3//2*d^-1*(7C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-1//2*sin(c+d*x)+-1//2*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(-1C+4A)*sin(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-5C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(3*C*a^3//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-3//2*sin(c+d*x)+2*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*sin(c+d*x)+-1//3*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-3C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(2*C*a^3//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//5*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-5//2*sin(c+d*x)+2//5*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*sin(c+d*x)+2//5*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(4A+5C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*sin(c+d*x)+2//15*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(4A+5C)*sin(c+d*x)+2//105*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(104A+175C)*sin(c+d*x)+6//35*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*sin(c+d*x)+2//21*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(52A+63C)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(136A+189C)*sin(c+d*x)+4//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(136A+189C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-13//2*(A+C*cos(c+d*x)^2), x) == :(2//11*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*sin(c+d*x)+2//33*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*sin(c+d*x)+2//231*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(28A+33C)*sin(c+d*x)+2//385*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(112A+143C)*sin(c+d*x)+8//1155*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(112A+143C)*sin(c+d*x)+16//1155*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(112A+143C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(1//512*a^5//2*d^-1*(1015C+1304A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//6*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^5//2*sin(c+d*x)+1//12*C*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^5//2*sin(c+d*x)+1//96*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^5//2*(23C+24A)*sin(c+d*x)+1//192*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^5//2*(109C+136A)*sin(c+d*x)+1//512*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(1015C+1304A)*sin(c+d*x)+1//768*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(1015C+1304A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//128*a^5//2*d^-1*(283C+400A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//5*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^3//2*sin(c+d*x)+1//8*C*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^3//2*sin(c+d*x)+1//128*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(283C+400A)*sin(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3//2*(79C+80A)*sin(c+d*x)+1//960*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(787C+1040A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//64*a^5//2*d^-1*(163C+304A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^(1/2)*sin(c+d*x)+1//32*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(16A+17C)*sin(c+d*x)+1//192*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(299C+432A)*sin(c+d*x)+5//24*C*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(5//8*a^5//2*d^-1*(5C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-1//2*sin(c+d*x)+-1//3*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^(1/2)*(-1C+6A)*sin(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(-3C+8A)*sin(c+d*x)+-1//24*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-49C+24A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(1//4*a^5//2*d^-1*(8A+19C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-3//2*sin(c+d*x)+-1//2*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(-1C+8A)*sin(c+d*x)+-1//12*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-27C+56A)*sin(c+d*x)+10//3*A*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(5*C*a^5//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//5*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-5//2*sin(c+d*x)+-1//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(15C+64A)*sin(c+d*x)+2//3*A*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-3//2*sin(c+d*x)+2//5*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*(5C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(2*C*a^5//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//7*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-7//2*sin(c+d*x)+2//7*A*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-5//2*sin(c+d*x)+2//21*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(7C+8A)*sin(c+d*x)+2//21*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(32A+49C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-9//2*sin(c+d*x)+2//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(8A+11C)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(63C+64A)*sin(c+d*x)+2//315*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(584A+903C)*sin(c+d*x)+10//63*A*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-13//2*(A+C*cos(c+d*x)^2), x) == :(2//11*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-11//2*sin(c+d*x)+2//231*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(32A+33C)*sin(c+d*x)+2//693*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(232A+297C)*sin(c+d*x)+2//693*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(568A+759C)*sin(c+d*x)+4//693*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(568A+759C)*sin(c+d*x)+10//99*A*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-15//2*(A+C*cos(c+d*x)^2), x) == :(2//13*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-13//2*sin(c+d*x)+2//1287*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*(136A+143C)*sin(c+d*x)+2//9009*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(2224A+2717C)*sin(c+d*x)+2//15015*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(8368A+10439C)*sin(c+d*x)+8//45045*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(8368A+10439C)*sin(c+d*x)+10//143*A*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*sin(c+d*x)+16//45045*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(8368A+10439C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(-1//8*a^-1//2*d^-1*(8A+9C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2^(1/2)*a^-1//2*d^-1*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//12*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*sin(c+d*x)+1//3*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^5//2*sin(c+d*x)+1//8*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(7C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//4*a^-1//2*d^-1*(7C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//4*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(-1*C*a^-1//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(2*C*a^-1//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*2^(1/2)*a^-1//2*d^-1*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+2*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(2^(1/2)*a^-1//2*d^-1*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-2//3*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(-1*2^(1/2)*a^-1//2*d^-1*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-2//15*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*sin(c+d*x)+1//15*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(26A+30C)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(2^(1/2)*a^-1//2*d^-1*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-2//35*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*sin(c+d*x)+-1//105*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(70C+86A)*sin(c+d*x)+1//105*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(62A+70C)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(1//4*a^-3//2*d^-1*(8A+19C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^5//2*(A+C)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(5A+13C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(A+2C)*sin(c+d*x)+-1//4*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(2A+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(-3*C*a^-3//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3//2*(A+C)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(A+9C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(A+3C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(2*C*a^-3//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^(1/2)*(A+C)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(-5C+3A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-1//2*(A+C)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(-1C+7A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(C+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-3//2*(A+C)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(3C+11A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(3C+19A)*sin(c+d*x)+1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(3C+7A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-5//2*(A+C)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(7C+15A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(5C+13A)*sin(c+d*x)+1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(5C+9A)*sin(c+d*x)+1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(25C+49A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(-5*C*a^-5//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^5//2*(A+C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(3A+115C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3//2*(A+-15C)*sin(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(3A+35C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(2*C*a^-5//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^3//2*(A+C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(-43C+5A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^(1/2)*(-11C+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^(1/2)*(A+C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(3C+19A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^(1/2)*(-7C+9A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-1//2*(A+C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(-75A+5C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-1//2*(-3C+13A)*sin(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(C+49A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-3//2*(A+C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(19C+163A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-3//2*(C+17A)*sin(c+d*x)+-1//48*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(27C+299A)*sin(c+d*x)+1//48*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(15C+95A)*sin(c+d*x))
@test integrate(cos(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(3//8*B*x+C*d^-1*sin(c+d*x)+-2//3*C*d^-1*sin(c+d*x)^3+1//5*C*d^-1*sin(c+d*x)^5+1//4*B*d^-1*cos(c+d*x)^3*sin(c+d*x)+3//8*B*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(cos(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(3//8*C*x+B*d^-1*sin(c+d*x)+-1//3*B*d^-1*sin(c+d*x)^3+1//4*C*d^-1*cos(c+d*x)^3*sin(c+d*x)+3//8*C*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :((1/2)*B*x+C*d^-1*sin(c+d*x)+-1//3*C*d^-1*sin(c+d*x)^3+(1/2)*B*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(B*cos(c+d*x)+C*cos(c+d*x)^2, x) == :((1/2)*C*x+B*d^-1*sin(c+d*x)+(1/2)*C*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(B*x+C*d^-1*sin(c+d*x))
@test integrate(sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x+B*d^-1*arctanh(sin(c+d*x)))
@test integrate(sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*d^-1*tan(c+d*x)+C*d^-1*arctanh(sin(c+d*x)))
@test integrate(sec(c+d*x)^4*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*d^-1*tan(c+d*x)+(1/2)*B*d^-1*arctanh(sin(c+d*x))+(1/2)*B*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^5*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*d^-1*tan(c+d*x)+(1/2)*C*d^-1*arctanh(sin(c+d*x))+1//3*B*d^-1*tan(c+d*x)^3+(1/2)*C*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^6*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*d^-1*tan(c+d*x)+1//3*C*d^-1*tan(c+d*x)^3+3//8*B*d^-1*arctanh(sin(c+d*x))+1//4*B*d^-1*sec(c+d*x)^3*tan(c+d*x)+3//8*B*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(cos(c+d*x)^2*(a+a*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(3//8*a*x*(B+C)+-1//15*a*d^-1*sin(c+d*x)^3*(4C+5B)+1//5*a*d^-1*(4C+5B)*sin(c+d*x)+1//4*a*d^-1*cos(c+d*x)^3*(B+C)*sin(c+d*x)+1//5*C*a*d^-1*cos(c+d*x)^4*sin(c+d*x)+3//8*a*d^-1*(B+C)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//8*a*x*(3C+4B)+a*d^-1*(B+C)*sin(c+d*x)+-1//3*a*d^-1*sin(c+d*x)^3*(B+C)+1//4*C*a*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//8*a*d^-1*(3C+4B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a*x*(B+C)+1//3*a*d^-1*(C+3B)*sin(c+d*x)+1//3*C*a^-1*d^-1*(a+a*cos(c+d*x))^2*sin(c+d*x)+1//6*a*d^-1*(-1C+3B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :((1/2)*a*x*(C+2B)+a*d^-1*(B+C)*sin(c+d*x)+(1/2)*C*a*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(sec(c+d*x)^2*(a+a*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a*x*(B+C)+B*a*d^-1*arctanh(sin(c+d*x))+C*a*d^-1*sin(c+d*x))
@test integrate(sec(c+d*x)^3*(a+a*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*a*x+B*a*d^-1*tan(c+d*x)+a*d^-1*(B+C)*arctanh(sin(c+d*x)))
@test integrate(sec(c+d*x)^4*(a+a*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a*d^-1*(B+C)*tan(c+d*x)+(1/2)*a*d^-1*(B+2C)*arctanh(sin(c+d*x))+(1/2)*B*a*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^5*(a+a*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a*d^-1*(B+C)*arctanh(sin(c+d*x))+1//3*a*d^-1*(2B+3C)*tan(c+d*x)+(1/2)*a*d^-1*(B+C)*sec(c+d*x)*tan(c+d*x)+1//3*B*a*d^-1*sec(c+d*x)^2*tan(c+d*x))
@test integrate(sec(c+d*x)^6*(a+a*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a*d^-1*(B+C)*tan(c+d*x)+1//3*a*d^-1*tan(c+d*x)^3*(B+C)+1//8*a*d^-1*(3B+4C)*arctanh(sin(c+d*x))+1//4*B*a*d^-1*sec(c+d*x)^3*tan(c+d*x)+1//8*a*d^-1*(3B+4C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//8*x*a^2*(6C+7B)+-1//15*a^2*d^-1*sin(c+d*x)^3*(9C+10B)+1//5*a^2*d^-1*(9C+10B)*sin(c+d*x)+1//5*C*d^-1*cos(c+d*x)^3*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+1//8*a^2*d^-1*(6C+7B)*cos(c+d*x)*sin(c+d*x)+1//20*a^2*d^-1*cos(c+d*x)^3*(5B+6C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*x*a^2*(7C+8B)+1//6*a^2*d^-1*(7C+8B)*sin(c+d*x)+1//12*d^-1*(a+a*cos(c+d*x))^2*(-1C+4B)*sin(c+d*x)+1//4*C*a^-1*d^-1*(a+a*cos(c+d*x))^3*sin(c+d*x)+1//24*a^2*d^-1*(7C+8B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :((1/2)*x*a^2*(2C+3B)+1//3*C*d^-1*(a+a*cos(c+d*x))^2*sin(c+d*x)+2//3*a^2*d^-1*(2C+3B)*sin(c+d*x)+1//6*a^2*d^-1*(2C+3B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^2*(3C+4B)+B*a^2*d^-1*arctanh(sin(c+d*x))+(1/2)*C*d^-1*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+(1/2)*a^2*d^-1*(2B+3C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^2*(B+2C)+B*d^-1*(a^2+a^2*cos(c+d*x))*tan(c+d*x)+a^2*d^-1*(C+2B)*arctanh(sin(c+d*x))+-1*a^2*d^-1*(B+-1C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^4*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*a^2+(1/2)*a^2*d^-1*(2C+3B)*tan(c+d*x)+(1/2)*a^2*d^-1*(3B+4C)*arctanh(sin(c+d*x))+(1/2)*B*d^-1*(a^2+a^2*cos(c+d*x))*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^5*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^2*d^-1*(2B+3C)*arctanh(sin(c+d*x))+1//3*a^2*d^-1*(5B+6C)*tan(c+d*x)+1//3*B*d^-1*sec(c+d*x)^2*(a^2+a^2*cos(c+d*x))*tan(c+d*x)+1//6*a^2*d^-1*(3C+4B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^6*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*a^2*d^-1*(4B+5C)*tan(c+d*x)+1//8*a^2*d^-1*(7B+8C)*arctanh(sin(c+d*x))+1//4*B*d^-1*sec(c+d*x)^3*(a^2+a^2*cos(c+d*x))*tan(c+d*x)+1//8*a^2*d^-1*(7B+8C)*sec(c+d*x)*tan(c+d*x)+1//12*a^2*d^-1*sec(c+d*x)^2*(4C+5B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^7*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*a^2*d^-1*(9B+10C)*tan(c+d*x)+1//8*a^2*d^-1*(6B+7C)*arctanh(sin(c+d*x))+1//15*a^2*d^-1*tan(c+d*x)^3*(9B+10C)+1//5*B*d^-1*sec(c+d*x)^4*(a^2+a^2*cos(c+d*x))*tan(c+d*x)+1//8*a^2*d^-1*(6B+7C)*sec(c+d*x)*tan(c+d*x)+1//20*a^2*d^-1*sec(c+d*x)^3*(5C+6B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//16*x*a^3*(23C+26B)+-1//15*a^3*d^-1*sin(c+d*x)^3*(17C+19B)+1//5*a^3*d^-1*(17C+19B)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^3*(a^3+a^3*cos(c+d*x))*(3B+4C)*sin(c+d*x)+1//16*a^3*d^-1*(23C+26B)*cos(c+d*x)*sin(c+d*x)+1//40*a^3*d^-1*cos(c+d*x)^3*(21C+22B)*sin(c+d*x)+1//6*C*a*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*x*a^3*(13C+15B)+-1//60*a^3*d^-1*sin(c+d*x)^3*(13C+15B)+1//5*a^3*d^-1*(13C+15B)*sin(c+d*x)+1//20*d^-1*(a+a*cos(c+d*x))^3*(-1C+5B)*sin(c+d*x)+1//5*C*a^-1*d^-1*(a+a*cos(c+d*x))^4*sin(c+d*x)+3//40*a^3*d^-1*(13C+15B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(5//8*x*a^3*(3C+4B)+a^3*d^-1*(3C+4B)*sin(c+d*x)+-1//12*a^3*d^-1*sin(c+d*x)^3*(3C+4B)+1//4*C*d^-1*(a+a*cos(c+d*x))^3*sin(c+d*x)+3//8*a^3*d^-1*(3C+4B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^3*(5C+7B)+B*a^3*d^-1*arctanh(sin(c+d*x))+1//6*d^-1*(a^3+a^3*cos(c+d*x))*(3B+5C)*sin(c+d*x)+5//2*a^3*d^-1*(B+C)*sin(c+d*x)+1//3*C*a*d^-1*(a+a*cos(c+d*x))^2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^3*(6B+7C)+a^3*d^-1*(C+3B)*arctanh(sin(c+d*x))+-1//2*d^-1*(a^3+a^3*cos(c+d*x))*(-1C+2B)*sin(c+d*x)+5//2*C*a^3*d^-1*sin(c+d*x)+B*a*d^-1*(a+a*cos(c+d*x))^2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^4*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^3*(B+3C)+d^-1*(C+2B)*(a^3+a^3*cos(c+d*x))*tan(c+d*x)+(1/2)*a^3*d^-1*(6C+7B)*arctanh(sin(c+d*x))+-5//2*B*a^3*d^-1*sin(c+d*x)+(1/2)*B*a*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^5*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*a^3+(1/2)*a^3*d^-1*(5B+7C)*arctanh(sin(c+d*x))+5//2*a^3*d^-1*(B+C)*tan(c+d*x)+1//6*d^-1*(a^3+a^3*cos(c+d*x))*(3C+5B)*sec(c+d*x)*tan(c+d*x)+1//3*B*a*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^6*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*a^3*d^-1*(9B+11C)*tan(c+d*x)+5//8*a^3*d^-1*(3B+4C)*arctanh(sin(c+d*x))+1//6*d^-1*sec(c+d*x)^2*(a^3+a^3*cos(c+d*x))*(2C+3B)*tan(c+d*x)+1//24*a^3*d^-1*(27B+28C)*sec(c+d*x)*tan(c+d*x)+1//4*B*a*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^7*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a^3*d^-1*(13B+15C)*arctanh(sin(c+d*x))+1//15*a^3*d^-1*(38B+45C)*tan(c+d*x)+1//8*a^3*d^-1*(13B+15C)*sec(c+d*x)*tan(c+d*x)+1//20*d^-1*sec(c+d*x)^3*(a^3+a^3*cos(c+d*x))*(5C+7B)*tan(c+d*x)+1//60*a^3*d^-1*sec(c+d*x)^2*(43B+45C)*tan(c+d*x)+1//5*B*a*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^4*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^-1*(-3C+3B)+-1*a^-1*d^-1*(-4C+3B)*sin(c+d*x)+1//3*a^-1*d^-1*sin(c+d*x)^3*(-4C+3B)+d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^3*(B+-1C)*sin(c+d*x)+(1/2)*a^-1*d^-1*(-3C+3B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//2*x*a^-1*(-3C+2B)+a^-1*d^-1*(-2C+2B)*sin(c+d*x)+d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^2*(B+-1C)*sin(c+d*x)+-1//2*a^-1*d^-1*(-3C+2B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^-1*(B+-1C)+C*a^-1*d^-1*sin(c+d*x)+-1*a^-1*d^-1*(1+cos(c+d*x))^-1*(B+-1C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(C*x*a^-1+d^-1*(a+a*cos(c+d*x))^-1*(B+-1C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*a^-1*d^-1*arctanh(sin(c+d*x))+-1*d^-1*(a+a*cos(c+d*x))^-1*(B+-1C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(-1C+2B)*tan(c+d*x)+-1*a^-1*d^-1*(B+-1C)*arctanh(sin(c+d*x))+-1*d^-1*(a+a*cos(c+d*x))^-1*(B+-1C)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^4*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-1*d^-1*(-2C+3B)*arctanh(sin(c+d*x))+-1*a^-1*d^-1*(-2C+2B)*tan(c+d*x)+(1/2)*a^-1*d^-1*(-2C+3B)*sec(c+d*x)*tan(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*(B+-1C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^5*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(-3C+4B)*tan(c+d*x)+-1//2*a^-1*d^-1*(-3C+3B)*arctanh(sin(c+d*x))+1//3*a^-1*d^-1*tan(c+d*x)^3*(-3C+4B)+-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^2*(B+-1C)*tan(c+d*x)+-1//2*a^-1*d^-1*(-3C+3B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^-2*(-10C+7B)+-1*a^-2*d^-1*(-12C+8B)*sin(c+d*x)+1//3*a^-2*d^-1*sin(c+d*x)^3*(-12C+8B)+(1/2)*a^-2*d^-1*(-10C+7B)*cos(c+d*x)*sin(c+d*x)+1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^4*(B+-1C)*sin(c+d*x)+1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^3*(-10C+7B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*x*a^-2*(-7C+4B)+1//3*a^-2*d^-1*(-16C+10B)*sin(c+d*x)+-1//2*a^-2*d^-1*(-7C+4B)*cos(c+d*x)*sin(c+d*x)+1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3*(B+-1C)*sin(c+d*x)+1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^2*(-8C+5B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*a^-2*(B+-2C)+-1//3*a^-2*d^-1*(B+-4C)*sin(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*(B+-2C)*sin(c+d*x)+1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^2*(B+-1C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*a^-2+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(B+-1C)*sin(c+d*x)+1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*(-5C+2B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//3*d^-1*(a+a*cos(c+d*x))^-2*(B+-1C)*sin(c+d*x)+1//3*d^-1*(a^2+a^2*cos(c+d*x))^-1*(B+2C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*a^-2*d^-1*arctanh(sin(c+d*x))+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(B+-1C)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*(-1C+4B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-2*d^-1*(-1C+2B)*arctanh(sin(c+d*x))+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(B+-1C)*tan(c+d*x)+1//3*a^-2*d^-1*(-4C+10B)*tan(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*(-1C+2B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^4*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-2*d^-1*(-4C+7B)*arctanh(sin(c+d*x))+-1//3*a^-2*d^-1*(-10C+16B)*tan(c+d*x)+(1/2)*a^-2*d^-1*(-4C+7B)*sec(c+d*x)*tan(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(B+-1C)*sec(c+d*x)*tan(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*(-5C+8B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*x*a^-3*(-13C+6B)+1//15*a^-3*d^-1*(-152C+72B)*sin(c+d*x)+-1//2*a^-3*d^-1*(-13C+6B)*cos(c+d*x)*sin(c+d*x)+1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^4*(B+-1C)*sin(c+d*x)+1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^2*(-76C+36B)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3*(-11C+6B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^-3*(B+-3C)+-1*d^-1*(a^3+a^3*cos(c+d*x))^-1*(B+-3C)*sin(c+d*x)+-1//15*a^-3*d^-1*(-27C+7B)*sin(c+d*x)+1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^3*(B+-1C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^2*(-9C+4B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(C*x*a^-3+1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-29C+4B)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-7C+2B)*sin(c+d*x)+1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^2*(B+-1C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*(B+-1C)*sin(c+d*x)+1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(3B+7C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-8C+3B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//5*d^-1*(a+a*cos(c+d*x))^-3*(B+-1C)*sin(c+d*x)+1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(2B+3C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(2B+3C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*a^-3*d^-1*arctanh(sin(c+d*x))+-1//5*d^-1*(a+a*cos(c+d*x))^-3*(B+-1C)*sin(c+d*x)+-1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-2C+22B)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-2C+7B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-3*d^-1*(-1C+3B)*arctanh(sin(c+d*x))+-1*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-1C+3B)*tan(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*(B+-1C)*tan(c+d*x)+1//15*a^-3*d^-1*(-22C+72B)*tan(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-4C+9B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^4*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*(-6C+13B)*arctanh(sin(c+d*x))+-1//15*a^-3*d^-1*(-72C+152B)*tan(c+d*x)+(1/2)*a^-3*d^-1*(-6C+13B)*sec(c+d*x)*tan(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*(B+-1C)*sec(c+d*x)*tan(c+d*x)+-1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-36C+76B)*sec(c+d*x)*tan(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-6C+11B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(a+a*cos(c+d*x))^(1/2)*(-4C+10B)*sin(c+d*x)+2//5*C*a^-1*d^-1*(a+a*cos(c+d*x))^3//2*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^-1//2*(5B+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*d^-1*(a+a*cos(c+d*x))^3//2*(-4C+14B)*sin(c+d*x)+2//7*C*a^-1*d^-1*(a+a*cos(c+d*x))^5//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(19C+21B)*sin(c+d*x)+8//105*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(19C+21B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//63*d^-1*(a+a*cos(c+d*x))^5//2*(-4C+18B)*sin(c+d*x)+2//9*C*a^-1*d^-1*(a+a*cos(c+d*x))^7//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^3//2*(13C+15B)*sin(c+d*x)+16//315*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(13C+15B)*sin(c+d*x)+64//315*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(13C+15B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(a+a*cos(c+d*x))^-1//2*(-4C+6B)*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(B+-1C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*C*a^-1*d^-1*(a+a*cos(c+d*x))^(1/2)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*(B+-1C)*sin(c+d*x)+2*C*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(-7C+3B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*(B+-1C)*sin(c+d*x)+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-13C+5B)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(5B+19C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate(cos(c+d*x)^3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(6//5*B*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+10//21*C*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*B*d^-1*cos(c+d*x)^3//2*sin(c+d*x)+2//7*C*d^-1*cos(c+d*x)^5//2*sin(c+d*x)+10//21*C*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate(cos(c+d*x)^(1/2)*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*B*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+6//5*C*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*B*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x)+2//5*C*d^-1*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-1//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*B*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*C*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*C*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate(cos(c+d*x)^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*B*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*C*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate(cos(c+d*x)^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2*B*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*C*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*B*d^-1*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-7//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2*C*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*B*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*C*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*B*d^-1*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-9//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-6//5*B*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*C*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*C*d^-1*cos(c+d*x)^-3//2*sin(c+d*x)+2//5*B*d^-1*cos(c+d*x)^-5//2*sin(c+d*x)+6//5*B*d^-1*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate(cos(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*(3//8*A+5//16*C)+B*d^-1*sin(c+d*x)+-2//3*B*d^-1*sin(c+d*x)^3+1//5*B*d^-1*sin(c+d*x)^5+1//6*C*d^-1*cos(c+d*x)^5*sin(c+d*x)+1//16*d^-1*(5C+6A)*cos(c+d*x)*sin(c+d*x)+1//24*d^-1*cos(c+d*x)^3*(5C+6A)*sin(c+d*x))
@test integrate(cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(3//8*B*x+-1//15*d^-1*sin(c+d*x)^3*(4C+5A)+1//5*d^-1*(4C+5A)*sin(c+d*x)+1//4*B*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//5*C*d^-1*cos(c+d*x)^4*sin(c+d*x)+3//8*B*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*((1/2)*A+3//8*C)+B*d^-1*sin(c+d*x)+-1//3*B*d^-1*sin(c+d*x)^3+1//4*C*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//8*d^-1*(3C+4A)*cos(c+d*x)*sin(c+d*x))
@test integrate((A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :((1/2)*B*x+1//3*d^-1*(2C+3A)*sin(c+d*x)+(1/2)*B*d^-1*cos(c+d*x)*sin(c+d*x)+1//3*C*d^-1*cos(c+d*x)^2*sin(c+d*x))
@test integrate(A+B*cos(c+d*x)+C*cos(c+d*x)^2, x) == :(A*x+(1/2)*C*x+B*d^-1*sin(c+d*x)+(1/2)*C*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(B*x+A*d^-1*arctanh(sin(c+d*x))+C*d^-1*sin(c+d*x))
@test integrate(sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x+A*d^-1*tan(c+d*x)+B*d^-1*arctanh(sin(c+d*x)))
@test integrate(sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*d^-1*tan(c+d*x)+(1/2)*d^-1*(A+2C)*arctanh(sin(c+d*x))+(1/2)*A*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*B*d^-1*arctanh(sin(c+d*x))+1//3*d^-1*(2A+3C)*tan(c+d*x)+(1/2)*B*d^-1*sec(c+d*x)*tan(c+d*x)+1//3*A*d^-1*sec(c+d*x)^2*tan(c+d*x))
@test integrate(sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*d^-1*tan(c+d*x)+1//3*B*d^-1*tan(c+d*x)^3+1//8*d^-1*(3A+4C)*arctanh(sin(c+d*x))+1//4*A*d^-1*sec(c+d*x)^3*tan(c+d*x)+1//8*d^-1*(3A+4C)*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^6*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(4A+5C)*tan(c+d*x)+1//15*d^-1*tan(c+d*x)^3*(4A+5C)+3//8*B*d^-1*arctanh(sin(c+d*x))+1//4*B*d^-1*sec(c+d*x)^3*tan(c+d*x)+1//5*A*d^-1*sec(c+d*x)^4*tan(c+d*x)+3//8*B*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(cos(c+d*x)^2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a*x*(3B+3C+4A)+-1//15*a*d^-1*sin(c+d*x)^3*(4C+5A+5B)+1//5*a*d^-1*(4C+5A+5B)*sin(c+d*x)+1//4*a*d^-1*cos(c+d*x)^3*(B+C)*sin(c+d*x)+1//5*C*a*d^-1*cos(c+d*x)^4*sin(c+d*x)+1//8*a*d^-1*(3B+3C+4A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//8*a*x*(3C+4A+4B)+1//3*a*d^-1*(2B+2C+3A)*sin(c+d*x)+1//3*a*d^-1*cos(c+d*x)^2*(B+C)*sin(c+d*x)+1//4*C*a*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//8*a*d^-1*(3C+4A+4B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a*x*(B+C+2A)+1//3*a*d^-1*(C+3A+3B)*sin(c+d*x)+1//3*C*a^-1*d^-1*(a+a*cos(c+d*x))^2*sin(c+d*x)+1//6*a*d^-1*(-1C+3B)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :((1/2)*a*x*(C+2A+2B)+A*a*d^-1*arctanh(sin(c+d*x))+a*d^-1*(B+C)*sin(c+d*x)+(1/2)*C*a*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(sec(c+d*x)^2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a*x*(B+C)+A*a*d^-1*tan(c+d*x)+C*a*d^-1*sin(c+d*x)+a*d^-1*(A+B)*arctanh(sin(c+d*x)))
@test integrate(sec(c+d*x)^3*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*a*x+a*d^-1*(A+B)*tan(c+d*x)+(1/2)*a*d^-1*(A+2B+2C)*arctanh(sin(c+d*x))+(1/2)*A*a*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^4*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a*d^-1*(A+B+2C)*arctanh(sin(c+d*x))+1//3*a*d^-1*(2A+3B+3C)*tan(c+d*x)+(1/2)*a*d^-1*(A+B)*sec(c+d*x)*tan(c+d*x)+1//3*A*a*d^-1*sec(c+d*x)^2*tan(c+d*x))
@test integrate(sec(c+d*x)^5*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*a*d^-1*(-3C+-2A+-2B)*tan(c+d*x)+1//8*a*d^-1*(3A+4B+4C)*arctanh(sin(c+d*x))+1//3*a*d^-1*sec(c+d*x)^2*(A+B)*tan(c+d*x)+1//4*A*a*d^-1*sec(c+d*x)^3*tan(c+d*x)+1//8*a*d^-1*(3A+4B+4C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//16*x*a^2*(11C+12B+14A)+-1//15*a^2*d^-1*sin(c+d*x)^3*(8C+9B+10A)+1//5*a^2*d^-1*(8C+9B+10A)*sin(c+d*x)+1//6*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^3*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^3*(C+3B)*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+1//16*a^2*d^-1*(11C+12B+14A)*cos(c+d*x)*sin(c+d*x)+1//40*a^2*d^-1*cos(c+d*x)^3*(9C+10A+12B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//8*x*a^2*(6C+7B+8A)+1//6*a^2*d^-1*(6C+7B+8A)*sin(c+d*x)+1//60*d^-1*(a+a*cos(c+d*x))^2*(-5B+6C+20A)*sin(c+d*x)+1//5*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^2*sin(c+d*x)+1//20*a^-1*d^-1*(a+a*cos(c+d*x))^3*(2C+5B)*sin(c+d*x)+1//24*a^2*d^-1*(6C+7B+8A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*x*a^2*(7C+8B+12A)+1//6*a^2*d^-1*(7C+8B+12A)*sin(c+d*x)+1//12*d^-1*(a+a*cos(c+d*x))^2*(-1C+4B)*sin(c+d*x)+1//4*C*a^-1*d^-1*(a+a*cos(c+d*x))^3*sin(c+d*x)+1//24*a^2*d^-1*(7C+8B+12A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :((1/2)*x*a^2*(2C+3B+4A)+A*a^2*d^-1*arctanh(sin(c+d*x))+(1/2)*a^2*d^-1*(2A+2C+3B)*sin(c+d*x)+1//3*C*d^-1*(a+a*cos(c+d*x))^2*sin(c+d*x)+1//6*d^-1*(a^2+a^2*cos(c+d*x))*(2C+3B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^2*(2A+3C+4B)+A*d^-1*(a+a*cos(c+d*x))^2*tan(c+d*x)+a^2*d^-1*(B+2A)*arctanh(sin(c+d*x))+-1//2*a^2*d^-1*(-3C+-2B+2A)*sin(c+d*x)+-1//2*d^-1*(a^2+a^2*cos(c+d*x))*(-1C+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^2*(B+2C)+d^-1*(A+B)*(a^2+a^2*cos(c+d*x))*tan(c+d*x)+(1/2)*a^2*d^-1*(2C+3A+4B)*arctanh(sin(c+d*x))+-1//2*a^2*d^-1*(-2C+2B+3A)*sin(c+d*x)+(1/2)*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*a^2+(1/2)*a^2*d^-1*(2A+2C+3B)*tan(c+d*x)+(1/2)*a^2*d^-1*(2A+3B+4C)*arctanh(sin(c+d*x))+1//3*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^2*tan(c+d*x)+1//6*d^-1*(a^2+a^2*cos(c+d*x))*(2A+3B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*a^2*d^-1*(4A+5B+6C)*tan(c+d*x)+1//8*a^2*d^-1*(7A+8B+12C)*arctanh(sin(c+d*x))+1//4*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^3*tan(c+d*x)+1//6*d^-1*sec(c+d*x)^2*(A+2B)*(a^2+a^2*cos(c+d*x))*tan(c+d*x)+1//24*a^2*d^-1*(11A+12C+16B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^6*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a^2*d^-1*(6A+7B+8C)*arctanh(sin(c+d*x))+1//15*a^2*d^-1*(18A+20B+25C)*tan(c+d*x)+1//5*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^4*tan(c+d*x)+1//8*a^2*d^-1*(6A+7B+8C)*sec(c+d*x)*tan(c+d*x)+1//20*d^-1*sec(c+d*x)^3*(a^2+a^2*cos(c+d*x))*(2A+5B)*tan(c+d*x)+1//60*a^2*d^-1*sec(c+d*x)^2*(18A+20C+25B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//16*x*a^3*(21C+23B+26A)+-1//105*a^3*d^-1*sin(c+d*x)^3*(108C+119B+133A)+1//35*a^3*d^-1*(108C+119B+133A)*sin(c+d*x)+1//7*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^3*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^3*(a^3+a^3*cos(c+d*x))*(3A+3C+4B)*sin(c+d*x)+1//16*a^3*d^-1*(21C+23B+26A)*cos(c+d*x)*sin(c+d*x)+1//280*a^3*d^-1*cos(c+d*x)^3*(129C+147B+154A)*sin(c+d*x)+1//42*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^3*(3C+7B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//16*x*a^3*(23C+26B+30A)+-1//120*a^3*d^-1*sin(c+d*x)^3*(23C+26B+30A)+1//10*a^3*d^-1*(23C+26B+30A)*sin(c+d*x)+1//120*d^-1*(a+a*cos(c+d*x))^3*(-6B+7C+30A)*sin(c+d*x)+1//6*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^2*sin(c+d*x)+1//10*a^-1*d^-1*(a+a*cos(c+d*x))^4*(C+2B)*sin(c+d*x)+3//80*a^3*d^-1*(23C+26B+30A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*x*a^3*(13C+15B+20A)+-1//60*a^3*d^-1*sin(c+d*x)^3*(13C+15B+20A)+1//5*a^3*d^-1*(13C+15B+20A)*sin(c+d*x)+1//20*d^-1*(a+a*cos(c+d*x))^3*(-1C+5B)*sin(c+d*x)+1//5*C*a^-1*d^-1*(a+a*cos(c+d*x))^4*sin(c+d*x)+3//40*a^3*d^-1*(13C+15B+20A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//8*x*a^3*(15C+20B+28A)+A*a^3*d^-1*arctanh(sin(c+d*x))+1//4*C*d^-1*(a+a*cos(c+d*x))^3*sin(c+d*x)+1//24*d^-1*(a^3+a^3*cos(c+d*x))*(12A+15C+20B)*sin(c+d*x)+5//8*a^3*d^-1*(3C+4A+4B)*sin(c+d*x)+1//12*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*(3C+4B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^3*(5C+6A+7B)+A*d^-1*(a+a*cos(c+d*x))^3*tan(c+d*x)+a^3*d^-1*(B+3A)*arctanh(sin(c+d*x))+-1//6*d^-1*(a^3+a^3*cos(c+d*x))*(-5C+-3B+6A)*sin(c+d*x)+5//2*a^3*d^-1*(B+C)*sin(c+d*x)+-1//3*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*(-1C+3A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^3*(2A+6B+7C)+(1/2)*a^3*d^-1*(2C+6B+7A)*arctanh(sin(c+d*x))+-5//2*a^3*d^-1*(A+-1C)*sin(c+d*x)+-1//2*d^-1*(a^3+a^3*cos(c+d*x))*(-1C+2B+4A)*sin(c+d*x)+(1/2)*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)*tan(c+d*x)+(1/2)*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*(2B+3A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^3*(B+3C)+(1/2)*a^3*d^-1*(5A+6C+7B)*arctanh(sin(c+d*x))+-5//2*a^3*d^-1*(A+B)*sin(c+d*x)+1//3*d^-1*(a^3+a^3*cos(c+d*x))*(3C+5A+6B)*tan(c+d*x)+1//3*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^2*tan(c+d*x)+(1/2)*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*(A+B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*a^3+1//8*a^3*d^-1*(15A+20B+28C)*arctanh(sin(c+d*x))+5//8*a^3*d^-1*(3A+4B+4C)*tan(c+d*x)+1//4*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^3*tan(c+d*x)+1//24*d^-1*(a^3+a^3*cos(c+d*x))*(12C+15A+20B)*sec(c+d*x)*tan(c+d*x)+1//12*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^2*(3A+4B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^6*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a^3*d^-1*(13A+15B+20C)*arctanh(sin(c+d*x))+1//15*a^3*d^-1*(38A+45B+55C)*tan(c+d*x)+1//5*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^4*tan(c+d*x)+1//30*d^-1*sec(c+d*x)^2*(a^3+a^3*cos(c+d*x))*(10C+11A+15B)*tan(c+d*x)+1//120*a^3*d^-1*(109A+135B+140C)*sec(c+d*x)*tan(c+d*x)+1//20*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^3*(3A+5B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^7*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*a^3*d^-1*(34A+38B+45C)*tan(c+d*x)+1//16*a^3*d^-1*(23A+26B+30C)*arctanh(sin(c+d*x))+1//6*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^5*tan(c+d*x)+1//16*a^3*d^-1*(23A+26B+30C)*sec(c+d*x)*tan(c+d*x)+1//120*a^3*d^-1*sec(c+d*x)^2*(73A+86B+90C)*tan(c+d*x)+1//120*d^-1*sec(c+d*x)^3*(a^3+a^3*cos(c+d*x))*(30C+31A+42B)*tan(c+d*x)+1//10*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^4*(A+2B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//128*x*a^4*(323C+352B+392A)+-1//105*a^4*d^-1*sin(c+d*x)^3*(208C+227B+252A)+1//35*a^4*d^-1*(208C+227B+252A)*sin(c+d*x)+1//8*C*d^-1*(a+a*cos(c+d*x))^4*cos(c+d*x)^3*sin(c+d*x)+1//120*d^-1*cos(c+d*x)^3*(a^4+a^4*cos(c+d*x))*(49C+56A+56B)*sin(c+d*x)+1//128*a^4*d^-1*(323C+352B+392A)*cos(c+d*x)*sin(c+d*x)+1//336*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^3*(56A+61C+80B)*sin(c+d*x)+1//2240*a^4*d^-1*cos(c+d*x)^3*(2007C+2208B+2408A)*sin(c+d*x)+1//14*a*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^3*(C+2B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//16*x*a^4*(44C+49B+56A)+-2//105*a^4*d^-1*sin(c+d*x)^3*(44C+49B+56A)+1//210*d^-1*(a+a*cos(c+d*x))^4*(-7B+8C+42A)*sin(c+d*x)+4//35*a^4*d^-1*(44C+49B+56A)*sin(c+d*x)+1//7*C*d^-1*(a+a*cos(c+d*x))^4*cos(c+d*x)^2*sin(c+d*x)+1//42*a^-1*d^-1*(a+a*cos(c+d*x))^5*(4C+7B)*sin(c+d*x)+1//280*a^4*d^-1*cos(c+d*x)^3*(44C+49B+56A)*sin(c+d*x)+27//560*a^4*d^-1*(44C+49B+56A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(7//16*x*a^4*(7C+8B+10A)+-2//15*a^4*d^-1*sin(c+d*x)^3*(7C+8B+10A)+1//30*d^-1*(a+a*cos(c+d*x))^4*(-1C+6B)*sin(c+d*x)+4//5*a^4*d^-1*(7C+8B+10A)*sin(c+d*x)+1//6*C*a^-1*d^-1*(a+a*cos(c+d*x))^5*sin(c+d*x)+1//40*a^4*d^-1*cos(c+d*x)^3*(7C+8B+10A)*sin(c+d*x)+27//80*a^4*d^-1*(7C+8B+10A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//8*x*a^4*(28C+35B+48A)+A*a^4*d^-1*arctanh(sin(c+d*x))+1//5*C*d^-1*(a+a*cos(c+d*x))^4*sin(c+d*x)+1//8*a^4*d^-1*(28C+35B+40A)*sin(c+d*x)+1//24*d^-1*(a^4+a^4*cos(c+d*x))*(28C+32A+35B)*sin(c+d*x)+1//60*d^-1*(a^2+a^2*cos(c+d*x))^2*(20A+28C+35B)*sin(c+d*x)+1//20*a*d^-1*(a+a*cos(c+d*x))^3*(4C+5B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*x*a^4*(35C+48B+52A)+A*d^-1*(a+a*cos(c+d*x))^4*tan(c+d*x)+a^4*d^-1*(B+4A)*arctanh(sin(c+d*x))+-1//12*d^-1*(a^2+a^2*cos(c+d*x))^2*(-7C+-4B+12A)*sin(c+d*x)+-1//24*d^-1*(a^4+a^4*cos(c+d*x))*(-35C+-32B+12A)*sin(c+d*x)+5//8*a^4*d^-1*(4A+7C+8B)*sin(c+d*x)+-1//4*a*d^-1*(a+a*cos(c+d*x))^3*(-1C+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^4*(8A+12C+13B)+(1/2)*a^4*d^-1*(2C+8B+13A)*arctanh(sin(c+d*x))+-5//2*a^4*d^-1*(A+-1B+-2C)*sin(c+d*x)+-1//6*d^-1*(a^2+a^2*cos(c+d*x))^2*(-2C+6B+15A)*sin(c+d*x)+-1//6*d^-1*(a^4+a^4*cos(c+d*x))*(-8C+3B+18A)*sin(c+d*x)+a*d^-1*(a+a*cos(c+d*x))^3*(B+2A)*tan(c+d*x)+(1/2)*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^4*(2A+8B+13C)+(1/2)*a^4*d^-1*(8C+12A+13B)*arctanh(sin(c+d*x))+-5//2*a^4*d^-1*(B+-1C+2A)*sin(c+d*x)+-1//6*d^-1*(a^4+a^4*cos(c+d*x))*(3C+18B+22A)*sin(c+d*x)+1//6*d^-1*(a^2+a^2*cos(c+d*x))^2*(6C+15B+16A)*tan(c+d*x)+1//3*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^2*tan(c+d*x)+1//6*a*d^-1*(a+a*cos(c+d*x))^3*(3B+4A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^4*(B+4C)+-5//8*a^4*d^-1*(4C+7A+8B)*sin(c+d*x)+1//8*a^4*d^-1*(35A+48B+52C)*arctanh(sin(c+d*x))+1//12*d^-1*(a^4+a^4*cos(c+d*x))*(35A+36C+44B)*tan(c+d*x)+1//4*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^3*tan(c+d*x)+1//8*d^-1*(a^2+a^2*cos(c+d*x))^2*(4C+7A+8B)*sec(c+d*x)*tan(c+d*x)+1//3*a*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^2*(A+B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^6*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*a^4+1//8*a^4*d^-1*(28A+35B+40C)*tan(c+d*x)+1//8*a^4*d^-1*(28A+35B+48C)*arctanh(sin(c+d*x))+1//5*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^4*tan(c+d*x)+1//24*d^-1*(a^4+a^4*cos(c+d*x))*(28A+32C+35B)*sec(c+d*x)*tan(c+d*x)+1//60*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^2*(20C+28A+35B)*tan(c+d*x)+1//20*a*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^3*(4A+5B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^7*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*a^4*d^-1*(72A+83B+100C)*tan(c+d*x)+7//16*a^4*d^-1*(7A+8B+10C)*arctanh(sin(c+d*x))+1//6*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^5*tan(c+d*x)+1//60*d^-1*sec(c+d*x)^2*(a^4+a^4*cos(c+d*x))*(43A+50C+52B)*tan(c+d*x)+1//120*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^3*(30C+37A+48B)*tan(c+d*x)+1//240*a^4*d^-1*(417A+488B+550C)*sec(c+d*x)*tan(c+d*x)+1//15*a*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^4*(2A+3B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^4*sec(c+d*x)^8*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//16*a^4*d^-1*(44A+49B+56C)*arctanh(sin(c+d*x))+1//105*a^4*d^-1*(454A+504B+581C)*tan(c+d*x)+1//7*A*d^-1*(a+a*cos(c+d*x))^4*sec(c+d*x)^6*tan(c+d*x)+1//16*a^4*d^-1*(44A+49B+56C)*sec(c+d*x)*tan(c+d*x)+1//70*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^4*(14C+16A+21B)*tan(c+d*x)+1//840*a^4*d^-1*sec(c+d*x)^2*(988A+1113B+1232C)*tan(c+d*x)+1//840*d^-1*sec(c+d*x)^3*(a^4+a^4*cos(c+d*x))*(436A+504C+511B)*tan(c+d*x)+1//42*a*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^5*(4A+7B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*x*a^-1*(-12B+12A+15C)+-1*a^-1*d^-1*(-4B+3A+4C)*sin(c+d*x)+1//3*a^-1*d^-1*sin(c+d*x)^3*(-4B+3A+4C)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^4*(A+C+-1B)*sin(c+d*x)+1//4*a^-1*d^-1*cos(c+d*x)^3*(-4B+4A+5C)*sin(c+d*x)+1//8*a^-1*d^-1*(-12B+12A+15C)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*x*a^-1*(-3B+2A+3C)+a^-1*d^-1*(-3B+3A+4C)*sin(c+d*x)+-1//3*a^-1*d^-1*sin(c+d*x)^3*(-3B+3A+4C)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^3*(A+C+-1B)*sin(c+d*x)+-1//2*a^-1*d^-1*(-3B+2A+3C)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :((1/2)*x*a^-1*(-2B+2A+3C)+-1*a^-1*d^-1*(A+-2B+2C)*sin(c+d*x)+(1/2)*a^-1*d^-1*(-2B+2A+3C)*cos(c+d*x)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^2*(A+C+-1B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^-1*(B+-1C)+C*a^-1*d^-1*sin(c+d*x)+a^-1*d^-1*(1+cos(c+d*x))^-1*(A+C+-1B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(C*x*a^-1+A*a^-1*d^-1*arctanh(sin(c+d*x))+-1*d^-1*(a+a*cos(c+d*x))^-1*(A+C+-1B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(C+-1B+2A)*tan(c+d*x)+-1*a^-1*d^-1*(A+-1B)*arctanh(sin(c+d*x))+-1*d^-1*(a+a*cos(c+d*x))^-1*(A+C+-1B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-1*d^-1*(-2B+2C+3A)*arctanh(sin(c+d*x))+-1*a^-1*d^-1*(C+-2B+2A)*tan(c+d*x)+(1/2)*a^-1*d^-1*(-2B+2C+3A)*sec(c+d*x)*tan(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*(A+C+-1B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(-3B+3C+4A)*tan(c+d*x)+-1//2*a^-1*d^-1*(-3B+2C+3A)*arctanh(sin(c+d*x))+1//3*a^-1*d^-1*tan(c+d*x)^3*(-3B+3C+4A)+-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^2*(A+C+-1B)*tan(c+d*x)+-1//2*a^-1*d^-1*(-3B+2C+3A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*x*a^-2*(-7B+4A+10C)+a^-2*d^-1*(-8B+5A+12C)*sin(c+d*x)+-1//3*a^-2*d^-1*sin(c+d*x)^3*(-8B+5A+12C)+-1//2*a^-2*d^-1*(-7B+4A+10C)*cos(c+d*x)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^4*(A+C+-1B)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^3*(-7B+4A+10C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^-2*(-4B+2A+7C)+-1//3*a^-2*d^-1*(-10B+4A+16C)*sin(c+d*x)+(1/2)*a^-2*d^-1*(-4B+2A+7C)*cos(c+d*x)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3*(A+C+-1B)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^2*(-5B+2A+8C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*a^-2*(B+-2C)+1//3*a^-2*d^-1*(A+-1B+4C)*sin(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*(B+-2C)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^2*(A+C+-1B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*a^-2+1//3*d^-1*(a+a*cos(c+d*x))^-2*(A+C+-1B)*sin(c+d*x)+1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*(A+-5C+2B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-2*d^-1*arctanh(sin(c+d*x))+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(A+C+-1B)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*(-1B+-2C+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-2*d^-1*(-1B+2A)*arctanh(sin(c+d*x))+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(A+C+-1B)*tan(c+d*x)+1//3*a^-2*d^-1*(C+-4B+10A)*tan(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*(-1B+2A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-2*d^-1*(-4B+2C+7A)*arctanh(sin(c+d*x))+-1//3*a^-2*d^-1*(-10B+4C+16A)*tan(c+d*x)+(1/2)*a^-2*d^-1*(-4B+2C+7A)*sec(c+d*x)*tan(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*(A+C+-1B)*sec(c+d*x)*tan(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*(-5B+2C+8A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-2*d^-1*(-8B+5C+12A)*tan(c+d*x)+-1//2*a^-2*d^-1*(-7B+4C+10A)*arctanh(sin(c+d*x))+1//3*a^-2*d^-1*tan(c+d*x)^3*(-8B+5C+12A)+-1//2*a^-2*d^-1*(-7B+4C+10A)*sec(c+d*x)*tan(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^2*(A+C+-1B)*tan(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^2*(-7B+4C+10A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*x*a^-3*(-13B+6A+23C)+-1//15*a^-3*d^-1*sin(c+d*x)^3*(-76B+36A+136C)+1//5*a^-3*d^-1*(-76B+36A+136C)*sin(c+d*x)+-1//2*a^-3*d^-1*(-13B+6A+23C)*cos(c+d*x)*sin(c+d*x)+-1//3*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^3*(-13B+6A+23C)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^5*(A+C+-1B)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^4*(-8B+3A+13C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^-3*(-6B+2A+13C)+-1//15*a^-3*d^-1*(-72B+22A+152C)*sin(c+d*x)+(1/2)*a^-3*d^-1*(-6B+2A+13C)*cos(c+d*x)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^4*(A+C+-1B)*sin(c+d*x)+-1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^2*(-36B+11A+76C)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3*(A+-6B+11C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^-3*(B+-3C)+-1*d^-1*(a^3+a^3*cos(c+d*x))^-1*(B+-3C)*sin(c+d*x)+1//15*a^-3*d^-1*(-7B+2A+27C)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^3*(A+C+-1B)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^2*(A+-9C+4B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(C*x*a^-3+1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-29C+4B+6A)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^2*(A+C+-1B)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-7C+2B+3A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(a+a*cos(c+d*x))^-3*(A+C+-1B)*sin(c+d*x)+1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(2A+3B+7C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-8C+2A+3B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-3*d^-1*arctanh(sin(c+d*x))+-1//5*d^-1*(a+a*cos(c+d*x))^-3*(A+C+-1B)*sin(c+d*x)+-1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-3C+-2B+22A)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-3C+-2B+7A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-3*d^-1*(-1B+3A)*arctanh(sin(c+d*x))+-1*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-1B+3A)*tan(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*(A+C+-1B)*tan(c+d*x)+1//15*a^-3*d^-1*(-22B+2C+72A)*tan(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(-1C+-4B+9A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*(-6B+2C+13A)*arctanh(sin(c+d*x))+-1//15*a^-3*d^-1*(-72B+22C+152A)*tan(c+d*x)+(1/2)*a^-3*d^-1*(-6B+2C+13A)*sec(c+d*x)*tan(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*(A+C+-1B)*sec(c+d*x)*tan(c+d*x)+-1//15*d^-1*(a^3+a^3*cos(c+d*x))^-1*(-36B+11C+76A)*sec(c+d*x)*tan(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*(C+-6B+11A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*a^-3*d^-1*(-13B+6C+23A)*arctanh(sin(c+d*x))+1//5*a^-3*d^-1*(-76B+36C+136A)*tan(c+d*x)+1//15*a^-3*d^-1*tan(c+d*x)^3*(-76B+36C+136A)+-1//2*a^-3*d^-1*(-13B+6C+23A)*sec(c+d*x)*tan(c+d*x)+-1//3*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^2*(-13B+6C+23A)*tan(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^2*(A+C+-1B)*tan(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^2*(-8B+3C+13A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*cos(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*a^-4*(-8B+2A+21C)+-1//105*a^-4*d^-1*(-664B+160A+1728C)*sin(c+d*x)+(1/2)*a^-4*d^-1*(-8B+2A+21C)*cos(c+d*x)*sin(c+d*x)+-1//7*d^-1*(a+a*cos(c+d*x))^-4*cos(c+d*x)^5*(A+C+-1B)*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^2*(-332B+80A+864C)*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*cos(c+d*x)^3*(-52B+10A+129C)*sin(c+d*x)+1//5*a^-1*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^4*(B+-2C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*a^-4*(B+-4C)+1//105*a^-4*d^-1*(-55B+6A+244C)*sin(c+d*x)+-1*a^-4*d^-1*(1+cos(c+d*x))^-1*(B+-4C)*sin(c+d*x)+-1//7*d^-1*(a+a*cos(c+d*x))^-4*cos(c+d*x)^4*(A+C+-1B)*sin(c+d*x)+1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^3*(-12C+2A+5B)*sin(c+d*x)+1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*cos(c+d*x)^2*(-88C+3A+25B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*a^-4+-1//7*d^-1*(a+a*cos(c+d*x))^-4*cos(c+d*x)^3*(A+C+-1B)*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(-55C+6B+8A)*sin(c+d*x)+1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*(-215C+12B+16A)*sin(c+d*x)+1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^2*(-10C+3B+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//7*d^-1*(a+a*cos(c+d*x))^-4*cos(c+d*x)^2*(A+C+-1B)*sin(c+d*x)+-1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*(B+-8C+6A)*sin(c+d*x)+1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*(8A+13B+36C)*sin(c+d*x)+1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(-54C+-2B+23A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//7*d^-1*(a+a*cos(c+d*x))^-4*(A+C+-1B)*sin(c+d*x)+1//105*d^-1*(a^2+a^2*cos(c+d*x))^-2*(6A+8B+13C)*sin(c+d*x)+1//105*d^-1*(a^4+a^4*cos(c+d*x))^-1*(6A+8B+13C)*sin(c+d*x)+1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*(-11C+3A+4B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-4*d^-1*arctanh(sin(c+d*x))+-1//7*d^-1*(a+a*cos(c+d*x))^-4*(A+C+-1B)*sin(c+d*x)+-1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*(-4C+-3B+10A)*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*(-8C+-6B+160A)*sin(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(-8C+-6B+55A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-4*d^-1*(-1B+4A)*arctanh(sin(c+d*x))+-1//7*d^-1*(a+a*cos(c+d*x))^-4*(A+C+-1B)*tan(c+d*x)+1//105*a^-4*d^-1*(-160B+6C+664A)*tan(c+d*x)+-1*a^-4*d^-1*(1+cos(c+d*x))^-1*(-1B+4A)*tan(c+d*x)+-1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*(-5B+-2C+12A)*tan(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(-25B+-3C+88A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-4*d^-1*(-8B+2C+21A)*arctanh(sin(c+d*x))+-1//105*a^-4*d^-1*(-664B+160C+1728A)*tan(c+d*x)+(1/2)*a^-4*d^-1*(-8B+2C+21A)*sec(c+d*x)*tan(c+d*x)+-1//7*d^-1*(a+a*cos(c+d*x))^-4*(A+C+-1B)*sec(c+d*x)*tan(c+d*x)+-1//5*a^-1*d^-1*(a+a*cos(c+d*x))^-3*(-1B+2A)*sec(c+d*x)*tan(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-1*(-332B+80C+864A)*sec(c+d*x)*tan(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*(-52B+10C+129A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-4*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*a^-4*d^-1*(-21B+8C+44A)*arctanh(sin(c+d*x))+1//35*a^-4*d^-1*(-864B+332C+1816A)*tan(c+d*x)+1//105*a^-4*d^-1*tan(c+d*x)^3*(-864B+332C+1816A)+-1//2*a^-4*d^-1*(-21B+8C+44A)*sec(c+d*x)*tan(c+d*x)+-1//7*d^-1*(a+a*cos(c+d*x))^-4*sec(c+d*x)^2*(A+C+-1B)*tan(c+d*x)+-1//3*a^-4*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^2*(-21B+8C+44A)*tan(c+d*x)+-1//35*a^-1*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^2*(-9B+2C+16A)*tan(c+d*x)+-1//105*a^-4*d^-1*(1+cos(c+d*x))^-2*sec(c+d*x)^2*(-87B+31C+178A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3465*d^-1*(a+a*cos(c+d*x))^(1/2)*(640C+704B+792A)*sin(c+d*x)+1//1155*a^-1*d^-1*(a+a*cos(c+d*x))^3//2*(320C+352B+396A)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^4*sin(c+d*x)+4//495*a*d^-1*(a+a*cos(c+d*x))^-1//2*(80C+88B+99A)*sin(c+d*x)+2//99*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^4*(C+11B)*sin(c+d*x)+2//693*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(80C+88B+99A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//315*d^-1*(a+a*cos(c+d*x))^(1/2)*(64C+72B+84A)*sin(c+d*x)+1//105*a^-1*d^-1*(a+a*cos(c+d*x))^3//2*(32C+36B+42A)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3*sin(c+d*x)+2//45*a*d^-1*(a+a*cos(c+d*x))^-1//2*(16C+18B+21A)*sin(c+d*x)+2//63*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(C+9B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//105*d^-1*(a+a*cos(c+d*x))^(1/2)*(-28B+36C+70A)*sin(c+d*x)+1//35*a^-1*d^-1*(a+a*cos(c+d*x))^3//2*(2C+14B)*sin(c+d*x)+2//7*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*(27C+35A+49B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(a+a*cos(c+d*x))^(1/2)*(-4C+10B)*sin(c+d*x)+2//5*C*a^-1*d^-1*(a+a*cos(c+d*x))^3//2*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^-1//2*(5B+7C+15A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^(1/2)*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*C*d^-1*(a+a*cos(c+d*x))^(1/2)*sin(c+d*x)+2//3*a*d^-1*(a+a*cos(c+d*x))^-1//2*(C+3B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(A*d^-1*(a+a*cos(c+d*x))^(1/2)*tan(c+d*x)+a^(1/2)*d^-1*(A+2B)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*a*d^-1*(a+a*cos(c+d*x))^-1//2*(A+-2C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^(1/2)*d^-1*(3A+4B+8C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)*tan(c+d*x)+1//4*a*d^-1*(a+a*cos(c+d*x))^-1//2*(A+4B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a^(1/2)*d^-1*(5A+6B+8C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//3*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^2*tan(c+d*x)+1//8*a*d^-1*(a+a*cos(c+d*x))^-1//2*(5A+6B+8C)*tan(c+d*x)+1//12*a*d^-1*(a+a*cos(c+d*x))^-1//2*(A+6B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//64*a^(1/2)*d^-1*(35A+40B+48C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3*tan(c+d*x)+1//64*a*d^-1*(a+a*cos(c+d*x))^-1//2*(35A+40B+48C)*tan(c+d*x)+1//24*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(A+8B)*tan(c+d*x)+1//96*a*d^-1*(a+a*cos(c+d*x))^-1//2*(35A+40B+48C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//1155*d^-1*(a+a*cos(c+d*x))^3//2*(672C+748B+858A)*sin(c+d*x)+-4//3465*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(336C+374B+429A)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^3*sin(c+d*x)+2//495*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(336C+374B+429A)*sin(c+d*x)+2//99*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3*(3C+11B)*sin(c+d*x)+2//693*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(84C+99A+110B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//315*d^-1*(a+a*cos(c+d*x))^3//2*(-36B+44C+126A)*sin(c+d*x)+1//21*a^-1*d^-1*(a+a*cos(c+d*x))^5//2*(2C+6B)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^2*sin(c+d*x)+2//315*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(47C+57B+63A)*sin(c+d*x)+8//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(47C+57B+63A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*d^-1*(a+a*cos(c+d*x))^3//2*(-4C+14B)*sin(c+d*x)+2//7*C*a^-1*d^-1*(a+a*cos(c+d*x))^5//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(19C+21B+35A)*sin(c+d*x)+8//105*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(19C+21B+35A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^3//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//5*C*d^-1*(a+a*cos(c+d*x))^3//2*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(3C+5B)*sin(c+d*x)+2//15*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(12C+15A+20B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(A*d^-1*(a+a*cos(c+d*x))^3//2*tan(c+d*x)+a^3//2*d^-1*(2B+3A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//3*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(-2C+3A)*sin(c+d*x)+-1//3*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(-8C+-6B+3A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^3//2*d^-1*(7A+8C+12B)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)*tan(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(-8C+4B+5A)*sin(c+d*x)+1//4*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(3A+4B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a^3//2*d^-1*(11A+14B+24C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//3*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^2*tan(c+d*x)+1//24*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(19A+24C+30B)*tan(c+d*x)+1//4*a*d^-1*(a+a*cos(c+d*x))^(1/2)*(A+2B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//64*a^3//2*d^-1*(75A+88B+112C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^3*tan(c+d*x)+1//64*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(75A+88B+112C)*tan(c+d*x)+1//24*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^2*(3A+8B)*tan(c+d*x)+1//96*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(39A+48C+56B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^6*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//128*a^3//2*d^-1*(133A+150B+176C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//5*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^4*tan(c+d*x)+1//128*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(133A+150B+176C)*tan(c+d*x)+1//40*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3*(3A+10B)*tan(c+d*x)+1//192*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*(133A+150B+176C)*sec(c+d*x)*tan(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(67A+80C+90B)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//45045*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(8368C+9230B+10439A)*sin(c+d*x)+2//13*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^3*sin(c+d*x)+2//6435*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(8368C+9230B+10439A)*sin(c+d*x)+2//15015*a*d^-1*(a+a*cos(c+d*x))^3//2*(8368C+9230B+10439A)*sin(c+d*x)+2//143*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^3*(5C+13B)*sin(c+d*x)+2//1287*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3*(136C+143A+182B)*sin(c+d*x)+2//9009*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(2224C+2522B+2717A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//693*d^-1*(a+a*cos(c+d*x))^5//2*(-44B+52C+198A)*sin(c+d*x)+1//99*a^-1*d^-1*(a+a*cos(c+d*x))^7//2*(10C+22B)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^2*sin(c+d*x)+2//1155*a*d^-1*(a+a*cos(c+d*x))^3//2*(125C+143B+165A)*sin(c+d*x)+16//3465*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(125C+143B+165A)*sin(c+d*x)+64//3465*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(125C+143B+165A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//63*d^-1*(a+a*cos(c+d*x))^5//2*(-4C+18B)*sin(c+d*x)+2//9*C*a^-1*d^-1*(a+a*cos(c+d*x))^7//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^3//2*(13C+15B+21A)*sin(c+d*x)+16//315*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(13C+15B+21A)*sin(c+d*x)+64//315*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(13C+15B+21A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^5//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//7*C*d^-1*(a+a*cos(c+d*x))^5//2*sin(c+d*x)+2//35*a*d^-1*(a+a*cos(c+d*x))^3//2*(5C+7B)*sin(c+d*x)+2//105*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(35A+40C+56B)*sin(c+d*x)+2//105*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(160C+224B+245A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(A*d^-1*(a+a*cos(c+d*x))^5//2*tan(c+d*x)+a^5//2*d^-1*(2B+5A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//5*a*d^-1*(a+a*cos(c+d*x))^3//2*(-2C+5A)*sin(c+d*x)+-1//15*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(-16C+-10B+15A)*sin(c+d*x)+1//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(15A+64C+70B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^5//2*d^-1*(8C+19A+20B)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)*tan(c+d*x)+-1//12*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(-8C+12B+21A)*sin(c+d*x)+-1//12*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(-56C+-12B+27A)*sin(c+d*x)+1//4*a*d^-1*(a+a*cos(c+d*x))^3//2*(4B+5A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a^5//2*d^-1*(25A+38B+40C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//24*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(-24C+49A+54B)*sin(c+d*x)+1//3*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^2*tan(c+d*x)+1//24*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(24C+31A+42B)*tan(c+d*x)+1//12*a*d^-1*(a+a*cos(c+d*x))^3//2*(5A+6B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//64*a^5//2*d^-1*(163A+200B+304C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^3*tan(c+d*x)+1//192*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(299A+392B+432C)*tan(c+d*x)+1//24*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^2*(5A+8B)*tan(c+d*x)+1//32*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*(16C+17A+24B)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^6*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//128*a^5//2*d^-1*(283A+326B+400C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//5*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^4*tan(c+d*x)+1//128*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(283A+326B+400C)*tan(c+d*x)+1//8*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^3*(A+2B)*tan(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^2*(79A+80C+110B)*tan(c+d*x)+1//960*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(787A+950B+1040C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^7*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//512*a^5//2*d^-1*(1015A+1132B+1304C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//6*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^5*tan(c+d*x)+1//512*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(1015A+1132B+1304C)*tan(c+d*x)+1//60*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^4*(5A+12B)*tan(c+d*x)+1//480*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3*(115A+120C+156B)*tan(c+d*x)+1//768*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*(1015A+1132B+1304C)*sec(c+d*x)*tan(c+d*x)+1//960*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(545A+628B+680C)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//315*d^-1*(a+a*cos(c+d*x))^-1//2*(-444B+572C+588A)*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//315*a^-1*d^-1*(a+a*cos(c+d*x))^(1/2)*(-186B+42A+58C)*sin(c+d*x)+1//63*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(-2C+18B)*sin(c+d*x)+1//105*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(-6B+38C+42A)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^4*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//105*d^-1*(a+a*cos(c+d*x))^-1//2*(-196B+140A+148C)*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//35*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(-2C+14B)*sin(c+d*x)+1//105*a^-1*d^-1*(a+a*cos(c+d*x))^(1/2)*(-14B+62C+70A)*sin(c+d*x)+2//7*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//15*d^-1*(a+a*cos(c+d*x))^-1//2*(-20B+28C+30A)*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^(1/2)*(-2C+10B)*sin(c+d*x)+2//5*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(a+a*cos(c+d*x))^-1//2*(-4C+6B)*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*C*a^-1*d^-1*(a+a*cos(c+d*x))^(1/2)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^-1//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2*C*d^-1*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(A*d^-1*(a+a*cos(c+d*x))^-1//2*tan(c+d*x)+-1*a^-1//2*d^-1*(A+-2B)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-1//2*(A+-4B)*tan(c+d*x)+1//4*a^-1//2*d^-1*(-4B+7A+8C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)*tan(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//8*a^-1//2*d^-1*(-14B+8C+9A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//8*d^-1*(a+a*cos(c+d*x))^-1//2*(-2B+7A+8C)*tan(c+d*x)+2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//12*d^-1*(a+a*cos(c+d*x))^-1//2*(A+-6B)*sec(c+d*x)*tan(c+d*x)+1//3*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//64*d^-1*(a+a*cos(c+d*x))^-1//2*(-56B+16C+21A)*tan(c+d*x)+1//64*a^-1//2*d^-1*(-72B+107A+112C)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//24*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(A+-8B)*tan(c+d*x)+1//4*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3*tan(c+d*x)+1//96*d^-1*(a+a*cos(c+d*x))^-1//2*(-8B+43A+48C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^4*(A+C+-1B)*sin(c+d*x)+-1//105*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(-651B+455A+799C)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(-15B+11A+19C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//210*a^-2*d^-1*(a+a*cos(c+d*x))^(1/2)*(-273B+245A+397C)*sin(c+d*x)+-1//70*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(-63B+35A+67C)*sin(c+d*x)+1//14*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3*(-7B+7A+11C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3*(A+C+-1B)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(-11B+7A+15C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//30*a^-2*d^-1*(a+a*cos(c+d*x))^(1/2)*(-35B+15A+39C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(-65B+45A+93C)*sin(c+d*x)+1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(-5B+5A+9C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^2*(A+C+-1B)*sin(c+d*x)+-1//3*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(-9B+3A+13C)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(-7B+3A+11C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//6*a^-2*d^-1*(a+a*cos(c+d*x))^(1/2)*(-3B+3A+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*d^-1*(a+a*cos(c+d*x))^-3//2*(A+C+-1B)*sin(c+d*x)+2*C*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(A+-7C+3B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^-3//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*(A+C+-1B)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(-1B+-3C+5A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-3//2*d^-1*(-2B+3A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*(A+C+-1B)*tan(c+d*x)+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(C+-1B+3A)*tan(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(C+-5B+9A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^-3//2*d^-1*(-12B+8C+19A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*(A+C+-1B)*sec(c+d*x)*tan(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(-9B+5C+13A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(-6B+2C+7A)*tan(c+d*x)+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(C+-1B+2A)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//8*a^-3//2*d^-1*(-38B+24C+47A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^2*(A+C+-1B)*tan(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(-13B+9C+17A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//8*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(-14B+12C+21A)*tan(c+d*x)+-1//12*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*(-12B+6C+13A)*sec(c+d*x)*tan(c+d*x)+1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^2*(-3B+3C+5A)*tan(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^4*(A+C+-1B)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*(-163B+75A+283C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//240*a^-3*d^-1*(a+a*cos(c+d*x))^(1/2)*(-475B+195A+787C)*sin(c+d*x)+1//120*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(-985B+465A+1729C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3*(-13B+5A+21C)*sin(c+d*x)+1//80*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^2*(-85B+45A+157C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^3*(A+C+-1B)*sin(c+d*x)+-1//24*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(-93B+21A+197C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(-75B+19A+163C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//48*a^-3*d^-1*(a+a*cos(c+d*x))^(1/2)*(-39B+15A+95C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^2*(A+-9B+17C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^2*(A+C+-1B)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-13C+3A+5B)*sin(c+d*x)+1//4*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(A+-1B+9C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(-75C+5A+19B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*d^-1*(a+a*cos(c+d*x))^-5//2*(A+C+-1B)*sin(c+d*x)+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-13C+3A+5B)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(3A+5B+19C)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2*A*a^-5//2*d^-1*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*(A+C+-1B)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-5C+-3B+11A)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*(-5C+-3B+43A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-5//2*d^-1*(-2B+5A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*(A+C+-1B)*tan(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-1C+-7B+15A)*tan(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(-11B+3C+35A)*tan(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(-43B+3C+115A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^-5//2*d^-1*(-20B+8C+39A)*arctanh(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*(A+C+-1B)*sec(c+d*x)*tan(c+d*x)+-1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(-35B+11C+63A)*tan(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*(-115B+43C+219A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*(-11B+3C+19A)*sec(c+d*x)*tan(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*(-15B+7C+31A)*sec(c+d*x)*tan(c+d*x))
@test integrate(cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//21*d^-1*(10C+14A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+6//5*B*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*(10C+14A)*sin(c+d*x)+2//5*B*d^-1*cos(c+d*x)^3//2*sin(c+d*x)+2//7*C*d^-1*cos(c+d*x)^5//2*sin(c+d*x))
@test integrate(cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(6C+10A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*B*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*B*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x)+2//5*C*d^-1*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*B*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2C+6A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*C*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate(cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(-2C+2A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*B*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2*B*d^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2A+6C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*B*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*A*d^-1*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(6A+10C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*B*d^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^-1//2*(6A+10C)*sin(c+d*x)+2//3*B*d^-1*cos(c+d*x)^-3//2*sin(c+d*x)+2//5*A*d^-1*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate(cos(c+d*x)^5//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//15*a*d^-1*(7B+7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+10//231*a*d^-1*(9C+11A+11B)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*a*d^-1*cos(c+d*x)^7//2*(B+C)*sin(c+d*x)+2//11*C*a*d^-1*cos(c+d*x)^9//2*sin(c+d*x)+2//45*a*d^-1*cos(c+d*x)^3//2*(7B+7C+9A)*sin(c+d*x)+2//77*a*d^-1*cos(c+d*x)^5//2*(9C+11A+11B)*sin(c+d*x)+10//231*a*d^-1*cos(c+d*x)^(1/2)*(9C+11A+11B)*sin(c+d*x))
@test integrate(cos(c+d*x)^3//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//15*a*d^-1*(7C+9A+9B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(5B+5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*a*d^-1*cos(c+d*x)^5//2*(B+C)*sin(c+d*x)+2//9*C*a*d^-1*cos(c+d*x)^7//2*sin(c+d*x)+2//21*a*d^-1*cos(c+d*x)^(1/2)*(5B+5C+7A)*sin(c+d*x)+2//45*a*d^-1*cos(c+d*x)^3//2*(7C+9A+9B)*sin(c+d*x))
@test integrate(cos(c+d*x)^(1/2)*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*a*d^-1*(3B+3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(5C+7A+7B)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*a*d^-1*cos(c+d*x)^3//2*(B+C)*sin(c+d*x)+2//7*C*a*d^-1*cos(c+d*x)^5//2*sin(c+d*x)+2//21*a*d^-1*cos(c+d*x)^(1/2)*(5C+7A+7B)*sin(c+d*x))
@test integrate(cos(c+d*x)^-1//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*a*d^-1*(B+C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*a*d^-1*(3C+5A+5B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^(1/2)*(B+C)*sin(c+d*x)+2//5*C*a*d^-1*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-3//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2*a*d^-1*(A+-1B+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*(C+3A+3B)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*a*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*C*a*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate(cos(c+d*x)^-5//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2*a*d^-1*(A+B+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*(A+3B+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*a*d^-1*cos(c+d*x)^-1//2*(A+B)*sin(c+d*x)+2//3*A*a*d^-1*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-7//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2//5*a*d^-1*(3A+5B+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*(A+B+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^-3//2*(A+B)*sin(c+d*x)+2//5*A*a*d^-1*cos(c+d*x)^-5//2*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^-1//2*(3A+5B+5C)*sin(c+d*x))
@test integrate(cos(c+d*x)^-9//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2//5*a*d^-1*(3A+3B+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(5A+7B+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*a*d^-1*cos(c+d*x)^-5//2*(A+B)*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^-1//2*(3A+3B+5C)*sin(c+d*x)+2//7*A*a*d^-1*cos(c+d*x)^-7//2*sin(c+d*x)+2//21*a*d^-1*cos(c+d*x)^-3//2*(5A+7B+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(4//15*a^2*d^-1*(7C+8B+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^2*d^-1*(50C+55B+66A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//99*d^-1*cos(c+d*x)^5//2*(a^2+a^2*cos(c+d*x))*(8C+22B)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^5//2*sin(c+d*x)+2//693*a^2*d^-1*cos(c+d*x)^5//2*(89C+99A+121B)*sin(c+d*x)+4//45*a^2*d^-1*cos(c+d*x)^3//2*(7C+8B+9A)*sin(c+d*x)+4//231*a^2*d^-1*cos(c+d*x)^(1/2)*(50C+55B+66A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(4//15*a^2*d^-1*(8C+9B+12A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*(5C+6B+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//63*d^-1*cos(c+d*x)^3//2*(a^2+a^2*cos(c+d*x))*(8C+18B)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^3//2*sin(c+d*x)+2//105*a^2*d^-1*cos(c+d*x)^3//2*(19C+21A+27B)*sin(c+d*x)+4//21*a^2*d^-1*cos(c+d*x)^(1/2)*(5C+6B+7A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(4//5*a^2*d^-1*(3C+4B+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*(6C+7B+14A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//35*d^-1*cos(c+d*x)^(1/2)*(a^2+a^2*cos(c+d*x))*(8C+14B)*sin(c+d*x)+2//7*C*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^(1/2)*sin(c+d*x)+2//105*a^2*d^-1*cos(c+d*x)^(1/2)*(33C+35A+49B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(4//3*a^2*d^-1*(C+2B+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//5*a^2*d^-1*(4C+5B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-1//2*sin(c+d*x)+-2//15*a^2*d^-1*cos(c+d*x)^(1/2)*(-7C+-5B+15A)*sin(c+d*x)+-1//5*d^-1*cos(c+d*x)^(1/2)*(a^2+a^2*cos(c+d*x))*(-2C+10A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4*a^2*d^-1*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^2*d^-1*(2A+2C+3B)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//3*a^2*d^-1*cos(c+d*x)^(1/2)*(-1C+3B+5A)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^-1//2*(a^2+a^2*cos(c+d*x))*(6B+8A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//5*a^2*d^-1*(4A+5B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^2*d^-1*(A+2B+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//15*d^-1*cos(c+d*x)^-3//2*(a^2+a^2*cos(c+d*x))*(8A+10B)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-5//2*sin(c+d*x)+2//15*a^2*d^-1*cos(c+d*x)^-1//2*(15C+17A+25B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//5*a^2*d^-1*(3A+4B+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*(6A+7B+14C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//35*d^-1*cos(c+d*x)^-5//2*(a^2+a^2*cos(c+d*x))*(8A+14B)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-7//2*sin(c+d*x)+2//105*a^2*d^-1*cos(c+d*x)^-3//2*(33A+35C+49B)*sin(c+d*x)+4//5*a^2*d^-1*cos(c+d*x)^-1//2*(3A+4B+5C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^2*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//15*a^2*d^-1*(8A+9B+12C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*(5A+6B+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//63*d^-1*cos(c+d*x)^-7//2*(a^2+a^2*cos(c+d*x))*(8A+18B)*sin(c+d*x)+2//9*A*d^-1*(a+a*cos(c+d*x))^2*cos(c+d*x)^-9//2*sin(c+d*x)+2//105*a^2*d^-1*cos(c+d*x)^-5//2*(19A+21C+27B)*sin(c+d*x)+4//15*a^2*d^-1*cos(c+d*x)^-1//2*(8A+9B+12C)*sin(c+d*x)+4//21*a^2*d^-1*cos(c+d*x)^-3//2*(5A+6B+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(4//195*a^3*d^-1*(175C+195B+221A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^3*d^-1*(95C+105B+121A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//1287*d^-1*cos(c+d*x)^5//2*(a^3+a^3*cos(c+d*x))*(286A+290C+390B)*sin(c+d*x)+2//13*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^5//2*sin(c+d*x)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*(95C+105B+121A)*sin(c+d*x)+4//585*a^3*d^-1*cos(c+d*x)^3//2*(175C+195B+221A)*sin(c+d*x)+20//9009*a^3*d^-1*cos(c+d*x)^5//2*(236C+273B+286A)*sin(c+d*x)+1//143*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^5//2*(12C+26B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(4//15*a^3*d^-1*(15C+17B+21A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^3*d^-1*(105C+121B+143A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//693*d^-1*cos(c+d*x)^3//2*(a^3+a^3*cos(c+d*x))*(198A+210C+286B)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^3//2*sin(c+d*x)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*(105C+121B+143A)*sin(c+d*x)+4//1155*a^3*d^-1*cos(c+d*x)^3//2*(210C+253B+264A)*sin(c+d*x)+1//99*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^3//2*(12C+22B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(4//15*a^3*d^-1*(17C+21B+27A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*(11C+13B+21A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//315*d^-1*cos(c+d*x)^(1/2)*(a^3+a^3*cos(c+d*x))*(126A+146C+198B)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^(1/2)*sin(c+d*x)+4//105*a^3*d^-1*cos(c+d*x)^(1/2)*(32C+41B+42A)*sin(c+d*x)+1//21*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(4C+6B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(4//5*a^3*d^-1*(5A+7C+9B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*(13C+21B+35A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-1//2*sin(c+d*x)+-4//105*a^3*d^-1*cos(c+d*x)^(1/2)*(-42B+-41C+35A)*sin(c+d*x)+-1//35*d^-1*cos(c+d*x)^(1/2)*(a^3+a^3*cos(c+d*x))*(-22C+-14B+70A)*sin(c+d*x)+-1//7*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(-2C+14A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//5*a^3*d^-1*(-9C+-5B+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^3*d^-1*(3C+5A+5B)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-4//15*a^3*d^-1*cos(c+d*x)^(1/2)*(-6C+5B+20A)*sin(c+d*x)+-1//15*d^-1*cos(c+d*x)^(1/2)*(a^3+a^3*cos(c+d*x))*(-6C+30B+70A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-3//2*sin(c+d*x)+a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-1//2*(2B+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//5*a^3*d^-1*(-5C+5B+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^3*d^-1*(3A+5B+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-4//15*a^3*d^-1*cos(c+d*x)^(1/2)*(5C+20B+21A)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^-1//2*(a^3+a^3*cos(c+d*x))*(30C+66A+70B)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-5//2*sin(c+d*x)+1//15*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-3//2*(10B+12A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//5*a^3*d^-1*(5C+7A+9B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*(13A+21B+35C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//15*d^-1*cos(c+d*x)^-3//2*(a^3+a^3*cos(c+d*x))*(10C+14A+18B)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-7//2*sin(c+d*x)+4//105*a^3*d^-1*cos(c+d*x)^-1//2*(106A+140C+147B)*sin(c+d*x)+1//35*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-5//2*(12A+14B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//15*a^3*d^-1*(17A+21B+27C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*(11A+13B+21C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//315*d^-1*cos(c+d*x)^-5//2*(a^3+a^3*cos(c+d*x))*(126C+146A+198B)*sin(c+d*x)+2//9*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-9//2*sin(c+d*x)+4//15*a^3*d^-1*cos(c+d*x)^-1//2*(17A+21B+27C)*sin(c+d*x)+4//105*a^3*d^-1*cos(c+d*x)^-3//2*(32A+41B+42C)*sin(c+d*x)+1//21*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-7//2*(4A+6B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*cos(c+d*x)^-13//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//15*a^3*d^-1*(15A+17B+21C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^3*d^-1*(105A+121B+143C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//693*d^-1*cos(c+d*x)^-7//2*(a^3+a^3*cos(c+d*x))*(198C+210A+286B)*sin(c+d*x)+2//11*A*d^-1*(a+a*cos(c+d*x))^3*cos(c+d*x)^-11//2*sin(c+d*x)+4//15*a^3*d^-1*cos(c+d*x)^-1//2*(15A+17B+21C)*sin(c+d*x)+4//231*a^3*d^-1*cos(c+d*x)^-3//2*(105A+121B+143C)*sin(c+d*x)+4//1155*a^3*d^-1*cos(c+d*x)^-5//2*(210A+253B+264C)*sin(c+d*x)+1//99*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*cos(c+d*x)^-9//2*(12A+22B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*a^-1*d^-1*(-21C+-15A+21B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*a^-1*d^-1*(-35B+35A+45C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^7//2*(A+C+-1B)*sin(c+d*x)+-1//5*a^-1*d^-1*cos(c+d*x)^3//2*(-7B+5A+7C)*sin(c+d*x)+1//7*a^-1*d^-1*cos(c+d*x)^5//2*(-7B+7A+9C)*sin(c+d*x)+1//21*a^-1*d^-1*cos(c+d*x)^(1/2)*(-35B+35A+45C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*a^-1*d^-1*(-5B+3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-1*d^-1*(-15B+15A+21C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^5//2*(A+C+-1B)*sin(c+d*x)+-1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*(-5B+3A+5C)*sin(c+d*x)+1//5*a^-1*d^-1*cos(c+d*x)^3//2*(-5B+5A+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-1*d^-1*(A+-3B+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-1*d^-1*(-3B+3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*(-3B+3A+5C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(A+B+-1C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+a^-1*d^-1*(A+-1B+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-1*d^-1*(A+-1B+-1C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*a^-1*d^-1*(C+-1B+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+a^-1*d^-1*cos(c+d*x)^-1//2*(C+-1B+3A)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(C+-3B+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-1*d^-1*(-3B+3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*a^-1*d^-1*cos(c+d*x)^-1//2*(C+-3B+3A)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+1//3*a^-1*d^-1*cos(c+d*x)^-3//2*(-3B+3C+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*a^-1*d^-1*(-5B+3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-1*d^-1*(-21A+-15C+15B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1*d^-1*(a+a*cos(c+d*x))^-1*cos(c+d*x)^-5//2*(A+C+-1B)*sin(c+d*x)+-1//3*a^-1*d^-1*cos(c+d*x)^-3//2*(-5B+3C+5A)*sin(c+d*x)+1//5*a^-1*d^-1*cos(c+d*x)^-5//2*(-5B+5C+7A)*sin(c+d*x)+1//5*a^-1*d^-1*cos(c+d*x)^-1//2*(-15B+15C+21A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*a^-2*d^-1*(-10B+5A+15C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-2*d^-1*(-35B+20A+56C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*(-10B+5A+15C)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^7//2*(A+C+-1B)*sin(c+d*x)+1//15*a^-2*d^-1*cos(c+d*x)^3//2*(-35B+20A+56C)*sin(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^5//2*(A+-2B+3C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-2*d^-1*(A+-4B+7C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(-5B+2A+10C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^5//2*(A+C+-1B)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*(-5B+2A+10C)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^3//2*(A+-4B+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-2*d^-1*(B+-4C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(A+-5C+2B)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+-5C+2B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-2*d^-1*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(B+2A+2C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+-1C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-2*d^-1*(-1B+4A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*(-1C+-2B+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+a^-2*d^-1*cos(c+d*x)^-1//2*(-1B+4A)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^-1//2*(-1C+-2B+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-2*d^-1*(C+-4B+7A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(-5B+2C+10A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*a^-2*d^-1*cos(c+d*x)^-1//2*(C+-4B+7A)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^-3//2*(-5B+2C+10A)*sin(c+d*x)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*cos(c+d*x)^-3//2*(C+-4B+7A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//6*a^-3*d^-1*(-33B+13A+63C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*(-119B+49A+231C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^9//2*(A+C+-1B)*sin(c+d*x)+-1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*(-33B+13A+63C)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^5//2*(-33B+13A+63C)*sin(c+d*x)+1//30*a^-3*d^-1*cos(c+d*x)^3//2*(-119B+49A+231C)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^7//2*(-7B+2A+12C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//10*a^-3*d^-1*(-49B+9A+119C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//6*a^-3*d^-1*(-13B+3A+33C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^7//2*(A+C+-1B)*sin(c+d*x)+-1//30*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^3//2*(-49B+9A+119C)*sin(c+d*x)+1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*(-13B+3A+33C)*sin(c+d*x)+1//3*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^5//2*(B+-2C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//10*a^-3*d^-1*(A+-49C+9B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//6*a^-3*d^-1*(A+-13C+3B)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^5//2*(A+C+-1B)*sin(c+d*x)+1//6*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+-13C+3B)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^3//2*(-8C+2A+3B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//6*a^-3*d^-1*(A+B+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*(A+-1B+-9C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(A+-1B+-9C)*sin(c+d*x)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^(1/2)*(B+-6C+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//6*a^-3*d^-1*(B+C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*(B+-1C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^(1/2)*(B+-1C+9A)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^(1/2)*(-1B+-4C+6A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//6*a^-3*d^-1*(-1C+-3B+13A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//10*a^-3*d^-1*(-1C+-9B+49A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x)+-1//6*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^-1//2*(-1C+-3B+13A)*sin(c+d*x)+1//10*a^-3*d^-1*cos(c+d*x)^-1//2*(-1C+-9B+49A)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^-1//2*(-3B+-2C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//6*a^-3*d^-1*(-13B+3C+33A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*(-49B+9C+119A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*cos(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+-1//10*a^-3*d^-1*cos(c+d*x)^-1//2*(-49B+9C+119A)*sin(c+d*x)+-1//30*d^-1*(a^3+a^3*cos(c+d*x))^-1*cos(c+d*x)^-3//2*(-49B+9C+119A)*sin(c+d*x)+1//6*a^-3*d^-1*cos(c+d*x)^-3//2*(-13B+3C+33A)*sin(c+d*x)+-1//3*a^-1*d^-1*(a+a*cos(c+d*x))^-2*cos(c+d*x)^-3//2*(-1B+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//64*a^(1/2)*d^-1*(35C+40B+48A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^5//2*sin(c+d*x)+1//24*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^5//2*(C+8B)*sin(c+d*x)+1//64*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(35C+40B+48A)*sin(c+d*x)+1//96*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(35C+40B+48A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a^(1/2)*d^-1*(5C+6B+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//3*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3//2*sin(c+d*x)+1//8*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(5C+6B+8A)*sin(c+d*x)+1//12*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(C+6B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^(1/2)*d^-1*(3C+4B+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*C*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*sin(c+d*x)+1//4*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(C+4B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^(1/2)*d^-1*(C+2B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*sin(c+d*x)+-1*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-1C+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*C*a^(1/2)*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*sin(c+d*x)+2//3*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(A+3B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(A+5B)*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(8A+10B+15C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+2//35*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(A+7B)*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(24A+28B+35C)*sin(c+d*x)+4//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(24A+28B+35C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*sin(c+d*x)+2//63*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(A+9B)*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(16A+18B+21C)*sin(c+d*x)+8//315*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(16A+18B+21C)*sin(c+d*x)+16//315*a*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(16A+18B+21C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//128*a^3//2*d^-1*(133C+150B+176A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//5*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^5//2*sin(c+d*x)+1//40*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^5//2*(3C+10B)*sin(c+d*x)+1//128*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(133C+150B+176A)*sin(c+d*x)+1//192*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(133C+150B+176A)*sin(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^5//2*(67C+80A+90B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//64*a^3//2*d^-1*(75C+88B+112A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^3//2*sin(c+d*x)+1//24*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3//2*(3C+8B)*sin(c+d*x)+1//64*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(75C+88B+112A)*sin(c+d*x)+1//96*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(39C+48A+56B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a^3//2*d^-1*(11C+14B+24A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//3*C*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^(1/2)*sin(c+d*x)+1//4*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(C+2B)*sin(c+d*x)+1//24*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(19C+24A+30B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^3//2*d^-1*(7C+8A+12B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-1//2*sin(c+d*x)+-1//2*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(-1C+4A)*sin(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-5C+-4B+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^3//2*d^-1*(2B+3C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-3//2*sin(c+d*x)+2*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*(A+B)*sin(c+d*x)+-1//3*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-3C+6B+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*C*a^3//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//5*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-5//2*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(3A+5B)*sin(c+d*x)+2//15*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(12A+15C+20B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*sin(c+d*x)+2//15*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(4A+5C+6B)*sin(c+d*x)+2//35*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(3A+7B)*sin(c+d*x)+2//105*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(104A+126B+175C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*sin(c+d*x)+2//21*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(A+3B)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(52A+63C+72B)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(136A+156B+189C)*sin(c+d*x)+4//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(136A+156B+189C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*cos(c+d*x)^-13//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//11*A*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*sin(c+d*x)+2//99*a*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*(3A+11B)*sin(c+d*x)+2//693*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(84A+99C+110B)*sin(c+d*x)+2//1155*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(336A+374B+429C)*sin(c+d*x)+8//3465*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(336A+374B+429C)*sin(c+d*x)+16//3465*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(336A+374B+429C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//512*a^5//2*d^-1*(1015C+1132B+1304A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//6*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^5//2*sin(c+d*x)+1//60*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^5//2*(5C+12B)*sin(c+d*x)+1//480*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^5//2*(115C+120A+156B)*sin(c+d*x)+1//512*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(1015C+1132B+1304A)*sin(c+d*x)+1//768*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(1015C+1132B+1304A)*sin(c+d*x)+1//960*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^5//2*(545C+628B+680A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//128*a^5//2*d^-1*(283C+326B+400A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//5*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^3//2*sin(c+d*x)+1//8*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^3//2*(C+2B)*sin(c+d*x)+1//128*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(283C+326B+400A)*sin(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^3//2*(79C+80A+110B)*sin(c+d*x)+1//960*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(787C+950B+1040A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//64*a^5//2*d^-1*(163C+200B+304A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*C*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^(1/2)*sin(c+d*x)+1//24*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^(1/2)*(5C+8B)*sin(c+d*x)+1//32*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(16A+17C+24B)*sin(c+d*x)+1//192*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(299C+392B+432A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*a^5//2*d^-1*(25C+38B+40A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-1//2*sin(c+d*x)+-1//3*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^(1/2)*(-1C+6A)*sin(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(-3C+-2B+8A)*sin(c+d*x)+-1//24*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-54B+-49C+24A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^5//2*d^-1*(8A+19C+20B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-3//2*sin(c+d*x)+-1//2*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^(1/2)*(-1C+4B+8A)*sin(c+d*x)+-1//12*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-27C+12B+56A)*sin(c+d*x)+2//3*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-1//2*(3B+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^5//2*d^-1*(2B+5C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//5*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-5//2*sin(c+d*x)+-1//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(15C+64A+70B)*sin(c+d*x)+2//3*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-3//2*(A+B)*sin(c+d*x)+2//5*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*(5C+8A+10B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*C*a^5//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//7*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-7//2*sin(c+d*x)+2//35*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-5//2*(5A+7B)*sin(c+d*x)+2//105*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(35C+40A+56B)*sin(c+d*x)+2//105*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(160A+224B+245C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-9//2*sin(c+d*x)+2//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(8A+10B+11C)*sin(c+d*x)+2//63*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*(5A+9B)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(63C+64A+90B)*sin(c+d*x)+2//315*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(584A+690B+903C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-13//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//11*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-11//2*sin(c+d*x)+2//99*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*(5A+11B)*sin(c+d*x)+2//231*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(32A+33C+44B)*sin(c+d*x)+2//3465*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(1160A+1364B+1485C)*sin(c+d*x)+2//3465*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(2840A+3212B+3795C)*sin(c+d*x)+4//3465*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(2840A+3212B+3795C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*cos(c+d*x)^-15//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//13*A*d^-1*(a+a*cos(c+d*x))^5//2*cos(c+d*x)^-13//2*sin(c+d*x)+2//143*a*d^-1*(a+a*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*(5A+13B)*sin(c+d*x)+2//1287*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*(136A+143C+182B)*sin(c+d*x)+2//9009*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(2224A+2522B+2717C)*sin(c+d*x)+2//15015*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(8368A+9230B+10439C)*sin(c+d*x)+8//45045*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(8368A+9230B+10439C)*sin(c+d*x)+16//45045*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(8368A+9230B+10439C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//8*a^-1//2*d^-1*(-14B+8A+9C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+1//3*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^5//2*sin(c+d*x)+1//8*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-2B+7C+8A)*sin(c+d*x)+1//12*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(-1C+6B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^-1//2*d^-1*(-4B+7C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+1//4*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-1C+4B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1//2*d^-1*(-1C+2B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+C*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*C*a^-1//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+2*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//3*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(-6B+2A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//15*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(-10B+2A)*sin(c+d*x)+1//15*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(-10B+26A+30C)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2^(1/2)*a^-1//2*d^-1*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//35*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(-14B+2A)*sin(c+d*x)+-1//105*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(-182B+70C+86A)*sin(c+d*x)+1//105*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(-14B+62A+70C)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(A*a+(A*b+B*a)*cos(c+d*x)+B*b*cos(c+d*x)^2), x) == :(1//4*a^-1//2*d^-1*(-4*A*b+-4*B*a+7*B*b+8*A*a)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-1*B*b+4*A*b+4*B*a)*sin(c+d*x)+(1/2)*B*b*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*(A+-1B)*(a+-1b)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*a^-3//2*d^-1*(-12B+8A+19C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^5//2*(A+C+-1B)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(-9B+5A+13C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^3//2*(A+-1B+2C)*sin(c+d*x)+-1//4*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-6B+2A+7C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-3//2*d^-1*(-3C+2B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(A+-5B+9C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(A+-1B+3C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*C*a^-3//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(B+-5C+3A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(-1C+-3B+7A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(C+-1B+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*(-7B+3C+11A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(-15B+3C+19A)*sin(c+d*x)+1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(-3B+3C+7A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-5//2*(A+C+-1B)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*(-11B+7C+15A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//30*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(-35B+15C+39A)*sin(c+d*x)+1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(-5B+5C+9A)*sin(c+d*x)+1//30*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(-95B+75C+147A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-5//2*d^-1*(-5C+2B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^5//2*(A+C+-1B)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(-43B+3A+115C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^3//2*(A+-15C+7B)*sin(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^(1/2)*(-11B+3A+35C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*C*a^-5//2*d^-1*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(-43C+3B+5A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^(1/2)*(-11C+3B+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(3C+5B+19A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^(1/2)*(-1B+-7C+9A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*(-19B+-5C+75A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-1//2*(-5B+-3C+13A)*sin(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(C+-9B+49A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*cos(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*(-75B+19C+163A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x))+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*cos(c+d*x)^-3//2*(C+-9B+17A)*sin(c+d*x)+-1//48*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(-147B+27C+299A)*sin(c+d*x)+1//48*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-3//2*(-39B+15C+95A)*sin(c+d*x))
@test integrate(cos(c+d*x)^2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(1//8*a*x*(3C+4A)+-1//15*b*d^-1*sin(c+d*x)^3*(4C+5A)+1//5*b*d^-1*(4C+5A)*sin(c+d*x)+1//4*C*a*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//5*C*b*d^-1*cos(c+d*x)^4*sin(c+d*x)+1//8*a*d^-1*(3C+4A)*cos(c+d*x)*sin(c+d*x))
@test integrate((A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x))*cos(c+d*x), x) == :(1//8*b*x*(3C+4A)+1//3*a*d^-1*(2C+3A)*sin(c+d*x)+1//3*C*a*d^-1*cos(c+d*x)^2*sin(c+d*x)+1//4*C*b*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//8*b*d^-1*(3C+4A)*cos(c+d*x)*sin(c+d*x))
@test integrate((A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :((1/2)*a*x*(C+2A)+-1//3*b^-1*d^-1*(C*a^2+-1*b^2*(2C+3A))*sin(c+d*x)+-1//6*C*a*d^-1*cos(c+d*x)*sin(c+d*x)+1//3*C*b^-1*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x))
@test integrate((A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x))*sec(c+d*x), x) == :((1/2)*b*x*(C+2A)+A*a*d^-1*arctanh(sin(c+d*x))+C*a*d^-1*sin(c+d*x)+(1/2)*C*b*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(sec(c+d*x)^2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(C*a*x+A*a*d^-1*tan(c+d*x)+A*b*d^-1*arctanh(sin(c+d*x))+C*b*d^-1*sin(c+d*x))
@test integrate(sec(c+d*x)^3*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(C*b*x+A*b*d^-1*tan(c+d*x)+(1/2)*a*d^-1*(A+2C)*arctanh(sin(c+d*x))+(1/2)*A*a*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^4*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :((1/2)*b*d^-1*(A+2C)*arctanh(sin(c+d*x))+1//3*a*d^-1*(2A+3C)*tan(c+d*x)+(1/2)*A*b*d^-1*sec(c+d*x)*tan(c+d*x)+1//3*A*a*d^-1*sec(c+d*x)^2*tan(c+d*x))
@test integrate(sec(c+d*x)^5*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(1//3*b*d^-1*(2A+3C)*tan(c+d*x)+1//8*a*d^-1*(3A+4C)*arctanh(sin(c+d*x))+1//3*A*b*d^-1*sec(c+d*x)^2*tan(c+d*x)+1//4*A*a*d^-1*sec(c+d*x)^3*tan(c+d*x)+1//8*a*d^-1*(3A+4C)*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^6*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(1//5*a*d^-1*(4A+5C)*tan(c+d*x)+1//8*b*d^-1*(3A+4C)*arctanh(sin(c+d*x))+1//15*a*d^-1*tan(c+d*x)^3*(4A+5C)+1//4*A*b*d^-1*sec(c+d*x)^3*tan(c+d*x)+1//5*A*a*d^-1*sec(c+d*x)^4*tan(c+d*x)+1//8*b*d^-1*(3A+4C)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(x*(1//16*a^2*(6C+8A)+1//16*b^2*(5C+6A))+1//16*d^-1*(a^2*(6C+8A)+b^2*(5C+6A))*cos(c+d*x)*sin(c+d*x)+1//24*d^-1*cos(c+d*x)^3*(b^2*(5C+6A)+2*C*a^2)*sin(c+d*x)+-2//15*a*b*d^-1*sin(c+d*x)^3*(4C+5A)+1//6*C*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^3*sin(c+d*x)+2//5*a*b*d^-1*(4C+5A)*sin(c+d*x)+1//15*C*a*b*d^-1*cos(c+d*x)^4*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//15*d^-1*(2*b^2*(4C+5A)+5*a^2*(2C+3A))*sin(c+d*x)+1//4*a*b*x*(3C+4A)+1//15*d^-1*cos(c+d*x)^2*(b^2*(4C+5A)+2*C*a^2)*sin(c+d*x)+1//5*C*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^2*sin(c+d*x)+1//4*a*b*d^-1*(3C+4A)*cos(c+d*x)*sin(c+d*x)+1//10*C*a*b*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(A+C*cos(c+d*x)^2), x) == :(x*((1/2)*a^2*(C+2A)+1//8*b^2*(3C+4A))+-1//24*d^-1*(-3*b^2*(3C+4A)+2*C*a^2)*cos(c+d*x)*sin(c+d*x)+1//4*C*b^-1*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//6*a*b^-1*d^-1*(-1*C*a^2+8*C*b^2+12*A*b^2)*sin(c+d*x)+-1//12*C*a*b^-1*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//3*d^-1*(C*(2*a^2+2*b^2)+3*A*b^2)*sin(c+d*x)+A*a^2*d^-1*arctanh(sin(c+d*x))+a*b*x*(C+2A)+1//3*C*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x)+1//3*C*a*b*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(x*(A*b^2+(1/2)*C*(b^2+2*a^2))+A*d^-1*(a+b*cos(c+d*x))^2*tan(c+d*x)+-2*a*b*d^-1*(A+-1C)*sin(c+d*x)+2*A*a*b*d^-1*arctanh(sin(c+d*x))+-1//2*b^2*d^-1*(-1C+2A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*d^-1*(a^2*(A+2C)+2*A*b^2)*arctanh(sin(c+d*x))+2*C*a*b*x+-1//2*b^2*d^-1*(A+-2C)*sin(c+d*x)+A*a*b*d^-1*tan(c+d*x)+(1/2)*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(C*x*b^2+1//3*d^-1*(a^2*(2A+3C)+2*A*b^2)*tan(c+d*x)+a*b*d^-1*(A+2C)*arctanh(sin(c+d*x))+1//3*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^2*tan(c+d*x)+1//3*A*a*b*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(1//8*d^-1*(a^2*(3A+4C)+4*b^2*(A+2C))*arctanh(sin(c+d*x))+1//8*d^-1*(a^2*(3A+4C)+2*A*b^2)*sec(c+d*x)*tan(c+d*x)+1//4*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3*tan(c+d*x)+2//3*a*b*d^-1*(2A+3C)*tan(c+d*x)+1//6*A*a*b*d^-1*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^6*(A+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(2*a^2*(4A+5C)+5*b^2*(2A+3C))*tan(c+d*x)+1//15*d^-1*sec(c+d*x)^2*(a^2*(4A+5C)+2*A*b^2)*tan(c+d*x)+1//4*a*b*d^-1*(3A+4C)*arctanh(sin(c+d*x))+1//5*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^4*tan(c+d*x)+1//4*a*b*d^-1*(3A+4C)*sec(c+d*x)*tan(c+d*x)+1//10*A*a*b*d^-1*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//16*b*x*(b^2*(5C+6A)+6*a^2*(3C+4A))+1//15*a*d^-1*(5*a^2*(2C+3A)+6*b^2*(4C+5A))*sin(c+d*x)+1//6*C*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^2*sin(c+d*x)+1//15*a*d^-1*cos(c+d*x)^2*(C*(a^2+12*b^2)+15*A*b^2)*sin(c+d*x)+1//16*b*d^-1*(b^2*(5C+6A)+6*a^2*(3C+4A))*cos(c+d*x)*sin(c+d*x)+1//120*b*d^-1*cos(c+d*x)^3*(5*b^2*(5C+6A)+6*C*a^2)*sin(c+d*x)+1//10*C*a*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(A+C*cos(c+d*x)^2), x) == :(1//8*a*x*(3*b^2*(3C+4A)+4*a^2*(C+2A))+-1//30*b^-1*d^-1*(-4*b^4*(4C+5A)+3*C*a^4+-4*a^2*b^2*(13C+20A))*sin(c+d*x)+-1//60*b^-1*d^-1*(a+b*cos(c+d*x))^2*(-4*b^2*(4C+5A)+3*C*a^2)*sin(c+d*x)+1//5*C*b^-1*d^-1*(a+b*cos(c+d*x))^4*sin(c+d*x)+1//120*a*d^-1*(-6*C*a^2+71*C*b^2+100*A*b^2)*cos(c+d*x)*sin(c+d*x)+-1//20*C*a*b^-1*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//8*b*x*(b^2*(3C+4A)+12*a^2*(C+2A))+A*a^3*d^-1*arctanh(sin(c+d*x))+(1/2)*a*d^-1*(C*(a^2+4*b^2)+6*A*b^2)*sin(c+d*x)+1//4*C*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//4*C*a*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x)+1//8*b*d^-1*(b^2*(3C+4A)+2*C*a^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :((1/2)*a*x*(2*C*a^2+3*C*b^2+6*A*b^2)+A*d^-1*(a+b*cos(c+d*x))^3*tan(c+d*x)+-1//3*b*d^-1*(a^2*(-8C+6A)+-1*b^2*(2C+3A))*sin(c+d*x)+3*A*b*a^2*d^-1*arctanh(sin(c+d*x))+-1//3*b*d^-1*(a+b*cos(c+d*x))^2*(-1C+3A)*sin(c+d*x)+-1//6*a*b^2*d^-1*(-5C+6A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*b*x*(C*(b^2+6*a^2)+2*A*b^2)+(1/2)*a*d^-1*(a^2*(A+2C)+6*A*b^2)*arctanh(sin(c+d*x))+(1/2)*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)*tan(c+d*x)+-3//2*a*b^2*d^-1*(-2C+3A)*sin(c+d*x)+-1//2*b^3*d^-1*(-1C+4A)*cos(c+d*x)*sin(c+d*x)+3//2*A*b*d^-1*(a+b*cos(c+d*x))^2*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :((1/2)*b*d^-1*(2*A*b^2+3*a^2*(A+2C))*arctanh(sin(c+d*x))+3*C*a*x*b^2+-1//6*b^3*d^-1*(-6C+5A)*sin(c+d*x)+1//3*a*d^-1*(a^2*(2A+3C)+3*A*b^2)*tan(c+d*x)+1//3*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^2*tan(c+d*x)+(1/2)*A*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(C*x*b^3+(1/2)*b*d^-1*(A*b^2+a^2*(4A+6C))*tan(c+d*x)+1//8*a*d^-1*(a^2*(3A+4C)+12*b^2*(A+2C))*arctanh(sin(c+d*x))+1//4*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^3*tan(c+d*x)+1//8*a*d^-1*(a^2*(3A+4C)+2*A*b^2)*sec(c+d*x)*tan(c+d*x)+1//4*A*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^6*(A+C*cos(c+d*x)^2), x) == :(1//8*b*d^-1*(3*a^2*(3A+4C)+4*b^2*(A+2C))*arctanh(sin(c+d*x))+1//15*a*d^-1*(2*a^2*(4A+5C)+15*b^2*(2A+3C))*tan(c+d*x)+1//5*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^4*tan(c+d*x)+1//30*a*d^-1*sec(c+d*x)^2*(2*a^2*(4A+5C)+3*A*b^2)*tan(c+d*x)+3//40*b*d^-1*(2*A*b^2+5*a^2*(3A+4C))*sec(c+d*x)*tan(c+d*x)+3//20*A*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^7*(A+C*cos(c+d*x)^2), x) == :(1//15*b*d^-1*(5*b^2*(2A+3C)+6*a^2*(4A+5C))*tan(c+d*x)+1//16*a*d^-1*(a^2*(5A+6C)+6*b^2*(3A+4C))*arctanh(sin(c+d*x))+1//6*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^5*tan(c+d*x)+1//15*b*d^-1*sec(c+d*x)^2*(A*b^2+3*a^2*(4A+5C))*tan(c+d*x)+1//16*a*d^-1*(a^2*(5A+6C)+6*b^2*(3A+4C))*sec(c+d*x)*tan(c+d*x)+1//120*a*d^-1*sec(c+d*x)^3*(5*a^2*(5A+6C)+6*A*b^2)*tan(c+d*x)+1//10*A*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^4*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//105*d^-1*(8*b^4*(6C+7A)+35*a^4*(2C+3A)+84*a^2*b^2*(4C+5A))*sin(c+d*x)+1//4*a*b*x*(a^2*(6C+8A)+b^2*(5C+6A))+1//105*d^-1*cos(c+d*x)^2*(4*C*a^4+4*b^4*(6C+7A)+3*a^2*b^2*(50C+63A))*sin(c+d*x)+1//7*C*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^2*sin(c+d*x)+1//35*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^2*(b^2*(6C+7A)+2*C*a^2)*sin(c+d*x)+1//4*a*b*d^-1*(a^2*(6C+8A)+b^2*(5C+6A))*cos(c+d*x)*sin(c+d*x)+1//210*a*b*d^-1*cos(c+d*x)^3*(6*C*a^2+103*C*b^2+126*A*b^2)*sin(c+d*x)+2//21*C*a*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*(A+C*cos(c+d*x)^2), x) == :(x*((1/2)*a^4*(C+2A)+1//16*b^4*(5C+6A)+3//4*a^2*b^2*(3C+4A))+-1//240*d^-1*(-15*b^4*(5C+6A)+8*C*a^4+-2*a^2*b^2*(89C+130A))*cos(c+d*x)*sin(c+d*x)+-1//60*a*b^-1*d^-1*(-32*b^4*(4C+5A)+4*C*a^4+-1*a^2*b^2*(121C+190A))*sin(c+d*x)+-1//120*b^-1*d^-1*(a+b*cos(c+d*x))^3*(-5*b^2*(5C+6A)+4*C*a^2)*sin(c+d*x)+1//6*C*b^-1*d^-1*(a+b*cos(c+d*x))^5*sin(c+d*x)+-1//30*C*a*b^-1*d^-1*(a+b*cos(c+d*x))^4*sin(c+d*x)+1//120*a*b^-1*d^-1*(a+b*cos(c+d*x))^2*(-4*C*a^2+53*C*b^2+70*A*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//15*d^-1*(2*b^4*(4C+5A)+6*C*a^4+a^2*b^2*(56C+85A))*sin(c+d*x)+A*a^4*d^-1*arctanh(sin(c+d*x))+(1/2)*a*b*x*(b^2*(3C+4A)+4*a^2*(C+2A))+1//5*C*d^-1*(a+b*cos(c+d*x))^4*sin(c+d*x)+1//15*d^-1*(a+b*cos(c+d*x))^2*(b^2*(4C+5A)+3*C*a^2)*sin(c+d*x)+1//5*C*a*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//30*a*b*d^-1*(6*C*a^2+29*C*b^2+40*A*b^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(x*(C*a^4+1//8*b^4*(3C+4A)+3*a^2*b^2*(C+2A))+A*d^-1*(a+b*cos(c+d*x))^4*tan(c+d*x)+4*A*b*a^3*d^-1*arctanh(sin(c+d*x))+-1//4*b*d^-1*(a+b*cos(c+d*x))^3*(-1C+4A)*sin(c+d*x)+-1//6*a*b*d^-1*(a^2*(-19C+12A)+-8*b^2*(2C+3A))*sin(c+d*x)+-1//24*b^2*d^-1*(a^2*(-26C+24A)+-3*b^2*(3C+4A))*cos(c+d*x)*sin(c+d*x)+-1//12*a*b*d^-1*(a+b*cos(c+d*x))^2*(-7C+12A)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^2*d^-1*(a^2*(A+2C)+12*A*b^2)*arctanh(sin(c+d*x))+2*a*b*x*(C*(b^2+2*a^2)+2*A*b^2)+-1//6*b^2*d^-1*(a^2*(-34C+39A)+-2*b^2*(2C+3A))*sin(c+d*x)+(1/2)*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)*tan(c+d*x)+2*A*b*d^-1*(a+b*cos(c+d*x))^3*tan(c+d*x)+-1//6*b^2*d^-1*(a+b*cos(c+d*x))^2*(-2C+15A)*sin(c+d*x)+-1//3*a*b^3*d^-1*(-4C+9A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*b^2*(C*(b^2+12*a^2)+2*A*b^2)+1//3*d^-1*(a+b*cos(c+d*x))^2*(a^2*(2A+3C)+6*A*b^2)*tan(c+d*x)+2*a*b*d^-1*(a^2*(A+2C)+2*A*b^2)*arctanh(sin(c+d*x))+-2//3*a*b*d^-1*(a^2*(2A+3C)+b^2*(-6C+11A))*sin(c+d*x)+-1//6*b^2*d^-1*(a^2*(4A+6C)+3*b^2*(-1C+6A))*cos(c+d*x)*sin(c+d*x)+1//3*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^2*tan(c+d*x)+2//3*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^5*(A+C*cos(c+d*x)^2), x) == :(1//8*d^-1*(a^4*(3A+4C)+8*A*b^4+24*a^2*b^2*(A+2C))*arctanh(sin(c+d*x))+4*C*a*x*b^3+-1//24*b^2*d^-1*(2*b^2*(-12C+13A)+3*a^2*(3A+4C))*sin(c+d*x)+1//4*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^3*tan(c+d*x)+1//8*d^-1*(a+b*cos(c+d*x))^2*(a^2*(3A+4C)+4*A*b^2)*sec(c+d*x)*tan(c+d*x)+1//12*a*b*d^-1*(a^2*(23A+36C)+12*A*b^2)*tan(c+d*x)+1//3*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^6*(A+C*cos(c+d*x)^2), x) == :(C*x*b^4+1//15*d^-1*(2*a^4*(4A+5C)+6*A*b^4+a^2*b^2*(56A+85C))*tan(c+d*x)+(1/2)*a*b*d^-1*(a^2*(3A+4C)+4*b^2*(A+2C))*arctanh(sin(c+d*x))+1//5*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^4*tan(c+d*x)+1//15*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^2*(a^2*(4A+5C)+3*A*b^2)*tan(c+d*x)+1//5*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^3*tan(c+d*x)+1//30*a*b*d^-1*(a^2*(29A+40C)+6*A*b^2)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^7*(A+C*cos(c+d*x)^2), x) == :(1//16*d^-1*(a^4*(5A+6C)+8*b^4*(A+2C)+12*a^2*b^2*(3A+4C))*arctanh(sin(c+d*x))+1//240*d^-1*(15*a^4*(5A+6C)+24*A*b^4+10*a^2*b^2*(49A+66C))*sec(c+d*x)*tan(c+d*x)+1//6*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^5*tan(c+d*x)+1//120*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3*(5*a^2*(5A+6C)+12*A*b^2)*tan(c+d*x)+4//15*a*b*d^-1*(2*a^2*(4A+5C)+5*b^2*(2A+3C))*tan(c+d*x)+1//60*a*b*d^-1*sec(c+d*x)^2*(a^2*(39A+50C)+4*A*b^2)*tan(c+d*x)+2//15*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^4*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^8*(A+C*cos(c+d*x)^2), x) == :(1//105*d^-1*(8*a^4*(6A+7C)+35*b^4*(2A+3C)+84*a^2*b^2*(4A+5C))*tan(c+d*x)+1//105*d^-1*sec(c+d*x)^2*(4*A*b^4+4*a^4*(6A+7C)+3*a^2*b^2*(50A+63C))*tan(c+d*x)+1//4*a*b*d^-1*(a^2*(5A+6C)+2*b^2*(3A+4C))*arctanh(sin(c+d*x))+1//7*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^6*tan(c+d*x)+1//35*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^4*(a^2*(6A+7C)+2*A*b^2)*tan(c+d*x)+1//4*a*b*d^-1*(a^2*(5A+6C)+2*b^2*(3A+4C))*sec(c+d*x)*tan(c+d*x)+1//210*a*b*d^-1*sec(c+d*x)^3*(a^2*(103A+126C)+6*A*b^2)*tan(c+d*x)+2//21*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^5*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(1//8*a*x*(-9*b^4+8*a^4+8*a^2*b^2)+-1//5*b*d^-1*(a+b*cos(c+d*x))^4*sin(c+d*x)+1//30*b*d^-1*(-16*b^4+83*a^4+-32*a^2*b^2)*sin(c+d*x)+1//20*a*b*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//60*b*d^-1*(a+b*cos(c+d*x))^2*(-16*b^2+23*a^2)*sin(c+d*x)+1//120*a*b^2*d^-1*(-71*b^2+106*a^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(1//8*x*(-3*b^4+8*a^4)+-1//4*b*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//6*a*b*d^-1*(-8*b^2+13*a^2)*sin(c+d*x)+1//12*a*b*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x)+1//24*b^2*d^-1*(-9*b^2+14*a^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))*(a^2+-1*b^2*cos(c+d*x)^2), x) == :((1/2)*a*x*(-1*b^2+2*a^2)+-1//3*b*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x)+2//3*b*d^-1*(-1*b^2+2*a^2)*sin(c+d*x)+1//6*a*b^2*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(1//8*x*b^-5*(b^4*(3C+4A)+8*C*a^4+4*a^2*b^2*(C+2A))+-1//3*a*b^-4*d^-1*(2*C*b^2+3*A*b^2+3*C*a^2)*sin(c+d*x)+1//4*C*b^-1*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//8*b^-3*d^-1*(b^2*(3C+4A)+4*C*a^2)*cos(c+d*x)*sin(c+d*x)+-1//3*C*a*b^-2*d^-1*cos(c+d*x)^2*sin(c+d*x)+-2*a^3*b^-5*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+C*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1//2*a*x*b^-4*(C*(b^2+2*a^2)+2*A*b^2)+1//3*b^-3*d^-1*(b^2*(2C+3A)+3*C*a^2)*sin(c+d*x)+1//3*C*b^-1*d^-1*cos(c+d*x)^2*sin(c+d*x)+-1//2*C*a*b^-2*d^-1*cos(c+d*x)*sin(c+d*x)+2*a^2*b^-4*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+C*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :((1/2)*x*b^-3*(b^2*(C+2A)+2*C*a^2)+(1/2)*C*b^-1*d^-1*cos(c+d*x)*sin(c+d*x)+-1*C*a*b^-2*d^-1*sin(c+d*x)+-2*a*b^-3*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+C*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(A+C*cos(c+d*x)^2), x) == :(C*b^-1*d^-1*sin(c+d*x)+-1*C*a*x*b^-2+b^-2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(2*A*b^2+2*C*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(C*x*b^-1+A*a^-1*d^-1*arctanh(sin(c+d*x))+-1*a^-1*b^-1*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(2*A*b^2+2*C*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(A*a^-1*d^-1*tan(c+d*x)+-1*A*b*a^-2*d^-1*arctanh(sin(c+d*x))+a^-2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(2*A*b^2+2*C*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*(a^2*(A+2C)+2*A*b^2)*arctanh(sin(c+d*x))+(1/2)*A*a^-1*d^-1*sec(c+d*x)*tan(c+d*x)+-1*A*b*a^-2*d^-1*tan(c+d*x)+-2*b*a^-3*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+C*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(1//3*a^-3*d^-1*(a^2*(2A+3C)+3*A*b^2)*tan(c+d*x)+-1//2*b*a^-4*d^-1*(a^2*(A+2C)+2*A*b^2)*arctanh(sin(c+d*x))+1//3*A*a^-1*d^-1*sec(c+d*x)^2*tan(c+d*x)+-1//2*A*b*a^-2*d^-1*sec(c+d*x)*tan(c+d*x)+2*a^-4*b^2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+C*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-1*a*x*b^-5*(C*(b^2+4*a^2)+2*A*b^2)+1//3*b^-4*d^-1*(a^2+-1*b^2)^-1*(-1*b^4*(2C+3A)+12*C*a^4+a^2*b^2*(-7C+6A))*sin(c+d*x)+1//3*b^-2*d^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(-1*C*b^2+3*A*b^2+4*C*a^2)*sin(c+d*x)+-1*a*b^-3*d^-1*(a^2+-1*b^2)^-1*(A*b^2+-1*C*b^2+2*C*a^2)*cos(c+d*x)*sin(c+d*x)+-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(A*b^2+C*a^2)*sin(c+d*x)+2*a^2*b^-5*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-3*A*b^4+4*C*a^4+-5*C*a^2*b^2+2*A*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*b^-4*(C*(b^2+6*a^2)+2*A*b^2)+(1/2)*b^-2*d^-1*(a^2+-1*b^2)^-1*(-1*C*b^2+2*A*b^2+3*C*a^2)*cos(c+d*x)*sin(c+d*x)+-1*a*b^-3*d^-1*(a^2+-1*b^2)^-1*(A*b^2+-2*C*b^2+3*C*a^2)*sin(c+d*x)+-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(A*b^2+C*a^2)*sin(c+d*x)+-2*a*b^-4*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*A*b^4+3*C*a^4+A*a^2*b^2+-4*C*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(C*b^-2*d^-1*sin(c+d*x)+-2*C*a*x*b^-3+-1*b^-3*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-4*C*a^4+2*A*b^4+6*C*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+a*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-2*(A+C*cos(c+d*x)^2), x) == :(C*x*b^-2+-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+2*a*b^-2*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(A*b^2+-1*C*a^2+2*C*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-2*d^-1*arctanh(sin(c+d*x))+a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+-2*b*a^-2*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(C*a^2+-1*A*b^2+2*A*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1*a^-2*d^-1*(a^2+-1*b^2)^-1*(-1*a^2*(A+-1C)+2*A*b^2)*tan(c+d*x)+-2*A*b*a^-3*d^-1*arctanh(sin(c+d*x))+a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*tan(c+d*x)+a^-3*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-4*A*b^4+2*C*a^4+6*A*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-4*d^-1*(a^2*(A+2C)+6*A*b^2)*arctanh(sin(c+d*x))+b*a^-3*d^-1*(a^2+-1*b^2)^-1*(-1*a^2*(-1C+2A)+3*A*b^2)*tan(c+d*x)+-1//2*a^-2*d^-1*(a^2+-1*b^2)^-1*(-1*a^2*(A+-2C)+3*A*b^2)*sec(c+d*x)*tan(c+d*x)+a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sec(c+d*x)*tan(c+d*x)+-2*b*a^-4*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-3*A*b^4+2*C*a^4+-1*C*a^2*b^2+4*A*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :(-1*b*a^-5*d^-1*(a^2*(A+2C)+4*A*b^2)*arctanh(sin(c+d*x))+-1//3*a^-4*d^-1*(a^2+-1*b^2)^-1*(-1*a^4*(2A+3C)+12*A*b^4+-1*a^2*b^2*(-6C+7A))*tan(c+d*x)+-1//3*a^-2*d^-1*(a^2+-1*b^2)^-1*sec(c+d*x)^2*(-1*a^2*(A+-3C)+4*A*b^2)*tan(c+d*x)+b*a^-3*d^-1*(a^2+-1*b^2)^-1*(-1*a^2*(A+-1C)+2*A*b^2)*sec(c+d*x)*tan(c+d*x)+a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*sec(c+d*x)^2*(A*b^2+C*a^2)*tan(c+d*x)+2*a^-5*b^2*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-4*A*b^4+3*C*a^4+-2*C*a^2*b^2+5*A*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*b^-5*(C*(b^2+12*a^2)+2*A*b^2)+(1/2)*b^-3*d^-1*(a^2+-1*b^2)^-2*(-1*b^4*(-1C+4A)+6*C*a^4+a^2*b^2*(A+-10C))*cos(c+d*x)*sin(c+d*x)+-1//2*a*b^-4*d^-1*(a^2+-1*b^2)^-2*(-1*b^4*(-6C+5A)+12*C*a^4+a^2*b^2*(-21C+2A))*sin(c+d*x)+(1/2)*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*cos(c+d*x)^2*(-4*C*a^4+3*A*b^4+7*C*a^2*b^2)*sin(c+d*x)+-1*a*b^-5*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(6*A*b^6+12*C*a^6+a^4*b^2*(-29C+2A)+-5*a^2*b^4*(A+-4C))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(A*b^2+C*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-3*C*a*x*b^-4+(1/2)*b^-3*d^-1*(a^2+-1*b^2)^-1*(A*b^2+-2*C*b^2+3*C*a^2)*sin(c+d*x)+b^-4*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(2*A*b^6+6*C*a^6+a^2*b^4*(A+12C)+-15*C*a^4*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a*b^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-3*C*a^4+2*A*b^4+a^2*b^2*(A+6C))*sin(c+d*x)+-1//2*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(A*b^2+C*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(C*x*b^-3+(1/2)*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-3*C*a^4+2*A*b^4+a^2*b^2*(A+6C))*sin(c+d*x)+(1/2)*a*b^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+-1*a*b^-3*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(C*(2*a^4+6*b^4+-5*a^2*b^2)+3*A*b^4)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*(A+C*cos(c+d*x)^2), x) == :(d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(a^2*(C+2A)+b^2*(A+2C))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+-1//2*a*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-1*C*a^2+3*A*b^2+4*C*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-3*d^-1*arctanh(sin(c+d*x))+(1/2)*a^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+-1//2*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-1*C*a^4+2*A*b^4+-1*a^2*b^2*(2C+5A))*sin(c+d*x)+b*a^-3*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-3*a^4*(C+2A)+-2*A*b^4+5*A*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-3*A*b*a^-4*d^-1*arctanh(sin(c+d*x))+-1//2*a^-3*d^-1*(a^2+-1*b^2)^-2*(-1*a^4*(-3C+2A)+-6*A*b^4+11*A*a^2*b^2)*tan(c+d*x)+(1/2)*a^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*tan(c+d*x)+-1*a^-4*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-6*A*b^6+-2*C*a^6+-1*a^4*b^2*(C+12A)+15*A*a^2*b^4)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-2*C*a^4+3*A*b^4+-1*a^2*b^2*(C+6A))*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-5*d^-1*(a^2*(A+2C)+12*A*b^2)*arctanh(sin(c+d*x))+(1/2)*a^-3*d^-1*(a^2+-1*b^2)^-2*(a^4*(A+-4C)+6*A*b^4+-1*a^2*b^2*(-1C+10A))*sec(c+d*x)*tan(c+d*x)+-1//2*b*a^-4*d^-1*(a^2+-1*b^2)^-2*(a^4*(-5C+6A)+12*A*b^4+-1*a^2*b^2*(-2C+21A))*tan(c+d*x)+(1/2)*a^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sec(c+d*x)*tan(c+d*x)+(1/2)*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-4*A*b^4+3*C*a^4+7*A*a^2*b^2)*sec(c+d*x)*tan(c+d*x)+-1*b*a^-5*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(6*C*a^6+12*A*b^6+-1*a^2*b^4*(-2C+29A)+5*a^4*b^2*(-1C+4A))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-4*cos(c+d*x)^4*(A+C*cos(c+d*x)^2), x) == :((1/2)*x*b^-6*(C*(b^2+20*a^2)+2*A*b^2)+(1/2)*b^-4*d^-1*(a^2+-1*b^2)^-3*(b^6*(-1C+6A)+10*C*a^6+a^4*b^2*(A+-27C)+-1*a^2*b^4*(-23C+2A))*cos(c+d*x)*sin(c+d*x)+-1//6*a*b^-5*d^-1*(a^2+-1*b^2)^-3*(2*b^6*(-12C+13A)+60*C*a^6+a^4*b^2*(-167C+6A)+-1*a^2*b^4*(-146C+17A))*sin(c+d*x)+b^-6*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(a^2+-1*b^2)^-3*(-20*C*a^9+-1*a^7*b^2*(-69C+2A)+-8*a^3*b^6*(A+-5C)+7*a^5*b^4*(A+-12C)+8*A*a*b^8)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*cos(c+d*x)^4*(A*b^2+C*a^2)*sin(c+d*x)+-1//6*b^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*cos(c+d*x)^2*(12*A*b^6+20*C*a^6+a^2*b^4*(A+48C)+a^4*b^2*(-53C+2A))*sin(c+d*x)+1//6*b^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*cos(c+d*x)^3*(-5*C*a^4+4*A*b^4+a^2*b^2*(A+10C))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-4*C*a*x*b^-5+-1//6*b^-4*d^-1*(a^2+-1*b^2)^-2*(-1*C*(6*b^4+12*a^4+-23*a^2*b^2)+5*A*b^4)*sin(c+d*x)+-1*b^-5*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(-8*C*a^8+2*A*b^8+a^2*b^6*(3A+20C)+-35*C*a^4*b^4+28*C*a^6*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*a*b^-4*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(2*A*b^6+4*C*a^6+-11*C*a^4*b^2+3*a^2*b^4*(A+4C))*sin(c+d*x)+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(A*b^2+C*a^2)*sin(c+d*x)+1//6*b^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*cos(c+d*x)^2*(-4*C*a^4+3*A*b^4+a^2*b^2*(2A+9C))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(C*x*b^-4+-1//6*b^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(4*A*b^6+9*C*a^6+-1*a^4*b^2*(3A+28C)+2*a^2*b^4*(7A+17C))*sin(c+d*x)+a*b^-4*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(-2*C*a^6+4*b^6*(A+2C)+a^2*b^4*(A+-8C)+7*C*a^4*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(A*b^2+C*a^2)*sin(c+d*x)+-1//6*a*b^-3*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-3*C*a^4+2*A*b^4+a^2*b^2*(3A+8C))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1*b*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(a^2*(3C+4A)+b^2*(A+2C))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+1//6*b^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-4*C*a^4+3*A*b^4+a^2*b^2*(2A+9C))*sin(c+d*x)+1//3*a*b^-2*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+1//6*a*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(b^4*(13A+18C)+2*C*a^4+a^2*b^2*(-5C+2A))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*(A+C*cos(c+d*x)^2), x) == :(a*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(a^2*(C+2A)+b^2*(3A+4C))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+1//6*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(C*a^4+-2*b^4*(2A+3C)+-1*a^2*b^2*(10C+11A))*sin(c+d*x)+-1//6*a*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-1*C*a^2+5*A*b^2+6*C*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*(A+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-4*d^-1*arctanh(sin(c+d*x))+-1//6*a^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(-6*A*b^6+-2*C*a^6+-13*a^4*b^2*(C+2A)+17*A*a^2*b^4)*sin(c+d*x)+-1//6*a^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-2*C*a^4+3*A*b^4+-1*a^2*b^2*(3C+8A))*sin(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+-1*b*a^-4*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(-2*A*b^6+4*a^6*(C+2A)+-1*a^4*b^2*(-1C+8A)+7*A*a^2*b^4)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-4*sec(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-4*A*b*a^-5*d^-1*arctanh(sin(c+d*x))+1//6*a^-4*d^-1*(a^2+-1*b^2)^-3*(a^6*(-11C+6A)+-24*A*b^6+-1*a^4*b^2*(4C+65A)+68*A*a^2*b^4)*tan(c+d*x)+-1*a^-5*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(-2*C*a^8+8*A*b^8+-1*a^6*b^2*(3C+20A)+-28*A*a^2*b^6+35*A*a^4*b^4)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(-4*A*b^6+-2*C*a^6+-3*a^4*b^2*(C+4A)+11*A*a^2*b^4)*tan(c+d*x)+-1//6*a^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-3*C*a^4+4*A*b^4+-1*a^2*b^2*(2C+9A))*tan(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*sec(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-6*d^-1*(a^2*(A+2C)+20*A*b^2)*arctanh(sin(c+d*x))+-1//2*a^-4*d^-1*(a^2+-1*b^2)^-3*(-1*a^6*(A+-6C)+10*A*b^6+a^4*b^2*(-2C+23A)+-1*a^2*b^4*(-1C+27A))*sec(c+d*x)*tan(c+d*x)+1//6*b*a^-5*d^-1*(a^2+-1*b^2)^-3*(-1*a^6*(-26C+24A)+60*A*b^6+a^4*b^2*(-17C+146A)+-1*a^2*b^4*(-6C+167A))*tan(c+d*x)+a^-6*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(a^2+-1*b^2)^-3*(20*A*b^9+-1*a^2*b^7*(-2C+69A)+-8*C*b*a^8+-8*a^6*b^3*(-1C+5A)+7*a^4*b^5*(-1C+12A))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//6*a^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-4*C*a^4+5*A*b^4+-1*a^2*b^2*(C+10A))*sec(c+d*x)*tan(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sec(c+d*x)*tan(c+d*x)+1//6*a^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(12*C*a^6+20*A*b^6+a^4*b^2*(C+48A)+-1*a^2*b^4*(-2C+53A))*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1*cos(c+d*x)^3*(1+-1*cos(c+d*x)^2), x) == :(-1//8*x*b^-5*(-1*b^4+8*a^4+-4*a^2*b^2)+-1//4*b^-1*d^-1*cos(c+d*x)^3*sin(c+d*x)+-1//8*b^-3*d^-1*(-1*b^2+4*a^2)*cos(c+d*x)*sin(c+d*x)+1//3*a*b^-4*d^-1*(-1*b^2+3*a^2)*sin(c+d*x)+1//3*a*b^-2*d^-1*cos(c+d*x)^2*sin(c+d*x)+2*a^3*b^-5*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*cos(c+d*x)^2*(1+-1*cos(c+d*x)^2), x) == :((1/2)*a*x*b^-4*(-1*b^2+2*a^2)+-1//3*b^-1*d^-1*cos(c+d*x)^2*sin(c+d*x)+-1//3*b^-3*d^-1*(-1*b^2+3*a^2)*sin(c+d*x)+(1/2)*a*b^-2*d^-1*cos(c+d*x)*sin(c+d*x)+-2*a^2*b^-4*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(1+-1*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//2*x*b^-3*(-1*b^2+2*a^2)+a*b^-2*d^-1*sin(c+d*x)+-1//2*b^-1*d^-1*cos(c+d*x)*sin(c+d*x)+2*a*b^-3*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(1+-1*cos(c+d*x)^2), x) == :(a*x*b^-2+-1*b^-1*d^-1*sin(c+d*x)+-2*b^-2*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(1+-1*cos(c+d*x)^2)*sec(c+d*x), x) == :(-1*x*b^-1+a^-1*d^-1*arctanh(sin(c+d*x))+2*a^-1*b^-1*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^2*(1+-1*cos(c+d*x)^2), x) == :(a^-1*d^-1*tan(c+d*x)+-1*b*a^-2*d^-1*arctanh(sin(c+d*x))+-2*a^-2*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^3*(1+-1*cos(c+d*x)^2), x) == :((1/2)*a^-1*d^-1*sec(c+d*x)*tan(c+d*x)+-1*b*a^-2*d^-1*tan(c+d*x)+-1//2*a^-3*d^-1*(a^2+-2*b^2)*arctanh(sin(c+d*x))+2*b*a^-3*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^4*(1+-1*cos(c+d*x)^2), x) == :(-1//3*a^-3*d^-1*(a^2+-3*b^2)*tan(c+d*x)+1//3*a^-1*d^-1*sec(c+d*x)^2*tan(c+d*x)+(1/2)*b*a^-4*d^-1*(a^2+-2*b^2)*arctanh(sin(c+d*x))+-1//2*b*a^-2*d^-1*sec(c+d*x)*tan(c+d*x)+-2*a^-4*b^2*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*cos(c+d*x)^4*(1+-1*cos(c+d*x)^2), x) == :(-1//8*x*b^-6*(-1*b^4+40*a^4+-12*a^2*b^2)+-5//4*b^-2*d^-1*cos(c+d*x)^3*sin(c+d*x)+b^-1*d^-1*(a+b*cos(c+d*x))^-1*cos(c+d*x)^4*sin(c+d*x)+-1//8*b^-4*d^-1*(-1*b^2+20*a^2)*cos(c+d*x)*sin(c+d*x)+1//3*a*b^-5*d^-1*(-2*b^2+15*a^2)*sin(c+d*x)+5//3*a*b^-3*d^-1*cos(c+d*x)^2*sin(c+d*x)+2*a^3*b^-6*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-4*b^2+5*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*cos(c+d*x)^3*(1+-1*cos(c+d*x)^2), x) == :(a*x*b^-5*(-1*b^2+4*a^2)+-4//3*b^-2*d^-1*cos(c+d*x)^2*sin(c+d*x)+-1//3*b^-4*d^-1*(-1*b^2+12*a^2)*sin(c+d*x)+b^-1*d^-1*(a+b*cos(c+d*x))^-1*cos(c+d*x)^3*sin(c+d*x)+2*a*b^-3*d^-1*cos(c+d*x)*sin(c+d*x)+-2*a^2*b^-5*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-3*b^2+4*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*cos(c+d*x)^2*(1+-1*cos(c+d*x)^2), x) == :(-1//2*x*b^-4*(-1*b^2+6*a^2)+3*a*b^-3*d^-1*sin(c+d*x)+-3//2*b^-2*d^-1*cos(c+d*x)*sin(c+d*x)+b^-1*d^-1*(a+b*cos(c+d*x))^-1*cos(c+d*x)^2*sin(c+d*x)+2*a*b^-4*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-2*b^2+3*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*(1+-1*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1*b^-2*d^-1*sin(c+d*x)+2*a*x*b^-3+-1*a*b^-2*d^-1*(a+b*cos(c+d*x))^-1*sin(c+d*x)+-1*b^-3*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-2*b^2+4*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*(1+-1*cos(c+d*x)^2), x) == :(-1*x*b^-2+b^-1*d^-1*(a+b*cos(c+d*x))^-1*sin(c+d*x)+2*a*b^-2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*(1+-1*cos(c+d*x)^2)*sec(c+d*x), x) == :(a^-2*d^-1*arctanh(sin(c+d*x))+-1*a^-1*d^-1*(a+b*cos(c+d*x))^-1*sin(c+d*x)+-2*b*a^-2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^2*(1+-1*cos(c+d*x)^2), x) == :(2*a^-2*d^-1*tan(c+d*x)+-1*a^-1*d^-1*(a+b*cos(c+d*x))^-1*tan(c+d*x)+-2*b*a^-3*d^-1*arctanh(sin(c+d*x))+-1*a^-3*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-4*b^2+2*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^3*(1+-1*cos(c+d*x)^2), x) == :(-3*b*a^-3*d^-1*tan(c+d*x)+-1//2*a^-4*d^-1*(a^2+-6*b^2)*arctanh(sin(c+d*x))+3//2*a^-2*d^-1*sec(c+d*x)*tan(c+d*x)+-1*a^-1*d^-1*(a+b*cos(c+d*x))^-1*sec(c+d*x)*tan(c+d*x)+2*b*a^-4*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-3*b^2+2*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^4*(1+-1*cos(c+d*x)^2), x) == :(-1//3*a^-4*d^-1*(a^2+-12*b^2)*tan(c+d*x)+4//3*a^-2*d^-1*sec(c+d*x)^2*tan(c+d*x)+b*a^-5*d^-1*(a^2+-4*b^2)*arctanh(sin(c+d*x))+-1*a^-1*d^-1*(a+b*cos(c+d*x))^-1*sec(c+d*x)^2*tan(c+d*x)+-2*b*a^-3*d^-1*sec(c+d*x)*tan(c+d*x)+-2*a^-5*b^2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-4*b^2+3*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*cos(c+d*x)^4*(1+-1*cos(c+d*x)^2), x) == :((1/2)*a*x*b^-6*(-3*b^2+20*a^2)+(1/2)*b^-1*d^-1*(a+b*cos(c+d*x))^-2*cos(c+d*x)^4*sin(c+d*x)+-1//6*b^-5*d^-1*(a^2+-1*b^2)^-1*(2*b^4+60*a^4+-59*a^2*b^2)*sin(c+d*x)+-1//6*b^-3*d^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(-17*b^2+20*a^2)*sin(c+d*x)+(1/2)*a*b^-4*d^-1*(a^2+-1*b^2)^-1*(-9*b^2+10*a^2)*cos(c+d*x)*sin(c+d*x)+(1/2)*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(-4*b^2+5*a^2)*sin(c+d*x)+-1*a^2*b^-6*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(12*b^4+20*a^4+-33*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*cos(c+d*x)^3*(1+-1*cos(c+d*x)^2), x) == :(-1//2*x*b^-5*(-1*b^2+12*a^2)+(1/2)*b^-1*d^-1*(a+b*cos(c+d*x))^-2*cos(c+d*x)^3*sin(c+d*x)+(1/2)*a*b^-4*d^-1*(a^2+-1*b^2)^-1*(-11*b^2+12*a^2)*sin(c+d*x)+-1//2*b^-3*d^-1*(a^2+-1*b^2)^-1*(-5*b^2+6*a^2)*cos(c+d*x)*sin(c+d*x)+a*b^-5*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(6*b^4+12*a^4+-19*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(-3*b^2+4*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*cos(c+d*x)^2*(1+-1*cos(c+d*x)^2), x) == :(3*a*x*b^-4+-3//2*b^-3*d^-1*sin(c+d*x)+(1/2)*b^-1*d^-1*(a+b*cos(c+d*x))^-2*cos(c+d*x)^2*sin(c+d*x)+-1*b^-4*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(2*b^4+6*a^4+-9*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a*b^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(-2*b^2+3*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(1+-1*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1*x*b^-3+-1//2*a*b^-2*d^-1*(a+b*cos(c+d*x))^-2*sin(c+d*x)+(1/2)*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(-2*b^2+3*a^2)*sin(c+d*x)+a*b^-3*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-3*b^2+2*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*(1+-1*cos(c+d*x)^2), x) == :(d^-1*(a+b)^-3//2*(a+-1b)^-3//2*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*b^-1*d^-1*(a+b*cos(c+d*x))^-2*sin(c+d*x)+-1//2*a*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(1+-1*cos(c+d*x)^2)*sec(c+d*x), x) == :(a^-3*d^-1*arctanh(sin(c+d*x))+-1//2*a^-1*d^-1*(a+b*cos(c+d*x))^-2*sin(c+d*x)+-1//2*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(a^2+-2*b^2)*sin(c+d*x)+-1*b*a^-3*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*b^2+3*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*sec(c+d*x)^2*(1+-1*cos(c+d*x)^2), x) == :(-3*b*a^-4*d^-1*arctanh(sin(c+d*x))+-1//2*a^-1*d^-1*(a+b*cos(c+d*x))^-2*tan(c+d*x)+(1/2)*a^-3*d^-1*(a^2+-1*b^2)^-1*(-6*b^2+5*a^2)*tan(c+d*x)+-1*a^-4*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(2*a^4+6*b^4+-9*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(-3*b^2+2*a^2)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*sec(c+d*x)^3*(1+-1*cos(c+d*x)^2), x) == :(-1//2*a^-5*d^-1*(a^2+-12*b^2)*arctanh(sin(c+d*x))+-1//2*a^-1*d^-1*(a+b*cos(c+d*x))^-2*sec(c+d*x)*tan(c+d*x)+(1/2)*a^-3*d^-1*(a^2+-1*b^2)^-1*(-6*b^2+5*a^2)*sec(c+d*x)*tan(c+d*x)+-1//2*b*a^-4*d^-1*(a^2+-1*b^2)^-1*(-12*b^2+11*a^2)*tan(c+d*x)+b*a^-5*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(6*a^4+12*b^4+-19*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(-4*b^2+3*a^2)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*sec(c+d*x)^4*(1+-1*cos(c+d*x)^2), x) == :((1/2)*b*a^-6*d^-1*(-20*b^2+3*a^2)*arctanh(sin(c+d*x))+-1//2*a^-1*d^-1*(a+b*cos(c+d*x))^-2*sec(c+d*x)^2*tan(c+d*x)+-1//6*a^-5*d^-1*(a^2+-1*b^2)^-1*(2*a^4+60*b^4+-59*a^2*b^2)*tan(c+d*x)+1//6*a^-3*d^-1*(a^2+-1*b^2)^-1*sec(c+d*x)^2*(-20*b^2+17*a^2)*tan(c+d*x)+-1*a^-6*b^2*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(12*a^4+20*b^4+-33*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*b*a^-4*d^-1*(a^2+-1*b^2)^-1*(-10*b^2+9*a^2)*sec(c+d*x)*tan(c+d*x)+-1//2*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*sec(c+d*x)^2*(-5*b^2+4*a^2)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(a*x+-1*b*d^-1*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-2*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(-1x+4*a*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(2*a^2+2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-2*a*b*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(-1*a*b*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*sin(c+d*x)+-1*b*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(b^2+2*a^2)*sin(c+d*x)+2*a*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(a^2+2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(1//315*b^-3*d^-1*(a+b*cos(c+d*x))^3//2*(14*b^2*(7C+9A)+48*C*a^2)*sin(c+d*x)+-4//315*a*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(8*C*a^2+18*C*b^2+21*A*b^2)*sin(c+d*x)+-1//315*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-42*b^4*(7C+9A)+32*C*a^4+12*a^2*b^2*(4C+7A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//9*C*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^2*sin(c+d*x)+-4//21*C*a*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)*sin(c+d*x)+4//315*a*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)*(8*C*a^2+18*C*b^2+21*A*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^(1/2)*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//105*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(10*b^2*(5C+7A)+16*C*a^2)*sin(c+d*x)+-8//35*C*a*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*sin(c+d*x)+2//7*C*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)*sin(c+d*x)+-1//105*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(8*C*a^2+25*C*b^2+35*A*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//105*a*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(8*C*a^2+19*C*b^2+35*A*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^(1/2)*(A+C*cos(c+d*x)^2), x) == :(2//5*C*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*sin(c+d*x)+-4//15*C*a*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+-1//15*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-6*b^2*(3C+5A)+4*C*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+4//15*C*a*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1//1155*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(-50*b^4*(9C+11A)+32*C*a^4+12*a^2*b^2*(8C+11A))*sin(c+d*x)+1//231*b^-3*d^-1*(a+b*cos(c+d*x))^5//2*(6*b^2*(9C+11A)+16*C*a^2)*sin(c+d*x)+-4//1155*a*b^-3*d^-1*(a+b*cos(c+d*x))^3//2*(8*C*a^2+33*A*b^2+34*C*b^2)*sin(c+d*x)+2//11*C*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*cos(c+d*x)^2*sin(c+d*x)+-4//33*C*a*b^-2*d^-1*(a+b*cos(c+d*x))^5//2*cos(c+d*x)*sin(c+d*x)+-4//1155*a*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-1*b^4*(348C+451A)+8*C*a^4+3*a^2*b^2*(6C+11A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//1155*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-25*b^4*(9C+11A)+16*C*a^4+6*a^2*b^2*(8C+11A))*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//315*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*(14*b^2*(7C+9A)+16*C*a^2)*sin(c+d*x)+-8//63*C*a*b^-2*d^-1*(a+b*cos(c+d*x))^5//2*sin(c+d*x)+1//315*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(16*C*a^4+42*b^4*(7C+9A)+6*a^2*b^2*(11C+21A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//9*C*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*cos(c+d*x)*sin(c+d*x)+2//315*a*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(8*C*a^2+39*C*b^2+63*A*b^2)*sin(c+d*x)+-2//315*a*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)*(8*C*a^2+39*C*b^2+63*A*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*(A+C*cos(c+d*x)^2), x) == :(-1//105*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*(-10*b^2*(5C+7A)+12*C*a^2)*sin(c+d*x)+2//7*C*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*sin(c+d*x)+-4//35*C*a*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*sin(c+d*x)+-1//105*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-6*C*a^2+25*C*b^2+35*A*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+4//105*a*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-3*C*a^2+41*C*b^2+70*A*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^5//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1//45045*b^-3*d^-1*(a+b*cos(c+d*x))^3//2*(-1078*b^4*(11C+13A)+480*C*a^4+20*a^2*b^2*(124C+143A))*sin(c+d*x)+1//1287*b^-3*d^-1*(a+b*cos(c+d*x))^7//2*(22*b^2*(11C+13A)+48*C*a^2)*sin(c+d*x)+-4//9009*a*b^-3*d^-1*(a+b*cos(c+d*x))^5//2*(24*C*a^2+143*A*b^2+166*C*b^2)*sin(c+d*x)+-4//45045*a*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(-3*b^4*(2174C+2717A)+120*C*a^4+5*a^2*b^2*(94C+143A))*sin(c+d*x)+-1//45045*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-3234*b^6*(11C+13A)+480*C*a^6+-6*a^2*b^4*(10223C+13299A)+20*a^4*b^2*(76C+143A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//13*C*b^-1*d^-1*(a+b*cos(c+d*x))^7//2*cos(c+d*x)^2*sin(c+d*x)+-12//143*C*a*b^-2*d^-1*(a+b*cos(c+d*x))^7//2*cos(c+d*x)*sin(c+d*x)+4//45045*a*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)*(-3*b^4*(2174C+2717A)+120*C*a^4+5*a^2*b^2*(94C+143A))*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^5//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//693*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(16*C*a^4+30*b^4*(9C+11A)+6*a^2*b^2*(19C+33A))*sin(c+d*x)+1//693*b^-2*d^-1*(a+b*cos(c+d*x))^5//2*(16*C*a^2+18*b^2*(9C+11A))*sin(c+d*x)+-8//99*C*a*b^-2*d^-1*(a+b*cos(c+d*x))^7//2*sin(c+d*x)+2//11*C*b^-1*d^-1*(a+b*cos(c+d*x))^7//2*cos(c+d*x)*sin(c+d*x)+2//693*a*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*(8*C*a^2+67*C*b^2+99*A*b^2)*sin(c+d*x)+-1//693*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(8*C*a^4+15*b^4*(9C+11A)+3*a^2*b^2*(19C+33A))*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//693*a*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(3*b^4*(247C+319A)+8*C*a^4+3*a^2*b^2*(17C+33A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^5//2*(A+C*cos(c+d*x)^2), x) == :(-1//315*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*(-14*b^2*(7C+9A)+20*C*a^2)*sin(c+d*x)+2//9*C*b^-1*d^-1*(a+b*cos(c+d*x))^7//2*sin(c+d*x)+-4//63*C*a*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*sin(c+d*x)+-1//315*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-42*b^4*(7C+9A)+20*C*a^4+-6*a^2*b^2*(93C+161A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+4//315*a*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*(-5*C*a^2+57*C*b^2+84*A*b^2)*sin(c+d*x)+-4//315*a*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)*(-5*C*a^2+57*C*b^2+84*A*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(-2//7*b*d^-1*(a+b*cos(c+d*x))^5//2*sin(c+d*x)+-1//105*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(50*b^4+82*a^4+-132*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//105*b*d^-1*(a+b*cos(c+d*x))^(1/2)*(-25*b^2+41*a^2)*sin(c+d*x)+4//35*a*b*d^-1*(a+b*cos(c+d*x))^3//2*sin(c+d*x)+4//105*a*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-41*b^2+73*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(-2//5*b*d^-1*(a+b*cos(c+d*x))^3//2*sin(c+d*x)+1//15*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-18*b^2+34*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+4//15*a*b*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+-4//15*a*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-4//315*a*b^-4*d^-1*(a+b*cos(c+d*x))^(1/2)*(31*C*b^2+32*C*a^2+42*A*b^2)*sin(c+d*x)+1//315*b^-5*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(42*b^4*(7C+9A)+256*C*a^4+24*a^2*b^2*(9C+14A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//315*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(14*b^2*(7C+9A)+96*C*a^2)*cos(c+d*x)*sin(c+d*x)+2//9*C*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^3*sin(c+d*x)+-16//63*C*a*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^2*sin(c+d*x)+-2//315*a*b^-5*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(3*b^4*(37C+49A)+128*C*a^4+4*a^2*b^2*(19C+42A))*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(1//105*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(10*b^2*(5C+7A)+48*C*a^2)*sin(c+d*x)+1//105*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(10*b^4*(5C+7A)+96*C*a^4+4*a^2*b^2*(16C+35A))*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//7*C*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^2*sin(c+d*x)+-12//35*C*a*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)*sin(c+d*x)+-4//105*a*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(22*C*b^2+24*C*a^2+35*A*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-1//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-8//15*C*a*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+1//15*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(6*b^2*(3C+5A)+16*C*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//5*C*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)*sin(c+d*x)+-2//15*a*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(7*C*b^2+8*C*a^2+15*A*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-1//2*(A+C*cos(c+d*x)^2), x) == :(2//3*C*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(2*b^2*(C+3A)+4*C*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-4//3*C*a*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(1//105*b^-5*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(10*b^4*(5C+7A)+768*C*a^4+8*a^2*b^2*(29C+70A))*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//105*b^-4*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-10*b^4*(5C+7A)+384*C*a^4+4*a^2*b^2*(-31C+70A))*sin(c+d*x)+-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(2*A*b^2+2*C*a^2)*sin(c+d*x)+1//7*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(-2*C*b^2+14*A*b^2+16*C*a^2)*sin(c+d*x)+-2//35*a*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-13*C*b^2+35*A*b^2+48*C*a^2)*cos(c+d*x)*sin(c+d*x)+-2//105*a*b^-5*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-1*b^4*(107C+175A)+384*C*a^4+4*a^2*b^2*(-43C+70A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+-4//5*a*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(C*(2*b^2+8*a^2)+5*A*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-2//5*a*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-3*C*b^2+5*A*b^2+8*C*a^2)*sin(c+d*x)+1//5*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-2*b^4*(3C+5A)+32*C*a^4+4*a^2*b^2*(-4C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//5*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-2*C*b^2+10*A*b^2+12*C*a^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(2//3*C*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(2*C*(b^2+8*a^2)+6*A*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2*a*b^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+-2//3*a*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-5*C*b^2+3*A*b^2+8*C*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(2*A*b^2+2*C*a^2)*sin(c+d*x)+b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-2*C*b^2+2*A*b^2+4*C*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-4*C*a*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^3*(A+C*cos(c+d*x)^2), x) == :(-4//15*a*b^-4*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-1*b^4*(-7C+20A)+32*C*a^4+a^2*b^2*(-49C+10A))*sin(c+d*x)+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(2*A*b^2+2*C*a^2)*sin(c+d*x)+1//3*b^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^2*(-16*C*a^4+12*A*b^4+-4*a^2*b^2*(A+-6C))*sin(c+d*x)+1//15*b^-5*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(6*b^6*(3C+5A)+256*C*a^6+-10*a^2*b^4*(-11C+15A)+8*a^4*b^2*(-53C+10A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//15*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-2*b^4*(-3C+35A)+96*C*a^4+2*a^2*b^2*(-71C+15A))*cos(c+d*x)*sin(c+d*x)+-2//15*a*b^-5*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-1*b^4*(17C+45A)+128*C*a^4+4*a^2*b^2*(-29C+10A))*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^2*(A+C*cos(c+d*x)^2), x) == :(1//3*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-2*C*b^2+2*A*b^2+4*C*a^2)*sin(c+d*x)+-4//3*a*b^-3*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(-3*C*a^4+2*A*b^4+5*C*a^2*b^2)*sin(c+d*x)+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+1//3*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-2*b^4*(C+3A)+32*C*a^4+4*a^2*b^2*(A+-8C))*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-4//3*a*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-1*b^4*(-4C+3A)+8*C*a^4+a^2*b^2*(A+-14C))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*(A+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//3*b^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(-10*C*a^4+6*A*b^4+2*a^2*b^2*(A+9C))*sin(c+d*x)+-1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-16*C*a^4+6*b^4*(A+-1C)+2*a^2*b^2*(A+15C))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//3*a*b^-2*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*(A*b^2+C*a^2)*sin(c+d*x)+2//3*a*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(A*b^2+-8*C*a^2+9*C*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*(A+C*cos(c+d*x)^2), x) == :(-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*(2*A*b^2+2*C*a^2)*sin(c+d*x)+-4//3*a*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(-1*C*a^2+2*A*b^2+3*C*b^2)*sin(c+d*x)+-1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-4*C*a^2+2*A*b^2+6*C*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+4//3*a*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-1*C*(a^2+-3*b^2)+2*A*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-7//2*(A+C*cos(c+d*x)^2), x) == :(-1//5*b^-1*d^-1*(a+b*cos(c+d*x))^-5//2*(a^2+-1*b^2)^-1*(2*A*b^2+2*C*a^2)*sin(c+d*x)+1//15*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-3*(-6*b^4*(3A+5C)+4*C*a^4+-2*a^2*b^2*(19C+23A))*sin(c+d*x)+-4//15*a*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-2*(-1*C*a^2+4*A*b^2+5*C*b^2)*sin(c+d*x)+-1//15*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-3*(-6*b^4*(3A+5C)+4*C*a^4+-2*a^2*b^2*(19C+23A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-4//15*a*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(-1*C*(a^2+-5*b^2)+4*A*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(-2//3*b*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+1//3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+4//3*a*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+4*a*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-4*a*b*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*sin(c+d*x)+4*a*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-7//2*(a^2+-1*b^2*cos(c+d*x)^2), x) == :(-4*a*b*d^-1*(a+b*cos(c+d*x))^-3//2*(-3*b^2+3*a^2)^-1*sin(c+d*x)+-4*a*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-3*b^2+3*a^2)^-1*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-2//3*b*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(3*b^2+5*a^2)*sin(c+d*x)+1//3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(6*b^2+10*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate(cos(c+d*x)^5//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2//15*a*d^-1*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+10//231*b*d^-1*(9C+11A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*C*a*d^-1*cos(c+d*x)^7//2*sin(c+d*x)+2//11*C*b*d^-1*cos(c+d*x)^9//2*sin(c+d*x)+2//45*a*d^-1*cos(c+d*x)^3//2*(7C+9A)*sin(c+d*x)+2//77*b*d^-1*cos(c+d*x)^5//2*(9C+11A)*sin(c+d*x)+10//231*b*d^-1*cos(c+d*x)^(1/2)*(9C+11A)*sin(c+d*x))
@test integrate(cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2//15*b*d^-1*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*C*a*d^-1*cos(c+d*x)^5//2*sin(c+d*x)+2//9*C*b*d^-1*cos(c+d*x)^7//2*sin(c+d*x)+2//21*a*d^-1*cos(c+d*x)^(1/2)*(5C+7A)*sin(c+d*x)+2//45*b*d^-1*cos(c+d*x)^3//2*(7C+9A)*sin(c+d*x))
@test integrate(cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2//5*a*d^-1*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*b*d^-1*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*C*a*d^-1*cos(c+d*x)^3//2*sin(c+d*x)+2//7*C*b*d^-1*cos(c+d*x)^5//2*sin(c+d*x)+2//21*b*d^-1*cos(c+d*x)^(1/2)*(5C+7A)*sin(c+d*x))
@test integrate(cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2//3*a*d^-1*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*b*d^-1*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*C*a*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x)+2//5*C*b*d^-1*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(-2*a*d^-1*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*b*d^-1*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*a*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*C*b*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate(cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(-2*b*d^-1*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*b*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*A*a*d^-1*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(-2//5*a*d^-1*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*b*d^-1*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*A*b*d^-1*cos(c+d*x)^-3//2*sin(c+d*x)+2//5*A*a*d^-1*cos(c+d*x)^-5//2*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^-1//2*(3A+5C)*sin(c+d*x))
@test integrate(cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(-2//5*b*d^-1*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(5A+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*A*b*d^-1*cos(c+d*x)^-5//2*sin(c+d*x)+2//5*b*d^-1*cos(c+d*x)^-1//2*(3A+5C)*sin(c+d*x)+2//7*A*a*d^-1*cos(c+d*x)^-7//2*sin(c+d*x)+2//21*a*d^-1*cos(c+d*x)^-3//2*(5A+7C)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(1//231*d^-1*(10*b^2*(9C+11A)+22*a^2*(5C+7A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//77*d^-1*cos(c+d*x)^5//2*(2*b^2*(9C+11A)+8*C*a^2)*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*(10*b^2*(9C+11A)+22*a^2*(5C+7A))*sin(c+d*x)+2//11*C*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^5//2*sin(c+d*x)+4//15*a*b*d^-1*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//45*a*b*d^-1*cos(c+d*x)^3//2*(7C+9A)*sin(c+d*x)+8//99*C*a*b*d^-1*cos(c+d*x)^7//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(2*b^2*(7C+9A)+6*a^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//45*d^-1*cos(c+d*x)^3//2*(2*b^2*(7C+9A)+8*C*a^2)*sin(c+d*x)+2//9*C*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*sin(c+d*x)+4//21*a*b*d^-1*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//21*a*b*d^-1*cos(c+d*x)^(1/2)*(5C+7A)*sin(c+d*x)+8//63*C*a*b*d^-1*cos(c+d*x)^5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//21*d^-1*(2*b^2*(5C+7A)+14*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*(2*b^2*(5C+7A)+8*C*a^2)*sin(c+d*x)+2//7*C*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*sin(c+d*x)+4//5*a*b*d^-1*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+8//35*C*a*b*d^-1*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(-2*b^2*(3C+5A)+10*a^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*sin(c+d*x)+-2//5*b^2*d^-1*cos(c+d*x)^3//2*(-1C+5A)*sin(c+d*x)+4//3*a*b*d^-1*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-4//3*a*b*d^-1*cos(c+d*x)^(1/2)*(-1C+3A)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*a^2*(A+3C)+2*b^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-4*a*b*d^-1*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-2//3*b^2*d^-1*cos(c+d*x)^(1/2)*(A+-1C)*sin(c+d*x)+2//3*A*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*sin(c+d*x)+8//3*A*a*b*d^-1*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(2*a^2*(3A+5C)+10*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^-1//2*(2*a^2*(3A+5C)+8*A*b^2)*sin(c+d*x)+2//5*A*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*sin(c+d*x)+4//3*a*b*d^-1*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+8//15*A*a*b*d^-1*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(1//21*d^-1*(2*a^2*(5A+7C)+14*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^-3//2*(2*a^2*(5A+7C)+8*A*b^2)*sin(c+d*x)+-4//5*a*b*d^-1*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//7*A*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*sin(c+d*x)+4//5*a*b*d^-1*cos(c+d*x)^-1//2*(3A+5C)*sin(c+d*x)+8//35*A*a*b*d^-1*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(2//5*a*d^-1*(a^2*(3C+5A)+b^2*(7C+9A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//231*b*d^-1*(5*b^2*(9C+11A)+33*a^2*(5C+7A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//11*C*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^3//2*sin(c+d*x)+2//165*a*d^-1*cos(c+d*x)^3//2*(8*C*a^2+77*C*b^2+99*A*b^2)*sin(c+d*x)+2//231*b*d^-1*cos(c+d*x)^(1/2)*(5*b^2*(9C+11A)+33*a^2*(5C+7A))*sin(c+d*x)+2//231*b*d^-1*cos(c+d*x)^5//2*(3*b^2*(9C+11A)+8*C*a^2)*sin(c+d*x)+4//33*C*a*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(2//15*b*d^-1*(b^2*(7C+9A)+9*a^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(3*b^2*(5C+7A)+7*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*C*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^(1/2)*sin(c+d*x)+2//63*a*d^-1*cos(c+d*x)^(1/2)*(8*C*a^2+45*C*b^2+63*A*b^2)*sin(c+d*x)+2//315*b*d^-1*cos(c+d*x)^3//2*(7*b^2*(7C+9A)+24*C*a^2)*sin(c+d*x)+4//21*C*a*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-2//5*a*d^-1*(-3*b^2*(3C+5A)+5*a^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*b*d^-1*(b^2*(5C+7A)+21*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-1//2*sin(c+d*x)+-2//21*b*d^-1*cos(c+d*x)^(1/2)*(-1*b^2*(5C+7A)+6*a^2*(-3C+7A))*sin(c+d*x)+-2//7*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(-1C+7A)*sin(c+d*x)+-2//35*a*b^2*d^-1*cos(c+d*x)^3//2*(-11C+35A)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(-2//5*b*d^-1*(-1*b^2*(3C+5A)+15*a^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*(a^2*(A+3C)+3*b^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//15*b^3*d^-1*cos(c+d*x)^3//2*(-3C+35A)*sin(c+d*x)+2//3*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-3//2*sin(c+d*x)+-2*a*b^2*d^-1*cos(c+d*x)^(1/2)*(-1C+5A)*sin(c+d*x)+4*A*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(-2//5*a*d^-1*(a^2*(3A+5C)+15*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*b*d^-1*(b^2*(C+3A)+3*a^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//15*b^3*d^-1*cos(c+d*x)^(1/2)*(-5C+9A)*sin(c+d*x)+2//5*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-5//2*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^-1//2*(a^2*(3A+5C)+8*A*b^2)*sin(c+d*x)+4//5*A*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(-2//5*b*d^-1*(3*a^2*(3A+5C)+5*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*(a^2*(5A+7C)+21*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-7//2*sin(c+d*x)+2//105*a*d^-1*cos(c+d*x)^-3//2*(5*a^2*(5A+7C)+24*A*b^2)*sin(c+d*x)+6//35*b*d^-1*cos(c+d*x)^-1//2*(7*a^2*(3A+5C)+8*A*b^2)*sin(c+d*x)+12//35*A*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-11//2*(A+C*cos(c+d*x)^2), x) == :(-2//15*a*d^-1*(a^2*(7A+9C)+9*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*b*d^-1*(3*a^2*(5A+7C)+7*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-9//2*sin(c+d*x)+2//15*a*d^-1*cos(c+d*x)^-1//2*(a^2*(7A+9C)+9*b^2*(3A+5C))*sin(c+d*x)+2//63*b*d^-1*cos(c+d*x)^-3//2*(8*A*b^2+9*a^2*(5A+7C))*sin(c+d*x)+2//315*a*d^-1*cos(c+d*x)^-5//2*(7*a^2*(7A+9C)+24*A*b^2)*sin(c+d*x)+4//21*A*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//195*d^-1*(14*b^4*(11C+13A)+78*a^4*(3C+5A)+156*a^2*b^2*(7C+9A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//6435*d^-1*cos(c+d*x)^3//2*(154*b^4*(11C+13A)+384*C*a^4+22*a^2*b^2*(491C+637A))*sin(c+d*x)+1//1287*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*(22*b^2*(11C+13A)+96*C*a^2)*sin(c+d*x)+2//13*C*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^3//2*sin(c+d*x)+8//231*a*b*d^-1*(5*b^2*(9C+11A)+11*a^2*(5C+7A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//9009*a*b*d^-1*cos(c+d*x)^5//2*(96*C*a^2+1259*C*b^2+1573*A*b^2)*sin(c+d*x)+8//231*a*b*d^-1*cos(c+d*x)^(1/2)*(5*b^2*(9C+11A)+11*a^2*(5C+7A))*sin(c+d*x)+16//143*C*a*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//231*d^-1*(10*b^4*(9C+11A)+154*a^4*(C+3A)+132*a^2*b^2*(5C+7A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//693*d^-1*cos(c+d*x)^(1/2)*(30*b^4*(9C+11A)+128*C*a^4+18*a^2*b^2*(101C+143A))*sin(c+d*x)+1//231*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(6*b^2*(9C+11A)+32*C*a^2)*sin(c+d*x)+2//11*C*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^(1/2)*sin(c+d*x)+8//15*a*b*d^-1*(b^2*(7C+9A)+3*a^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3465*a*b*d^-1*cos(c+d*x)^3//2*(96*C*a^2+673*C*b^2+891*A*b^2)*sin(c+d*x)+16//99*C*a*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//15*d^-1*(-2*b^4*(7C+9A)+30*a^4*(A+-1C)+-36*a^2*b^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-1//2*sin(c+d*x)+-2//315*b^2*d^-1*cos(c+d*x)^3//2*(-7*b^2*(7C+9A)+3*a^2*(-41C+105A))*sin(c+d*x)+8//21*a*b*d^-1*(b^2*(5C+7A)+7*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-4//63*a*b*d^-1*cos(c+d*x)^(1/2)*(a^2*(-31C+63A)+-6*b^2*(5C+7A))*sin(c+d*x)+-2//9*b*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^(1/2)*(-1C+9A)*sin(c+d*x)+-2//21*a*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(-5C+21A)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(1//21*d^-1*(2*b^4*(5C+7A)+14*a^4*(A+3C)+84*a^2*b^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-8//5*a*b*d^-1*(-1*b^2*(3C+5A)+5*a^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-2//21*b^2*d^-1*cos(c+d*x)^(1/2)*(-1*b^2*(5C+7A)+3*a^2*(-13C+49A))*sin(c+d*x)+2//3*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-3//2*sin(c+d*x)+-4//105*a*b^3*d^-1*cos(c+d*x)^3//2*(-27C+175A)*sin(c+d*x)+-2//7*b^2*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(-1C+21A)*sin(c+d*x)+16//3*A*b*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(-2*b^4*(3C+5A)+2*a^4*(3A+5C)+60*a^2*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-2//15*b^2*d^-1*cos(c+d*x)^3//2*(b^2*(-3C+59A)+3*a^2*(3A+5C))*sin(c+d*x)+1//5*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*(2*a^2*(3A+5C)+32*A*b^2)*sin(c+d*x)+2//5*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-5//2*sin(c+d*x)+8//3*a*b*d^-1*(a^2*(A+3C)+b^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-4//15*a*b*d^-1*cos(c+d*x)^(1/2)*(2*b^2*(-5C+33A)+3*a^2*(3A+5C))*sin(c+d*x)+16//15*A*b*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(1//21*d^-1*(2*a^4*(5A+7C)+14*b^4*(C+3A)+84*a^2*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-8//5*a*b*d^-1*(a^2*(3A+5C)+5*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-2//105*b^2*d^-1*cos(c+d*x)^(1/2)*(b^2*(-35C+87A)+5*a^2*(5A+7C))*sin(c+d*x)+1//105*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*(10*a^2*(5A+7C)+96*A*b^2)*sin(c+d*x)+2//7*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-7//2*sin(c+d*x)+4//105*a*b*d^-1*cos(c+d*x)^-1//2*(a^2*(101A+175C)+96*A*b^2)*sin(c+d*x)+16//35*A*b*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-11//2*(A+C*cos(c+d*x)^2), x) == :(-1//15*d^-1*(2*a^4*(7A+9C)+30*b^4*(A+-1C)+36*a^2*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//315*d^-1*cos(c+d*x)^-1//2*(42*a^4*(7A+9C)+384*A*b^4+14*a^2*b^2*(155A+261C))*sin(c+d*x)+1//315*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*(14*a^2*(7A+9C)+96*A*b^2)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-9//2*sin(c+d*x)+8//21*a*b*d^-1*(a^2*(5A+7C)+7*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//315*a*b*d^-1*cos(c+d*x)^-3//2*(a^2*(101A+147C)+32*A*b^2)*sin(c+d*x)+16//63*A*b*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-13//2*(A+C*cos(c+d*x)^2), x) == :(1//231*d^-1*(10*a^4*(9A+11C)+154*b^4*(A+3C)+132*a^2*b^2*(5A+7C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//693*d^-1*cos(c+d*x)^-3//2*(30*a^4*(9A+11C)+128*A*b^4+18*a^2*b^2*(101A+143C))*sin(c+d*x)+-8//15*a*b*d^-1*(a^2*(7A+9C)+3*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*(6*a^2*(9A+11C)+32*A*b^2)*sin(c+d*x)+2//11*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-11//2*sin(c+d*x)+4//3465*a*b*d^-1*cos(c+d*x)^-5//2*(a^2*(673A+891C)+96*A*b^2)*sin(c+d*x)+8//15*a*b*d^-1*cos(c+d*x)^-1//2*(a^2*(7A+9C)+3*b^2*(3A+5C))*sin(c+d*x)+16//99*A*b*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-9//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+2//15*A*b*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*sin(c+d*x)+-1//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-3*a^2*(3A+5C)+2*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1//15*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(2*A*b+9*A*a+15*C*a)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+-1//105*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(-10*a^2*(5A+7C)+8*A*b^2)*sin(c+d*x)+2//35*A*b*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+1//105*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(5*a^2*(5A+7C)+8*A*b^2+6*A*a*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//105*b*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(a^2*(19A+35C)+8*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*sin(c+d*x)+1//105*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(6*A*b^2+10*a^2*(5A+7C))*sin(c+d*x)+6//35*A*b*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+1//105*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-6*A*b^2+25*A*a^2+35*C*a^2+-105*C*a*b+-57*A*a*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1//105*b*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-4b+4a)*(-1*a^2*(41A+70C)+3*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*sin(c+d*x)+1//315*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(6*A*b^2+14*a^2*(7A+9C))*sin(c+d*x)+2//21*A*b*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+-4//315*b*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(-1*a^2*(44A+63C)+2*A*b^2)*sin(c+d*x)+1//315*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(8*A*b^4+21*a^4*(7A+9C)+3*a^2*b^2*(11A+21C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//315*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(a^2*(39*A*b+63*C*b)+-21*a^3*(7A+9C)+8*A*b^3+6*A*a*b^2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*cos(c+d*x)^-11//2*(A+C*cos(c+d*x)^2), x) == :(1//315*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(14*a^2*(7A+9C)+30*A*b^2)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^5//2*cos(c+d*x)^-9//2*sin(c+d*x)+10//63*A*b*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*sin(c+d*x)+2//315*b*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(a^2*(163A+231C)+5*A*b^2)*sin(c+d*x)+-1//315*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-21*a^4*(7A+9C)+10*A*b^4+-3*a^2*b^2*(93A+161C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1//315*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(10*A*b^3+21*a^3*(7A+9C)+-6*b*a^2*(19A+28C)+15*a*b^2*(11A+21C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*cos(c+d*x)^-13//2*(A+C*cos(c+d*x)^2), x) == :(1//231*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(6*a^2*(9A+11C)+10*A*b^2)*sin(c+d*x)+2//11*A*d^-1*(a+b*cos(c+d*x))^5//2*cos(c+d*x)^-11//2*sin(c+d*x)+-1//693*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(-30*a^4*(9A+11C)+8*A*b^4+-2*a^2*b^2*(205A+297C))*sin(c+d*x)+10//99*A*b*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*sin(c+d*x)+2//693*b*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(a^2*(229A+297C)+3*A*b^2)*sin(c+d*x)+1//693*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(8*A*b^4+15*a^4*(9A+11C)+-6*b*a^3*(101A+132C)+3*a^2*b^2*(19A+33C)+6*A*a*b^3)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//693*b*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(a^4*(741A+957C)+8*A*b^4+3*a^2*b^2*(17A+33C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(2//3*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*sin(c+d*x)+2//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(a*(A+3C)+2*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-4//3*A*b*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(a+-1b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(2//5*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+-8//15*A*b*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*sin(c+d*x)+2//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-8*A*b^2+-3*a^2*(3A+5C)+2*A*a*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//15*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(3*a^2*(3A+5C)+8*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-9//2*(A+C*cos(c+d*x)^2), x) == :(1//105*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(10*a^2*(5A+7C)+48*A*b^2)*sin(c+d*x)+2//7*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+-12//35*A*b*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+-2//105*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-1*a^2*(44*A*b+70*C*b)+-48*A*b^3+-5*a^3*(5A+7C)+12*A*a*b^2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1//105*b*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-4b+4a)*(a^2*(22A+35C)+24*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-1//2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+-1*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(-2*a^2*(A+-1C)+4*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(2*a*(A+-1C)+4*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+-1//3*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(-2*a^2*(A+-3C)+8*A*b^2)*sin(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(2*a^2*(A+3C)+16*A*b^2+12*A*a*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+2//3*b*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(-1*a^2*(-3C+5A)+8*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-5//2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+-1//5*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*cos(c+d*x)^-5//2*(-2*a^2*(A+-5C)+12*A*b^2)*sin(c+d*x)+-1//5*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(-2*a^4*(3A+5C)+32*A*b^4+-4*a^2*b^2*(-5C+4A))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1//5*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(2*a^3*(3A+5C)+32*A*b^3+4*b*a^2*(2A+5C)+24*A*a*b^2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+2//5*b*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(-1*a^2*(-5C+3A)+8*A*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*(2*A*b^2+2*C*a^2)*sin(c+d*x)+4//3*b*a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^-1//2*(A*b^2+-1*a^2*(2C+3A))*sin(c+d*x)+-1//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(-2*a^2*(C+3A)+4*A*b^2+6*a*b*(A+C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+4//3*b*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*(-1*A*b^2+2*C*a^2+3*A*a^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//3*a^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^-1//2*(-4*C*a^4+8*A*b^4+-4*a^2*b^2*(C+4A))*sin(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-1//2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(6*a^4*(A+-1C)+16*A*b^4+-2*a^2*b^2*(C+15A))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(-6*a^3*(A+-1C)+16*A*b^3+-2*b*a^2*(C+9A)+12*A*a*b^2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+1//3*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*cos(c+d*x)^-3//2*(2*a^4*(A+-5C)+16*A*b^4+-2*a^2*b^2*(-1C+13A))*sin(c+d*x)+1//3*a^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^-3//2*(-12*A*b^4+8*C*a^4+20*A*a^2*b^2)*sin(c+d*x)+-1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(-2*a^3*(-3*C*b+9*A*b)+-2*a^4*(A+3C)+32*A*b^4+-4*a^2*b^2*(-1C+8A)+24*A*a*b^3)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-4//3*b*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(a^4*(-3C+4A)+8*A*b^4+-1*a^2*b^2*(-1C+14A))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*((1/2)*B*a+3//8*C*b)+d^-1*(B*b+C*a)*sin(c+d*x)+-1//3*d^-1*sin(c+d*x)^3*(B*b+C*a)+1//8*d^-1*(3*C*b+4*B*a)*cos(c+d*x)*sin(c+d*x)+1//4*C*b*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(x*(B*a+(1/2)*C*b)+d^-1*(B*b+C*a)*sin(c+d*x)+(1/2)*C*b*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(sec(c+d*x)^2*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*(B*b+C*a)+B*a*d^-1*arctanh(sin(c+d*x))+C*b*d^-1*sin(c+d*x))
@test integrate(sec(c+d*x)^3*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*b*x+d^-1*(B*b+C*a)*arctanh(sin(c+d*x))+B*a*d^-1*tan(c+d*x))
@test integrate(sec(c+d*x)^4*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*(B*b+C*a)*tan(c+d*x)+(1/2)*d^-1*(B*a+2*C*b)*arctanh(sin(c+d*x))+(1/2)*B*a*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^5*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*d^-1*(B*b+C*a)*arctanh(sin(c+d*x))+1//3*d^-1*(2*B*a+3*C*b)*tan(c+d*x)+(1/2)*d^-1*(B*b+C*a)*sec(c+d*x)*tan(c+d*x)+1//3*B*a*d^-1*sec(c+d*x)^2*tan(c+d*x))
@test integrate(sec(c+d*x)^6*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*(B*b+C*a)*tan(c+d*x)+1//3*d^-1*tan(c+d*x)^3*(B*b+C*a)+1//8*d^-1*(3*B*a+4*C*b)*arctanh(sin(c+d*x))+1//8*d^-1*(3*B*a+4*C*b)*sec(c+d*x)*tan(c+d*x)+1//4*B*a*d^-1*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*((1/2)*B*a^2+3//8*B*b^2+3//4*C*a*b)+-1//15*d^-1*sin(c+d*x)^3*(4*C*b^2+5*a*(C*a+2*B*b))+1//5*d^-1*(4*C*b^2+5*a*(C*a+2*B*b))*sin(c+d*x)+1//8*d^-1*(3*B*b^2+4*B*a^2+6*C*a*b)*cos(c+d*x)*sin(c+d*x)+1//20*b*d^-1*cos(c+d*x)^3*(5*B*b+6*C*a)*sin(c+d*x)+1//5*C*b*d^-1*cos(c+d*x)^3*(a+b*cos(c+d*x))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*((1/2)*C*a^2+3//8*C*b^2+B*a*b)+1//6*b^-1*d^-1*(-1*C*a^3+4*B*b^3+4*B*b*a^2+8*C*a*b^2)*sin(c+d*x)+1//24*d^-1*(-2*C*a^2+9*C*b^2+8*B*a*b)*cos(c+d*x)*sin(c+d*x)+1//4*C*b^-1*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//12*b^-1*d^-1*(a+b*cos(c+d*x))^2*(-1*C*a+4*B*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(x*(B*a^2+(1/2)*B*b^2+C*a*b)+1//3*d^-1*(2*C*a^2+2*C*b^2+6*B*a*b)*sin(c+d*x)+1//3*C*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x)+1//6*b*d^-1*(2*C*a+3*B*b)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*(C*a^2+(1/2)*C*b^2+2*B*a*b)+B*a^2*d^-1*arctanh(sin(c+d*x))+(1/2)*b*d^-1*(2*B*b+3*C*a)*sin(c+d*x)+(1/2)*C*b*d^-1*(a+b*cos(c+d*x))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(b*x*(B*b+2*C*a)+B*a^2*d^-1*tan(c+d*x)+C*b^2*d^-1*sin(c+d*x)+a*d^-1*(C*a+2*B*b)*arctanh(sin(c+d*x)))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^4*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*b^2+(1/2)*d^-1*(B*a^2+2*B*b^2+4*C*a*b)*arctanh(sin(c+d*x))+a*d^-1*(C*a+2*B*b)*tan(c+d*x)+(1/2)*B*a^2*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^5*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*d^-1*(C*a^2+2*C*b^2+2*B*a*b)*arctanh(sin(c+d*x))+1//3*d^-1*(2*B*a^2+3*B*b^2+6*C*a*b)*tan(c+d*x)+(1/2)*a*d^-1*(C*a+2*B*b)*sec(c+d*x)*tan(c+d*x)+1//3*B*a^2*d^-1*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^6*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*C*a^2+3*C*b^2+4*B*a*b)*tan(c+d*x)+1//8*d^-1*(3*B*a^2+4*B*b^2+8*C*a*b)*arctanh(sin(c+d*x))+1//8*d^-1*(3*B*a^2+4*B*b^2+8*C*a*b)*sec(c+d*x)*tan(c+d*x)+1//3*a*d^-1*sec(c+d*x)^2*(C*a+2*B*b)*tan(c+d*x)+1//4*B*a^2*d^-1*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*((1/2)*C*a^3+3//8*B*b^3+3//2*B*b*a^2+9//8*C*a*b^2)+1//30*b^-1*d^-1*(-3*C*a^4+16*C*b^4+15*B*b*a^3+52*C*a^2*b^2+60*B*a*b^3)*sin(c+d*x)+1//120*d^-1*(-6*C*a^3+45*B*b^3+30*B*b*a^2+71*C*a*b^2)*cos(c+d*x)*sin(c+d*x)+1//5*C*b^-1*d^-1*(a+b*cos(c+d*x))^4*sin(c+d*x)+1//20*b^-1*d^-1*(a+b*cos(c+d*x))^3*(-1*C*a+5*B*b)*sin(c+d*x)+1//60*b^-1*d^-1*(a+b*cos(c+d*x))^2*(-3*C*a^2+16*C*b^2+15*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(x*(B*a^3+3//8*C*b^3+3//2*B*a*b^2+3//2*C*b*a^2)+1//6*d^-1*(3*C*a^3+4*B*b^3+12*C*a*b^2+16*B*b*a^2)*sin(c+d*x)+1//4*C*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//12*d^-1*(a+b*cos(c+d*x))^2*(3*C*a+4*B*b)*sin(c+d*x)+1//24*b*d^-1*(6*C*a^2+9*C*b^2+20*B*a*b)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*(C*a^3+(1/2)*B*b^3+3*B*b*a^2+3//2*C*a*b^2)+B*a^3*d^-1*arctanh(sin(c+d*x))+1//3*b*d^-1*(2*C*b^2+8*C*a^2+9*B*a*b)*sin(c+d*x)+1//3*C*b*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x)+1//6*b^2*d^-1*(3*B*b+5*C*a)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*b*x*(C*b^2+6*C*a^2+6*B*a*b)+a^2*d^-1*(C*a+3*B*b)*arctanh(sin(c+d*x))+-1*b*d^-1*(-1*B*b^2+2*B*a^2+-3*C*a*b)*sin(c+d*x)+B*a*d^-1*(a+b*cos(c+d*x))^2*tan(c+d*x)+-1//2*b^2*d^-1*(-1*C*b+2*B*a)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^4*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*b^2*(B*b+3*C*a)+a^2*d^-1*(C*a+2*B*b)*tan(c+d*x)+(1/2)*a*d^-1*(B*a^2+6*B*b^2+6*C*a*b)*arctanh(sin(c+d*x))+-1//2*b^2*d^-1*(B*a+-2*C*b)*sin(c+d*x)+(1/2)*B*a*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^5*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*b^3+(1/2)*d^-1*(C*a^3+2*B*b^3+3*B*b*a^2+6*C*a*b^2)*arctanh(sin(c+d*x))+1//3*a*d^-1*(2*B*a^2+8*B*b^2+9*C*a*b)*tan(c+d*x)+1//6*a^2*d^-1*(3*C*a+5*B*b)*sec(c+d*x)*tan(c+d*x)+1//3*B*a*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^6*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*C*a^3+3*B*b^3+6*B*b*a^2+9*C*a*b^2)*tan(c+d*x)+1//8*d^-1*(3*B*a^3+8*C*b^3+12*B*a*b^2+12*C*b*a^2)*arctanh(sin(c+d*x))+1//6*a^2*d^-1*sec(c+d*x)^2*(2*C*a+3*B*b)*tan(c+d*x)+1//8*a*d^-1*(3*B*a^2+10*B*b^2+12*C*a*b)*sec(c+d*x)*tan(c+d*x)+1//4*B*a*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^7*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*d^-1*(3*C*a^3+4*B*b^3+9*B*b*a^2+12*C*a*b^2)*arctanh(sin(c+d*x))+1//15*d^-1*(8*B*a^3+15*C*b^3+30*B*a*b^2+30*C*b*a^2)*tan(c+d*x)+1//8*d^-1*(3*C*a^3+4*B*b^3+9*B*b*a^2+12*C*a*b^2)*sec(c+d*x)*tan(c+d*x)+1//15*a*d^-1*sec(c+d*x)^2*(4*B*a^2+12*B*b^2+15*C*a*b)*tan(c+d*x)+1//20*a^2*d^-1*sec(c+d*x)^3*(5*C*a+7*B*b)*tan(c+d*x)+1//5*B*a*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^4*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1*cos(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*b^-4*(b^2+2*a^2)*(B*b+-1*C*a)+-1//3*b^-3*d^-1*(-3*C*a^2+-2*C*b^2+3*B*a*b)*sin(c+d*x)+(1/2)*b^-2*d^-1*(B*b+-1*C*a)*cos(c+d*x)*sin(c+d*x)+1//3*C*b^-1*d^-1*cos(c+d*x)^2*sin(c+d*x)+-2*a^3*b^-4*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(B*b+-1*C*a)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//2*x*b^-3*(-1*C*b^2+-2*C*a^2+2*B*a*b)+b^-2*d^-1*(B*b+-1*C*a)*sin(c+d*x)+(1/2)*C*b^-1*d^-1*cos(c+d*x)*sin(c+d*x)+2*a^2*b^-3*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(B*b+-1*C*a)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*b^-2*(B*b+-1*C*a)+C*b^-1*d^-1*sin(c+d*x)+-2*a*b^-2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(B*b+-1*C*a)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(C*x*b^-1+b^-1*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-2*C*a+2*B*b)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*a^-1*d^-1*arctanh(sin(c+d*x))+-1*a^-1*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-2*C*a+2*B*b)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*a^-1*d^-1*tan(c+d*x)+-1*a^-2*d^-1*(B*b+-1*C*a)*arctanh(sin(c+d*x))+2*b*a^-2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(B*b+-1*C*a)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^4*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*(B*a^2+2*B*b^2+-2*C*a*b)*arctanh(sin(c+d*x))+-1*a^-2*d^-1*(B*b+-1*C*a)*tan(c+d*x)+(1/2)*B*a^-1*d^-1*sec(c+d*x)*tan(c+d*x)+-2*a^-3*b^2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(B*b+-1*C*a)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*cos(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*x*b^-4*(-1*C*b^2+-6*C*a^2+4*B*a*b)+b^-3*d^-1*(a^2+-1*b^2)^-1*(-1*B*b^3+-3*C*a^3+2*B*b*a^2+2*C*a*b^2)*sin(c+d*x)+-1//2*b^-2*d^-1*(a^2+-1*b^2)^-1*(C*b^2+-3*C*a^2+2*B*a*b)*cos(c+d*x)*sin(c+d*x)+2*a^2*b^-4*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-3*B*b^3+-3*C*a^3+2*B*b*a^2+4*C*a*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+a*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*b^-3*(B*b+-2*C*a)+C*b^-2*d^-1*sin(c+d*x)+-1*a^2*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x)+-2*a*b^-3*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*B*b^3+-2*C*a^3+B*b*a^2+3*C*a*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*b^-2+-1*b^-2*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(2*B*b^3+2*C*a^3+-4*C*a*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+a*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*C*b+2*B*a)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*a^-2*d^-1*arctanh(sin(c+d*x))+-1*a^-2*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*B*b^3+-2*C*a^3+4*B*b*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+b*a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-3*d^-1*(-1*C*a+2*B*b)*arctanh(sin(c+d*x))+a^-2*d^-1*(a^2+-1*b^2)^-1*(B*a^2+-2*B*b^2+C*a*b)*tan(c+d*x)+b*a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*tan(c+d*x)+2*b*a^-3*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*B*b^3+-2*C*a^3+C*a*b^2+3*B*b*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*cos(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*x*b^-5*(-1*C*b^2+-12*C*a^2+6*B*a*b)+(1/2)*b^-4*d^-1*(a^2+-1*b^2)^-2*(-12*C*a^5+2*B*b^5+-11*B*a^2*b^3+-6*C*a*b^4+6*B*b*a^4+21*C*a^3*b^2)*sin(c+d*x)+-1//2*b^-3*d^-1*(a^2+-1*b^2)^-2*(-1*C*b^4+-6*C*a^4+-6*B*a*b^3+3*B*b*a^3+10*C*a^2*b^2)*cos(c+d*x)*sin(c+d*x)+a^2*b^-5*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-12*C*a^5+12*B*b^5+-20*C*a*b^4+-15*B*a^2*b^3+6*B*b*a^4+29*C*a^3*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*a*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(B*b+-1*C*a)*sin(c+d*x)+(1/2)*a*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*cos(c+d*x)^2*(-5*B*b^3+-4*C*a^3+2*B*b*a^2+7*C*a*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*cos(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*b^-4*(B*b+-3*C*a)+-1//2*b^-3*d^-1*(a^2+-1*b^2)^-1*(-3*C*a^2+2*C*b^2+B*a*b)*sin(c+d*x)+-1*a*b^-4*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-6*C*a^5+6*B*b^5+-12*C*a*b^4+-5*B*a^2*b^3+2*B*b*a^4+15*C*a^3*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a^2*b^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-4*B*b^3+-3*C*a^3+B*b*a^2+6*C*a*b^2)*sin(c+d*x)+(1/2)*a*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(C*x*b^-3+b^-3*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-2*C*a^5+2*B*b^5+B*a^2*b^3+-6*C*a*b^4+5*C*a^3*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*a*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-4*B*b^3+-3*C*a^3+B*b*a^2+6*C*a*b^2)*sin(c+d*x)+-1//2*a^2*b^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-1*C*a^2+-2*C*b^2+3*B*a*b)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(C*a^3+2*B*b^3+B*b*a^2+-4*C*a*b^2)*sin(c+d*x)+(1/2)*a*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(B*b^2+2*B*a^2+-3*C*a*b)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1*d^-1*(a+b*cos(c+d*x))^-2*(-2*b^2+2*a^2)^-1*(B*b+-1*C*a)*sin(c+d*x)+-1//2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-1*C*a^2+-2*C*b^2+3*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*sec(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(B*a^-3*d^-1*arctanh(sin(c+d*x))+-1*a^-3*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-2*C*a^5+2*B*b^5+-1*C*a^3*b^2+-5*B*a^2*b^3+6*B*b*a^4)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*b*a^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x)+(1/2)*b*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-3*C*a^3+-2*B*b^3+5*B*b*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*sec(c+d*x)^3*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-4*d^-1*(-1*C*a+3*B*b)*arctanh(sin(c+d*x))+(1/2)*a^-3*d^-1*(a^2+-1*b^2)^-2*(2*B*a^4+6*B*b^4+-11*B*a^2*b^2+-2*C*a*b^3+5*C*b*a^3)*tan(c+d*x)+b*a^-4*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-6*C*a^5+6*B*b^5+-15*B*a^2*b^3+-2*C*a*b^4+5*C*a^3*b^2+12*B*b*a^4)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*b*a^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*tan(c+d*x)+(1/2)*b*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-4*C*a^3+-3*B*b^3+C*a*b^2+6*B*b*a^2)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//105*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(-50*C*b^2+-16*C*a^2+28*B*a*b)*sin(c+d*x)+1//35*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*(-8*C*a+14*B*b)*sin(c+d*x)+-1//105*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-126*B*b^3+-16*C*a^3+-38*C*a*b^2+28*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//7*C*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)*sin(c+d*x)+1//105*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-25*C*b^2+-8*C*a^2+14*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^(1/2)*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*(-4*C*a+10*B*b)*sin(c+d*x)+2//5*C*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*sin(c+d*x)+1//15*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-4*C*a^2+18*C*b^2+10*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//15*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-2*C*a+5*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^(1/2)*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(2//3*C*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+1//3*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(2*C*a+6*B*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//3*C*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//315*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(-150*B*b^3+-16*C*a^3+-78*C*a*b^2+36*B*b*a^2)*sin(c+d*x)+-1//315*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*(-98*C*b^2+-16*C*a^2+36*B*a*b)*sin(c+d*x)+1//63*b^-2*d^-1*(a+b*cos(c+d*x))^5//2*(-8*C*a+18*B*b)*sin(c+d*x)+-1//315*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-294*C*b^4+-16*C*a^4+-492*B*a*b^3+-66*C*a^2*b^2+36*B*b*a^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//9*C*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*cos(c+d*x)*sin(c+d*x)+1//315*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-75*B*b^3+-8*C*a^3+-39*C*a*b^2+18*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*(-4*C*a+14*B*b)*sin(c+d*x)+1//105*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*(-12*C*a^2+50*C*b^2+42*B*a*b)*sin(c+d*x)+2//7*C*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*sin(c+d*x)+1//105*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-12*C*a^3+126*B*b^3+42*B*b*a^2+164*C*a*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//105*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-6*C*a^2+25*C*b^2+21*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//15*d^-1*(a+b*cos(c+d*x))^(1/2)*(6*C*a+10*B*b)*sin(c+d*x)+2//5*C*d^-1*(a+b*cos(c+d*x))^3//2*sin(c+d*x)+1//15*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(6*C*a^2+18*C*b^2+40*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//15*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(3*C*a+5*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//693*b^-2*d^-1*(a+b*cos(c+d*x))^5//2*(-162*C*b^2+-16*C*a^2+44*B*a*b)*sin(c+d*x)+-1//3465*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(-1350*C*b^4+-80*C*a^4+-2508*B*a*b^3+-570*C*a^2*b^2+220*B*b*a^3)*sin(c+d*x)+-1//3465*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*(-1078*B*b^3+-80*C*a^3+-670*C*a*b^2+220*B*b*a^2)*sin(c+d*x)+1//99*b^-2*d^-1*(a+b*cos(c+d*x))^7//2*(-8*C*a+22*B*b)*sin(c+d*x)+-1//3465*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-3234*B*b^5+-80*C*a^5+-7410*C*a*b^4+-6138*B*a^2*b^3+-510*C*a^3*b^2+220*B*b*a^4)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//11*C*b^-1*d^-1*(a+b*cos(c+d*x))^7//2*cos(c+d*x)*sin(c+d*x)+1//3465*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-675*C*b^4+-40*C*a^4+-1254*B*a*b^3+-285*C*a^2*b^2+110*B*b*a^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//63*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*(-4*C*a+18*B*b)*sin(c+d*x)+1//315*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*(-20*C*a^3+150*B*b^3+90*B*b*a^2+228*C*a*b^2)*sin(c+d*x)+1//315*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*(-20*C*a^2+98*C*b^2+90*B*a*b)*sin(c+d*x)+2//9*C*b^-1*d^-1*(a+b*cos(c+d*x))^7//2*sin(c+d*x)+1//315*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-20*C*a^4+294*C*b^4+90*B*b*a^3+558*C*a^2*b^2+870*B*a*b^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//315*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-10*C*a^3+75*B*b^3+45*B*b*a^2+114*C*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(1//35*d^-1*(a+b*cos(c+d*x))^3//2*(10*C*a+14*B*b)*sin(c+d*x)+1//105*d^-1*(a+b*cos(c+d*x))^(1/2)*(30*C*a^2+50*C*b^2+112*B*a*b)*sin(c+d*x)+2//7*C*d^-1*(a+b*cos(c+d*x))^5//2*sin(c+d*x)+1//105*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(30*C*a^3+126*B*b^3+290*C*a*b^2+322*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//105*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(15*C*a^2+25*C*b^2+56*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-1//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//15*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(-8*C*a+10*B*b)*sin(c+d*x)+-1//15*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-18*C*b^2+-16*C*a^2+20*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//15*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-16*C*a^3+10*B*b^3+-14*C*a*b^2+20*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//5*C*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*C*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+-1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-4*C*a^2+-2*C*b^2+6*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-4*C*a+6*B*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-1//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*C*a+2*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2*C*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-96*C*a^3+10*B*b^3+-24*C*a*b^2+80*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//15*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-48*C*a^3+-10*B*b^3+18*C*a*b^2+40*B*b*a^2)*sin(c+d*x)+-1//5*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-12*C*a^2+2*C*b^2+10*B*a*b)*cos(c+d*x)*sin(c+d*x)+-1//15*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-96*C*a^4+18*C*b^4+-50*B*a*b^3+48*C*a^2*b^2+80*B*b*a^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2*a*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(2//3*C*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+-1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-16*C*a^2+-2*C*b^2+12*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-2*a^2*b^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x)+1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-16*C*a^3+-6*B*b^3+10*C*a*b^2+12*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-4*C*a+2*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-4*C*a^2+2*C*b^2+2*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2*a*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-2*C*a+2*B*b)*sin(c+d*x)+2*C*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-2*C*a+2*B*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-4*C*a^2+2*C*b^2+2*B*a*b)*sin(c+d*x)+-2//3*a^2*b^-3*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(-7*B*b^3+-6*C*a^3+3*B*b*a^2+10*C*a*b^2)*sin(c+d*x)+-1//3*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-32*C*a^4+2*C*b^4+-18*B*a*b^3+16*B*b*a^3+32*C*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//3*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-32*C*a^5+6*B*b^5+-30*B*a^2*b^3+-16*C*a*b^4+16*B*b*a^4+56*C*a^3*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//3*a*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-2//3*a^2*b^-2*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x)+-1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-16*C*a^4+-6*C*b^4+-12*B*a*b^3+4*B*b*a^3+30*C*a^2*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-16*C*a^3+-6*B*b^3+4*B*b*a^2+18*C*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//3*a*b^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(-6*B*b^3+-5*C*a^3+2*B*b*a^2+9*C*a*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(4*C*a^3+6*B*b^3+-12*C*a*b^2+2*B*b*a^2)*sin(c+d*x)+-1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(4*C*a^3+6*B*b^3+-12*C*a*b^2+2*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-6*C*b^2+4*C*a^2+2*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//3*a*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(-1*d^-1*(a+b*cos(c+d*x))^-3//2*(-3*b^2+3*a^2)^-1*(-2*C*a+2*B*b)*sin(c+d*x)+-1//3*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(-6*C*b^2+-2*C*a^2+8*B*a*b)*sin(c+d*x)+-1//3*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-2*C*a+2*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//3*b^-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-6*C*b^2+-2*C*a^2+8*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate(cos(c+d*x)^3//2*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(14*C*b+18*B*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*b+10*C*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//7*d^-1*cos(c+d*x)^5//2*(2*B*b+2*C*a)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*(10*B*b+10*C*a)*sin(c+d*x)+1//45*d^-1*cos(c+d*x)^3//2*(14*C*b+18*B*a)*sin(c+d*x)+2//9*C*b*d^-1*cos(c+d*x)^7//2*sin(c+d*x))
@test integrate(cos(c+d*x)^(1/2)*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(6*B*b+6*C*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*C*b+14*B*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^3//2*(2*B*b+2*C*a)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*(10*C*b+14*B*a)*sin(c+d*x)+2//7*C*b*d^-1*cos(c+d*x)^5//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-1//2*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*b+2*C*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(6*C*b+10*B*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*cos(c+d*x)^(1/2)*(2*B*b+2*C*a)*sin(c+d*x)+2//5*C*b*d^-1*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-3//2*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*(2*B*b+2*C*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*C*b+6*B*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*C*b*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate(cos(c+d*x)^-5//2*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*(-2*B*a+2*C*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+d^-1*(2*B*b+2*C*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*B*a*d^-1*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-7//2*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*(-2*B*b+-2*C*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*B*a+6*C*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+d^-1*cos(c+d*x)^-1//2*(2*B*b+2*C*a)*sin(c+d*x)+2//3*B*a*d^-1*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-9//2*(a+b*cos(c+d*x))*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*b+2*C*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(-10*C*b+-6*B*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*cos(c+d*x)^-3//2*(2*B*b+2*C*a)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^-1//2*(6*B*a+10*C*b)*sin(c+d*x)+2//5*B*a*d^-1*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(14*B*b^2+18*B*a^2+28*C*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*(90*C*b^2+110*a*(C*a+2*B*b))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//45*d^-1*cos(c+d*x)^3//2*(14*B*b^2+18*B*a^2+28*C*a*b)*sin(c+d*x)+1//77*d^-1*cos(c+d*x)^5//2*(18*C*b^2+22*a*(C*a+2*B*b))*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*(90*C*b^2+110*a*(C*a+2*B*b))*sin(c+d*x)+2//99*b*d^-1*cos(c+d*x)^7//2*(11*B*b+13*C*a)*sin(c+d*x)+2//11*C*b*d^-1*cos(c+d*x)^7//2*(a+b*cos(c+d*x))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(14*C*b^2+18*a*(C*a+2*B*b))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*b^2+14*B*a^2+20*C*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*(10*B*b^2+14*B*a^2+20*C*a*b)*sin(c+d*x)+1//45*d^-1*cos(c+d*x)^3//2*(14*C*b^2+18*a*(C*a+2*B*b))*sin(c+d*x)+2//63*b*d^-1*cos(c+d*x)^5//2*(9*B*b+11*C*a)*sin(c+d*x)+2//9*C*b*d^-1*cos(c+d*x)^5//2*(a+b*cos(c+d*x))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(6*B*b^2+10*B*a^2+12*C*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*C*b^2+14*a*(C*a+2*B*b))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*(10*C*b^2+14*a*(C*a+2*B*b))*sin(c+d*x)+2//35*b*d^-1*cos(c+d*x)^3//2*(7*B*b+9*C*a)*sin(c+d*x)+2//7*C*b*d^-1*cos(c+d*x)^3//2*(a+b*cos(c+d*x))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*b^2+6*B*a^2+4*C*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(6*C*b^2+10*a*(C*a+2*B*b))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//15*b*d^-1*cos(c+d*x)^(1/2)*(5*B*b+7*C*a)*sin(c+d*x)+2//5*C*b*d^-1*cos(c+d*x)^(1/2)*(a+b*cos(c+d*x))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(-2*B*b^2+2*B*a^2+-4*C*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*C*b^2+6*C*a^2+12*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*B*a^2*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*C*b^2*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(-2*C*b^2+2*C*a^2+4*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*B*a^2+6*B*b^2+12*C*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*a*d^-1*cos(c+d*x)^-1//2*(C*a+2*B*b)*sin(c+d*x)+2//3*B*a^2*d^-1*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-9//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(6*B*a^2+10*B*b^2+20*C*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*C*a^2+6*C*b^2+4*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^-1//2*(6*B*a^2+10*B*b^2+20*C*a*b)*sin(c+d*x)+2//3*a*d^-1*cos(c+d*x)^-3//2*(C*a+2*B*b)*sin(c+d*x)+2//5*B*a^2*d^-1*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-11//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(6*C*a^2+10*C*b^2+12*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*a^2+14*B*b^2+28*C*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^-1//2*(6*C*a^2+10*C*b^2+12*B*a*b)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^-3//2*(10*B*a^2+14*B*b^2+28*C*a*b)*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^-5//2*(C*a+2*B*b)*sin(c+d*x)+2//7*B*a^2*d^-1*cos(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^(1/2)*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(14*B*b^3+18*C*a^3+42*C*a*b^2+54*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*(90*C*b^3+154*B*a^3+330*B*a*b^2+330*C*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//45*d^-1*cos(c+d*x)^3//2*(14*B*b^3+18*C*a^3+42*C*a*b^2+54*B*b*a^2)*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*(90*C*b^3+154*B*a^3+330*B*a*b^2+330*C*b*a^2)*sin(c+d*x)+2//77*b*d^-1*cos(c+d*x)^5//2*(9*C*b^2+26*C*a^2+33*B*a*b)*sin(c+d*x)+2//99*b^2*d^-1*cos(c+d*x)^7//2*(11*B*b+15*C*a)*sin(c+d*x)+2//11*C*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-1//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(14*C*b^3+30*B*a^3+54*B*a*b^2+54*C*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*b^3+14*C*a^3+30*C*a*b^2+42*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*(10*B*b^3+14*C*a^3+30*C*a*b^2+42*B*b*a^2)*sin(c+d*x)+2//45*b*d^-1*cos(c+d*x)^3//2*(7*C*b^2+22*C*a^2+27*B*a*b)*sin(c+d*x)+2//63*b^2*d^-1*cos(c+d*x)^5//2*(9*B*b+13*C*a)*sin(c+d*x)+2//9*C*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(6*B*b^3+10*C*a^3+18*C*a*b^2+30*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*C*b^3+42*B*a^3+42*B*a*b^2+42*C*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//21*b*d^-1*cos(c+d*x)^(1/2)*(5*C*b^2+18*C*a^2+21*B*a*b)*sin(c+d*x)+2//35*b^2*d^-1*cos(c+d*x)^3//2*(7*B*b+11*C*a)*sin(c+d*x)+2//7*C*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(-6*C*b^3+10*B*a^3+-30*B*a*b^2+-30*C*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*B*b^3+6*C*a^3+6*C*a*b^2+18*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//3*b*d^-1*cos(c+d*x)^(1/2)*(-1*B*b^2+6*B*a^2+-3*C*a*b)*sin(c+d*x)+-2//5*b^2*d^-1*cos(c+d*x)^3//2*(-1*C*b+5*B*a)*sin(c+d*x)+2*B*a*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-7//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(-2*B*b^3+2*C*a^3+-6*C*a*b^2+6*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*B*a^3+2*C*b^3+18*B*a*b^2+18*C*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//3*b^2*d^-1*cos(c+d*x)^(1/2)*(B*a+-1*C*b)*sin(c+d*x)+2//3*a^2*d^-1*cos(c+d*x)^-1//2*(3*C*a+7*B*b)*sin(c+d*x)+2//3*B*a*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-9//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(-10*C*b^3+6*B*a^3+30*B*a*b^2+30*C*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*C*a^3+6*B*b^3+6*B*b*a^2+18*C*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*a*d^-1*cos(c+d*x)^-1//2*(3*B*a^2+14*B*b^2+15*C*a*b)*sin(c+d*x)+2//15*a^2*d^-1*cos(c+d*x)^-3//2*(5*C*a+9*B*b)*sin(c+d*x)+2//5*B*a*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-11//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(6*C*a^3+10*B*b^3+18*B*b*a^2+30*C*a*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*a^3+42*C*b^3+42*B*a*b^2+42*C*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^-1//2*(6*C*a^3+10*B*b^3+18*B*b*a^2+30*C*a*b^2)*sin(c+d*x)+2//21*a*d^-1*cos(c+d*x)^-3//2*(5*B*a^2+18*B*b^2+21*C*a*b)*sin(c+d*x)+2//35*a^2*d^-1*cos(c+d*x)^-5//2*(7*C*a+11*B*b)*sin(c+d*x)+2//7*B*a*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-13//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//15*d^-1*(14*B*a^3+30*C*b^3+54*B*a*b^2+54*C*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*C*a^3+14*B*b^3+30*B*b*a^2+42*C*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//15*d^-1*cos(c+d*x)^-1//2*(14*B*a^3+30*C*b^3+54*B*a*b^2+54*C*b*a^2)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^-3//2*(10*C*a^3+14*B*b^3+30*B*b*a^2+42*C*a*b^2)*sin(c+d*x)+2//45*a*d^-1*cos(c+d*x)^-5//2*(7*B*a^2+22*B*b^2+27*C*a*b)*sin(c+d*x)+2//63*a^2*d^-1*cos(c+d*x)^-7//2*(9*C*a+13*B*b)*sin(c+d*x)+2//9*B*a*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-9//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*B*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*sin(c+d*x)+1//3*a^-1*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(B+-3C)*(-2b+2a)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(B*b+3*C*a)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*B*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+1//15*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(2*B*b+10*C*a)*sin(c+d*x)+-1//15*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-5*C*a+2*B*b+9*B*a)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-2*B*b^2+9*B*a^2+5*C*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-11//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//7*B*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+1//35*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(2*B*b+14*C*a)*sin(c+d*x)+1//105*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(-8*B*b^2+50*B*a^2+14*C*a*b)*sin(c+d*x)+1//105*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(8*B*b^3+63*C*a^3+-14*C*a*b^2+19*B*b*a^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//105*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(a^2*(-63C+25B)+8*B*b^2+2*a*b*(-7C+3B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(10*C*a+12*B*b)*sin(c+d*x)+2//5*B*a*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+-1//15*a^-1*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-5*C*a+-3*B*b+9*B*a+15*C*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//15*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(3*B*b^2+9*B*a^2+20*C*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(14*C*a+16*B*b)*sin(c+d*x)+1//105*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(6*B*b^2+50*B*a^2+84*C*a*b)*sin(c+d*x)+2//7*B*a*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+-1//105*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-1*a^2*(-63C+25B)+6*B*b^2+3*a*b*(-7C+19B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//105*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-6*B*b^3+63*C*a^3+21*C*a*b^2+82*B*b*a^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*cos(c+d*x)^-11//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//105*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(50*B*a^2+90*B*b^2+154*C*a*b)*sin(c+d*x)+2//7*B*a*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*sin(c+d*x)+2//35*a*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(7*C*a+10*B*b)*sin(c+d*x)+1//105*a^-1*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(a^2*(-63C+25B)+15*b^2*(B+-7C)+-8*a*b*(-7C+15B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//105*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(15*B*b^3+63*C*a^3+145*B*b*a^2+161*C*a*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*cos(c+d*x)^-13//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//315*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(98*B*a^2+150*B*b^2+270*C*a*b)*sin(c+d*x)+1//315*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(10*B*b^3+150*C*a^3+270*C*a*b^2+326*B*b*a^2)*sin(c+d*x)+2//9*B*a*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*sin(c+d*x)+2//21*a*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(3*C*a+4*B*b)*sin(c+d*x)+-1//315*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(3*a^3*(-25C+49B)+10*B*b^3+-6*b*a^2*(-60C+19B)+15*a*b^2*(-3C+11B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//315*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-10*B*b^4+147*B*a^4+45*C*a*b^3+279*B*a^2*b^2+435*C*b*a^3)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*cos(c+d*x)^-15//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//693*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(162*B*a^2+226*B*b^2+418*C*a*b)*sin(c+d*x)+1//3465*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(30*B*b^3+1078*C*a^3+1650*C*a*b^2+2290*B*b*a^2)*sin(c+d*x)+1//3465*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(-40*B*b^4+1350*B*a^4+110*C*a*b^3+2050*B*a^2*b^2+3586*C*b*a^3)*sin(c+d*x)+2//11*B*a*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*sin(c+d*x)+2//99*a*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*(11*C*a+14*B*b)*sin(c+d*x)+1//3465*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(40*B*b^5+1617*C*a^5+-110*C*a*b^4+255*B*a^2*b^3+3069*C*a^3*b^2+3705*B*b*a^4)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3465*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(3*a^4*(-539C+225B)+40*B*b^4+-6*b*a^3*(-209C+505B)+10*a*b^3*(-11C+3B)+15*a^2*b^2*(-121C+19B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2*a^-1*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(B+-1C)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+B*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*B*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*sin(c+d*x)+2//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(a*(B+-3C)+2*B*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2a+2b)*(-3*C*a+2*B*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-9//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//15*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(-10*C*a+8*B*b)*sin(c+d*x)+2//5*B*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+-2//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(a^2*(-5C+9B)+8*B*b^2+-2*a*b*(B+5C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//15*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(8*B*b^2+9*B*a^2+-10*C*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-1//2*(-2*C*a+2*B*b)*sin(c+d*x)+a^-1*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(2B+2C)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(-2*C*a+2*B*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(-4*B*b^2+2*B*a^2+2*C*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(2*a*(B+-1C)+4*B*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+2*b*a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-1//2*(B*b+-1*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^-7//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(-8*B*b^2+2*B*a^2+6*C*a*b)*sin(c+d*x)+2*b*a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(B*b+-1*C*a)*sin(c+d*x)+-1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(-16*B*b^3+-6*C*a^3+10*B*b*a^2+12*C*a*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(2a+4b)*(a*(B+-3C)+4*B*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^-1//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+b*cos(c+d*x))^-3//2*(-3*b^2+3*a^2)^-1*cos(c+d*x)^(1/2)*(-2*C*a+2*B*b)*sin(c+d*x)+1//3*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^-1//2*(2*B*b^2+6*B*a^2+-8*C*a*b)*sin(c+d*x)+-1//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*(2*B*b^2+6*B*a^2+-8*C*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-1*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*(-6*C*b+-2*B*b+2*C*a+6*B*a)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^-1//2*(-6*C*a^3+-4*B*b^3+-2*C*a*b^2+12*B*b*a^2)*sin(c+d*x)+2//3*b*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*(B*b+-1*C*a)*sin(c+d*x)+-1//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(-6*a^2*(B+C)+4*B*b^2+2*a*b*(C+3B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*(-6*C*a^3+-4*B*b^3+-2*C*a*b^2+12*B*b*a^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^-5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*b*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-1//2*(B*b+-1*C*a)*sin(c+d*x)+2//3*b*a^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^-1//2*(-5*C*a^3+-4*B*b^3+C*a*b^2+8*B*b*a^2)*sin(c+d*x)+1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*(6*B*a^4+16*B*b^4+-30*B*a^2*b^2+-4*C*a*b^3+12*C*b*a^3)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(-6*a^3*(B+-1C)+16*B*b^3+-6*b*a^2*(C+3B)+4*a*b^2*(-1C+3B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate(cos(c+d*x)^2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*((1/2)*A*a+3//8*B*b+3//8*C*a)+-1//15*d^-1*sin(c+d*x)^3*(4*C*b+5*A*b+5*B*a)+1//5*d^-1*(4*C*b+5*A*b+5*B*a)*sin(c+d*x)+1//4*d^-1*cos(c+d*x)^3*(B*b+C*a)*sin(c+d*x)+1//8*d^-1*(3*B*b+3*C*a+4*A*a)*cos(c+d*x)*sin(c+d*x)+1//5*C*b*d^-1*cos(c+d*x)^4*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*((1/2)*A*b+(1/2)*B*a+3//8*C*b)+1//3*d^-1*(2*B*b+2*C*a+3*A*a)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^2*(B*b+C*a)*sin(c+d*x)+1//8*d^-1*(3*C*b+4*A*b+4*B*a)*cos(c+d*x)*sin(c+d*x)+1//4*C*b*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(x*(A*b+B*a+(1/2)*C*b)+d^-1*(B*b+C*a)*sin(c+d*x)+A*a*d^-1*arctanh(sin(c+d*x))+(1/2)*C*b*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(sec(c+d*x)^2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*(B*b+C*a)+d^-1*(A*b+B*a)*arctanh(sin(c+d*x))+A*a*d^-1*tan(c+d*x)+C*b*d^-1*sin(c+d*x))
@test integrate(sec(c+d*x)^3*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*b*x+d^-1*(A*b+B*a)*tan(c+d*x)+(1/2)*d^-1*(a*(A+2C)+2*B*b)*arctanh(sin(c+d*x))+(1/2)*A*a*d^-1*sec(c+d*x)*tan(c+d*x))
@test integrate(sec(c+d*x)^4*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*d^-1*(A*b+B*a+2*C*b)*arctanh(sin(c+d*x))+1//3*d^-1*(2*A*a+3*B*b+3*C*a)*tan(c+d*x)+(1/2)*d^-1*(A*b+B*a)*sec(c+d*x)*tan(c+d*x)+1//3*A*a*d^-1*sec(c+d*x)^2*tan(c+d*x))
@test integrate(sec(c+d*x)^5*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*A*b+2*B*a+3*C*b)*tan(c+d*x)+1//8*d^-1*(3*A*a+4*B*b+4*C*a)*arctanh(sin(c+d*x))+1//3*d^-1*sec(c+d*x)^2*(A*b+B*a)*tan(c+d*x)+1//8*d^-1*(3*A*a+4*B*b+4*C*a)*sec(c+d*x)*tan(c+d*x)+1//4*A*a*d^-1*sec(c+d*x)^3*tan(c+d*x))
@test integrate(sec(c+d*x)^6*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(4*A*a+5*B*b+5*C*a)*tan(c+d*x)+1//8*d^-1*(3*A*b+3*B*a+4*C*b)*arctanh(sin(c+d*x))+1//15*d^-1*tan(c+d*x)^3*(4*A*a+5*B*b+5*C*a)+1//4*d^-1*sec(c+d*x)^3*(A*b+B*a)*tan(c+d*x)+1//8*d^-1*(3*A*b+3*B*a+4*C*b)*sec(c+d*x)*tan(c+d*x)+1//5*A*a*d^-1*sec(c+d*x)^4*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*((1/2)*B*a^2+3//8*B*b^2+A*a*b+3//4*C*a*b)+1//15*d^-1*(2*b^2*(4C+5A)+5*a^2*(2C+3A)+20*B*a*b)*sin(c+d*x)+1//8*d^-1*(3*B*b^2+4*B*a^2+6*C*a*b+8*A*a*b)*cos(c+d*x)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^2*(2*C*a^2+4*C*b^2+5*A*b^2+10*B*a*b)*sin(c+d*x)+1//5*C*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^2*sin(c+d*x)+1//20*b*d^-1*cos(c+d*x)^3*(2*C*a+5*B*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*((1/2)*a^2*(C+2A)+1//8*b^2*(3C+4A)+B*a*b)+1//6*b^-1*d^-1*(-1*C*a^3+4*B*b^3+4*B*b*a^2+4*a*b^2*(2C+3A))*sin(c+d*x)+1//24*d^-1*(-2*C*a^2+9*C*b^2+12*A*b^2+8*B*a*b)*cos(c+d*x)*sin(c+d*x)+1//4*C*b^-1*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//12*b^-1*d^-1*(a+b*cos(c+d*x))^2*(-1*C*a+4*B*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(x*(B*a^2+(1/2)*B*b^2+a*b*(C+2A))+1//3*d^-1*(2*C*a^2+2*C*b^2+3*A*b^2+6*B*a*b)*sin(c+d*x)+A*a^2*d^-1*arctanh(sin(c+d*x))+1//3*C*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x)+1//6*b*d^-1*(2*C*a+3*B*b)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*(A*b^2+C*a^2+(1/2)*C*b^2+2*B*a*b)+A*d^-1*(a+b*cos(c+d*x))^2*tan(c+d*x)+a*d^-1*(B*a+2*A*b)*arctanh(sin(c+d*x))+-1*b*d^-1*(-1*B*b+-2*C*a+2*A*a)*sin(c+d*x)+-1//2*b^2*d^-1*(-1C+2A)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(b*x*(B*b+2*C*a)+(1/2)*d^-1*(a^2*(A+2C)+2*A*b^2+4*B*a*b)*arctanh(sin(c+d*x))+a*d^-1*(A*b+B*a)*tan(c+d*x)+-1//2*b^2*d^-1*(A+-2C)*sin(c+d*x)+(1/2)*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*b^2+(1/2)*d^-1*(B*a^2+2*B*b^2+2*a*b*(A+2C))*arctanh(sin(c+d*x))+1//3*d^-1*(a^2*(2A+3C)+2*A*b^2+6*B*a*b)*tan(c+d*x)+1//3*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^2*tan(c+d*x)+1//6*a*d^-1*(2*A*b+3*B*a)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*a^2+3*B*b^2+4*A*a*b+6*C*a*b)*tan(c+d*x)+1//8*d^-1*(a^2*(3A+4C)+4*b^2*(A+2C)+8*B*a*b)*arctanh(sin(c+d*x))+1//8*d^-1*(a^2*(3A+4C)+2*A*b^2+8*B*a*b)*sec(c+d*x)*tan(c+d*x)+1//4*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3*tan(c+d*x)+1//6*a*d^-1*sec(c+d*x)^2*(A*b+2*B*a)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^6*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*d^-1*(3*B*a^2+4*B*b^2+6*A*a*b+8*C*a*b)*arctanh(sin(c+d*x))+1//15*d^-1*(2*a^2*(4A+5C)+5*b^2*(2A+3C)+20*B*a*b)*tan(c+d*x)+1//8*d^-1*(3*B*a^2+4*B*b^2+6*A*a*b+8*C*a*b)*sec(c+d*x)*tan(c+d*x)+1//15*d^-1*sec(c+d*x)^2*(a^2*(4A+5C)+2*A*b^2+10*B*a*b)*tan(c+d*x)+1//5*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^4*tan(c+d*x)+1//20*a*d^-1*sec(c+d*x)^3*(2*A*b+5*B*a)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*((1/2)*B*a^3+1//16*b^3*(5C+6A)+3//8*b*a^2*(3C+4A)+9//8*B*a*b^2)+1//15*d^-1*(5*a^3*(2C+3A)+8*B*b^3+6*a*b^2*(4C+5A)+30*B*b*a^2)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^2*(C*a^3+4*B*b^3+3*a*b^2*(4C+5A)+12*B*b*a^2)*sin(c+d*x)+1//16*d^-1*(b^3*(5C+6A)+8*B*a^3+6*b*a^2*(3C+4A)+18*B*a*b^2)*cos(c+d*x)*sin(c+d*x)+1//6*C*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^2*sin(c+d*x)+1//10*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^2*(C*a+2*B*b)*sin(c+d*x)+1//120*b*d^-1*cos(c+d*x)^3*(6*C*a^2+25*C*b^2+30*A*b^2+42*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*((1/2)*a^3*(C+2A)+3//8*B*b^3+3//2*B*b*a^2+3//8*a*b^2*(3C+4A))+1//30*b^-1*d^-1*(-3*C*a^4+4*b^4*(4C+5A)+4*a^2*b^2*(13C+20A)+15*B*b*a^3+60*B*a*b^3)*sin(c+d*x)+1//120*d^-1*(-6*C*a^3+45*B*b^3+a*b^2*(71C+100A)+30*B*b*a^2)*cos(c+d*x)*sin(c+d*x)+1//5*C*b^-1*d^-1*(a+b*cos(c+d*x))^4*sin(c+d*x)+1//20*b^-1*d^-1*(a+b*cos(c+d*x))^3*(-1*C*a+5*B*b)*sin(c+d*x)+1//60*b^-1*d^-1*(a+b*cos(c+d*x))^2*(3*a*(-1*C*a+5*B*b)+4*b^2*(4C+5A))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(x*(B*a^3+1//8*b^3*(3C+4A)+3//2*B*a*b^2+3//2*b*a^2*(C+2A))+1//6*d^-1*(3*C*a^3+4*B*b^3+6*a*b^2*(2C+3A)+16*B*b*a^2)*sin(c+d*x)+A*a^3*d^-1*arctanh(sin(c+d*x))+1//4*C*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//12*d^-1*(a+b*cos(c+d*x))^2*(3*C*a+4*B*b)*sin(c+d*x)+1//24*b*d^-1*(6*C*a^2+9*C*b^2+12*A*b^2+20*B*a*b)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*(C*a^3+(1/2)*B*b^3+3*B*b*a^2+3//2*a*b^2*(C+2A))+A*d^-1*(a+b*cos(c+d*x))^3*tan(c+d*x)+a^2*d^-1*(B*a+3*A*b)*arctanh(sin(c+d*x))+1//3*b*d^-1*(b^2*(2C+3A)+-1*a^2*(-8C+6A)+9*B*a*b)*sin(c+d*x)+-1//3*b*d^-1*(a+b*cos(c+d*x))^2*(-1C+3A)*sin(c+d*x)+-1//6*b^2*d^-1*(-5*C*a+-3*B*b+6*A*a)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*b*x*(C*b^2+2*A*b^2+6*C*a^2+6*B*a*b)+(1/2)*a*d^-1*(a^2*(A+2C)+6*A*b^2+6*B*a*b)*arctanh(sin(c+d*x))+(1/2)*d^-1*(a+b*cos(c+d*x))^2*(2*B*a+3*A*b)*tan(c+d*x)+-1//2*b*d^-1*(-2*B*b^2+4*B*a^2+-6*C*a*b+9*A*a*b)*sin(c+d*x)+(1/2)*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)*tan(c+d*x)+-1//2*b^2*d^-1*(-1*C*b+2*B*a+4*A*b)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*b^2*(B*b+3*C*a)+(1/2)*d^-1*(B*a^3+2*A*b^3+3*b*a^2*(A+2C)+6*B*a*b^2)*arctanh(sin(c+d*x))+-1//6*b^2*d^-1*(-6*C*b+3*B*a+5*A*b)*sin(c+d*x)+1//3*a*d^-1*(a^2*(2A+3C)+3*A*b^2+6*B*a*b)*tan(c+d*x)+(1/2)*d^-1*(a+b*cos(c+d*x))^2*(A*b+B*a)*sec(c+d*x)*tan(c+d*x)+1//3*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^2*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*b^3+1//6*d^-1*(3*A*b^3+4*B*a^3+6*b*a^2*(2A+3C)+16*B*a*b^2)*tan(c+d*x)+1//8*d^-1*(a^3*(3A+4C)+8*B*b^3+12*B*b*a^2+12*a*b^2*(A+2C))*arctanh(sin(c+d*x))+1//4*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^3*tan(c+d*x)+1//12*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^2*(3*A*b+4*B*a)*tan(c+d*x)+1//24*a*d^-1*(3*a^2*(3A+4C)+6*A*b^2+20*B*a*b)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^6*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//8*d^-1*(3*B*a^3+4*b^3*(A+2C)+3*b*a^2*(3A+4C)+12*B*a*b^2)*arctanh(sin(c+d*x))+1//15*d^-1*(2*a^3*(4A+5C)+15*B*b^3+15*a*b^2*(2A+3C)+30*B*b*a^2)*tan(c+d*x)+1//40*d^-1*(6*A*b^3+15*B*a^3+15*b*a^2*(3A+4C)+50*B*a*b^2)*sec(c+d*x)*tan(c+d*x)+1//5*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^4*tan(c+d*x)+1//20*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3*(3*A*b+5*B*a)*tan(c+d*x)+1//30*a*d^-1*sec(c+d*x)^2*(2*a^2*(4A+5C)+3*A*b^2+15*B*a*b)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^7*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(5*b^3*(2A+3C)+8*B*a^3+6*b*a^2*(4A+5C)+30*B*a*b^2)*tan(c+d*x)+1//16*d^-1*(a^3*(5A+6C)+8*B*b^3+6*a*b^2*(3A+4C)+18*B*b*a^2)*arctanh(sin(c+d*x))+1//15*d^-1*sec(c+d*x)^2*(A*b^3+4*B*a^3+3*b*a^2*(4A+5C)+12*B*a*b^2)*tan(c+d*x)+1//16*d^-1*(a^3*(5A+6C)+8*B*b^3+6*a*b^2*(3A+4C)+18*B*b*a^2)*sec(c+d*x)*tan(c+d*x)+1//6*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^5*tan(c+d*x)+1//10*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^4*(A*b+2*B*a)*tan(c+d*x)+1//120*a*d^-1*sec(c+d*x)^3*(5*a^2*(5A+6C)+6*A*b^2+42*B*a*b)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*((1/2)*B*a^4+5//16*B*b^4+(1/2)*b*a^3*(3C+4A)+1//4*a*b^3*(5C+6A)+9//4*B*a^2*b^2)+1//105*d^-1*(8*b^4*(6C+7A)+35*a^4*(2C+3A)+84*a^2*b^2*(4C+5A)+224*B*a*b^3+280*B*b*a^3)*sin(c+d*x)+1//16*d^-1*(5*B*b^4+8*B*a^4+4*a*b^3*(5C+6A)+8*b*a^3*(3C+4A)+36*B*a^2*b^2)*cos(c+d*x)*sin(c+d*x)+1//105*d^-1*cos(c+d*x)^2*(4*C*a^4+4*b^4*(6C+7A)+3*a^2*b^2*(50C+63A)+91*B*b*a^3+112*B*a*b^3)*sin(c+d*x)+1//7*C*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^2*sin(c+d*x)+1//42*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^2*(4*C*a+7*B*b)*sin(c+d*x)+1//70*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^2*(4*C*a^2+12*C*b^2+14*A*b^2+21*B*a*b)*sin(c+d*x)+1//840*b*d^-1*cos(c+d*x)^3*(24*C*a^3+175*B*b^3+4*a*b^2*(103C+126A)+336*B*b*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*((1/2)*a^4*(C+2A)+1//16*b^4*(5C+6A)+2*B*b*a^3+3//2*B*a*b^3+3//4*a^2*b^2*(3C+4A))+1//60*b^-1*d^-1*(-4*C*a^5+32*B*b^5+a^3*b^2*(121C+190A)+24*B*b*a^4+32*a*b^4*(4C+5A)+224*B*a^2*b^3)*sin(c+d*x)+1//240*d^-1*(-8*C*a^4+15*b^4*(5C+6A)+2*a^2*b^2*(89C+130A)+48*B*b*a^3+232*B*a*b^3)*cos(c+d*x)*sin(c+d*x)+1//6*C*b^-1*d^-1*(a+b*cos(c+d*x))^5*sin(c+d*x)+1//30*b^-1*d^-1*(a+b*cos(c+d*x))^4*(-1*C*a+6*B*b)*sin(c+d*x)+1//120*b^-1*d^-1*(a+b*cos(c+d*x))^2*(-4*C*a^3+32*B*b^3+a*b^2*(53C+70A)+24*B*b*a^2)*sin(c+d*x)+1//120*b^-1*d^-1*(a+b*cos(c+d*x))^3*(4*a*(-1*C*a+6*B*b)+5*b^2*(5C+6A))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(x*(B*a^4+3//8*B*b^4+(1/2)*a*b^3*(3C+4A)+2*b*a^3*(C+2A)+3*B*a^2*b^2)+1//30*d^-1*(4*b^4*(4C+5A)+12*C*a^4+2*a^2*b^2*(56C+85A)+80*B*a*b^3+95*B*b*a^3)*sin(c+d*x)+A*a^4*d^-1*arctanh(sin(c+d*x))+1//5*C*d^-1*(a+b*cos(c+d*x))^4*sin(c+d*x)+1//20*d^-1*(a+b*cos(c+d*x))^3*(4*C*a+5*B*b)*sin(c+d*x)+1//60*d^-1*(a+b*cos(c+d*x))^2*(12*C*a^2+16*C*b^2+20*A*b^2+35*B*a*b)*sin(c+d*x)+1//120*b*d^-1*(24*C*a^3+45*B*b^3+4*a*b^2*(29C+40A)+130*B*b*a^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*(C*a^4+1//8*b^4*(3C+4A)+2*B*a*b^3+3*a^2*b^2*(C+2A)+4*B*b*a^3)+A*d^-1*(a+b*cos(c+d*x))^4*tan(c+d*x)+a^3*d^-1*(B*a+4*A*b)*arctanh(sin(c+d*x))+1//6*b*d^-1*(-1*a^3*(-19C+12A)+4*B*b^3+8*a*b^2*(2C+3A)+34*B*b*a^2)*sin(c+d*x)+-1//4*b*d^-1*(a+b*cos(c+d*x))^3*(-1C+4A)*sin(c+d*x)+-1//12*b*d^-1*(a+b*cos(c+d*x))^2*(-7*C*a+-4*B*b+12*A*a)*sin(c+d*x)+1//24*b^2*d^-1*(-1*a^2*(-26C+24A)+3*b^2*(3C+4A)+32*B*a*b)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*b*x*(B*b^3+8*C*a^3+4*a*b^2*(C+2A)+12*B*b*a^2)+d^-1*(a+b*cos(c+d*x))^3*(B*a+2*A*b)*tan(c+d*x)+(1/2)*a^2*d^-1*(a^2*(A+2C)+12*A*b^2+8*B*a*b)*arctanh(sin(c+d*x))+-1//6*b*d^-1*(-2*b^3*(2C+3A)+12*B*a^3+b*a^2*(-34C+39A)+-24*B*a*b^2)*sin(c+d*x)+(1/2)*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)*tan(c+d*x)+-1//6*b*d^-1*(a+b*cos(c+d*x))^2*(-2*C*b+6*B*a+15*A*b)*sin(c+d*x)+-1//6*b^2*d^-1*(-3*B*b^2+6*B*a^2+2*a*b*(-4C+9A))*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*b^2*(C*b^2+2*A*b^2+12*C*a^2+8*B*a*b)+(1/2)*a*d^-1*(B*a^3+8*A*b^3+4*b*a^2*(A+2C)+12*B*a*b^2)*arctanh(sin(c+d*x))+-1//6*b*d^-1*(-6*B*b^3+4*a^3*(2A+3C)+4*a*b^2*(-6C+11A)+39*B*b*a^2)*sin(c+d*x)+1//6*d^-1*(a+b*cos(c+d*x))^2*(a^2*(4A+6C)+12*A*b^2+15*B*a*b)*tan(c+d*x)+-1//6*b^2*d^-1*(a^2*(4A+6C)+3*b^2*(-1C+6A)+18*B*a*b)*cos(c+d*x)*sin(c+d*x)+1//3*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^2*tan(c+d*x)+1//6*d^-1*(a+b*cos(c+d*x))^3*(3*B*a+4*A*b)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*b^3*(B*b+4*C*a)+1//8*d^-1*(a^4*(3A+4C)+8*A*b^4+16*B*b*a^3+24*a^2*b^2*(A+2C)+32*B*a*b^3)*arctanh(sin(c+d*x))+-1//24*b^2*d^-1*(2*b^2*(-12C+13A)+3*a^2*(3A+4C)+32*B*a*b)*sin(c+d*x)+1//12*a*d^-1*(8*B*a^3+12*A*b^3+b*a^2*(23A+36C)+36*B*a*b^2)*tan(c+d*x)+1//3*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^2*(A*b+B*a)*tan(c+d*x)+1//4*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^3*tan(c+d*x)+1//8*d^-1*(a+b*cos(c+d*x))^2*(a^2*(3A+4C)+4*A*b^2+8*B*a*b)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^6*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*b^4+1//8*d^-1*(3*B*a^4+8*B*b^4+4*b*a^3*(3A+4C)+16*a*b^3*(A+2C)+24*B*a^2*b^2)*arctanh(sin(c+d*x))+1//30*d^-1*(4*a^4*(4A+5C)+12*A*b^4+2*a^2*b^2*(56A+85C)+80*B*b*a^3+95*B*a*b^3)*tan(c+d*x)+1//5*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^4*tan(c+d*x)+1//20*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^3*(4*A*b+5*B*a)*tan(c+d*x)+1//60*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^2*(4*a^2*(4A+5C)+12*A*b^2+35*B*a*b)*tan(c+d*x)+1//120*a*d^-1*(24*A*b^3+45*B*a^3+4*b*a^2*(29A+40C)+130*B*a*b^2)*sec(c+d*x)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^7*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(8*B*a^4+15*B*b^4+8*b*a^3*(4A+5C)+20*a*b^3*(2A+3C)+60*B*a^2*b^2)*tan(c+d*x)+1//16*d^-1*(a^4*(5A+6C)+8*b^4*(A+2C)+12*a^2*b^2*(3A+4C)+24*B*b*a^3+32*B*a*b^3)*arctanh(sin(c+d*x))+1//240*d^-1*(15*a^4*(5A+6C)+24*A*b^4+10*a^2*b^2*(49A+66C)+336*B*a*b^3+360*B*b*a^3)*sec(c+d*x)*tan(c+d*x)+1//6*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^5*tan(c+d*x)+1//15*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^4*(2*A*b+3*B*a)*tan(c+d*x)+1//60*a*d^-1*sec(c+d*x)^2*(4*A*b^3+16*B*a^3+b*a^2*(39A+50C)+36*B*a*b^2)*tan(c+d*x)+1//120*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3*(5*a^2*(5A+6C)+12*A*b^2+48*B*a*b)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^8*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//16*d^-1*(5*B*a^4+8*B*b^4+4*b*a^3*(5A+6C)+8*a*b^3*(3A+4C)+36*B*a^2*b^2)*arctanh(sin(c+d*x))+1//105*d^-1*(8*a^4*(6A+7C)+35*b^4*(2A+3C)+84*a^2*b^2*(4A+5C)+224*B*b*a^3+280*B*a*b^3)*tan(c+d*x)+1//16*d^-1*(5*B*a^4+8*B*b^4+4*b*a^3*(5A+6C)+8*a*b^3*(3A+4C)+36*B*a^2*b^2)*sec(c+d*x)*tan(c+d*x)+1//105*d^-1*sec(c+d*x)^2*(4*A*b^4+4*a^4*(6A+7C)+3*a^2*b^2*(50A+63C)+91*B*a*b^3+112*B*b*a^3)*tan(c+d*x)+1//7*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^6*tan(c+d*x)+1//42*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^5*(4*A*b+7*B*a)*tan(c+d*x)+1//70*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^4*(2*a^2*(6A+7C)+4*A*b^2+21*B*a*b)*tan(c+d*x)+1//840*a*d^-1*sec(c+d*x)^3*(a^2*(412*A*b+504*C*b)+24*A*b^3+175*B*a^3+336*B*a*b^2)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(x*(-1*C*a^5+3//8*B*b^5+B*b*a^4+-1*C*a^3*b^2+3*B*a^2*b^3+9//8*C*a*b^4)+1//30*b*d^-1*(-83*C*a^4+16*C*b^4+32*C*a^2*b^2+80*B*a*b^3+95*B*b*a^3)*sin(c+d*x)+1//5*C*b*d^-1*(a+b*cos(c+d*x))^4*sin(c+d*x)+1//20*b*d^-1*(a+b*cos(c+d*x))^3*(-1*C*a+5*B*b)*sin(c+d*x)+1//60*b*d^-1*(a+b*cos(c+d*x))^2*(-23*C*a^2+16*C*b^2+35*B*a*b)*sin(c+d*x)+1//120*b^2*d^-1*(-106*C*a^3+45*B*b^3+71*C*a*b^2+130*B*b*a^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(x*(-1*C*a^4+3//8*C*b^4+B*b*a^3+3//2*B*a*b^3)+1//6*b*d^-1*(-13*C*a^3+4*B*b^3+8*C*a*b^2+16*B*b*a^2)*sin(c+d*x)+1//4*C*b*d^-1*(a+b*cos(c+d*x))^3*sin(c+d*x)+1//12*b*d^-1*(a+b*cos(c+d*x))^2*(-1*C*a+4*B*b)*sin(c+d*x)+1//24*b^2*d^-1*(-14*C*a^2+9*C*b^2+20*B*a*b)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(x*((1/2)*B*b^3+-1*C*a^3+B*b*a^2+(1/2)*C*a*b^2)+2//3*b*d^-1*(C*b^2+-2*C*a^2+3*B*a*b)*sin(c+d*x)+1//3*C*b*d^-1*(a+b*cos(c+d*x))^2*sin(c+d*x)+1//6*b^2*d^-1*(-1*C*a+3*B*b)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//8*x*b^-5*(-1*b^4*(3C+4A)+-8*C*a^4+-4*a^2*b^2*(C+2A)+4*B*a*b^3+8*B*b*a^3)+1//3*b^-4*d^-1*(-3*C*a^3+2*B*b^3+-1*a*b^2*(2C+3A)+3*B*b*a^2)*sin(c+d*x)+1//3*b^-2*d^-1*cos(c+d*x)^2*(B*b+-1*C*a)*sin(c+d*x)+1//4*C*b^-1*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//8*b^-3*d^-1*(3*C*b^2+4*A*b^2+4*C*a^2+-4*B*a*b)*cos(c+d*x)*sin(c+d*x)+-2*a^3*b^-5*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+-1*a*(B*b+-1*C*a))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*b^-4*(B*b^3+-2*C*a^3+-1*a*b^2*(C+2A)+2*B*b*a^2)+1//3*b^-3*d^-1*(2*C*b^2+3*A*b^2+3*C*a^2+-3*B*a*b)*sin(c+d*x)+(1/2)*b^-2*d^-1*(B*b+-1*C*a)*cos(c+d*x)*sin(c+d*x)+1//3*C*b^-1*d^-1*cos(c+d*x)^2*sin(c+d*x)+2*a^2*b^-4*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+-1*a*(B*b+-1*C*a))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :((1/2)*x*b^-3*(b^2*(C+2A)+-2*a*(B*b+-1*C*a))+b^-2*d^-1*(B*b+-1*C*a)*sin(c+d*x)+(1/2)*C*b^-1*d^-1*cos(c+d*x)*sin(c+d*x)+-2*a*b^-3*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+-1*a*(B*b+-1*C*a))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*b^-2*(B*b+-1*C*a)+C*b^-1*d^-1*sin(c+d*x)+b^-2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(C*x*b^-1+A*a^-1*d^-1*arctanh(sin(c+d*x))+-1*a^-1*b^-1*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(A*a^-1*d^-1*tan(c+d*x)+-1*a^-2*d^-1*(A*b+-1*B*a)*arctanh(sin(c+d*x))+a^-2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*(a^2*(A+2C)+2*A*b^2+-2*B*a*b)*arctanh(sin(c+d*x))+-1*a^-2*d^-1*(A*b+-1*B*a)*tan(c+d*x)+(1/2)*A*a^-1*d^-1*sec(c+d*x)*tan(c+d*x)+-2*b*a^-3*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+-1*a*(B*b+-1*C*a))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*a^-4*d^-1*(-1*B*a^3+2*A*b^3+b*a^2*(A+2C)+-2*B*a*b^2)*arctanh(sin(c+d*x))+1//3*a^-3*d^-1*(a^2*(2A+3C)+3*A*b^2+-3*B*a*b)*tan(c+d*x)+-1//2*a^-2*d^-1*(A*b+-1*B*a)*sec(c+d*x)*tan(c+d*x)+1//3*A*a^-1*d^-1*sec(c+d*x)^2*tan(c+d*x)+2*a^-4*b^2*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+-1*a*(B*b+-1*C*a))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*sec(c+d*x)^5*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*a^-4*d^-1*(-2*B*a^3+3*A*b^3+b*a^2*(2A+3C)+-3*B*a*b^2)*tan(c+d*x)+1//8*a^-5*d^-1*(a^4*(3A+4C)+8*A*b^4+-8*B*a*b^3+-4*B*b*a^3+4*a^2*b^2*(A+2C))*arctanh(sin(c+d*x))+-1//3*a^-2*d^-1*sec(c+d*x)^2*(A*b+-1*B*a)*tan(c+d*x)+1//4*A*a^-1*d^-1*sec(c+d*x)^3*tan(c+d*x)+1//8*a^-3*d^-1*(a^2*(3A+4C)+4*A*b^2+-4*B*a*b)*sec(c+d*x)*tan(c+d*x)+-2*a^-5*b^3*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(A*b^2+-1*a*(B*b+-1*C*a))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*b^-5*(B*b^3+-8*C*a^3+-2*a*b^2*(C+2A)+6*B*b*a^2)+-1//3*b^-4*d^-1*(a^2+-1*b^2)^-1*(b^4*(2C+3A)+-12*C*a^4+-1*a^2*b^2*(-7C+6A)+-6*B*a*b^3+9*B*b*a^3)*sin(c+d*x)+(1/2)*b^-3*d^-1*(a^2+-1*b^2)^-1*(-1*B*b^3+-4*C*a^3+-2*a*b^2*(A+-1C)+3*B*b*a^2)*cos(c+d*x)*sin(c+d*x)+1//3*b^-2*d^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(-1*C*b^2+3*A*b^2+4*C*a^2+-3*B*a*b)*sin(c+d*x)+-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x)+2*a^2*b^-5*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-3*A*b^4+4*C*a^4+-5*C*a^2*b^2+-3*B*b*a^3+2*A*a^2*b^2+4*B*a*b^3)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*b^-4*(C*b^2+2*A*b^2+6*C*a^2+-4*B*a*b)+b^-3*d^-1*(a^2+-1*b^2)^-1*(-1*B*b^3+-3*C*a^3+-1*a*b^2*(A+-2C)+2*B*b*a^2)*sin(c+d*x)+(1/2)*b^-2*d^-1*(a^2+-1*b^2)^-1*(-1*C*b^2+2*A*b^2+3*C*a^2+-2*B*a*b)*cos(c+d*x)*sin(c+d*x)+-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x)+-2*a*b^-4*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*A*b^4+3*C*a^4+A*a^2*b^2+-4*C*a^2*b^2+-2*B*b*a^3+3*B*a*b^3)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(x*b^-3*(B*b+-2*C*a)+C*b^-2*d^-1*sin(c+d*x)+-1*b^-3*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-4*C*a^4+2*A*b^4+-4*B*a*b^3+2*B*b*a^3+6*C*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+a*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*b^-2+b^-2*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*B*b^3+-2*C*a^3+2*A*a*b^2+4*C*a*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-2*d^-1*arctanh(sin(c+d*x))+a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x)+-1*a^-2*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*A*b^3+-2*B*a^3+2*C*b*a^2+4*A*b*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-3*d^-1*(-1*B*a+2*A*b)*arctanh(sin(c+d*x))+-1*a^-2*d^-1*(a^2+-1*b^2)^-1*(-1*a^2*(A+-1C)+2*A*b^2+-1*B*a*b)*tan(c+d*x)+a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*tan(c+d*x)+a^-3*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-4*A*b^4+2*C*a^4+-4*B*b*a^3+2*B*a*b^3+6*A*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-4*d^-1*(a^2*(A+2C)+6*A*b^2+-4*B*a*b)*arctanh(sin(c+d*x))+a^-3*d^-1*(a^2+-1*b^2)^-1*(B*a^3+3*A*b^3+-1*b*a^2*(-1C+2A)+-2*B*a*b^2)*tan(c+d*x)+-1//2*a^-2*d^-1*(a^2+-1*b^2)^-1*(-1*a^2*(A+-2C)+3*A*b^2+-2*B*a*b)*sec(c+d*x)*tan(c+d*x)+a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sec(c+d*x)*tan(c+d*x)+-2*b*a^-4*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-3*A*b^4+2*C*a^4+-1*C*a^2*b^2+-3*B*b*a^3+2*B*a*b^3+4*A*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-2*sec(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*a^-5*d^-1*(-1*B*a^3+8*A*b^3+-6*B*a*b^2+2*b*a^2*(A+2C))*arctanh(sin(c+d*x))+-1//3*a^-4*d^-1*(a^2+-1*b^2)^-1*(-1*a^4*(2A+3C)+12*A*b^4+-1*a^2*b^2*(-6C+7A)+-9*B*a*b^3+6*B*b*a^3)*tan(c+d*x)+(1/2)*a^-3*d^-1*(a^2+-1*b^2)^-1*(B*a^3+4*A*b^3+-3*B*a*b^2+-2*b*a^2*(A+-1C))*sec(c+d*x)*tan(c+d*x)+-1//3*a^-2*d^-1*(a^2+-1*b^2)^-1*sec(c+d*x)^2*(-1*a^2*(A+-3C)+4*A*b^2+-3*B*a*b)*tan(c+d*x)+a^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*sec(c+d*x)^2*(A*b^2+-1*a*(B*b+-1*C*a))*tan(c+d*x)+2*a^-5*b^2*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-4*A*b^4+3*C*a^4+-4*B*b*a^3+-2*C*a^2*b^2+3*B*a*b^3+5*A*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*b^-5*(C*b^2+2*A*b^2+12*C*a^2+-6*B*a*b)+(1/2)*b^-4*d^-1*(a^2+-1*b^2)^-2*(-12*C*a^5+2*B*b^5+a*b^4*(-6C+5A)+-1*a^3*b^2*(-21C+2A)+-11*B*a^2*b^3+6*B*b*a^4)*sin(c+d*x)+-1//2*b^-3*d^-1*(a^2+-1*b^2)^-2*(b^4*(-1C+4A)+-6*C*a^4+-1*a^2*b^2*(A+-10C)+-6*B*a*b^3+3*B*b*a^3)*cos(c+d*x)*sin(c+d*x)+(1/2)*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*cos(c+d*x)^2*(a*(-5*B*b^3+-4*C*a^3+2*B*b*a^2+7*C*a*b^2)+3*A*b^4)*sin(c+d*x)+-1*a*b^-5*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(6*A*b^6+12*C*a^6+a^4*b^2*(-29C+2A)+-12*B*a*b^5+-6*B*b*a^5+-5*a^2*b^4*(A+-4C)+15*B*a^3*b^3)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*b^-4*(B*b+-3*C*a)+(1/2)*b^-3*d^-1*(a^2+-1*b^2)^-1*(A*b^2+-2*C*b^2+3*C*a^2+-1*B*a*b)*sin(c+d*x)+b^-4*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(2*A*b^6+6*C*a^6+a^2*b^4*(A+12C)+-15*C*a^4*b^2+-6*B*a*b^5+-2*B*b*a^5+5*B*a^3*b^3)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a*b^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-3*C*a^4+2*A*b^4+B*b*a^3+a^2*b^2*(A+6C)+-4*B*a*b^3)*sin(c+d*x)+-1//2*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(C*x*b^-3+b^-3*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-2*C*a^5+2*B*b^5+B*a^2*b^3+-3*a*b^4*(A+2C)+5*C*a^3*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-3*C*a^4+2*A*b^4+B*b*a^3+a^2*b^2*(A+6C)+-4*B*a*b^3)*sin(c+d*x)+(1/2)*a*b^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-1*a^2*(C+2A)+-1*b^2*(A+2C)+3*B*a*b)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(C*a^3+2*B*b^3+B*b*a^2+-1*a*b^2*(3A+4C))*sin(c+d*x)+-1//2*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-3*d^-1*arctanh(sin(c+d*x))+a^-3*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-2*A*b^5+2*B*a^5+B*a^3*b^2+-3*b*a^4*(C+2A)+5*A*a^2*b^3)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*a^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x)+-1//2*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-1*C*a^4+2*A*b^4+-1*a^2*b^2*(2C+5A)+3*B*b*a^3)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-4*d^-1*(-1*B*a+3*A*b)*arctanh(sin(c+d*x))+-1//2*a^-3*d^-1*(a^2+-1*b^2)^-2*(-1*a^4*(-3C+2A)+-6*A*b^4+-5*B*b*a^3+2*B*a*b^3+11*A*a^2*b^2)*tan(c+d*x)+(1/2)*a^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*tan(c+d*x)+-1*a^-4*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(-6*A*b^6+-2*C*a^6+-1*a^4*b^2*(C+12A)+-5*B*a^3*b^3+2*B*a*b^5+6*B*b*a^5+15*A*a^2*b^4)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-2*C*a^4+3*A*b^4+-1*B*a*b^3+-1*a^2*b^2*(C+6A)+4*B*b*a^3)*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-5*d^-1*(a^2*(A+2C)+12*A*b^2+-6*B*a*b)*arctanh(sin(c+d*x))+-1//2*a^-4*d^-1*(a^2+-1*b^2)^-2*(-2*B*a^5+12*A*b^5+b*a^4*(-5C+6A)+-1*a^2*b^3*(-2C+21A)+-6*B*a*b^4+11*B*a^3*b^2)*tan(c+d*x)+(1/2)*a^-3*d^-1*(a^2+-1*b^2)^-2*(a^4*(A+-4C)+6*A*b^4+-1*a^2*b^2*(-1C+10A)+-3*B*a*b^3+6*B*b*a^3)*sec(c+d*x)*tan(c+d*x)+(1/2)*a^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sec(c+d*x)*tan(c+d*x)+(1/2)*a^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-4*A*b^4+3*C*a^4+-5*B*b*a^3+2*B*a*b^3+7*A*a^2*b^2)*sec(c+d*x)*tan(c+d*x)+-1*b*a^-5*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(6*C*a^6+12*A*b^6+-1*a^2*b^4*(-2C+29A)+-12*B*b*a^5+-6*B*a*b^5+5*a^4*b^2*(-1C+4A)+15*B*a^3*b^3)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-4*cos(c+d*x)^4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*x*b^-6*(C*b^2+2*A*b^2+20*C*a^2+-8*B*a*b)+1//6*b^-5*d^-1*(a^2+-1*b^2)^-3*(-60*C*a^7+-6*B*b^7+a^3*b^4*(-146C+17A)+-1*a^5*b^2*(-167C+6A)+-68*B*a^4*b^3+-2*a*b^6*(-12C+13A)+24*B*b*a^6+65*B*a^2*b^5)*sin(c+d*x)+-1//2*b^-4*d^-1*(a^2+-1*b^2)^-3*(-1*b^6*(-1C+6A)+-10*C*a^6+a^2*b^4*(-23C+2A)+-1*a^4*b^2*(A+-27C)+-11*B*a^3*b^3+4*B*b*a^5+12*B*a*b^5)*cos(c+d*x)*sin(c+d*x)+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*cos(c+d*x)^4*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x)+-1//6*b^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*cos(c+d*x)^2*(12*A*b^6+20*C*a^6+a^2*b^4*(A+48C)+a^4*b^2*(-53C+2A)+-27*B*a*b^5+-8*B*b*a^5+20*B*a^3*b^3)*sin(c+d*x)+1//6*b^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*cos(c+d*x)^3*(-5*C*a^4+4*A*b^4+a^2*b^2*(A+10C)+-7*B*a*b^3+2*B*b*a^3)*sin(c+d*x)+a*b^-6*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(a^2+-1*b^2)^-3*(-20*C*a^8+8*A*b^8+-1*a^6*b^2*(-69C+2A)+-28*B*a^5*b^3+-20*B*a*b^7+-8*a^2*b^6*(A+-5C)+7*a^4*b^4*(A+-12C)+8*B*b*a^7+35*B*a^3*b^5)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-4*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(x*b^-5*(B*b+-4*C*a)+-1//6*b^-4*d^-1*(a^2+-1*b^2)^-2*(-12*C*a^4+-6*C*b^4+5*A*b^4+-8*B*a*b^3+3*B*b*a^3+23*C*a^2*b^2)*sin(c+d*x)+-1*b^-5*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(-8*C*a^8+2*A*b^8+a^2*b^6*(3A+20C)+-35*C*a^4*b^4+-8*B*a*b^7+-7*B*a^5*b^3+2*B*b*a^7+8*B*a^3*b^5+28*C*a^6*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+(1/2)*a*b^-4*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(2*A*b^6+4*C*a^6+-1*B*b*a^5+-11*C*a^4*b^2+-6*B*a*b^5+2*B*a^3*b^3+3*a^2*b^4*(A+4C))*sin(c+d*x)+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x)+1//6*b^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*cos(c+d*x)^2*(-4*C*a^4+3*A*b^4+B*b*a^3+a^2*b^2*(2A+9C)+-6*B*a*b^3)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*x*b^-4+-1*b^-4*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(2*B*b^7+2*C*a^7+-1*a^3*b^4*(A+-8C)+-7*C*a^5*b^2+-4*a*b^6*(A+2C)+3*B*a^2*b^5)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//6*b^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(4*A*b^6+9*C*a^6+B*a^3*b^3+-1*a^4*b^2*(3A+28C)+-16*B*a*b^5+2*a^2*b^4*(7A+17C))*sin(c+d*x)+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x)+-1//6*a*b^-3*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-3*C*a^4+2*A*b^4+a^2*b^2*(3A+8C)+-5*B*a*b^3)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(B*a^3+-1*b^3*(A+2C)+-1*b*a^2*(3C+4A)+4*B*a*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+1//6*b^-2*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(-6*B*b^5+2*C*a^5+B*b*a^4+a*b^4*(13A+18C)+a^3*b^2*(-5C+2A)+-10*B*a^2*b^3)*sin(c+d*x)+1//6*b^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-4*C*a^4+3*A*b^4+B*b*a^3+a^2*b^2*(2A+9C)+-6*B*a*b^3)*sin(c+d*x)+1//3*a*b^-2*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(B*b^3+-1*a^3*(C+2A)+-1*a*b^2*(3A+4C)+4*B*b*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x)+1//6*b^-1*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(C*a^4+-2*b^4*(2A+3C)+-1*a^2*b^2*(10C+11A)+2*B*b*a^3+13*B*a*b^3)*sin(c+d*x)+1//6*b^-1*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(C*a^3+3*B*b^3+-1*a*b^2*(5A+6C)+2*B*b*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*sec(c+d*x), x) == :(A*a^-4*d^-1*arctanh(sin(c+d*x))+-1*a^-4*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(-2*A*b^7+-2*B*a^7+-1*a^4*b^3*(-1C+8A)+-3*B*a^5*b^2+4*b*a^6*(C+2A)+7*A*a^2*b^5)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//6*a^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(-6*A*b^6+-2*C*a^6+-13*a^4*b^2*(C+2A)+4*B*a^3*b^3+11*B*b*a^5+17*A*a^2*b^4)*sin(c+d*x)+-1//6*a^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-2*C*a^4+3*A*b^4+-1*a^2*b^2*(3C+8A)+5*B*b*a^3)*sin(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*sec(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-5*d^-1*(-1*B*a+4*A*b)*arctanh(sin(c+d*x))+1//6*a^-4*d^-1*(a^2+-1*b^2)^-3*(a^6*(-11C+6A)+-24*A*b^6+-1*a^4*b^2*(4C+65A)+-17*B*a^3*b^3+6*B*a*b^5+26*B*b*a^5+68*A*a^2*b^4)*tan(c+d*x)+-1*a^-5*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(-2*C*a^8+8*A*b^8+-1*a^6*b^2*(3C+20A)+-28*A*a^2*b^6+-8*B*a^5*b^3+-2*B*a*b^7+7*B*a^3*b^5+8*B*b*a^7+35*A*a^4*b^4)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(-4*A*b^6+-2*C*a^6+B*a*b^5+-3*a^4*b^2*(C+4A)+-2*B*a^3*b^3+6*B*b*a^5+11*A*a^2*b^4)*tan(c+d*x)+-1//6*a^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-3*C*a^4+4*A*b^4+-1*B*a*b^3+-1*a^2*b^2*(2C+9A)+6*B*b*a^3)*tan(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*tan(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*sec(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*a^-6*d^-1*(a^2*(A+2C)+20*A*b^2+-8*B*a*b)*arctanh(sin(c+d*x))+1//6*a^-5*d^-1*(a^2+-1*b^2)^-3*(-1*a^6*(-26*C*b+24*A*b)+6*B*a^7+60*A*b^7+a^4*b^3*(-17C+146A)+-1*a^2*b^5*(-6C+167A)+-65*B*a^5*b^2+-24*B*a*b^6+68*B*a^3*b^4)*tan(c+d*x)+-1//2*a^-4*d^-1*(a^2+-1*b^2)^-3*(-1*a^6*(A+-6C)+10*A*b^6+a^4*b^2*(-2C+23A)+-1*a^2*b^4*(-1C+27A)+-12*B*b*a^5+-4*B*a*b^5+11*B*a^3*b^3)*sec(c+d*x)*tan(c+d*x)+-1//6*a^-2*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-4*C*a^4+5*A*b^4+-1*a^2*b^2*(C+10A)+-2*B*a*b^3+7*B*b*a^3)*sec(c+d*x)*tan(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sec(c+d*x)*tan(c+d*x)+1//6*a^-3*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(12*C*a^6+20*A*b^6+a^4*b^2*(C+48A)+-1*a^2*b^4*(-2C+53A)+-27*B*b*a^5+-8*B*a*b^5+20*B*a^3*b^3)*sec(c+d*x)*tan(c+d*x)+b*a^-6*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(a^2+-1*b^2)^-3*(-8*C*a^8+20*A*b^8+-1*a^2*b^6*(-2C+69A)+-35*B*a^5*b^3+-8*B*a*b^7+-8*a^6*b^2*(-1C+5A)+7*a^4*b^4*(-1C+12A)+20*B*b*a^7+28*B*a^3*b^5)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-1*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(x*(B*b+-1*C*a)+C*b*d^-1*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-2*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(C*x+d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-4*C*a+2*B*b)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*cos(c+d*x))^-3*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(-2*C*a^2+-2*C*b^2+2*B*a*b)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1*b*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*(B*b+-2*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-4*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(d^-1*(a+b)^-5//2*(a+-1b)^-5//2*(B*b^3+-2*C*a^3+-4*C*a*b^2+2*B*b*a^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1*b*d^-1*(a+b*cos(c+d*x))^-2*(-2*b^2+2*a^2)^-1*(B*b+-2*C*a)*sin(c+d*x)+-1//2*b*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-4*C*a^2+-2*C*b^2+3*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(-1*C*b^4+-2*C*a^4+-7*C*a^2*b^2+2*B*b*a^3+3*B*a*b^3)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1*b*d^-1*(a+b*cos(c+d*x))^-3*(-3*b^2+3*a^2)^-1*(B*b+-2*C*a)*sin(c+d*x)+-1//6*b*d^-1*(a+b*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(-13*C*a^3+4*B*b^3+-17*C*a*b^2+11*B*b*a^2)*sin(c+d*x)+-1//6*b*d^-1*(a+b*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*(-7*C*a^2+-3*C*b^2+5*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//315*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(-32*C*a^3+150*B*b^3+-12*a*b^2*(6C+7A)+48*B*b*a^2)*sin(c+d*x)+1//315*b^-3*d^-1*(a+b*cos(c+d*x))^3//2*(48*C*a^2+98*C*b^2+126*A*b^2+-72*B*a*b)*sin(c+d*x)+1//21*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*(-4*C*a+6*B*b)*cos(c+d*x)*sin(c+d*x)+1//315*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-32*C*a^4+42*b^4*(7C+9A)+-12*a^2*b^2*(4C+7A)+48*B*b*a^3+114*B*a*b^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//9*C*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^2*sin(c+d*x)+-1//315*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-16*C*a^3+75*B*b^3+-6*a*b^2*(6C+7A)+24*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//35*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*(-8*C*a+14*B*b)*sin(c+d*x)+1//105*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(16*C*a^2+50*C*b^2+70*A*b^2+-28*B*a*b)*sin(c+d*x)+-1//105*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-126*B*b^3+-16*C*a^3+-2*a*b^2*(19C+35A)+28*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//7*C*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)*sin(c+d*x)+-1//105*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(8*C*a^2+25*C*b^2+35*A*b^2+-14*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*(-4*C*a+10*B*b)*sin(c+d*x)+2//5*C*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*sin(c+d*x)+1//15*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(2*a*(-2*C*a+5*B*b)+6*b^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//15*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-2*C*a+5*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//693*b^-3*d^-1*(a+b*cos(c+d*x))^5//2*(48*C*a^2+162*C*b^2+198*A*b^2+-88*B*a*b)*sin(c+d*x)+1//3465*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(-96*C*a^4+150*b^4*(9C+11A)+-36*a^2*b^2*(8C+11A)+176*B*b*a^3+858*B*a*b^3)*sin(c+d*x)+1//3465*b^-3*d^-1*(a+b*cos(c+d*x))^3//2*(-96*C*a^3+1078*B*b^3+-12*a*b^2*(33A+34C)+176*B*b*a^2)*sin(c+d*x)+1//99*b^-2*d^-1*(a+b*cos(c+d*x))^5//2*(-12*C*a+22*B*b)*cos(c+d*x)*sin(c+d*x)+1//3465*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-96*C*a^5+3234*B*b^5+-36*a^3*b^2*(6C+11A)+12*a*b^4*(348C+451A)+176*B*b*a^4+726*B*a^2*b^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//11*C*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*cos(c+d*x)^2*sin(c+d*x)+-1//3465*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-48*C*a^4+75*b^4*(9C+11A)+-18*a^2*b^2*(8C+11A)+88*B*b*a^3+429*B*a*b^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//315*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(-150*B*b^3+-16*C*a^3+-6*a*b^2*(13C+21A)+36*B*b*a^2)*sin(c+d*x)+1//63*b^-2*d^-1*(a+b*cos(c+d*x))^5//2*(-8*C*a+18*B*b)*sin(c+d*x)+1//315*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*(16*C*a^2+98*C*b^2+126*A*b^2+-36*B*a*b)*sin(c+d*x)+-1//315*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-42*b^4*(7C+9A)+-16*C*a^4+-492*B*a*b^3+-6*a^2*b^2*(11C+21A)+36*B*b*a^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//9*C*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*cos(c+d*x)*sin(c+d*x)+1//315*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-75*B*b^3+-8*C*a^3+-3*a*b^2*(13C+21A)+18*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*(-4*C*a+14*B*b)*sin(c+d*x)+1//105*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*(-12*C*a^2+50*C*b^2+70*A*b^2+42*B*a*b)*sin(c+d*x)+2//7*C*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*sin(c+d*x)+1//105*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-12*C*a^3+126*B*b^3+4*a*b^2*(41C+70A)+42*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//105*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-6*C*a^2+25*C*b^2+35*A*b^2+21*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^5//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//1287*b^-3*d^-1*(a+b*cos(c+d*x))^7//2*(48*C*a^2+242*C*b^2+286*A*b^2+-104*B*a*b)*sin(c+d*x)+1//9009*b^-3*d^-1*(a+b*cos(c+d*x))^5//2*(-96*C*a^3+2106*B*b^3+-4*a*b^2*(143A+166C)+208*B*b*a^2)*sin(c+d*x)+1//45045*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(-480*C*a^5+17550*B*b^5+-20*a^3*b^2*(94C+143A)+12*a*b^4*(2174C+2717A)+1040*B*b*a^4+7410*B*a^2*b^3)*sin(c+d*x)+1//45045*b^-3*d^-1*(a+b*cos(c+d*x))^3//2*(-480*C*a^4+1078*b^4*(11C+13A)+-20*a^2*b^2*(124C+143A)+1040*B*b*a^3+8710*B*a*b^3)*sin(c+d*x)+1//143*b^-2*d^-1*(a+b*cos(c+d*x))^7//2*(-12*C*a+26*B*b)*cos(c+d*x)*sin(c+d*x)+1//45045*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-480*C*a^6+3234*b^6*(11C+13A)+-20*a^4*b^2*(76C+143A)+6*a^2*b^4*(10223C+13299A)+1040*B*b*a^5+6630*B*a^3*b^3+96330*B*a*b^5)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//13*C*b^-1*d^-1*(a+b*cos(c+d*x))^7//2*cos(c+d*x)^2*sin(c+d*x)+-1//45045*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-240*C*a^5+8775*B*b^5+-10*a^3*b^2*(94C+143A)+6*a*b^4*(2174C+2717A)+520*B*b*a^4+3705*B*a^2*b^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(-1//3465*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(-150*b^4*(9C+11A)+-80*C*a^4+-2508*B*a*b^3+-30*a^2*b^2*(19C+33A)+220*B*b*a^3)*sin(c+d*x)+-1//3465*b^-2*d^-1*(a+b*cos(c+d*x))^3//2*(-1078*B*b^3+-80*C*a^3+-10*a*b^2*(67C+99A)+220*B*b*a^2)*sin(c+d*x)+1//99*b^-2*d^-1*(a+b*cos(c+d*x))^7//2*(-8*C*a+22*B*b)*sin(c+d*x)+1//693*b^-2*d^-1*(a+b*cos(c+d*x))^5//2*(16*C*a^2+162*C*b^2+198*A*b^2+-44*B*a*b)*sin(c+d*x)+-1//3465*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-3234*B*b^5+-80*C*a^5+-6138*B*a^2*b^3+-30*a*b^4*(247C+319A)+-30*a^3*b^2*(17C+33A)+220*B*b*a^4)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//11*C*b^-1*d^-1*(a+b*cos(c+d*x))^7//2*cos(c+d*x)*sin(c+d*x)+1//3465*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-75*b^4*(9C+11A)+-40*C*a^4+-1254*B*a*b^3+-15*a^2*b^2*(19C+33A)+110*B*b*a^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//63*b^-1*d^-1*(a+b*cos(c+d*x))^5//2*(-4*C*a+18*B*b)*sin(c+d*x)+1//315*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*(-20*C*a^3+150*B*b^3+12*a*b^2*(19C+28A)+90*B*b*a^2)*sin(c+d*x)+1//315*b^-1*d^-1*(a+b*cos(c+d*x))^3//2*(-20*C*a^2+98*C*b^2+126*A*b^2+90*B*a*b)*sin(c+d*x)+2//9*C*b^-1*d^-1*(a+b*cos(c+d*x))^7//2*sin(c+d*x)+1//315*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-20*C*a^4+42*b^4*(7C+9A)+6*a^2*b^2*(93C+161A)+90*B*b*a^3+870*B*a*b^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//315*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-10*C*a^3+75*B*b^3+6*a*b^2*(19C+28A)+45*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^3//2*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(1//105*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-292*C*a^3+126*B*b^3+164*C*a*b^2+322*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//7*C*b*d^-1*(a+b*cos(c+d*x))^5//2*sin(c+d*x)+2//35*b*d^-1*(a+b*cos(c+d*x))^3//2*(-2*C*a+7*B*b)*sin(c+d*x)+2//105*b*d^-1*(a+b*cos(c+d*x))^(1/2)*(-41*C*a^2+25*C*b^2+56*B*a*b)*sin(c+d*x)+-1//105*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-41*C*a^2+25*C*b^2+56*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^(1/2)*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(1//15*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-34*C*a^2+18*C*b^2+40*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//5*C*b*d^-1*(a+b*cos(c+d*x))^3//2*sin(c+d*x)+2//15*b*d^-1*(a+b*cos(c+d*x))^(1/2)*(-2*C*a+5*B*b)*sin(c+d*x)+-1//15*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*(-2*C*a+5*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//105*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(48*C*a^2+50*C*b^2+70*A*b^2+-56*B*a*b)*sin(c+d*x)+-1//105*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-96*C*a^4+-10*b^4*(5C+7A)+-4*a^2*b^2*(16C+35A)+98*B*a*b^3+112*B*b*a^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//35*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(-12*C*a+14*B*b)*cos(c+d*x)*sin(c+d*x)+1//105*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-96*C*a^3+126*B*b^3+-4*a*b^2*(22C+35A)+112*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//7*C*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//15*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(-8*C*a+10*B*b)*sin(c+d*x)+1//15*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-16*C*a^3+10*B*b^3+-2*a*b^2*(7C+15A)+20*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//15*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(16*C*a^2+18*C*b^2+30*A*b^2+-20*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//5*C*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*C*b^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(2*C*b^2+4*C*a^2+6*A*b^2+-6*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-4*C*a+6*B*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-96*C*a^3+10*B*b^3+-12*a*b^2*(2C+5A)+80*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//15*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-48*C*a^3+-10*B*b^3+-6*a*b^2*(-3C+5A)+40*B*b*a^2)*sin(c+d*x)+-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+-1//15*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-96*C*a^4+6*b^4*(3C+5A)+-50*B*a*b^3+-12*a^2*b^2*(-4C+5A)+80*B*b*a^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//5*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-2*C*b^2+10*A*b^2+12*C*a^2+-10*B*a*b)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(2//3*C*b^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(2*C*b^2+6*A*b^2+16*C*a^2+-12*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2*a*b^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x)+1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-16*C*a^3+-6*B*b^3+-2*a*b^2*(-5C+3A)+12*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-4*C*a+2*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-2*C*b^2+2*A*b^2+4*C*a^2+-2*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^3*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*b^-4*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-128*C*a^5+10*B*b^5+-130*B*a^2*b^3+-4*a^3*b^2*(-49C+10A)+4*a*b^4*(-7C+20A)+80*B*b*a^4)*sin(c+d*x)+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^3*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+-1//15*b^-5*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-256*C*a^6+-6*b^6*(3C+5A)+-280*B*a^3*b^3+-8*a^4*b^2*(-53C+10A)+10*a^2*b^4*(-11C+15A)+80*B*a*b^5+160*B*b*a^5)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//15*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-96*C*a^4+2*b^4*(-3C+35A)+-100*B*a*b^3+-2*a^2*b^2*(-71C+15A)+60*B*b*a^3)*cos(c+d*x)*sin(c+d*x)+1//3*b^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^2*(-16*C*a^4+12*A*b^4+-18*B*a*b^3+-4*a^2*b^2*(A+-6C)+10*B*b*a^3)*sin(c+d*x)+1//15*b^-5*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-256*C*a^5+-10*B*b^5+-160*B*a^2*b^3+-8*a^3*b^2*(-29C+10A)+2*a*b^4*(17C+45A)+160*B*b*a^4)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*b^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-2*C*b^2+2*A*b^2+4*C*a^2+-2*B*a*b)*sin(c+d*x)+-2//3*a*b^-3*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(a*(-7*B*b^3+-6*C*a^3+3*B*b*a^2+10*C*a*b^2)+4*A*b^4)*sin(c+d*x)+-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+-1//3*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-32*C*a^4+2*b^4*(C+3A)+-18*B*a*b^3+-4*a^2*b^2*(A+-8C)+16*B*b*a^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//3*b^-4*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-32*C*a^5+6*B*b^5+-30*B*a^2*b^3+-4*a^3*b^2*(A+-14C)+4*a*b^4*(-4C+3A)+16*B*b*a^4)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2)*cos(c+d*x), x) == :(1//3*b^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(-10*C*a^4+6*A*b^4+-12*B*a*b^3+2*a^2*b^2*(A+9C)+4*B*b*a^3)*sin(c+d*x)+-1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-16*C*a^4+6*b^4*(A+-1C)+-12*B*a*b^3+2*a^2*b^2*(A+15C)+4*B*b*a^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//3*b^-3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-16*C*a^3+-6*B*b^3+2*a*b^2*(A+9C)+4*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//3*a*b^-2*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*(A*b^2+-1*a*(B*b+-1*C*a))*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+1//3*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(4*C*a^3+6*B*b^3+-4*a*b^2*(2A+3C)+2*B*b*a^2)*sin(c+d*x)+-1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(-4*C*a^2+2*A*b^2+6*C*b^2+-2*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-1//3*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(4*C*a^3+6*B*b^3+-4*a*b^2*(2A+3C)+2*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*b^-1*d^-1*(a+b*cos(c+d*x))^-5//2*(a^2+-1*b^2)^-1*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+1//15*b^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-2*(4*C*a^3+10*B*b^3+-4*a*b^2*(4A+5C)+6*B*b*a^2)*sin(c+d*x)+1//15*b^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-3*(-6*b^4*(3A+5C)+4*C*a^4+-2*a^2*b^2*(19C+23A)+6*B*b*a^3+58*B*a*b^3)*sin(c+d*x)+-1//15*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-3*(-6*b^4*(3A+5C)+4*C*a^4+-2*a^2*b^2*(19C+23A)+6*B*b*a^3+58*B*a*b^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+1//15*b^-2*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(4*C*a^3+10*B*b^3+-4*a*b^2*(4A+5C)+6*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-1//2*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(1//3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(-4*C*a+6*B*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2//3*C*b*d^-1*(a+b*cos(c+d*x))^(1/2)*sin(c+d*x)+-1//3*C*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-2*b^2+2*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-3//2*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-4*C*a+2*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+2*C*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate((a+b*cos(c+d*x))^-5//2*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(2*C*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*(-4*C*a+2*B*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-2*b*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*(B*b+-2*C*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^-7//2*(-1*C*a^2+B*a*b+B*b^2*cos(c+d*x)+C*b^2*cos(c+d*x)^2), x) == :(-1*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^(1/2)*(a+b*cos(c+d*x))^-1//2*(-3*b^2+3*a^2)^-1*(-4*C*a+2*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1)+-2*b*d^-1*(a+b*cos(c+d*x))^-3//2*(-3*b^2+3*a^2)^-1*(B*b+-2*C*a)*sin(c+d*x)+-2//3*b*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*(-5*C*a^2+-3*C*b^2+4*B*a*b)*sin(c+d*x)+1//3*d^-1*((a+b)^-1*(a+b*cos(c+d*x)))^-1//2*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*(-10*C*a^2+-6*C*b^2+8*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2*b*(a+b)^-1))
@test integrate(cos(c+d*x)^3//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(14*C*b+18*A*b+18*B*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*b+10*C*a+14*A*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//7*d^-1*cos(c+d*x)^5//2*(2*B*b+2*C*a)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*(10*B*b+10*C*a+14*A*a)*sin(c+d*x)+1//45*d^-1*cos(c+d*x)^3//2*(14*C*b+18*A*b+18*B*a)*sin(c+d*x)+2//9*C*b*d^-1*cos(c+d*x)^7//2*sin(c+d*x))
@test integrate(cos(c+d*x)^(1/2)*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(6*B*b+6*C*a+10*A*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*C*b+14*A*b+14*B*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^3//2*(2*B*b+2*C*a)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*(10*C*b+14*A*b+14*B*a)*sin(c+d*x)+2//7*C*b*d^-1*cos(c+d*x)^5//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-1//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*b+2*a*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(6*C*b+10*A*b+10*B*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*cos(c+d*x)^(1/2)*(2*B*b+2*C*a)*sin(c+d*x)+2//5*C*b*d^-1*cos(c+d*x)^3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-3//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*(-2*a*(A+-1C)+2*B*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*C*b+6*A*b+6*B*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*a*d^-1*cos(c+d*x)^-1//2*sin(c+d*x)+2//3*C*b*d^-1*cos(c+d*x)^(1/2)*sin(c+d*x))
@test integrate(cos(c+d*x)^-5//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*(-2*A*b+-2*B*a+2*C*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*a*(A+3C)+6*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+d^-1*cos(c+d*x)^-1//2*(2*A*b+2*B*a)*sin(c+d*x)+2//3*A*a*d^-1*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-7//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*A*b+2*B*a+6*C*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(-10*B*b+-10*C*a+-6*A*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*cos(c+d*x)^-3//2*(2*A*b+2*B*a)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^-1//2*(6*A*a+10*B*b+10*C*a)*sin(c+d*x)+2//5*A*a*d^-1*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate(cos(c+d*x)^-9//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(-10*C*b+-6*A*b+-6*B*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*A*a+14*B*b+14*C*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^-5//2*(2*A*b+2*B*a)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^-1//2*(6*A*b+6*B*a+10*C*b)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^-3//2*(10*A*a+14*B*b+14*C*a)*sin(c+d*x)+2//7*A*a*d^-1*cos(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(14*B*b^2+18*B*a^2+28*C*a*b+36*A*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*(10*b^2*(9C+11A)+22*a^2*(5C+7A)+220*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//45*d^-1*cos(c+d*x)^3//2*(14*B*b^2+18*B*a^2+28*C*a*b+36*A*a*b)*sin(c+d*x)+1//77*d^-1*cos(c+d*x)^5//2*(8*C*a^2+18*C*b^2+22*A*b^2+44*B*a*b)*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*(10*b^2*(9C+11A)+22*a^2*(5C+7A)+220*B*a*b)*sin(c+d*x)+2//11*C*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^5//2*sin(c+d*x)+2//99*b*d^-1*cos(c+d*x)^7//2*(4*C*a+11*B*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(2*b^2*(7C+9A)+6*a^2*(3C+5A)+36*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*b^2+14*B*a^2+20*C*a*b+28*A*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*(10*B*b^2+14*B*a^2+20*C*a*b+28*A*a*b)*sin(c+d*x)+1//45*d^-1*cos(c+d*x)^3//2*(8*C*a^2+14*C*b^2+18*A*b^2+36*B*a*b)*sin(c+d*x)+2//9*C*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*sin(c+d*x)+2//63*b*d^-1*cos(c+d*x)^5//2*(4*C*a+9*B*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(6*B*b^2+10*B*a^2+12*C*a*b+20*A*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(2*b^2*(5C+7A)+14*a^2*(C+3A)+28*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*(8*C*a^2+10*C*b^2+14*A*b^2+28*B*a*b)*sin(c+d*x)+2//7*C*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*sin(c+d*x)+2//35*b*d^-1*cos(c+d*x)^3//2*(4*C*a+7*B*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*b^2+6*B*a^2+4*a*b*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(-10*a^2*(A+-1C)+2*b^2*(3C+5A)+20*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*sin(c+d*x)+-2//3*b*d^-1*cos(c+d*x)^(1/2)*(-1*B*b+-2*C*a+6*A*a)*sin(c+d*x)+-2//5*b^2*d^-1*cos(c+d*x)^3//2*(-1C+5A)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*(-2*B*a^2+2*B*b^2+-4*a*b*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*(2*a^2*(A+3C)+2*b^2*(C+3A)+12*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//3*b^2*d^-1*cos(c+d*x)^(1/2)*(A+-1C)*sin(c+d*x)+2//3*A*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*sin(c+d*x)+2//3*a*d^-1*cos(c+d*x)^-1//2*(3*B*a+4*A*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*a^2+6*B*b^2+4*a*b*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(-10*b^2*(A+-1C)+-2*a^2*(3A+5C)+-20*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^-1//2*(2*a^2*(3A+5C)+8*A*b^2+20*B*a*b)*sin(c+d*x)+2//5*A*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*sin(c+d*x)+2//15*a*d^-1*cos(c+d*x)^-3//2*(4*A*b+5*B*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(-10*B*b^2+-6*B*a^2+-20*C*a*b+-12*A*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(2*a^2*(5A+7C)+14*b^2*(A+3C)+28*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^-1//2*(6*B*a^2+10*B*b^2+12*A*a*b+20*C*a*b)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^-3//2*(2*a^2*(5A+7C)+8*A*b^2+28*B*a*b)*sin(c+d*x)+2//7*A*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*sin(c+d*x)+2//35*a*d^-1*cos(c+d*x)^-5//2*(4*A*b+7*B*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(-6*b^2*(3A+5C)+-2*a^2*(7A+9C)+-36*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*a^2+14*B*b^2+20*A*a*b+28*C*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//15*d^-1*cos(c+d*x)^-1//2*(2*a^2*(7A+9C)+6*b^2*(3A+5C)+36*B*a*b)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^-3//2*(10*B*a^2+14*B*b^2+20*A*a*b+28*C*a*b)*sin(c+d*x)+1//45*d^-1*cos(c+d*x)^-5//2*(2*a^2*(7A+9C)+8*A*b^2+36*B*a*b)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-9//2*sin(c+d*x)+2//63*a*d^-1*cos(c+d*x)^-7//2*(4*A*b+9*B*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(6*a^3*(3C+5A)+14*B*b^3+6*a*b^2*(7C+9A)+54*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*(10*b^3*(9C+11A)+154*B*a^3+66*b*a^2*(5C+7A)+330*B*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*cos(c+d*x)^(1/2)*(10*b^3*(9C+11A)+154*B*a^3+66*b*a^2*(5C+7A)+330*B*a*b^2)*sin(c+d*x)+1//495*d^-1*cos(c+d*x)^3//2*(48*C*a^3+154*B*b^3+66*a*b^2*(7C+9A)+484*B*b*a^2)*sin(c+d*x)+1//99*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*(12*C*a+22*B*b)*sin(c+d*x)+2//11*C*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^3//2*sin(c+d*x)+2//693*b*d^-1*cos(c+d*x)^5//2*(24*C*a^2+81*C*b^2+99*A*b^2+143*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(2*b^3*(7C+9A)+30*B*a^3+18*b*a^2*(3C+5A)+54*B*a*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*b^3+14*a^3*(C+3A)+6*a*b^2*(5C+7A)+42*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//63*d^-1*cos(c+d*x)^(1/2)*(16*C*a^3+30*B*b^3+18*a*b^2*(5C+7A)+108*B*b*a^2)*sin(c+d*x)+1//21*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(4*C*a+6*B*b)*sin(c+d*x)+2//9*C*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^(1/2)*sin(c+d*x)+2//315*b*d^-1*cos(c+d*x)^3//2*(24*C*a^2+49*C*b^2+63*A*b^2+99*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(-10*a^3*(A+-1C)+6*B*b^3+6*a*b^2*(3C+5A)+30*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(2*b^3*(5C+7A)+42*B*a^3+42*B*a*b^2+42*b*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-1//2*sin(c+d*x)+-2//35*b^2*d^-1*cos(c+d*x)^3//2*(-11*C*a+-7*B*b+35*A*a)*sin(c+d*x)+2//21*b*d^-1*cos(c+d*x)^(1/2)*(b^2*(5C+7A)+-6*a^2*(-3C+7A)+21*B*a*b)*sin(c+d*x)+-2//7*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(-1C+7A)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*b^3+2*a^3*(A+3C)+6*a*b^2*(C+3A)+18*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(-10*B*a^3+2*b^3*(3C+5A)+-30*b*a^2*(A+-1C)+30*B*a*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*(2*B*a+4*A*b)*sin(c+d*x)+-2//3*b*d^-1*cos(c+d*x)^(1/2)*(-1*B*b^2+6*B*a^2+3*a*b*(-1C+5A))*sin(c+d*x)+-2//15*b^2*d^-1*cos(c+d*x)^3//2*(-3*C*b+15*B*a+35*A*b)*sin(c+d*x)+2//3*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*a^3+2*b^3*(C+3A)+6*b*a^2*(A+3C)+18*B*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(-2*a^3*(3A+5C)+10*B*b^3+-30*B*b*a^2+-30*a*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-2//15*b^2*d^-1*cos(c+d*x)^(1/2)*(-5*C*b+5*B*a+9*A*b)*sin(c+d*x)+1//15*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*(10*B*a+12*A*b)*sin(c+d*x)+2//5*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-5//2*sin(c+d*x)+2//15*a*d^-1*cos(c+d*x)^-1//2*(3*a^2*(3A+5C)+24*A*b^2+35*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(-10*b^3*(A+-1C)+-6*B*a^3+-30*B*a*b^2+-6*b*a^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(2*a^3*(5A+7C)+42*B*b^3+42*B*b*a^2+42*a*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//35*d^-1*cos(c+d*x)^-1//2*(42*B*a^3+48*A*b^3+42*b*a^2*(3A+5C)+196*B*a*b^2)*sin(c+d*x)+1//35*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*(12*A*b+14*B*a)*sin(c+d*x)+2//7*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-7//2*sin(c+d*x)+2//105*a*d^-1*cos(c+d*x)^-3//2*(5*a^2*(5A+7C)+24*A*b^2+63*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(-30*B*b^3+-2*a^3*(7A+9C)+-54*B*b*a^2+-18*a*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*a^3+14*b^3*(A+3C)+6*b*a^2*(5A+7C)+42*B*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//15*d^-1*cos(c+d*x)^-1//2*(2*a^3*(7A+9C)+30*B*b^3+18*a*b^2*(3A+5C)+54*B*b*a^2)*sin(c+d*x)+1//63*d^-1*cos(c+d*x)^-3//2*(16*A*b^3+30*B*a^3+18*b*a^2*(5A+7C)+108*B*a*b^2)*sin(c+d*x)+1//21*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*(4*A*b+6*B*a)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-9//2*sin(c+d*x)+2//315*a*d^-1*cos(c+d*x)^-5//2*(7*a^2*(7A+9C)+24*A*b^2+99*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//195*d^-1*(14*b^4*(11C+13A)+78*a^4*(3C+5A)+156*a^2*b^2*(7C+9A)+728*B*a*b^3+936*B*b*a^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*(90*B*b^4+154*B*a^4+40*a*b^3*(9C+11A)+88*b*a^3*(5C+7A)+660*B*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*cos(c+d*x)^(1/2)*(90*B*b^4+154*B*a^4+40*a*b^3*(9C+11A)+88*b*a^3*(5C+7A)+660*B*a^2*b^2)*sin(c+d*x)+1//6435*d^-1*cos(c+d*x)^3//2*(154*b^4*(11C+13A)+384*C*a^4+22*a^2*b^2*(491C+637A)+6916*B*b*a^3+8008*B*a*b^3)*sin(c+d*x)+1//143*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^3//2*(16*C*a+26*B*b)*sin(c+d*x)+1//1287*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^3//2*(96*C*a^2+242*C*b^2+286*A*b^2+442*B*a*b)*sin(c+d*x)+2//13*C*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^3//2*sin(c+d*x)+2//9009*b*d^-1*cos(c+d*x)^5//2*(192*C*a^3+1053*B*b^3+2*a*b^2*(1259C+1573A)+2171*B*b*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(14*B*b^4+30*B*a^4+8*a*b^3*(7C+9A)+24*b*a^3*(3C+5A)+108*B*a^2*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*(10*b^4*(9C+11A)+154*a^4*(C+3A)+132*a^2*b^2*(5C+7A)+440*B*a*b^3+616*B*b*a^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//693*d^-1*cos(c+d*x)^(1/2)*(30*b^4*(9C+11A)+128*C*a^4+18*a^2*b^2*(101C+143A)+1320*B*a*b^3+1364*B*b*a^3)*sin(c+d*x)+1//99*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^(1/2)*(16*C*a+22*B*b)*sin(c+d*x)+1//231*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(32*C*a^2+54*C*b^2+66*A*b^2+110*B*a*b)*sin(c+d*x)+2//11*C*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^(1/2)*sin(c+d*x)+2//3465*b*d^-1*cos(c+d*x)^3//2*(192*C*a^3+539*B*b^3+2*a*b^2*(673C+891A)+1353*B*b*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(-30*a^4*(A+-1C)+2*b^4*(7C+9A)+36*a^2*b^2*(3C+5A)+72*B*a*b^3+120*B*b*a^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*b^4+42*B*a^4+8*a*b^3*(5C+7A)+56*b*a^3*(C+3A)+84*B*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-1//2*sin(c+d*x)+2//63*b*d^-1*cos(c+d*x)^(1/2)*(-1*a^3*(-62C+126A)+15*B*b^3+12*a*b^2*(5C+7A)+117*B*b*a^2)*sin(c+d*x)+2//315*b^2*d^-1*cos(c+d*x)^3//2*(-1*a^2*(-123C+315A)+7*b^2*(7C+9A)+162*B*a*b)*sin(c+d*x)+-2//9*b*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^(1/2)*(-1C+9A)*sin(c+d*x)+-2//21*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(-5*C*a+-3*B*b+21*A*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(-10*B*a^4+6*B*b^4+-40*b*a^3*(A+-1C)+8*a*b^3*(3C+5A)+60*B*a^2*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(2*b^4*(5C+7A)+14*a^4*(A+3C)+56*B*a*b^3+84*a^2*b^2*(C+3A)+168*B*b*a^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//21*b*d^-1*cos(c+d*x)^(1/2)*(-1*b^3*(5C+7A)+42*B*a^3+-28*B*a*b^2+3*b*a^2*(-13C+49A))*sin(c+d*x)+-2//105*b^2*d^-1*cos(c+d*x)^3//2*(-21*B*b^2+105*B*a^2+-54*C*a*b+350*A*a*b)*sin(c+d*x)+1//3*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-1//2*(6*B*a+16*A*b)*sin(c+d*x)+2//3*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-3//2*sin(c+d*x)+-2//7*b*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^(1/2)*(-1*C*b+7*B*a+21*A*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*(2*B*a^4+2*B*b^4+8*a*b^3*(C+3A)+8*b*a^3*(A+3C)+36*B*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(-2*a^4*(3A+5C)+2*b^4*(3C+5A)+-60*a^2*b^2*(A+-1C)+-40*B*b*a^3+40*B*a*b^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-2//15*b*d^-1*cos(c+d*x)^(1/2)*(-5*B*b^3+6*a^3*(3A+5C)+4*a*b^2*(-5C+33A)+105*B*b*a^2)*sin(c+d*x)+-2//15*b^2*d^-1*cos(c+d*x)^3//2*(b^2*(-3C+59A)+3*a^2*(3A+5C)+50*B*a*b)*sin(c+d*x)+1//5*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-1//2*(2*a^2*(3A+5C)+32*A*b^2+30*B*a*b)*sin(c+d*x)+1//15*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-3//2*(10*B*a+16*A*b)*sin(c+d*x)+2//5*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*(-6*B*a^4+10*B*b^4+-60*B*a^2*b^2+-40*a*b^3*(A+-1C)+-8*b*a^3*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(2*a^4*(5A+7C)+14*b^4*(C+3A)+56*B*b*a^3+84*a^2*b^2*(A+3C)+168*B*a*b^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//105*b^2*d^-1*cos(c+d*x)^(1/2)*(b^2*(-35C+87A)+5*a^2*(5A+7C)+98*B*a*b)*sin(c+d*x)+1//35*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-5//2*(14*B*a+16*A*b)*sin(c+d*x)+1//105*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-3//2*(10*a^2*(5A+7C)+96*A*b^2+154*B*a*b)*sin(c+d*x)+2//7*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-7//2*sin(c+d*x)+2//105*a*d^-1*cos(c+d*x)^-1//2*(a^2*(202*A*b+350*C*b)+63*B*a^3+192*A*b^3+413*B*a*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(-30*b^4*(A+-1C)+-2*a^4*(7A+9C)+-120*B*a*b^3+-72*B*b*a^3+-36*a^2*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(10*B*a^4+42*B*b^4+8*b*a^3*(5A+7C)+56*a*b^3*(A+3C)+84*B*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//315*d^-1*cos(c+d*x)^-1//2*(42*a^4*(7A+9C)+384*A*b^4+14*a^2*b^2*(155A+261C)+1512*B*b*a^3+2196*B*a*b^3)*sin(c+d*x)+1//63*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-7//2*(16*A*b+18*B*a)*sin(c+d*x)+1//315*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-5//2*(14*a^2*(7A+9C)+96*A*b^2+234*B*a*b)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-9//2*sin(c+d*x)+2//315*a*d^-1*cos(c+d*x)^-3//2*(a^2*(202*A*b+294*C*b)+64*A*b^3+75*B*a^3+261*B*a*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*cos(c+d*x)^-13//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*(-30*B*b^4+-14*B*a^4+-108*B*a^2*b^2+-24*a*b^3*(3A+5C)+-8*b*a^3*(7A+9C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*(10*a^4*(9A+11C)+154*b^4*(A+3C)+132*a^2*b^2*(5A+7C)+440*B*b*a^3+616*B*a*b^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//15*d^-1*cos(c+d*x)^-1//2*(14*B*a^4+30*B*b^4+8*b*a^3*(7A+9C)+24*a*b^3*(3A+5C)+108*B*a^2*b^2)*sin(c+d*x)+1//693*d^-1*cos(c+d*x)^-3//2*(30*a^4*(9A+11C)+128*A*b^4+18*a^2*b^2*(101A+143C)+1320*B*b*a^3+1364*B*a*b^3)*sin(c+d*x)+1//99*d^-1*(a+b*cos(c+d*x))^3*cos(c+d*x)^-9//2*(16*A*b+22*B*a)*sin(c+d*x)+1//231*d^-1*(a+b*cos(c+d*x))^2*cos(c+d*x)^-7//2*(6*a^2*(9A+11C)+32*A*b^2+110*B*a*b)*sin(c+d*x)+2//11*A*d^-1*(a+b*cos(c+d*x))^4*cos(c+d*x)^-11//2*sin(c+d*x)+2//3465*a*d^-1*cos(c+d*x)^-5//2*(192*A*b^3+539*B*a^3+2*b*a^2*(673A+891C)+1353*B*a*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+1//15*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(2*A*b+10*B*a)*sin(c+d*x)+-1//15*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(a*(-5B+9A+15C)+2*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2a+2b)*(-3*a^2*(3A+5C)+2*A*b^2+-5*B*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+-1//105*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(-10*a^2*(5A+7C)+8*A*b^2+-14*B*a*b)*sin(c+d*x)+1//35*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(2*A*b+14*B*a)*sin(c+d*x)+1//105*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(8*A*b^3+63*B*a^3+b*a^2*(19A+35C)+-14*B*a*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//105*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(a^2*(-63B+25A+35C)+8*A*b^2+2*a*b*(-7B+3A))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(6*A*b+14*B*a)*sin(c+d*x)+2//7*A*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*sin(c+d*x)+1//105*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(6*A*b^2+10*a^2*(5A+7C)+84*B*a*b)*sin(c+d*x)+-1//105*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-1*a^2*(-63B+25A+35C)+6*A*b^2+3*a*b*(-7B+19A+35C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//105*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2a+2b)*(-63*B*a^3+6*A*b^3+-21*B*a*b^2+-2*b*a^2*(41A+70C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//21*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*(2*A*b+6*B*a)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-9//2*sin(c+d*x)+-1//315*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(-150*B*a^3+8*A*b^3+-18*B*a*b^2+-4*b*a^2*(44A+63C))*sin(c+d*x)+1//315*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(6*A*b^2+14*a^2*(7A+9C)+144*B*a*b)*sin(c+d*x)+1//315*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(8*A*b^4+21*a^4*(7A+9C)+-18*B*a*b^3+3*a^2*b^2*(11A+21C)+246*B*b*a^3)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//315*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(-3*a^3*(-25B+49A+63C)+8*A*b^3+3*b*a^2*(-57B+13A+21C)+6*a*b^2*(A+-3B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*cos(c+d*x)^-11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//63*d^-1*(a+b*cos(c+d*x))^3//2*cos(c+d*x)^-7//2*(10*A*b+18*B*a)*sin(c+d*x)+1//315*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(14*a^2*(7A+9C)+30*A*b^2+180*B*a*b)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^5//2*cos(c+d*x)^-9//2*sin(c+d*x)+1//315*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(10*A*b^3+150*B*a^3+2*b*a^2*(163A+231C)+270*B*a*b^2)*sin(c+d*x)+-1//315*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(3*a^3*(-25B+49A+63C)+10*A*b^3+-6*b*a^2*(-60B+19A+28C)+15*a*b^2*(-3B+11A+21C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//315*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2a+2b)*(-21*a^4*(7A+9C)+10*A*b^4+-435*B*b*a^3+-45*B*a*b^3+-3*a^2*b^2*(93A+161C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*sin(c+d*x)+2//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(a*(A+-3B+3C)+2*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2a+2b)*(-3*B*a+2*A*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//15*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(-10*B*a+8*A*b)*sin(c+d*x)+2//5*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*sin(c+d*x)+-2//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(a^2*(-5B+9A+15C)+8*A*b^2+-2*a*b*(A+5B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//15*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2b+2a)*(3*a^2*(3A+5C)+8*A*b^2+-10*B*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//35*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-5//2*(-14*B*a+12*A*b)*sin(c+d*x)+1//105*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-3//2*(10*a^2*(5A+7C)+48*A*b^2+-56*B*a*b)*sin(c+d*x)+2//7*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-7//2*sin(c+d*x)+2//105*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(a^3*(-63B+25A+35C)+48*A*b^3+-4*a*b^2*(3A+14B)+2*b*a^2*(7B+22A+35C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//105*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2a+2b)*(a^2*(44*A*b+70*C*b)+-63*B*a^3+48*A*b^3+-56*B*a*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*(a+a*cos(c+d*x)+2*b*cos(c+d*x)^2), x) == :(2*d^-1*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2*sin(c+d*x)+4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+a^-1*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*(-2a+2b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-1//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+-1*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(-2*a^2*(A+-1C)+4*A*b^2+-2*B*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(2*a*(A+-1B+-1C)+4*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+-1//3*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(-2*a^2*(A+-3C)+8*A*b^2+-6*B*a*b)*sin(c+d*x)+1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(-2*a^2*(-3*C*b+5*A*b)+6*B*a^3+16*A*b^3+-12*B*a*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(2*a^2*(A+-3B+3C)+16*A*b^2+12*a*b*(A+-1B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*cos(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-5//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+-1//5*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*cos(c+d*x)^-5//2*(-2*a^2*(A+-5C)+12*A*b^2+-10*B*a*b)*sin(c+d*x)+1//15*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(-2*a^2*(-15*C*b+9*A*b)+10*B*a^3+48*A*b^3+-40*B*a*b^2)*sin(c+d*x)+-1//15*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(-6*a^4*(3A+5C)+96*A*b^4+-80*B*a*b^3+-12*a^2*b^2*(-5C+4A)+50*B*b*a^3)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1//15*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(2*a^3*(-5B+9A+15C)+96*A*b^3+8*a*b^2*(-10B+9A)+12*b*a^2*(-5B+2A+5C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^-1//2*(4*A*b^3+6*B*a^3+-4*b*a^2*(2C+3A)+2*B*a*b^2)*sin(c+d*x)+-1//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(-2*a^2*(C+3A+3B)+4*A*b^2+2*a*b*(B+3A+3C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*(-6*B*a^3+-4*A*b^3+-2*B*a*b^2+8*C*b*a^2+12*A*b*a^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*a^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^-1//2*(-4*C*a^4+8*A*b^4+-4*a^2*b^2*(C+4A)+-2*B*a*b^3+10*B*b*a^3)*sin(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-1//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(6*a^4*(A+-1C)+16*A*b^4+-4*B*a*b^3+-2*a^2*b^2*(C+15A)+12*B*b*a^3)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(-6*a^3*(A+-1B+-1C)+16*A*b^3+-2*b*a^2*(C+3B+9A)+4*a*b^2*(-1B+3A))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*cos(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*cos(c+d*x)^-3//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+1//3*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*cos(c+d*x)^-3//2*(2*a^4*(A+-5C)+16*A*b^4+-8*B*a*b^3+-2*a^2*b^2*(-1C+13A)+16*B*b*a^3)*sin(c+d*x)+1//3*a^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*cos(c+d*x)^-3//2*(-12*A*b^4+8*C*a^4+-14*B*b*a^3+6*B*a*b^3+20*A*a^2*b^2)*sin(c+d*x)+-1//3*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(-6*B*a^5+2*a^4*(-6*C*b+8*A*b)+32*A*b^5+-16*B*a*b^4+-4*a^2*b^3*(-1C+14A)+30*B*a^3*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x)+-1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*(-2*a^4*(A+-3B+3C)+32*A*b^4+-6*b*a^3*(-1C+-3B+3A)+-4*a^2*b^2*(-1C+3B+8A)+8*a*b^3*(-2B+3A))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*cot(c+d*x))
@test integrate(sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2//5*A*a*d^-1*sec(c+d*x)^5//2*sin(c+d*x)+2//5*a*d^-1*sec(c+d*x)^(1/2)*(3A+5C)*sin(c+d*x)+2//7*A*a*d^-1*sec(c+d*x)^7//2*sin(c+d*x)+2//21*a*d^-1*sec(c+d*x)^3//2*(5A+7C)*sin(c+d*x)+-2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2//3*A*a*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+2//5*A*a*d^-1*sec(c+d*x)^5//2*sin(c+d*x)+2//5*a*d^-1*sec(c+d*x)^(1/2)*(3A+5C)*sin(c+d*x)+-2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2*A*a*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+2//3*A*a*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+-2*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2*A*a*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+2//3*C*a*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+-2*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2//3*C*a*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+2//5*C*a*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2//5*C*a*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+2//7*C*a*d^-1*sec(c+d*x)^-5//2*sin(c+d*x)+2//21*a*d^-1*sec(c+d*x)^-1//2*(5C+7A)*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2)*(a+a*cos(c+d*x)), x) == :(2//7*C*a*d^-1*sec(c+d*x)^-5//2*sin(c+d*x)+2//9*C*a*d^-1*sec(c+d*x)^-7//2*sin(c+d*x)+2//21*a*d^-1*sec(c+d*x)^-1//2*(5C+7A)*sin(c+d*x)+2//45*a*d^-1*sec(c+d*x)^-3//2*(7C+9A)*sin(c+d*x)+2//15*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^9//2*sin(c+d*x)+2//105*a^2*d^-1*sec(c+d*x)^5//2*(19A+21C)*sin(c+d*x)+4//21*a^2*d^-1*sec(c+d*x)^3//2*(5A+7C)*sin(c+d*x)+8//63*A*d^-1*sec(c+d*x)^7//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+16//15*a^2*d^-1*sec(c+d*x)^(1/2)*(2A+3C)*sin(c+d*x)+-16//15*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2A+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^7//2*sin(c+d*x)+2//105*a^2*d^-1*sec(c+d*x)^3//2*(33A+35C)*sin(c+d*x)+4//5*a^2*d^-1*sec(c+d*x)^(1/2)*(3A+5C)*sin(c+d*x)+8//35*A*d^-1*sec(c+d*x)^5//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+-4//5*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+8//21*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^5//2*sin(c+d*x)+2//15*a^2*d^-1*sec(c+d*x)^(1/2)*(15C+17A)*sin(c+d*x)+8//15*A*d^-1*sec(c+d*x)^3//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+-16//5*A*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-2//3*a^2*d^-1*sec(c+d*x)^-1//2*(-1C+5A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^3//2*sin(c+d*x)+8//3*A*d^-1*sec(c+d*x)^(1/2)*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+-4*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+8//3*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^(1/2)*sin(c+d*x)+-2//15*a^2*d^-1*sec(c+d*x)^-1//2*(-7C+15A)*sin(c+d*x)+-1//5*d^-1*sec(c+d*x)^-1//2*(a^2+a^2*cos(c+d*x))*(-2C+10A)*sin(c+d*x)+4//3*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+16//5*C*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(2//7*C*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^-1//2*sin(c+d*x)+2//105*a^2*d^-1*sec(c+d*x)^-1//2*(33C+35A)*sin(c+d*x)+8//35*C*d^-1*sec(c+d*x)^-1//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+4//5*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+8//21*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(2//9*C*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^-3//2*sin(c+d*x)+2//105*a^2*d^-1*sec(c+d*x)^-3//2*(19C+21A)*sin(c+d*x)+4//21*a^2*d^-1*sec(c+d*x)^-1//2*(5C+7A)*sin(c+d*x)+8//63*C*d^-1*sec(c+d*x)^-3//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+4//21*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+16//15*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2C+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(2//11*C*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^-5//2*sin(c+d*x)+2//693*a^2*d^-1*sec(c+d*x)^-5//2*(89C+99A)*sin(c+d*x)+4//45*a^2*d^-1*sec(c+d*x)^-3//2*(7C+9A)*sin(c+d*x)+8//99*C*d^-1*sec(c+d*x)^-5//2*(a^2+a^2*cos(c+d*x))*sin(c+d*x)+8//231*a^2*d^-1*sec(c+d*x)^-1//2*(25C+33A)*sin(c+d*x)+4//15*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+8//231*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(25C+33A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^13//2*(A+C*cos(c+d*x)^2), x) == :(1//231*d^-1*sec(c+d*x)^7//2*(a^3+a^3*cos(c+d*x))*(66C+70A)*sin(c+d*x)+2//11*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^11//2*sin(c+d*x)+4//5*a^3*d^-1*sec(c+d*x)^(1/2)*(5A+7C)*sin(c+d*x)+4//231*a^3*d^-1*sec(c+d*x)^3//2*(105A+143C)*sin(c+d*x)+8//385*a^3*d^-1*sec(c+d*x)^5//2*(35A+44C)*sin(c+d*x)+-4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+7C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//33*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^9//2*sin(c+d*x)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(105A+143C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(1//315*d^-1*sec(c+d*x)^5//2*(a^3+a^3*cos(c+d*x))*(126C+146A)*sin(c+d*x)+2//9*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^9//2*sin(c+d*x)+4//15*a^3*d^-1*sec(c+d*x)^(1/2)*(17A+27C)*sin(c+d*x)+8//105*a^3*d^-1*sec(c+d*x)^3//2*(16A+21C)*sin(c+d*x)+-4//15*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(17A+27C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^7//2*sin(c+d*x)+4//21*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(11A+21C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(1//15*d^-1*sec(c+d*x)^3//2*(a^3+a^3*cos(c+d*x))*(10C+14A)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^7//2*sin(c+d*x)+8//105*a^3*d^-1*sec(c+d*x)^(1/2)*(53A+70C)*sin(c+d*x)+-4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(13A+35C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+12//35*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(-4//15*a^3*d^-1*sec(c+d*x)^-1//2*(5C+21A)*sin(c+d*x)+1//5*d^-1*sec(c+d*x)^(1/2)*(a^3+a^3*cos(c+d*x))*(10C+22A)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^5//2*sin(c+d*x)+-4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-5C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//5*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^3//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-8//15*a^3*d^-1*sec(c+d*x)^-1//2*(-3C+10A)*sin(c+d*x)+-1//15*d^-1*sec(c+d*x)^-1//2*(a^3+a^3*cos(c+d*x))*(-6C+70A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^3//2*sin(c+d*x)+4*A*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^(1/2)*sin(c+d*x)+-4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-9C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^(1/2)*sin(c+d*x)+-4//105*a^3*d^-1*sec(c+d*x)^-1//2*(-41C+35A)*sin(c+d*x)+-1//35*d^-1*sec(c+d*x)^-1//2*(a^3+a^3*cos(c+d*x))*(-22C+70A)*sin(c+d*x)+-1//7*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^-1//2*(-2C+14A)*sin(c+d*x)+4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+7C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(13C+35A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//315*d^-1*sec(c+d*x)^-1//2*(a^3+a^3*cos(c+d*x))*(126A+146C)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^-1//2*sin(c+d*x)+8//105*a^3*d^-1*sec(c+d*x)^-1//2*(16C+21A)*sin(c+d*x)+4//15*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(17C+27A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*C*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^-1//2*sin(c+d*x)+4//21*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(11C+21A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//231*d^-1*sec(c+d*x)^-3//2*(a^3+a^3*cos(c+d*x))*(66A+70C)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^-3//2*sin(c+d*x)+4//231*a^3*d^-1*sec(c+d*x)^-1//2*(105C+143A)*sin(c+d*x)+8//385*a^3*d^-1*sec(c+d*x)^-3//2*(35C+44A)*sin(c+d*x)+4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//33*C*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^-3//2*sin(c+d*x)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(105C+143A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(1//1287*d^-1*sec(c+d*x)^-5//2*(a^3+a^3*cos(c+d*x))*(286A+290C)*sin(c+d*x)+2//13*C*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^-5//2*sin(c+d*x)+4//231*a^3*d^-1*sec(c+d*x)^-1//2*(95C+121A)*sin(c+d*x)+4//585*a^3*d^-1*sec(c+d*x)^-3//2*(175C+221A)*sin(c+d*x)+40//9009*a^3*d^-1*sec(c+d*x)^-5//2*(118C+143A)*sin(c+d*x)+4//195*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(175C+221A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(95C+121A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+12//143*C*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^5//2*(A+C)*sin(c+d*x)+-1//3*a^-1*d^-1*sec(c+d*x)^3//2*(3C+5A)*sin(c+d*x)+1//5*a^-1*d^-1*sec(c+d*x)^(1/2)*(15C+21A)*sin(c+d*x)+1//5*a^-1*d^-1*sec(c+d*x)^5//2*(5C+7A)*sin(c+d*x)+-1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-21A+-15C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-1*a^-1*d^-1*sec(c+d*x)^(1/2)*(C+3A)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^3//2*(A+C)*sin(c+d*x)+1//3*a^-1*d^-1*sec(c+d*x)^3//2*(3C+5A)*sin(c+d*x)+a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*sec(c+d*x)^(1/2)*(C+3A)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^(1/2)*(A+C)*sin(c+d*x)+-1*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+C)*sin(c+d*x)+a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^-3//2*(A+C)*sin(c+d*x)+1//3*a^-1*d^-1*sec(c+d*x)^-1//2*(3A+5C)*sin(c+d*x)+-1*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^-5//2*(A+C)*sin(c+d*x)+-1//3*a^-1*d^-1*sec(c+d*x)^-1//2*(3A+5C)*sin(c+d*x)+1//5*a^-1*d^-1*sec(c+d*x)^-3//2*(5A+7C)*sin(c+d*x)+-1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(15A+21C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^-7//2*(A+C)*sin(c+d*x)+-1//5*a^-1*d^-1*sec(c+d*x)^-3//2*(5A+7C)*sin(c+d*x)+1//7*a^-1*d^-1*sec(c+d*x)^-5//2*(7A+9C)*sin(c+d*x)+1//21*a^-1*d^-1*sec(c+d*x)^-1//2*(35A+45C)*sin(c+d*x)+1//5*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-21C+-15A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(35A+45C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-1*a^-2*d^-1*sec(c+d*x)^(1/2)*(C+7A)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^3//2*(A+C)*sin(c+d*x)+1//3*a^-2*d^-1*sec(c+d*x)^3//2*(2C+10A)*sin(c+d*x)+a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+7A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^3//2*(C+7A)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2C+10A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(4*A*a^-2*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^(1/2)*(A+C)*sin(c+d*x)+-4*A*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^(1/2)*(-1C+5A)*sin(c+d*x)+-1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-1//2*(A+C)*sin(c+d*x)+a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+-1C)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2A+2C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-3//2*(A+C)*sin(c+d*x)+4*C*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+-5C)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-5//2*(A+C)*sin(c+d*x)+1//3*a^-2*d^-1*sec(c+d*x)^-1//2*(2A+10C)*sin(c+d*x)+-1*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+7C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^-3//2*(A+7C)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2A+10C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(-1//3*a^-2*d^-1*sec(c+d*x)^-1//2*(5A+15C)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-7//2*(A+C)*sin(c+d*x)+1//15*a^-2*d^-1*sec(c+d*x)^-3//2*(20A+56C)*sin(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^-5//2*(A+3C)*sin(c+d*x)+-1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+15C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(20A+56C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*sec(c+d*x)^3//2*(C+11A)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^3//2*(A+C)*sin(c+d*x)+-1//10*a^-3*d^-1*sec(c+d*x)^(1/2)*(9C+119A)*sin(c+d*x)+-1//30*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^3//2*(9C+119A)*sin(c+d*x)+(1/2)*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+11A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//3*A*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^3//2*sin(c+d*x)+1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(9C+119A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^(1/2)*(A+C)*sin(c+d*x)+-1//6*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^(1/2)*(-1C+13A)*sin(c+d*x)+1//10*a^-3*d^-1*sec(c+d*x)^(1/2)*(-1C+49A)*sin(c+d*x)+-1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+13A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+49A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^(1/2)*(-2C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-1//2*(A+C)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(-1C+9A)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-1//2*(-4C+6A)*sin(c+d*x)+1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-3//2*(A+C)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+-9C)*sin(c+d*x)+1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-9C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-1//2*(-6C+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-5//2*(A+C)*sin(c+d*x)+1//6*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+-13C)*sin(c+d*x)+-1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-49C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-13C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-3//2*(-8C+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :((1/2)*a^-3*d^-1*sec(c+d*x)^-1//2*(A+11C)*sin(c+d*x)+-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-7//2*(A+C)*sin(c+d*x)+-1//30*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-3//2*(9A+119C)*sin(c+d*x)+(1/2)*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+11C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-2//3*C*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-5//2*sin(c+d*x)+-1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(9A+119C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^-7//2*(A+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-9//2*(A+C)*sin(c+d*x)+-1//6*a^-3*d^-1*sec(c+d*x)^-1//2*(13A+63C)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-5//2*(13A+63C)*sin(c+d*x)+1//30*a^-3*d^-1*sec(c+d*x)^-3//2*(49A+231C)*sin(c+d*x)+-1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(13A+63C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-7//2*(2A+12C)*sin(c+d*x)+1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(49A+231C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*sin(c+d*x)+2//63*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(16A+21C)*sin(c+d*x)+8//315*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(16A+21C)*sin(c+d*x)+16//315*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(16A+21C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*sin(c+d*x)+2//35*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(24A+35C)*sin(c+d*x)+4//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(24A+35C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x)+2//15*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(8A+15C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(2//3*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*sin(c+d*x)+2*C*a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*A*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^(1/2)*sin(c+d*x)+C*a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-1C+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :((1/2)*C*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*sin(c+d*x)+1//4*C*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*sin(c+d*x)+1//4*a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//3*C*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-3//2*sin(c+d*x)+1//8*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(5C+8A)*sin(c+d*x)+1//8*a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//12*C*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(1//4*C*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-5//2*sin(c+d*x)+1//24*C*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-5//2*sin(c+d*x)+1//64*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(35C+48A)*sin(c+d*x)+1//64*a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(35C+48A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//96*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(35C+48A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^13//2*(A+C*cos(c+d*x)^2), x) == :(2//11*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^11//2*sin(c+d*x)+2//33*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*sin(c+d*x)+2//231*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(28A+33C)*sin(c+d*x)+2//385*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(112A+143C)*sin(c+d*x)+8//1155*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(112A+143C)*sin(c+d*x)+16//1155*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(112A+143C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^9//2*sin(c+d*x)+2//21*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(136A+189C)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(52A+63C)*sin(c+d*x)+4//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(136A+189C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^7//2*sin(c+d*x)+2//15*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(4A+5C)*sin(c+d*x)+2//105*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(104A+175C)*sin(c+d*x)+6//35*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^5//2*sin(c+d*x)+2*C*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//5*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*sin(c+d*x)+2//5*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(4A+5C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(2//3*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^3//2*sin(c+d*x)+2*A*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^(1/2)*sin(c+d*x)+3*C*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//3*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-3C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^(1/2)*sin(c+d*x)+-1//2*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(-1C+4A)*sin(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-5C+8A)*sin(c+d*x)+1//4*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//3*C*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-1//2*sin(c+d*x)+1//4*C*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*sin(c+d*x)+1//8*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(11C+24A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//24*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(19C+24A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//4*C*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-3//2*sin(c+d*x)+1//8*C*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-3//2*sin(c+d*x)+1//32*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(13C+16A)*sin(c+d*x)+1//64*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(75C+112A)*sin(c+d*x)+1//64*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(75C+112A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(1//5*C*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-5//2*sin(c+d*x)+1//128*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(133C+176A)*sin(c+d*x)+1//128*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(133C+176A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//192*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(133C+176A)*sin(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-5//2*(67C+80A)*sin(c+d*x)+3//40*C*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^15//2*(A+C*cos(c+d*x)^2), x) == :(2//13*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^13//2*sin(c+d*x)+2//1287*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*(136A+143C)*sin(c+d*x)+2//9009*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(2224A+2717C)*sin(c+d*x)+2//15015*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(8368A+10439C)*sin(c+d*x)+8//45045*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(8368A+10439C)*sin(c+d*x)+10//143*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^11//2*sin(c+d*x)+16//45045*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(8368A+10439C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^13//2*(A+C*cos(c+d*x)^2), x) == :(2//11*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^11//2*sin(c+d*x)+2//231*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(32A+33C)*sin(c+d*x)+2//693*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(568A+759C)*sin(c+d*x)+2//693*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(232A+297C)*sin(c+d*x)+4//693*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(568A+759C)*sin(c+d*x)+10//99*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^9//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^9//2*sin(c+d*x)+2//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(8A+11C)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(63C+64A)*sin(c+d*x)+2//315*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(584A+903C)*sin(c+d*x)+10//63*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^7//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^7//2*sin(c+d*x)+2*C*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//7*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^5//2*sin(c+d*x)+2//21*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(7C+8A)*sin(c+d*x)+2//21*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(32A+49C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^5//2*sin(c+d*x)+5*C*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(15C+64A)*sin(c+d*x)+2//3*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^3//2*sin(c+d*x)+2//5*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^(1/2)*(5C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(2//3*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^3//2*sin(c+d*x)+-1//2*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(-1C+8A)*sin(c+d*x)+-1//12*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-27C+56A)*sin(c+d*x)+1//4*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(8A+19C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+10//3*A*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^(1/2)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^(1/2)*sin(c+d*x)+-1//3*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-1//2*(-1C+6A)*sin(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(-3C+8A)*sin(c+d*x)+-1//24*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-49C+24A)*sin(c+d*x)+5//8*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//4*C*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^-1//2*sin(c+d*x)+1//32*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(16A+17C)*sin(c+d*x)+1//64*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(163C+304A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//192*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(299C+432A)*sin(c+d*x)+5//24*C*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//5*C*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^-3//2*sin(c+d*x)+1//8*C*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-3//2*sin(c+d*x)+1//128*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(283C+400A)*sin(c+d*x)+1//128*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(283C+400A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//240*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-3//2*(79C+80A)*sin(c+d*x)+1//960*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(787C+1040A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(1//6*C*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^-5//2*sin(c+d*x)+1//12*C*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-5//2*sin(c+d*x)+1//96*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-5//2*(23C+24A)*sin(c+d*x)+1//192*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-5//2*(109C+136A)*sin(c+d*x)+1//512*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(1015C+1304A)*sin(c+d*x)+1//512*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(1015C+1304A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//768*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(1015C+1304A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(-2//63*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*sin(c+d*x)+-1//315*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(42C+58A)*sin(c+d*x)+1//105*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(38A+42C)*sin(c+d*x)+1//315*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(514A+546C)*sin(c+d*x)+2//9*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^9//2*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(-2//35*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*sin(c+d*x)+-1//105*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(70C+86A)*sin(c+d*x)+1//105*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(62A+70C)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(-2//15*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*sin(c+d*x)+1//15*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(26A+30C)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-2//3*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*sin(c+d*x)+2*C*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(C*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*sin(c+d*x)+-1*C*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :((1/2)*C*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*sin(c+d*x)+-1//4*C*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*sin(c+d*x)+1//4*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//12*C*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*sin(c+d*x)+1//3*C*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-5//2*sin(c+d*x)+1//8*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(7C+8A)*sin(c+d*x)+-1//8*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(8A+9C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^7//2*(A+C)*sin(c+d*x)+-1//70*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(35C+67A)*sin(c+d*x)+-1//210*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(665C+1201A)*sin(c+d*x)+1//14*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(7C+11A)*sin(c+d*x)+1//210*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(245C+397A)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(11C+19A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^5//2*(A+C)*sin(c+d*x)+-1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(5C+13A)*sin(c+d*x)+1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(25C+49A)*sin(c+d*x)+1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(5C+9A)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+15A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^3//2*(A+C)*sin(c+d*x)+-1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(3C+19A)*sin(c+d*x)+1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(3C+7A)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+11A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^(1/2)*(A+C)*sin(c+d*x)+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(C+5A)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+7A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-1//2*(A+C)*sin(c+d*x)+2*C*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-5C+3A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-3//2*(A+C)*sin(c+d*x)+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(A+3C)*sin(c+d*x)+-3*C*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+9C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-5//2*(A+C)*sin(c+d*x)+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(A+2C)*sin(c+d*x)+-1//4*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(2A+7C)*sin(c+d*x)+1//4*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(8A+19C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+13C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^5//2*(A+C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^5//2*(5C+21A)*sin(c+d*x)+-1//240*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(195C+787A)*sin(c+d*x)+1//80*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(45C+157A)*sin(c+d*x)+1//240*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(735C+2671A)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(75C+283A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^3//2*(A+C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^3//2*(C+17A)*sin(c+d*x)+-1//48*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(27C+299A)*sin(c+d*x)+1//48*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(15C+95A)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(19C+163A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^(1/2)*(A+C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^(1/2)*(-3C+13A)*sin(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(C+49A)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-75A+5C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-1//2*(A+C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-1//2*(-7C+9A)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+19A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-3//2*(A+C)*sin(c+d*x)+2*C*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-1//2*(-11C+5A)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-43C+5A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-5//2*(A+C)*sin(c+d*x)+-5*C*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-3//2*(A+-15C)*sin(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(3A+35C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+115C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-5//2*(A+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-7//2*(A+C)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-5//2*(3A+19C)*sin(c+d*x)+-1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(11A+63C)*sin(c+d*x)+1//4*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(8A+39C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(7A+31C)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(43A+219C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate(sec(c+d*x)^9//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*C*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+2//5*B*d^-1*sec(c+d*x)^5//2*sin(c+d*x)+6//5*B*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+-6//5*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*C*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^7//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*C*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+2//3*B*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+-2*C*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^5//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*B*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+-2*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*C*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2*C*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^(1/2)*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*C*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+2*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*C*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-1//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*B*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+2//5*C*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+2//3*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+6//5*C*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-3//2*(B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*B*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+2//7*C*d^-1*sec(c+d*x)^-5//2*sin(c+d*x)+10//21*C*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+6//5*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+10//21*C*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*sec(c+d*x)^(1/2)*(6A+10C)*sin(c+d*x)+2//3*B*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+2//5*A*d^-1*sec(c+d*x)^5//2*sin(c+d*x)+-1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(6A+10C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*B*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+2//3*A*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+-2*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2A+6C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-2A+2C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*C*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+2*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2C+6A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*B*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+2//5*C*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(6C+10A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//21*d^-1*sec(c+d*x)^-1//2*(10C+14A)*sin(c+d*x)+2//5*B*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+2//7*C*d^-1*sec(c+d*x)^-5//2*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10C+14A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+6//5*B*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^9//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*a*d^-1*sec(c+d*x)^(1/2)*(3A+3B+5C)*sin(c+d*x)+2//5*a*d^-1*sec(c+d*x)^5//2*(A+B)*sin(c+d*x)+2//7*A*a*d^-1*sec(c+d*x)^7//2*sin(c+d*x)+2//21*a*d^-1*sec(c+d*x)^3//2*(5A+7B+7C)*sin(c+d*x)+-2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+3B+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+7B+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^7//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*a*d^-1*sec(c+d*x)^3//2*(A+B)*sin(c+d*x)+2//5*A*a*d^-1*sec(c+d*x)^5//2*sin(c+d*x)+2//5*a*d^-1*sec(c+d*x)^(1/2)*(3A+5B+5C)*sin(c+d*x)+-2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5B+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+B+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^5//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*a*d^-1*sec(c+d*x)^(1/2)*(A+B)*sin(c+d*x)+2//3*A*a*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+-2*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+B+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3B+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^3//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*a*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+2//3*C*a*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+-2*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1B+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A+3B)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^(1/2)*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*a*d^-1*sec(c+d*x)^-1//2*(B+C)*sin(c+d*x)+2//5*C*a*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(B+C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A+5B)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-1//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*a*d^-1*sec(c+d*x)^-3//2*(B+C)*sin(c+d*x)+2//7*C*a*d^-1*sec(c+d*x)^-5//2*sin(c+d*x)+2//21*a*d^-1*sec(c+d*x)^-1//2*(5C+7A+7B)*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3B+3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A+7B)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-3//2*(a+a*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//7*a*d^-1*sec(c+d*x)^-5//2*(B+C)*sin(c+d*x)+2//9*C*a*d^-1*sec(c+d*x)^-7//2*sin(c+d*x)+2//21*a*d^-1*sec(c+d*x)^-1//2*(5B+5C+7A)*sin(c+d*x)+2//45*a*d^-1*sec(c+d*x)^-3//2*(7C+9A+9B)*sin(c+d*x)+2//15*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+9A+9B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5B+5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//63*d^-1*sec(c+d*x)^7//2*(a^2+a^2*cos(c+d*x))*(8A+18B)*sin(c+d*x)+2//9*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^9//2*sin(c+d*x)+2//105*a^2*d^-1*sec(c+d*x)^5//2*(19A+21C+27B)*sin(c+d*x)+4//15*a^2*d^-1*sec(c+d*x)^(1/2)*(8A+9B+12C)*sin(c+d*x)+4//21*a^2*d^-1*sec(c+d*x)^3//2*(5A+6B+7C)*sin(c+d*x)+-4//15*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(8A+9B+12C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+6B+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*d^-1*sec(c+d*x)^5//2*(a^2+a^2*cos(c+d*x))*(8A+14B)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^7//2*sin(c+d*x)+2//105*a^2*d^-1*sec(c+d*x)^3//2*(33A+35C+49B)*sin(c+d*x)+4//5*a^2*d^-1*sec(c+d*x)^(1/2)*(3A+4B+5C)*sin(c+d*x)+-4//5*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+4B+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(6A+7B+14C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*sec(c+d*x)^3//2*(a^2+a^2*cos(c+d*x))*(8A+10B)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^5//2*sin(c+d*x)+2//15*a^2*d^-1*sec(c+d*x)^(1/2)*(15C+17A+25B)*sin(c+d*x)+-4//5*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(4A+5B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+2B+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2//3*a^2*d^-1*sec(c+d*x)^-1//2*(-1C+3B+5A)*sin(c+d*x)+1//3*d^-1*sec(c+d*x)^(1/2)*(a^2+a^2*cos(c+d*x))*(6B+8A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^3//2*sin(c+d*x)+-4*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2A+2C+3B)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^(1/2)*sin(c+d*x)+-2//15*a^2*d^-1*sec(c+d*x)^-1//2*(-7C+-5B+15A)*sin(c+d*x)+-1//5*d^-1*sec(c+d*x)^-1//2*(a^2+a^2*cos(c+d*x))*(-2C+10A)*sin(c+d*x)+4//3*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+2B+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//5*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(4C+5B)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*d^-1*sec(c+d*x)^-1//2*(a^2+a^2*cos(c+d*x))*(8C+14B)*sin(c+d*x)+2//7*C*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^-1//2*sin(c+d*x)+2//105*a^2*d^-1*sec(c+d*x)^-1//2*(33C+35A+49B)*sin(c+d*x)+4//5*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+4B+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(6C+7B+14A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//63*d^-1*sec(c+d*x)^-3//2*(a^2+a^2*cos(c+d*x))*(8C+18B)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^-3//2*sin(c+d*x)+2//105*a^2*d^-1*sec(c+d*x)^-3//2*(19C+21A+27B)*sin(c+d*x)+4//21*a^2*d^-1*sec(c+d*x)^-1//2*(5C+6B+7A)*sin(c+d*x)+4//15*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(8C+9B+12A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+6B+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^2*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//99*d^-1*sec(c+d*x)^-5//2*(a^2+a^2*cos(c+d*x))*(8C+22B)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^2*sec(c+d*x)^-5//2*sin(c+d*x)+2//693*a^2*d^-1*sec(c+d*x)^-5//2*(89C+99A+121B)*sin(c+d*x)+4//45*a^2*d^-1*sec(c+d*x)^-3//2*(7C+8B+9A)*sin(c+d*x)+4//231*a^2*d^-1*sec(c+d*x)^-1//2*(50C+55B+66A)*sin(c+d*x)+4//15*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+8B+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(50C+55B+66A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^13//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//693*d^-1*sec(c+d*x)^7//2*(a^3+a^3*cos(c+d*x))*(198C+210A+286B)*sin(c+d*x)+2//11*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^11//2*sin(c+d*x)+4//15*a^3*d^-1*sec(c+d*x)^(1/2)*(15A+17B+21C)*sin(c+d*x)+4//231*a^3*d^-1*sec(c+d*x)^3//2*(105A+121B+143C)*sin(c+d*x)+4//1155*a^3*d^-1*sec(c+d*x)^5//2*(210A+253B+264C)*sin(c+d*x)+-4//15*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(15A+17B+21C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//99*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^9//2*(12A+22B)*sin(c+d*x)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(105A+121B+143C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//315*d^-1*sec(c+d*x)^5//2*(a^3+a^3*cos(c+d*x))*(126C+146A+198B)*sin(c+d*x)+2//9*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^9//2*sin(c+d*x)+4//15*a^3*d^-1*sec(c+d*x)^(1/2)*(17A+21B+27C)*sin(c+d*x)+4//105*a^3*d^-1*sec(c+d*x)^3//2*(32A+41B+42C)*sin(c+d*x)+-4//15*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(17A+21B+27C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^7//2*(4A+6B)*sin(c+d*x)+4//21*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(11A+13B+21C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*sec(c+d*x)^3//2*(a^3+a^3*cos(c+d*x))*(10C+14A+18B)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^7//2*sin(c+d*x)+4//105*a^3*d^-1*sec(c+d*x)^(1/2)*(106A+140C+147B)*sin(c+d*x)+-4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A+9B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//35*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^5//2*(12A+14B)*sin(c+d*x)+4//21*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(13A+21B+35C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//15*a^3*d^-1*sec(c+d*x)^-1//2*(5C+20B+21A)*sin(c+d*x)+1//15*d^-1*sec(c+d*x)^(1/2)*(a^3+a^3*cos(c+d*x))*(30C+66A+70B)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^5//2*sin(c+d*x)+-4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-5C+5B+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//15*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^3//2*(10B+12A)*sin(c+d*x)+4//3*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5B+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-4//15*a^3*d^-1*sec(c+d*x)^-1//2*(-6C+5B+20A)*sin(c+d*x)+-1//15*d^-1*sec(c+d*x)^-1//2*(a^3+a^3*cos(c+d*x))*(-6C+30B+70A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^3//2*sin(c+d*x)+a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^(1/2)*(2B+4A)*sin(c+d*x)+-4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-9C+-5B+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//3*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A+5B)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^(1/2)*sin(c+d*x)+-4//105*a^3*d^-1*sec(c+d*x)^-1//2*(-42B+-41C+35A)*sin(c+d*x)+-1//35*d^-1*sec(c+d*x)^-1//2*(a^3+a^3*cos(c+d*x))*(-22C+-14B+70A)*sin(c+d*x)+-1//7*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^-1//2*(-2C+14A)*sin(c+d*x)+4//5*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+7C+9B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(13C+21B+35A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//315*d^-1*sec(c+d*x)^-1//2*(a^3+a^3*cos(c+d*x))*(126A+146C+198B)*sin(c+d*x)+2//9*C*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^-1//2*sin(c+d*x)+4//105*a^3*d^-1*sec(c+d*x)^-1//2*(32C+41B+42A)*sin(c+d*x)+1//21*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^-1//2*(4C+6B)*sin(c+d*x)+4//15*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(17C+21B+27A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//21*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(11C+13B+21A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//693*d^-1*sec(c+d*x)^-3//2*(a^3+a^3*cos(c+d*x))*(198A+210C+286B)*sin(c+d*x)+2//11*C*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^-3//2*sin(c+d*x)+4//231*a^3*d^-1*sec(c+d*x)^-1//2*(105C+121B+143A)*sin(c+d*x)+4//1155*a^3*d^-1*sec(c+d*x)^-3//2*(210C+253B+264A)*sin(c+d*x)+1//99*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^-3//2*(12C+22B)*sin(c+d*x)+4//15*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(15C+17B+21A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(105C+121B+143A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^3*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//1287*d^-1*sec(c+d*x)^-5//2*(a^3+a^3*cos(c+d*x))*(286A+290C+390B)*sin(c+d*x)+2//13*C*d^-1*(a+a*cos(c+d*x))^3*sec(c+d*x)^-5//2*sin(c+d*x)+4//231*a^3*d^-1*sec(c+d*x)^-1//2*(95C+105B+121A)*sin(c+d*x)+4//585*a^3*d^-1*sec(c+d*x)^-3//2*(175C+195B+221A)*sin(c+d*x)+20//9009*a^3*d^-1*sec(c+d*x)^-5//2*(236C+273B+286A)*sin(c+d*x)+1//143*a^-1*d^-1*(a^2+a^2*cos(c+d*x))^2*sec(c+d*x)^-5//2*(12C+26B)*sin(c+d*x)+4//195*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(175C+195B+221A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+4//231*a^3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(95C+105B+121A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^5//2*(A+C+-1B)*sin(c+d*x)+-1//3*a^-1*d^-1*sec(c+d*x)^3//2*(-5B+3C+5A)*sin(c+d*x)+1//5*a^-1*d^-1*sec(c+d*x)^(1/2)*(-15B+15C+21A)*sin(c+d*x)+1//5*a^-1*d^-1*sec(c+d*x)^5//2*(-5B+5C+7A)*sin(c+d*x)+-1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-5B+3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-21A+-15C+15B)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-1*d^-1*sec(c+d*x)^(1/2)*(C+-3B+3A)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+1//3*a^-1*d^-1*sec(c+d*x)^3//2*(-3B+3C+5A)*sin(c+d*x)+a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+-3B+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-3B+3C+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*sec(c+d*x)^(1/2)*(C+-1B+3A)*sin(c+d*x)+-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x)+-1*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1B+-1C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+-1B+3A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x)+a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+B+-1C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1B+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+1//3*a^-1*d^-1*sec(c+d*x)^-1//2*(-3B+3A+5C)*sin(c+d*x)+-1*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-3B+3C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-3B+3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^-5//2*(A+C+-1B)*sin(c+d*x)+-1//3*a^-1*d^-1*sec(c+d*x)^-1//2*(-5B+3A+5C)*sin(c+d*x)+1//5*a^-1*d^-1*sec(c+d*x)^-3//2*(-5B+5A+7C)*sin(c+d*x)+-1//3*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-5B+3A+5C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-15B+15A+21C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-1*sec(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*d^-1*(a+a*cos(c+d*x))^-1*sec(c+d*x)^-7//2*(A+C+-1B)*sin(c+d*x)+-1//5*a^-1*d^-1*sec(c+d*x)^-3//2*(-7B+5A+7C)*sin(c+d*x)+1//7*a^-1*d^-1*sec(c+d*x)^-5//2*(-7B+7A+9C)*sin(c+d*x)+1//21*a^-1*d^-1*sec(c+d*x)^-1//2*(-35B+35A+45C)*sin(c+d*x)+1//5*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-21C+-15A+21B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*a^-1*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-35B+35A+45C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1*a^-2*d^-1*sec(c+d*x)^(1/2)*(C+-4B+7A)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+1//3*a^-2*d^-1*sec(c+d*x)^3//2*(-5B+2C+10A)*sin(c+d*x)+a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+-4B+7A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^3//2*(C+-4B+7A)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-5B+2C+10A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-2*d^-1*sec(c+d*x)^(1/2)*(-1B+4A)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x)+-1*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1B+4A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^(1/2)*(-1C+-2B+5A)*sin(c+d*x)+-1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+-2B+5A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x)+a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+-1C)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(B+2A+2C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+-1*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(B+-4C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+-5C+2B)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-5C+2B)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-5//2*(A+C+-1B)*sin(c+d*x)+1//3*a^-2*d^-1*sec(c+d*x)^-1//2*(-5B+2A+10C)*sin(c+d*x)+-1*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-4B+7C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//3*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^-3//2*(A+-4B+7C)*sin(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-5B+2A+10C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-2*sec(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*a^-2*d^-1*sec(c+d*x)^-1//2*(-10B+5A+15C)*sin(c+d*x)+-1//3*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-7//2*(A+C+-1B)*sin(c+d*x)+1//15*a^-2*d^-1*sec(c+d*x)^-3//2*(-35B+20A+56C)*sin(c+d*x)+-1*a^-2*d^-1*(1+cos(c+d*x))^-1*sec(c+d*x)^-5//2*(A+-2B+3C)*sin(c+d*x)+-1//3*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10B+5A+15C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*a^-2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-35B+20A+56C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+-1//10*a^-3*d^-1*sec(c+d*x)^(1/2)*(-49B+9C+119A)*sin(c+d*x)+-1//30*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^3//2*(-49B+9C+119A)*sin(c+d*x)+1//6*a^-3*d^-1*sec(c+d*x)^3//2*(-13B+3C+33A)*sin(c+d*x)+-1//3*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^3//2*(-1B+2A)*sin(c+d*x)+1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-13B+3C+33A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-49B+9C+119A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x)+-1//6*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^(1/2)*(-1C+-3B+13A)*sin(c+d*x)+1//10*a^-3*d^-1*sec(c+d*x)^(1/2)*(-1C+-9B+49A)*sin(c+d*x)+-1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+-3B+13A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+-9B+49A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^(1/2)*(-3B+-2C+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(B+-1C+9A)*sin(c+d*x)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-1//2*(-1B+-4C+6A)*sin(c+d*x)+1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(B+C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(B+-1C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+-1B+-9C)*sin(c+d*x)+1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+B+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1B+-9C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-1//2*(B+-6C+4A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-5//2*(A+C+-1B)*sin(c+d*x)+1//6*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-1//2*(A+-13C+3B)*sin(c+d*x)+-1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-49C+9B)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-13C+3B)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-3//2*(-8C+2A+3B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-7//2*(A+C+-1B)*sin(c+d*x)+-1//30*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-3//2*(-49B+9A+119C)*sin(c+d*x)+1//6*a^-3*d^-1*sec(c+d*x)^-1//2*(-13B+3A+33C)*sin(c+d*x)+-1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-49B+9A+119C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-5//2*(B+-2C)*sin(c+d*x)+1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-13B+3A+33C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^-3*sec(c+d*x)^-7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//5*d^-1*(a+a*cos(c+d*x))^-3*sec(c+d*x)^-9//2*(A+C+-1B)*sin(c+d*x)+-1//6*a^-3*d^-1*sec(c+d*x)^-1//2*(-33B+13A+63C)*sin(c+d*x)+-1//10*d^-1*(a^3+a^3*cos(c+d*x))^-1*sec(c+d*x)^-5//2*(-33B+13A+63C)*sin(c+d*x)+1//30*a^-3*d^-1*sec(c+d*x)^-3//2*(-119B+49A+231C)*sin(c+d*x)+-1//6*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-33B+13A+63C)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+-1//15*a^-1*d^-1*(a+a*cos(c+d*x))^-2*sec(c+d*x)^-7//2*(-7B+2A+12C)*sin(c+d*x)+1//10*a^-3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-119B+49A+231C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*sin(c+d*x)+2//63*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(A+9B)*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(16A+18B+21C)*sin(c+d*x)+8//315*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(16A+18B+21C)*sin(c+d*x)+16//315*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(16A+18B+21C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*sin(c+d*x)+2//35*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(A+7B)*sin(c+d*x)+2//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(24A+28B+35C)*sin(c+d*x)+4//105*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(24A+28B+35C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(8A+10B+15C)*sin(c+d*x)+2//15*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(A+5B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*sin(c+d*x)+2*C*a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(A+3B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^(1/2)*sin(c+d*x)+a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+2B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-1C+2A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*C*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*sin(c+d*x)+1//4*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(C+4B)*sin(c+d*x)+1//4*a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+4B+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*C*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-3//2*sin(c+d*x)+1//8*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(5C+6B+8A)*sin(c+d*x)+1//8*a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+6B+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//12*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(C+6B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*C*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-5//2*sin(c+d*x)+1//24*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-5//2*(C+8B)*sin(c+d*x)+1//64*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(35C+40B+48A)*sin(c+d*x)+1//64*a^(1/2)*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(35C+40B+48A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//96*a*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(35C+40B+48A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^13//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//11*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^11//2*sin(c+d*x)+2//99*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*(3A+11B)*sin(c+d*x)+2//693*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(84A+99C+110B)*sin(c+d*x)+2//1155*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(336A+374B+429C)*sin(c+d*x)+8//3465*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(336A+374B+429C)*sin(c+d*x)+16//3465*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(336A+374B+429C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^9//2*sin(c+d*x)+2//21*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(A+3B)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(136A+156B+189C)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(52A+63C+72B)*sin(c+d*x)+4//315*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(136A+156B+189C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^7//2*sin(c+d*x)+2//15*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(4A+5C+6B)*sin(c+d*x)+2//35*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(3A+7B)*sin(c+d*x)+2//105*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(104A+126B+175C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^5//2*sin(c+d*x)+2*C*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//15*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(3A+5B)*sin(c+d*x)+2//15*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(12A+15C+20B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^3//2*sin(c+d*x)+a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2B+3C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^(1/2)*(A+B)*sin(c+d*x)+-1//3*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-3C+6B+8A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^(1/2)*sin(c+d*x)+-1//2*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(-1C+4A)*sin(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-5C+-4B+8A)*sin(c+d*x)+1//4*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+8A+12B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*C*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-1//2*sin(c+d*x)+1//4*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(C+2B)*sin(c+d*x)+1//8*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(11C+14B+24A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//24*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(19C+24A+30B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*C*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-3//2*sin(c+d*x)+1//24*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-3//2*(3C+8B)*sin(c+d*x)+1//64*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(75C+88B+112A)*sin(c+d*x)+1//64*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(75C+88B+112A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//96*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(39C+48A+56B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^3//2*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*C*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-5//2*sin(c+d*x)+1//40*a*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-5//2*(3C+10B)*sin(c+d*x)+1//128*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(133C+150B+176A)*sin(c+d*x)+1//128*a^3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(133C+150B+176A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//192*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(133C+150B+176A)*sin(c+d*x)+1//240*a^2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-5//2*(67C+80A+90B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^15//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//13*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^13//2*sin(c+d*x)+2//143*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^11//2*(5A+13B)*sin(c+d*x)+2//1287*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*(136A+143C+182B)*sin(c+d*x)+2//9009*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(2224A+2522B+2717C)*sin(c+d*x)+2//15015*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(8368A+9230B+10439C)*sin(c+d*x)+8//45045*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(8368A+9230B+10439C)*sin(c+d*x)+16//45045*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(8368A+9230B+10439C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^13//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//11*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^11//2*sin(c+d*x)+2//99*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^9//2*(5A+11B)*sin(c+d*x)+2//231*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(32A+33C+44B)*sin(c+d*x)+2//3465*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(2840A+3212B+3795C)*sin(c+d*x)+2//3465*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(1160A+1364B+1485C)*sin(c+d*x)+4//3465*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(2840A+3212B+3795C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^9//2*sin(c+d*x)+2//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(8A+10B+11C)*sin(c+d*x)+2//63*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^7//2*(5A+9B)*sin(c+d*x)+2//315*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(63C+64A+90B)*sin(c+d*x)+2//315*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(584A+690B+903C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^7//2*sin(c+d*x)+2*C*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//35*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^5//2*(5A+7B)*sin(c+d*x)+2//105*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(35C+40A+56B)*sin(c+d*x)+2//105*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(160A+224B+245C)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^5//2*sin(c+d*x)+a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2B+5C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//15*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(15C+64A+70B)*sin(c+d*x)+2//3*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^3//2*(A+B)*sin(c+d*x)+2//5*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^(1/2)*(5C+8A+10B)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^3//2*sin(c+d*x)+-1//2*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(-1C+4B+8A)*sin(c+d*x)+-1//12*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-27C+12B+56A)*sin(c+d*x)+1//4*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(8A+19C+20B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2//3*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^(1/2)*(3B+5A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^(1/2)*sin(c+d*x)+-1//3*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-1//2*(-1C+6A)*sin(c+d*x)+-1//4*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(-3C+-2B+8A)*sin(c+d*x)+-1//24*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-54B+-49C+24A)*sin(c+d*x)+1//8*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(25C+38B+40A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//4*C*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^-1//2*sin(c+d*x)+1//24*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-1//2*(5C+8B)*sin(c+d*x)+1//32*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-1//2*(16A+17C+24B)*sin(c+d*x)+1//64*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(163C+200B+304A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//192*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(299C+392B+432A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*C*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^-3//2*sin(c+d*x)+1//8*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-3//2*(C+2B)*sin(c+d*x)+1//128*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(283C+326B+400A)*sin(c+d*x)+1//128*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(283C+326B+400A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//240*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-3//2*(79C+80A+110B)*sin(c+d*x)+1//960*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(787C+950B+1040A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^5//2*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//6*C*d^-1*(a+a*cos(c+d*x))^5//2*sec(c+d*x)^-5//2*sin(c+d*x)+1//60*a*d^-1*(a+a*cos(c+d*x))^3//2*sec(c+d*x)^-5//2*(5C+12B)*sin(c+d*x)+1//480*a^2*d^-1*(a+a*cos(c+d*x))^(1/2)*sec(c+d*x)^-5//2*(115C+120A+156B)*sin(c+d*x)+1//512*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(1015C+1132B+1304A)*sin(c+d*x)+1//512*a^5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(1015C+1132B+1304A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//768*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(1015C+1132B+1304A)*sin(c+d*x)+1//960*a^3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-5//2*(545C+628B+680A)*sin(c+d*x))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//63*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(-18B+2A)*sin(c+d*x)+-1//315*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(-186B+42C+58A)*sin(c+d*x)+1//105*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(-6B+38A+42C)*sin(c+d*x)+1//315*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(-258B+514A+546C)*sin(c+d*x)+2//9*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^9//2*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//35*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(-14B+2A)*sin(c+d*x)+-1//105*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(-182B+70C+86A)*sin(c+d*x)+1//105*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(-14B+62A+70C)*sin(c+d*x)+2//7*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//15*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(-10B+2A)*sin(c+d*x)+1//15*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(-10B+26A+30C)*sin(c+d*x)+2//5*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*sin(c+d*x)+-1*2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(-6B+2A)*sin(c+d*x)+2//3*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*sin(c+d*x)+2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*sin(c+d*x)+2*C*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(C*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*sin(c+d*x)+a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+2B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :((1/2)*C*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*sin(c+d*x)+1//4*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-1C+4B)*sin(c+d*x)+1//4*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-4B+7C+8A)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1*2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*C*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-5//2*sin(c+d*x)+1//8*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-2B+7C+8A)*sin(c+d*x)+1//12*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(-1C+6B)*sin(c+d*x)+-1//8*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-14B+8A+9C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+C+-1B)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(A*a+(A*b+B*a)*cos(c+d*x)+B*b*cos(c+d*x)^2), x) == :(B*b*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*sin(c+d*x)+a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1*B*b+2*A*b+2*B*a)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+2^(1/2)*a^-1//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1B)*(a+-1b)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^7//2*(A+C+-1B)*sin(c+d*x)+-1//70*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(-63B+35C+67A)*sin(c+d*x)+-1//210*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(-1029B+665C+1201A)*sin(c+d*x)+1//14*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(-7B+7C+11A)*sin(c+d*x)+1//210*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(-273B+245C+397A)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-15B+11C+19A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^5//2*(A+C+-1B)*sin(c+d*x)+-1//30*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(-35B+15C+39A)*sin(c+d*x)+1//10*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(-5B+5C+9A)*sin(c+d*x)+1//30*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(-95B+75C+147A)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-11B+7C+15A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+-1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(-15B+3C+19A)*sin(c+d*x)+1//6*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(-3B+3C+7A)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-7B+3C+11A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x)+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(C+-1B+5A)*sin(c+d*x)+-1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1C+-3B+7A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x)+2*C*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(B+-5C+3A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-3C+2B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(A+-1B+3C)*sin(c+d*x)+1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-5B+9C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//2*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-5//2*(A+C+-1B)*sin(c+d*x)+(1/2)*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(A+-1B+2C)*sin(c+d*x)+-1//4*a^-1*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-6B+2A+7C)*sin(c+d*x)+1//4*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-12B+8A+19C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+-1//4*2^(1/2)*a^-3//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-9B+5A+13C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^5//2*(A+C+-1B)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^5//2*(-13B+5C+21A)*sin(c+d*x)+-1//240*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(-475B+195C+787A)*sin(c+d*x)+1//80*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(-85B+45C+157A)*sin(c+d*x)+1//240*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(-1495B+735C+2671A)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-163B+75C+283A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^3//2*(A+C+-1B)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^3//2*(C+-9B+17A)*sin(c+d*x)+-1//48*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(-147B+27C+299A)*sin(c+d*x)+1//48*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^3//2*(-39B+15C+95A)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-75B+19C+163A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^(1/2)*(A+C+-1B)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^(1/2)*(-5B+-3C+13A)*sin(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^(1/2)*(C+-9B+49A)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-19B+-5C+75A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-1//2*(A+C+-1B)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-1//2*(-1B+-7C+9A)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5B+19A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-3//2*(A+C+-1B)*sin(c+d*x)+2*C*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-1//2*(-11C+3B+5A)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-43C+3B+5A)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-5//2*(A+C+-1B)*sin(c+d*x)+a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-5C+2B)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-3//2*(A+-15C+7B)*sin(c+d*x)+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-11B+3A+35C)*sin(c+d*x)+1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-43B+3A+115C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate((a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//4*d^-1*(a+a*cos(c+d*x))^-5//2*sec(c+d*x)^-7//2*(A+C+-1B)*sin(c+d*x)+-1//16*a^-1*d^-1*(a+a*cos(c+d*x))^-3//2*sec(c+d*x)^-5//2*(-11B+3A+19C)*sin(c+d*x)+-1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-1//2*(-35B+11A+63C)*sin(c+d*x)+1//4*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-20B+8A+39C)*arcsin(a^(1/2)*(a+a*cos(c+d*x))^-1//2*sin(c+d*x))+1//16*a^-2*d^-1*(a+a*cos(c+d*x))^-1//2*sec(c+d*x)^-3//2*(-15B+7A+31C)*sin(c+d*x)+-1//32*2^(1/2)*a^-5//2*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-115B+43A+219C)*arctan((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(c+d*x))^-1//2*cos(c+d*x)^-1//2*sin(c+d*x)))
@test integrate(sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2//5*A*b*d^-1*sec(c+d*x)^5//2*sin(c+d*x)+2//5*b*d^-1*sec(c+d*x)^(1/2)*(3A+5C)*sin(c+d*x)+2//7*A*a*d^-1*sec(c+d*x)^7//2*sin(c+d*x)+2//21*a*d^-1*sec(c+d*x)^3//2*(5A+7C)*sin(c+d*x)+-2//5*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2//3*A*b*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+2//5*A*a*d^-1*sec(c+d*x)^5//2*sin(c+d*x)+2//5*a*d^-1*sec(c+d*x)^(1/2)*(3A+5C)*sin(c+d*x)+-2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2*A*b*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+2//3*A*a*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+-2*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2*A*a*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+2//3*C*b*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+-2*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2//3*C*a*d^-1*sec(c+d*x)^-1//2*sin(c+d*x)+2//5*C*b*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//5*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2//5*C*a*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+2//7*C*b*d^-1*sec(c+d*x)^-5//2*sin(c+d*x)+2//21*b*d^-1*sec(c+d*x)^-1//2*(5C+7A)*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate(sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2)*(a+b*cos(c+d*x)), x) == :(2//7*C*a*d^-1*sec(c+d*x)^-5//2*sin(c+d*x)+2//9*C*b*d^-1*sec(c+d*x)^-7//2*sin(c+d*x)+2//21*a*d^-1*sec(c+d*x)^-1//2*(5C+7A)*sin(c+d*x)+2//45*b*d^-1*sec(c+d*x)^-3//2*(7C+9A)*sin(c+d*x)+2//15*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(1//15*d^-1*sec(c+d*x)^(1/2)*(2*a^2*(7A+9C)+6*b^2*(3A+5C))*sin(c+d*x)+1//45*d^-1*sec(c+d*x)^5//2*(2*a^2*(7A+9C)+8*A*b^2)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-6*b^2*(3A+5C)+-2*a^2*(7A+9C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//9*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^9//2*sin(c+d*x)+4//21*a*b*d^-1*sec(c+d*x)^3//2*(5A+7C)*sin(c+d*x)+8//63*A*a*b*d^-1*sec(c+d*x)^7//2*sin(c+d*x)+4//21*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5A+7C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(1//21*d^-1*sec(c+d*x)^3//2*(2*a^2*(5A+7C)+8*A*b^2)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*a^2*(5A+7C)+14*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^7//2*sin(c+d*x)+4//5*a*b*d^-1*sec(c+d*x)^(1/2)*(3A+5C)*sin(c+d*x)+8//35*A*a*b*d^-1*sec(c+d*x)^5//2*sin(c+d*x)+-4//5*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3A+5C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(1//5*d^-1*sec(c+d*x)^(1/2)*(2*a^2*(3A+5C)+8*A*b^2)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*b^2*(A+-1C)+-2*a^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//5*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^5//2*sin(c+d*x)+8//15*A*a*b*d^-1*sec(c+d*x)^3//2*sin(c+d*x)+4//3*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+3C)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-2//3*b^2*d^-1*sec(c+d*x)^-1//2*(A+-1C)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*a^2*(A+3C)+2*b^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3//2*sin(c+d*x)+8//3*A*a*b*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+-4*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(A+-1C)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^(1/2)*sin(c+d*x)+-2//5*b^2*d^-1*sec(c+d*x)^-3//2*(-1C+5A)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*a^2*(A+-1C)+2*b^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-4//3*a*b*d^-1*sec(c+d*x)^-1//2*(-1C+3A)*sin(c+d*x)+4//3*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(C+3A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//21*d^-1*sec(c+d*x)^-1//2*(2*b^2*(5C+7A)+8*C*a^2)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*b^2*(5C+7A)+14*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*C*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*sin(c+d*x)+8//35*C*a*b*d^-1*sec(c+d*x)^-3//2*sin(c+d*x)+4//5*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3C+5A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//45*d^-1*sec(c+d*x)^-3//2*(2*b^2*(7C+9A)+8*C*a^2)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*b^2*(7C+9A)+6*a^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//9*C*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-3//2*sin(c+d*x)+4//21*a*b*d^-1*sec(c+d*x)^-1//2*(5C+7A)*sin(c+d*x)+8//63*C*a*b*d^-1*sec(c+d*x)^-5//2*sin(c+d*x)+4//21*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5C+7A)*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(1//77*d^-1*sec(c+d*x)^-5//2*(2*b^2*(9C+11A)+8*C*a^2)*sin(c+d*x)+1//231*d^-1*sec(c+d*x)^-1//2*(10*b^2*(9C+11A)+22*a^2*(5C+7A))*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*b^2*(9C+11A)+22*a^2*(5C+7A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//11*C*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-5//2*sin(c+d*x)+4//45*a*b*d^-1*sec(c+d*x)^-3//2*(7C+9A)*sin(c+d*x)+8//99*C*a*b*d^-1*sec(c+d*x)^-7//2*sin(c+d*x)+4//15*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7C+9A)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^9//2*sin(c+d*x)+2//15*a*d^-1*sec(c+d*x)^(1/2)*(a^2*(7A+9C)+9*b^2*(3A+5C))*sin(c+d*x)+2//63*b*d^-1*sec(c+d*x)^3//2*(8*A*b^2+9*a^2*(5A+7C))*sin(c+d*x)+2//315*a*d^-1*sec(c+d*x)^5//2*(7*a^2*(7A+9C)+24*A*b^2)*sin(c+d*x)+-2//15*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(a^2*(7A+9C)+9*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3*a^2*(5A+7C)+7*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//21*A*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^7//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^7//2*sin(c+d*x)+2//105*a*d^-1*sec(c+d*x)^3//2*(5*a^2*(5A+7C)+24*A*b^2)*sin(c+d*x)+6//35*b*d^-1*sec(c+d*x)^(1/2)*(7*a^2*(3A+5C)+8*A*b^2)*sin(c+d*x)+-2//5*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3*a^2*(3A+5C)+5*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(a^2*(5A+7C)+21*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+12//35*A*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(-2//15*b^3*d^-1*sec(c+d*x)^-1//2*(-5C+9A)*sin(c+d*x)+2//5*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^5//2*sin(c+d*x)+2//5*a*d^-1*sec(c+d*x)^(1/2)*(a^2*(3A+5C)+8*A*b^2)*sin(c+d*x)+-2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(a^2*(3A+5C)+15*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(b^2*(C+3A)+3*a^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//5*A*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-2//15*b^3*d^-1*sec(c+d*x)^-3//2*(-3C+35A)*sin(c+d*x)+2//3*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^3//2*sin(c+d*x)+-2*a*b^2*d^-1*sec(c+d*x)^-1//2*(-1C+5A)*sin(c+d*x)+4*A*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^(1/2)*sin(c+d*x)+-2//5*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1*b^2*(3C+5A)+15*a^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(a^2*(A+3C)+3*b^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^(1/2)*sin(c+d*x)+-2//21*b*d^-1*sec(c+d*x)^-1//2*(-1*b^2*(5C+7A)+6*a^2*(-3C+7A))*sin(c+d*x)+-2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-3*b^2*(3C+5A)+5*a^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-2//7*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(-1C+7A)*sin(c+d*x)+-2//35*a*b^2*d^-1*sec(c+d*x)^-3//2*(-11C+35A)*sin(c+d*x)+2//21*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(b^2*(5C+7A)+21*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(2//9*C*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-1//2*sin(c+d*x)+2//63*a*d^-1*sec(c+d*x)^-1//2*(8*C*a^2+45*C*b^2+63*A*b^2)*sin(c+d*x)+2//315*b*d^-1*sec(c+d*x)^-3//2*(7*b^2*(7C+9A)+24*C*a^2)*sin(c+d*x)+2//15*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(b^2*(7C+9A)+9*a^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//21*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(3*b^2*(5C+7A)+7*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//21*C*a*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(2//11*C*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-3//2*sin(c+d*x)+2//165*a*d^-1*sec(c+d*x)^-3//2*(8*C*a^2+77*C*b^2+99*A*b^2)*sin(c+d*x)+2//231*b*d^-1*sec(c+d*x)^-5//2*(3*b^2*(9C+11A)+8*C*a^2)*sin(c+d*x)+2//231*b*d^-1*sec(c+d*x)^-1//2*(5*b^2*(9C+11A)+33*a^2*(5C+7A))*sin(c+d*x)+2//5*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(a^2*(3C+5A)+b^2*(7C+9A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//231*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5*b^2*(9C+11A)+33*a^2*(5C+7A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+4//33*C*a*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^-3//2*(A+C*cos(c+d*x)^2), x) == :(2//13*C*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-5//2*sin(c+d*x)+2//231*a*d^-1*sec(c+d*x)^-1//2*(11*a^2*(5C+7A)+15*b^2*(9C+11A))*sin(c+d*x)+2//585*b*d^-1*sec(c+d*x)^-3//2*(7*b^2*(11C+13A)+39*a^2*(7C+9A))*sin(c+d*x)+2//1287*b*d^-1*sec(c+d*x)^-7//2*(11*b^2*(11C+13A)+24*C*a^2)*sin(c+d*x)+6//1001*a*d^-1*sec(c+d*x)^-5//2*(8*C*a^2+117*C*b^2+143*A*b^2)*sin(c+d*x)+2//195*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(7*b^2*(11C+13A)+39*a^2*(7C+9A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//231*a*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(11*a^2*(5C+7A)+15*b^2*(9C+11A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+12//143*C*a*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^13//2*(A+C*cos(c+d*x)^2), x) == :(1//693*d^-1*sec(c+d*x)^3//2*(30*a^4*(9A+11C)+128*A*b^4+18*a^2*b^2*(101A+143C))*sin(c+d*x)+1//231*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^7//2*(6*a^2*(9A+11C)+32*A*b^2)*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*a^4*(9A+11C)+154*b^4*(A+3C)+132*a^2*b^2*(5A+7C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//11*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^11//2*sin(c+d*x)+4//3465*a*b*d^-1*sec(c+d*x)^5//2*(a^2*(673A+891C)+96*A*b^2)*sin(c+d*x)+8//15*a*b*d^-1*sec(c+d*x)^(1/2)*(a^2*(7A+9C)+3*b^2*(3A+5C))*sin(c+d*x)+16//99*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^9//2*sin(c+d*x)+-8//15*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(a^2*(7A+9C)+3*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(1//315*d^-1*sec(c+d*x)^(1/2)*(42*a^4*(7A+9C)+384*A*b^4+14*a^2*b^2*(155A+261C))*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-30*b^4*(A+-1C)+-2*a^4*(7A+9C)+-36*a^2*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//315*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^5//2*(14*a^2*(7A+9C)+96*A*b^2)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^9//2*sin(c+d*x)+4//315*a*b*d^-1*sec(c+d*x)^3//2*(a^2*(101A+147C)+32*A*b^2)*sin(c+d*x)+16//63*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^7//2*sin(c+d*x)+8//21*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(a^2*(5A+7C)+7*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(-2//105*b^2*d^-1*sec(c+d*x)^-1//2*(b^2*(-35C+87A)+5*a^2*(5A+7C))*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*a^4*(5A+7C)+14*b^4*(C+3A)+84*a^2*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//105*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3//2*(10*a^2*(5A+7C)+96*A*b^2)*sin(c+d*x)+2//7*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^7//2*sin(c+d*x)+4//105*a*b*d^-1*sec(c+d*x)^(1/2)*(a^2*(101A+175C)+96*A*b^2)*sin(c+d*x)+16//35*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^5//2*sin(c+d*x)+-8//5*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(a^2*(3A+5C)+5*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(-2//15*b^2*d^-1*sec(c+d*x)^-3//2*(b^2*(-3C+59A)+3*a^2*(3A+5C))*sin(c+d*x)+1//5*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^(1/2)*(2*a^2*(3A+5C)+32*A*b^2)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-2*a^4*(3A+5C)+2*b^4*(3C+5A)+-60*a^2*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//5*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^5//2*sin(c+d*x)+-4//15*a*b*d^-1*sec(c+d*x)^-1//2*(2*b^2*(-5C+33A)+3*a^2*(3A+5C))*sin(c+d*x)+16//15*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^3//2*sin(c+d*x)+8//3*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(a^2*(A+3C)+b^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(-2//21*b^2*d^-1*sec(c+d*x)^-1//2*(-1*b^2*(5C+7A)+3*a^2*(-13C+49A))*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*b^4*(5C+7A)+14*a^4*(A+3C)+84*a^2*b^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^3//2*sin(c+d*x)+-4//105*a*b^3*d^-1*sec(c+d*x)^-3//2*(-27C+175A)*sin(c+d*x)+-2//7*b^2*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(-1C+21A)*sin(c+d*x)+16//3*A*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^(1/2)*sin(c+d*x)+-8//5*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-1*b^2*(3C+5A)+5*a^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^(1/2)*sin(c+d*x)+-2//315*b^2*d^-1*sec(c+d*x)^-3//2*(-7*b^2*(7C+9A)+3*a^2*(-41C+105A))*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-30*a^4*(A+-1C)+2*b^4*(7C+9A)+36*a^2*b^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-4//63*a*b*d^-1*sec(c+d*x)^-1//2*(a^2*(-31C+63A)+-6*b^2*(5C+7A))*sin(c+d*x)+-2//9*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-1//2*(-1C+9A)*sin(c+d*x)+-2//21*a*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(-5C+21A)*sin(c+d*x)+8//21*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(b^2*(5C+7A)+7*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//693*d^-1*sec(c+d*x)^-1//2*(30*b^4*(9C+11A)+128*C*a^4+18*a^2*b^2*(101C+143A))*sin(c+d*x)+1//231*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(6*b^2*(9C+11A)+32*C*a^2)*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*b^4*(9C+11A)+154*a^4*(C+3A)+132*a^2*b^2*(5C+7A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//11*C*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^-1//2*sin(c+d*x)+4//3465*a*b*d^-1*sec(c+d*x)^-3//2*(96*C*a^2+673*C*b^2+891*A*b^2)*sin(c+d*x)+16//99*C*a*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-1//2*sin(c+d*x)+8//15*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(b^2*(7C+9A)+3*a^2*(3C+5A))*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^-1//2*(A+C*cos(c+d*x)^2), x) == :(1//6435*d^-1*sec(c+d*x)^-3//2*(154*b^4*(11C+13A)+384*C*a^4+22*a^2*b^2*(491C+637A))*sin(c+d*x)+1//195*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(14*b^4*(11C+13A)+78*a^4*(3C+5A)+156*a^2*b^2*(7C+9A))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//1287*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-3//2*(22*b^2*(11C+13A)+96*C*a^2)*sin(c+d*x)+2//13*C*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^-3//2*sin(c+d*x)+4//9009*a*b*d^-1*sec(c+d*x)^-5//2*(96*C*a^2+1259*C*b^2+1573*A*b^2)*sin(c+d*x)+8//231*a*b*d^-1*sec(c+d*x)^-1//2*(5*b^2*(9C+11A)+11*a^2*(5C+7A))*sin(c+d*x)+16//143*C*a*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-3//2*sin(c+d*x)+8//231*a*b*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(5*b^2*(9C+11A)+11*a^2*(5C+7A))*Elliptic.F((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*sin(c+d*x)+-1//315*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(-14*a^2*(7A+9C)+12*A*b^2)*sin(c+d*x)+2//63*A*b*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*sin(c+d*x)+2//315*b*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(a^2*(13A+21C)+8*A*b^2)*sin(c+d*x)+-1//315*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(16*A*b^3+21*a^3*(7A+9C)+6*b*a^2*(6A+7C)+12*A*a*b^2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//315*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2a+2b)*(-21*a^4*(7A+9C)+16*A*b^4+6*a^2*b^2*(4A+7C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*sin(c+d*x)+-1//105*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(-10*a^2*(5A+7C)+8*A*b^2)*sin(c+d*x)+2//35*A*b*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x)+1//105*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(5*a^2*(5A+7C)+8*A*b^2+6*A*a*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//105*b*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(a^2*(19A+35C)+8*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x)+2//15*A*b*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*sin(c+d*x)+-1//15*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(2*A*b+9*A*a+15*C*a)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2a+2b)*(-3*a^2*(3A+5C)+2*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+b*cos(c+d*x))^3//2*sec(c+d*x)^9//2*sin(c+d*x)+1//315*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(6*A*b^2+14*a^2*(7A+9C))*sin(c+d*x)+2//21*A*b*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*sin(c+d*x)+-4//315*b*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(-1*a^2*(44A+63C)+2*A*b^2)*sin(c+d*x)+1//315*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(8*A*b^4+21*a^4*(7A+9C)+3*a^2*b^2*(11A+21C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//315*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(a^2*(39*A*b+63*C*b)+-21*a^3*(7A+9C)+8*A*b^3+6*A*a*b^2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+b*cos(c+d*x))^3//2*sec(c+d*x)^7//2*sin(c+d*x)+1//105*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(6*A*b^2+10*a^2*(5A+7C))*sin(c+d*x)+6//35*A*b*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x)+1//105*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(-6*A*b^2+25*A*a^2+35*C*a^2+-105*C*a*b+-57*A*a*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//105*b*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-4a+4b)*(-1*a^2*(41A+70C)+3*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*sec(c+d*x)^13//2*(A+C*cos(c+d*x)^2), x) == :(1//231*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(6*a^2*(9A+11C)+10*A*b^2)*sin(c+d*x)+2//11*A*d^-1*(a+b*cos(c+d*x))^5//2*sec(c+d*x)^11//2*sin(c+d*x)+-1//693*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(-30*a^4*(9A+11C)+8*A*b^4+-2*a^2*b^2*(205A+297C))*sin(c+d*x)+10//99*A*b*d^-1*(a+b*cos(c+d*x))^3//2*sec(c+d*x)^9//2*sin(c+d*x)+2//693*b*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(a^2*(229A+297C)+3*A*b^2)*sin(c+d*x)+1//693*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(8*A*b^4+15*a^4*(9A+11C)+-6*b*a^3*(101A+132C)+3*a^2*b^2*(19A+33C)+6*A*a*b^3)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//693*b*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(a^4*(741A+957C)+8*A*b^4+3*a^2*b^2*(17A+33C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*sec(c+d*x)^11//2*(A+C*cos(c+d*x)^2), x) == :(1//315*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(14*a^2*(7A+9C)+30*A*b^2)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^5//2*sec(c+d*x)^9//2*sin(c+d*x)+10//63*A*b*d^-1*(a+b*cos(c+d*x))^3//2*sec(c+d*x)^7//2*sin(c+d*x)+2//315*b*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(a^2*(163A+231C)+5*A*b^2)*sin(c+d*x)+-1//315*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(10*A*b^3+21*a^3*(7A+9C)+-6*b*a^2*(19A+28C)+15*a*b^2*(11A+21C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//315*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2a+2b)*(-21*a^4*(7A+9C)+10*A*b^4+-3*a^2*b^2*(93A+161C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*sec(c+d*x)^9//2*(A+C*cos(c+d*x)^2), x) == :(1//105*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(10*a^2*(5A+7C)+48*A*b^2)*sin(c+d*x)+2//7*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*sin(c+d*x)+-12//35*A*b*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x)+-2//105*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-1*a^2*(44*A*b+70*C*b)+-48*A*b^3+-5*a^3*(5A+7C)+12*A*a*b^2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//105*b*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-4a+4b)*(a^2*(22A+35C)+24*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(2//5*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x)+-8//15*A*b*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*sin(c+d*x)+2//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-8*A*b^2+-3*a^2*(3A+5C)+2*A*a*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//15*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(3*a^2*(3A+5C)+8*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(2//3*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*sin(c+d*x)+2//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(a*(A+3C)+2*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+-4//3*A*b*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(a+-1b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*sec(c+d*x)^7//2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*sec(c+d*x)^5//2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+-1//5*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*sec(c+d*x)^5//2*(-2*a^2*(A+-5C)+12*A*b^2)*sin(c+d*x)+2//5*b*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*sec(c+d*x)^3//2*(-1*a^2*(-5C+3A)+8*A*b^2)*sin(c+d*x)+-1//5*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2*a^4*(3A+5C)+32*A*b^4+-4*a^2*b^2*(-5C+4A))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+-1//5*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(2*a^3*(3A+5C)+32*A*b^3+4*b*a^2*(2A+5C)+24*A*a*b^2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*sec(c+d*x)^3//2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+-1//3*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*sec(c+d*x)^3//2*(-2*a^2*(A+-3C)+8*A*b^2)*sin(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(2*a^2*(A+3C)+16*A*b^2+12*A*a*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+2//3*b*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-1*a^2*(-3C+5A)+8*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*sec(c+d*x)^(1/2)*(2*A*b^2+2*C*a^2)*sin(c+d*x)+-1*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2*a^2*(A+-1C)+4*A*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+-1*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(2*a*(A+-1C)+4*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*sec(c+d*x)^5//2*(A+C*cos(c+d*x)^2), x) == :(1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*sec(c+d*x)^3//2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+1//3*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*sec(c+d*x)^3//2*(2*a^4*(A+-5C)+16*A*b^4+-2*a^2*b^2*(-1C+13A))*sin(c+d*x)+1//3*a^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*sec(c+d*x)^3//2*(-12*A*b^4+8*C*a^4+20*A*a^2*b^2)*sin(c+d*x)+-1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2*a^3*(-3*C*b+9*A*b)+-2*a^4*(A+3C)+32*A*b^4+-4*a^2*b^2*(-1C+8A)+24*A*a*b^3)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+-4//3*b*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(a^4*(-3C+4A)+8*A*b^4+-1*a^2*b^2*(-1C+14A))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*sec(c+d*x)^3//2*(A+C*cos(c+d*x)^2), x) == :(-1//3*a^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*sec(c+d*x)^(1/2)*(-4*C*a^4+8*A*b^4+-4*a^2*b^2*(C+4A))*sin(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*sec(c+d*x)^(1/2)*(2*A*b^2+2*C*a^2)*sin(c+d*x)+1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(6*a^4*(A+-1C)+16*A*b^4+-2*a^2*b^2*(C+15A))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-6*a^3*(A+-1C)+16*A*b^3+-2*b*a^2*(C+9A)+12*A*a*b^2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*sec(c+d*x)^(1/2)*(A+C*cos(c+d*x)^2), x) == :(1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*sec(c+d*x)^-1//2*(2*A*b^2+2*C*a^2)*sin(c+d*x)+4//3*b*a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*sec(c+d*x)^(1/2)*(A*b^2+-1*a^2*(2C+3A))*sin(c+d*x)+-1//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2*a^2*(C+3A)+4*A*b^2+6*a*b*(A+C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+-4//3*b*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(A*b^2+-1*a^2*(2C+3A))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate(sec(c+d*x)^9//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*sec(c+d*x)^(1/2)*(6*A*b+6*B*a+10*C*b)*sin(c+d*x)+1//5*d^-1*sec(c+d*x)^5//2*(2*A*b+2*B*a)*sin(c+d*x)+1//21*d^-1*sec(c+d*x)^3//2*(10*A*a+14*B*b+14*C*a)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*C*b+-6*A*b+-6*B*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*A*a+14*B*b+14*C*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*A*a*d^-1*sec(c+d*x)^7//2*sin(c+d*x))
@test integrate(sec(c+d*x)^7//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*sec(c+d*x)^3//2*(2*A*b+2*B*a)*sin(c+d*x)+1//5*d^-1*sec(c+d*x)^(1/2)*(6*A*a+10*B*b+10*C*a)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*A*b+2*B*a+6*C*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*B*b+-10*C*a+-6*A*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//5*A*a*d^-1*sec(c+d*x)^5//2*sin(c+d*x))
@test integrate(sec(c+d*x)^5//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*sec(c+d*x)^(1/2)*(2*A*b+2*B*a)*sin(c+d*x)+d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-2*A*b+-2*B*a+2*C*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*a*(A+3C)+6*B*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*A*a*d^-1*sec(c+d*x)^3//2*sin(c+d*x))
@test integrate(sec(c+d*x)^3//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-2*a*(A+-1C)+2*B*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2*A*a*d^-1*sec(c+d*x)^(1/2)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*C*b+6*A*b+6*B*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*C*b*d^-1*sec(c+d*x)^-1//2*sin(c+d*x))
@test integrate(sec(c+d*x)^(1/2)*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*d^-1*sec(c+d*x)^-1//2*(2*B*b+2*C*a)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*B*b+2*a*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(6*C*b+10*A*b+10*B*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//5*C*b*d^-1*sec(c+d*x)^-3//2*sin(c+d*x))
@test integrate(sec(c+d*x)^-1//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*sec(c+d*x)^-3//2*(2*B*b+2*C*a)*sin(c+d*x)+1//21*d^-1*sec(c+d*x)^-1//2*(10*C*b+14*A*b+14*B*a)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(6*B*b+6*C*a+10*A*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*C*b+14*A*b+14*B*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*C*b*d^-1*sec(c+d*x)^-5//2*sin(c+d*x))
@test integrate(sec(c+d*x)^-3//2*(a+b*cos(c+d*x))*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//7*d^-1*sec(c+d*x)^-5//2*(2*B*b+2*C*a)*sin(c+d*x)+1//21*d^-1*sec(c+d*x)^-1//2*(10*B*b+10*C*a+14*A*a)*sin(c+d*x)+1//45*d^-1*sec(c+d*x)^-3//2*(14*C*b+18*A*b+18*B*a)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(14*C*b+18*A*b+18*B*a)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*B*b+10*C*a+14*A*a)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*C*b*d^-1*sec(c+d*x)^-7//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*sec(c+d*x)^(1/2)*(2*a^2*(7A+9C)+6*b^2*(3A+5C)+36*B*a*b)*sin(c+d*x)+1//21*d^-1*sec(c+d*x)^3//2*(10*B*a^2+14*B*b^2+20*A*a*b+28*C*a*b)*sin(c+d*x)+1//45*d^-1*sec(c+d*x)^5//2*(2*a^2*(7A+9C)+8*A*b^2+36*B*a*b)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-6*b^2*(3A+5C)+-2*a^2*(7A+9C)+-36*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*B*a^2+14*B*b^2+20*A*a*b+28*C*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^9//2*sin(c+d*x)+2//63*a*d^-1*sec(c+d*x)^7//2*(4*A*b+9*B*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*sec(c+d*x)^(1/2)*(6*B*a^2+10*B*b^2+12*A*a*b+20*C*a*b)*sin(c+d*x)+1//21*d^-1*sec(c+d*x)^3//2*(2*a^2*(5A+7C)+8*A*b^2+28*B*a*b)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*B*b^2+-6*B*a^2+-20*C*a*b+-12*A*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*a^2*(5A+7C)+14*b^2*(A+3C)+28*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^7//2*sin(c+d*x)+2//35*a*d^-1*sec(c+d*x)^5//2*(4*A*b+7*B*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//5*d^-1*sec(c+d*x)^(1/2)*(2*a^2*(3A+5C)+8*A*b^2+20*B*a*b)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*B*a^2+6*B*b^2+4*a*b*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*b^2*(A+-1C)+-2*a^2*(3A+5C)+-20*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//5*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^5//2*sin(c+d*x)+2//15*a*d^-1*sec(c+d*x)^3//2*(4*A*b+5*B*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-2*B*a^2+2*B*b^2+-4*a*b*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+-2//3*b^2*d^-1*sec(c+d*x)^-1//2*(A+-1C)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*a^2*(A+3C)+2*b^2*(C+3A)+12*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3//2*sin(c+d*x)+2//3*a*d^-1*sec(c+d*x)^(1/2)*(3*B*a+4*A*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^(1/2)*sin(c+d*x)+-2//3*b*d^-1*sec(c+d*x)^-1//2*(-1*B*b+-2*C*a+6*A*a)*sin(c+d*x)+-2//5*b^2*d^-1*sec(c+d*x)^-3//2*(-1C+5A)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*B*b^2+6*B*a^2+4*a*b*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*a^2*(A+-1C)+2*b^2*(3C+5A)+20*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//21*d^-1*sec(c+d*x)^-1//2*(8*C*a^2+10*C*b^2+14*A*b^2+28*B*a*b)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(6*B*b^2+10*B*a^2+12*C*a*b+20*A*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*b^2*(5C+7A)+14*a^2*(C+3A)+28*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//7*C*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*sin(c+d*x)+2//35*b*d^-1*sec(c+d*x)^-3//2*(4*C*a+7*B*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//21*d^-1*sec(c+d*x)^-1//2*(10*B*b^2+14*B*a^2+20*C*a*b+28*A*a*b)*sin(c+d*x)+1//45*d^-1*sec(c+d*x)^-3//2*(8*C*a^2+14*C*b^2+18*A*b^2+36*B*a*b)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*b^2*(7C+9A)+6*a^2*(3C+5A)+36*B*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*B*b^2+14*B*a^2+20*C*a*b+28*A*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*C*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-3//2*sin(c+d*x)+2//63*b*d^-1*sec(c+d*x)^-5//2*(4*C*a+9*B*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^2*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//45*d^-1*sec(c+d*x)^-3//2*(14*B*b^2+18*B*a^2+28*C*a*b+36*A*a*b)*sin(c+d*x)+1//77*d^-1*sec(c+d*x)^-5//2*(8*C*a^2+18*C*b^2+22*A*b^2+44*B*a*b)*sin(c+d*x)+1//231*d^-1*sec(c+d*x)^-1//2*(10*b^2*(9C+11A)+22*a^2*(5C+7A)+220*B*a*b)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(14*B*b^2+18*B*a^2+28*C*a*b+36*A*a*b)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*b^2*(9C+11A)+22*a^2*(5C+7A)+220*B*a*b)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//11*C*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-5//2*sin(c+d*x)+2//99*b*d^-1*sec(c+d*x)^-7//2*(4*C*a+11*B*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*sec(c+d*x)^(1/2)*(2*a^3*(7A+9C)+30*B*b^3+18*a*b^2*(3A+5C)+54*B*b*a^2)*sin(c+d*x)+1//63*d^-1*sec(c+d*x)^3//2*(16*A*b^3+30*B*a^3+18*b*a^2*(5A+7C)+108*B*a*b^2)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-30*B*b^3+-2*a^3*(7A+9C)+-54*B*b*a^2+-18*a*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^7//2*(4*A*b+6*B*a)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*B*a^3+14*b^3*(A+3C)+6*b*a^2*(5A+7C)+42*B*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^9//2*sin(c+d*x)+2//315*a*d^-1*sec(c+d*x)^5//2*(7*a^2*(7A+9C)+24*A*b^2+99*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*d^-1*sec(c+d*x)^(1/2)*(42*B*a^3+48*A*b^3+42*b*a^2*(3A+5C)+196*B*a*b^2)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*b^3*(A+-1C)+-6*B*a^3+-30*B*a*b^2+-6*b*a^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*a^3*(5A+7C)+42*B*b^3+42*B*b*a^2+42*a*b^2*(A+3C))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//35*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^5//2*(12*A*b+14*B*a)*sin(c+d*x)+2//7*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^7//2*sin(c+d*x)+2//105*a*d^-1*sec(c+d*x)^3//2*(5*a^2*(5A+7C)+24*A*b^2+63*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2//15*b^2*d^-1*sec(c+d*x)^-1//2*(-5*C*b+5*B*a+9*A*b)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*B*a^3+2*b^3*(C+3A)+6*b*a^2*(A+3C)+18*B*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-2*a^3*(3A+5C)+10*B*b^3+-30*B*b*a^2+-30*a*b^2*(A+-1C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//15*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3//2*(10*B*a+12*A*b)*sin(c+d*x)+2//5*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^5//2*sin(c+d*x)+2//15*a*d^-1*sec(c+d*x)^(1/2)*(3*a^2*(3A+5C)+24*A*b^2+35*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^(1/2)*(2*B*a+4*A*b)*sin(c+d*x)+-2//3*b*d^-1*sec(c+d*x)^-1//2*(-1*B*b^2+6*B*a^2+3*a*b*(-1C+5A))*sin(c+d*x)+-2//15*b^2*d^-1*sec(c+d*x)^-3//2*(-3*C*b+15*B*a+35*A*b)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*B*b^3+2*a^3*(A+3C)+6*a*b^2*(C+3A)+18*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*B*a^3+2*b^3*(3C+5A)+-30*b*a^2*(A+-1C)+30*B*a*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+2//3*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^3//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^(1/2)*sin(c+d*x)+-2//35*b^2*d^-1*sec(c+d*x)^-3//2*(-11*C*a+-7*B*b+35*A*a)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*a^3*(A+-1C)+6*B*b^3+6*a*b^2*(3C+5A)+30*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*b^3*(5C+7A)+42*B*a^3+42*B*a*b^2+42*b*a^2*(C+3A))*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//21*b*d^-1*sec(c+d*x)^-1//2*(b^2*(5C+7A)+-6*a^2*(-3C+7A)+21*B*a*b)*sin(c+d*x)+-2//7*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(-1C+7A)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//63*d^-1*sec(c+d*x)^-1//2*(16*C*a^3+30*B*b^3+18*a*b^2*(5C+7A)+108*B*b*a^2)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*b^3*(7C+9A)+30*B*a^3+18*b*a^2*(3C+5A)+54*B*a*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(4*C*a+6*B*b)*sin(c+d*x)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*B*b^3+14*a^3*(C+3A)+6*a*b^2*(5C+7A)+42*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//9*C*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-1//2*sin(c+d*x)+2//315*b*d^-1*sec(c+d*x)^-3//2*(24*C*a^2+49*C*b^2+63*A*b^2+99*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//231*d^-1*sec(c+d*x)^-1//2*(10*b^3*(9C+11A)+154*B*a^3+66*b*a^2*(5C+7A)+330*B*a*b^2)*sin(c+d*x)+1//495*d^-1*sec(c+d*x)^-3//2*(48*C*a^3+154*B*b^3+66*a*b^2*(7C+9A)+484*B*b*a^2)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(6*a^3*(3C+5A)+14*B*b^3+6*a*b^2*(7C+9A)+54*B*b*a^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//99*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-3//2*(12*C*a+22*B*b)*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*b^3*(9C+11A)+154*B*a^3+66*b*a^2*(5C+7A)+330*B*a*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//11*C*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-3//2*sin(c+d*x)+2//693*b*d^-1*sec(c+d*x)^-5//2*(24*C*a^2+81*C*b^2+99*A*b^2+143*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^3*sec(c+d*x)^-3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//231*d^-1*sec(c+d*x)^-1//2*(22*a^3*(5C+7A)+90*B*b^3+30*a*b^2*(9C+11A)+330*B*b*a^2)*sin(c+d*x)+1//585*d^-1*sec(c+d*x)^-3//2*(14*b^3*(11C+13A)+234*B*a^3+78*b*a^2*(7C+9A)+546*B*a*b^2)*sin(c+d*x)+1//1001*d^-1*sec(c+d*x)^-5//2*(48*C*a^3+234*B*b^3+78*a*b^2*(9C+11A)+676*B*b*a^2)*sin(c+d*x)+1//143*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-5//2*(12*C*a+26*B*b)*sin(c+d*x)+1//195*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(14*b^3*(11C+13A)+234*B*a^3+78*b*a^2*(7C+9A)+546*B*a*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(22*a^3*(5C+7A)+90*B*b^3+30*a*b^2*(9C+11A)+330*B*b*a^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//13*C*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-5//2*sin(c+d*x)+2//1287*b*d^-1*sec(c+d*x)^-7//2*(24*C*a^2+121*C*b^2+143*A*b^2+195*B*a*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^13//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//15*d^-1*sec(c+d*x)^(1/2)*(14*B*a^4+30*B*b^4+8*b*a^3*(7A+9C)+24*a*b^3*(3A+5C)+108*B*a^2*b^2)*sin(c+d*x)+1//693*d^-1*sec(c+d*x)^3//2*(30*a^4*(9A+11C)+128*A*b^4+18*a^2*b^2*(101A+143C)+1320*B*b*a^3+1364*B*a*b^3)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-30*B*b^4+-14*B*a^4+-108*B*a^2*b^2+-24*a*b^3*(3A+5C)+-8*b*a^3*(7A+9C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//99*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^9//2*(16*A*b+22*B*a)*sin(c+d*x)+1//231*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^7//2*(6*a^2*(9A+11C)+32*A*b^2+110*B*a*b)*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*a^4*(9A+11C)+154*b^4*(A+3C)+132*a^2*b^2*(5A+7C)+440*B*b*a^3+616*B*a*b^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//11*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^11//2*sin(c+d*x)+2//3465*a*d^-1*sec(c+d*x)^5//2*(192*A*b^3+539*B*a^3+2*b*a^2*(673A+891C)+1353*B*a*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//315*d^-1*sec(c+d*x)^(1/2)*(42*a^4*(7A+9C)+384*A*b^4+14*a^2*b^2*(155A+261C)+1512*B*b*a^3+2196*B*a*b^3)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-30*b^4*(A+-1C)+-2*a^4*(7A+9C)+-120*B*a*b^3+-72*B*b*a^3+-36*a^2*b^2*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*B*a^4+42*B*b^4+8*b*a^3*(5A+7C)+56*a*b^3*(A+3C)+84*B*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//63*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^7//2*(16*A*b+18*B*a)*sin(c+d*x)+1//315*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^5//2*(14*a^2*(7A+9C)+96*A*b^2+234*B*a*b)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^9//2*sin(c+d*x)+2//315*a*d^-1*sec(c+d*x)^3//2*(a^2*(202*A*b+294*C*b)+64*A*b^3+75*B*a^3+261*B*a*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2//105*b^2*d^-1*sec(c+d*x)^-1//2*(b^2*(-35C+87A)+5*a^2*(5A+7C)+98*B*a*b)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-6*B*a^4+10*B*b^4+-60*B*a^2*b^2+-40*a*b^3*(A+-1C)+-8*b*a^3*(3A+5C))*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*a^4*(5A+7C)+14*b^4*(C+3A)+56*B*b*a^3+84*a^2*b^2*(A+3C)+168*B*a*b^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//35*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^5//2*(14*B*a+16*A*b)*sin(c+d*x)+1//105*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^3//2*(10*a^2*(5A+7C)+96*A*b^2+154*B*a*b)*sin(c+d*x)+2//7*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^7//2*sin(c+d*x)+2//105*a*d^-1*sec(c+d*x)^(1/2)*(a^2*(202*A*b+350*C*b)+63*B*a^3+192*A*b^3+413*B*a*b^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2//15*b*d^-1*sec(c+d*x)^-1//2*(-5*B*b^3+6*a^3*(3A+5C)+4*a*b^2*(-5C+33A)+105*B*b*a^2)*sin(c+d*x)+-2//15*b^2*d^-1*sec(c+d*x)^-3//2*(b^2*(-3C+59A)+3*a^2*(3A+5C)+50*B*a*b)*sin(c+d*x)+1//3*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*B*a^4+2*B*b^4+8*a*b^3*(C+3A)+8*b*a^3*(A+3C)+36*B*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//5*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^(1/2)*(2*a^2*(3A+5C)+32*A*b^2+30*B*a*b)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-2*a^4*(3A+5C)+2*b^4*(3C+5A)+-60*a^2*b^2*(A+-1C)+-40*B*b*a^3+40*B*a*b^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//15*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^3//2*(10*B*a+16*A*b)*sin(c+d*x)+2//5*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^5//2*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-2//21*b*d^-1*sec(c+d*x)^-1//2*(-1*b^3*(5C+7A)+42*B*a^3+-28*B*a*b^2+3*b*a^2*(-13C+49A))*sin(c+d*x)+-2//105*b^2*d^-1*sec(c+d*x)^-3//2*(-21*B*b^2+105*B*a^2+-54*C*a*b+350*A*a*b)*sin(c+d*x)+1//3*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^(1/2)*(6*B*a+16*A*b)*sin(c+d*x)+1//5*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-10*B*a^4+6*B*b^4+-40*b*a^3*(A+-1C)+8*a*b^3*(3C+5A)+60*B*a^2*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(2*b^4*(5C+7A)+14*a^4*(A+3C)+56*B*a*b^3+84*a^2*b^2*(C+3A)+168*B*b*a^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//3*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^3//2*sin(c+d*x)+-2//7*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(-1*C*b+7*B*a+21*A*b)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2*A*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^(1/2)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(-30*a^4*(A+-1C)+2*b^4*(7C+9A)+36*a^2*b^2*(3C+5A)+72*B*a*b^3+120*B*b*a^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//21*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*B*b^4+42*B*a^4+8*a*b^3*(5C+7A)+56*b*a^3*(C+3A)+84*B*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//63*b*d^-1*sec(c+d*x)^-1//2*(-1*a^3*(-62C+126A)+15*B*b^3+12*a*b^2*(5C+7A)+117*B*b*a^2)*sin(c+d*x)+2//315*b^2*d^-1*sec(c+d*x)^-3//2*(-1*a^2*(-123C+315A)+7*b^2*(7C+9A)+162*B*a*b)*sin(c+d*x)+-2//9*b*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-1//2*(-1C+9A)*sin(c+d*x)+-2//21*b*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(-5*C*a+-3*B*b+21*A*a)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//693*d^-1*sec(c+d*x)^-1//2*(30*b^4*(9C+11A)+128*C*a^4+18*a^2*b^2*(101C+143A)+1320*B*a*b^3+1364*B*b*a^3)*sin(c+d*x)+1//15*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(14*B*b^4+30*B*a^4+8*a*b^3*(7C+9A)+24*b*a^3*(3C+5A)+108*B*a^2*b^2)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//99*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-1//2*(16*C*a+22*B*b)*sin(c+d*x)+1//231*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-1//2*(32*C*a^2+54*C*b^2+66*A*b^2+110*B*a*b)*sin(c+d*x)+1//231*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(10*b^4*(9C+11A)+154*a^4*(C+3A)+132*a^2*b^2*(5C+7A)+440*B*a*b^3+616*B*b*a^3)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+2//11*C*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^-1//2*sin(c+d*x)+2//3465*b*d^-1*sec(c+d*x)^-3//2*(192*C*a^3+539*B*b^3+2*a*b^2*(673C+891A)+1353*B*b*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^4*sec(c+d*x)^-1//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//231*d^-1*sec(c+d*x)^-1//2*(90*B*b^4+154*B*a^4+40*a*b^3*(9C+11A)+88*b*a^3*(5C+7A)+660*B*a^2*b^2)*sin(c+d*x)+1//6435*d^-1*sec(c+d*x)^-3//2*(154*b^4*(11C+13A)+384*C*a^4+22*a^2*b^2*(491C+637A)+6916*B*b*a^3+8008*B*a*b^3)*sin(c+d*x)+1//143*d^-1*(a+b*cos(c+d*x))^3*sec(c+d*x)^-3//2*(16*C*a+26*B*b)*sin(c+d*x)+1//195*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(14*b^4*(11C+13A)+78*a^4*(3C+5A)+156*a^2*b^2*(7C+9A)+728*B*a*b^3+936*B*b*a^3)*Elliptic.E((1/2)*c+(1/2)*d*x,2)+1//231*d^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^(1/2)*(90*B*b^4+154*B*a^4+40*a*b^3*(9C+11A)+88*b*a^3*(5C+7A)+660*B*a^2*b^2)*Elliptic.F((1/2)*c+(1/2)*d*x,2)+1//1287*d^-1*(a+b*cos(c+d*x))^2*sec(c+d*x)^-3//2*(96*C*a^2+242*C*b^2+286*A*b^2+442*B*a*b)*sin(c+d*x)+2//13*C*d^-1*(a+b*cos(c+d*x))^4*sec(c+d*x)^-3//2*sin(c+d*x)+2//9009*b*d^-1*sec(c+d*x)^-5//2*(192*C*a^3+1053*B*b^3+2*a*b^2*(1259C+1573A)+2171*B*b*a^2)*sin(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//9*A*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*sin(c+d*x)+-1//315*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(-14*a^2*(7A+9C)+12*A*b^2+-18*B*a*b)*sin(c+d*x)+1//63*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(2*A*b+18*B*a)*sin(c+d*x)+1//315*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(16*A*b^3+150*B*a^3+-24*B*a*b^2+2*b*a^2*(13A+21C))*sin(c+d*x)+-1//315*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(3*a^3*(-25B+49A+63C)+16*A*b^3+6*b*a^2*(-3B+6A+7C)+12*a*b^2*(A+-2B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//315*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2a+2b)*(-21*a^4*(7A+9C)+16*A*b^4+-57*B*b*a^3+-24*B*a*b^3+6*a^2*b^2*(4A+7C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//7*A*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*sin(c+d*x)+-1//105*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(-10*a^2*(5A+7C)+8*A*b^2+-14*B*a*b)*sin(c+d*x)+1//35*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(2*A*b+14*B*a)*sin(c+d*x)+1//105*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(8*A*b^3+63*B*a^3+b*a^2*(19A+35C)+-14*B*a*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//105*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(a^2*(-63B+25A+35C)+8*A*b^2+2*a*b*(-7B+3A))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//5*A*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x)+1//15*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(2*A*b+10*B*a)*sin(c+d*x)+-1//15*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(a*(-5B+9A+15C)+2*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2a+2b)*(-3*a^2*(3A+5C)+2*A*b^2+-5*B*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//21*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(2*A*b+6*B*a)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^3//2*sec(c+d*x)^9//2*sin(c+d*x)+-1//315*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(-150*B*a^3+8*A*b^3+-18*B*a*b^2+-4*b*a^2*(44A+63C))*sin(c+d*x)+1//315*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(6*A*b^2+14*a^2*(7A+9C)+144*B*a*b)*sin(c+d*x)+1//315*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(8*A*b^4+21*a^4*(7A+9C)+-18*B*a*b^3+3*a^2*b^2*(11A+21C)+246*B*b*a^3)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//315*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(-3*a^3*(-25B+49A+63C)+8*A*b^3+3*b*a^2*(-57B+13A+21C)+6*a*b^2*(A+-3B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^3//2*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//35*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(6*A*b+14*B*a)*sin(c+d*x)+2//7*A*d^-1*(a+b*cos(c+d*x))^3//2*sec(c+d*x)^7//2*sin(c+d*x)+1//105*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(6*A*b^2+10*a^2*(5A+7C)+84*B*a*b)*sin(c+d*x)+-1//105*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(-1*a^2*(-63B+25A+35C)+6*A*b^2+3*a*b*(-7B+19A+35C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//105*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2a+2b)*(-63*B*a^3+6*A*b^3+-21*B*a*b^2+-2*b*a^2*(41A+70C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*sec(c+d*x)^13//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//99*d^-1*(a+b*cos(c+d*x))^3//2*sec(c+d*x)^9//2*(10*A*b+22*B*a)*sin(c+d*x)+1//231*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*(6*a^2*(9A+11C)+10*A*b^2+88*B*a*b)*sin(c+d*x)+2//11*A*d^-1*(a+b*cos(c+d*x))^5//2*sec(c+d*x)^11//2*sin(c+d*x)+-1//3465*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(-150*a^4*(9A+11C)+40*A*b^4+-3586*B*b*a^3+-110*B*a*b^3+-10*a^2*b^2*(205A+297C))*sin(c+d*x)+1//3465*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(30*A*b^3+1078*B*a^3+10*b*a^2*(229A+297C)+1650*B*a*b^2)*sin(c+d*x)+1//3465*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(40*A*b^5+1617*B*a^5+-110*B*a*b^4+15*b*a^4*(247A+319C)+15*a^2*b^3*(17A+33C)+3069*B*a^3*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//3465*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(3*a^4*(-539B+225A+275C)+40*A*b^4+-6*b*a^3*(-209B+505A+660C)+10*a*b^3*(-11B+3A)+15*a^2*b^2*(-121B+19A+33C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^5//2*sec(c+d*x)^11//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//63*d^-1*(a+b*cos(c+d*x))^3//2*sec(c+d*x)^7//2*(10*A*b+18*B*a)*sin(c+d*x)+1//315*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(14*a^2*(7A+9C)+30*A*b^2+180*B*a*b)*sin(c+d*x)+2//9*A*d^-1*(a+b*cos(c+d*x))^5//2*sec(c+d*x)^9//2*sin(c+d*x)+1//315*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(10*A*b^3+150*B*a^3+2*b*a^2*(163A+231C)+270*B*a*b^2)*sin(c+d*x)+-1//315*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(3*a^3*(-25B+49A+63C)+10*A*b^3+-6*b*a^2*(-60B+19A+28C)+15*a*b^2*(-3B+11A+21C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//315*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2a+2b)*(-21*a^4*(7A+9C)+10*A*b^4+-435*B*b*a^3+-45*B*a*b^3+-3*a^2*b^2*(93A+161C))*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*sec(c+d*x)^9//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//35*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*(-14*B*a+12*A*b)*sin(c+d*x)+1//105*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(10*a^2*(5A+7C)+48*A*b^2+-56*B*a*b)*sin(c+d*x)+2//7*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^7//2*sin(c+d*x)+2//105*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(a^3*(-63B+25A+35C)+48*A*b^3+-4*a*b^2*(3A+14B)+2*b*a^2*(7B+22A+35C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//105*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2a+2b)*(a^2*(44*A*b+70*C*b)+-63*B*a^3+48*A*b^3+-56*B*a*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//15*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*(-10*B*a+8*A*b)*sin(c+d*x)+2//5*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^5//2*sin(c+d*x)+-2//15*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(a^2*(-5B+9A+15C)+8*A*b^2+-2*a*b*(A+5B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//15*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2b+2a)*(3*a^2*(3A+5C)+8*A*b^2+-10*B*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-1//2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(2//3*A*a^-1*d^-1*(a+b*cos(c+d*x))^(1/2)*sec(c+d*x)^3//2*sin(c+d*x)+2//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(a*(A+-3B+3C)+2*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^(1/2)*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2a+2b)*(-3*B*a+2*A*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*sec(c+d*x)^7//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*sec(c+d*x)^5//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+-1//5*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*sec(c+d*x)^5//2*(-2*a^2*(A+-5C)+12*A*b^2+-10*B*a*b)*sin(c+d*x)+1//15*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*sec(c+d*x)^3//2*(-2*a^2*(-15*C*b+9*A*b)+10*B*a^3+48*A*b^3+-40*B*a*b^2)*sin(c+d*x)+-1//15*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-6*a^4*(3A+5C)+96*A*b^4+-80*B*a*b^3+-12*a^2*b^2*(-5C+4A)+50*B*b*a^3)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+-1//15*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(2*a^3*(-5B+9A+15C)+96*A*b^3+8*a*b^2*(-10B+9A)+12*b*a^2*(-5B+2A+5C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*sec(c+d*x)^3//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+-1//3*a^-2*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-1*sec(c+d*x)^3//2*(-2*a^2*(A+-3C)+8*A*b^2+-6*B*a*b)*sin(c+d*x)+1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2*a^2*(-3*C*b+5*A*b)+6*B*a^3+16*A*b^3+-12*B*a*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(2*a^2*(A+-3B+3C)+16*A*b^2+12*a*b*(A+-1B))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-3//2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-1*sec(c+d*x)^(1/2)*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+-1*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2*a^2*(A+-1C)+4*A*b^2+-2*B*a*b)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+-1*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(2*a*(A+-1B+-1C)+4*A*b)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*sec(c+d*x)^5//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*sec(c+d*x)^3//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+1//3*a^-3*d^-1*(a+b*cos(c+d*x))^(1/2)*(a^2+-1*b^2)^-2*sec(c+d*x)^3//2*(2*a^4*(A+-5C)+16*A*b^4+-8*B*a*b^3+-2*a^2*b^2*(-1C+13A)+16*B*b*a^3)*sin(c+d*x)+1//3*a^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*sec(c+d*x)^3//2*(-12*A*b^4+8*C*a^4+-14*B*b*a^3+6*B*a*b^3+20*A*a^2*b^2)*sin(c+d*x)+-1//3*a^-5*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-6*B*a^5+2*a^4*(-6*C*b+8*A*b)+32*A*b^5+-16*B*a*b^4+-4*a^2*b^3*(-1C+14A)+30*B*a^3*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+-1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2*a^4*(A+-3B+3C)+32*A*b^4+-6*b*a^3*(-1C+-3B+3A)+-4*a^2*b^2*(-1C+3B+8A)+8*a*b^3*(-2B+3A))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*sec(c+d*x)^3//2*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(-1//3*a^-2*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*sec(c+d*x)^(1/2)*(-4*C*a^4+8*A*b^4+-4*a^2*b^2*(C+4A)+-2*B*a*b^3+10*B*b*a^3)*sin(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*sec(c+d*x)^(1/2)*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+1//3*a^-4*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(6*a^4*(A+-1C)+16*A*b^4+-4*B*a*b^3+-2*a^2*b^2*(C+15A)+12*B*b*a^3)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-6*a^3*(A+-1B+-1C)+16*A*b^3+-2*b*a^2*(C+3B+9A)+4*a*b^2*(-1B+3A))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))
@test integrate((a+b*cos(c+d*x))^-5//2*sec(c+d*x)^(1/2)*(A+B*cos(c+d*x)+C*cos(c+d*x)^2), x) == :(1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-3//2*(a^2+-1*b^2)^-1*sec(c+d*x)^-1//2*(-2*a*(B*b+-1*C*a)+2*A*b^2)*sin(c+d*x)+1//3*a^-1*d^-1*(a+b*cos(c+d*x))^-1//2*(a^2+-1*b^2)^-2*sec(c+d*x)^(1/2)*(4*A*b^3+6*B*a^3+-4*b*a^2*(2C+3A)+2*B*a*b^2)*sin(c+d*x)+-1//3*a^-3*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(4*A*b^3+6*B*a^3+-4*b*a^2*(2C+3A)+2*B*a*b^2)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x)+-1//3*a^-2*d^-1*(a*(a+b)^-1*(1+-1*sec(c+d*x)))^(1/2)*(a*(a+-1b)^-1*(1+sec(c+d*x)))^(1/2)*(a+b)^-1//2*(a^2+-1*b^2)^-1*cos(c+d*x)^(1/2)*sec(c+d*x)^-1//2*(-2*a^2*(C+3A+3B)+4*A*b^2+2*a*b*(B+3A+3C))*Elliptic.F(arcsin((a+b)^-1//2*(a+b*cos(c+d*x))^(1/2)*cos(c+d*x)^-1//2),-1*(a+-1b)^-1*(a+b))*csc(c+d*x))

max_stars_repo_path: test/4 Trig functions/4.2 Cosine/4.2.4.2 (a+b cos)^m (c+d cos)^n (A+B cos+C cos^2).jl