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

@test integrate(2*(3+-1*cos(4+6x))^-1, x) == :((1/2)*x*2^(1/2)+1//6*2^(1/2)*arctan((3+-1*cos(4+6x)+2*2^(1/2))^-1*sin(4+6x)))
@test integrate(2*(-1*cot(4+6x)+3*csc(4+6x))^-1*csc(4+6x), x) == :((1/2)*x*2^(1/2)+1//6*2^(1/2)*arctan((3+-1*cos(4+6x)+2*2^(1/2))^-1*sin(4+6x)))
@test integrate((1+sin(2+3x)^2)^-1, x) == :((1/2)*x*2^(1/2)+1//6*2^(1/2)*arctan((1+2^(1/2)+sin(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate((2+-1*cos(2+3x)^2)^-1, x) == :((1/2)*x*2^(1/2)+1//6*2^(1/2)*arctan((1+2^(1/2)+sin(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate((cos(2+3x)^2+2*sin(2+3x)^2)^-1, x) == :((1/2)*x*2^(1/2)+1//6*2^(1/2)*arctan((1+2^(1/2)+sin(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate((1+2*tan(2+3x)^2)^-1*sec(2+3x)^2, x) == :((1/2)*x*2^(1/2)+1//6*2^(1/2)*arctan((1+2^(1/2)+sin(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate((2+cot(2+3x)^2)^-1*csc(2+3x)^2, x) == :((1/2)*x*2^(1/2)+1//6*2^(1/2)*arctan((1+2^(1/2)+sin(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate(2*(1+-3*cos(4+6x))^-1, x) == :(-1//12*2^(1/2)*log(2^(1/2)*sin(2+3x)+cos(2+3x))+1//12*2^(1/2)*log(-1*2^(1/2)*sin(2+3x)+cos(2+3x)))
@test integrate(2*(-3*cot(4+6x)+csc(4+6x))^-1*csc(4+6x), x) == :(-1//12*2^(1/2)*log(2^(1/2)*sin(2+3x)+cos(2+3x))+1//12*2^(1/2)*log(-1*2^(1/2)*sin(2+3x)+cos(2+3x)))
@test integrate((-1+3*sin(2+3x)^2)^-1, x) == :(-1//12*2^(1/2)*log(2^(1/2)*sin(2+3x)+cos(2+3x))+1//12*2^(1/2)*log(-1*2^(1/2)*sin(2+3x)+cos(2+3x)))
@test integrate((2+-3*cos(2+3x)^2)^-1, x) == :(-1//12*2^(1/2)*log(2^(1/2)*sin(2+3x)+cos(2+3x))+1//12*2^(1/2)*log(-1*2^(1/2)*sin(2+3x)+cos(2+3x)))
@test integrate((-1*cos(2+3x)^2+2*sin(2+3x)^2)^-1, x) == :(-1//12*2^(1/2)*log(2^(1/2)*sin(2+3x)+cos(2+3x))+1//12*2^(1/2)*log(-1*2^(1/2)*sin(2+3x)+cos(2+3x)))
@test integrate((-1+2*tan(2+3x)^2)^-1*sec(2+3x)^2, x) == :(-1//12*2^(1/2)*log(2^(1/2)*sin(2+3x)+cos(2+3x))+1//12*2^(1/2)*log(-1*2^(1/2)*sin(2+3x)+cos(2+3x)))
@test integrate((2+-1*cot(2+3x)^2)^-1*csc(2+3x)^2, x) == :(-1//12*2^(1/2)*log(2^(1/2)*sin(2+3x)+cos(2+3x))+1//12*2^(1/2)*log(-1*2^(1/2)*sin(2+3x)+cos(2+3x)))
@test integrate(2*(3+cos(4+6x))^-1, x) == :((1/2)*x*2^(1/2)+-1//6*2^(1/2)*arctan((3+2*2^(1/2)+cos(4+6x))^-1*sin(4+6x)))
@test integrate(2*(3*csc(4+6x)+cot(4+6x))^-1*csc(4+6x), x) == :((1/2)*x*2^(1/2)+-1//6*2^(1/2)*arctan((3+2*2^(1/2)+cos(4+6x))^-1*sin(4+6x)))
@test integrate((2+-1*sin(2+3x)^2)^-1, x) == :((1/2)*x*2^(1/2)+-1//6*2^(1/2)*arctan((1+2^(1/2)+cos(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate((1+cos(2+3x)^2)^-1, x) == :((1/2)*x*2^(1/2)+-1//6*2^(1/2)*arctan((1+2^(1/2)+cos(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate((sin(2+3x)^2+2*cos(2+3x)^2)^-1, x) == :((1/2)*x*2^(1/2)+-1//6*2^(1/2)*arctan((1+2^(1/2)+cos(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate((2+tan(2+3x)^2)^-1*sec(2+3x)^2, x) == :((1/2)*x*2^(1/2)+-1//6*2^(1/2)*arctan((1+2^(1/2)+cos(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate((1+2*cot(2+3x)^2)^-1*csc(2+3x)^2, x) == :((1/2)*x*2^(1/2)+-1//6*2^(1/2)*arctan((1+2^(1/2)+cos(2+3x)^2)^-1*cos(2+3x)*sin(2+3x)))
@test integrate(-2*(1+3*cos(4+6x))^-1, x) == :(-1//12*2^(1/2)*log(2^(1/2)*cos(2+3x)+sin(2+3x))+1//12*2^(1/2)*log(-1*sin(2+3x)+2^(1/2)*cos(2+3x)))
@test integrate(-2*(3*cot(4+6x)+csc(4+6x))^-1*csc(4+6x), x) == :(-1//12*2^(1/2)*log(2^(1/2)*cos(2+3x)+sin(2+3x))+1//12*2^(1/2)*log(-1*sin(2+3x)+2^(1/2)*cos(2+3x)))
@test integrate((-2+3*sin(2+3x)^2)^-1, x) == :(-1//12*2^(1/2)*log(2^(1/2)*cos(2+3x)+sin(2+3x))+1//12*2^(1/2)*log(-1*sin(2+3x)+2^(1/2)*cos(2+3x)))
@test integrate((1+-3*cos(2+3x)^2)^-1, x) == :(-1//12*2^(1/2)*log(2^(1/2)*cos(2+3x)+sin(2+3x))+1//12*2^(1/2)*log(-1*sin(2+3x)+2^(1/2)*cos(2+3x)))
@test integrate((sin(2+3x)^2+-2*cos(2+3x)^2)^-1, x) == :(-1//12*2^(1/2)*log(2^(1/2)*cos(2+3x)+sin(2+3x))+1//12*2^(1/2)*log(-1*sin(2+3x)+2^(1/2)*cos(2+3x)))
@test integrate((-2+tan(2+3x)^2)^-1*sec(2+3x)^2, x) == :(-1//12*2^(1/2)*log(2^(1/2)*cos(2+3x)+sin(2+3x))+1//12*2^(1/2)*log(-1*sin(2+3x)+2^(1/2)*cos(2+3x)))
@test integrate((1+-2*cot(2+3x)^2)^-1*csc(2+3x)^2, x) == :(-1//12*2^(1/2)*log(2^(1/2)*cos(2+3x)+sin(2+3x))+1//12*2^(1/2)*log(-1*sin(2+3x)+2^(1/2)*cos(2+3x)))
@test integrate((x+sin(x))^2, x) == :((1/2)*x+2*sin(x)+1//3*x^3+-2*x*cos(x)+-1//2*cos(x)*sin(x))
@test integrate((x+sin(x))^3, x) == :(5*cos(x)+1//3*cos(x)^3+1//4*x^4+3//4*x^2+3//4*sin(x)^2+-3*x^2*cos(x)+6*x*sin(x)+-3//2*x*cos(x)*sin(x))
@test integrate((c+d*x^2)^-1*sin(a+b*x), x) == :((1/2)*d^-1//2*(-1c)^-1//2*cosintegral(-1*b*x+b*d^-1//2*(-1c)^(1/2))*sin(a+b*d^-1//2*(-1c)^(1/2))+-1//2*d^-1//2*(-1c)^-1//2*cos(a+b*d^-1//2*(-1c)^(1/2))*sinintegral(-1*b*x+b*d^-1//2*(-1c)^(1/2))+-1//2*d^-1//2*(-1c)^-1//2*cos(a+-1*b*d^-1//2*(-1c)^(1/2))*sinintegral(b*x+b*d^-1//2*(-1c)^(1/2))+-1//2*d^-1//2*(-1c)^-1//2*cosintegral(b*x+b*d^-1//2*(-1c)^(1/2))*sin(a+-1*b*d^-1//2*(-1c)^(1/2)))
@test integrate((c+d*x+e*x^2)^-1*sin(a+b*x), x) == :((d^2+-4*c*e)^-1//2*cos(a+-1//2*b*e^-1*(d+-1*(d^2+-4*c*e)^(1/2)))*sinintegral(b*x+(1/2)*b*e^-1*(d+-1*(d^2+-4*c*e)^(1/2)))+(d^2+-4*c*e)^-1//2*cosintegral(b*x+(1/2)*b*e^-1*(d+-1*(d^2+-4*c*e)^(1/2)))*sin(a+-1//2*b*e^-1*(d+-1*(d^2+-4*c*e)^(1/2)))+-1*(d^2+-4*c*e)^-1//2*cos(a+-1//2*b*e^-1*(d+(d^2+-4*c*e)^(1/2)))*sinintegral(b*x+(1/2)*b*e^-1*(d+(d^2+-4*c*e)^(1/2)))+-1*(d^2+-4*c*e)^-1//2*cosintegral(b*x+(1/2)*b*e^-1*(d+(d^2+-4*c*e)^(1/2)))*sin(a+-1//2*b*e^-1*(d+(d^2+-4*c*e)^(1/2))))
@test integrate((-7+x)^-1//2*sin((-7+x)^(1/2)), x) == :(-2*cos((-7+x)^(1/2)))
@test integrate((a+-1*b*x^2)^-1//2*(b+-1*a*x^-2)^(1/2)*sin(x), x) == :(x*(a+-1*b*x^2)^-1//2*(b+-1*a*x^-2)^(1/2)*sinintegral(x))
@test integrate(x^-1*(1+sin(log(x)))^-1, x) == :(-1*(1+sin(log(x)))^-1*cos(log(x)))
@test integrate(sin((c+d*x)^-1*(a+b*x)), x) == :(d^-1*(c+d*x)*sin((c+d*x)^-1*(a+b*x))+d^-2*(b*c+-1*a*d)*cos(b*d^-1)*cosintegral(d^-1*(c+d*x)^-1*(b*c+-1*a*d))+d^-2*(b*c+-1*a*d)*sin(b*d^-1)*sinintegral(d^-1*(c+d*x)^-1*(b*c+-1*a*d)))
@test integrate(sin((c+d*x)^-1*(a+b*x))^2, x) == :(d^-1*sin((c+d*x)^-1*(a+b*x))^2*(c+d*x)+d^-2*(b*c+-1*a*d)*cosintegral(d^-1*(c+d*x)^-1*(-2*a*d+2*b*c))*sin(2*b*d^-1)+-1*d^-2*(b*c+-1*a*d)*cos(2*b*d^-1)*sinintegral(d^-1*(c+d*x)^-1*(-2*a*d+2*b*c)))
@test integrate(sin((c+d*x)^-1*(a+b*x))^3, x) == :(d^-1*sin((c+d*x)^-1*(a+b*x))^3*(c+d*x)+-1//4*d^-2*(-3*a*d+3*b*c)*cos(3*b*d^-1)*cosintegral(d^-1*(c+d*x)^-1*(-3*a*d+3*b*c))+-1//4*d^-2*(-3*a*d+3*b*c)*sin(3*b*d^-1)*sinintegral(d^-1*(c+d*x)^-1*(-3*a*d+3*b*c))+1//4*d^-2*(-3*a*d+3*b*c)*cos(b*d^-1)*cosintegral(d^-1*(c+d*x)^-1*(b*c+-1*a*d))+1//4*d^-2*(-3*a*d+3*b*c)*sin(b*d^-1)*sinintegral(d^-1*(c+d*x)^-1*(b*c+-1*a*d)))
@test integrate((1+-1*a^2*x^2)^-1*sin((1+a*x)^-1//2*(1+-1*a*x)^(1/2))^3, x) == :(-3//4*a^-1*sinintegral((1+a*x)^-1//2*(1+-1*a*x)^(1/2))+1//4*a^-1*sinintegral(3*(1+a*x)^-1//2*(1+-1*a*x)^(1/2)))
@test integrate((1+-1*a^2*x^2)^-1*sin((1+a*x)^-1//2*(1+-1*a*x)^(1/2))^2, x) == :((1/2)*a^-1*cosintegral(2*(1+a*x)^-1//2*(1+-1*a*x)^(1/2))+-1//2*a^-1*log((1+a*x)^-1//2*(1+-1*a*x)^(1/2)))
@test integrate((1+-1*a^2*x^2)^-1*sin((1+a*x)^-1//2*(1+-1*a*x)^(1/2)), x) == :(-1*a^-1*sinintegral((1+a*x)^-1//2*(1+-1*a*x)^(1/2)))
@test integrate((x+cos(x))^2, x) == :((1/2)*x+2*cos(x)+1//3*x^3+(1/2)*cos(x)*sin(x)+2*x*sin(x))
@test integrate((x+cos(x))^3, x) == :(-5*sin(x)+-1//3*sin(x)^3+1//4*x^4+3//4*x^2+3//4*cos(x)^2+3*x^2*sin(x)+6*x*cos(x)+3//2*x*cos(x)*sin(x))
@test integrate((c+d*x^2)^-1*cos(a+b*x), x) == :((1/2)*d^-1//2*(-1c)^-1//2*cos(a+b*d^-1//2*(-1c)^(1/2))*cosintegral(-1*b*x+b*d^-1//2*(-1c)^(1/2))+(1/2)*d^-1//2*(-1c)^-1//2*sin(a+b*d^-1//2*(-1c)^(1/2))*sinintegral(-1*b*x+b*d^-1//2*(-1c)^(1/2))+(1/2)*d^-1//2*(-1c)^-1//2*sin(a+-1*b*d^-1//2*(-1c)^(1/2))*sinintegral(b*x+b*d^-1//2*(-1c)^(1/2))+-1//2*d^-1//2*(-1c)^-1//2*cos(a+-1*b*d^-1//2*(-1c)^(1/2))*cosintegral(b*x+b*d^-1//2*(-1c)^(1/2)))
@test integrate((c+d*x+e*x^2)^-1*cos(a+b*x), x) == :((d^2+-4*c*e)^-1//2*cos(a+-1//2*b*e^-1*(d+-1*(d^2+-4*c*e)^(1/2)))*cosintegral(b*x+(1/2)*b*e^-1*(d+-1*(d^2+-4*c*e)^(1/2)))+(d^2+-4*c*e)^-1//2*sin(a+-1//2*b*e^-1*(d+(d^2+-4*c*e)^(1/2)))*sinintegral(b*x+(1/2)*b*e^-1*(d+(d^2+-4*c*e)^(1/2)))+-1*(d^2+-4*c*e)^-1//2*cos(a+-1//2*b*e^-1*(d+(d^2+-4*c*e)^(1/2)))*cosintegral(b*x+(1/2)*b*e^-1*(d+(d^2+-4*c*e)^(1/2)))+-1*(d^2+-4*c*e)^-1//2*sin(a+-1//2*b*e^-1*(d+-1*(d^2+-4*c*e)^(1/2)))*sinintegral(b*x+(1/2)*b*e^-1*(d+-1*(d^2+-4*c*e)^(1/2))))
@test integrate(x*(1+x^2)^-1//2*cos((1+x^2)^(1/2)), x) == :(sin((1+x^2)^(1/2)))
@test integrate(x*(2+x^2)^-1//2*cos(3^(1/2)*(2+x^2)^(1/2)), x) == :(1//3*3^(1/2)*sin(3^(1/2)*(2+x^2)^(1/2)))
@test integrate((6+3*(-1+2x)^2)^-1//2*(-1+2x)*cos((6+3*(-1+2x)^2)^(1/2)), x) == :(1//6*sin(3^(1/2)*(2+(-1+2x)^2)^(1/2)))
@test integrate(cos((c+d*x)^-1*(a+b*x)), x) == :(d^-1*(c+d*x)*cos((c+d*x)^-1*(a+b*x))+d^-2*(b*c+-1*a*d)*cos(b*d^-1)*sinintegral(d^-1*(c+d*x)^-1*(b*c+-1*a*d))+-1*d^-2*(b*c+-1*a*d)*cosintegral(d^-1*(c+d*x)^-1*(b*c+-1*a*d))*sin(b*d^-1))
@test integrate(cos((c+d*x)^-1*(a+b*x))^2, x) == :(d^-1*cos((c+d*x)^-1*(a+b*x))^2*(c+d*x)+d^-2*(b*c+-1*a*d)*cos(2*b*d^-1)*sinintegral(d^-1*(c+d*x)^-1*(-2*a*d+2*b*c))+-1*d^-2*(b*c+-1*a*d)*cosintegral(d^-1*(c+d*x)^-1*(-2*a*d+2*b*c))*sin(2*b*d^-1))
@test integrate((1+-1*a^2*x^2)^-1*cos((1+a*x)^-1//2*(1+-1*a*x)^(1/2))^3, x) == :(-3//4*a^-1*cosintegral((1+a*x)^-1//2*(1+-1*a*x)^(1/2))+-1//4*a^-1*cosintegral(3*(1+a*x)^-1//2*(1+-1*a*x)^(1/2)))
@test integrate((1+-1*a^2*x^2)^-1*cos((1+a*x)^-1//2*(1+-1*a*x)^(1/2))^2, x) == :(-1//2*a^-1*cosintegral(2*(1+a*x)^-1//2*(1+-1*a*x)^(1/2))+-1//2*a^-1*log((1+a*x)^-1//2*(1+-1*a*x)^(1/2)))
@test integrate((1+-1*a^2*x^2)^-1*cos((1+a*x)^-1//2*(1+-1*a*x)^(1/2)), x) == :(-1*a^-1*cosintegral((1+a*x)^-1//2*(1+-1*a*x)^(1/2)))
@test integrate(x^-1//2*tan(x^(1/2)), x) == :(-2*log(cos(x^(1/2))))
@test integrate(x^-1//2*tan(x^(1/2))^2, x) == :(-2*x^(1/2)+2*tan(x^(1/2)))
@test integrate(x^(1/2)*tan(x^(1/2)), x) == :(-1*Polylogarithms.polylog(3,-1*exp(2*im*x^(1/2)))+-2*x*log(1+exp(2*im*x^(1/2)))+2//3*im*x^3//2+2*im*x^(1/2)*Polylogarithms.polylog(2,-1*exp(2*im*x^(1/2))))
@test integrate(x*tan(a+b*x+c*x^2)+(1/2)*b*c^-1*tan(a+b*x+c*x^2), x) == :(-1//2*c^-1*log(cos(a+b*x+c*x^2)))
@test integrate(x^-1//2*cot(x^(1/2))^2, x) == :(-2*x^(1/2)+-2*cot(x^(1/2)))
@test integrate((1+cos(c+d*x))^-1*(a+b*sec(c+d*x))^(1/2), x) == :(d^-1*((1+sec(c+d*x))^-1)^(1/2)*((1+sec(c+d*x))^-1*(a+b)^-1*(a+b*sec(c+d*x)))^-1//2*(a+b*sec(c+d*x))^(1/2)*Elliptic.E(arcsin((1+sec(c+d*x))^-1*tan(c+d*x)),(a+b)^-1*(a+-1b)))
@test integrate(sec(a+b*x)*sec(2a+2*b*x), x) == :(-1*b^-1*arctanh(sin(a+b*x))+2^(1/2)*b^-1*arctanh(2^(1/2)*sin(a+b*x)))
@test integrate(sec(a+b*x)*sec(2a+2*b*x), x) == :(-1*b^-1*arctanh(sin(a+b*x))+2^(1/2)*b^-1*arctanh(2^(1/2)*sin(a+b*x)))
@test integrate(sin(x)*sin(2x), x) == :((1/2)*sin(x)+-1//6*sin(3x))
@test integrate(sin(x)*sin(3x), x) == :(-1//8*sin(4x)+1//4*sin(2x))
@test integrate(sin(x)*sin(4x), x) == :(-1//10*sin(5x)+1//6*sin(3x))
@test integrate(sin(x)*sin(m*x), x) == :((2+-2m)^-1*sin(x*(1+-1m))+-1*(2+2m)^-1*sin(x*(1+m)))
@test integrate(cos(2x)*sin(x), x) == :((1/2)*cos(x)+-1//6*cos(3x))
@test integrate(cos(3x)*sin(x), x) == :(-1//8*cos(4x)+1//4*cos(2x))
@test integrate(cos(4x)*sin(x), x) == :(-1//10*cos(5x)+1//6*cos(3x))
@test integrate(cos(m*x)*sin(x), x) == :(-1*(2+-2m)^-1*cos(x*(1+-1m))+-1*(2+2m)^-1*cos(x*(1+m)))
@test integrate(sin(x)*tan(2x), x) == :(-1*sin(x)+(1/2)*2^(1/2)*arctanh(2^(1/2)*sin(x)))
@test integrate(sin(x)*tan(3x), x) == :(-1*sin(x)+-1//6*log(1+-1*sin(x))+-1//6*log(1+-2*sin(x))+1//6*log(1+2*sin(x))+1//6*log(1+sin(x)))
@test integrate(sin(x)*tan(4x), x) == :(-1*sin(x)+1//4*(2+2^(1/2))^(1/2)*arctanh(2*(2+2^(1/2))^-1//2*sin(x))+1//4*(2+-1*2^(1/2))^(1/2)*arctanh(2*(2+-1*2^(1/2))^-1//2*sin(x)))
@test integrate(sin(x)*tan(5x), x) == :(-1*sin(x)+1//5*arctanh(sin(x))+(1//20+-1//20*5^(1/2))*log(1+-1*5^(1/2)+4*sin(x))+(1//20+1//20*5^(1/2))*log(1+5^(1/2)+4*sin(x))+-1*(1//20+-1//20*5^(1/2))*log(1+-1*5^(1/2)+-4*sin(x))+-1*(1//20+1//20*5^(1/2))*log(1+5^(1/2)+-4*sin(x)))
@test integrate(sin(x)*tan(6x), x) == :(-1*sin(x)+1//6*2^(1/2)*arctanh(2^(1/2)*sin(x))+1//6*(2+3^(1/2))^(1/2)*arctanh(2*(2+3^(1/2))^-1//2*sin(x))+1//6*(2+-1*3^(1/2))^(1/2)*arctanh(2*(2+-1*3^(1/2))^-1//2*sin(x)))
@test integrate(cot(2x)*sin(x), x) == :(-1//2*arctanh(sin(x))+sin(x))
@test integrate(cot(3x)*sin(x), x) == :(-1//3*3^(1/2)*arctanh(2//3*3^(1/2)*sin(x))+sin(x))
@test integrate(cot(4x)*sin(x), x) == :(-1//4*arctanh(sin(x))+-1//4*2^(1/2)*arctanh(2^(1/2)*sin(x))+sin(x))
@test integrate(cot(5x)*sin(x), x) == :(-1//5*(5//2+(1/2)*5^(1/2))^(1/2)*arctanh(2*2^(1/2)*(5+5^(1/2))^-1//2*sin(x))+-1//5*(5//2+-1//2*5^(1/2))^(1/2)*arctanh((2+2//5*5^(1/2))^(1/2)*sin(x))+sin(x))
@test integrate(cot(6x)*sin(x), x) == :(-1//6*arctanh(2*sin(x))+-1//6*arctanh(sin(x))+-1//6*3^(1/2)*arctanh(2//3*3^(1/2)*sin(x))+sin(x))
@test integrate(sec(2x)*sin(x), x) == :((1/2)*2^(1/2)*arctanh(2^(1/2)*cos(x)))
@test integrate(sec(3x)*sin(x), x) == :(-1//6*log(3+-4*cos(x)^2)+1//3*log(cos(x)))
@test integrate(sec(4x)*sin(x), x) == :((1/2)*(4+2*2^(1/2))^-1//2*arctanh(2*(2+2^(1/2))^-1//2*cos(x))+-1//2*(4+-2*2^(1/2))^-1//2*arctanh(2*(2+-1*2^(1/2))^-1//2*cos(x)))
@test integrate(sec(5x)*sin(x), x) == :(-1//5*log(cos(x))+(1//20+-1//20*5^(1/2))*log(5+5^(1/2)+-8*cos(x)^2)+(1//20+1//20*5^(1/2))*log(5+-1*5^(1/2)+-8*cos(x)^2))
@test integrate(sec(6x)*sin(x), x) == :(-1//6*2^(1/2)*arctanh(2^(1/2)*cos(x))+1//6*(2+3^(1/2))^-1//2*arctanh(2*(2+3^(1/2))^-1//2*cos(x))+1//6*(2+-1*3^(1/2))^-1//2*arctanh(2*(2+-1*3^(1/2))^-1//2*cos(x)))
@test integrate(csc(2x)*sin(x), x) == :((1/2)*arctanh(sin(x)))
@test integrate(csc(3x)*sin(x), x) == :(-1//6*3^(1/2)*log(-1*sin(x)+3^(1/2)*cos(x))+1//6*3^(1/2)*log(3^(1/2)*cos(x)+sin(x)))
@test integrate(csc(4x)*sin(x), x) == :(-1//4*arctanh(sin(x))+1//4*2^(1/2)*arctanh(2^(1/2)*sin(x)))
@test integrate(csc(5x)*sin(x), x) == :(-1//10*(5//2+(1/2)*5^(1/2))^(1/2)*log((5+2*5^(1/2))^(1/2)*cos(x)+sin(x))+-1//10*(5//2+-1//2*5^(1/2))^(1/2)*log(-1*sin(x)+(5+-2*5^(1/2))^(1/2)*cos(x))+1//10*(5//2+(1/2)*5^(1/2))^(1/2)*log(-1*sin(x)+(5+2*5^(1/2))^(1/2)*cos(x))+1//10*(5//2+-1//2*5^(1/2))^(1/2)*log((5+-2*5^(1/2))^(1/2)*cos(x)+sin(x)))
@test integrate(csc(6x)*sin(x), x) == :(1//6*arctanh(2*sin(x))+1//6*arctanh(sin(x))+-1//6*3^(1/2)*arctanh(2//3*3^(1/2)*sin(x)))
@test integrate(csc(x)*sin(3x), x) == :(x+2*cos(x)*sin(x))
@test integrate(csc(3x)*sin(6x), x) == :(2//3*sin(3x))
@test integrate(cos(x)*sin(2x), x) == :(-1//2*cos(x)+-1//6*cos(3x))
@test integrate(cos(x)*sin(3x), x) == :(-1//4*cos(2x)+-1//8*cos(4x))
@test integrate(cos(x)*sin(4x), x) == :(-1//6*cos(3x)+-1//10*cos(5x))
@test integrate(cos(x)*sin(m*x), x) == :((2+-2m)^-1*cos(x*(1+-1m))+-1*(2+2m)^-1*cos(x*(1+m)))
@test integrate(cos(x)*cos(2x), x) == :((1/2)*sin(x)+1//6*sin(3x))
@test integrate(cos(x)*cos(3x), x) == :(1//4*sin(2x)+1//8*sin(4x))
@test integrate(cos(x)*cos(4x), x) == :(1//6*sin(3x)+1//10*sin(5x))
@test integrate(cos(x)*cos(m*x), x) == :((2+-2m)^-1*sin(x*(1+-1m))+(2+2m)^-1*sin(x*(1+m)))
@test integrate(cos(x)*tan(2x), x) == :(-1*cos(x)+(1/2)*2^(1/2)*arctanh(2^(1/2)*cos(x)))
@test integrate(cos(x)*tan(3x), x) == :(-1*cos(x)+1//3*3^(1/2)*arctanh(2//3*3^(1/2)*cos(x)))
@test integrate(cos(x)*tan(4x), x) == :(-1*cos(x)+1//4*(2+2^(1/2))^(1/2)*arctanh(2*(2+2^(1/2))^-1//2*cos(x))+1//4*(2+-1*2^(1/2))^(1/2)*arctanh(2*(2+-1*2^(1/2))^-1//2*cos(x)))
@test integrate(cos(x)*tan(5x), x) == :(-1*cos(x)+1//5*(5//2+(1/2)*5^(1/2))^(1/2)*arctanh(2*2^(1/2)*(5+5^(1/2))^-1//2*cos(x))+1//5*(5//2+-1//2*5^(1/2))^(1/2)*arctanh((2+2//5*5^(1/2))^(1/2)*cos(x)))
@test integrate(cos(x)*tan(6x), x) == :(-1*cos(x)+1//6*2^(1/2)*arctanh(2^(1/2)*cos(x))+1//6*(2+3^(1/2))^(1/2)*arctanh(2*(2+3^(1/2))^-1//2*cos(x))+1//6*(2+-1*3^(1/2))^(1/2)*arctanh(2*(2+-1*3^(1/2))^-1//2*cos(x)))
@test integrate(cos(x)*cot(2x), x) == :(-1//2*arctanh(cos(x))+cos(x))
@test integrate(cos(x)*cot(3x), x) == :(-1//6*log(1+2*cos(x))+-1//6*log(1+cos(x))+1//6*log(1+-1*cos(x))+1//6*log(1+-2*cos(x))+cos(x))
@test integrate(cos(x)*cot(4x), x) == :(-1//4*arctanh(cos(x))+-1//4*2^(1/2)*arctanh(2^(1/2)*cos(x))+cos(x))
@test integrate(cos(x)*cot(5x), x) == :(-1//5*arctanh(cos(x))+(1//20+-1//20*5^(1/2))*log(1+-1*5^(1/2)+-4*cos(x))+(1//20+1//20*5^(1/2))*log(1+5^(1/2)+-4*cos(x))+-1*(1//20+-1//20*5^(1/2))*log(1+-1*5^(1/2)+4*cos(x))+-1*(1//20+1//20*5^(1/2))*log(1+5^(1/2)+4*cos(x))+cos(x))
@test integrate(cos(x)*cot(6x), x) == :(-1//6*arctanh(2*cos(x))+-1//6*arctanh(cos(x))+-1//6*3^(1/2)*arctanh(2//3*3^(1/2)*cos(x))+cos(x))
@test integrate(cos(x)*sec(2x), x) == :((1/2)*2^(1/2)*arctanh(2^(1/2)*sin(x)))
@test integrate(cos(x)*sec(3x), x) == :(-1//6*3^(1/2)*log(-1*3^(1/2)*sin(x)+cos(x))+1//6*3^(1/2)*log(3^(1/2)*sin(x)+cos(x)))
@test integrate(cos(x)*sec(4x), x) == :((1/2)*(4+-2*2^(1/2))^-1//2*arctanh(2*(2+-1*2^(1/2))^-1//2*sin(x))+-1//2*(4+2*2^(1/2))^-1//2*arctanh(2*(2+2^(1/2))^-1//2*sin(x)))
@test integrate(cos(x)*sec(5x), x) == :(-1//10*(5//2+(1/2)*5^(1/2))^(1/2)*log(-1*(5+2*5^(1/2))^(1/2)*sin(x)+cos(x))+-1//10*(5//2+-1//2*5^(1/2))^(1/2)*log((5+-2*5^(1/2))^(1/2)*sin(x)+cos(x))+1//10*(5//2+(1/2)*5^(1/2))^(1/2)*log((5+2*5^(1/2))^(1/2)*sin(x)+cos(x))+1//10*(5//2+-1//2*5^(1/2))^(1/2)*log(-1*(5+-2*5^(1/2))^(1/2)*sin(x)+cos(x)))
@test integrate(cos(x)*sec(6x), x) == :(-1//6*2^(1/2)*arctanh(2^(1/2)*sin(x))+1//6*(2+3^(1/2))^-1//2*arctanh(2*(2+3^(1/2))^-1//2*sin(x))+1//6*(2+-1*3^(1/2))^-1//2*arctanh(2*(2+-1*3^(1/2))^-1//2*sin(x)))
@test integrate(cos(2x)*sec(x), x) == :(-1*arctanh(sin(x))+2*sin(x))
@test integrate(cos(4x)*sec(2x), x) == :(-1//2*arctanh(sin(2x))+sin(2x))
@test integrate(cos(x)*csc(2x), x) == :(-1//2*arctanh(cos(x)))
@test integrate(cos(x)*csc(3x), x) == :(-1//6*log(3+-4*sin(x)^2)+1//3*log(sin(x)))
@test integrate(cos(x)*csc(4x), x) == :(-1//4*arctanh(cos(x))+1//4*2^(1/2)*arctanh(2^(1/2)*cos(x)))
@test integrate(cos(x)*csc(5x), x) == :(1//5*log(sin(x))+-1*(1//20+-1//20*5^(1/2))*log(5+5^(1/2)+-8*sin(x)^2)+-1*(1//20+1//20*5^(1/2))*log(5+-1*5^(1/2)+-8*sin(x)^2))
@test integrate(cos(x)*csc(6x), x) == :(-1//6*arctanh(2*cos(x))+-1//6*arctanh(cos(x))+1//6*3^(1/2)*arctanh(2//3*3^(1/2)*cos(x)))
@test integrate(cos(6x)^3*sin(x), x) == :(-3//56*cos(7x)+-1//152*cos(19x)+1//136*cos(17x)+3//40*cos(5x))
@test integrate(cos(6x)^3*sin(9x), x) == :(-1//8*cos(3x)+-1//40*cos(15x)+-1//216*cos(27x)+1//72*cos(9x))
@test integrate(sin(6x)^2*cos(2x), x) == :(-1//40*sin(10x)+-1//56*sin(14x)+1//4*sin(2x))
@test integrate(sin(6x)^2*cos(x), x) == :((1/2)*sin(x)+-1//44*sin(11x)+-1//52*sin(13x))
@test integrate(sin(6x)^3*cos(x), x) == :(-3//40*cos(5x)+-3//56*cos(7x)+1//136*cos(17x)+1//152*cos(19x))
@test integrate(sin(6x)^3*cos(7x), x) == :(-3//104*cos(13x)+1//88*cos(11x)+1//200*cos(25x)+3//8*cos(x))
@test integrate(cos(3x)^2*sin(2x)^3, x) == :(-3//16*cos(2x)+-3//128*cos(8x)+1//48*cos(6x)+1//192*cos(12x)+3//64*cos(4x))
@test integrate(sin(a+b*x)*sin(c+b*x), x) == :((1/2)*x*cos(a+-1c)+-1//4*b^-1*sin(a+c+2*b*x))
@test integrate(-1*sin(a+b*x)*sin(-1c+b*x), x) == :(-1//2*x*cos(a+c)+1//4*b^-1*sin(a+-1c+2*b*x))
@test integrate(cos(a+b*x)*cos(c+b*x), x) == :((1/2)*x*cos(a+-1c)+1//4*b^-1*sin(a+c+2*b*x))
@test integrate(cos(a+b*x)*cos(-1c+b*x), x) == :((1/2)*x*cos(a+c)+1//4*b^-1*sin(a+-1c+2*b*x))
@test integrate(tan(a+b*x)*tan(c+b*x), x) == :(-1x+b^-1*cot(a+-1c)*log(cos(c+b*x))+-1*b^-1*cot(a+-1c)*log(cos(a+b*x)))
@test integrate(-1*tan(a+b*x)*tan(-1c+b*x), x) == :(x+b^-1*cot(a+c)*log(cos(a+b*x))+-1*b^-1*cot(a+c)*log(cos(-1c+b*x)))
@test integrate(cot(a+b*x)*cot(c+b*x), x) == :(-1x+b^-1*cot(a+-1c)*log(sin(c+b*x))+-1*b^-1*cot(a+-1c)*log(sin(a+b*x)))
@test integrate(-1*cot(a+b*x)*cot(-1c+b*x), x) == :(x+b^-1*cot(a+c)*log(sin(a+b*x))+-1*b^-1*cot(a+c)*log(-1*sin(-1c+b*x)))
@test integrate(sec(a+b*x)*sec(c+b*x), x) == :(b^-1*csc(a+-1c)*log(cos(c+b*x))+-1*b^-1*csc(a+-1c)*log(cos(a+b*x)))
@test integrate(sec(a+b*x)*sec(-1c+b*x), x) == :(b^-1*csc(a+c)*log(cos(-1c+b*x))+-1*b^-1*csc(a+c)*log(cos(a+b*x)))
@test integrate(csc(a+b*x)*csc(c+b*x), x) == :(b^-1*csc(a+-1c)*log(sin(c+b*x))+-1*b^-1*csc(a+-1c)*log(sin(a+b*x)))
@test integrate(-1*csc(a+b*x)*csc(-1c+b*x), x) == :(b^-1*csc(a+c)*log(sin(a+b*x))+-1*b^-1*csc(a+c)*log(-1*sin(-1c+b*x)))
@test integrate((sin(x)*tan(x))^(1/2), x) == :(-2*(sin(x)*tan(x))^(1/2)*cot(x))
@test integrate((sin(x)*tan(x))^3//2, x) == :(-2//3*(sin(x)*tan(x))^(1/2)*sin(x)+8//3*(sin(x)*tan(x))^(1/2)*csc(x))
@test integrate((sin(x)*tan(x))^5//2, x) == :(16//15*(sin(x)*tan(x))^(1/2)*tan(x)+64//15*(sin(x)*tan(x))^(1/2)*cot(x)+-2//5*(sin(x)*tan(x))^(1/2)*sin(x)^2*tan(x))
@test integrate((cos(x)*cot(x))^(1/2), x) == :(2*(cos(x)*cot(x))^(1/2)*tan(x))
@test integrate((cos(x)*cot(x))^3//2, x) == :(-8//3*(cos(x)*cot(x))^(1/2)*sec(x)+2//3*(cos(x)*cot(x))^(1/2)*cos(x))
@test integrate((cos(x)*cot(x))^5//2, x) == :(-64//15*(cos(x)*cot(x))^(1/2)*tan(x)+-16//15*(cos(x)*cot(x))^(1/2)*cot(x)+2//5*(cos(x)*cot(x))^(1/2)*cos(x)^2*cot(x))
@test integrate(x*(a+b*sin(x))^-2*cos(x), x) == :(-1*x*b^-1*(a+b*sin(x))^-1+2*b^-1*(a^2+-1*b^2)^-1//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*x))))
@test integrate(x*(a+b*sin(x))^-3*cos(x), x) == :((a+b*sin(x))^-1*(-2*b^2+2*a^2)^-1*cos(x)+-1//2*x*b^-1*(a+b*sin(x))^-2+a*b^-1*(a^2+-1*b^2)^-3//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*x))))
@test integrate(x*(a+b*cos(x))^-2*sin(x), x) == :(x*b^-1*(a+b*cos(x))^-1+-2*b^-1*(a+b)^-1//2*(a+-1b)^-1//2*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*x)))
@test integrate(x*(a+b*cos(x))^-3*sin(x), x) == :((a+b*cos(x))^-1*(-2*b^2+2*a^2)^-1*sin(x)+(1/2)*x*b^-1*(a+b*cos(x))^-2+-1*a*b^-1*(a+b)^-3//2*(a+-1b)^-3//2*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*x)))
@test integrate(x*(a+b*tan(x))^-2*sec(x)^2, x) == :((a^2+b^2)^-1*log(a*cos(x)+b*sin(x))+-1*x*b^-1*(a+b*tan(x))^-1+a*x*b^-1*(a^2+b^2)^-1)
@test integrate(x*(a+b*cot(x))^-2*csc(x)^2, x) == :((a^2+b^2)^-1*log(a*sin(x)+b*cos(x))+x*b^-1*(a+b*cot(x))^-1+-1*a*x*b^-1*(a^2+b^2)^-1)
@test integrate((a+b*tan(c+d*x)^2)^-1*sec(c+d*x)^2, x) == :(a^-1//2*b^-1//2*d^-1*arctan(a^-1//2*b^(1/2)*tan(c+d*x)))
@test integrate(x*(a+b*tan(c+d*x)^2)^-1*sec(c+d*x)^2, x) == :(-1//4*a^-1//2*b^-1//2*d^-2*Polylogarithms.polylog(2,-1*(a^(1/2)+-1*b^(1/2))^-2*(a+-1b)*exp(2*im*(c+d*x)))+1//4*a^-1//2*b^-1//2*d^-2*Polylogarithms.polylog(2,-1*(a^(1/2)+b^(1/2))^-2*(a+-1b)*exp(2*im*(c+d*x)))+(1/2)*im*x*a^-1//2*b^-1//2*d^-1*log(1+(a^(1/2)+b^(1/2))^-2*(a+-1b)*exp(2*im*(c+d*x)))+-1//2*im*x*a^-1//2*b^-1//2*d^-1*log(1+(a^(1/2)+-1*b^(1/2))^-2*(a+-1b)*exp(2*im*(c+d*x))))
@test integrate(x^2*(a+b*tan(c+d*x)^2)^-1*sec(c+d*x)^2, x) == :((1/2)*x*a^-1//2*b^-1//2*d^-2*Polylogarithms.polylog(2,-1*(a^(1/2)+b^(1/2))^-2*(a+-1b)*exp(2*im*(c+d*x)))+-1//2*x*a^-1//2*b^-1//2*d^-2*Polylogarithms.polylog(2,-1*(a^(1/2)+-1*b^(1/2))^-2*(a+-1b)*exp(2*im*(c+d*x)))+-1//4*im*a^-1//2*b^-1//2*d^-3*Polylogarithms.polylog(3,-1*(a^(1/2)+-1*b^(1/2))^-1*(a^(1/2)+b^(1/2))*exp(2*im*(c+d*x)))+1//4*im*a^-1//2*b^-1//2*d^-3*Polylogarithms.polylog(3,-1*(a^(1/2)+b^(1/2))^-1*(a^(1/2)+-1*b^(1/2))*exp(2*im*(c+d*x)))+(1/2)*im*a^-1//2*b^-1//2*d^-1*x^2*log(1+(a^(1/2)+b^(1/2))^-2*(a+-1b)*exp(2*im*(c+d*x)))+-1//2*im*a^-1//2*b^-1//2*d^-1*x^2*log(1+(a^(1/2)+-1*b^(1/2))^-2*(a+-1b)*exp(2*im*(c+d*x))))
@test integrate((a+b*tan(c+d*x)^2+c*sec(c+d*x)^2)^-1*sec(c+d*x)^2, x) == :(d^-1*(a+c)^-1//2*(b+c)^-1//2*arctan((a+c)^-1//2*(b+c)^(1/2)*tan(c+d*x)))
@test integrate(x*(a+b*tan(c+d*x)^2+c*sec(c+d*x)^2)^-1*sec(c+d*x)^2, x) == :(-1//4*d^-2*(a+c)^-1//2*(b+c)^-1//2*Polylogarithms.polylog(2,-1*(a+b+2c+-2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x)))+1//4*d^-2*(a+c)^-1//2*(b+c)^-1//2*Polylogarithms.polylog(2,-1*(a+b+2c+2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x)))+(1/2)*im*x*d^-1*(a+c)^-1//2*(b+c)^-1//2*log(1+(a+b+2c+2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x)))+-1//2*im*x*d^-1*(a+c)^-1//2*(b+c)^-1//2*log(1+(a+b+2c+-2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x))))
@test integrate(x^2*(a+b*tan(c+d*x)^2+c*sec(c+d*x)^2)^-1*sec(c+d*x)^2, x) == :((1/2)*x*d^-2*(a+c)^-1//2*(b+c)^-1//2*Polylogarithms.polylog(2,-1*(a+b+2c+2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x)))+-1//2*x*d^-2*(a+c)^-1//2*(b+c)^-1//2*Polylogarithms.polylog(2,-1*(a+b+2c+-2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x)))+-1//4*im*d^-3*(a+c)^-1//2*(b+c)^-1//2*Polylogarithms.polylog(3,-1*(a+b+2c+-2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x)))+1//4*im*d^-3*(a+c)^-1//2*(b+c)^-1//2*Polylogarithms.polylog(3,-1*(a+b+2c+2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x)))+(1/2)*im*d^-1*x^2*(a+c)^-1//2*(b+c)^-1//2*log(1+(a+b+2c+2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x)))+-1//2*im*d^-1*x^2*(a+c)^-1//2*(b+c)^-1//2*log(1+(a+b+2c+-2*(a+c)^(1/2)*(b+c)^(1/2))^-1*(a+-1b)*exp(2*im*(c+d*x))))
@test integrate(x^3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2), x) == :(-6*f^-4*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+3*f^-2*x^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+f^-1*x^3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*tan(e+f*x)+-6*x*f^-3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*tan(e+f*x))
@test integrate(x^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2), x) == :(-2*f^-3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*tan(e+f*x)+2*x*f^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+f^-1*x^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*tan(e+f*x))
@test integrate(x*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2), x) == :(f^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+x*f^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*tan(e+f*x))
@test integrate(x^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2), x) == :((a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(e)*cosintegral(f*x)*sec(e+f*x)+-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)*sin(e)*sinintegral(f*x))
@test integrate(x^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2), x) == :(-1*x^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+-1*f*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(e)*sec(e+f*x)*sinintegral(f*x)+-1*f*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cosintegral(f*x)*sec(e+f*x)*sin(e))
@test integrate(x^-3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2), x) == :(-1//2*x^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+(1/2)*f*x^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*tan(e+f*x)+(1/2)*f^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)*sin(e)*sinintegral(f*x)+-1//2*f^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(e)*cosintegral(f*x)*sec(e+f*x))
@test integrate(x^3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^3//2, x) == :(-6*c*f^-4*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+3*c*f^-2*x^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+-3//8*c*f^-4*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sin(e+f*x)+(1/2)*c^-1*f^-1*x^3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^5//2*sec(e+f*x)+-6*c*x*f^-3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*tan(e+f*x)+-3//4*c*f^-1*x^3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)+3//4*c*f^-2*x^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sin(e+f*x)+3//8*c*x*f^-3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)+-3//4*c*x*f^-3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sin(e+f*x)*tan(e+f*x))
@test integrate(x^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^3//2, x) == :(-2*c*f^-3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*tan(e+f*x)+2*c*x*f^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+(1/2)*c*x*f^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sin(e+f*x)+(1/2)*c^-1*f^-1*x^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^5//2*sec(e+f*x)+-3//4*c*f^-1*x^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)+-1//4*c*f^-3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sin(e+f*x)*tan(e+f*x))
@test integrate(x*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^3//2, x) == :(c*f^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+1//4*c*f^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sin(e+f*x)+(1/2)*x*c^-1*f^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^5//2*sec(e+f*x)+-3//4*c*x*f^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x))
@test integrate(x^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^3//2, x) == :(c*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(e)*cosintegral(f*x)*sec(e+f*x)+(1/2)*c*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(2*e)*sec(e+f*x)*sinintegral(2*f*x)+(1/2)*c*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cosintegral(2*f*x)*sec(e+f*x)*sin(2*e)+-1*c*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)*sin(e)*sinintegral(f*x))
@test integrate(x^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^3//2, x) == :(-1*c*x^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+-1//2*c*x^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)*sin(2*e+2*f*x)+c*f*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(2*e)*cosintegral(2*f*x)*sec(e+f*x)+-1*c*f*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(e)*sec(e+f*x)*sinintegral(f*x)+-1*c*f*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cosintegral(f*x)*sec(e+f*x)*sin(e)+-1*c*f*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)*sin(2*e)*sinintegral(2*f*x))
@test integrate(x^-3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^3//2, x) == :(-1//2*c*x^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)+(1/2)*c*f*x^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*tan(e+f*x)+-1//4*c*x^-2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)*sin(2*e+2*f*x)+(1/2)*c*f^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*sec(e+f*x)*sin(e)*sinintegral(f*x)+-1*c*f^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(2*e)*sec(e+f*x)*sinintegral(2*f*x)+-1*c*f^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cosintegral(2*f*x)*sec(e+f*x)*sin(2*e)+-1//2*c*f*x^-1*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(2*e+2*f*x)*sec(e+f*x)+-1//2*c*f^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^(1/2)*cos(e)*cosintegral(f*x)*sec(e+f*x))
@test integrate((a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^-1//2*(g+h*x)^3, x) == :(a*f^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^3*cos(e+f*x)*log(1+exp(2*im*(e+f*x)))+-1//4*im*a*h^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^4*cos(e+f*x)+-6*im*a*f^-4*h^3*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(4,-1*im*exp(im*(e+f*x)))*cos(e+f*x)+-6*a*f^-3*h^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)*Polylogarithms.polylog(3,-1*im*exp(im*(e+f*x)))*cos(e+f*x)+-2*im*a*f^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^3*arctan(exp(im*(e+f*x)))*cos(e+f*x)+6*im*a*f^-4*h^3*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(4,im*exp(im*(e+f*x)))*cos(e+f*x)+6*a*f^-3*h^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)*Polylogarithms.polylog(3,im*exp(im*(e+f*x)))*cos(e+f*x)+3//2*a*f^-3*h^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)*Polylogarithms.polylog(3,-1*exp(2*im*(e+f*x)))*cos(e+f*x)+3//4*im*a*f^-4*h^3*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(4,-1*exp(2*im*(e+f*x)))*cos(e+f*x)+-3*im*a*h*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^2*Polylogarithms.polylog(2,im*exp(im*(e+f*x)))*cos(e+f*x)+3*im*a*h*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^2*Polylogarithms.polylog(2,-1*im*exp(im*(e+f*x)))*cos(e+f*x)+-3//2*im*a*h*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^2*Polylogarithms.polylog(2,-1*exp(2*im*(e+f*x)))*cos(e+f*x))
@test integrate((a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^-1//2*(g+h*x)^2, x) == :(a*f^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^2*cos(e+f*x)*log(1+exp(2*im*(e+f*x)))+(1/2)*a*f^-3*h^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(3,-1*exp(2*im*(e+f*x)))*cos(e+f*x)+-2*a*f^-3*h^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(3,-1*im*exp(im*(e+f*x)))*cos(e+f*x)+2*a*f^-3*h^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(3,im*exp(im*(e+f*x)))*cos(e+f*x)+-1//3*im*a*h^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^3*cos(e+f*x)+-2*im*a*f^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^2*arctan(exp(im*(e+f*x)))*cos(e+f*x)+-1*im*a*h*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)*Polylogarithms.polylog(2,-1*exp(2*im*(e+f*x)))*cos(e+f*x)+-2*im*a*h*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)*Polylogarithms.polylog(2,im*exp(im*(e+f*x)))*cos(e+f*x)+2*im*a*h*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)*Polylogarithms.polylog(2,-1*im*exp(im*(e+f*x)))*cos(e+f*x))
@test integrate((a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^-1//2*(g+h*x), x) == :(a*f^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)*cos(e+f*x)*log(1+exp(2*im*(e+f*x)))+-1//2*im*a*h^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)^2*cos(e+f*x)+im*a*h*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,-1*im*exp(im*(e+f*x)))*cos(e+f*x)+-1*im*a*h*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,im*exp(im*(e+f*x)))*cos(e+f*x)+-2*im*a*f^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*(g+h*x)*arctan(exp(im*(e+f*x)))*cos(e+f*x)+-1//2*im*a*h*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,-1*exp(2*im*(e+f*x)))*cos(e+f*x))
@test integrate(x^3*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^-3//2, x) == :(-3*a*c^-1*f^-2*x^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2+a*c^-1*f^-1*x^3*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*tan(e+f*x)+-1*a*c^-1*f^-1*x^3*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*sec(e+f*x)+3*a*c^-1*f^-2*x^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*sin(e+f*x)+-6*im*a*c^-1*f^-4*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,im*exp(im*(e+f*x)))*cos(e+f*x)+-3*im*a*c^-1*f^-4*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,-1*exp(2*im*(e+f*x)))*cos(e+f*x)+-3*im*a*c^-1*f^-2*x^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*cos(e+f*x)+6*im*a*c^-1*f^-4*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*Polylogarithms.polylog(2,-1*im*exp(im*(e+f*x)))*cos(e+f*x)+6*a*x*c^-1*f^-3*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*cos(e+f*x)*log(1+exp(2*im*(e+f*x)))+-12*im*a*x*c^-1*f^-3*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*arctan(exp(im*(e+f*x)))*cos(e+f*x))
@test integrate(x^2*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^-3//2, x) == :(-2*a*x*c^-1*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2+a*c^-1*f^-1*x^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*tan(e+f*x)+-1*a*c^-1*f^-1*x^2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*sec(e+f*x)+2*a*x*c^-1*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*sin(e+f*x)+2*a*c^-1*f^-3*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*arctanh(sin(e+f*x))*cos(e+f*x)+2*a*c^-1*f^-3*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*cos(e+f*x)*log(cos(e+f*x)))
@test integrate(x*(a+-1*a*sin(e+f*x))^(1/2)*(c+c*sin(e+f*x))^-3//2, x) == :(-1*a*c^-1*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2+a*c^-1*f^-2*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*sin(e+f*x)+a*x*c^-1*f^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*tan(e+f*x)+-1*a*x*c^-1*f^-1*(a+-1*a*sin(e+f*x))^-1//2*(c+c*sin(e+f*x))^-1//2*sec(e+f*x))
@test integrate(z^2*(1+-1*cos(z))^-1//2*(1+cos(z))^(1/2), z) == :((1/2)*(1+-1*cos(z))^-1//2*(1+cos(z))^-1//2*Polylogarithms.polylog(3,exp(2*im*z))*sin(z)+-2*(1+-1*cos(z))^-1//2*(1+cos(z))^-1//2*Polylogarithms.polylog(3,-1*exp(im*z))*sin(z)+2*(1+-1*cos(z))^-1//2*(1+cos(z))^-1//2*Polylogarithms.polylog(3,exp(im*z))*sin(z)+z^2*(1+-1*cos(z))^-1//2*(1+cos(z))^-1//2*log(1+-1*exp(2*im*z))*sin(z)+-2*z^2*(1+-1*cos(z))^-1//2*(1+cos(z))^-1//2*arctanh(exp(im*z))*sin(z)+-1//3*im*z^3*(1+-1*cos(z))^-1//2*(1+cos(z))^-1//2*sin(z)+-1*im*z*(1+-1*cos(z))^-1//2*(1+cos(z))^-1//2*Polylogarithms.polylog(2,exp(2*im*z))*sin(z)+-2*im*z*(1+-1*cos(z))^-1//2*(1+cos(z))^-1//2*Polylogarithms.polylog(2,exp(im*z))*sin(z)+2*im*z*(1+-1*cos(z))^-1//2*(1+cos(z))^-1//2*Polylogarithms.polylog(2,-1*exp(im*z))*sin(z))
@test integrate((A+B*sec(x))*(a+a*cos(x)), x) == :(A*a*sin(x)+B*a*arctanh(sin(x))+a*x*(A+B))
@test integrate((a+a*cos(x))^2*(A+B*sec(x)), x) == :(B*a^2*arctanh(sin(x))+(1/2)*A*(a^2+a^2*cos(x))*sin(x)+(1/2)*x*a^2*(3A+4B)+(1/2)*a^2*(2B+3A)*sin(x))
@test integrate((a+a*cos(x))^3*(A+B*sec(x)), x) == :(B*a^3*arctanh(sin(x))+(a^3+a^3*cos(x))*((1/2)*B+5//6*A)*sin(x)+(1/2)*x*a^3*(5A+7B)+5//2*a^3*(A+B)*sin(x)+1//3*A*a*(a+a*cos(x))^2*sin(x))
@test integrate((a+a*cos(x))^4*(A+B*sec(x)), x) == :(B*a^4*arctanh(sin(x))+(a^2+a^2*cos(x))^2*(1//3*B+7//12*A)*sin(x)+(a^4+a^4*cos(x))*(4//3*B+35//24*A)*sin(x)+1//8*x*a^4*(35A+48B)+5//8*a^4*(7A+8B)*sin(x)+1//4*A*a*(a+a*cos(x))^3*sin(x))
@test integrate((a+a*cos(x))^-1*(A+B*sec(x)), x) == :(B*a^-1*arctanh(sin(x))+(a+a*cos(x))^-1*(A+-1B)*sin(x))
@test integrate((a+a*cos(x))^-2*(A+B*sec(x)), x) == :(B*a^-2*arctanh(sin(x))+1//3*(a+a*cos(x))^-2*(A+-1B)*sin(x)+1//3*a^-2*(1+cos(x))^-1*(A+-4B)*sin(x))
@test integrate((a+a*cos(x))^-3*(A+B*sec(x)), x) == :(B*a^-3*arctanh(sin(x))+(15*a^3+15*a^3*cos(x))^-1*(-22B+2A)*sin(x)+1//5*(a+a*cos(x))^-3*(A+-1B)*sin(x)+1//15*a^-1*(a+a*cos(x))^-2*(-7B+2A)*sin(x))
@test integrate((a+a*cos(x))^-4*(A+B*sec(x)), x) == :(B*a^-4*arctanh(sin(x))+1//7*(a+a*cos(x))^-4*(A+-1B)*sin(x)+1//35*a^-1*(a+a*cos(x))^-3*(-10B+3A)*sin(x)+1//105*a^-4*(1+cos(x))^-1*(-160B+6A)*sin(x)+1//105*a^-4*(1+cos(x))^-2*(-55B+6A)*sin(x))
@test integrate((a+a*cos(x))^5//2*(A+B*sec(x)), x) == :(2*B*a^5//2*arctanh(a^(1/2)*(a+a*cos(x))^-1//2*sin(x))+2//5*A*a*(a+a*cos(x))^3//2*sin(x)+2//15*a^2*(a+a*cos(x))^(1/2)*(5B+8A)*sin(x)+2//15*a^3*(a+a*cos(x))^-1//2*(32A+35B)*sin(x))
@test integrate((a+a*cos(x))^3//2*(A+B*sec(x)), x) == :(2*B*a^3//2*arctanh(a^(1/2)*(a+a*cos(x))^-1//2*sin(x))+2//3*A*a*(a+a*cos(x))^(1/2)*sin(x)+2//3*a^2*(a+a*cos(x))^-1//2*(3B+4A)*sin(x))
@test integrate((a+a*cos(x))^(1/2)*(A+B*sec(x)), x) == :(2*B*a^(1/2)*arctanh(a^(1/2)*(a+a*cos(x))^-1//2*sin(x))+2*A*a*(a+a*cos(x))^-1//2*sin(x))
@test integrate((a+a*cos(x))^-1//2*(A+B*sec(x)), x) == :(2*B*a^-1//2*arctanh(a^(1/2)*(a+a*cos(x))^-1//2*sin(x))+2^(1/2)*a^-1//2*(A+-1B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(x))^-1//2*sin(x)))
@test integrate((a+a*cos(x))^-3//2*(A+B*sec(x)), x) == :((1/2)*(a+a*cos(x))^-3//2*(A+-1B)*sin(x)+2*B*a^-3//2*arctanh(a^(1/2)*(a+a*cos(x))^-1//2*sin(x))+1//4*2^(1/2)*a^-3//2*(A+-5B)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(x))^-1//2*sin(x)))
@test integrate((a+a*cos(x))^-5//2*(A+B*sec(x)), x) == :(2*B*a^-5//2*arctanh(a^(1/2)*(a+a*cos(x))^-1//2*sin(x))+1//4*(a+a*cos(x))^-5//2*(A+-1B)*sin(x)+1//16*a^-1*(a+a*cos(x))^-3//2*(-11B+3A)*sin(x)+1//32*2^(1/2)*a^-5//2*(-43B+3A)*arctanh((1/2)*2^(1/2)*a^(1/2)*(a+a*cos(x))^-1//2*sin(x)))
@test integrate(x*(a+b*sin(x))^-2*(b+a*sin(x)), x) == :(b^-1*log(a+b*sin(x))+-1*x*(a+b*sin(x))^-1*cos(x))
@test integrate(x*(a+b*cos(x))^-2*(b+a*cos(x)), x) == :(b^-1*log(a+b*cos(x))+x*(a+b*cos(x))^-1*sin(x))
@test integrate((1+-1*sin(x)^2)^-1*(1+sin(x)^2), x) == :(-1x+2*tan(x))
@test integrate((1+sin(x)^2)^-1*(1+-1*sin(x)^2), x) == :(-1x+x*2^(1/2)+2^(1/2)*arctan((1+2^(1/2)+sin(x)^2)^-1*cos(x)*sin(x)))
@test integrate((1+-1*cos(x)^2)^-1*(1+cos(x)^2), x) == :(-1x+-2*cot(x))
@test integrate((1+cos(x)^2)^-1*(1+-1*cos(x)^2), x) == :(-1x+x*2^(1/2)+-1*2^(1/2)*arctan((1+2^(1/2)+cos(x)^2)^-1*cos(x)*sin(x)))
@test integrate((c+d*cos(x))^-1*(-1+sin(x)^2+c^2*d^-2), x) == :(-1*d^-1*sin(x)+c*x*d^-2)
@test integrate((c+d*cos(x))^-1*(a+b*sin(x)^2), x) == :(-1*b*d^-1*sin(x)+b*c*x*d^-2+2*a*(c+d)^-1//2*(c+-1d)^-1//2*arctan((c+d)^-1//2*(c+-1d)^(1/2)*tan((1/2)*x))+-2*b*d^-2*(c+d)^(1/2)*(c+-1d)^(1/2)*arctan((c+d)^-1//2*(c+-1d)^(1/2)*tan((1/2)*x)))
@test integrate((c+c*cos(x)^2)^-1*(a+b*sin(x)^2), x) == :(-1*b*x*c^-1+(1/2)*x*2^(1/2)*c^-1*(a+2b)+-1//2*2^(1/2)*c^-1*(a+2b)*arctan((1+2^(1/2)+cos(x)^2)^-1*cos(x)*sin(x)))
@test integrate((c+-1*c*cos(x)^2)^-1*(a+b*sin(x)^2), x) == :(b*x*c^-1+-1*a*c^-1*cot(x))
@test integrate((c+d*cos(x)^2)^-1*(a+b*sin(x)^2), x) == :(-1*b*x*d^-1+c^-1//2*d^-1*(c+d)^-1//2*(a*d+b*(c+d))*arctan(c^(1/2)*(c+d)^-1//2*tan(x)))
@test integrate((c+d*sin(x))^-1*(-1+cos(x)^2+c^2*d^-2), x) == :(d^-1*cos(x)+c*x*d^-2)
@test integrate((c+d*sin(x))^-1*(a+b*cos(x)^2), x) == :(b*d^-1*cos(x)+2*a*(c^2+-1*d^2)^-1//2*arctan((c^2+-1*d^2)^-1//2*(d+c*tan((1/2)*x)))+b*c*x*d^-2+-2*b*d^-2*(c^2+-1*d^2)^(1/2)*arctan((c^2+-1*d^2)^-1//2*(d+c*tan((1/2)*x))))
@test integrate((c+c*sin(x)^2)^-1*(a+b*cos(x)^2), x) == :(-1*b*x*c^-1+(1/2)*x*2^(1/2)*c^-1*(a+2b)+(1/2)*2^(1/2)*c^-1*(a+2b)*arctan((1+2^(1/2)+sin(x)^2)^-1*cos(x)*sin(x)))
@test integrate((c+-1*c*sin(x)^2)^-1*(a+b*cos(x)^2), x) == :(a*c^-1*tan(x)+b*x*c^-1)
@test integrate((c+d*sin(x)^2)^-1*(a+b*cos(x)^2), x) == :(-1*b*x*d^-1+c^-1//2*d^-1*(c+d)^-1//2*(a*d+b*(c+d))*arctan(c^-1//2*(c+d)^(1/2)*tan(x)))
@test integrate((c+d*cos(x))^-1*(a+b*sec(x)^2), x) == :(b*c^-1*tan(x)+-1*b*d*c^-2*arctanh(sin(x))+c^-2*(c+d)^-1//2*(c+-1d)^-1//2*(2*a*c^2+2*b*d^2)*arctan((c+d)^-1//2*(c+-1d)^(1/2)*tan((1/2)*x)))
@test integrate((c+d*sin(x))^-1*(a+b*csc(x)^2), x) == :(-1*b*c^-1*cot(x)+b*d*c^-2*arctanh(cos(x))+c^-2*(c^2+-1*d^2)^-1//2*(2*a*c^2+2*b*d^2)*arctan((c^2+-1*d^2)^-1//2*(d+c*tan((1/2)*x))))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^7, x) == :(1//7*d^-1*(b*cos(c+d*x)+-1*a*sin(c+d*x))^7+d^-1*(a^2+b^2)^2*(b*cos(c+d*x)+-1*a*sin(c+d*x))^3+-1*d^-1*(a^2+b^2)^3*(b*cos(c+d*x)+-1*a*sin(c+d*x))+-1//5*d^-1*(b*cos(c+d*x)+-1*a*sin(c+d*x))^5*(3*a^2+3*b^2))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^6, x) == :(5//16*x*(a^2+b^2)^3+-1//6*d^-1*(a*cos(c+d*x)+b*sin(c+d*x))^5*(b*cos(c+d*x)+-1*a*sin(c+d*x))+-5//16*d^-1*(a^2+b^2)^2*(a*cos(c+d*x)+b*sin(c+d*x))*(b*cos(c+d*x)+-1*a*sin(c+d*x))+-1//24*d^-1*(a*cos(c+d*x)+b*sin(c+d*x))^3*(5*a^2+5*b^2)*(b*cos(c+d*x)+-1*a*sin(c+d*x)))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^5, x) == :(-1//5*d^-1*(b*cos(c+d*x)+-1*a*sin(c+d*x))^5+-1*d^-1*(a^2+b^2)^2*(b*cos(c+d*x)+-1*a*sin(c+d*x))+1//3*d^-1*(b*cos(c+d*x)+-1*a*sin(c+d*x))^3*(2*a^2+2*b^2))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^4, x) == :(3//8*x*(a^2+b^2)^2+-1//4*d^-1*(a*cos(c+d*x)+b*sin(c+d*x))^3*(b*cos(c+d*x)+-1*a*sin(c+d*x))+-1//8*d^-1*(3*a^2+3*b^2)*(a*cos(c+d*x)+b*sin(c+d*x))*(b*cos(c+d*x)+-1*a*sin(c+d*x)))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^3, x) == :(1//3*d^-1*(b*cos(c+d*x)+-1*a*sin(c+d*x))^3+-1*d^-1*(a^2+b^2)*(b*cos(c+d*x)+-1*a*sin(c+d*x)))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^2, x) == :(x*((1/2)*a^2+(1/2)*b^2)+-1//2*d^-1*(a*cos(c+d*x)+b*sin(c+d*x))*(b*cos(c+d*x)+-1*a*sin(c+d*x)))
@test integrate(a*cos(c+d*x)+b*sin(c+d*x), x) == :(a*d^-1*sin(c+d*x)+-1*b*d^-1*cos(c+d*x))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-1, x) == :(-1*d^-1*(a^2+b^2)^-1//2*arctanh((a^2+b^2)^-1//2*(b*cos(c+d*x)+-1*a*sin(c+d*x))))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-2, x) == :(a^-1*d^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-1*sin(c+d*x))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-3, x) == :(-1//2*d^-1*(a^2+b^2)^-3//2*arctanh((a^2+b^2)^-1//2*(b*cos(c+d*x)+-1*a*sin(c+d*x)))+-1*d^-1*(2*a^2+2*b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-2*(b*cos(c+d*x)+-1*a*sin(c+d*x)))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-4, x) == :(-1*d^-1*(3*a^2+3*b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-3*(b*cos(c+d*x)+-1*a*sin(c+d*x))+2//3*a^-1*d^-1*(a^2+b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-1*sin(c+d*x))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-5, x) == :(-3//8*d^-1*(a^2+b^2)^-5//2*arctanh((a^2+b^2)^-1//2*(b*cos(c+d*x)+-1*a*sin(c+d*x)))+-1*d^-1*(4*a^2+4*b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-4*(b*cos(c+d*x)+-1*a*sin(c+d*x))+-1//8*d^-1*(a^2+b^2)^-2*(a*cos(c+d*x)+b*sin(c+d*x))^-2*(-3*a*sin(c+d*x)+3*b*cos(c+d*x)))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-6, x) == :(-1*d^-1*(5*a^2+5*b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-5*(b*cos(c+d*x)+-1*a*sin(c+d*x))+-1//15*d^-1*(a^2+b^2)^-2*(a*cos(c+d*x)+b*sin(c+d*x))^-3*(-4*a*sin(c+d*x)+4*b*cos(c+d*x))+8//15*a^-1*d^-1*(a^2+b^2)^-2*(a*cos(c+d*x)+b*sin(c+d*x))^-1*sin(c+d*x))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^7//2, x) == :(-1//7*d^-1*(a*cos(c+d*x)+b*sin(c+d*x))^5//2*(-2*a*sin(c+d*x)+2*b*cos(c+d*x))+-1//21*d^-1*(a*cos(c+d*x)+b*sin(c+d*x))^(1/2)*(10*a^2+10*b^2)*(b*cos(c+d*x)+-1*a*sin(c+d*x))+10//21*d^-1*((a^2+b^2)^-1//2*(a*cos(c+d*x)+b*sin(c+d*x)))^(1/2)*(a^2+b^2)^2*(a*cos(c+d*x)+b*sin(c+d*x))^-1//2*Elliptic.F((1/2)*c+-1//2*atan(b,a)+(1/2)*d*x,2))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^5//2, x) == :(-1//5*d^-1*(a*cos(c+d*x)+b*sin(c+d*x))^3//2*(-2*a*sin(c+d*x)+2*b*cos(c+d*x))+1//5*d^-1*((a^2+b^2)^-1//2*(a*cos(c+d*x)+b*sin(c+d*x)))^-1//2*(a*cos(c+d*x)+b*sin(c+d*x))^(1/2)*(6*a^2+6*b^2)*Elliptic.E((1/2)*c+-1//2*atan(b,a)+(1/2)*d*x,2))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^3//2, x) == :(-1//3*d^-1*(a*cos(c+d*x)+b*sin(c+d*x))^(1/2)*(-2*a*sin(c+d*x)+2*b*cos(c+d*x))+1//3*d^-1*((a^2+b^2)^-1//2*(a*cos(c+d*x)+b*sin(c+d*x)))^(1/2)*(a*cos(c+d*x)+b*sin(c+d*x))^-1//2*(2*a^2+2*b^2)*Elliptic.F((1/2)*c+-1//2*atan(b,a)+(1/2)*d*x,2))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^(1/2), x) == :(2*d^-1*((a^2+b^2)^-1//2*(a*cos(c+d*x)+b*sin(c+d*x)))^-1//2*(a*cos(c+d*x)+b*sin(c+d*x))^(1/2)*Elliptic.E((1/2)*c+-1//2*atan(b,a)+(1/2)*d*x,2))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-1//2, x) == :(2*d^-1*((a^2+b^2)^-1//2*(a*cos(c+d*x)+b*sin(c+d*x)))^(1/2)*(a*cos(c+d*x)+b*sin(c+d*x))^-1//2*Elliptic.F((1/2)*c+-1//2*atan(b,a)+(1/2)*d*x,2))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-3//2, x) == :(-1*d^-1*(a^2+b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-1//2*(-2*a*sin(c+d*x)+2*b*cos(c+d*x))+-2*d^-1*((a^2+b^2)^-1//2*(a*cos(c+d*x)+b*sin(c+d*x)))^-1//2*(a^2+b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^(1/2)*Elliptic.E((1/2)*c+-1//2*atan(b,a)+(1/2)*d*x,2))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-5//2, x) == :(-1*d^-1*(3*a^2+3*b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-3//2*(-2*a*sin(c+d*x)+2*b*cos(c+d*x))+2*d^-1*((a^2+b^2)^-1//2*(a*cos(c+d*x)+b*sin(c+d*x)))^(1/2)*(3*a^2+3*b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-1//2*Elliptic.F((1/2)*c+-1//2*atan(b,a)+(1/2)*d*x,2))
@test integrate((a*cos(c+d*x)+b*sin(c+d*x))^-7//2, x) == :(-1*d^-1*(5*a^2+5*b^2)^-1*(a*cos(c+d*x)+b*sin(c+d*x))^-5//2*(-2*a*sin(c+d*x)+2*b*cos(c+d*x))+-1//5*d^-1*(a^2+b^2)^-2*(a*cos(c+d*x)+b*sin(c+d*x))^-1//2*(-6*a*sin(c+d*x)+6*b*cos(c+d*x))+-6//5*d^-1*((a^2+b^2)^-1//2*(a*cos(c+d*x)+b*sin(c+d*x)))^-1//2*(a^2+b^2)^-2*(a*cos(c+d*x)+b*sin(c+d*x))^(1/2)*Elliptic.E((1/2)*c+-1//2*atan(b,a)+(1/2)*d*x,2))
@test integrate((2*cos(c+d*x)+3*sin(c+d*x))^7//2, x) == :(-1//7*d^-1*(2*cos(c+d*x)+3*sin(c+d*x))^5//2*(-4*sin(c+d*x)+6*cos(c+d*x))+-1//21*d^-1*(2*cos(c+d*x)+3*sin(c+d*x))^(1/2)*(-260*sin(c+d*x)+390*cos(c+d*x))+130//21*13^3//4*d^-1*Elliptic.F((1/2)*c+-1//2*arctan(3//2)+(1/2)*d*x,2))
@test integrate((2*cos(c+d*x)+3*sin(c+d*x))^5//2, x) == :(-1//5*d^-1*(2*cos(c+d*x)+3*sin(c+d*x))^3//2*(-4*sin(c+d*x)+6*cos(c+d*x))+78//5*13^1//4*d^-1*Elliptic.E((1/2)*c+-1//2*arctan(3//2)+(1/2)*d*x,2))
@test integrate((2*cos(c+d*x)+3*sin(c+d*x))^3//2, x) == :(-1//3*d^-1*(2*cos(c+d*x)+3*sin(c+d*x))^(1/2)*(-4*sin(c+d*x)+6*cos(c+d*x))+2//3*13^3//4*d^-1*Elliptic.F((1/2)*c+-1//2*arctan(3//2)+(1/2)*d*x,2))
@test integrate((2*cos(c+d*x)+3*sin(c+d*x))^(1/2), x) == :(2*13^1//4*d^-1*Elliptic.E((1/2)*c+-1//2*arctan(3//2)+(1/2)*d*x,2))
@test integrate((2*cos(c+d*x)+3*sin(c+d*x))^-1//2, x) == :(2//13*13^3//4*d^-1*Elliptic.F((1/2)*c+-1//2*arctan(3//2)+(1/2)*d*x,2))
@test integrate((2*cos(c+d*x)+3*sin(c+d*x))^-3//2, x) == :(-2//13*13^1//4*d^-1*Elliptic.E((1/2)*c+-1//2*arctan(3//2)+(1/2)*d*x,2)+-1//13*d^-1*(2*cos(c+d*x)+3*sin(c+d*x))^-1//2*(-4*sin(c+d*x)+6*cos(c+d*x)))
@test integrate((2*cos(c+d*x)+3*sin(c+d*x))^-5//2, x) == :(-1//39*d^-1*(2*cos(c+d*x)+3*sin(c+d*x))^-3//2*(-4*sin(c+d*x)+6*cos(c+d*x))+2//507*13^3//4*d^-1*Elliptic.F((1/2)*c+-1//2*arctan(3//2)+(1/2)*d*x,2))
@test integrate((2*cos(c+d*x)+3*sin(c+d*x))^-7//2, x) == :(-6//845*13^1//4*d^-1*Elliptic.E((1/2)*c+-1//2*arctan(3//2)+(1/2)*d*x,2)+-1//65*d^-1*(2*cos(c+d*x)+3*sin(c+d*x))^-5//2*(-4*sin(c+d*x)+6*cos(c+d*x))+-1//845*d^-1*(2*cos(c+d*x)+3*sin(c+d*x))^-1//2*(-12*sin(c+d*x)+18*cos(c+d*x)))
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^n, x) == :(-1*im*d^-1*n^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^n)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^4, x) == :(-1//4*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^4)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^3, x) == :(-1//3*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^3)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^2, x) == :(-1//2*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^2)
@test integrate(a*cos(c+d*x)+im*a*sin(c+d*x), x) == :(a*d^-1*sin(c+d*x)+-1*im*a*d^-1*cos(c+d*x))
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^-1, x) == :(im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^-1)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^-2, x) == :((1/2)*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^-2)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^-3, x) == :(1//3*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^-3)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^-4, x) == :(1//4*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^-4)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^5//2, x) == :(-2//5*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^5//2)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^3//2, x) == :(-2//3*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^3//2)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^(1/2), x) == :(-2*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^(1/2))
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^-1//2, x) == :(2*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^-1//2)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^-3//2, x) == :(2//3*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^-3//2)
@test integrate((a*cos(c+d*x)+im*a*sin(c+d*x))^-5//2, x) == :(2//5*im*d^-1*(a*cos(c+d*x)+im*a*sin(c+d*x))^-5//2)
@test integrate((a*sec(x)+b*tan(x))^5, x) == :(-1//16*(a+b)^3*(3*a^2+8*b^2+-9*a*b)*log(1+-1*sin(x))+1//4*(a+b*sin(x))^4*sec(x)^4*(b+a*sin(x))+1//8*(a+b*sin(x))^2*sec(x)^2*(2*b*(a^2+-2*b^2)+a*(-5*b^2+3*a^2)*sin(x))+1//16*(a+-1b)^3*(3*a^2+8*b^2+9*a*b)*log(1+sin(x))+-1//8*a*b^4*(7+-3*a^2*b^-2)*sin(x))
@test integrate((a*sec(x)+b*tan(x))^4, x) == :(x*b^4+-1//3*(a+b*sin(x))^2*(a*b+-1*(-3*b^2+2*a^2)*sin(x))*sec(x)+1//3*(a+b*sin(x))^3*sec(x)^3*(b+a*sin(x))+1//3*b^2*(-3*b^2+2*a^2)*cos(x)*sin(x)+4//3*a*b*(a^2+-2*b^2)*cos(x))
@test integrate((a*sec(x)+b*tan(x))^3, x) == :((a+b)^2*((1/2)*b+-1//4*a)*log(1+-1*sin(x))+(1/2)*a*b^2*sin(x)+(1/2)*(a+b*sin(x))^2*sec(x)^2*(b+a*sin(x))+1//4*(a+-1b)^2*(a+2b)*log(1+sin(x)))
@test integrate((a*sec(x)+b*tan(x))^2, x) == :(-1*x*b^2+a*b*cos(x)+(a+b*sin(x))*(b+a*sin(x))*sec(x))
@test integrate(a*sec(x)+b*tan(x), x) == :(a*arctanh(sin(x))+-1*b*log(cos(x)))
@test integrate((a*sec(x)+b*tan(x))^-1, x) == :(b^-1*log(a+b*sin(x)))
@test integrate((a*sec(x)+b*tan(x))^-2, x) == :(-1*x*b^-2+-1*b^-1*(a+b*sin(x))^-1*cos(x)+2*a*b^-2*(a^2+-1*b^2)^-1//2*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*x))))
@test integrate((a*sec(x)+b*tan(x))^-3, x) == :(-1*b^-3*log(a+b*sin(x))+(1/2)*b^-3*(a+b*sin(x))^-2*(a^2+-1*b^2)+-2*a*b^-3*(a+b*sin(x))^-1)
@test integrate((a*sec(x)+b*tan(x))^-4, x) == :(x*b^-4+-1//3*b^-1*(a+b*sin(x))^-3*cos(x)^3+(1/2)*a*b^-1*(a+b*sin(x))^-2*(a^2+-1*b^2)^-1*cos(x)^3+(1/2)*b^-3*(a+b*sin(x))^-1*(a^2+-1*b^2)^-1*(-2*b^2+2*a^2+a*b*sin(x))*cos(x)+-1*a*b^-4*(a^2+-1*b^2)^-3//2*(-3*b^2+2*a^2)*arctan((a^2+-1*b^2)^-1//2*(b+a*tan((1/2)*x))))
@test integrate((a*sec(x)+b*tan(x))^-5, x) == :(b^-5*log(a+b*sin(x))+-1*b^-5*(a+b*sin(x))^-2*(-1*b^2+3*a^2)+4*a*b^-5*(a+b*sin(x))^-1+-1//4*b^-5*(a+b*sin(x))^-4*(a^2+-1*b^2)^2+4//3*a*b^-5*(a+b*sin(x))^-3*(a^2+-1*b^2))
@test integrate((sec(x)+tan(x))^5, x) == :(-1*log(1+-1*sin(x))+-4*(1+-1*sin(x))^-1+2*(1+-1*sin(x))^-2)
@test integrate((sec(x)+tan(x))^4, x) == :(x+-2*(1+-1*sin(x))^-1*cos(x)+2//3*(1+-1*sin(x))^-3*cos(x)^3)
@test integrate((sec(x)+tan(x))^3, x) == :(2*(1+-1*sin(x))^-1+log(1+-1*sin(x)))
@test integrate((sec(x)+tan(x))^2, x) == :(-1x+2*(1+-1*sin(x))^-1*cos(x))
@test integrate((sec(x)+tan(x))^-1, x) == :(log(1+sin(x)))
@test integrate((sec(x)+tan(x))^-2, x) == :(-1x+-2*(1+sin(x))^-1*cos(x))
@test integrate((sec(x)+tan(x))^-3, x) == :(-1*log(1+sin(x))+-2*(1+sin(x))^-1)
@test integrate((sec(x)+tan(x))^-4, x) == :(x+2*(1+sin(x))^-1*cos(x)+-2//3*(1+sin(x))^-3*cos(x)^3)
@test integrate((sec(x)+tan(x))^-5, x) == :(-2*(1+sin(x))^-2+4*(1+sin(x))^-1+log(1+sin(x)))
@test integrate((a*cot(x)+b*csc(x))^5, x) == :(-1//4*(b+a*cos(x))^4*csc(x)^4*(a+b*cos(x))+1//8*(b+a*cos(x))^2*csc(x)^2*(2*a*(-1*b^2+2*a^2)+b*(-3*b^2+5*a^2)*cos(x))+1//16*(a+b)^3*(3*b^2+8*a^2+-9*a*b)*log(1+-1*cos(x))+1//16*(a+-1b)^3*(3*b^2+8*a^2+9*a*b)*log(1+cos(x))+1//8*b*a^2*(-3*b^2+7*a^2)*cos(x))
@test integrate((a*cot(x)+b*csc(x))^4, x) == :(x*a^4+-1//3*(b+a*cos(x))^3*csc(x)^3*(a+b*cos(x))+1//3*(b+a*cos(x))^2*(a*b+(-2*b^2+3*a^2)*cos(x))*csc(x)+1//3*a^2*(-2*b^2+3*a^2)*cos(x)*sin(x)+4//3*a*b*(-1*b^2+2*a^2)*sin(x))
@test integrate((a*cot(x)+b*csc(x))^3, x) == :(-1*(a+b)^2*((1/2)*a+-1//4*b)*log(1+-1*cos(x))+-1//2*b*a^2*cos(x)+-1//2*(b+a*cos(x))^2*csc(x)^2*(a+b*cos(x))+-1//4*(a+-1b)^2*(b+2a)*log(1+cos(x)))
@test integrate((a*cot(x)+b*csc(x))^2, x) == :(-1*x*a^2+-1*a*b*sin(x)+-1*(a+b*cos(x))*(b+a*cos(x))*csc(x))
@test integrate(a*cot(x)+b*csc(x), x) == :(a*log(sin(x))+-1*b*arctanh(cos(x)))
@test integrate((a*cot(x)+b*csc(x))^-1, x) == :(-1*a^-1*log(b+a*cos(x)))
@test integrate((a*cot(x)+b*csc(x))^-2, x) == :(-1*x*a^-2+a^-1*(b+a*cos(x))^-1*sin(x)+2*b*a^-2*(a+b)^-1//2*(a+-1b)^-1//2*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*x)))
@test integrate((a*cot(x)+b*csc(x))^-3, x) == :(a^-3*log(b+a*cos(x))+(1/2)*a^-3*(b+a*cos(x))^-2*(a^2+-1*b^2)+2*b*a^-3*(b+a*cos(x))^-1)
@test integrate((a*cot(x)+b*csc(x))^-4, x) == :(x*a^-4+1//3*a^-1*(b+a*cos(x))^-3*sin(x)^3+(1/2)*b*a^-1*(b+a*cos(x))^-2*(a^2+-1*b^2)^-1*sin(x)^3+-1//2*a^-3*(b+a*cos(x))^-1*(a^2+-1*b^2)^-1*(-2*b^2+2*a^2+-1*a*b*cos(x))*sin(x)+-1*b*a^-4*(a+b)^-3//2*(a+-1b)^-3//2*(-2*b^2+3*a^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*x)))
@test integrate((a*cot(x)+b*csc(x))^-5, x) == :(-1*a^-5*log(b+a*cos(x))+-1*a^-5*(b+a*cos(x))^-2*(a^2+-3*b^2)+-4*b*a^-5*(b+a*cos(x))^-1+1//4*a^-5*(b+a*cos(x))^-4*(a^2+-1*b^2)^2+4//3*b*a^-5*(b+a*cos(x))^-3*(a^2+-1*b^2))
@test integrate((cot(x)+csc(x))^5, x) == :(-2*(1+-1*cos(x))^-2+4*(1+-1*cos(x))^-1+log(1+-1*cos(x)))
@test integrate((cot(x)+csc(x))^4, x) == :(x+2*(1+-1*cos(x))^-1*sin(x)+-2//3*(1+-1*cos(x))^-3*sin(x)^3)
@test integrate((cot(x)+csc(x))^3, x) == :(-1*log(1+-1*cos(x))+-2*(1+-1*cos(x))^-1)
@test integrate((cot(x)+csc(x))^2, x) == :(-1x+-2*(1+-1*cos(x))^-1*sin(x))
@test integrate(cot(x)+csc(x), x) == :(-1*arctanh(cos(x))+log(sin(x)))
@test integrate((cot(x)+csc(x))^-1, x) == :(-1*log(1+cos(x)))
@test integrate((cot(x)+csc(x))^-2, x) == :(-1x+2*(1+cos(x))^-1*sin(x))
@test integrate((cot(x)+csc(x))^-3, x) == :(2*(1+cos(x))^-1+log(1+cos(x)))
@test integrate((cot(x)+csc(x))^-4, x) == :(x+-2*(1+cos(x))^-1*sin(x)+2//3*(1+cos(x))^-3*sin(x)^3)
@test integrate((cot(x)+csc(x))^-5, x) == :(-1*log(1+cos(x))+-4*(1+cos(x))^-1+2*(1+cos(x))^-2)
@test integrate((-1*sin(x)+csc(x))^4, x) == :(-35//24*cot(x)^3+35//8*x+35//8*cot(x)+1//4*cos(x)^4*cot(x)^3+7//8*cos(x)^2*cot(x)^3)
@test integrate((-1*sin(x)+csc(x))^3, x) == :(-5//2*cos(x)+-5//6*cos(x)^3+5//2*arctanh(cos(x))+-1//2*cos(x)^3*cot(x)^2)
@test integrate((-1*sin(x)+csc(x))^2, x) == :(-3//2*x+-3//2*cot(x)+(1/2)*cos(x)^2*cot(x))
@test integrate(-1*sin(x)+csc(x), x) == :(-1*arctanh(cos(x))+cos(x))
@test integrate((-1*sin(x)+csc(x))^-1, x) == :(sec(x))
@test integrate((-1*sin(x)+csc(x))^-2, x) == :(1//3*tan(x)^3)
@test integrate((-1*sin(x)+csc(x))^-3, x) == :(-1//3*sec(x)^3+1//5*sec(x)^5)
@test integrate((-1*sin(x)+csc(x))^-4, x) == :(1//5*tan(x)^5+1//7*tan(x)^7)
@test integrate((-1*sin(x)+csc(x))^-5, x) == :(-2//7*sec(x)^7+1//5*sec(x)^5+1//9*sec(x)^9)
@test integrate((-1*sin(x)+csc(x))^-6, x) == :(1//7*tan(x)^7+1//11*tan(x)^11+2//9*tan(x)^9)
@test integrate((-1*sin(x)+csc(x))^-7, x) == :(-3//11*sec(x)^11+-1//7*sec(x)^7+1//3*sec(x)^9+1//13*sec(x)^13)
@test integrate((-1*sin(x)+csc(x))^7//2, x) == :(256//35*(cos(x)*cot(x))^(1/2)*sec(x)+-64//35*(cos(x)*cot(x))^(1/2)*cot(x)*csc(x)+2//7*(cos(x)*cot(x))^(1/2)*cos(x)^3*cot(x)^2+8//7*(cos(x)*cot(x))^(1/2)*cot(x)^2*cos(x))
@test integrate((-1*sin(x)+csc(x))^5//2, x) == :(-64//15*(cos(x)*cot(x))^(1/2)*tan(x)+-16//15*(cos(x)*cot(x))^(1/2)*cot(x)+2//5*(cos(x)*cot(x))^(1/2)*cos(x)^2*cot(x))
@test integrate((-1*sin(x)+csc(x))^3//2, x) == :(-8//3*(cos(x)*cot(x))^(1/2)*sec(x)+2//3*(cos(x)*cot(x))^(1/2)*cos(x))
@test integrate((-1*sin(x)+csc(x))^(1/2), x) == :(2*(cos(x)*cot(x))^(1/2)*tan(x))
@test integrate((-1*sin(x)+csc(x))^-1//2, x) == :((-1*sin(x))^-1//2*(cos(x)*cot(x))^-1//2*arctan((-1*sin(x))^(1/2))*cos(x)+-1*(-1*sin(x))^-1//2*(cos(x)*cot(x))^-1//2*arctanh((-1*sin(x))^(1/2))*cos(x))
@test integrate((-1*sin(x)+csc(x))^-3//2, x) == :((1/2)*(cos(x)*cot(x))^-1//2*sec(x)+1//4*(-1*sin(x))^(1/2)*(cos(x)*cot(x))^-1//2*arctan((-1*sin(x))^(1/2))*cot(x)+1//4*(-1*sin(x))^(1/2)*(cos(x)*cot(x))^-1//2*arctanh((-1*sin(x))^(1/2))*cot(x))
@test integrate((-1*sin(x)+csc(x))^-5//2, x) == :(-3//16*(cos(x)*cot(x))^-1//2*tan(x)+1//4*(cos(x)*cot(x))^-1//2*sec(x)^2*tan(x)+-3//32*(-1*sin(x))^-1//2*(cos(x)*cot(x))^-1//2*arctan((-1*sin(x))^(1/2))*cos(x)+3//32*(-1*sin(x))^-1//2*(cos(x)*cot(x))^-1//2*arctanh((-1*sin(x))^(1/2))*cos(x))
@test integrate((-1*sin(x)+csc(x))^-7//2, x) == :(-5//48*(cos(x)*cot(x))^-1//2*sec(x)^3+5//192*(cos(x)*cot(x))^-1//2*sec(x)+1//6*(cos(x)*cot(x))^-1//2*sec(x)^3*tan(x)^2+-5//128*(-1*sin(x))^(1/2)*(cos(x)*cot(x))^-1//2*arctan((-1*sin(x))^(1/2))*cot(x)+-5//128*(-1*sin(x))^(1/2)*(cos(x)*cot(x))^-1//2*arctanh((-1*sin(x))^(1/2))*cot(x))
@test integrate((-1*cos(x)+sec(x))^4, x) == :(-35//8*tan(x)+35//8*x+35//24*tan(x)^3+-7//8*sin(x)^2*tan(x)^3+-1//4*sin(x)^4*tan(x)^3)
@test integrate((-1*cos(x)+sec(x))^3, x) == :(-5//2*arctanh(sin(x))+5//2*sin(x)+5//6*sin(x)^3+(1/2)*sin(x)^3*tan(x)^2)
@test integrate((-1*cos(x)+sec(x))^2, x) == :(-3//2*x+3//2*tan(x)+-1//2*sin(x)^2*tan(x))
@test integrate(-1*cos(x)+sec(x), x) == :(-1*sin(x)+arctanh(sin(x)))
@test integrate((-1*cos(x)+sec(x))^-1, x) == :(-1*csc(x))
@test integrate((-1*cos(x)+sec(x))^-2, x) == :(-1//3*cot(x)^3)
@test integrate((-1*cos(x)+sec(x))^-3, x) == :(-1//5*csc(x)^5+1//3*csc(x)^3)
@test integrate((-1*cos(x)+sec(x))^-4, x) == :(-1//5*cot(x)^5+-1//7*cot(x)^7)
@test integrate((-1*cos(x)+sec(x))^-5, x) == :(-1//5*csc(x)^5+-1//9*csc(x)^9+2//7*csc(x)^7)
@test integrate((-1*cos(x)+sec(x))^-6, x) == :(-2//9*cot(x)^9+-1//7*cot(x)^7+-1//11*cot(x)^11)
@test integrate((-1*cos(x)+sec(x))^-7, x) == :(-1//3*csc(x)^9+-1//13*csc(x)^13+1//7*csc(x)^7+3//11*csc(x)^11)
@test integrate((-1*cos(x)+sec(x))^7//2, x) == :(-256//35*(sin(x)*tan(x))^(1/2)*csc(x)+-8//7*(sin(x)*tan(x))^(1/2)*tan(x)^2*sin(x)+-2//7*(sin(x)*tan(x))^(1/2)*sin(x)^3*tan(x)^2+64//35*(sin(x)*tan(x))^(1/2)*sec(x)*tan(x))
@test integrate((-1*cos(x)+sec(x))^5//2, x) == :(16//15*(sin(x)*tan(x))^(1/2)*tan(x)+64//15*(sin(x)*tan(x))^(1/2)*cot(x)+-2//5*(sin(x)*tan(x))^(1/2)*sin(x)^2*tan(x))
@test integrate((-1*cos(x)+sec(x))^3//2, x) == :(-2//3*(sin(x)*tan(x))^(1/2)*sin(x)+8//3*(sin(x)*tan(x))^(1/2)*csc(x))
@test integrate((-1*cos(x)+sec(x))^(1/2), x) == :(-2*(sin(x)*tan(x))^(1/2)*cot(x))
@test integrate((-1*cos(x)+sec(x))^-1//2, x) == :((sin(x)*tan(x))^-1//2*cos(x)^-1//2*arctan(cos(x)^(1/2))*sin(x)+-1*(sin(x)*tan(x))^-1//2*cos(x)^-1//2*arctanh(cos(x)^(1/2))*sin(x))
@test integrate((-1*cos(x)+sec(x))^-3//2, x) == :(-1//2*(sin(x)*tan(x))^-1//2*csc(x)+1//4*(sin(x)*tan(x))^-1//2*cos(x)^-1//2*arctan(cos(x)^(1/2))*sin(x)+1//4*(sin(x)*tan(x))^-1//2*cos(x)^-1//2*arctanh(cos(x)^(1/2))*sin(x))
@test integrate((-1*cos(x)+sec(x))^-5//2, x) == :(3//16*(sin(x)*tan(x))^-1//2*cot(x)+-1//4*(sin(x)*tan(x))^-1//2*csc(x)^2*cot(x)+-3//32*(sin(x)*tan(x))^-1//2*cos(x)^-1//2*arctan(cos(x)^(1/2))*sin(x)+3//32*(sin(x)*tan(x))^-1//2*cos(x)^-1//2*arctanh(cos(x)^(1/2))*sin(x))
@test integrate((-1*cos(x)+sec(x))^-7//2, x) == :(-5//192*(sin(x)*tan(x))^-1//2*csc(x)+5//48*(sin(x)*tan(x))^-1//2*csc(x)^3+-1//6*(sin(x)*tan(x))^-1//2*cot(x)^2*csc(x)^3+-5//128*(sin(x)*tan(x))^-1//2*cos(x)^-1//2*arctan(cos(x)^(1/2))*sin(x)+-5//128*(sin(x)*tan(x))^-1//2*cos(x)^-1//2*arctanh(cos(x)^(1/2))*sin(x))
@test integrate((sin(x)+tan(x))^4, x) == :(-2*arctanh(sin(x))+5*tan(x)+-61//8*x+-4//3*sin(x)^3+1//3*tan(x)^3+2*sec(x)*tan(x)+1//4*cos(x)^3*sin(x)+19//8*cos(x)*sin(x))
@test integrate((sin(x)+tan(x))^3, x) == :((1/2)*sec(x)^2+-2*log(cos(x))+2*cos(x)+3*sec(x)+1//3*cos(x)^3+3//2*cos(x)^2)
@test integrate((sin(x)+tan(x))^2, x) == :(-2*sin(x)+2*arctanh(sin(x))+-1//2*x+-1//2*cos(x)*sin(x)+tan(x))
@test integrate(sin(x)+tan(x), x) == :(-1*cos(x)+-1*log(cos(x)))
@test integrate((sin(x)+tan(x))^-1, x) == :(-1//2*csc(x)^2+-1//2*arctanh(cos(x))+(1/2)*cot(x)*csc(x))
@test integrate((sin(x)+tan(x))^-2, x) == :(-2//3*csc(x)^3+-2//5*cot(x)^5+-1//3*cot(x)^3+2//5*csc(x)^5)
@test integrate((sin(x)+tan(x))^-3, x) == :(-1*(16+16*cos(x))^-1+-1*(32+-32*cos(x))^-1+-3//32*(1+cos(x))^-2+-1//16*(1+cos(x))^-4+1//6*(1+cos(x))^-3+1//32*arctanh(cos(x)))
@test integrate((sin(x)+tan(x))^-4, x) == :(-20//9*csc(x)^9+-16//9*cot(x)^9+-9//7*cot(x)^7+-8//11*cot(x)^11+-4//5*csc(x)^5+-1//5*cot(x)^5+8//11*csc(x)^11+16//7*csc(x)^7)
@test integrate((b*cos(x)+c*sin(x))^-1*(A+C*sin(x)), x) == :(-1*A*(b^2+c^2)^-1//2*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x)))+C*c*x*(b^2+c^2)^-1+-1*C*b*(b^2+c^2)^-1*log(b*cos(x)+c*sin(x)))
@test integrate((b*cos(x)+c*sin(x))^-2*(A+C*sin(x)), x) == :((b^2+c^2)^-1*(b*cos(x)+c*sin(x))^-1*(C*b+A*b*sin(x)+-1*A*c*cos(x))+-1*C*c*(b^2+c^2)^-3//2*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x))))
@test integrate((b*cos(x)+c*sin(x))^-3*(A+C*sin(x)), x) == :((2*b^2+2*c^2)^-1*(b*cos(x)+c*sin(x))^-2*(C*b+A*b*sin(x)+-1*A*c*cos(x))+-1*(b^2+c^2)^-2*(b*cos(x)+c*sin(x))^-1*(C*c^2*cos(x)+-1*C*b*c*sin(x))+-1//2*A*(b^2+c^2)^-3//2*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x))))
@test integrate((b*cos(x)+c*sin(x))^-1*(A+B*cos(x)), x) == :(-1*A*(b^2+c^2)^-1//2*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x)))+B*b*x*(b^2+c^2)^-1+B*c*(b^2+c^2)^-1*log(b*cos(x)+c*sin(x)))
@test integrate((b*cos(x)+c*sin(x))^-2*(A+B*cos(x)), x) == :(-1*(b^2+c^2)^-1*(b*cos(x)+c*sin(x))^-1*(B*c+A*c*cos(x)+-1*A*b*sin(x))+-1*B*b*(b^2+c^2)^-3//2*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x))))
@test integrate((b*cos(x)+c*sin(x))^-3*(A+B*cos(x)), x) == :(-1*(b^2+c^2)^-2*(b*cos(x)+c*sin(x))^-1*(-1*B*b^2*sin(x)+B*b*c*cos(x))+-1*(2*b^2+2*c^2)^-1*(b*cos(x)+c*sin(x))^-2*(B*c+A*c*cos(x)+-1*A*b*sin(x))+-1//2*A*(b^2+c^2)^-3//2*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x))))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^4, x) == :(35//8*x*(b^2+c^2)^2+-1//4*e^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^3*(c*cos(d+e*x)+-1*b*sin(d+e*x))+-35//8*c*e^-1*(b^2+c^2)^3//2*cos(d+e*x)+-7//12*e^-1*(b^2+c^2)^(1/2)*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^2*(c*cos(d+e*x)+-1*b*sin(d+e*x))+-1//24*e^-1*(35*b^2+35*c^2)*(c*cos(d+e*x)+-1*b*sin(d+e*x))*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))+35//8*b*e^-1*(b^2+c^2)^3//2*sin(d+e*x))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^3, x) == :(5//2*x*(b^2+c^2)^3//2+-1//3*e^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^2*(c*cos(d+e*x)+-1*b*sin(d+e*x))+-5//2*c*e^-1*(b^2+c^2)*cos(d+e*x)+-5//6*e^-1*(b^2+c^2)^(1/2)*(c*cos(d+e*x)+-1*b*sin(d+e*x))*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))+5//2*b*e^-1*(b^2+c^2)*sin(d+e*x))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^2, x) == :((1/2)*x*(3*b^2+3*c^2)+-1//2*e^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))+-3//2*c*e^-1*(b^2+c^2)^(1/2)*cos(d+e*x)+3//2*b*e^-1*(b^2+c^2)^(1/2)*sin(d+e*x))
@test integrate((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x), x) == :(x*(b^2+c^2)^(1/2)+b*e^-1*sin(d+e*x)+-1*c*e^-1*cos(d+e*x))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1, x) == :(-1*c^-1*e^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))^-1*(c+-1*(b^2+c^2)^(1/2)*sin(d+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-2, x) == :(1//3*e^-1*(b^2+c^2)^-1//2*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-2*(b*sin(d+e*x)+-1*c*cos(d+e*x))+-1//3*c^-1*e^-1*(b^2+c^2)^-1//2*(c*cos(d+e*x)+-1*b*sin(d+e*x))^-1*(c+-1*(b^2+c^2)^(1/2)*sin(d+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-3, x) == :(-1*e^-1*(15*b^2+15*c^2)^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-2*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+1//5*e^-1*(b^2+c^2)^-1//2*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-3*(b*sin(d+e*x)+-1*c*cos(d+e*x))+-1//15*c^-1*e^-1*(b^2+c^2)^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))^-1*(2c+-2*(b^2+c^2)^(1/2)*sin(d+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-4, x) == :(-1*e^-1*(35*b^2+35*c^2)^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-3*(-3*b*sin(d+e*x)+3*c*cos(d+e*x))+-1//35*e^-1*(b^2+c^2)^-3//2*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-2*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+1//7*e^-1*(b^2+c^2)^-1//2*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-4*(b*sin(d+e*x)+-1*c*cos(d+e*x))+-1//35*c^-1*e^-1*(b^2+c^2)^-3//2*(c*cos(d+e*x)+-1*b*sin(d+e*x))^-1*(2c+-2*(b^2+c^2)^(1/2)*sin(d+e*x)))
@test integrate((2a+2*a*cos(d+e*x)+2*c*sin(d+e*x))^3, x) == :(4*a*x*(3*c^2+5*a^2)+-1//3*e^-1*(a+a*cos(d+e*x)+c*sin(d+e*x))^2*(-8*a*sin(d+e*x)+8*c*cos(d+e*x))+-1//3*e^-1*(-20*a^2*sin(d+e*x)+20*a*c*cos(d+e*x))*(a+a*cos(d+e*x)+c*sin(d+e*x))+-4//3*c*e^-1*(4*c^2+15*a^2)*cos(d+e*x)+4//3*a*e^-1*(4*c^2+15*a^2)*sin(d+e*x))
@test integrate((2a+2*a*cos(d+e*x)+2*c*sin(d+e*x))^2, x) == :(x*(2*c^2+6*a^2)+-1*e^-1*(-2*a*sin(d+e*x)+2*c*cos(d+e*x))*(a+a*cos(d+e*x)+c*sin(d+e*x))+6*a^2*e^-1*sin(d+e*x)+-6*a*c*e^-1*cos(d+e*x))
@test integrate(2a+2*a*cos(d+e*x)+2*c*sin(d+e*x), x) == :(2*a*x+-2*c*e^-1*cos(d+e*x)+2*a*e^-1*sin(d+e*x))
@test integrate((2a+2*a*cos(d+e*x)+2*c*sin(d+e*x))^-1, x) == :((1/2)*c^-1*e^-1*log(a+c*tan((1/2)*d+(1/2)*e*x)))
@test integrate((2a+2*a*cos(d+e*x)+2*c*sin(d+e*x))^-2, x) == :(-1//4*a*c^-3*e^-1*log(a+c*tan((1/2)*d+(1/2)*e*x))+-1//4*c^-2*e^-1*(a+a*cos(d+e*x)+c*sin(d+e*x))^-1*(c*cos(d+e*x)+-1*a*sin(d+e*x)))
@test integrate((2a+2*a*cos(d+e*x)+2*c*sin(d+e*x))^-3, x) == :(-1//16*c^-2*e^-1*(a+a*cos(d+e*x)+c*sin(d+e*x))^-2*(c*cos(d+e*x)+-1*a*sin(d+e*x))+1//16*c^-5*e^-1*(c^2+3*a^2)*log(a+c*tan((1/2)*d+(1/2)*e*x))+1//16*c^-4*e^-1*(a+a*cos(d+e*x)+c*sin(d+e*x))^-1*(-3*a^2*sin(d+e*x)+3*a*c*cos(d+e*x)))
@test integrate((2a+2*a*cos(d+e*x)+2*c*sin(d+e*x))^-4, x) == :(-1//48*c^-2*e^-1*(a+a*cos(d+e*x)+c*sin(d+e*x))^-3*(c*cos(d+e*x)+-1*a*sin(d+e*x))+-1//96*c^-6*e^-1*(a+a*cos(d+e*x)+c*sin(d+e*x))^-1*(c*(4*c^2+15*a^2)*cos(d+e*x)+-1*a*(4*c^2+15*a^2)*sin(d+e*x))+1//96*c^-4*e^-1*(a+a*cos(d+e*x)+c*sin(d+e*x))^-2*(-5*a^2*sin(d+e*x)+5*a*c*cos(d+e*x))+-1//32*a*c^-7*e^-1*(3*c^2+5*a^2)*log(a+c*tan((1/2)*d+(1/2)*e*x)))
@test integrate((2a+2*a*cos(d+e*x)+2*a*sin(d+e*x))^-1, x) == :((1/2)*a^-1*e^-1*log(1+tan((1/2)*d+(1/2)*e*x)))
@test integrate((2a+2*a*cos(d+e*x)+2*a*sin(d+e*x))^-2, x) == :(-1//4*a^-2*e^-1*log(1+tan((1/2)*d+(1/2)*e*x))+-1//4*e^-1*(a^3+a^3*cos(d+e*x)+a^3*sin(d+e*x))^-1*(a*cos(d+e*x)+-1*a*sin(d+e*x)))
@test integrate((2a+2*a*cos(d+e*x)+2*a*sin(d+e*x))^-3, x) == :(-1//16*e^-1*(a^2+a^2*cos(d+e*x)+a^2*sin(d+e*x))^-2*(a*cos(d+e*x)+-1*a*sin(d+e*x))+1//4*a^-3*e^-1*log(1+tan((1/2)*d+(1/2)*e*x))+1//16*e^-1*(a^3+a^3*cos(d+e*x)+a^3*sin(d+e*x))^-1*(-3*sin(d+e*x)+3*cos(d+e*x)))
@test integrate((2a+2*a*cos(d+e*x)+2*a*sin(d+e*x))^-4, x) == :(-1//4*a^-4*e^-1*log(1+tan((1/2)*d+(1/2)*e*x))+-1//96*e^-1*(a^5+a^5*cos(d+e*x)+a^5*sin(d+e*x))^-1*(-19*a*sin(d+e*x)+19*a*cos(d+e*x))+1//96*e^-1*(a^2+a^2*cos(d+e*x)+a^2*sin(d+e*x))^-2*(-5*sin(d+e*x)+5*cos(d+e*x))+-1//48*a^-1*e^-1*(a+a*cos(d+e*x)+a*sin(d+e*x))^-3*(-1*sin(d+e*x)+cos(d+e*x)))
@test integrate((2a+-2*a*cos(d+e*x)+2*c*sin(d+e*x))^3, x) == :(4*a*x*(3*c^2+5*a^2)+-1//3*e^-1*(a+c*sin(d+e*x)+-1*a*cos(d+e*x))^2*(8*a*sin(d+e*x)+8*c*cos(d+e*x))+-1//3*e^-1*(20*a^2*sin(d+e*x)+20*a*c*cos(d+e*x))*(a+c*sin(d+e*x)+-1*a*cos(d+e*x))+-4//3*a*e^-1*(4*c^2+15*a^2)*sin(d+e*x)+-4//3*c*e^-1*(4*c^2+15*a^2)*cos(d+e*x))
@test integrate((2a+-2*a*cos(d+e*x)+2*c*sin(d+e*x))^2, x) == :(x*(2*c^2+6*a^2)+-1*e^-1*(2*a*sin(d+e*x)+2*c*cos(d+e*x))*(a+c*sin(d+e*x)+-1*a*cos(d+e*x))+-6*a^2*e^-1*sin(d+e*x)+-6*a*c*e^-1*cos(d+e*x))
@test integrate(2a+-2*a*cos(d+e*x)+2*c*sin(d+e*x), x) == :(2*a*x+-2*a*e^-1*sin(d+e*x)+-2*c*e^-1*cos(d+e*x))
@test integrate((2a+-2*a*cos(d+e*x)+2*c*sin(d+e*x))^-1, x) == :(-1//2*c^-1*e^-1*log(a+c*cot((1/2)*d+(1/2)*e*x)))
@test integrate((2a+-2*a*cos(d+e*x)+2*c*sin(d+e*x))^-2, x) == :(-1//4*c^-2*e^-1*(a+c*sin(d+e*x)+-1*a*cos(d+e*x))^-1*(a*sin(d+e*x)+c*cos(d+e*x))+1//4*a*c^-3*e^-1*log(a+c*cot((1/2)*d+(1/2)*e*x)))
@test integrate((2a+-2*a*cos(d+e*x)+2*c*sin(d+e*x))^-3, x) == :(-1//16*c^-5*e^-1*(c^2+3*a^2)*log(a+c*cot((1/2)*d+(1/2)*e*x))+-1//16*c^-2*e^-1*(a+c*sin(d+e*x)+-1*a*cos(d+e*x))^-2*(a*sin(d+e*x)+c*cos(d+e*x))+1//16*c^-4*e^-1*(a+c*sin(d+e*x)+-1*a*cos(d+e*x))^-1*(3*a^2*sin(d+e*x)+3*a*c*cos(d+e*x)))
@test integrate((2a+-2*a*cos(d+e*x)+2*c*sin(d+e*x))^-4, x) == :(-1//48*c^-2*e^-1*(a+c*sin(d+e*x)+-1*a*cos(d+e*x))^-3*(a*sin(d+e*x)+c*cos(d+e*x))+-1//96*c^-6*e^-1*(a+c*sin(d+e*x)+-1*a*cos(d+e*x))^-1*(a*(4*c^2+15*a^2)*sin(d+e*x)+c*(4*c^2+15*a^2)*cos(d+e*x))+1//96*c^-4*e^-1*(a+c*sin(d+e*x)+-1*a*cos(d+e*x))^-2*(5*a^2*sin(d+e*x)+5*a*c*cos(d+e*x))+1//32*a*c^-7*e^-1*(3*c^2+5*a^2)*log(a+c*cot((1/2)*d+(1/2)*e*x)))
@test integrate((2a+2*a*sin(d+e*x)+2*b*cos(d+e*x))^3, x) == :(4*a*x*(3*b^2+5*a^2)+-8//3*e^-1*(a+a*sin(d+e*x)+b*cos(d+e*x))^2*(a*cos(d+e*x)+-1*b*sin(d+e*x))+-1//3*e^-1*(a^2*cos(d+e*x)+-1*a*b*sin(d+e*x))*(20a+20*a*sin(d+e*x)+20*b*cos(d+e*x))+-4//3*a*e^-1*(4*b^2+15*a^2)*cos(d+e*x)+4//3*b*e^-1*(4*b^2+15*a^2)*sin(d+e*x))
@test integrate((2a+2*a*sin(d+e*x)+2*b*cos(d+e*x))^2, x) == :(x*(2*b^2+6*a^2)+-1*e^-1*(a*cos(d+e*x)+-1*b*sin(d+e*x))*(2a+2*a*sin(d+e*x)+2*b*cos(d+e*x))+-6*a^2*e^-1*cos(d+e*x)+6*a*b*e^-1*sin(d+e*x))
@test integrate(2a+2*a*sin(d+e*x)+2*b*cos(d+e*x), x) == :(2*a*x+-2*a*e^-1*cos(d+e*x)+2*b*e^-1*sin(d+e*x))
@test integrate((2a+2*a*sin(d+e*x)+2*b*cos(d+e*x))^-1, x) == :(-1//2*b^-1*e^-1*log(a+b*cot((1/2)*d+1//4*pi+(1/2)*e*x)))
@test integrate((2a+2*a*sin(d+e*x)+2*b*cos(d+e*x))^-2, x) == :(-1//4*b^-2*e^-1*(a+a*sin(d+e*x)+b*cos(d+e*x))^-1*(a*cos(d+e*x)+-1*b*sin(d+e*x))+1//4*a*b^-3*e^-1*log(a+b*cot((1/2)*d+1//4*pi+(1/2)*e*x)))
@test integrate((2a+2*a*sin(d+e*x)+2*b*cos(d+e*x))^-3, x) == :(-1//16*b^-5*e^-1*(b^2+3*a^2)*log(a+b*cot((1/2)*d+1//4*pi+(1/2)*e*x))+-1//16*b^-2*e^-1*(a+a*sin(d+e*x)+b*cos(d+e*x))^-2*(a*cos(d+e*x)+-1*b*sin(d+e*x))+1//16*b^-4*e^-1*(a+a*sin(d+e*x)+b*cos(d+e*x))^-1*(3*a^2*cos(d+e*x)+-3*a*b*sin(d+e*x)))
@test integrate((2a+2*a*sin(d+e*x)+2*b*cos(d+e*x))^-4, x) == :(-1//48*b^-2*e^-1*(a+a*sin(d+e*x)+b*cos(d+e*x))^-3*(a*cos(d+e*x)+-1*b*sin(d+e*x))+-1//96*b^-6*e^-1*(a+a*sin(d+e*x)+b*cos(d+e*x))^-1*(a*(4*b^2+15*a^2)*cos(d+e*x)+-1*b*(4*b^2+15*a^2)*sin(d+e*x))+1//96*b^-4*e^-1*(a+a*sin(d+e*x)+b*cos(d+e*x))^-2*(5*a^2*cos(d+e*x)+-5*a*b*sin(d+e*x))+1//32*a*b^-7*e^-1*(3*b^2+5*a^2)*log(a+b*cot((1/2)*d+1//4*pi+(1/2)*e*x)))
@test integrate((2a+-2*a*sin(d+e*x)+2*b*cos(d+e*x))^3, x) == :(4*a*x*(3*b^2+5*a^2)+1//3*e^-1*(a^2*cos(d+e*x)+a*b*sin(d+e*x))*(20a+-20*a*sin(d+e*x)+20*b*cos(d+e*x))+8//3*e^-1*(a+b*cos(d+e*x)+-1*a*sin(d+e*x))^2*(a*cos(d+e*x)+b*sin(d+e*x))+4//3*a*e^-1*(4*b^2+15*a^2)*cos(d+e*x)+4//3*b*e^-1*(4*b^2+15*a^2)*sin(d+e*x))
@test integrate((2a+-2*a*sin(d+e*x)+2*b*cos(d+e*x))^2, x) == :(x*(2*b^2+6*a^2)+e^-1*(a*cos(d+e*x)+b*sin(d+e*x))*(2a+-2*a*sin(d+e*x)+2*b*cos(d+e*x))+6*a^2*e^-1*cos(d+e*x)+6*a*b*e^-1*sin(d+e*x))
@test integrate(2a+-2*a*sin(d+e*x)+2*b*cos(d+e*x), x) == :(2*a*x+2*a*e^-1*cos(d+e*x)+2*b*e^-1*sin(d+e*x))
@test integrate((2a+-2*a*sin(d+e*x)+2*b*cos(d+e*x))^-1, x) == :((1/2)*b^-1*e^-1*log(a+b*tan((1/2)*d+1//4*pi+(1/2)*e*x)))
@test integrate((2a+-2*a*sin(d+e*x)+2*b*cos(d+e*x))^-2, x) == :(-1//4*a*b^-3*e^-1*log(a+b*tan((1/2)*d+1//4*pi+(1/2)*e*x))+1//4*b^-2*e^-1*(a+b*cos(d+e*x)+-1*a*sin(d+e*x))^-1*(a*cos(d+e*x)+b*sin(d+e*x)))
@test integrate((2a+-2*a*sin(d+e*x)+2*b*cos(d+e*x))^-3, x) == :(-1//16*b^-4*e^-1*(a+b*cos(d+e*x)+-1*a*sin(d+e*x))^-1*(3*a^2*cos(d+e*x)+3*a*b*sin(d+e*x))+1//16*b^-5*e^-1*(b^2+3*a^2)*log(a+b*tan((1/2)*d+1//4*pi+(1/2)*e*x))+1//16*b^-2*e^-1*(a+b*cos(d+e*x)+-1*a*sin(d+e*x))^-2*(a*cos(d+e*x)+b*sin(d+e*x)))
@test integrate((2a+-2*a*sin(d+e*x)+2*b*cos(d+e*x))^-4, x) == :(-1//96*b^-4*e^-1*(a+b*cos(d+e*x)+-1*a*sin(d+e*x))^-2*(5*a^2*cos(d+e*x)+5*a*b*sin(d+e*x))+1//48*b^-2*e^-1*(a+b*cos(d+e*x)+-1*a*sin(d+e*x))^-3*(a*cos(d+e*x)+b*sin(d+e*x))+1//96*b^-6*e^-1*(a+b*cos(d+e*x)+-1*a*sin(d+e*x))^-1*(a*(4*b^2+15*a^2)*cos(d+e*x)+b*(4*b^2+15*a^2)*sin(d+e*x))+-1//32*a*b^-7*e^-1*(3*b^2+5*a^2)*log(a+b*tan((1/2)*d+1//4*pi+(1/2)*e*x)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^4, x) == :(1//8*x*(3*(b^2+c^2)^2+8*a^4+24*a^2*(b^2+c^2))+-1//4*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^3*(c*cos(d+e*x)+-1*b*sin(d+e*x))+-1//12*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^2*(-7*a*b*sin(d+e*x)+7*a*c*cos(d+e*x))+-1//24*e^-1*(c*(9*b^2+9*c^2+26*a^2)*cos(d+e*x)+-1*b*(9*b^2+9*c^2+26*a^2)*sin(d+e*x))*(a+b*cos(d+e*x)+c*sin(d+e*x))+-5//24*a*c*e^-1*(10*a^2+11*b^2+11*c^2)*cos(d+e*x)+5//24*a*b*e^-1*(10*a^2+11*b^2+11*c^2)*sin(d+e*x))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^3, x) == :((1/2)*a*x*(2*a^2+3*b^2+3*c^2)+-1//3*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^2*(c*cos(d+e*x)+-1*b*sin(d+e*x))+-1//6*e^-1*(-5*a*b*sin(d+e*x)+5*a*c*cos(d+e*x))*(a+b*cos(d+e*x)+c*sin(d+e*x))+-1//6*c*e^-1*(4*b^2+4*c^2+11*a^2)*cos(d+e*x)+1//6*b*e^-1*(4*b^2+4*c^2+11*a^2)*sin(d+e*x))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^2, x) == :((1/2)*x*(b^2+c^2+2*a^2)+-1//2*e^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))*(a+b*cos(d+e*x)+c*sin(d+e*x))+-3//2*a*c*e^-1*cos(d+e*x)+3//2*a*b*e^-1*sin(d+e*x))
@test integrate(a+b*cos(d+e*x)+c*sin(d+e*x), x) == :(a*x+b*e^-1*sin(d+e*x)+-1*c*e^-1*cos(d+e*x))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-1, x) == :(2*e^-1*(a^2+-1*b^2+-1*c^2)^-1//2*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*d+(1/2)*e*x))))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-2, x) == :(e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1*(a^2+-1*b^2+-1*c^2)^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))+2*a*e^-1*(a^2+-1*b^2+-1*c^2)^-3//2*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*d+(1/2)*e*x))))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-3, x) == :(e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-2*(-2*b^2+-2*c^2+2*a^2)^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))+e^-1*(a^2+-1*b^2+-1*c^2)^-5//2*(b^2+c^2+2*a^2)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*d+(1/2)*e*x)))+(1/2)*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1*(a^2+-1*b^2+-1*c^2)^-2*(-3*a*b*sin(d+e*x)+3*a*c*cos(d+e*x)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-4, x) == :(e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-3*(-3*b^2+-3*c^2+3*a^2)^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))+1//6*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1*(a^2+-1*b^2+-1*c^2)^-3*(c*(4*b^2+4*c^2+11*a^2)*cos(d+e*x)+-1*b*(4*b^2+4*c^2+11*a^2)*sin(d+e*x))+1//6*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-2*(a^2+-1*b^2+-1*c^2)^-2*(-5*a*b*sin(d+e*x)+5*a*c*cos(d+e*x))+a*e^-1*(a^2+-1*b^2+-1*c^2)^-7//2*(2*a^2+3*b^2+3*c^2)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*d+(1/2)*e*x))))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-2, x) == :(e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1*(a^2+-1*b^2+-1*c^2)^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))+2*a*e^-1*(a^2+-1*b^2+-1*c^2)^-3//2*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*d+(1/2)*e*x))))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-3, x) == :(e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-2*(-2*b^2+-2*c^2+2*a^2)^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))+e^-1*(a^2+-1*b^2+-1*c^2)^-5//2*(b^2+c^2+2*a^2)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*d+(1/2)*e*x)))+(1/2)*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1*(a^2+-1*b^2+-1*c^2)^-2*(-3*a*b*sin(d+e*x)+3*a*c*cos(d+e*x)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-4, x) == :(e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-3*(-3*b^2+-3*c^2+3*a^2)^-1*(c*cos(d+e*x)+-1*b*sin(d+e*x))+1//6*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1*(a^2+-1*b^2+-1*c^2)^-3*(c*(4*b^2+4*c^2+11*a^2)*cos(d+e*x)+-1*b*(4*b^2+4*c^2+11*a^2)*sin(d+e*x))+1//6*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-2*(a^2+-1*b^2+-1*c^2)^-2*(-5*a*b*sin(d+e*x)+5*a*c*cos(d+e*x))+a*e^-1*(a^2+-1*b^2+-1*c^2)^-7//2*(2*a^2+3*b^2+3*c^2)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*d+(1/2)*e*x))))
@test integrate((2+3*cos(d+e*x)+5*sin(d+e*x))^5//2, x) == :(64*e^-1*(2+34^(1/2))^-1//2*Elliptic.F((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2))+-1//5*e^-1*(2+3*cos(d+e*x)+5*sin(d+e*x))^3//2*(-6*sin(d+e*x)+10*cos(d+e*x))+-1//15*e^-1*(2+3*cos(d+e*x)+5*sin(d+e*x))^(1/2)*(-96*sin(d+e*x)+160*cos(d+e*x))+796//15*e^-1*(2+34^(1/2))^(1/2)*Elliptic.E((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2)))
@test integrate((2+3*cos(d+e*x)+5*sin(d+e*x))^3//2, x) == :(20*e^-1*(2+34^(1/2))^-1//2*Elliptic.F((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2))+-1//3*e^-1*(2+3*cos(d+e*x)+5*sin(d+e*x))^(1/2)*(-6*sin(d+e*x)+10*cos(d+e*x))+16//3*e^-1*(2+34^(1/2))^(1/2)*Elliptic.E((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2)))
@test integrate((2+3*cos(d+e*x)+5*sin(d+e*x))^(1/2), x) == :(2*e^-1*(2+34^(1/2))^(1/2)*Elliptic.E((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2)))
@test integrate((2+3*cos(d+e*x)+5*sin(d+e*x))^-1//2, x) == :(2*e^-1*(2+34^(1/2))^-1//2*Elliptic.F((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2)))
@test integrate((2+3*cos(d+e*x)+5*sin(d+e*x))^-3//2, x) == :(-1//15*e^-1*(2+34^(1/2))^(1/2)*Elliptic.E((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2))+-1//15*e^-1*(2+3*cos(d+e*x)+5*sin(d+e*x))^-1//2*(-3*sin(d+e*x)+5*cos(d+e*x)))
@test integrate((2+3*cos(d+e*x)+5*sin(d+e*x))^-5//2, x) == :(-1//45*e^-1*(2+3*cos(d+e*x)+5*sin(d+e*x))^-3//2*(-3*sin(d+e*x)+5*cos(d+e*x))+1//45*e^-1*(2+34^(1/2))^-1//2*Elliptic.F((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2))+1//675*e^-1*(2+3*cos(d+e*x)+5*sin(d+e*x))^-1//2*(-12*sin(d+e*x)+20*cos(d+e*x))+4//675*e^-1*(2+34^(1/2))^(1/2)*Elliptic.E((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2)))
@test integrate((2+3*cos(d+e*x)+5*sin(d+e*x))^-7//2, x) == :(-199//101250*e^-1*(2+34^(1/2))^(1/2)*Elliptic.E((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2))+-8//3375*e^-1*(2+34^(1/2))^-1//2*Elliptic.F((1/2)*d+-1//2*arctan(5//3)+(1/2)*e*x,34//15+-2//15*34^(1/2))+-1//75*e^-1*(2+3*cos(d+e*x)+5*sin(d+e*x))^-5//2*(-3*sin(d+e*x)+5*cos(d+e*x))+-1//101250*e^-1*(2+3*cos(d+e*x)+5*sin(d+e*x))^-1//2*(-597*sin(d+e*x)+995*cos(d+e*x))+1//3375*e^-1*(2+3*cos(d+e*x)+5*sin(d+e*x))^-3//2*(-24*sin(d+e*x)+40*cos(d+e*x)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^5//2, x) == :(-1//5*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^3//2*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+1//15*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(-16*a*c*cos(d+e*x)+16*a*b*sin(d+e*x))+1//15*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(18*b^2+18*c^2+46*a^2)*Elliptic.E((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+-16//15*a*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(a^2+-1*b^2+-1*c^2)*Elliptic.F((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^3//2, x) == :(1//3*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(-2*c*cos(d+e*x)+2*b*sin(d+e*x))+-1//3*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(-2*b^2+-2*c^2+2*a^2)*Elliptic.F((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+8//3*a*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*Elliptic.E((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^(1/2), x) == :(2*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*Elliptic.E((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-1//2, x) == :(2*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*Elliptic.F((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-3//2, x) == :(e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(a^2+-1*b^2+-1*c^2)^-1*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+2*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(a^2+-1*b^2+-1*c^2)^-1*Elliptic.E((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-5//2, x) == :(e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-3//2*(-3*b^2+-3*c^2+3*a^2)^-1*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+1//3*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(a^2+-1*b^2+-1*c^2)^-2*(-8*a*b*sin(d+e*x)+8*a*c*cos(d+e*x))+-2*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(-3*b^2+-3*c^2+3*a^2)^-1*Elliptic.F((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+8//3*a*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(a^2+-1*b^2+-1*c^2)^-2*Elliptic.E((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(d+e*x)+c*sin(d+e*x))^-7//2, x) == :(e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-5//2*(-5*b^2+-5*c^2+5*a^2)^-1*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+1//15*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-3//2*(a^2+-1*b^2+-1*c^2)^-2*(-16*a*b*sin(d+e*x)+16*a*c*cos(d+e*x))+1//15*e^-1*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(a^2+-1*b^2+-1*c^2)^-3*(-2*b*(9*b^2+9*c^2+23*a^2)*sin(d+e*x)+2*c*(9*b^2+9*c^2+23*a^2)*cos(d+e*x))+-16//15*a*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(a^2+-1*b^2+-1*c^2)^-2*Elliptic.F((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+1//15*e^-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(a^2+-1*b^2+-1*c^2)^-3*(18*b^2+18*c^2+46*a^2)*Elliptic.E((1/2)*d+-1//2*atan(c,b)+(1/2)*e*x,2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((5+3*sin(d+e*x)+4*cos(d+e*x))^5//2, x) == :(-1//3*e^-1*(5+3*sin(d+e*x)+4*cos(d+e*x))^(1/2)*(-64*sin(d+e*x)+48*cos(d+e*x))+-1//5*e^-1*(5+3*sin(d+e*x)+4*cos(d+e*x))^3//2*(-8*sin(d+e*x)+6*cos(d+e*x))+1//3*e^-1*(5+3*sin(d+e*x)+4*cos(d+e*x))^-1//2*(-960*cos(d+e*x)+1280*sin(d+e*x)))
@test integrate((5+3*sin(d+e*x)+4*cos(d+e*x))^3//2, x) == :(-1//3*e^-1*(5+3*sin(d+e*x)+4*cos(d+e*x))^(1/2)*(-8*sin(d+e*x)+6*cos(d+e*x))+1//3*e^-1*(5+3*sin(d+e*x)+4*cos(d+e*x))^-1//2*(-120*cos(d+e*x)+160*sin(d+e*x)))
@test integrate((5+3*sin(d+e*x)+4*cos(d+e*x))^(1/2), x) == :(e^-1*(5+3*sin(d+e*x)+4*cos(d+e*x))^-1//2*(-6*cos(d+e*x)+8*sin(d+e*x)))
@test integrate((5+3*sin(d+e*x)+4*cos(d+e*x))^-1//2, x) == :(1//5*10^(1/2)*e^-1*arctanh((1/2)*2^(1/2)*(1+cos(d+-1*arctan(3//4)+e*x))^-1//2*sin(d+-1*arctan(3//4)+e*x)))
@test integrate((5+3*sin(d+e*x)+4*cos(d+e*x))^-3//2, x) == :(-1//10*e^-1*(5+3*sin(d+e*x)+4*cos(d+e*x))^-3//2*(-4*sin(d+e*x)+3*cos(d+e*x))+1//100*10^(1/2)*e^-1*arctanh((1/2)*2^(1/2)*(1+cos(d+-1*arctan(3//4)+e*x))^-1//2*sin(d+-1*arctan(3//4)+e*x)))
@test integrate((5+3*sin(d+e*x)+4*cos(d+e*x))^-5//2, x) == :(-1//20*e^-1*(5+3*sin(d+e*x)+4*cos(d+e*x))^-5//2*(-4*sin(d+e*x)+3*cos(d+e*x))+-1//400*e^-1*(5+3*sin(d+e*x)+4*cos(d+e*x))^-3//2*(-12*sin(d+e*x)+9*cos(d+e*x))+3//4000*10^(1/2)*e^-1*arctanh((1/2)*2^(1/2)*(1+cos(d+-1*arctan(3//4)+e*x))^-1//2*sin(d+-1*arctan(3//4)+e*x)))
@test integrate((-5+3*sin(d+e*x)+4*cos(d+e*x))^7//2, x) == :(-1//7*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^(1/2)*(-1280*sin(d+e*x)+960*cos(d+e*x))+-1//7*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^5//2*(-8*sin(d+e*x)+6*cos(d+e*x))+1//7*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^-1//2*(-25600*sin(d+e*x)+19200*cos(d+e*x))+1//7*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^3//2*(-96*sin(d+e*x)+72*cos(d+e*x)))
@test integrate((-5+3*sin(d+e*x)+4*cos(d+e*x))^5//2, x) == :(-1//5*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^3//2*(-8*sin(d+e*x)+6*cos(d+e*x))+1//3*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^(1/2)*(-64*sin(d+e*x)+48*cos(d+e*x))+1//3*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^-1//2*(-960*cos(d+e*x)+1280*sin(d+e*x)))
@test integrate((-5+3*sin(d+e*x)+4*cos(d+e*x))^3//2, x) == :(-1//3*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^(1/2)*(-8*sin(d+e*x)+6*cos(d+e*x))+1//3*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^-1//2*(-160*sin(d+e*x)+120*cos(d+e*x)))
@test integrate((-5+3*sin(d+e*x)+4*cos(d+e*x))^(1/2), x) == :(e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^-1//2*(-6*cos(d+e*x)+8*sin(d+e*x)))
@test integrate((-5+3*sin(d+e*x)+4*cos(d+e*x))^-1//2, x) == :(-1//5*10^(1/2)*e^-1*arctan((1/2)*2^(1/2)*(-1+cos(d+-1*arctan(3//4)+e*x))^-1//2*sin(d+-1*arctan(3//4)+e*x)))
@test integrate((-5+3*sin(d+e*x)+4*cos(d+e*x))^-3//2, x) == :(1//10*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^-3//2*(-4*sin(d+e*x)+3*cos(d+e*x))+1//100*10^(1/2)*e^-1*arctan((1/2)*2^(1/2)*(-1+cos(d+-1*arctan(3//4)+e*x))^-1//2*sin(d+-1*arctan(3//4)+e*x)))
@test integrate((-5+3*sin(d+e*x)+4*cos(d+e*x))^-5//2, x) == :(-3//4000*10^(1/2)*e^-1*arctan((1/2)*2^(1/2)*(-1+cos(d+-1*arctan(3//4)+e*x))^-1//2*sin(d+-1*arctan(3//4)+e*x))+-1//400*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^-3//2*(-12*sin(d+e*x)+9*cos(d+e*x))+1//20*e^-1*(-5+3*sin(d+e*x)+4*cos(d+e*x))^-5//2*(-4*sin(d+e*x)+3*cos(d+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^7//2, x) == :(-1//7*e^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^5//2*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+-256//35*e^-1*(b^2+c^2)^3//2*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(c*cos(d+e*x)+-1*b*sin(d+e*x))+-24//35*e^-1*(b^2+c^2)^(1/2)*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^3//2*(c*cos(d+e*x)+-1*b*sin(d+e*x))+-1//35*e^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(64*b^2+64*c^2)*(c*cos(d+e*x)+-1*b*sin(d+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^5//2, x) == :(-1//5*e^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^3//2*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+-16//15*e^-1*(b^2+c^2)^(1/2)*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(c*cos(d+e*x)+-1*b*sin(d+e*x))+1//15*e^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(-64*b^2+-64*c^2)*(c*cos(d+e*x)+-1*b*sin(d+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^3//2, x) == :(-1//3*e^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+-8//3*e^-1*(b^2+c^2)^(1/2)*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(c*cos(d+e*x)+-1*b*sin(d+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^(1/2), x) == :(e^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(-2*c*cos(d+e*x)+2*b*sin(d+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1//2, x) == :(2^(1/2)*e^-1*(b^2+c^2)^-1//4*arctanh((1/2)*2^(1/2)*(b^2+c^2)^1//4*((b^2+c^2)^(1/2)+(b^2+c^2)^(1/2)*cos(d+-1*atan(c,b)+e*x))^-1//2*sin(d+-1*atan(c,b)+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-3//2, x) == :(-1//2*e^-1*(b^2+c^2)^-1//2*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-3//2*(c*cos(d+e*x)+-1*b*sin(d+e*x))+1//4*2^(1/2)*e^-1*(b^2+c^2)^-3//4*arctanh((1/2)*2^(1/2)*(b^2+c^2)^1//4*((b^2+c^2)^(1/2)+(b^2+c^2)^(1/2)*cos(d+-1*atan(c,b)+e*x))^-1//2*sin(d+-1*atan(c,b)+e*x)))
@test integrate(((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-5//2, x) == :(-1*e^-1*(16*b^2+16*c^2)^-1*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-3//2*(-3*b*sin(d+e*x)+3*c*cos(d+e*x))+-1//4*e^-1*(b^2+c^2)^-1//2*((b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-5//2*(c*cos(d+e*x)+-1*b*sin(d+e*x))+3//32*2^(1/2)*e^-1*(b^2+c^2)^-5//4*arctanh((1/2)*2^(1/2)*(b^2+c^2)^1//4*((b^2+c^2)^(1/2)+(b^2+c^2)^(1/2)*cos(d+-1*atan(c,b)+e*x))^-1//2*sin(d+-1*atan(c,b)+e*x)))
@test integrate((-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^5//2, x) == :(-1//5*e^-1*(-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^3//2*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+1//15*e^-1*(-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(-64*b^2+-64*c^2)*(c*cos(d+e*x)+-1*b*sin(d+e*x))+16//15*e^-1*(b^2+c^2)^(1/2)*(-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(c*cos(d+e*x)+-1*b*sin(d+e*x)))
@test integrate((-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^3//2, x) == :(-1//3*e^-1*(-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^(1/2)*(-2*b*sin(d+e*x)+2*c*cos(d+e*x))+8//3*e^-1*(b^2+c^2)^(1/2)*(-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(c*cos(d+e*x)+-1*b*sin(d+e*x)))
@test integrate((-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^(1/2), x) == :(e^-1*(-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1//2*(-2*c*cos(d+e*x)+2*b*sin(d+e*x)))
@test integrate((-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-1//2, x) == :(-1*2^(1/2)*e^-1*(b^2+c^2)^-1//4*arctan((1/2)*2^(1/2)*(b^2+c^2)^1//4*(-1*(b^2+c^2)^(1/2)+(b^2+c^2)^(1/2)*cos(d+-1*atan(c,b)+e*x))^-1//2*sin(d+-1*atan(c,b)+e*x)))
@test integrate((-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-3//2, x) == :((1/2)*e^-1*(b^2+c^2)^-1//2*(-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-3//2*(c*cos(d+e*x)+-1*b*sin(d+e*x))+1//4*2^(1/2)*e^-1*(b^2+c^2)^-3//4*arctan((1/2)*2^(1/2)*(b^2+c^2)^1//4*(-1*(b^2+c^2)^(1/2)+(b^2+c^2)^(1/2)*cos(d+-1*atan(c,b)+e*x))^-1//2*sin(d+-1*atan(c,b)+e*x)))
@test integrate((-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-5//2, x) == :(-1*e^-1*(16*b^2+16*c^2)^-1*(-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-3//2*(-3*b*sin(d+e*x)+3*c*cos(d+e*x))+-3//32*2^(1/2)*e^-1*(b^2+c^2)^-5//4*arctan((1/2)*2^(1/2)*(b^2+c^2)^1//4*(-1*(b^2+c^2)^(1/2)+(b^2+c^2)^(1/2)*cos(d+-1*atan(c,b)+e*x))^-1//2*sin(d+-1*atan(c,b)+e*x))+1//4*e^-1*(b^2+c^2)^-1//2*(-1*(b^2+c^2)^(1/2)+b*cos(d+e*x)+c*sin(d+e*x))^-5//2*(c*cos(d+e*x)+-1*b*sin(d+e*x)))
@test integrate((a+b*cos(x)+c*sin(x))^-1*sin(x), x) == :(c*x*(b^2+c^2)^-1+-1*b*(b^2+c^2)^-1*log(a+b*cos(x)+c*sin(x))+-2*a*c*(b^2+c^2)^-1*(a^2+-1*b^2+-1*c^2)^-1//2*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x))))
@test integrate((a+b*tan(x)+c*sec(x))^-1, x) == :(a*x*(a^2+b^2)^-1+b*(a^2+b^2)^-1*log(c+a*cos(x)+b*sin(x))+2*a*c*(a^2+b^2)^-1*(a^2+b^2+-1*c^2)^-1//2*arctanh((a^2+b^2+-1*c^2)^-1//2*(b+-1*(a+-1c)*tan((1/2)*x))))
@test integrate((a+b*tan(x)+c*sec(x))^-1*sec(x), x) == :(-2*(a^2+b^2+-1*c^2)^-1//2*arctanh((a^2+b^2+-1*c^2)^-1//2*(b+-1*(a+-1c)*tan((1/2)*x))))
@test integrate((a+b*tan(x)+c*sec(x))^-1*sec(x)^2, x) == :(-1*(b+c)^-1*log(1+-1*tan((1/2)*x))+-1*(b+-1c)^-1*log(1+tan((1/2)*x))+b*(b^2+-1*c^2)^-1*log(a+c+-1*tan((1/2)*x)^2*(a+-1c)+2*b*tan((1/2)*x))+-2*a*c*(b^2+-1*c^2)^-1*(a^2+b^2+-1*c^2)^-1//2*arctanh((a^2+b^2+-1*c^2)^-1//2*(b+-1*(a+-1c)*tan((1/2)*x))))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^3//2*sec(d+e*x)^-3//2, x) == :(-1//3*e^-1*(a+b*sec(d+e*x)+c*tan(d+e*x))^3//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^-1*sec(d+e*x)^-3//2*(-2*a*sin(d+e*x)+2*c*cos(d+e*x))+1//3*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*sec(d+e*x)+c*tan(d+e*x))^3//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^-2*sec(d+e*x)^-3//2*(-2*b^2+2*a^2+2*c^2)*Elliptic.F((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2))+8//3*b*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*sec(d+e*x)+c*tan(d+e*x))^3//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^-1*sec(d+e*x)^-3//2*Elliptic.E((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^(1/2)*sec(d+e*x)^-1//2, x) == :(2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*sec(d+e*x)+c*tan(d+e*x))^(1/2)*sec(d+e*x)^-1//2*Elliptic.E((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^-1//2*sec(d+e*x)^(1/2), x) == :(2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*sec(d+e*x)+c*tan(d+e*x))^-1//2*sec(d+e*x)^(1/2)*Elliptic.F((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^-3//2*sec(d+e*x)^3//2, x) == :(-2*e^-1*(a+b*sec(d+e*x)+c*tan(d+e*x))^-3//2*(a^2+c^2+-1*b^2)^-1*sec(d+e*x)^3//2*(c*cos(d+e*x)+-1*a*sin(d+e*x))*(b+a*cos(d+e*x)+c*sin(d+e*x))+-2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*sec(d+e*x)+c*tan(d+e*x))^-3//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^2*(a^2+c^2+-1*b^2)^-1*sec(d+e*x)^3//2*Elliptic.E((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*sec(d+e*x)^5//2, x) == :(-2*e^-1*(a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*(-3*b^2+3*a^2+3*c^2)^-1*sec(d+e*x)^5//2*(c*cos(d+e*x)+-1*a*sin(d+e*x))*(b+a*cos(d+e*x)+c*sin(d+e*x))+8//3*e^-1*(a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^2*(a^2+c^2+-1*b^2)^-2*sec(d+e*x)^5//2*(b*c*cos(d+e*x)+-1*a*b*sin(d+e*x))+2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^2*(-3*b^2+3*a^2+3*c^2)^-1*sec(d+e*x)^5//2*Elliptic.F((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2))+8//3*b*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^3*(a^2+c^2+-1*b^2)^-2*sec(d+e*x)^5//2*Elliptic.E((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^3//2*cos(d+e*x)^3//2, x) == :(-2//3*e^-1*(a+b*sec(d+e*x)+c*tan(d+e*x))^3//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^-1*cos(d+e*x)^3//2*(c*cos(d+e*x)+-1*a*sin(d+e*x))+1//3*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*sec(d+e*x)+c*tan(d+e*x))^3//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^-2*cos(d+e*x)^3//2*(-2*b^2+2*a^2+2*c^2)*Elliptic.F((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2))+8//3*b*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*sec(d+e*x)+c*tan(d+e*x))^3//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^-1*cos(d+e*x)^3//2*Elliptic.E((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^(1/2)*cos(d+e*x)^(1/2), x) == :(2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*sec(d+e*x)+c*tan(d+e*x))^(1/2)*cos(d+e*x)^(1/2)*Elliptic.E((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^-1//2*cos(d+e*x)^-1//2, x) == :(2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*sec(d+e*x)+c*tan(d+e*x))^-1//2*cos(d+e*x)^-1//2*Elliptic.F((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^-3//2*cos(d+e*x)^-3//2, x) == :(-1*e^-1*(a+b*sec(d+e*x)+c*tan(d+e*x))^-3//2*(a^2+c^2+-1*b^2)^-1*cos(d+e*x)^-3//2*(-2*a*sin(d+e*x)+2*c*cos(d+e*x))*(b+a*cos(d+e*x)+c*sin(d+e*x))+-2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*sec(d+e*x)+c*tan(d+e*x))^-3//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^2*(a^2+c^2+-1*b^2)^-1*cos(d+e*x)^-3//2*Elliptic.E((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*cos(d+e*x)^-5//2, x) == :(-1*e^-1*(a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*(-3*b^2+3*a^2+3*c^2)^-1*cos(d+e*x)^-5//2*(-2*a*sin(d+e*x)+2*c*cos(d+e*x))*(b+a*cos(d+e*x)+c*sin(d+e*x))+1//3*e^-1*(a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^2*(a^2+c^2+-1*b^2)^-2*cos(d+e*x)^-5//2*(-8*a*b*sin(d+e*x)+8*b*c*cos(d+e*x))+2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^(1/2)*(a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^2*(-3*b^2+3*a^2+3*c^2)^-1*cos(d+e*x)^-5//2*Elliptic.F((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2))+8//3*b*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*cos(d+e*x)+c*sin(d+e*x)))^-1//2*(a+b*sec(d+e*x)+c*tan(d+e*x))^-5//2*(b+a*cos(d+e*x)+c*sin(d+e*x))^3*(a^2+c^2+-1*b^2)^-2*cos(d+e*x)^-5//2*Elliptic.E((1/2)*d+-1//2*atan(c,a)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*cot(x)+c*csc(x))^-1, x) == :(a*x*(a^2+b^2)^-1+-1*b*(a^2+b^2)^-1*log(c+a*sin(x)+b*cos(x))+2*a*c*(a^2+b^2)^-1*(a^2+b^2+-1*c^2)^-1//2*arctanh((a^2+b^2+-1*c^2)^-1//2*(a+-1*(b+-1c)*tan((1/2)*x))))
@test integrate((a+b*cot(x)+c*csc(x))^-1*csc(x), x) == :(-2*(a^2+b^2+-1*c^2)^-1//2*arctanh((a^2+b^2+-1*c^2)^-1//2*(a+-1*(b+-1c)*tan((1/2)*x))))
@test integrate((a+b*cot(x)+c*csc(x))^-1*csc(x)^2, x) == :((b+c)^-1*log(tan((1/2)*x))+-1*b*(b^2+-1*c^2)^-1*log(b+c+-1*tan((1/2)*x)^2*(b+-1c)+2*a*tan((1/2)*x))+-2*a*c*(b^2+-1*c^2)^-1*(a^2+b^2+-1*c^2)^-1//2*arctanh((a^2+b^2+-1*c^2)^-1//2*(a+-1*(b+-1c)*tan((1/2)*x))))
@test integrate((2+2*cot(x)+3*csc(x))^-1*csc(x), x) == :(x+2*arctan((2+cos(x)+sin(x))^-1*(-1*sin(x)+cos(x))))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^3//2*csc(d+e*x)^-3//2, x) == :(-2//3*e^-1*(a+b*csc(d+e*x)+c*cot(d+e*x))^3//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^-1*csc(d+e*x)^-3//2*(a*cos(d+e*x)+-1*c*sin(d+e*x))+1//3*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^(1/2)*(a+b*csc(d+e*x)+c*cot(d+e*x))^3//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^-2*csc(d+e*x)^-3//2*(-2*b^2+2*a^2+2*c^2)*Elliptic.F((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2))+8//3*b*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^-1//2*(a+b*csc(d+e*x)+c*cot(d+e*x))^3//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^-1*csc(d+e*x)^-3//2*Elliptic.E((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^(1/2)*csc(d+e*x)^-1//2, x) == :(2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^-1//2*(a+b*csc(d+e*x)+c*cot(d+e*x))^(1/2)*csc(d+e*x)^-1//2*Elliptic.E((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^-1//2*csc(d+e*x)^(1/2), x) == :(2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^(1/2)*(a+b*csc(d+e*x)+c*cot(d+e*x))^-1//2*csc(d+e*x)^(1/2)*Elliptic.F((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^-3//2*csc(d+e*x)^3//2, x) == :(-2*e^-1*(a+b*csc(d+e*x)+c*cot(d+e*x))^-3//2*(a^2+c^2+-1*b^2)^-1*csc(d+e*x)^3//2*(a*cos(d+e*x)+-1*c*sin(d+e*x))*(b+a*sin(d+e*x)+c*cos(d+e*x))+-2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^-1//2*(a+b*csc(d+e*x)+c*cot(d+e*x))^-3//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^2*(a^2+c^2+-1*b^2)^-1*csc(d+e*x)^3//2*Elliptic.E((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*csc(d+e*x)^5//2, x) == :(-2*e^-1*(a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*(-3*b^2+3*a^2+3*c^2)^-1*csc(d+e*x)^5//2*(a*cos(d+e*x)+-1*c*sin(d+e*x))*(b+a*sin(d+e*x)+c*cos(d+e*x))+8//3*e^-1*(a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^2*(a^2+c^2+-1*b^2)^-2*csc(d+e*x)^5//2*(a*b*cos(d+e*x)+-1*b*c*sin(d+e*x))+2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^(1/2)*(a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^2*(-3*b^2+3*a^2+3*c^2)^-1*csc(d+e*x)^5//2*Elliptic.F((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2))+8//3*b*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^-1//2*(a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^3*(a^2+c^2+-1*b^2)^-2*csc(d+e*x)^5//2*Elliptic.E((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^3//2*sin(d+e*x)^3//2, x) == :(-2//3*e^-1*(a+b*csc(d+e*x)+c*cot(d+e*x))^3//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^-1*sin(d+e*x)^3//2*(a*cos(d+e*x)+-1*c*sin(d+e*x))+1//3*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^(1/2)*(a+b*csc(d+e*x)+c*cot(d+e*x))^3//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^-2*sin(d+e*x)^3//2*(-2*b^2+2*a^2+2*c^2)*Elliptic.F((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2))+8//3*b*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^-1//2*(a+b*csc(d+e*x)+c*cot(d+e*x))^3//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^-1*sin(d+e*x)^3//2*Elliptic.E((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^(1/2)*sin(d+e*x)^(1/2), x) == :(2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^-1//2*(a+b*csc(d+e*x)+c*cot(d+e*x))^(1/2)*sin(d+e*x)^(1/2)*Elliptic.E((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^-1//2*sin(d+e*x)^-1//2, x) == :(2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^(1/2)*(a+b*csc(d+e*x)+c*cot(d+e*x))^-1//2*sin(d+e*x)^-1//2*Elliptic.F((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^-3//2*sin(d+e*x)^-3//2, x) == :(-1*e^-1*(a+b*csc(d+e*x)+c*cot(d+e*x))^-3//2*(a^2+c^2+-1*b^2)^-1*sin(d+e*x)^-3//2*(a*cos(d+e*x)+-1*c*sin(d+e*x))*(2b+2*a*sin(d+e*x)+2*c*cos(d+e*x))+-2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^-1//2*(a+b*csc(d+e*x)+c*cot(d+e*x))^-3//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^2*(a^2+c^2+-1*b^2)^-1*sin(d+e*x)^-3//2*Elliptic.E((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*sin(d+e*x)^-5//2, x) == :(-1*e^-1*(a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*(-3*b^2+3*a^2+3*c^2)^-1*sin(d+e*x)^-5//2*(a*cos(d+e*x)+-1*c*sin(d+e*x))*(2b+2*a*sin(d+e*x)+2*c*cos(d+e*x))+8//3*e^-1*(a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^2*(a^2+c^2+-1*b^2)^-2*sin(d+e*x)^-5//2*(a*b*cos(d+e*x)+-1*b*c*sin(d+e*x))+2*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^(1/2)*(a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^2*(-3*b^2+3*a^2+3*c^2)^-1*sin(d+e*x)^-5//2*Elliptic.F((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2))+8//3*b*e^-1*((b+(a^2+c^2)^(1/2))^-1*(b+a*sin(d+e*x)+c*cos(d+e*x)))^-1//2*(a+b*csc(d+e*x)+c*cot(d+e*x))^-5//2*(b+a*sin(d+e*x)+c*cos(d+e*x))^3*(a^2+c^2+-1*b^2)^-2*sin(d+e*x)^-5//2*Elliptic.E((1/2)*d+-1//2*atan(a,c)+(1/2)*e*x,2*(b+(a^2+c^2)^(1/2))^-1*(a^2+c^2)^(1/2)))
@test integrate((cos(x)^2+sin(x)^2)^-1, x) == :(x)
@test integrate((cos(x)^2+sin(x)^2)^-2, x) == :(x)
@test integrate((cos(x)^2+sin(x)^2)^-3, x) == :(x)
@test integrate((cos(x)^2+-1*sin(x)^2)^-1, x) == :((1/2)*arctanh(2*cos(x)*sin(x)))
@test integrate((cos(x)^2+-1*sin(x)^2)^-2, x) == :((1+-1*tan(x)^2)^-1*tan(x))
@test integrate((cos(x)^2+-1*sin(x)^2)^-3, x) == :(1//4*arctanh(2*cos(x)*sin(x))+(1/2)*(1+-1*tan(x)^2)^-2*sec(x)^2*tan(x))
@test integrate((cos(x)^2+a^2*sin(x)^2)^-1, x) == :(a^-1*arctan(a*tan(x)))
@test integrate((sin(x)^2+b^2*cos(x)^2)^-1, x) == :(b^-1*arctan(b^-1*tan(x)))
@test integrate((a^2*sin(x)^2+b^2*cos(x)^2)^-1, x) == :(a^-1*b^-1*arctan(a*b^-1*tan(x)))
@test integrate((3*sin(1+2x)^2+4*cos(1+2x)^2)^-1, x) == :(-1//12*3^(1/2)*arctan((3+cos(1+2x)^2+2*3^(1/2))^-1*cos(1+2x)*sin(1+2x))+1//6*x*3^(1/2))
@test integrate((a*cos(x)^2+b*sin(x)^2)^-1*sin(x)^2, x) == :(-1*x*(a+-1b)^-1+a^(1/2)*b^-1//2*(a+-1b)^-1*arctan(a^-1//2*b^(1/2)*tan(x)))
@test integrate((a*cos(x)^2+b*sin(x)^2)^-1*cos(x)^2, x) == :(x*(a+-1b)^-1+-1*a^-1//2*b^(1/2)*(a+-1b)^-1*arctan(a^-1//2*b^(1/2)*tan(x)))
@test integrate((sec(x)^2+tan(x)^2)^-1, x) == :(-1x+x*2^(1/2)+2^(1/2)*arctan((1+2^(1/2)+sin(x)^2)^-1*cos(x)*sin(x)))
@test integrate((sec(x)^2+tan(x)^2)^-2, x) == :(x+(1+2*tan(x)^2)^-1*tan(x)+-1//2*x*2^(1/2)+-1//2*2^(1/2)*arctan((1+2^(1/2)+sin(x)^2)^-1*cos(x)*sin(x)))
@test integrate((sec(x)^2+tan(x)^2)^-3, x) == :(-1x+(1/2)*(1+2*tan(x)^2)^-2*tan(x)+-1*(4+8*tan(x)^2)^-1*tan(x)+7//8*x*2^(1/2)+7//8*2^(1/2)*arctan((1+2^(1/2)+sin(x)^2)^-1*cos(x)*sin(x)))
@test integrate((sec(x)^2+-1*tan(x)^2)^-1, x) == :(x)
@test integrate((sec(x)^2+-1*tan(x)^2)^-2, x) == :(x)
@test integrate((sec(x)^2+-1*tan(x)^2)^-3, x) == :(x)
@test integrate((cot(x)^2+csc(x)^2)^-1, x) == :(-1x+x*2^(1/2)+-1*2^(1/2)*arctan((1+2^(1/2)+cos(x)^2)^-1*cos(x)*sin(x)))
@test integrate((cot(x)^2+csc(x)^2)^-2, x) == :(x+(1/2)*2^(1/2)*arctan((1+2^(1/2)+cos(x)^2)^-1*cos(x)*sin(x))+-1*(2+tan(x)^2)^-1*tan(x)+-1//2*x*2^(1/2))
@test integrate((cot(x)^2+csc(x)^2)^-3, x) == :(-1x+(8+4*tan(x)^2)^-1*tan(x)+-7//8*2^(1/2)*arctan((1+2^(1/2)+cos(x)^2)^-1*cos(x)*sin(x))+-1//2*(2+tan(x)^2)^-2*tan(x)^3+7//8*x*2^(1/2))
@test integrate((cot(x)^2+-1*csc(x)^2)^-1, x) == :(-1x)
@test integrate((cot(x)^2+-1*csc(x)^2)^-2, x) == :(x)
@test integrate((cot(x)^2+-1*csc(x)^2)^-3, x) == :(-1x)
@test integrate((a+b*cos(x)^2+c*sin(x)^2)^-1, x) == :((a+b)^-1//2*(a+c)^-1//2*arctan((a+b)^-1//2*(a+c)^(1/2)*tan(x)))
@test integrate(x*(a+b*cos(x)^2+c*sin(x)^2)^-1, x) == :(-1//4*(a+b)^-1//2*(a+c)^-1//2*Polylogarithms.polylog(2,-1*(b+c+2a+-2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x))+1//4*(a+b)^-1//2*(a+c)^-1//2*Polylogarithms.polylog(2,-1*(b+c+2a+2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x))+(1/2)*im*x*(a+b)^-1//2*(a+c)^-1//2*log(1+(b+c+2a+2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x))+-1//2*im*x*(a+b)^-1//2*(a+c)^-1//2*log(1+(b+c+2a+-2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x)))
@test integrate(x^2*(a+b*cos(x)^2+c*sin(x)^2)^-1, x) == :((1/2)*x*(a+b)^-1//2*(a+c)^-1//2*Polylogarithms.polylog(2,-1*(b+c+2a+2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x))+-1//2*x*(a+b)^-1//2*(a+c)^-1//2*Polylogarithms.polylog(2,-1*(b+c+2a+-2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x))+-1//4*im*(a+b)^-1//2*(a+c)^-1//2*Polylogarithms.polylog(3,-1*(b+c+2a+-2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x))+1//4*im*(a+b)^-1//2*(a+c)^-1//2*Polylogarithms.polylog(3,-1*(b+c+2a+2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x))+(1/2)*im*x^2*(a+b)^-1//2*(a+c)^-1//2*log(1+(b+c+2a+2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x))+-1//2*im*x^2*(a+b)^-1//2*(a+c)^-1//2*log(1+(b+c+2a+-2*(a+b)^(1/2)*(a+c)^(1/2))^-1*(b+-1c)*exp(2*im*x)))
@test integrate((b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^2*(a+b*sin(d+e*x)), x) == :(3//8*a*x*(a^4+8*b^4+12*a^2*b^2)+-1//5*b*e^-1*(b+a*sin(d+e*x))^4*cos(d+e*x)+-1//10*b*e^-1*(4*b^4+32*a^4+69*a^2*b^2)*cos(d+e*x)+-1//20*e^-1*(b+a*sin(d+e*x))^3*(4*b^2+5*a^2)*cos(d+e*x)+-1//20*b*e^-1*(b+a*sin(d+e*x))^2*(4*b^2+17*a^2)*cos(d+e*x)+-1//40*a*e^-1*(8*b^4+15*a^4+82*a^2*b^2)*cos(d+e*x)*sin(d+e*x))
@test integrate((a+b*sin(d+e*x))*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x)), x) == :((1/2)*a*x*(a^2+4*b^2)+1//3*b^-1*e^-1*(a^4+-3*b^4+-8*a^2*b^2)*cos(d+e*x)+-1//3*a^2*b^-1*e^-1*(a+b*sin(d+e*x))^2*cos(d+e*x)+1//6*a*e^-1*(a^2+-6*b^2)*cos(d+e*x)*sin(d+e*x))
@test integrate((b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^-1*(a+b*sin(d+e*x)), x) == :(-1*e^-1*(b+a*sin(d+e*x))^-1*cos(d+e*x))
@test integrate((b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^-2*(a+b*sin(d+e*x)), x) == :(-1//3*e^-1*(b+a*sin(d+e*x))^-3*cos(d+e*x)+b*e^-1*(b+a*sin(d+e*x))^-2*(-3*b^2+3*a^2)^-1*cos(d+e*x)+2*a*b*e^-1*(a^2+-1*b^2)^-5//2*arctanh((a^2+-1*b^2)^-1//2*(a+b*tan((1/2)*d+(1/2)*e*x)))+-1//3*e^-1*(b+a*sin(d+e*x))^-1*(a^2+-1*b^2)^-2*(b^2+2*a^2)*cos(d+e*x))
@test integrate((a+b*sin(x)+c*sin(x)^2)^-1*(d+e*sin(x)), x) == :(2^(1/2)*(b^2+b*(b^2+-4*a*c)^(1/2)+-2*c*(a+c))^-1//2*(e+-1*(b^2+-4*a*c)^-1//2*(-1*b*e+2*c*d))*arctan((1/2)*2^(1/2)*(b^2+b*(b^2+-4*a*c)^(1/2)+-2*c*(a+c))^-1//2*(2c+(b+(b^2+-4*a*c)^(1/2))*tan((1/2)*x)))+2^(1/2)*(b^2+-1*b*(b^2+-4*a*c)^(1/2)+-2*c*(a+c))^-1//2*(e+(b^2+-4*a*c)^-1//2*(-1*b*e+2*c*d))*arctan((1/2)*2^(1/2)*(b^2+-1*b*(b^2+-4*a*c)^(1/2)+-2*c*(a+c))^-1//2*(2c+(b+-1*(b^2+-4*a*c)^(1/2))*tan((1/2)*x))))
@test integrate((b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^3//2*(a+b*sin(d+e*x)), x) == :(-1//4*b*e^-1*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^3//2*cos(d+e*x)+-1//6*e^-1*(b+a*sin(d+e*x))^-3*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^3//2*(3*b^4+4*a^4+28*a^2*b^2)*cos(d+e*x)+-1//12*e^-1*(b+a*sin(d+e*x))^-1*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^3//2*(3*b^2+4*a^2)*cos(d+e*x)+5//8*b*x*a^4*(a*b+a^2*sin(d+e*x))^-3*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^3//2*(3*a^2+4*b^2)+-1//24*b*a^4*e^-1*(a*b+a^2*sin(d+e*x))^-3*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^3//2*(6*b^2+29*a^2)*cos(d+e*x)*sin(d+e*x))
@test integrate((b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^(1/2)*(a+b*sin(d+e*x)), x) == :(-1*e^-1*(b+a*sin(d+e*x))^-1*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^(1/2)*(a^2+b^2)*cos(d+e*x)+3*b*x*a^2*(2*a*b+2*a^2*sin(d+e*x))^-1*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^(1/2)+-1//2*b*a^2*e^-1*(a*b+a^2*sin(d+e*x))^-1*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^(1/2)*cos(d+e*x)*sin(d+e*x))
@test integrate((b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^-1//2*(a+b*sin(d+e*x)), x) == :(b*x*a^-1*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^-1//2*(b+a*sin(d+e*x))+-2*a^-1*e^-1*(a^2+-1*b^2)^(1/2)*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^-1//2*(b+a*sin(d+e*x))*arctanh((a^2+-1*b^2)^-1//2*(a+b*tan((1/2)*d+(1/2)*e*x))))
@test integrate((b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^-3//2*(a+b*sin(d+e*x)), x) == :(-1//2*e^-1*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^-3//2*(b+a*sin(d+e*x))*cos(d+e*x)+-1*a^-2*e^-1*(a^2+-1*b^2)^-3//2*(a*b+a^2*sin(d+e*x))^3*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^-3//2*arctanh((a^2+-1*b^2)^-1//2*(a+b*tan((1/2)*d+(1/2)*e*x)))+b*e^-1*(-2*b^2+2*a^2)^-1*(a*b+a^2*sin(d+e*x))^3*(b*a^3+a^4*sin(d+e*x))^-1*(b^2+a^2*sin(d+e*x)^2+2*a*b*sin(d+e*x))^-3//2*cos(d+e*x))
@test integrate((b^2+a^2*cos(x)^2+2*a*b*cos(x))^-1*(a+b*cos(x)), x) == :((b+a*cos(x))^-1*sin(x))
@test integrate((a+b*cos(x)+c*cos(x)^2)^-1*(d+e*cos(x)), x) == :((b+(b^2+-4*a*c)^(1/2)+-2c)^-1//2*(b+(b^2+-4*a*c)^(1/2)+2c)^-1//2*(2*e+-2*(b^2+-4*a*c)^-1//2*(-1*b*e+2*c*d))*arctan((b+(b^2+-4*a*c)^(1/2)+-2c)^(1/2)*(b+(b^2+-4*a*c)^(1/2)+2c)^-1//2*tan((1/2)*x))+(b+-1*(b^2+-4*a*c)^(1/2)+-2c)^-1//2*(b+-1*(b^2+-4*a*c)^(1/2)+2c)^-1//2*(2*e+2*(b^2+-4*a*c)^-1//2*(-1*b*e+2*c*d))*arctan((b+-1*(b^2+-4*a*c)^(1/2)+-2c)^(1/2)*(b+-1*(b^2+-4*a*c)^(1/2)+2c)^-1//2*tan((1/2)*x)))
@test integrate((b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^2*(a+b*tan(d+e*x)), x) == :(1//3*e^-1*(b+a*tan(d+e*x))^3*(a^2+b^2)+1//4*b*e^-1*(b+a*tan(d+e*x))^4+a*x*(a^2+b^2)*(a^2+-3*b^2)+(1/2)*b*e^-1*(b+a*tan(d+e*x))^2*(a^2+b^2)+-1*a*e^-1*(a^4+-1*b^4)*tan(d+e*x)+b*e^-1*(a^2+b^2)*(-1*b^2+3*a^2)*log(cos(d+e*x)))
@test integrate((a+b*tan(d+e*x))*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x)), x) == :(-1*a*x*(a^2+b^2)+(1/2)*a^2*b^-1*e^-1*(a+b*tan(d+e*x))^2+-1*b*e^-1*(a^2+b^2)*log(cos(d+e*x))+2*a*b^2*e^-1*tan(d+e*x))
@test integrate((b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-1*(a+b*tan(d+e*x)), x) == :(-1*a*x*(a^2+b^2)^-2*(a^2+-3*b^2)+-1*e^-1*(b+a*tan(d+e*x))^-1*(a^2+b^2)^-1*(a^2+-1*b^2)+b*e^-1*(a^2+b^2)^-2*(-1*b^2+3*a^2)*log(a*sin(d+e*x)+b*cos(d+e*x)))
@test integrate((b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-2*(a+b*tan(d+e*x)), x) == :(a*x*(a^2+b^2)^-4*(a^4+5*b^4+-10*a^2*b^2)+e^-1*(b+a*tan(d+e*x))^-1*(a^2+b^2)^-3*(a^4+b^4+-6*a^2*b^2)+-1*e^-1*(b+a*tan(d+e*x))^-3*(3*a^2+3*b^2)^-1*(a^2+-1*b^2)+-1*b*e^-1*(a^2+b^2)^-4*(b^4+5*a^4+-10*a^2*b^2)*log(a*sin(d+e*x)+b*cos(d+e*x))+-1//2*b*e^-1*(b+a*tan(d+e*x))^-2*(a^2+b^2)^-2*(-1*b^2+3*a^2))
@test integrate((b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^3//2*(a+b*tan(d+e*x)), x) == :(1//3*b*e^-1*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^3//2+(1/2)*e^-1*(b+a*tan(d+e*x))^-1*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^3//2*(a^2+b^2)+e^-1*(b+a*tan(d+e*x))^-3*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^3//2*(a^4+-1*b^4)*log(cos(d+e*x))+-2*b*x*a^4*(a*b+a^2*tan(d+e*x))^-3*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^3//2*(a^2+b^2)+b*a^4*e^-1*(a*b+a^2*tan(d+e*x))^-3*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^3//2*(a^2+b^2)*tan(d+e*x))
@test integrate((b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^(1/2)*(a+b*tan(d+e*x)), x) == :(-1*e^-1*(b+a*tan(d+e*x))^-1*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^(1/2)*(a^2+b^2)*log(cos(d+e*x))+b*a^2*e^-1*(a*b+a^2*tan(d+e*x))^-1*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^(1/2)*tan(d+e*x))
@test integrate((b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-1//2*(a+b*tan(d+e*x)), x) == :(2*b*x*(a^2+b^2)^-1*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-1//2*(a*b+a^2*tan(d+e*x))+e^-1*(a^2+b^2)^-1*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-1//2*(b+a*tan(d+e*x))*(a^2+-1*b^2)*log(a*sin(d+e*x)+b*cos(d+e*x)))
@test integrate((b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-3//2*(a+b*tan(d+e*x)), x) == :(-1*e^-1*(2*a^2+2*b^2)^-1*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-3//2*(b+a*tan(d+e*x))*(a^2+-1*b^2)+-1*e^-1*(b+a*tan(d+e*x))^3*(a^2+b^2)^-3*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-3//2*(a^4+b^4+-6*a^2*b^2)*log(a*sin(d+e*x)+b*cos(d+e*x))+-1*b*e^-1*(a^2+b^2)^-2*(a*b+a^2*tan(d+e*x))^3*(b*a^3+a^4*tan(d+e*x))^-1*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-3//2*(-1*b^2+3*a^2)+-4*b*x*a^-2*(a^2+b^2)^-3*(a*b+a^2*tan(d+e*x))^3*(b^2+a^2*tan(d+e*x)^2+2*a*b*tan(d+e*x))^-3//2*(a^2+-1*b^2))
@test integrate((b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^2*(a+b*sec(d+e*x)), x) == :(a*x*b^4+1//6*a*e^-1*(4*a^4+19*b^4+50*a^2*b^2)*tan(d+e*x)+1//8*b*e^-1*(8*b^4+19*a^4+56*a^2*b^2)*arctanh(sin(d+e*x))+1//4*b*a^-2*e^-1*(a*b+a^2*sec(d+e*x))^3*tan(d+e*x)+1//12*a^-1*e^-1*(a*b+a^2*sec(d+e*x))^2*(4*a^2+7*b^2)*tan(d+e*x)+1//24*b*a^2*e^-1*(26*b^2+41*a^2)*sec(d+e*x)*tan(d+e*x))
@test integrate((a+b*sec(d+e*x))*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x)), x) == :(a*x*b^2+a*e^-1*(a^2+2*b^2)*tan(d+e*x)+(1/2)*b*e^-1*(2*b^2+5*a^2)*arctanh(sin(d+e*x))+(1/2)*b*a^2*e^-1*sec(d+e*x)*tan(d+e*x))
@test integrate((b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-1*(a+b*sec(d+e*x)), x) == :(a*x*b^-2+-1*a^2*b^-1*e^-1*(a*b+a^2*sec(d+e*x))^-1*tan(d+e*x)+-2*b^-2*e^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*d+(1/2)*e*x)))
@test integrate((b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-2*(a+b*sec(d+e*x)), x) == :(a*x*b^-4+-1//3*a^4*b^-1*e^-1*(a*b+a^2*sec(d+e*x))^-3*tan(d+e*x)+-1*b^-4*e^-1*(a+b)^-5//2*(a+-1b)^-5//2*(a^2+-2*b^2)*(b^4+2*a^4+-1*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*d+(1/2)*e*x))+-1//6*a*b^-3*e^-1*(b+a*sec(d+e*x))^-1*(a^2+-1*b^2)^-2*(6*a^4+11*b^4+-11*a^2*b^2)*tan(d+e*x)+-1//6*a*b^-2*e^-1*(b+a*sec(d+e*x))^-2*(a^2+-1*b^2)^-1*(-5*b^2+3*a^2)*tan(d+e*x))
@test integrate((b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^3//2*(a+b*sec(d+e*x)), x) == :(x*a^4*b^3*(a*b+a^2*sec(d+e*x))^-3*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^3//2+(1/2)*e^-1*(b+a*sec(d+e*x))^-3*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^3//2*(a^4+2*b^4+9*a^2*b^2)*arctanh(sin(d+e*x))+1//3*b*e^-1*(a*b+a^2*sec(d+e*x))^-3*(b*a^2+a^3*sec(d+e*x))^2*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^3//2*tan(d+e*x)+1//3*b*a^4*e^-1*(a*b+a^2*sec(d+e*x))^-3*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^3//2*(8*b^2+11*a^2)*tan(d+e*x)+1//6*a^5*e^-1*(a*b+a^2*sec(d+e*x))^-3*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^3//2*(3*a^2+5*b^2)*sec(d+e*x)*tan(d+e*x))
@test integrate((b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^(1/2)*(a+b*sec(d+e*x)), x) == :(b*x*a^2*(a*b+a^2*sec(d+e*x))^-1*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^(1/2)+e^-1*(b+a*sec(d+e*x))^-1*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^(1/2)*(a^2+b^2)*arctanh(sin(d+e*x))+b*a^2*e^-1*(a*b+a^2*sec(d+e*x))^-1*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^(1/2)*tan(d+e*x))
@test integrate((b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-1//2*(a+b*sec(d+e*x)), x) == :(x*b^-1*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-1//2*(a*b+a^2*sec(d+e*x))+-2*b^-1*e^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-1//2*(b+a*sec(d+e*x))*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*d+(1/2)*e*x)))
@test integrate((b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-3//2*(a+b*sec(d+e*x)), x) == :(x*a^-2*b^-3*(a*b+a^2*sec(d+e*x))^3*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-3//2+-1//2*b^-1*e^-1*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-3//2*(a*b+a^2*sec(d+e*x))*tan(d+e*x)+-1*b^-3*e^-1*(a+b)^-3//2*(a+-1b)^-3//2*(b+a*sec(d+e*x))^3*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-3//2*(2*a^4+2*b^4+-3*a^2*b^2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*d+(1/2)*e*x))+-1//2*b^-2*e^-1*(a^2+-1*b^2)^-1*(a*b+a^2*sec(d+e*x))^3*(b*a^2+a^3*sec(d+e*x))^-1*(b^2+a^2*sec(d+e*x)^2+2*a*b*sec(d+e*x))^-3//2*(-3*b^2+2*a^2)*tan(d+e*x))
@test integrate((im*sin(x)+cos(x))^-1*(-1*im*sin(x)+cos(x)), x) == :((1/2)*im*(-1*im*sin(x)+cos(x))^2)
@test integrate((-1*im*sin(x)+cos(x))^-1*(im*sin(x)+cos(x)), x) == :(-1//2*im*(-1*im*sin(x)+cos(x))^-2)
@test integrate((cos(x)+sin(x))^-1*(-1*sin(x)+cos(x)), x) == :(log(cos(x)+sin(x)))
@test integrate((b*cos(x)+c*sin(x))^-1*(B*cos(x)+C*sin(x)), x) == :(x*(b^2+c^2)^-1*(B*b+C*c)+(b^2+c^2)^-1*(B*c+-1*C*b)*log(b*cos(x)+c*sin(x)))
@test integrate((b*cos(x)+c*sin(x))^-2*(B*cos(x)+C*sin(x)), x) == :(-1*(b^2+c^2)^-1*(b*cos(x)+c*sin(x))^-1*(B*c+-1*C*b)+-1*(b^2+c^2)^-3//2*(B*b+C*c)*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x))))
@test integrate((b*cos(x)+c*sin(x))^-3*(B*cos(x)+C*sin(x)), x) == :(-1*(2*b^2+2*c^2)^-1*(b*cos(x)+c*sin(x))^-2*(B*c+-1*C*b)+b^-1*(b^2+c^2)^-1*(b*cos(x)+c*sin(x))^-1*(B*b+C*c)*sin(x))
@test integrate((b*cos(x)+c*sin(x))^-1*(A+B*cos(x)+C*sin(x)), x) == :(x*(b^2+c^2)^-1*(B*b+C*c)+(b^2+c^2)^-1*(B*c+-1*C*b)*log(b*cos(x)+c*sin(x))+-1*A*(b^2+c^2)^-1//2*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x))))
@test integrate((b*cos(x)+c*sin(x))^-2*(A+B*cos(x)+C*sin(x)), x) == :(-1*(b^2+c^2)^-1*(b*cos(x)+c*sin(x))^-1*(B*c+-1*C*b+A*c*cos(x)+-1*A*b*sin(x))+-1*(b^2+c^2)^-3//2*(B*b+C*c)*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x))))
@test integrate((b*cos(x)+c*sin(x))^-3*(A+B*cos(x)+C*sin(x)), x) == :(-1*(b^2+c^2)^-2*(b*cos(x)+c*sin(x))^-1*(c*(B*b+C*c)*cos(x)+-1*b*(B*b+C*c)*sin(x))+-1*(2*b^2+2*c^2)^-1*(b*cos(x)+c*sin(x))^-2*(B*c+-1*C*b+A*c*cos(x)+-1*A*b*sin(x))+-1//2*A*(b^2+c^2)^-3//2*arctanh((b^2+c^2)^-1//2*(c*cos(x)+-1*b*sin(x))))
@test integrate((a+b*cos(x)+c*sin(x))^-1*(A+B*cos(x)), x) == :(B*b*x*(b^2+c^2)^-1+B*c*(b^2+c^2)^-1*log(a+b*cos(x)+c*sin(x))+-1*(b^2+c^2)^-1*(a^2+-1*b^2+-1*c^2)^-1//2*(-2*A*(b^2+c^2)+2*B*a*b)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x))))
@test integrate((a+b*cos(x)+c*sin(x))^-2*(A+B*cos(x)), x) == :((a+b*cos(x)+c*sin(x))^-1*(a^2+-1*b^2+-1*c^2)^-1*(B*c+-1*(A*b+-1*B*a)*sin(x)+A*c*cos(x))+(a^2+-1*b^2+-1*c^2)^-3//2*(-2*B*b+2*A*a)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x))))
@test integrate((a+b*cos(x)+c*sin(x))^-3*(A+B*cos(x)), x) == :((a+b*cos(x)+c*sin(x))^-2*(-2*b^2+-2*c^2+2*a^2)^-1*(B*c+-1*(A*b+-1*B*a)*sin(x)+A*c*cos(x))+(a^2+-1*b^2+-1*c^2)^-5//2*(A*(b^2+c^2)+2*A*a^2+-3*B*a*b)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x)))+(1/2)*(a+b*cos(x)+c*sin(x))^-1*(a^2+-1*b^2+-1*c^2)^-2*(-1*(-1*B*a^2+-2*B*b^2+3*A*a*b)*sin(x)+B*a*c+c*(-2*B*b+3*A*a)*cos(x)))
@test integrate((a+b*cos(x)+im*b*sin(x))^-1*(A+B*cos(x)), x) == :((1/2)*B*a^-1*sin(x)+(1/2)*x*a^-2*(-1*B*b+2*A*a)+(1/2)*im*B*a^-1*cos(x)+(1/2)*im*a^-2*b^-1*(-1*B*a^2+-1*B*b^2+2*A*a*b)*log(a+b*cos(x)+im*b*sin(x)))
@test integrate((a+b*cos(x)+-1*im*b*sin(x))^-1*(A+B*cos(x)), x) == :((1/2)*B*a^-1*sin(x)+(1/2)*x*a^-2*(-1*B*b+2*A*a)+-1//2*im*B*a^-1*cos(x)+-1//2*im*a^-2*b^-1*(-1*B*a^2+-1*B*b^2+2*A*a*b)*log(a+b*cos(x)+-1*im*b*sin(x)))
@test integrate((a+b*cos(x)+c*sin(x))^-1*(A+C*sin(x)), x) == :(C*c*x*(b^2+c^2)^-1+(b^2+c^2)^-1*(a^2+-1*b^2+-1*c^2)^-1//2*(2*A*(b^2+c^2)+-2*C*a*c)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x)))+-1*C*b*(b^2+c^2)^-1*log(a+b*cos(x)+c*sin(x)))
@test integrate((a+b*cos(x)+c*sin(x))^-2*(A+C*sin(x)), x) == :((a^2+-1*b^2+-1*c^2)^-3//2*(-2*C*c+2*A*a)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x)))+-1*(a+b*cos(x)+c*sin(x))^-1*(a^2+-1*b^2+-1*c^2)^-1*(C*b+-1*(A*c+-1*C*a)*cos(x)+A*b*sin(x)))
@test integrate((a+b*cos(x)+c*sin(x))^-3*(A+C*sin(x)), x) == :((a^2+-1*b^2+-1*c^2)^-5//2*(A*(b^2+c^2)+2*A*a^2+-3*C*a*c)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x)))+-1*(a+b*cos(x)+c*sin(x))^-2*(-2*b^2+-2*c^2+2*a^2)^-1*(C*b+-1*(A*c+-1*C*a)*cos(x)+A*b*sin(x))+-1//2*(a+b*cos(x)+c*sin(x))^-1*(a^2+-1*b^2+-1*c^2)^-2*(-1*(-1*C*a^2+-2*C*c^2+3*A*a*c)*cos(x)+C*a*b+b*(-2*C*c+3*A*a)*sin(x)))
@test integrate((a+b*cos(x)+im*b*sin(x))^-1*(A+C*sin(x)), x) == :((1/2)*x*a^-2*(2*A*a+-1*im*C*b)+-1//2*C*a^-1*cos(x)+(1/2)*im*C*a^-1*sin(x)+(1/2)*a^-2*b^-1*(C*b^2+-1*C*a^2+2*im*A*a*b)*log(a+b*cos(x)+im*b*sin(x)))
@test integrate((a+b*cos(x)+-1*im*b*sin(x))^-1*(A+C*sin(x)), x) == :((1/2)*x*a^-2*(2*A*a+im*C*b)+-1//2*C*a^-1*cos(x)+-1//2*im*C*a^-1*sin(x)+-1//2*a^-2*b^-1*(C*a^2+-1*C*b^2+2*im*A*a*b)*log(a+b*cos(x)+-1*im*b*sin(x)))
@test integrate((a+b*cos(x)+c*sin(x))^-1*(B*cos(x)+C*sin(x)), x) == :(x*(b^2+c^2)^-1*(B*b+C*c)+(b^2+c^2)^-1*(B*c+-1*C*b)*log(a+b*cos(x)+c*sin(x))+-2*a*(b^2+c^2)^-1*(a^2+-1*b^2+-1*c^2)^-1//2*(B*b+C*c)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x))))
@test integrate((a+b*cos(x)+c*sin(x))^-2*(B*cos(x)+C*sin(x)), x) == :((a+b*cos(x)+c*sin(x))^-1*(a^2+-1*b^2+-1*c^2)^-1*(B*c+-1*C*b+B*a*sin(x)+-1*C*a*cos(x))+-1*(a^2+-1*b^2+-1*c^2)^-3//2*(2*B*b+2*C*c)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x))))
@test integrate((a+b*cos(x)+c*sin(x))^-3*(B*cos(x)+C*sin(x)), x) == :((a+b*cos(x)+c*sin(x))^-2*(-2*b^2+-2*c^2+2*a^2)^-1*(B*c+-1*C*b+B*a*sin(x)+-1*C*a*cos(x))+(1/2)*(a+b*cos(x)+c*sin(x))^-1*(a^2+-1*b^2+-1*c^2)^-2*(a*(B*c+-1*C*b)+(B*a^2+2*b*(B*b+C*c))*sin(x)+-1*(C*(a^2+2*c^2)+2*B*b*c)*cos(x))+-3*a*(a^2+-1*b^2+-1*c^2)^-5//2*(B*b+C*c)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x))))
@test integrate((a+b*cos(x)+im*b*sin(x))^-1*(B*cos(x)+C*sin(x)), x) == :((1/2)*a^-1*(-1C+im*B)*(-1*im*sin(x)+cos(x))+-1//2*b*x*a^-2*(B+im*C)+-1//2*a^-2*b^-1*(a^2*(C+im*B)+im*b^2*(B+im*C))*log(a+b*cos(x)+im*b*sin(x)))
@test integrate((a+b*cos(x)+-1*im*b*sin(x))^-1*(B*cos(x)+C*sin(x)), x) == :(-1//2*a^-1*(C+im*B)*(im*sin(x)+cos(x))+(1/2)*a^-2*b^-1*(b^2*(C+im*B)+im*a^2*(B+im*C))*log(a+b*cos(x)+-1*im*b*sin(x))+-1//2*b*x*a^-2*(B+-1*im*C))
@test integrate((a+b*cos(x)+c*sin(x))^-1*(A+B*cos(x)+C*sin(x)), x) == :(x*(b^2+c^2)^-1*(B*b+C*c)+(b^2+c^2)^-1*(B*c+-1*C*b)*log(a+b*cos(x)+c*sin(x))+(b^2+c^2)^-1*(a^2+-1*b^2+-1*c^2)^-1//2*(-2*a*(B*b+C*c)+2*A*(b^2+c^2))*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x))))
@test integrate((a+b*cos(x)+c*sin(x))^-2*(A+B*cos(x)+C*sin(x)), x) == :((a+b*cos(x)+c*sin(x))^-1*(a^2+-1*b^2+-1*c^2)^-1*(B*c+(A*c+-1*C*a)*cos(x)+-1*C*b+-1*(A*b+-1*B*a)*sin(x))+(a^2+-1*b^2+-1*c^2)^-3//2*(-2*B*b+-2*C*c+2*A*a)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x))))
@test integrate((a+b*cos(x)+c*sin(x))^-3*(A+B*cos(x)+C*sin(x)), x) == :((a+b*cos(x)+c*sin(x))^-2*(-2*b^2+-2*c^2+2*a^2)^-1*(B*c+(A*c+-1*C*a)*cos(x)+-1*C*b+-1*(A*b+-1*B*a)*sin(x))+(a^2+-1*b^2+-1*c^2)^-5//2*(A*(b^2+c^2)+-3*a*(B*b+C*c)+2*A*a^2)*arctan((a^2+-1*b^2+-1*c^2)^-1//2*(c+(a+-1b)*tan((1/2)*x)))+(1/2)*(a+b*cos(x)+c*sin(x))^-1*(a^2+-1*b^2+-1*c^2)^-2*(a*(B*c+-1*C*b)+(-1*C*a^2+-2*c*(B*b+C*c)+3*A*a*c)*cos(x)+-1*(-1*B*a^2+-2*b*(B*b+C*c)+3*A*a*b)*sin(x)))
@test integrate((a+b*cos(x)+im*b*sin(x))^-1*(A+B*cos(x)+C*sin(x)), x) == :((1/2)*x*a^-2*(-1*b*(B+im*C)+2*A*a)+(1/2)*a^-1*(-1C+im*B)*(-1*im*sin(x)+cos(x))+(1/2)*im*a^-2*b^-1*(-1*a^2*(B+-1*im*C)+-1*b^2*(B+im*C)+2*A*a*b)*log(a+b*cos(x)+im*b*sin(x)))
@test integrate((a+b*cos(x)+-1*im*b*sin(x))^-1*(A+B*cos(x)+C*sin(x)), x) == :((1/2)*x*a^-2*(-1*B*b+2*A*a+im*C*b)+-1//2*a^-1*(C+im*B)*(im*sin(x)+cos(x))+-1//2*im*a^-2*b^-1*(-1*a^2*(B+im*C)+-1*b^2*(B+-1*im*C)+2*A*a*b)*log(a+b*cos(x)+-1*im*b*sin(x)))
@test integrate((a+b*cos(x)+c*sin(x))^5//2*(d+b*e*cos(x)+c*e*sin(x)), x) == :(-2//7*(a+b*cos(x)+c*sin(x))^5//2*(c*e*cos(x)+-1*b*e*sin(x))+-2//35*(a+b*cos(x)+c*sin(x))^3//2*(c*(7d+5*a*e)*cos(x)+-1*b*(7d+5*a*e)*sin(x))+-2//105*(a+b*cos(x)+c*sin(x))^(1/2)*(c*(e*(25*b^2+25*c^2)+15*e*a^2+56*a*d)*cos(x)+-1*b*(e*(25*b^2+25*c^2)+15*e*a^2+56*a*d)*sin(x))+1//105*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^-1//2*(a+b*cos(x)+c*sin(x))^(1/2)*(2*d*(63*b^2+63*c^2)+30*e*a^3+322*d*a^2+290*a*e*(b^2+c^2))*Elliptic.E((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+-1//105*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^(1/2)*(a+b*cos(x)+c*sin(x))^-1//2*(-2*b^2+-2*c^2+2*a^2)*(e*(25*b^2+25*c^2)+15*e*a^2+56*a*d)*Elliptic.F((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(x)+c*sin(x))^3//2*(d+b*e*cos(x)+c*e*sin(x)), x) == :(-2//5*(a+b*cos(x)+c*sin(x))^3//2*(c*e*cos(x)+-1*b*e*sin(x))+-2//15*(a+b*cos(x)+c*sin(x))^(1/2)*(c*(5d+3*a*e)*cos(x)+-1*b*(5d+3*a*e)*sin(x))+1//15*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^-1//2*(a+b*cos(x)+c*sin(x))^(1/2)*(2*e*(9*b^2+9*c^2)+6*e*a^2+40*a*d)*Elliptic.E((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+-1//15*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^(1/2)*(a+b*cos(x)+c*sin(x))^-1//2*(5d+3*a*e)*(-2*b^2+-2*c^2+2*a^2)*Elliptic.F((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(x)+c*sin(x))^(1/2)*(d+b*e*cos(x)+c*e*sin(x)), x) == :(-2//3*(a+b*cos(x)+c*sin(x))^(1/2)*(c*e*cos(x)+-1*b*e*sin(x))+1//3*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^-1//2*(a+b*cos(x)+c*sin(x))^(1/2)*(6d+2*a*e)*Elliptic.E((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+-1//3*e*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^(1/2)*(a+b*cos(x)+c*sin(x))^-1//2*(-2*b^2+-2*c^2+2*a^2)*Elliptic.F((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(x)+c*sin(x))^-1//2*(d+b*e*cos(x)+c*e*sin(x)), x) == :(((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^(1/2)*(a+b*cos(x)+c*sin(x))^-1//2*(2d+-2*a*e)*Elliptic.F((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+2*e*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^-1//2*(a+b*cos(x)+c*sin(x))^(1/2)*Elliptic.E((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(x)+c*sin(x))^-3//2*(d+b*e*cos(x)+c*e*sin(x)), x) == :((a+b*cos(x)+c*sin(x))^-1//2*(a^2+-1*b^2+-1*c^2)^-1*(-2*b*(d+-1*a*e)*sin(x)+2*c*(d+-1*a*e)*cos(x))+2*e*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^(1/2)*(a+b*cos(x)+c*sin(x))^-1//2*Elliptic.F((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^-1//2*(a+b*cos(x)+c*sin(x))^(1/2)*(a^2+-1*b^2+-1*c^2)^-1*(2d+-2*a*e)*Elliptic.E((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+b*cos(x)+c*sin(x))^-5//2*(d+b*e*cos(x)+c*e*sin(x)), x) == :((a+b*cos(x)+c*sin(x))^-3//2*(-3*b^2+-3*c^2+3*a^2)^-1*(-2*b*(d+-1*a*e)*sin(x)+2*c*(d+-1*a*e)*cos(x))+1//3*(a+b*cos(x)+c*sin(x))^-1//2*(a^2+-1*b^2+-1*c^2)^-2*(-2*b*(-1*e*a^2+-1*e*(3*b^2+3*c^2)+4*a*d)*sin(x)+2*c*(-1*e*a^2+-1*e*(3*b^2+3*c^2)+4*a*d)*cos(x))+-1*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^(1/2)*(a+b*cos(x)+c*sin(x))^-1//2*(-3*b^2+-3*c^2+3*a^2)^-1*(2d+-2*a*e)*Elliptic.F((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2))+1//3*((a+(b^2+c^2)^(1/2))^-1*(a+b*cos(x)+c*sin(x)))^-1//2*(a+b*cos(x)+c*sin(x))^(1/2)*(a^2+-1*b^2+-1*c^2)^-2*(-2*e*a^2+-2*e*(3*b^2+3*c^2)+8*a*d)*Elliptic.E((1/2)*x+-1//2*atan(c,b),2*(a+(b^2+c^2)^(1/2))^-1*(b^2+c^2)^(1/2)))
@test integrate((a+c*sin(d+e*x))^-1*(A+B*cos(d+e*x)+C*sin(d+e*x)), x) == :(C*x*c^-1+B*c^-1*e^-1*log(a+c*sin(d+e*x))+c^-1*e^-1*(a^2+-1*c^2)^-1//2*(-2*C*a+2*A*c)*arctan((a^2+-1*c^2)^-1//2*(c+a*tan((1/2)*d+(1/2)*e*x))))
@test integrate((a+c*sin(d+e*x))^-2*(A+B*cos(d+e*x)+C*sin(d+e*x)), x) == :(e^-1*(a^2+-1*c^2)^-3//2*(-2*C*c+2*A*a)*arctan((a^2+-1*c^2)^-1//2*(c+a*tan((1/2)*d+(1/2)*e*x)))+-1*B*c^-1*e^-1*(a+c*sin(d+e*x))^-1+e^-1*(a+c*sin(d+e*x))^-1*(a^2+-1*c^2)^-1*(A*c+-1*C*a)*cos(d+e*x))
@test integrate((a+c*sin(d+e*x))^-3*(A+B*cos(d+e*x)+C*sin(d+e*x)), x) == :(e^-1*(a^2+-1*c^2)^-5//2*(A*c^2+2*A*a^2+-3*C*a*c)*arctan((a^2+-1*c^2)^-1//2*(c+a*tan((1/2)*d+(1/2)*e*x)))+-1//2*B*c^-1*e^-1*(a+c*sin(d+e*x))^-2+e^-1*(a+c*sin(d+e*x))^-2*(-2*c^2+2*a^2)^-1*(A*c+-1*C*a)*cos(d+e*x)+(1/2)*e^-1*(a+c*sin(d+e*x))^-1*(a^2+-1*c^2)^-2*(-1*C*a^2+-2*C*c^2+3*A*a*c)*cos(d+e*x))
@test integrate((a+c*sin(d+e*x))^-4*(A+B*cos(d+e*x)+C*sin(d+e*x)), x) == :(e^-1*(a^2+-1*c^2)^-7//2*(-1*C*c^3+2*A*a^3+-4*C*c*a^2+3*A*a*c^2)*arctan((a^2+-1*c^2)^-1//2*(c+a*tan((1/2)*d+(1/2)*e*x)))+-1//3*B*c^-1*e^-1*(a+c*sin(d+e*x))^-3+e^-1*(a+c*sin(d+e*x))^-3*(-3*c^2+3*a^2)^-1*(A*c+-1*C*a)*cos(d+e*x)+1//6*e^-1*(a+c*sin(d+e*x))^-1*(a^2+-1*c^2)^-3*(-2*C*a^3+4*A*c^3+-13*C*a*c^2+11*A*c*a^2)*cos(d+e*x)+1//6*e^-1*(a+c*sin(d+e*x))^-2*(a^2+-1*c^2)^-2*(-3*C*c^2+-2*C*a^2+5*A*a*c)*cos(d+e*x))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^3, x) == :(1//8*a*x*(3*b^2+8*a^2)+-1//24*b*d^-1*(b^2+16*a^2)*cos(2c+2*d*x)+-1//48*b*d^-1*(2a+b*sin(2c+2*d*x))^2*cos(2c+2*d*x)+-5//48*a*b^2*d^-1*cos(2c+2*d*x)*sin(2c+2*d*x))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^2, x) == :(x*(a^2+1//8*b^2)+-1//2*a*b*d^-1*cos(2c+2*d*x)+-1//16*b^2*d^-1*cos(2c+2*d*x)*sin(2c+2*d*x))
@test integrate(a+b*cos(c+d*x)*sin(c+d*x), x) == :(a*x+(1/2)*b*d^-1*sin(c+d*x)^2)
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^-1, x) == :(2*d^-1*(-1*b^2+4*a^2)^-1//2*arctan((-1*b^2+4*a^2)^-1//2*(b+2*a*tan(c+d*x))))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^-2, x) == :(8*a*d^-1*(-1*b^2+4*a^2)^-3//2*arctan((-1*b^2+4*a^2)^-1//2*(b+2*a*tan(c+d*x)))+2*b*d^-1*(-1*b^2+4*a^2)^-1*(2a+b*sin(2c+2*d*x))^-1*cos(2c+2*d*x))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^-3, x) == :(d^-1*(-1*b^2+4*a^2)^-5//2*(4*b^2+32*a^2)*arctan((-1*b^2+4*a^2)^-1//2*(b+2*a*tan(c+d*x)))+2*b*d^-1*(-1*b^2+4*a^2)^-1*(2a+b*sin(2c+2*d*x))^-2*cos(2c+2*d*x)+12*a*b*d^-1*(-1*b^2+4*a^2)^-2*(2a+b*sin(2c+2*d*x))^-1*cos(2c+2*d*x))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^5//2, x) == :(-1//40*b*2^(1/2)*d^-1*(2a+b*sin(2c+2*d*x))^3//2*cos(2c+2*d*x)+-2//15*a*b*2^(1/2)*d^-1*(2a+b*sin(2c+2*d*x))^(1/2)*cos(2c+2*d*x)+1//120*2^(1/2)*d^-1*((b+2a)^-1*(2a+b*sin(2c+2*d*x)))^-1//2*(2a+b*sin(2c+2*d*x))^(1/2)*(9*b^2+92*a^2)*Elliptic.E(c+-1//4*pi+d*x,2*b*(b+2a)^-1)+-2//15*a*2^(1/2)*d^-1*((b+2a)^-1*(2a+b*sin(2c+2*d*x)))^(1/2)*(2a+b*sin(2c+2*d*x))^-1//2*(-1*b^2+4*a^2)*Elliptic.F(c+-1//4*pi+d*x,2*b*(b+2a)^-1))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^3//2, x) == :(-1//12*b*2^(1/2)*d^-1*(2a+b*sin(2c+2*d*x))^(1/2)*cos(2c+2*d*x)+-1//12*2^(1/2)*d^-1*((b+2a)^-1*(2a+b*sin(2c+2*d*x)))^(1/2)*(2a+b*sin(2c+2*d*x))^-1//2*(-1*b^2+4*a^2)*Elliptic.F(c+-1//4*pi+d*x,2*b*(b+2a)^-1)+2//3*a*2^(1/2)*d^-1*((b+2a)^-1*(2a+b*sin(2c+2*d*x)))^-1//2*(2a+b*sin(2c+2*d*x))^(1/2)*Elliptic.E(c+-1//4*pi+d*x,2*b*(b+2a)^-1))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^(1/2), x) == :((1/2)*2^(1/2)*d^-1*((b+2a)^-1*(2a+b*sin(2c+2*d*x)))^-1//2*(2a+b*sin(2c+2*d*x))^(1/2)*Elliptic.E(c+-1//4*pi+d*x,2*b*(b+2a)^-1))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^-1//2, x) == :(2^(1/2)*d^-1*((b+2a)^-1*(2a+b*sin(2c+2*d*x)))^(1/2)*(2a+b*sin(2c+2*d*x))^-1//2*Elliptic.F(c+-1//4*pi+d*x,2*b*(b+2a)^-1))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^-3//2, x) == :(2*b*2^(1/2)*d^-1*(-1*b^2+4*a^2)^-1*(2a+b*sin(2c+2*d*x))^-1//2*cos(2c+2*d*x)+2*2^(1/2)*d^-1*((b+2a)^-1*(2a+b*sin(2c+2*d*x)))^-1//2*(-1*b^2+4*a^2)^-1*(2a+b*sin(2c+2*d*x))^(1/2)*Elliptic.E(c+-1//4*pi+d*x,2*b*(b+2a)^-1))
@test integrate((a+b*cos(c+d*x)*sin(c+d*x))^-5//2, x) == :(-4*2^(1/2)*d^-1*((b+2a)^-1*(2a+b*sin(2c+2*d*x)))^(1/2)*(-3*b^2+12*a^2)^-1*(2a+b*sin(2c+2*d*x))^-1//2*Elliptic.F(c+-1//4*pi+d*x,2*b*(b+2a)^-1)+4*b*2^(1/2)*d^-1*(-3*b^2+12*a^2)^-1*(2a+b*sin(2c+2*d*x))^-3//2*cos(2c+2*d*x)+32//3*a*b*2^(1/2)*d^-1*(-1*b^2+4*a^2)^-2*(2a+b*sin(2c+2*d*x))^-1//2*cos(2c+2*d*x)+32//3*a*2^(1/2)*d^-1*((b+2a)^-1*(2a+b*sin(2c+2*d*x)))^-1//2*(-1*b^2+4*a^2)^-2*(2a+b*sin(2c+2*d*x))^(1/2)*Elliptic.E(c+-1//4*pi+d*x,2*b*(b+2a)^-1))
@test integrate(x^3*(a+b*cos(x)*sin(x))^-1, x) == :(-3//4*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(4,im*b*((-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+3//4*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(4,im*b*(-1*(-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+-3//2*x^2*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(2,im*b*(-1*(-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+3//2*x^2*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(2,im*b*((-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+im*x^3*(-1*b^2+4*a^2)^-1//2*log(1+-1*im*b*((-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+-1*im*x^3*(-1*b^2+4*a^2)^-1//2*log(1+-1*im*b*(-1*(-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+-3//2*im*x*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(3,im*b*(-1*(-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+3//2*im*x*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(3,im*b*((-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x)))
@test integrate(x^2*(a+b*cos(x)*sin(x))^-1, x) == :(x*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(2,im*b*((-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+(1/2)*im*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(3,im*b*((-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+-1*x*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(2,im*b*(-1*(-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+-1//2*im*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(3,im*b*(-1*(-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+im*x^2*(-1*b^2+4*a^2)^-1//2*log(1+-1*im*b*((-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+-1*im*x^2*(-1*b^2+4*a^2)^-1//2*log(1+-1*im*b*(-1*(-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x)))
@test integrate(x*(a+b*cos(x)*sin(x))^-1, x) == :((1/2)*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(2,im*b*((-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+-1//2*(-1*b^2+4*a^2)^-1//2*Polylogarithms.polylog(2,im*b*(-1*(-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+im*x*(-1*b^2+4*a^2)^-1//2*log(1+-1*im*b*((-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x))+-1*im*x*(-1*b^2+4*a^2)^-1//2*log(1+-1*im*b*(-1*(-1*b^2+4*a^2)^(1/2)+2a)^-1*exp(2*im*x)))
@test integrate(x^-4*(-1*sin(a*x)+a*x*cos(a*x))^-2*sin(a*x)^6, x) == :(a^2*x^-1+x^-3*sin(a*x)^2+-4//3*x^-3*sin(a*x)^4+-2//3*a^3*sinintegral(2*a*x)+16//3*a^3*sinintegral(4*a*x)+a^-2*x^-5*sin(a*x)^4+-10*a^2*x^-1*sin(a*x)^2+32//3*a^2*x^-1*sin(a*x)^4+a*x^-2*cos(a*x)*sin(a*x)+a^-1*x^-4*sin(a*x)^3*cos(a*x)+a^-2*x^-5*(-1*sin(a*x)+a*x*cos(a*x))^-1*sin(a*x)^5+-8//3*a*x^-2*sin(a*x)^3*cos(a*x))
@test integrate(x^-3*(-1*sin(a*x)+a*x*cos(a*x))^-2*sin(a*x)^5, x) == :(x^-2*sin(a*x)+-3//2*x^-2*sin(a*x)^3+-1//8*a^2*sinintegral(a*x)+27//8*a^2*sinintegral(3*a*x)+a*x^-1*cos(a*x)+a^-2*x^-4*sin(a*x)^3+a^-1*x^-3*sin(a*x)^2*cos(a*x)+a^-2*x^-4*(-1*sin(a*x)+a*x*cos(a*x))^-1*sin(a*x)^4+-9//2*a*x^-1*sin(a*x)^2*cos(a*x))
@test integrate(x^-2*(-1*sin(a*x)+a*x*cos(a*x))^-2*sin(a*x)^4, x) == :(x^-1+-2*x^-1*sin(a*x)^2+2*a*sinintegral(2*a*x)+a^-2*x^-3*sin(a*x)^2+a^-1*x^-2*cos(a*x)*sin(a*x)+a^-2*x^-3*(-1*sin(a*x)+a*x*cos(a*x))^-1*sin(a*x)^3)
@test integrate(x^-1*(-1*sin(a*x)+a*x*cos(a*x))^-2*sin(a*x)^3, x) == :(a^-1*x^-1*cos(a*x)+a^-2*x^-2*sin(a*x)+a^-2*x^-2*(-1*sin(a*x)+a*x*cos(a*x))^-1*sin(a*x)^2+sinintegral(a*x))
@test integrate((-1*sin(a*x)+a*x*cos(a*x))^-2*sin(a*x)^2, x) == :(a^-2*x^-1+a^-2*x^-1*(-1*sin(a*x)+a*x*cos(a*x))^-1*sin(a*x))
@test integrate(x*(-1*sin(a*x)+a*x*cos(a*x))^-2*sin(a*x), x) == :(a^-2*(-1*sin(a*x)+a*x*cos(a*x))^-1)
@test integrate(x^2*(-1*sin(a*x)+a*x*cos(a*x))^-2, x) == :(-1*a^-3*cot(a*x)+x*a^-2*(-1*sin(a*x)+a*x*cos(a*x))^-1*csc(a*x))
@test integrate(x^3*(-1*sin(a*x)+a*x*cos(a*x))^-2*csc(a*x), x) == :(-1*a^-4*csc(a*x)+im*a^-4*Polylogarithms.polylog(2,-1*exp(im*a*x))+-1*im*a^-4*Polylogarithms.polylog(2,exp(im*a*x))+-2*x*a^-3*arctanh(exp(im*a*x))+a^-2*x^2*(-1*sin(a*x)+a*x*cos(a*x))^-1*csc(a*x)^2+-1*x*a^-3*cot(a*x)*csc(a*x))
@test integrate(x^4*(-1*sin(a*x)+a*x*cos(a*x))^-2*csc(a*x)^2, x) == :(-1*a^-5*cot(a*x)+-1*x*a^-4*csc(a*x)^2+-2*im*a^-5*Polylogarithms.polylog(2,exp(2*im*a*x))+-2*im*a^-3*x^2+-2*a^-3*x^2*cot(a*x)+4*x*a^-4*log(1+-1*exp(2*im*a*x))+a^-2*x^3*(-1*sin(a*x)+a*x*cos(a*x))^-1*csc(a*x)^3+-1*a^-3*x^2*csc(a*x)^2*cot(a*x))
@test integrate(x^-4*(a*x*sin(a*x)+cos(a*x))^-2*cos(a*x)^6, x) == :(a^2*x^-1+x^-3*cos(a*x)^2+-4//3*x^-3*cos(a*x)^4+2//3*a^3*sinintegral(2*a*x)+16//3*a^3*sinintegral(4*a*x)+a^-2*x^-5*cos(a*x)^4+-10*a^2*x^-1*cos(a*x)^2+32//3*a^2*x^-1*cos(a*x)^4+-1*a*x^-2*cos(a*x)*sin(a*x)+-1*a^-1*x^-4*cos(a*x)^3*sin(a*x)+-1*a^-2*x^-5*(a*x*sin(a*x)+cos(a*x))^-1*cos(a*x)^5+8//3*a*x^-2*cos(a*x)^3*sin(a*x))
@test integrate(x^-3*(a*x*sin(a*x)+cos(a*x))^-2*cos(a*x)^5, x) == :(x^-2*cos(a*x)+-27//8*a^2*cosintegral(3*a*x)+-3//2*x^-2*cos(a*x)^3+-1//8*a^2*cosintegral(a*x)+a^-2*x^-4*cos(a*x)^3+-1*a*x^-1*sin(a*x)+-1*a^-1*x^-3*cos(a*x)^2*sin(a*x)+-1*a^-2*x^-4*(a*x*sin(a*x)+cos(a*x))^-1*cos(a*x)^4+9//2*a*x^-1*cos(a*x)^2*sin(a*x))
@test integrate(x^-2*(a*x*sin(a*x)+cos(a*x))^-2*cos(a*x)^4, x) == :(x^-1+-2*a*sinintegral(2*a*x)+-2*x^-1*cos(a*x)^2+a^-2*x^-3*cos(a*x)^2+-1*a^-1*x^-2*cos(a*x)*sin(a*x)+-1*a^-2*x^-3*(a*x*sin(a*x)+cos(a*x))^-1*cos(a*x)^3)
@test integrate(x^-1*(a*x*sin(a*x)+cos(a*x))^-2*cos(a*x)^3, x) == :(a^-2*x^-2*cos(a*x)+-1*a^-1*x^-1*sin(a*x)+-1*a^-2*x^-2*(a*x*sin(a*x)+cos(a*x))^-1*cos(a*x)^2+cosintegral(a*x))
@test integrate((a*x*sin(a*x)+cos(a*x))^-2*cos(a*x)^2, x) == :(a^-2*x^-1+-1*a^-2*x^-1*(a*x*sin(a*x)+cos(a*x))^-1*cos(a*x))
@test integrate(x*(a*x*sin(a*x)+cos(a*x))^-2*cos(a*x), x) == :(-1*a^-2*(a*x*sin(a*x)+cos(a*x))^-1)
@test integrate(x^2*(a*x*sin(a*x)+cos(a*x))^-2, x) == :(a^-3*tan(a*x)+-1*x*a^-2*(a*x*sin(a*x)+cos(a*x))^-1*sec(a*x))
@test integrate(x^3*(a*x*sin(a*x)+cos(a*x))^-2*sec(a*x), x) == :(-1*a^-4*sec(a*x)+im*a^-4*Polylogarithms.polylog(2,-1*im*exp(im*a*x))+-1*im*a^-4*Polylogarithms.polylog(2,im*exp(im*a*x))+x*a^-3*sec(a*x)*tan(a*x)+-1*a^-2*x^2*(a*x*sin(a*x)+cos(a*x))^-1*sec(a*x)^2+-2*im*x*a^-3*arctan(exp(im*a*x)))
@test integrate(x^4*(a*x*sin(a*x)+cos(a*x))^-2*sec(a*x)^2, x) == :(a^-5*tan(a*x)+-1*x*a^-4*sec(a*x)^2+-2*im*a^-5*Polylogarithms.polylog(2,-1*exp(2*im*a*x))+-2*im*a^-3*x^2+2*a^-3*x^2*tan(a*x)+4*x*a^-4*log(1+exp(2*im*a*x))+a^-3*x^2*sec(a*x)^2*tan(a*x)+-1*a^-2*x^3*(a*x*sin(a*x)+cos(a*x))^-1*sec(a*x)^3)
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^(1/2)*sec(2a+2*b*x)^4, x) == :(-4//35*b^-1*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x)+-6//35*b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^3//2*tan(2a+2*b*x)+-2//5*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)+1//7*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*sec(2a+2*b*x)^3*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^(1/2)*sec(2a+2*b*x)^3, x) == :(2//15*b^-1*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x)+1//5*b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^3//2*tan(2a+2*b*x)+7//15*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^(1/2)*sec(2a+2*b*x)^2, x) == :(1//3*b^-1*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x)+-1//3*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^(1/2)*sec(2a+2*b*x), x) == :(c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^(1/2), x) == :(-1*b^-1*c^(1/2)*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^(1/2)*cos(2a+2*b*x), x) == :((1/2)*b^-1*c^(1/2)*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-1//2*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^(1/2)*cos(2a+2*b*x)^2, x) == :(-3//8*b^-1*c^(1/2)*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+3//8*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x)+-1//4*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*cos(2a+2*b*x)*sin(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^(1/2)*cos(2a+2*b*x)^3, x) == :(5//16*b^-1*c^(1/2)*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-5//16*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x)+-1//6*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*cos(2a+2*b*x)^2*sin(2a+2*b*x)+5//24*c*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*cos(2a+2*b*x)*sin(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^3//2*sec(2a+2*b*x)^4, x) == :(34//105*b^-1*(-1c+c*sec(2a+2*b*x))^3//2*tan(2a+2*b*x)+34//45*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)+68//315*c*b^-1*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x)+-17//63*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*sec(2a+2*b*x)^3*tan(2a+2*b*x)+1//9*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*sec(2a+2*b*x)^4*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^3//2*sec(2a+2*b*x)^3, x) == :(2//35*b^-1*(-1c+c*sec(2a+2*b*x))^3//2*tan(2a+2*b*x)+-76//105*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)+1//7*b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^5//2*tan(2a+2*b*x)+19//105*c*b^-1*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^3//2*sec(2a+2*b*x)^2, x) == :(1//5*b^-1*(-1c+c*sec(2a+2*b*x))^3//2*tan(2a+2*b*x)+-1//5*c*b^-1*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x)+4//5*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^3//2*sec(2a+2*b*x), x) == :(-4//3*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)+1//3*c*b^-1*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^3//2, x) == :(b^-1*c^3//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^3//2*cos(2a+2*b*x), x) == :(-3//2*b^-1*c^3//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+(1/2)*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^3//2*cos(2a+2*b*x)^2, x) == :(7//8*b^-1*c^3//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-7//8*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x)+1//4*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*cos(2a+2*b*x)*sin(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^3//2*cos(2a+2*b*x)^3, x) == :(-11//16*b^-1*c^3//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+11//16*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x)+-11//24*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*cos(2a+2*b*x)*sin(2a+2*b*x)+1//6*b^-1*c^2*(-1c+c*sec(2a+2*b*x))^-1//2*cos(2a+2*b*x)^2*sin(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-1//2*sec(2a+2*b*x)^4, x) == :(14//15*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)+-1//2*2^(1/2)*b^-1*c^-1//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+1//5*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*sec(2a+2*b*x)^2*tan(2a+2*b*x)+1//15*b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-1//2*sec(2a+2*b*x)^3, x) == :(2//3*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)+-1//2*2^(1/2)*b^-1*c^-1//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+1//3*b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-1//2*sec(2a+2*b*x)^2, x) == :(b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)+-1//2*2^(1/2)*b^-1*c^-1//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-1//2*sec(2a+2*b*x), x) == :(-1//2*2^(1/2)*b^-1*c^-1//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-1//2, x) == :(b^-1*c^-1//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-1//2*2^(1/2)*b^-1*c^-1//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-1//2*cos(2a+2*b*x), x) == :((1/2)*b^-1*c^-1//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+(1/2)*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x)+-1//2*2^(1/2)*b^-1*c^-1//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-1//2*cos(2a+2*b*x)^2, x) == :(1//8*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x)+7//8*b^-1*c^-1//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-1//2*2^(1/2)*b^-1*c^-1//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+1//4*b^-1*(-1c+c*sec(2a+2*b*x))^-1//2*cos(2a+2*b*x)*sin(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-3//2*sec(2a+2*b*x)^4, x) == :(-11//8*2^(1/2)*b^-1*c^-3//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-1//4*b^-1*(-1c+c*sec(2a+2*b*x))^-3//2*sec(2a+2*b*x)^2*tan(2a+2*b*x)+7//12*b^-1*c^-2*(-1c+c*sec(2a+2*b*x))^(1/2)*tan(2a+2*b*x)+13//6*b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-3//2*sec(2a+2*b*x)^3, x) == :(-1//4*b^-1*(-1c+c*sec(2a+2*b*x))^-3//2*tan(2a+2*b*x)+b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)+-7//8*2^(1/2)*b^-1*c^-3//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-3//2*sec(2a+2*b*x)^2, x) == :(-1//4*b^-1*(-1c+c*sec(2a+2*b*x))^-3//2*tan(2a+2*b*x)+-3//8*2^(1/2)*b^-1*c^-3//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-3//2*sec(2a+2*b*x), x) == :(-1//4*b^-1*(-1c+c*sec(2a+2*b*x))^-3//2*tan(2a+2*b*x)+1//8*2^(1/2)*b^-1*c^-3//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-3//2, x) == :(-1*b^-1*c^-3//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-1//4*b^-1*(-1c+c*sec(2a+2*b*x))^-3//2*tan(2a+2*b*x)+5//8*2^(1/2)*b^-1*c^-3//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-3//2*cos(2a+2*b*x), x) == :(-3//2*b^-1*c^-3//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-1//4*b^-1*(-1c+c*sec(2a+2*b*x))^-3//2*sin(2a+2*b*x)+-3//4*b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x)+9//8*2^(1/2)*b^-1*c^-3//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x)))
@test integrate((c*tan(a+b*x)*tan(2a+2*b*x))^-3//2*cos(2a+2*b*x)^2, x) == :(-19//8*b^-1*c^-3//2*arctanh(c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-7//8*b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^-1//2*sin(2a+2*b*x)+-1//4*b^-1*(-1c+c*sec(2a+2*b*x))^-3//2*cos(2a+2*b*x)*sin(2a+2*b*x)+13//8*2^(1/2)*b^-1*c^-3//2*arctanh((1/2)*2^(1/2)*c^(1/2)*(-1c+c*sec(2a+2*b*x))^-1//2*tan(2a+2*b*x))+-1//2*b^-1*c^-1*(-1c+c*sec(2a+2*b*x))^-1//2*cos(2a+2*b*x)*sin(2a+2*b*x))
@test integrate(sin(2x)^-1//2*cot(x)*csc(x), x) == :(-2//3*sin(2x)^-1//2*cos(x)*cot(x))
@test integrate((-2+tan(x))^-1*csc(x)^2*sin(2x)^-1//2*sec(x), x) == :((1/2)*sin(2x)^-1//2*cos(x)+1//3*sin(2x)^-1//2*cos(x)*cot(x)+-5//4*2^(1/2)*sin(2x)^-1//2*tan(x)^-1//2*arctanh((1/2)*2^(1/2)*tan(x)^(1/2))*sin(x))
@test integrate((sin(x)^2+-1*sin(2x))^-1*cos(x)^2*sin(2x)^-5//2*sin(x), x) == :((1/2)*cos(x)^3*sin(x)^2*sin(2x)^-5//2+1//3*cos(x)^4*sin(2x)^-5//2*sin(x)+-5//4*2^(1/2)*sin(x)^5*sin(2x)^-5//2*tan(x)^-5//2*arctanh((1/2)*2^(1/2)*tan(x)^(1/2)))
@test integrate((sin(x)^2+-1*sin(2x))^-1*cos(x)^3*sin(2x)^-5//2*cos(2x), x) == :(1//5*cos(x)^5*sin(2x)^-5//2+-3//4*cos(x)^3*sin(x)^2*sin(2x)^-5//2+1//6*cos(x)^4*sin(2x)^-5//2*sin(x)+3//8*2^(1/2)*sin(x)^5*sin(2x)^-5//2*tan(x)^-5//2*arctanh((1/2)*2^(1/2)*tan(x)^(1/2)))
@test integrate((a*sin(c+d*x)+b*sec(c+d*x))^n*(a*cos(c+d*x)+b*sec(c+d*x)*tan(c+d*x)), x) == :(d^-1*(1+n)^-1*(a*sin(c+d*x)+b*sec(c+d*x))^(1+n))
@test integrate((a*sin(c+d*x)+b*sec(c+d*x))^3*(a*cos(c+d*x)+b*sec(c+d*x)*tan(c+d*x)), x) == :(1//4*d^-1*(a*sin(c+d*x)+b*sec(c+d*x))^4)
@test integrate((a*sin(c+d*x)+b*sec(c+d*x))^2*(a*cos(c+d*x)+b*sec(c+d*x)*tan(c+d*x)), x) == :(1//3*d^-1*(a*sin(c+d*x)+b*sec(c+d*x))^3)
@test integrate((a*cos(c+d*x)+b*sec(c+d*x)*tan(c+d*x))*(a*sin(c+d*x)+b*sec(c+d*x)), x) == :((1/2)*d^-1*(a*sin(c+d*x)+b*sec(c+d*x))^2)
@test integrate((a*sin(c+d*x)+b*sec(c+d*x))^-1*(a*cos(c+d*x)+b*sec(c+d*x)*tan(c+d*x)), x) == :(d^-1*log(a*sin(c+d*x)+b*sec(c+d*x)))
@test integrate((a*sin(c+d*x)+b*sec(c+d*x))^-2*(a*cos(c+d*x)+b*sec(c+d*x)*tan(c+d*x)), x) == :(-1*d^-1*(a*sin(c+d*x)+b*sec(c+d*x))^-1)
@test integrate((a*sin(c+d*x)+b*sec(c+d*x))^-3*(a*cos(c+d*x)+b*sec(c+d*x)*tan(c+d*x)), x) == :(-1//2*d^-1*(a*sin(c+d*x)+b*sec(c+d*x))^-2)
@test integrate((a+b*cos(x))^-1*sin(x), x) == :(-1*b^-1*log(a+b*cos(x)))
@test integrate((a+b*cos(x))^n*sin(x), x) == :(-1*b^-1*(1+n)^-1*(a+b*cos(x))^(1+n))
@test integrate((1+cos(x)^2)^-1//2*sin(x), x) == :(-1*arcsinh(cos(x)))
@test integrate(cos(cos(x))*sin(x), x) == :(-1*sin(cos(x)))
@test integrate(cos(x)*cos(cos(x))*sin(x)*sin(cos(x)), x) == :(1//4*cos(x)+-1//2*sin(cos(x))^2*cos(x)+-1//4*cos(cos(x))*sin(cos(x)))
@test integrate(sin(6*cos(x))^2*cos(cos(x))*sin(x), x) == :(-1//2*sin(cos(x))+1//44*sin(11*cos(x))+1//52*sin(13*cos(x)))
@test integrate((a+b*cos(x)^2)^3*cos(x)^3*sin(x), x) == :(-1//10*b^-2*(a+b*cos(x)^2)^5+1//8*a*b^-2*(a+b*cos(x)^2)^4)
@test integrate(sin(3x)*sin(cos(3x)), x) == :(1//3*cos(cos(3x)))
@test integrate(cos(1+3x)*exp(cos(1+3x))*sin(1+3x), x) == :(1//3*exp(cos(1+3x))+-1//3*cos(1+3x)*exp(cos(1+3x)))
@test integrate((1+-1*cos(x)^6)^-1//2*cos(x)^2*sin(x), x) == :(-1//3*arcsin(cos(x)^3))
@test integrate((1+-5*cos(x))^-1//2*sin(x)^5, x) == :(-88//15625*(1+-5*cos(x))^5//2+-8//21875*(1+-5*cos(x))^7//2+2//28125*(1+-5*cos(x))^9//2+64//3125*(1+-5*cos(x))^3//2+1152//3125*(1+-5*cos(x))^(1/2))
@test integrate(exp(n*cos(a+b*x))*sin(a+b*x), x) == :(-1*b^-1*n^-1*exp(n*cos(a+b*x)))
@test integrate(exp(n*cos(a*c+b*c*x))*sin(c*(a+b*x)), x) == :(-1*b^-1*c^-1*n^-1*exp(n*cos(c*(a+b*x))))
@test integrate(exp(n*cos(c*(a+b*x)))*sin(a*c+b*c*x), x) == :(-1*b^-1*c^-1*n^-1*exp(n*cos(a*c+b*c*x)))
@test integrate(exp(n*cos(a+b*x))*tan(a+b*x), x) == :(-1*b^-1*expintegralei(n*cos(a+b*x)))
@test integrate(exp(n*cos(a*c+b*c*x))*tan(c*(a+b*x)), x) == :(-1*b^-1*c^-1*expintegralei(n*cos(c*(a+b*x))))
@test integrate(exp(n*cos(c*(a+b*x)))*tan(a*c+b*c*x), x) == :(-1*b^-1*c^-1*expintegralei(n*cos(a*c+b*c*x)))
@test integrate((a+b*sin(x))^-1*cos(x), x) == :(b^-1*log(a+b*sin(x)))
@test integrate((a+b*sin(x))^n*cos(x), x) == :(b^-1*(1+n)^-1*(a+b*sin(x))^(1+n))
@test integrate((1+sin(x)^2)^-1//2*cos(x), x) == :(arcsinh(sin(x)))
@test integrate((4+-1*sin(x)^2)^-1//2*cos(x), x) == :(arcsin((1/2)*sin(x)))
@test integrate((4+-1*sin(3x)^2)^-1//2*cos(3x), x) == :(1//3*arcsin((1/2)*sin(3x)))
@test integrate((1+csc(x))^(1/2)*cos(x), x) == :((1+csc(x))^(1/2)*sin(x)+arctanh((1+csc(x))^(1/2)))
@test integrate((4+-1*sin(x)^2)^(1/2)*cos(x), x) == :(2*arcsin((1/2)*sin(x))+(1/2)*(4+-1*sin(x)^2)^(1/2)*sin(x))
@test integrate((1+sin(x)^2)^(1/2)*cos(x)*sin(x), x) == :(1//3*(1+sin(x)^2)^3//2)
@test integrate((sin(x)^2+2*sin(x))^-1//2*cos(x), x) == :(2*arctanh((sin(x)^2+2*sin(x))^-1//2*sin(x)))
@test integrate(cos(x)*cos(sin(x)), x) == :(sin(sin(x)))
@test integrate(cos(x)*cos(sin(x))*cos(sin(sin(x))), x) == :(sin(sin(sin(x))))
@test integrate(cos(x)*sec(sin(x)), x) == :(arctanh(sin(sin(x))))
@test integrate((a+b*sin(x)^2)^3*sin(x)^3*cos(x), x) == :(1//10*b^-2*(a+b*sin(x)^2)^5+-1//8*a*b^-2*(a+b*sin(x)^2)^4)
@test integrate(cos(x)*exp(sin(x))*sin(x), x) == :(-1*exp(sin(x))+exp(sin(x))*sin(x))
@test integrate((sin(x)^3)^-1//2*cos(x)^3, x) == :(-2//3*(sin(x)^3)^(1/2)+-2*(sin(x)^3)^-1//2*sin(x))
@test integrate(sin(x)^-1//2*cos(x)*exp(sin(x)^(1/2)), x) == :(2*exp(sin(x)^(1/2)))
@test integrate(cos(x)*exp(4+sin(x)), x) == :(exp(4+sin(x)))
@test integrate(cos(2x)*exp(cos(x)*sin(x)), x) == :(exp((1/2)*sin(2x)))
@test integrate(cos(x)*exp(cos((1/2)*x)*sin((1/2)*x)), x) == :(2*exp((1/2)*sin(x)))
@test integrate(cos(a+b*x)*exp(n*sin(a+b*x)), x) == :(b^-1*n^-1*exp(n*sin(a+b*x)))
@test integrate(cos(c*(a+b*x))*exp(n*sin(a*c+b*c*x)), x) == :(b^-1*c^-1*n^-1*exp(n*sin(c*(a+b*x))))
@test integrate(cos(a*c+b*c*x)*exp(n*sin(c*(a+b*x))), x) == :(b^-1*c^-1*n^-1*exp(n*sin(a*c+b*c*x)))
@test integrate(cot(a+b*x)*exp(n*sin(a+b*x)), x) == :(b^-1*expintegralei(n*sin(a+b*x)))
@test integrate(cot(c*(a+b*x))*exp(n*sin(a*c+b*c*x)), x) == :(b^-1*c^-1*expintegralei(n*sin(c*(a+b*x))))
@test integrate(cot(a*c+b*c*x)*exp(n*sin(c*(a+b*x))), x) == :(b^-1*c^-1*expintegralei(n*sin(a*c+b*c*x)))
@test integrate((a+b*tan(x))^-1*sec(x)^2, x) == :(b^-1*log(a+b*tan(x)))
@test integrate((1+-1*tan(x)^2)^-1*sec(x)^2, x) == :((1/2)*arctanh(2*cos(x)*sin(x)))
@test integrate((9+tan(x)^2)^-1*sec(x)^2, x) == :(-1//3*arctan(2*(1+2*cos(x)^2)^-1*cos(x)*sin(x))+1//3*x)
@test integrate((a+b*tan(x))^n*sec(x)^2, x) == :(b^-1*(1+n)^-1*(a+b*tan(x))^(1+n))
@test integrate(sec(x)^2*(1+(1+tan(x)^2)^-1), x) == :(x+tan(x))
@test integrate((1+tan(x)^2)^-1*sec(x)^2*(2+tan(x)^2), x) == :(x+tan(x))
@test integrate((2+tan(x)^2+2*tan(x))^-1*sec(x)^2, x) == :(x+-1*arctan((2+cos(x)^2+2*cos(x)*sin(x))^-1*(1+-2*cos(x)^2+cos(x)*sin(x))))
@test integrate((3+-4*tan(x)^3)^-1*sec(x)^2, x) == :(-1//18*6^1//3*log(3^1//3+-1*2^2//3*tan(x))+1//36*6^1//3*log(3^2//3+2*2^1//3*tan(x)^2+2^2//3*3^1//3*tan(x))+-1//18*2^1//3*3^5//6*arctan((4*6^1//3+cos(x)^2*(6+-4*6^1//3)+3*2^2//3*3^1//6+2*6^2//3*cos(x)*sin(x))^-1*(6^2//3+-2*6^2//3*cos(x)^2+(6+-4*6^1//3)*cos(x)*sin(x)))+1//18*x*2^1//3*3^5//6)
@test integrate((11+-5*tan(x)+5*tan(x)^2)^-1*sec(x)^2, x) == :(-2//195*195^(1/2)*arctan((10+195^(1/2)+12*cos(x)^2+-10*cos(x)*sin(x))^-1*(-5+10*cos(x)^2+12*cos(x)*sin(x)))+2//195*x*195^(1/2))
@test integrate((c+d*tan(x))^-1*sec(x)^2*(a+b*tan(x)), x) == :(b*d^-1*tan(x)+-1*d^-2*(b*c+-1*a*d)*log(c+d*tan(x)))
@test integrate((a+b*tan(x))^2*(c+d*tan(x))^-1*sec(x)^2, x) == :((1/2)*d^-1*(a+b*tan(x))^2+d^-3*(b*c+-1*a*d)^2*log(c+d*tan(x))+-1*b*d^-2*(b*c+-1*a*d)*tan(x))
@test integrate((a+b*tan(x))^3*(c+d*tan(x))^-1*sec(x)^2, x) == :(1//3*d^-1*(a+b*tan(x))^3+-1*d^-4*(b*c+-1*a*d)^3*log(c+d*tan(x))+-1//2*d^-2*(a+b*tan(x))^2*(b*c+-1*a*d)+b*d^-3*(b*c+-1*a*d)^2*tan(x))
@test integrate((2+tan(x)^3)^-2*sec(x)^2*tan(x)^2, x) == :(-1*(6+3*tan(x)^3)^-1)
@test integrate((1+tan(x)^2)^3*sec(x)^2*tan(x)^6, x) == :(1//3*tan(x)^9+1//7*tan(x)^7+1//13*tan(x)^13+3//11*tan(x)^11)
@test integrate((1+tan(x)^3)^-1*sec(x)^2*(2+tan(x)^2), x) == :(2//3*x*3^(1/2)+2//3*3^(1/2)*arctan((2+3^(1/2)+-2*cos(x)*sin(x))^-1*(1+-2*cos(x)^2))+log(1+tan(x)))
@test integrate(sec(x)^2*(1+cos(x)^2), x) == :(x+tan(x))
@test integrate((1+sec(x)^2+-3*tan(x))^-1*sec(x)^2, x) == :(-1*log(-1*sin(x)+cos(x))+log(-1*sin(x)+2*cos(x)))
@test integrate((4+-1*sec(x)^2)^-1//2*sec(x)^2, x) == :(arcsin(1//3*3^(1/2)*tan(x)))
@test integrate((1+-4*tan(x)^2)^-1//2*sec(x)^2, x) == :((1/2)*arcsin(2*tan(x)))
@test integrate((-4+tan(x)^2)^-1//2*sec(x)^2, x) == :(arctanh((-4+tan(x)^2)^-1//2*tan(x)))
@test integrate((1+-1*cot(x)^2)^(1/2)*sec(x)^2, x) == :((1+-1*cot(x)^2)^(1/2)*tan(x)+arcsin(cot(x)))
@test integrate((1+-1*tan(x)^2)^(1/2)*sec(x)^2, x) == :((1/2)*arcsin(tan(x))+(1/2)*(1+-1*tan(x)^2)^(1/2)*tan(x))
@test integrate(sec(x)^2*exp(tan(x)), x) == :(exp(tan(x)))
@test integrate((-1+sec(x)^2)^2*sec(x)^4*tan(x), x) == :(1//6*tan(x)^6+1//8*tan(x)^8)
@test integrate((a+b*cot(x))^-1*csc(x)^2, x) == :(-1*b^-1*log(a+b*cot(x)))
@test integrate((a+b*cot(x))^n*csc(x)^2, x) == :(-1*b^-1*(1+n)^-1*(a+b*cot(x))^(1+n))
@test integrate(csc(x)^2*(1+sin(x)^2), x) == :(x+-1*cot(x))
@test integrate(csc(x)^2*(1+(1+cot(x)^2)^-1), x) == :(x+-1*cot(x))
@test integrate((c+d*cot(x))^-1*csc(x)^2*(a+b*cot(x)), x) == :(d^-2*(b*c+-1*a*d)*log(c+d*cot(x))+-1*b*d^-1*cot(x))
@test integrate((a+b*cot(x))^2*(c+d*cot(x))^-1*csc(x)^2, x) == :(-1//2*d^-1*(a+b*cot(x))^2+-1*d^-3*(b*c+-1*a*d)^2*log(c+d*cot(x))+b*d^-2*(b*c+-1*a*d)*cot(x))
@test integrate((a+b*cot(x))^3*(c+d*cot(x))^-1*csc(x)^2, x) == :(-1//3*d^-1*(a+b*cot(x))^3+d^-4*(b*c+-1*a*d)^3*log(c+d*cot(x))+(1/2)*d^-2*(a+b*cot(x))^2*(b*c+-1*a*d)+-1*b*d^-3*(b*c+-1*a*d)^2*cot(x))
@test integrate(csc(x)^2*exp(-1*cot(x)), x) == :(exp(-1*cot(x)))
@test integrate((1+sec(x)^2)^-1*sec(x)*tan(x), x) == :(-1*arctan(cos(x)))
@test integrate((9+4*sec(x)^2)^-1*sec(x)*tan(x), x) == :(-1//6*arctan(3//2*cos(x)))
@test integrate((sec(x)^2+sec(x))^-1*sec(x)*tan(x), x) == :(-1*log(1+cos(x)))
@test integrate((4+sec(x)^2)^-1//2*sec(x)*tan(x), x) == :(arccsch(2*cos(x)))
@test integrate((1+cos(x)^2)^-1//2*sec(x)*tan(x), x) == :((1+cos(x)^2)^(1/2)*sec(x))
@test integrate(exp(sec(x))*sec(x)*tan(x), x) == :(exp(sec(x)))
@test integrate(2^sec(x)*sec(x)*tan(x), x) == :(2^sec(x)*log(2)^-1)
@test integrate((1+sec(2x))^-3//2*sec(2x)*tan(2x), x) == :(-1*(1+sec(2x))^-1//2)
@test integrate((1+5*cos(3x)^2)^(1/2)*sec(3x)*tan(3x), x) == :(-1//3*5^(1/2)*arcsinh(5^(1/2)*cos(3x))+1//3*(1+5*cos(3x)^2)^(1/2)*sec(3x))
@test integrate((1+5*cos(3x)^2)^-1//2*sec(3x)*tan(3x), x) == :(1//3*(1+5*cos(3x)^2)^(1/2)*sec(3x))
@test integrate(5^csc(3x)*cot(3x)*csc(3x), x) == :(-1//3*5^csc(3x)*log(5)^-1)
@test integrate((1+csc(x)^2)^-1*cot(x)*csc(x), x) == :(arctan(sin(x)))
@test integrate((5+-11*csc(6x)^2)^-2*cot(6x)*csc(6x), x) == :((660+-300*sin(6x)^2)^-1*sin(6x)+-1//3300*55^(1/2)*arctanh(1//11*55^(1/2)*sin(6x)))
@test integrate((1+sin(x)^2)^-1//2*cot(x)*csc(x), x) == :(-1*(1+sin(x)^2)^(1/2)*csc(x))
@test integrate((1+sin(5x)^2)^-1//2*csc(5x)^3*cot(5x), x) == :(-1//15*(1+sin(5x)^2)^(1/2)*csc(5x)^3+2//15*(1+sin(5x)^2)^(1/2)*csc(5x))
@test integrate(exp(n*sin(a+b*x))*sin(2a+2*b*x), x) == :(-2*b^-1*n^-2*exp(n*sin(a+b*x))+2*b^-1*n^-1*exp(n*sin(a+b*x))*sin(a+b*x))
@test integrate(exp(n*sin(a+b*x))*sin(2a+2*b*x), x) == :(-2*b^-1*n^-2*exp(n*sin(a+b*x))+2*b^-1*n^-1*exp(n*sin(a+b*x))*sin(a+b*x))
@test integrate(exp(n*sin((1/2)*a+(1/2)*b*x))*sin(a+b*x), x) == :(-4*b^-1*n^-2*exp(n*sin((1/2)*a+(1/2)*b*x))+4*b^-1*n^-1*exp(n*sin((1/2)*a+(1/2)*b*x))*sin((1/2)*a+(1/2)*b*x))
@test integrate(exp(n*sin((1/2)*a+(1/2)*b*x))*sin(a+b*x), x) == :(-4*b^-1*n^-2*exp(n*sin((1/2)*a+(1/2)*b*x))+4*b^-1*n^-1*exp(n*sin((1/2)*a+(1/2)*b*x))*sin((1/2)*a+(1/2)*b*x))
@test integrate(exp(n*cos(a+b*x))*sin(2a+2*b*x), x) == :(2*b^-1*n^-2*exp(n*cos(a+b*x))+-2*b^-1*n^-1*cos(a+b*x)*exp(n*cos(a+b*x)))
@test integrate(exp(n*cos(a+b*x))*sin(2a+2*b*x), x) == :(2*b^-1*n^-2*exp(n*cos(a+b*x))+-2*b^-1*n^-1*cos(a+b*x)*exp(n*cos(a+b*x)))
@test integrate(exp(n*cos((1/2)*a+(1/2)*b*x))*sin(a+b*x), x) == :(4*b^-1*n^-2*exp(n*cos((1/2)*a+(1/2)*b*x))+-4*b^-1*n^-1*cos((1/2)*a+(1/2)*b*x)*exp(n*cos((1/2)*a+(1/2)*b*x)))
@test integrate(exp(n*cos((1/2)*a+(1/2)*b*x))*sin(a+b*x), x) == :(4*b^-1*n^-2*exp(n*cos((1/2)*a+(1/2)*b*x))+-4*b^-1*n^-1*cos((1/2)*a+(1/2)*b*x)*exp(n*cos((1/2)*a+(1/2)*b*x)))
@test integrate(csc(x)*log(tan(x))*sec(x), x) == :((1/2)*log(tan(x))^2)
@test integrate(csc(2x)*log(tan(x)), x) == :(1//4*log(tan(x))^2)
@test integrate(exp(cos(x)^2+sin(x)^2), x) == :(ℯ*x)
@test integrate(x*sec(x)^2, x) == :(x*tan(x)+log(cos(x)))
@test integrate(x*cos(x^2)^4, x) == :(3//16*x^2+1//8*cos(x^2)^3*sin(x^2)+3//16*cos(x^2)*sin(x^2))
@test integrate(cos(x)^(1/2)*sin(x), x) == :(-2//3*cos(x)^3//2)
@test integrate(exp(-2x)*tan(exp(-2x)), x) == :((1/2)*log(cos(exp(-2x))))
@test integrate((1+cos(x))^-1*sec(x)*sin(2x), x) == :(-2*log(1+cos(x)))
@test integrate(x*sec(3x)^2, x) == :(1//9*log(cos(3x))+1//3*x*tan(3x))
@test integrate(cos(2*pi*x)*exp(-2*pi*x), x) == :(-1//4*pi^-1*cos(2*pi*x)*exp(-2*pi*x)+1//4*pi^-1*exp(-2*pi*x)*sin(2*pi*x))
@test integrate(cos(x)^12*sin(x)^10+-1*cos(x)^10*sin(x)^12, x) == :(1//11*cos(x)^11*sin(x)^11)
@test integrate(x*cot(x^2), x) == :((1/2)*log(sin(x^2)))
@test integrate(x*sec(x^2)^2, x) == :((1/2)*tan(x^2))
@test integrate((9+sin(4x)^4)^-1*sin(8x), x) == :(1//12*arctan(1//3*sin(4x)^2))
@test integrate((8+sin(2x)^2)^-1*cos(2x), x) == :(1//8*2^(1/2)*arctan(1//4*2^(1/2)*sin(2x)))
@test integrate(x*(cos(x^2)^3+-1*sin(x^2)^3), x) == :((1/2)*cos(x^2)+(1/2)*sin(x^2)+-1//6*cos(x^2)^3+-1//6*sin(x^2)^3)
@test integrate((1+-1*cos(x))^-1*cos(x)*sin(x), x) == :(cos(x)+log(1+-1*cos(x)))
@test integrate(x*cos(x^2), x) == :((1/2)*sin(x^2))
@test integrate(x^2*cos(4*x^3), x) == :(1//12*sin(4*x^3))
@test integrate(x^3*cos(x^4), x) == :(1//4*sin(x^4))
@test integrate(x*sin((1/2)*x^2), x) == :(-1*cos((1/2)*x^2))
@test integrate(x*sec(x^2)*tan(x^2), x) == :((1/2)*sec(x^2))
@test integrate(x^-2*tan(x^-1)^2, x) == :(x^-1+-1*tan(x^-1))
@test integrate(x*tan(1+x^2), x) == :(-1//2*log(cos(1+x^2)))
@test integrate(sin(pi*(1+2x)), x) == :((1/2)*pi^-1*cos(2*pi*x))
@test integrate((1+-1*cos(x)^2)^-1*(csc(x)^2+cot(x)), x) == :(-1*cot(x)+-1//2*cot(x)^2+-1//3*cot(x)^3)
@test integrate(x^2*cos(4*x^3)*cos(5*x^3), x) == :(1//6*sin(x^3)+1//54*sin(9*x^3))
@test integrate(x^14*sin(x^3), x) == :(-8*cos(x^3)+-8*x^3*sin(x^3)+4*x^6*cos(x^3)+-1//3*x^12*cos(x^3)+4//3*x^9*sin(x^3))
@test integrate(x^2*exp(-3*x^3)*sin(2*x^3), x) == :(-2//39*cos(2*x^3)*exp(-3*x^3)+-1//13*exp(-3*x^3)*sin(2*x^3))
@test integrate(2*x*cos(x^2), x) == :(sin(x^2))
@test integrate(3*x^2*cos(7+x^3), x) == :(sin(7+x^3))
@test integrate((1+x^2)^-1+sin(x), x) == :(-1*cos(x)+arctan(x))
@test integrate(x*sin(1+x^2), x) == :(-1//2*cos(1+x^2))
@test integrate(x*cos(1+x^2), x) == :((1/2)*sin(1+x^2))
@test integrate(1+x^2*cos(x^3), x) == :(x+1//3*sin(x^3))
@test integrate(x^2*sin(1+x^3), x) == :(-1//3*cos(1+x^3))
@test integrate(12*x^2*cos(x^3), x) == :(4*sin(x^3))
@test integrate((1+x)*sin(1+x), x) == :(-1*(1+x)*cos(1+x)+sin(1+x))
@test integrate(x^5*cos(x^3), x) == :(1//3*cos(x^3)+1//3*x^3*sin(x^3))
@test integrate(cos(x)*exp(-3x), x) == :(-3//10*cos(x)*exp(-3x)+1//10*exp(-3x)*sin(x))
@test integrate(x^3*sin(x^2), x) == :((1/2)*sin(x^2)+-1//2*x^2*cos(x^2))
@test integrate(x^3*cos(x^2), x) == :((1/2)*cos(x^2)+(1/2)*x^2*sin(x^2))
@test integrate(cos(x)*cos(2*sin(x)), x) == :((1/2)*sin(2*sin(x)))
@test integrate((1+cos(x)^2)^-1*cos(x)*sin(x), x) == :(-1//2*log(1+cos(x)^2))
@test integrate((x+sin(x))^3*(1+cos(x)), x) == :(1//4*(x+sin(x))^4)
@test integrate(csc(x)^2*(1+cos(x)), x) == :(-1*cot(x)+-1*csc(x))
@test integrate(tan(x)^2*sin(x), x) == :(cos(x)+sec(x))
@test integrate(sec(x)^2*(-1*sin(x)+x*cos(x)^3)*exp(sin(x)), x) == :((-1+x*cos(x))*exp(sin(x))*sec(x))
@test integrate(x*csc(x)^2, x) == :(-1*x*cot(x)+log(sin(x)))
@test integrate(cos(x)*sin(x+1//6*pi), x) == :(-1//4*cos(2x+1//6*pi)+1//4*x)
@test integrate(x*sin(x^2)^3, x) == :(-1//2*cos(x^2)+1//6*cos(x^2)^3)
@test integrate(sin(x)^2*tan(x), x) == :((1/2)*cos(x)^2+-1*log(cos(x)))
@test integrate(cos(x)^2*cot(x)^3, x) == :((1/2)*sin(x)^2+-2*log(sin(x))+-1//2*csc(x)^2)
@test integrate((1+-1*sin(x))*sec(x), x) == :(log(1+sin(x)))
@test integrate((1+cos(x))*csc(x), x) == :(log(1+-1*cos(x)))
@test integrate(cos(x)^2*(1+-1*tan(x)^2), x) == :(cos(x)*sin(x))
@test integrate((cos(x)+sin(x))*csc(2x), x) == :((1/2)*arctanh(sin(x))+-1//2*arctanh(cos(x)))
@test integrate((2+sin(x)^2+-3*sin(x))^-1*(-3+2*sin(x))*cos(x), x) == :(log(2+sin(x)^2+-3*sin(x)))
@test integrate((5+cos(x)^2)^-1*cos(x)^2*sin(x), x) == :(-1*cos(x)+5^(1/2)*arctan(1//5*5^(1/2)*cos(x)))
@test integrate((sin(x)^2+sin(x))^-1*cos(x), x) == :(-1*log(1+sin(x))+log(sin(x)))
@test integrate((sin(x)^(2^(1/2))+sin(x))^-1*cos(x), x) == :(-1*(1+2^(1/2))*log(1+sin(x)^(-1+2^(1/2)))+log(sin(x)))
@test integrate((2*sin(x)+sin(2x))^-1, x) == :(1//4*log(tan((1/2)*x))+1//8*tan((1/2)*x)^2)
@test integrate((-3+x^2+4x)*sin(2x), x) == :(7//4*cos(2x)+(1/2)*x*sin(2x)+-2*x*cos(2x)+-1//2*x^2*cos(2x)+sin(2x))
@test integrate(cos(4x)*exp(-3x), x) == :(-3//25*cos(4x)*exp(-3x)+4//25*exp(-3x)*sin(4x))
@test integrate((1+sin(x))^-1//2*cos(x)*sin(x), x) == :(-2*(1+sin(x))^(1/2)+2//3*(1+sin(x))^3//2)
@test integrate(x+60*cos(x)^5*sin(x)^4, x) == :((1/2)*x^2+12*sin(x)^5+-120//7*sin(x)^7+20//3*sin(x)^9)
@test integrate((sec(x)+tan(x))*cos(x), x) == :(x+-1*cos(x))
@test integrate((sec(x)^3+tan(x))*cos(x), x) == :(-1*cos(x)+tan(x))
@test integrate((1/2)*csc(x)^2+-1//2*cot(x)*csc(x), x) == :((1/2)*csc(x)+-1//2*cot(x))
@test integrate(-1*csc(x)^2+sin(2x), x) == :(-1//2*cos(2x)+cot(x))
@test integrate(-3*sin(3x)+2*cot(2x), x) == :(cos(3x)+log(sin(2x)))
@test integrate(x*sin(2*x^2), x) == :(-1//4*cos(2*x^2))
@test integrate((1+sin(-1+x)^2)^(1/2)*cos(-1+x)*sin(-1+x), x) == :(1//3*(1+sin(-1+x)^2)^3//2)
@test integrate(x^-2*cos(x^-1)*sin(x^-1), x) == :(-1//2*sin(x^-1)^2)
@test integrate(sin(1/2+3//2*x)^3*cos(1/2+3//2*x), x) == :(1//6*sin(1/2+3//2*x)^4)
@test integrate(4*x*tan(x^2), x) == :(-2*log(cos(x^2)))
@test integrate(x*sec(-5+x^2), x) == :(-1//2*arctanh(-1*sin(-5+x^2)))
@test integrate(x^-2*csc(x^-1), x) == :(arctanh(cos(x^-1)))
@test integrate(cos(2x)*sin(3x)+-1*cos(3x)*sin(2x), x) == :(-1*cos(x))
@test integrate(4*x*sec(2x)^2, x) == :(2*x*tan(2x)+log(cos(2x)))
@test integrate(4*sin(x)^2*tan(x)^2, x) == :(-6x+6*tan(x)+-2*sin(x)^2*tan(x))
@test integrate(cos(x)^4*cot(x)^2, x) == :(-15//8*x+-15//8*cot(x)+1//4*cos(x)^4*cot(x)+5//8*cos(x)^2*cot(x))
@test integrate(16*cos(x)^2*sin(x)^2, x) == :(2x+-4*cos(x)^3*sin(x)+2*cos(x)*sin(x))
@test integrate(8*cos(x)^2*sin(x)^4, x) == :((1/2)*x+(1/2)*cos(x)*sin(x)+-1*cos(x)^3*sin(x)+-4//3*cos(x)^3*sin(x)^3)
@test integrate(35*cos(x)^3*sin(x)^4, x) == :(-5*sin(x)^7+7*sin(x)^5)
@test integrate(4*cos(x)^4*sin(x)^4, x) == :(3//32*x+-1//2*cos(x)^5*sin(x)^3+-1//4*cos(x)^5*sin(x)+1//16*cos(x)^3*sin(x)+3//32*cos(x)*sin(x))
@test integrate((sin(x)^3+-1*sin(x))^-1*cos(x), x) == :(-1*log(sin(x))+log(cos(x)))
@test integrate(-1+2*cos(x)^2+cos(x)*sin(x), x) == :((1/2)*sin(x)^2+cos(x)*sin(x))
@test integrate(cos(x)^2+sin(x)^2, x) == :(x)
@test integrate(sin(x)^2+-1*cos(x)^2, x) == :(-1*cos(x)*sin(x))
@test integrate(2^sin(x)*cos(x), x) == :(2^sin(x)*log(2)^-1)
@test integrate(tan(x)^3+tan(x)^5, x) == :(1//4*tan(x)^4)
@test integrate(x*(2+x*tan(x))*sec(x), x) == :(x^2*sec(x))
@test integrate(x^-1//2*cot(x^(1/2))*csc(x^(1/2)), x) == :(-2*csc(x^(1/2)))
@test integrate(x^-1//2*cos(x^(1/2))*sin(x^(1/2)), x) == :(sin(x^(1/2))^2)
@test integrate(x^-1//2*sec(x^(1/2))*tan(x^(1/2)), x) == :(2*sec(x^(1/2)))
@test integrate((a+b*cos(2x))^-1*sin(x)^2, x) == :(-1//2*x*b^-1+(1/2)*b^-1*(a+b)^(1/2)*(a+-1b)^-1//2*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan(x)))
@test integrate((a+b*cos(2x))^-1*cos(x)^2, x) == :((1/2)*x*b^-1+-1//2*b^-1*(a+b)^-1//2*(a+-1b)^(1/2)*arctan((a+b)^-1//2*(a+-1b)^(1/2)*tan(x)))
@test integrate((a*sin(c+d*x)^2)^-1//2*tan(c+d*x), x) == :(a^-1//2*d^-1*arctanh(a^-1//2*(a*sin(c+d*x)^2)^(1/2)))
@test integrate((a*cos(c+d*x)^2)^-1//2*cot(c+d*x), x) == :(-1*a^-1//2*d^-1*arctanh(a^-1//2*(a*cos(c+d*x)^2)^(1/2)))
@test integrate(x*sin(x^2)^-1//2*cos(x^2), x) == :(sin(x^2)^(1/2))
@test integrate((1+-1*cos(2x))^-1//2*cos(x), x) == :((1/2)*2^(1/2)*(sin(x)^2)^-1//2*log(sin(x))*sin(x))
@test integrate(x^-1*cos(log(x))^2*sin(log(x))^2, x) == :(1//8*log(x)+-1//4*cos(log(x))^3*sin(log(x))+1//8*cos(log(x))*sin(log(x)))
@test integrate((-5+cos(x)^2+4*sin(x))^-1*sec(x), x) == :((6+-3*sin(x))^-1+(1/2)*log(1+-1*sin(x))+-4//9*log(2+-1*sin(x))+-1//18*log(1+sin(x)))
@test integrate((3*cos(x)+sin(x))^-1//2*cos(x)^-3//2, x) == :(2*(3*cos(x)+sin(x))^(1/2)*cos(x)^-1//2)
@test integrate((cos(x)+sin(x))^(1/2)*cos(x)^-3//2*csc(x), x) == :(-1*log(sin(x))+2*log((cos(x)+sin(x))^(1/2)+-1*cos(x)^(1/2))+2*(cos(x)+sin(x))^(1/2)*cos(x)^-1//2)
@test integrate((1+sin(2x))^-1//2*(cos(x)+sin(x)), x) == :(x*(1+sin(2x))^(1/2)*(cos(x)+sin(x))^-1)
@test integrate((sec(x)+tan(x))^(1/2)*sec(x), x) == :(2*((1+sin(x))*sec(x))^(1/2))
@test integrate((4+3*sec(x))^(1/2)*sec(x)*tan(x), x) == :(2//9*(4+3*sec(x))^3//2)
@test integrate((1+sec(x))^(1/2)*tan(x)^3*sec(x), x) == :(-4//5*(1+sec(x))^5//2+2//7*(1+sec(x))^7//2)
@test integrate((1+csc(x))^(1/2)*cot(x)^3*csc(x), x) == :(-2//7*(1+csc(x))^7//2+4//5*(1+csc(x))^5//2)
@test integrate(csc(x)^(1/2)*(x*cos(x)+-4*sec(x)*tan(x)), x) == :(-4*csc(x)^-3//2*sec(x)+2*x*csc(x)^-1//2)
@test integrate((1+-1*sin(x)^2)^3*(-1+csc(x)^2)^(1/2)*cos(x), x) == :((cot(x)^2)^(1/2)*sin(x)+-1*(cot(x)^2)^(1/2)*arctanh(cos(x))*tan(x)+1//3*(cot(x)^2)^(1/2)*cos(x)^2*sin(x)+1//5*(cot(x)^2)^(1/2)*cos(x)^4*sin(x)+1//7*(cot(x)^2)^(1/2)*cos(x)^6*sin(x))
@test integrate(x*(a*sec(x)^2)^-1//2*csc(x)*sec(x), x) == :(im*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(2,-1*exp(im*x))*sec(x)+-1*im*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(2,exp(im*x))*sec(x)+-2*x*(a*sec(x)^2)^-1//2*arctanh(exp(im*x))*sec(x))
@test integrate(x^2*(a*sec(x)^2)^-1//2*csc(x)*sec(x), x) == :(-2*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(3,-1*exp(im*x))*sec(x)+2*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(3,exp(im*x))*sec(x)+-2*x^2*(a*sec(x)^2)^-1//2*arctanh(exp(im*x))*sec(x)+-2*im*x*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(2,exp(im*x))*sec(x)+2*im*x*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(2,-1*exp(im*x))*sec(x))
@test integrate(x^3*(a*sec(x)^2)^-1//2*csc(x)*sec(x), x) == :(-6*im*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(4,-1*exp(im*x))*sec(x)+-6*x*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(3,-1*exp(im*x))*sec(x)+-2*x^3*(a*sec(x)^2)^-1//2*arctanh(exp(im*x))*sec(x)+6*im*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(4,exp(im*x))*sec(x)+6*x*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(3,exp(im*x))*sec(x)+-3*im*x^2*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(2,exp(im*x))*sec(x)+3*im*x^2*(a*sec(x)^2)^-1//2*Polylogarithms.polylog(2,-1*exp(im*x))*sec(x))
@test integrate(x*(a*sec(x)^4)^-1//2*csc(x)*sec(x), x) == :(x*(a*sec(x)^4)^-1//2*sec(x)^2*log(1+-1*exp(2*im*x))+-1//2*im*x^2*(a*sec(x)^4)^-1//2*sec(x)^2+-1//2*im*(a*sec(x)^4)^-1//2*sec(x)^2*Polylogarithms.polylog(2,exp(2*im*x)))
@test integrate(x^2*(a*sec(x)^4)^-1//2*csc(x)*sec(x), x) == :((1/2)*(a*sec(x)^4)^-1//2*sec(x)^2*Polylogarithms.polylog(3,exp(2*im*x))+x^2*(a*sec(x)^4)^-1//2*sec(x)^2*log(1+-1*exp(2*im*x))+-1//3*im*x^3*(a*sec(x)^4)^-1//2*sec(x)^2+-1*im*x*(a*sec(x)^4)^-1//2*sec(x)^2*Polylogarithms.polylog(2,exp(2*im*x)))
@test integrate(x^3*(a*sec(x)^4)^-1//2*csc(x)*sec(x), x) == :(x^3*(a*sec(x)^4)^-1//2*sec(x)^2*log(1+-1*exp(2*im*x))+-1//4*im*x^4*(a*sec(x)^4)^-1//2*sec(x)^2+3//2*x*(a*sec(x)^4)^-1//2*sec(x)^2*Polylogarithms.polylog(3,exp(2*im*x))+3//4*im*(a*sec(x)^4)^-1//2*sec(x)^2*Polylogarithms.polylog(4,exp(2*im*x))+-3//2*im*x^2*(a*sec(x)^4)^-1//2*sec(x)^2*Polylogarithms.polylog(2,exp(2*im*x)))
@test integrate(x*(a*sec(x)^2)^(1/2)*csc(x)*sec(x), x) == :(x*(a*sec(x)^2)^(1/2)+-1*(a*sec(x)^2)^(1/2)*arctanh(sin(x))*cos(x)+im*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,-1*exp(im*x))*cos(x)+-1*im*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,exp(im*x))*cos(x)+-2*x*(a*sec(x)^2)^(1/2)*arctanh(exp(im*x))*cos(x))
@test integrate(x^2*(a*sec(x)^2)^(1/2)*csc(x)*sec(x), x) == :(x^2*(a*sec(x)^2)^(1/2)+-2*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(3,-1*exp(im*x))*cos(x)+2*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(3,exp(im*x))*cos(x)+-2*im*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,-1*im*exp(im*x))*cos(x)+-2*x^2*(a*sec(x)^2)^(1/2)*arctanh(exp(im*x))*cos(x)+2*im*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,im*exp(im*x))*cos(x)+-2*im*x*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,exp(im*x))*cos(x)+2*im*x*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,-1*exp(im*x))*cos(x)+4*im*x*(a*sec(x)^2)^(1/2)*arctan(exp(im*x))*cos(x))
@test integrate(x^3*(a*sec(x)^2)^(1/2)*csc(x)*sec(x), x) == :(x^3*(a*sec(x)^2)^(1/2)+-6*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(3,im*exp(im*x))*cos(x)+6*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(3,-1*im*exp(im*x))*cos(x)+-6*im*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(4,-1*exp(im*x))*cos(x)+-6*x*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(3,-1*exp(im*x))*cos(x)+-2*x^3*(a*sec(x)^2)^(1/2)*arctanh(exp(im*x))*cos(x)+6*im*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(4,exp(im*x))*cos(x)+6*x*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(3,exp(im*x))*cos(x)+-6*im*x*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,-1*im*exp(im*x))*cos(x)+-3*im*x^2*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,exp(im*x))*cos(x)+3*im*x^2*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,-1*exp(im*x))*cos(x)+6*im*x*(a*sec(x)^2)^(1/2)*Polylogarithms.polylog(2,im*exp(im*x))*cos(x)+6*im*x^2*(a*sec(x)^2)^(1/2)*arctan(exp(im*x))*cos(x))
@test integrate(x*(a*sec(x)^4)^(1/2)*csc(x)*sec(x), x) == :((1/2)*x*(a*sec(x)^4)^(1/2)*cos(x)^2+(1/2)*x*(a*sec(x)^4)^(1/2)*sin(x)^2+-1//2*(a*sec(x)^4)^(1/2)*cos(x)*sin(x)+(1/2)*im*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(2,-1*exp(2*im*x))+-2*x*(a*sec(x)^4)^(1/2)*cos(x)^2*arctanh(exp(2*im*x))+-1//2*im*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(2,exp(2*im*x)))
@test integrate(x^2*(a*sec(x)^4)^(1/2)*csc(x)*sec(x), x) == :((1/2)*x^2*(a*sec(x)^4)^(1/2)*cos(x)^2+(1/2)*x^2*(a*sec(x)^4)^(1/2)*sin(x)^2+(1/2)*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(3,exp(2*im*x))+-1*(a*sec(x)^4)^(1/2)*cos(x)^2*log(cos(x))+-1//2*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(3,-1*exp(2*im*x))+-1*x*(a*sec(x)^4)^(1/2)*cos(x)*sin(x)+-2*x^2*(a*sec(x)^4)^(1/2)*cos(x)^2*arctanh(exp(2*im*x))+im*x*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(2,-1*exp(2*im*x))+-1*im*x*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(2,exp(2*im*x)))
@test integrate(x^3*(a*sec(x)^4)^(1/2)*csc(x)*sec(x), x) == :((1/2)*x^3*(a*sec(x)^4)^(1/2)*cos(x)^2+(1/2)*x^3*(a*sec(x)^4)^(1/2)*sin(x)^2+-3*x*(a*sec(x)^4)^(1/2)*cos(x)^2*log(1+exp(2*im*x))+-2*x^3*(a*sec(x)^4)^(1/2)*cos(x)^2*arctanh(exp(2*im*x))+-3//2*x*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(3,-1*exp(2*im*x))+-3//2*x^2*(a*sec(x)^4)^(1/2)*cos(x)*sin(x)+-3//4*im*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(4,-1*exp(2*im*x))+3//2*im*x^2*(a*sec(x)^4)^(1/2)*cos(x)^2+3//2*im*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(2,-1*exp(2*im*x))+3//2*x*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(3,exp(2*im*x))+3//4*im*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(4,exp(2*im*x))+-3//2*im*x^2*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(2,exp(2*im*x))+3//2*im*x^2*(a*sec(x)^4)^(1/2)*cos(x)^2*Polylogarithms.polylog(2,-1*exp(2*im*x)))
@test integrate(sin(x)*sin(2x)*sin(3x), x) == :(-1//8*cos(2x)+-1//16*cos(4x)+1//24*cos(6x))
@test integrate(cos(x)*cos(2x)*cos(3x), x) == :(1//4*x+1//8*sin(2x)+1//16*sin(4x)+1//24*sin(6x))
@test integrate(cos(x)*sin(2x)*sin(3x), x) == :(-1//16*sin(4x)+-1//24*sin(6x)+1//4*x+1//8*sin(2x))
@test integrate(cos(2x)*cos(3x)*sin(x), x) == :(-1//8*cos(2x)+-1//24*cos(6x)+1//16*cos(4x))
@test integrate(x*sin(x^2), x) == :(-1//2*cos(x^2))
@test integrate((cos(x)+sin(x))^5*(-1*cos(x)+sin(x)), x) == :(-1//6*(cos(x)+sin(x))^6)
@test integrate(2*x*sec(x)^2*tan(x), x) == :(-1*tan(x)+x*sec(x)^2)
@test integrate((1+cos(2x))^-1*(1+cos(x)^2), x) == :((1/2)*x+(1/2)*tan(x))
@test integrate((5+-11*sec(x)^5)^2*sec(x)*tan(x), x) == :(11*sec(x)^11+25*sec(x)+-55//3*sec(x)^6)
@test integrate(sin(5x)^3*tan(5x)^3, x) == :((1/2)*sin(5x)+-1//2*arctanh(sin(5x))+1//6*sin(5x)^3+1//10*sin(5x)^3*tan(5x)^2)
@test integrate(sin(5x)^3*tan(5x)^4, x) == :(-3//5*cos(5x)+-3//5*sec(5x)+1//15*cos(5x)^3+1//15*sec(5x)^3)
@test integrate(sin(6x)^5*tan(6x)^3, x) == :(-7//12*arctanh(sin(6x))+7//12*sin(6x)+7//36*sin(6x)^3+7//60*sin(6x)^5+1//12*sin(6x)^5*tan(6x)^2)
@test integrate((-1+sec(2x)^2)^3*sin(2x), x) == :((1/2)*cos(2x)+-1//2*sec(2x)^3+1//10*sec(2x)^5+3//2*sec(2x))
@test integrate(tan(x)^5*sin(x), x) == :(-15//8*sin(x)+15//8*arctanh(sin(x))+-5//8*tan(x)^2*sin(x)+1//4*tan(x)^4*sin(x))
@test integrate(cos(2x)^5*cot(2x)^4, x) == :(2*csc(2x)+3*sin(2x)+-2//3*sin(2x)^3+-1//6*csc(2x)^3+1//10*sin(2x)^5)
@test integrate((1+-1*sin(3x)^2)^5*(-1+csc(3x)^2)^3*cos(3x), x) == :(-56//3*sin(3x)+-56//15*sin(3x)^5+-28//3*csc(3x)+-8//27*sin(3x)^9+-1//15*csc(3x)^5+1//33*sin(3x)^11+4//3*sin(3x)^7+8//9*csc(3x)^3+70//9*sin(3x)^3)
@test integrate((1+-1*sin(2x)^2)^2*(-1+csc(2x)^2)^2*cot(2x), x) == :(csc(2x)^2+-1*sin(2x)^2+3*log(sin(2x))+-1//8*csc(2x)^4+1//8*sin(2x)^4)
@test integrate((1+-1*sin(2x)^2)^2*(-1+csc(2x)^2)^4*cos(2x), x) == :(-1*sin(2x)^3+10*csc(2x)+-5//2*csc(2x)^3+-1//14*csc(2x)^7+1//10*sin(2x)^5+3//5*csc(2x)^5+15//2*sin(2x))
@test integrate((1+-1*sin(3x)^2)^2*(-1+csc(3x)^2)^3*cot(3x), x) == :(-10//3*log(sin(3x))+-5//3*csc(3x)^2+-1//12*sin(3x)^4+-1//18*csc(3x)^6+5//6*sin(3x)^2+5//12*csc(3x)^4)
@test integrate((1+cot(9x)^2)^2*(1+tan(9x)^2)^3, x) == :(-4//9*cot(9x)+-1//27*cot(9x)^3+1//45*tan(9x)^5+2//3*tan(9x)+4//27*tan(9x)^3)
@test integrate((1+-1*sin(x)^2)^-1*(9+-7*sin(x)^3)^2*cos(x), x) == :(-49*sin(x)+-2*log(1+-1*sin(x))+63*sin(x)^2+128*log(1+sin(x))+-49//3*sin(x)^3+-49//5*sin(x)^5)
@test integrate(cos(2x)^4*cot(2x)^5, x) == :(csc(2x)^2+-1*sin(2x)^2+3*log(sin(2x))+-1//8*csc(2x)^4+1//8*sin(2x)^4)
@test integrate((4+3*sec(x))^-1*tan(x)^2*sec(x), x) == :(-4//9*arctanh(sin(x))+1//3*tan(x)+-1//9*7^(1/2)*log(-1*sin((1/2)*x)+7^(1/2)*cos((1/2)*x))+1//9*7^(1/2)*log(7^(1/2)*cos((1/2)*x)+sin((1/2)*x)))
@test integrate(x*sec(1+x)*tan(1+x), x) == :(-1*arctanh(sin(1+x))+x*sec(1+x))
@test integrate((9+-1*sin(x)^2)^-1//2*sin(2x), x) == :(-2*(9+-1*sin(x)^2)^(1/2))
@test integrate((9+-1*cos(x)^4)^-1//2*sin(2x), x) == :(-1*arcsin(1//3*cos(x)^2))
@test integrate(x^-5*cos(x^-1), x) == :(6*cos(x^-1)+-1*x^-3*sin(x^-1)+-3*x^-2*cos(x^-1)+6*x^-1*sin(x^-1))
@test integrate(cos(1+x)^3*sin(1+x)^3, x) == :(-1//6*sin(1+x)^6+1//4*sin(1+x)^4)
@test integrate((1+2x)^3*sin(1+2x)^2, x) == :(-3//4*x+-3//4*x^2+-3//16*sin(1+2x)^2+1//16*(1+2x)^4+3//8*(1+2x)^2*sin(1+2x)^2+(3//8+3//4*x)*cos(1+2x)*sin(1+2x)+-1//4*(1+2x)^3*cos(1+2x)*sin(1+2x))
@test integrate((1+-1*tan(x))^-1*(-1+sec(x)), x) == :((1/2)*log(-1*sin(x)+cos(x))+-1//2*x+(1/2)*2^(1/2)*arctanh((1/2)*2^(1/2)*(1+tan(x))*cos(x)))
@test integrate(x^2*cos(3x)*cos(5x), x) == :(-1//8*sin(2x)+-1//512*sin(8x)+1//4*x*cos(2x)+1//4*x^2*sin(2x)+1//16*x^2*sin(8x)+1//64*x*cos(8x))
@test integrate(cos(x)^-1//2*sin(x)^-1//2*(cos(x)+sin(x)), x) == :(2^(1/2)*arctan(1+2^(1/2)*cos(x)^-1//2*sin(x)^(1/2))+-1*2^(1/2)*arctan(1+-1*2^(1/2)*cos(x)^-1//2*sin(x)^(1/2)))
@test integrate(sec(x)^2*(1+sin(x)), x) == :(sec(x)+tan(x))
@test integrate(10*x^9*cos(x^5*log(x))+-1*x^10*(x^4+5*x^4*log(x))*sin(x^5*log(x)), x) == :(x^10*cos(x^5*log(x)))
@test integrate(cos((1/2)*x)^2*tan((1/2)*x+1//4*pi), x) == :((1/2)*x+-1*log(cos((1/2)*x+1//4*pi))+-1//2*cos(x))
@test integrate((2+3x)^2*sin(x)^3, x) == :(14*cos(x)+-2//3*cos(x)^3+sin(x)^3*(4//3+2x)+(8+12x)*sin(x)+-2//3*(2+3x)^2*cos(x)+-1//3*(2+3x)^2*sin(x)^2*cos(x))
@test integrate(sec(x)^(1+m)*sin(x), x) == :(m^-1*sec(x)^m)
@test integrate(cos(a+b*x)^n*sin(a+b*x)^(-2+-1n), x) == :(-1*b^-1*(1+n)^-1*cos(a+b*x)^(1+n)*sin(a+b*x)^(-1+-1n))
@test integrate((sin(x)*tan(x)+sec(x))^-1, x) == :(arctan(sin(x)))
@test integrate((a+b*x+c*x^2)*sin(x), x) == :(b*sin(x)+-1*a*cos(x)+2*c*cos(x)+-1*b*x*cos(x)+-1*c*x^2*cos(x)+2*c*x*sin(x))
@test integrate(x^-1*sin(x^5), x) == :(1//5*sinintegral(x^5))
@test integrate((1+2^x)^-1*sin(2^x), x) == :(log(2)^-1*sinintegral(2^x)+log(2)^-1*cosintegral(1+2^x)*sin(1)+-1*log(2)^-1*cos(1)*sinintegral(1+2^x))
@test integrate(x*sin(2*x^2)^3//4*cos(2*x^2), x) == :(1//7*sin(2*x^2)^7//4)
@test integrate(x*sec(x^2)^2*tan(x^2)^2, x) == :(1//6*tan(x^2)^3)
@test integrate(x^2*cos(a+b*x^3)^7*sin(a+b*x^3), x) == :(-1//24*b^-1*cos(a+b*x^3)^8)
@test integrate(x^5*cos(a+b*x^3)^7*sin(a+b*x^3), x) == :(35//3072*b^-1*x^3+-1//24*b^-1*x^3*cos(a+b*x^3)^8+1//192*b^-2*cos(a+b*x^3)^7*sin(a+b*x^3)+7//1152*b^-2*cos(a+b*x^3)^5*sin(a+b*x^3)+35//3072*b^-2*cos(a+b*x^3)*sin(a+b*x^3)+35//4608*b^-2*cos(a+b*x^3)^3*sin(a+b*x^3))
@test integrate(x^5*sec(a+b*x^3)^7*tan(a+b*x^3), x) == :(-5//336*b^-2*arctanh(sin(a+b*x^3))+-5//336*b^-2*sec(a+b*x^3)*tan(a+b*x^3)+-5//504*b^-2*sec(a+b*x^3)^3*tan(a+b*x^3)+-1//126*b^-2*sec(a+b*x^3)^5*tan(a+b*x^3)+1//21*b^-1*x^3*sec(a+b*x^3)^7)
@test integrate(x^-2*sec(x^-1)^2, x) == :(-1*tan(x^-1))
@test integrate(3*x^2*cos(x^3), x) == :(sin(x^3))
@test integrate(sec(1+2x)^2*(1+2x), x) == :((1/2)*log(cos(1+2x))+(1/2+x)*tan(1+2x))
@test integrate(b^-1*x^4*(x^3+3*sin(a+b*x))^-1//2+x^2*(x^3+3*sin(a+b*x))^-1//2*cos(a+b*x)+4//3*x*b^-1*(x^3+3*sin(a+b*x))^(1/2), x) == :(2//3*b^-1*x^2*(x^3+3*sin(a+b*x))^(1/2))
@test integrate((exp(-1x)+sin(x))^-1*(cos(x)+sin(x)), x) == :(log(1+exp(x)*sin(x)))
@test integrate((a*sin(c+d*x)^2+b*sin(c+d*x)^3)*sin(c+d*x), x) == :(3//8*b*x+-1*a*d^-1*cos(c+d*x)+1//3*a*d^-1*cos(c+d*x)^3+-3//8*b*d^-1*cos(c+d*x)*sin(c+d*x)+-1//4*b*d^-1*sin(c+d*x)^3*cos(c+d*x))
@test integrate((a*sin(c+d*x)^2+b*sin(c+d*x)^3)^2*sin(c+d*x), x) == :(-1*d^-1*(a^2+b^2)*cos(c+d*x)+-1//5*d^-1*cos(c+d*x)^5*(a^2+3*b^2)+1//3*d^-1*cos(c+d*x)^3*(2*a^2+3*b^2)+1//7*b^2*d^-1*cos(c+d*x)^7+5//8*a*b*x+-5//8*a*b*d^-1*cos(c+d*x)*sin(c+d*x)+-5//12*a*b*d^-1*sin(c+d*x)^3*cos(c+d*x)+-1//3*a*b*d^-1*sin(c+d*x)^5*cos(c+d*x))
@test integrate((a*sin(c+d*x)+b*sin(c+d*x)^2+c*sin(c+d*x)^3)*sin(c+d*x), x) == :(x*((1/2)*a+3//8*c)+-1*b*d^-1*cos(c+d*x)+1//3*b*d^-1*cos(c+d*x)^3+-1//4*c*d^-1*sin(c+d*x)^3*cos(c+d*x)+-1//8*d^-1*(3c+4a)*cos(c+d*x)*sin(c+d*x))
@test integrate((a*sin(c+d*x)+b*sin(c+d*x)^2+c*sin(c+d*x)^3)^2*sin(c+d*x), x) == :(c^2*d^-1*cos(c+d*x)^3+-1*a^2*d^-1*cos(c+d*x)+-1*c^2*d^-1*cos(c+d*x)+-1*d^-1*(b^2+2*a*c)*cos(c+d*x)+-3//5*c^2*d^-1*cos(c+d*x)^5+-1//5*d^-1*cos(c+d*x)^5*(b^2+2*a*c)+1//3*a^2*d^-1*cos(c+d*x)^3+1//3*d^-1*cos(c+d*x)^3*(2*b^2+4*a*c)+1//7*c^2*d^-1*cos(c+d*x)^7+3//4*a*b*x+5//8*b*c*x+-5//8*b*c*d^-1*cos(c+d*x)*sin(c+d*x)+-5//12*b*c*d^-1*sin(c+d*x)^3*cos(c+d*x)+-3//4*a*b*d^-1*cos(c+d*x)*sin(c+d*x)+-1//2*a*b*d^-1*sin(c+d*x)^3*cos(c+d*x)+-1//3*b*c*d^-1*sin(c+d*x)^5*cos(c+d*x))
@test integrate((a+b*sin(c+d*x)^-1//2+c*sin(c+d*x))*sin(c+d*x), x) == :((1/2)*c*x+-1*a*d^-1*cos(c+d*x)+2*b*d^-1*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2)+-1//2*c*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*sin(c+d*x)^-1//2+c*sin(c+d*x))^2*sin(c+d*x), x) == :(x*b^2+a*c*x+-1*a^2*d^-1*cos(c+d*x)+-1*c^2*d^-1*cos(c+d*x)+1//3*c^2*d^-1*cos(c+d*x)^3+4*a*b*d^-1*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2)+4//3*b*c*d^-1*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2)+-1*a*c*d^-1*cos(c+d*x)*sin(c+d*x)+-4//3*b*c*d^-1*sin(c+d*x)^(1/2)*cos(c+d*x))
@test integrate(f^(a+b*x)*(im*sin(c+d*x)+cos(c+d*x))^n, x) == :(f^(a+b*x)*(b*log(f)+im*d*n)^-1*exp(im*(c+d*x))^n)
@test integrate(f^(a+b*x)*(-1*im*sin(c+d*x)+cos(c+d*x))^n, x) == :(-1*f^(a+b*x)*(-1*b*log(f)+im*d*n)^-1*exp(-1*im*(c+d*x))^n)
@test integrate((cos(a+b*x)^5+sin(a+b*x)^5)^-1*(cos(a+b*x)^5+-1*sin(a+b*x)^5), x) == :(b^-1*log(cos(a+b*x))+1//5*b^-1*log(1+tan(a+b*x))+-4*b^-1*(5+-5*5^(1/2))^-1*log(2+2*tan(a+b*x)^2+-1*(1+-1*5^(1/2))*tan(a+b*x))+-4*b^-1*(5+5*5^(1/2))^-1*log(2+2*tan(a+b*x)^2+-1*(1+5^(1/2))*tan(a+b*x)))
@test integrate((cos(a+b*x)^4+sin(a+b*x)^4)^-1*(cos(a+b*x)^4+-1*sin(a+b*x)^4), x) == :(-1//4*2^(1/2)*b^-1*log(1+tan(a+b*x)^2+-1*2^(1/2)*tan(a+b*x))+1//4*2^(1/2)*b^-1*log(1+tan(a+b*x)^2+2^(1/2)*tan(a+b*x)))
@test integrate((cos(a+b*x)^3+sin(a+b*x)^3)^-1*(cos(a+b*x)^3+-1*sin(a+b*x)^3), x) == :(-1*b^-1*log(cos(a+b*x))+-2//3*b^-1*log(1+tan(a+b*x)^2+-1*tan(a+b*x))+1//3*b^-1*log(1+tan(a+b*x)))
@test integrate((cos(a+b*x)^2+sin(a+b*x)^2)^-1*(cos(a+b*x)^2+-1*sin(a+b*x)^2), x) == :(b^-1*cos(a+b*x)*sin(a+b*x))
@test integrate((cos(a+b*x)+sin(a+b*x))^-1*(-1*sin(a+b*x)+cos(a+b*x)), x) == :(b^-1*log(cos(a+b*x)+sin(a+b*x)))
@test integrate((csc(a+b*x)+sec(a+b*x))^-1*(-1*csc(a+b*x)+sec(a+b*x)), x) == :(-1*b^-1*log(cos(a+b*x)+sin(a+b*x)))
@test integrate((csc(a+b*x)^2+sec(a+b*x)^2)^-1*(sec(a+b*x)^2+-1*csc(a+b*x)^2), x) == :(-1*b^-1*cos(a+b*x)*sin(a+b*x))
@test integrate((csc(a+b*x)^3+sec(a+b*x)^3)^-1*(sec(a+b*x)^3+-1*csc(a+b*x)^3), x) == :(b^-1*log(cos(a+b*x))+-1//3*b^-1*log(1+tan(a+b*x))+2//3*b^-1*log(1+tan(a+b*x)^2+-1*tan(a+b*x)))
@test integrate((csc(a+b*x)^4+sec(a+b*x)^4)^-1*(sec(a+b*x)^4+-1*csc(a+b*x)^4), x) == :(-1//4*2^(1/2)*b^-1*log(1+tan(a+b*x)^2+2^(1/2)*tan(a+b*x))+1//4*2^(1/2)*b^-1*log(1+tan(a+b*x)^2+-1*2^(1/2)*tan(a+b*x)))

max_stars_repo_path: test/4 Trig functions/4.7 Miscellaneous/4.7.7 Trig functions.jl