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

@test integrate(sin(c+d*x)^9*(a+a*sec(c+d*x)), x) == :(-1*a*d^-1*cos(c+d*x)+-1*a*d^-1*log(cos(c+d*x))+2*a*d^-1*cos(c+d*x)^2+-6//5*a*d^-1*cos(c+d*x)^5+-3//2*a*d^-1*cos(c+d*x)^4+-1//8*a*d^-1*cos(c+d*x)^8+-1//9*a*d^-1*cos(c+d*x)^9+2//3*a*d^-1*cos(c+d*x)^6+4//3*a*d^-1*cos(c+d*x)^3+4//7*a*d^-1*cos(c+d*x)^7)
@test integrate(sin(c+d*x)^7*(a+a*sec(c+d*x)), x) == :(a*d^-1*cos(c+d*x)^3+-1*a*d^-1*cos(c+d*x)+-1*a*d^-1*log(cos(c+d*x))+-3//4*a*d^-1*cos(c+d*x)^4+-3//5*a*d^-1*cos(c+d*x)^5+1//6*a*d^-1*cos(c+d*x)^6+1//7*a*d^-1*cos(c+d*x)^7+3//2*a*d^-1*cos(c+d*x)^2)
@test integrate(sin(c+d*x)^5*(a+a*sec(c+d*x)), x) == :(a*d^-1*cos(c+d*x)^2+-1*a*d^-1*cos(c+d*x)+-1*a*d^-1*log(cos(c+d*x))+-1//4*a*d^-1*cos(c+d*x)^4+-1//5*a*d^-1*cos(c+d*x)^5+2//3*a*d^-1*cos(c+d*x)^3)
@test integrate(sin(c+d*x)^3*(a+a*sec(c+d*x)), x) == :((1/2)*a*d^-1*cos(c+d*x)^2+-1*a*d^-1*cos(c+d*x)+-1*a*d^-1*log(cos(c+d*x))+1//3*a*d^-1*cos(c+d*x)^3)
@test integrate((a+a*sec(c+d*x))*sin(c+d*x), x) == :(-1*a*d^-1*cos(c+d*x)+-1*a*d^-1*log(cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))*csc(c+d*x), x) == :(a*d^-1*log(1+-1*cos(c+d*x))+-1*a*d^-1*log(cos(c+d*x)))
@test integrate(csc(c+d*x)^3*(a+a*sec(c+d*x)), x) == :(-1*a*d^-1*log(cos(c+d*x))+-1//2*a^2*d^-1*(a+-1*a*cos(c+d*x))^-1+1//4*a*d^-1*log(1+cos(c+d*x))+3//4*a*d^-1*log(1+-1*cos(c+d*x)))
@test integrate(csc(c+d*x)^5*(a+a*sec(c+d*x)), x) == :(-1*a*d^-1*log(cos(c+d*x))+-1//2*a^2*d^-1*(a+-1*a*cos(c+d*x))^-1+-1//8*a^2*d^-1*(a+a*cos(c+d*x))^-1+-1//8*a^3*d^-1*(a+-1*a*cos(c+d*x))^-2+5//16*a*d^-1*log(1+cos(c+d*x))+11//16*a*d^-1*log(1+-1*cos(c+d*x)))
@test integrate(csc(c+d*x)^7*(a+a*sec(c+d*x)), x) == :(-1*a*d^-1*log(cos(c+d*x))+-5//32*a^3*d^-1*(a+-1*a*cos(c+d*x))^-2+-3//16*a^2*d^-1*(a+a*cos(c+d*x))^-1+-1//2*a^2*d^-1*(a+-1*a*cos(c+d*x))^-1+-1//24*a^4*d^-1*(a+-1*a*cos(c+d*x))^-3+-1//32*a^3*d^-1*(a+a*cos(c+d*x))^-2+11//32*a*d^-1*log(1+cos(c+d*x))+21//32*a*d^-1*log(1+-1*cos(c+d*x)))
@test integrate(sin(c+d*x)^8*(a+a*sec(c+d*x)), x) == :(35//128*a*x+a*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*sin(c+d*x)+-1//3*a*d^-1*sin(c+d*x)^3+-1//5*a*d^-1*sin(c+d*x)^5+-1//7*a*d^-1*sin(c+d*x)^7+-35//128*a*d^-1*cos(c+d*x)*sin(c+d*x)+-35//192*a*d^-1*sin(c+d*x)^3*cos(c+d*x)+-7//48*a*d^-1*sin(c+d*x)^5*cos(c+d*x)+-1//8*a*d^-1*sin(c+d*x)^7*cos(c+d*x))
@test integrate(sin(c+d*x)^6*(a+a*sec(c+d*x)), x) == :(5//16*a*x+a*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*sin(c+d*x)+-1//3*a*d^-1*sin(c+d*x)^3+-1//5*a*d^-1*sin(c+d*x)^5+-5//16*a*d^-1*cos(c+d*x)*sin(c+d*x)+-5//24*a*d^-1*sin(c+d*x)^3*cos(c+d*x)+-1//6*a*d^-1*sin(c+d*x)^5*cos(c+d*x))
@test integrate(sin(c+d*x)^4*(a+a*sec(c+d*x)), x) == :(3//8*a*x+a*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*sin(c+d*x)+-1//3*a*d^-1*sin(c+d*x)^3+-3//8*a*d^-1*cos(c+d*x)*sin(c+d*x)+-1//4*a*d^-1*sin(c+d*x)^3*cos(c+d*x))
@test integrate(sin(c+d*x)^2*(a+a*sec(c+d*x)), x) == :((1/2)*a*x+a*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*sin(c+d*x)+-1//2*a*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(csc(c+d*x)^2*(a+a*sec(c+d*x)), x) == :(a*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*cot(c+d*x)+-1*a*d^-1*csc(c+d*x))
@test integrate(csc(c+d*x)^4*(a+a*sec(c+d*x)), x) == :(a*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*cot(c+d*x)+-1*a*d^-1*csc(c+d*x)+-1//3*a*d^-1*cot(c+d*x)^3+-1//3*a*d^-1*csc(c+d*x)^3)
@test integrate(csc(c+d*x)^6*(a+a*sec(c+d*x)), x) == :(a*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*cot(c+d*x)+-1*a*d^-1*csc(c+d*x)+-2//3*a*d^-1*cot(c+d*x)^3+-1//3*a*d^-1*csc(c+d*x)^3+-1//5*a*d^-1*cot(c+d*x)^5+-1//5*a*d^-1*csc(c+d*x)^5)
@test integrate(csc(c+d*x)^8*(a+a*sec(c+d*x)), x) == :(a*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*cot(c+d*x)^3+-1*a*d^-1*cot(c+d*x)+-1*a*d^-1*csc(c+d*x)+-3//5*a*d^-1*cot(c+d*x)^5+-1//3*a*d^-1*csc(c+d*x)^3+-1//5*a*d^-1*csc(c+d*x)^5+-1//7*a*d^-1*cot(c+d*x)^7+-1//7*a*d^-1*csc(c+d*x)^7)
@test integrate(csc(c+d*x)^10*(a+a*sec(c+d*x)), x) == :(a*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*cot(c+d*x)+-1*a*d^-1*csc(c+d*x)+-6//5*a*d^-1*cot(c+d*x)^5+-4//3*a*d^-1*cot(c+d*x)^3+-4//7*a*d^-1*cot(c+d*x)^7+-1//3*a*d^-1*csc(c+d*x)^3+-1//5*a*d^-1*csc(c+d*x)^5+-1//7*a*d^-1*csc(c+d*x)^7+-1//9*a*d^-1*cot(c+d*x)^9+-1//9*a*d^-1*csc(c+d*x)^9)
@test integrate((a+a*sec(c+d*x))^2*sin(c+d*x)^9, x) == :(a^2*d^-1*sec(c+d*x)+-3*a^2*d^-1*cos(c+d*x)^4+-2*a^2*d^-1*log(cos(c+d*x))+3*a^2*d^-1*cos(c+d*x)+4*a^2*d^-1*cos(c+d*x)^2+-2//3*a^2*d^-1*cos(c+d*x)^3+-2//5*a^2*d^-1*cos(c+d*x)^5+-1//4*a^2*d^-1*cos(c+d*x)^8+-1//9*a^2*d^-1*cos(c+d*x)^9+3//7*a^2*d^-1*cos(c+d*x)^7+4//3*a^2*d^-1*cos(c+d*x)^6)
@test integrate((a+a*sec(c+d*x))^2*sin(c+d*x)^7, x) == :(a^2*d^-1*sec(c+d*x)+-2*a^2*d^-1*log(cos(c+d*x))+2*a^2*d^-1*cos(c+d*x)+3*a^2*d^-1*cos(c+d*x)^2+-3//2*a^2*d^-1*cos(c+d*x)^4+-2//5*a^2*d^-1*cos(c+d*x)^5+1//3*a^2*d^-1*cos(c+d*x)^6+1//7*a^2*d^-1*cos(c+d*x)^7)
@test integrate((a+a*sec(c+d*x))^2*sin(c+d*x)^5, x) == :(a^2*d^-1*cos(c+d*x)+a^2*d^-1*sec(c+d*x)+-2*a^2*d^-1*log(cos(c+d*x))+2*a^2*d^-1*cos(c+d*x)^2+-1//2*a^2*d^-1*cos(c+d*x)^4+-1//5*a^2*d^-1*cos(c+d*x)^5+1//3*a^2*d^-1*cos(c+d*x)^3)
@test integrate((a+a*sec(c+d*x))^2*sin(c+d*x)^3, x) == :(a^2*d^-1*cos(c+d*x)^2+a^2*d^-1*sec(c+d*x)+-2*a^2*d^-1*log(cos(c+d*x))+1//3*a^2*d^-1*cos(c+d*x)^3)
@test integrate((a+a*sec(c+d*x))^2*sin(c+d*x), x) == :(a^2*d^-1*sec(c+d*x)+-1*a^2*d^-1*cos(c+d*x)+-2*a^2*d^-1*log(cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x), x) == :(a^2*d^-1*sec(c+d*x)+-2*a^2*d^-1*log(cos(c+d*x))+2*a^2*d^-1*log(1+-1*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x)^3, x) == :(a^2*d^-1*sec(c+d*x)+-1*a^3*d^-1*(a+-1*a*cos(c+d*x))^-1+-2*a^2*d^-1*log(cos(c+d*x))+2*a^2*d^-1*log(1+-1*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x)^5, x) == :(a^2*d^-1*sec(c+d*x)+-2*a^2*d^-1*log(cos(c+d*x))+-5//4*a^3*d^-1*(a+-1*a*cos(c+d*x))^-1+-1//4*a^4*d^-1*(a+-1*a*cos(c+d*x))^-2+-1//8*a^2*d^-1*log(1+cos(c+d*x))+17//8*a^2*d^-1*log(1+-1*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x)^7, x) == :(a^2*d^-1*sec(c+d*x)+-2*a^2*d^-1*log(cos(c+d*x))+-23//16*a^3*d^-1*(a+-1*a*cos(c+d*x))^-1+-3//8*a^4*d^-1*(a+-1*a*cos(c+d*x))^-2+-1//4*a^2*d^-1*log(1+cos(c+d*x))+-1//12*a^5*d^-1*(a+-1*a*cos(c+d*x))^-3+1//16*a^3*d^-1*(a+a*cos(c+d*x))^-1+9//4*a^2*d^-1*log(1+-1*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x)^9, x) == :(a^2*d^-1*sec(c+d*x)+-2*a^2*d^-1*log(cos(c+d*x))+-51//32*a^3*d^-1*(a+-1*a*cos(c+d*x))^-1+-47//128*a^2*d^-1*log(1+cos(c+d*x))+-15//32*a^4*d^-1*(a+-1*a*cos(c+d*x))^-2+-7//48*a^5*d^-1*(a+-1*a*cos(c+d*x))^-3+-1//32*a^6*d^-1*(a+-1*a*cos(c+d*x))^-4+1//64*a^4*d^-1*(a+a*cos(c+d*x))^-2+9//64*a^3*d^-1*(a+a*cos(c+d*x))^-1+303//128*a^2*d^-1*log(1+-1*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^2*sin(c+d*x)^8, x) == :(-245//128*x*a^2+a^2*d^-1*tan(c+d*x)+-2*a^2*d^-1*sin(c+d*x)+2*a^2*d^-1*arctanh(sin(c+d*x))+-2//3*a^2*d^-1*sin(c+d*x)^3+-2//5*a^2*d^-1*sin(c+d*x)^5+-2//7*a^2*d^-1*sin(c+d*x)^7+-17//48*a^2*d^-1*cos(c+d*x)^5*sin(c+d*x)+1//8*a^2*d^-1*cos(c+d*x)^7*sin(c+d*x)+11//192*a^2*d^-1*cos(c+d*x)^3*sin(c+d*x)+139//128*a^2*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^2*sin(c+d*x)^6, x) == :(-25//16*x*a^2+a^2*d^-1*tan(c+d*x)+-2*a^2*d^-1*sin(c+d*x)+2*a^2*d^-1*arctanh(sin(c+d*x))+-2//3*a^2*d^-1*sin(c+d*x)^3+-2//5*a^2*d^-1*sin(c+d*x)^5+-1//6*a^2*d^-1*cos(c+d*x)^5*sin(c+d*x)+7//16*a^2*d^-1*cos(c+d*x)*sin(c+d*x)+7//24*a^2*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^2*sin(c+d*x)^4, x) == :(-9//8*x*a^2+a^2*d^-1*tan(c+d*x)+-2*a^2*d^-1*sin(c+d*x)+2*a^2*d^-1*arctanh(sin(c+d*x))+-2//3*a^2*d^-1*sin(c+d*x)^3+-1//8*a^2*d^-1*cos(c+d*x)*sin(c+d*x)+1//4*a^2*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^2*sin(c+d*x)^2, x) == :(-1//2*x*a^2+a^2*d^-1*tan(c+d*x)+-2*a^2*d^-1*sin(c+d*x)+2*a^2*d^-1*arctanh(sin(c+d*x))+-1//2*a^2*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x)^2, x) == :(a^2*d^-1*tan(c+d*x)+-2*a^2*d^-1*cot(c+d*x)+-2*a^2*d^-1*csc(c+d*x)+2*a^2*d^-1*arctanh(sin(c+d*x)))
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x)^4, x) == :(2*a^2*d^-1*arctanh(sin(c+d*x))+10//3*a^2*d^-1*tan(c+d*x)+-2*a^2*d^-1*(1+-1*cos(c+d*x))^-1*tan(c+d*x)+-1//3*a^4*d^-1*(a+-1*a*cos(c+d*x))^-2*tan(c+d*x))
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x)^6, x) == :(a^2*d^-1*tan(c+d*x)+-4*a^2*d^-1*cot(c+d*x)+-2*a^2*d^-1*csc(c+d*x)+2*a^2*d^-1*arctanh(sin(c+d*x))+-5//3*a^2*d^-1*cot(c+d*x)^3+-2//3*a^2*d^-1*csc(c+d*x)^3+-2//5*a^2*d^-1*cot(c+d*x)^5+-2//5*a^2*d^-1*csc(c+d*x)^5)
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x)^8, x) == :(a^2*d^-1*tan(c+d*x)+-5*a^2*d^-1*cot(c+d*x)+-3*a^2*d^-1*cot(c+d*x)^3+-2*a^2*d^-1*csc(c+d*x)+2*a^2*d^-1*arctanh(sin(c+d*x))+-7//5*a^2*d^-1*cot(c+d*x)^5+-2//3*a^2*d^-1*csc(c+d*x)^3+-2//5*a^2*d^-1*csc(c+d*x)^5+-2//7*a^2*d^-1*cot(c+d*x)^7+-2//7*a^2*d^-1*csc(c+d*x)^7)
@test integrate((a+a*sec(c+d*x))^2*csc(c+d*x)^10, x) == :(a^2*d^-1*tan(c+d*x)+-6*a^2*d^-1*cot(c+d*x)+-2*a^2*d^-1*csc(c+d*x)+2*a^2*d^-1*arctanh(sin(c+d*x))+-16//5*a^2*d^-1*cot(c+d*x)^5+-14//3*a^2*d^-1*cot(c+d*x)^3+-9//7*a^2*d^-1*cot(c+d*x)^7+-2//3*a^2*d^-1*csc(c+d*x)^3+-2//5*a^2*d^-1*csc(c+d*x)^5+-2//7*a^2*d^-1*csc(c+d*x)^7+-2//9*a^2*d^-1*cot(c+d*x)^9+-2//9*a^2*d^-1*csc(c+d*x)^9)
@test integrate((a+a*sec(c+d*x))^3*sin(c+d*x)^9, x) == :(a^3*d^-1*log(cos(c+d*x))+(1/2)*a^3*d^-1*sec(c+d*x)^2+3*a^3*d^-1*cos(c+d*x)^2+3*a^3*d^-1*sec(c+d*x)+11*a^3*d^-1*cos(c+d*x)+-14//3*a^3*d^-1*cos(c+d*x)^3+-7//2*a^3*d^-1*cos(c+d*x)^4+-3//8*a^3*d^-1*cos(c+d*x)^8+-1//9*a^3*d^-1*cos(c+d*x)^9+1//7*a^3*d^-1*cos(c+d*x)^7+6//5*a^3*d^-1*cos(c+d*x)^5+11//6*a^3*d^-1*cos(c+d*x)^6)
@test integrate((a+a*sec(c+d*x))^3*sin(c+d*x)^7, x) == :((1/2)*a^3*d^-1*cos(c+d*x)^6+(1/2)*a^3*d^-1*sec(c+d*x)^2+-2*a^3*d^-1*cos(c+d*x)^3+-2*a^3*d^-1*cos(c+d*x)^4+3*a^3*d^-1*cos(c+d*x)^2+3*a^3*d^-1*sec(c+d*x)+8*a^3*d^-1*cos(c+d*x)+1//7*a^3*d^-1*cos(c+d*x)^7)
@test integrate((a+a*sec(c+d*x))^3*sin(c+d*x)^5, x) == :((1/2)*a^3*d^-1*sec(c+d*x)^2+-1*a^3*d^-1*log(cos(c+d*x))+3*a^3*d^-1*sec(c+d*x)+5*a^3*d^-1*cos(c+d*x)+-3//4*a^3*d^-1*cos(c+d*x)^4+-1//3*a^3*d^-1*cos(c+d*x)^3+-1//5*a^3*d^-1*cos(c+d*x)^5+5//2*a^3*d^-1*cos(c+d*x)^2)
@test integrate((a+a*sec(c+d*x))^3*sin(c+d*x)^3, x) == :((1/2)*a^3*d^-1*sec(c+d*x)^2+-2*a^3*d^-1*log(cos(c+d*x))+2*a^3*d^-1*cos(c+d*x)+3*a^3*d^-1*sec(c+d*x)+1//3*a^3*d^-1*cos(c+d*x)^3+3//2*a^3*d^-1*cos(c+d*x)^2)
@test integrate((a+a*sec(c+d*x))^3*sin(c+d*x), x) == :((1/2)*a^3*d^-1*sec(c+d*x)^2+-1*a^3*d^-1*cos(c+d*x)+-3*a^3*d^-1*log(cos(c+d*x))+3*a^3*d^-1*sec(c+d*x))
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x), x) == :((1/2)*a^3*d^-1*sec(c+d*x)^2+-4*a^3*d^-1*log(cos(c+d*x))+3*a^3*d^-1*sec(c+d*x)+4*a^3*d^-1*log(1+-1*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x)^3, x) == :((1/2)*a^3*d^-1*sec(c+d*x)^2+-5*a^3*d^-1*log(cos(c+d*x))+-2*a^4*d^-1*(a+-1*a*cos(c+d*x))^-1+3*a^3*d^-1*sec(c+d*x)+5*a^3*d^-1*log(1+-1*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x)^5, x) == :((1/2)*a^3*d^-1*sec(c+d*x)^2+-6*a^3*d^-1*log(cos(c+d*x))+-3*a^4*d^-1*(a+-1*a*cos(c+d*x))^-1+3*a^3*d^-1*sec(c+d*x)+6*a^3*d^-1*log(1+-1*cos(c+d*x))+-1//2*a^5*d^-1*(a+-1*a*cos(c+d*x))^-2)
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x)^7, x) == :((1/2)*a^3*d^-1*sec(c+d*x)^2+-7*a^3*d^-1*log(cos(c+d*x))+3*a^3*d^-1*sec(c+d*x)+-31//8*a^4*d^-1*(a+-1*a*cos(c+d*x))^-1+-7//8*a^5*d^-1*(a+-1*a*cos(c+d*x))^-2+-1//6*a^6*d^-1*(a+-1*a*cos(c+d*x))^-3+1//16*a^3*d^-1*log(1+cos(c+d*x))+111//16*a^3*d^-1*log(1+-1*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x)^9, x) == :((1/2)*a^3*d^-1*sec(c+d*x)^2+-8*a^3*d^-1*log(cos(c+d*x))+3*a^3*d^-1*sec(c+d*x)+-75//16*a^4*d^-1*(a+-1*a*cos(c+d*x))^-1+-39//32*a^5*d^-1*(a+-1*a*cos(c+d*x))^-2+-1//3*a^6*d^-1*(a+-1*a*cos(c+d*x))^-3+-1//16*a^7*d^-1*(a+-1*a*cos(c+d*x))^-4+-1//32*a^4*d^-1*(a+a*cos(c+d*x))^-1+11//64*a^3*d^-1*log(1+cos(c+d*x))+501//64*a^3*d^-1*log(1+-1*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^3*sin(c+d*x)^8, x) == :(-805//128*x*a^3+3*a^3*d^-1*tan(c+d*x)+-3//7*a^3*d^-1*sin(c+d*x)^7+-2//5*a^3*d^-1*sin(c+d*x)^5+-1//2*a^3*d^-1*arctanh(sin(c+d*x))+-1//3*a^3*d^-1*sin(c+d*x)^3+(1/2)*a^3*d^-1*sec(c+d*x)*tan(c+d*x)+-293//192*a^3*d^-1*cos(c+d*x)^3*sin(c+d*x)+-1//48*a^3*d^-1*cos(c+d*x)^5*sin(c+d*x)+1//8*a^3*d^-1*cos(c+d*x)^7*sin(c+d*x)+603//128*a^3*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^3*sin(c+d*x)^6, x) == :(-85//16*x*a^3+(1/2)*a^3*d^-1*arctanh(sin(c+d*x))+-1*a^3*d^-1*sin(c+d*x)+3*a^3*d^-1*tan(c+d*x)+-3//5*a^3*d^-1*sin(c+d*x)^5+-2//3*a^3*d^-1*sin(c+d*x)^3+(1/2)*a^3*d^-1*sec(c+d*x)*tan(c+d*x)+-5//24*a^3*d^-1*cos(c+d*x)^3*sin(c+d*x)+-1//6*a^3*d^-1*cos(c+d*x)^5*sin(c+d*x)+43//16*a^3*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^3*sin(c+d*x)^4, x) == :(-33//8*x*a^3+-1*a^3*d^-1*sin(c+d*x)^3+-2*a^3*d^-1*sin(c+d*x)+3*a^3*d^-1*tan(c+d*x)+3//2*a^3*d^-1*arctanh(sin(c+d*x))+(1/2)*a^3*d^-1*sec(c+d*x)*tan(c+d*x)+1//4*a^3*d^-1*cos(c+d*x)^3*sin(c+d*x)+7//8*a^3*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^3*sin(c+d*x)^2, x) == :(-5//2*x*a^3+-3*a^3*d^-1*sin(c+d*x)+3*a^3*d^-1*tan(c+d*x)+5//2*a^3*d^-1*arctanh(sin(c+d*x))+(1/2)*a^3*d^-1*sec(c+d*x)*tan(c+d*x)+-1//2*a^3*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x)^2, x) == :(3*a^3*d^-1*tan(c+d*x)+9//2*a^3*d^-1*arctanh(sin(c+d*x))+(1/2)*a^3*d^-1*sec(c+d*x)*tan(c+d*x)+-4*a^3*d^-1*(1+-1*cos(c+d*x))^-1*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x)^4, x) == :(3*a^3*d^-1*tan(c+d*x)+11//2*a^3*d^-1*arctanh(sin(c+d*x))+(1/2)*a^3*d^-1*sec(c+d*x)*tan(c+d*x)+-17//3*a^3*d^-1*(1+-1*cos(c+d*x))^-1*sin(c+d*x)+-2//3*a^3*d^-1*(1+-1*cos(c+d*x))^-2*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x)^6, x) == :(13//2*a^3*d^-1*arctanh(sin(c+d*x))+152//15*a^3*d^-1*tan(c+d*x)+13//2*a^3*d^-1*sec(c+d*x)*tan(c+d*x)+-76//15*a^6*d^-1*(a^3+-1*a^3*cos(c+d*x))^-1*sec(c+d*x)*tan(c+d*x)+-11//15*a^5*d^-1*(a+-1*a*cos(c+d*x))^-2*sec(c+d*x)*tan(c+d*x)+-1//5*a^6*d^-1*(a+-1*a*cos(c+d*x))^-3*sec(c+d*x)*tan(c+d*x))
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x)^8, x) == :(-13*a^3*d^-1*cot(c+d*x)+-7*a^3*d^-1*cot(c+d*x)^3+-3*a^3*d^-1*cot(c+d*x)^5+3*a^3*d^-1*tan(c+d*x)+-15//2*a^3*d^-1*csc(c+d*x)+-15//14*a^3*d^-1*csc(c+d*x)^7+-5//2*a^3*d^-1*csc(c+d*x)^3+-4//7*a^3*d^-1*cot(c+d*x)^7+-3//2*a^3*d^-1*csc(c+d*x)^5+15//2*a^3*d^-1*arctanh(sin(c+d*x))+(1/2)*a^3*d^-1*csc(c+d*x)^7*sec(c+d*x)^2)
@test integrate((a+a*sec(c+d*x))^3*csc(c+d*x)^10, x) == :(-16*a^3*d^-1*cot(c+d*x)+3*a^3*d^-1*tan(c+d*x)+-36//5*a^3*d^-1*cot(c+d*x)^5+-34//3*a^3*d^-1*cot(c+d*x)^3+-19//7*a^3*d^-1*cot(c+d*x)^7+-17//2*a^3*d^-1*csc(c+d*x)+-17//6*a^3*d^-1*csc(c+d*x)^3+-17//10*a^3*d^-1*csc(c+d*x)^5+-17//14*a^3*d^-1*csc(c+d*x)^7+-17//18*a^3*d^-1*csc(c+d*x)^9+-4//9*a^3*d^-1*cot(c+d*x)^9+17//2*a^3*d^-1*arctanh(sin(c+d*x))+(1/2)*a^3*d^-1*csc(c+d*x)^9*sec(c+d*x)^2)
@test integrate((a+a*sec(c+d*x))^-1*sin(c+d*x)^9, x) == :(-3//5*a^-1*d^-1*cos(c+d*x)^5+-1//9*a^-1*d^-1*cos(c+d*x)^9+1//3*a^-1*d^-1*cos(c+d*x)^3+1//8*a^-1*d^-1*sin(c+d*x)^8+3//7*a^-1*d^-1*cos(c+d*x)^7)
@test integrate((a+a*sec(c+d*x))^-1*sin(c+d*x)^7, x) == :(-2//5*a^-1*d^-1*cos(c+d*x)^5+1//3*a^-1*d^-1*cos(c+d*x)^3+1//6*a^-1*d^-1*sin(c+d*x)^6+1//7*a^-1*d^-1*cos(c+d*x)^7)
@test integrate((a+a*sec(c+d*x))^-1*sin(c+d*x)^5, x) == :(-1//5*a^-1*d^-1*cos(c+d*x)^5+1//3*a^-1*d^-1*cos(c+d*x)^3+1//4*a^-1*d^-1*sin(c+d*x)^4)
@test integrate((a+a*sec(c+d*x))^-1*sin(c+d*x)^3, x) == :((1/2)*a^-1*d^-1*sin(c+d*x)^2+1//3*a^-1*d^-1*cos(c+d*x)^3)
@test integrate((a+a*sec(c+d*x))^-1*sin(c+d*x), x) == :(a^-1*d^-1*log(1+cos(c+d*x))+-1*a^-1*d^-1*cos(c+d*x))
@test integrate((a+a*sec(c+d*x))^-1*csc(c+d*x), x) == :(-1//2*a^-1*d^-1*csc(c+d*x)^2+-1//2*a^-1*d^-1*arctanh(cos(c+d*x))+(1/2)*a^-1*d^-1*cot(c+d*x)*csc(c+d*x))
@test integrate((a+a*sec(c+d*x))^-1*csc(c+d*x)^3, x) == :(-1//4*a^-1*d^-1*csc(c+d*x)^4+-1//8*a^-1*d^-1*arctanh(cos(c+d*x))+-1//8*a^-1*d^-1*cot(c+d*x)*csc(c+d*x)+1//4*a^-1*d^-1*csc(c+d*x)^3*cot(c+d*x))
@test integrate((a+a*sec(c+d*x))^-1*csc(c+d*x)^5, x) == :(-1//6*a^-1*d^-1*csc(c+d*x)^6+-1//16*a^-1*d^-1*arctanh(cos(c+d*x))+-1//16*a^-1*d^-1*cot(c+d*x)*csc(c+d*x)+-1//24*a^-1*d^-1*csc(c+d*x)^3*cot(c+d*x)+1//6*a^-1*d^-1*csc(c+d*x)^5*cot(c+d*x))
@test integrate((a+a*sec(c+d*x))^-1*sin(c+d*x)^8, x) == :(-5//128*x*a^-1+1//7*a^-1*d^-1*sin(c+d*x)^7+-5//128*a^-1*d^-1*cos(c+d*x)*sin(c+d*x)+1//8*a^-1*d^-1*cos(c+d*x)^3*sin(c+d*x)^5+5//48*a^-1*d^-1*cos(c+d*x)^3*sin(c+d*x)^3+5//64*a^-1*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-1*sin(c+d*x)^6, x) == :(-1//16*x*a^-1+1//5*a^-1*d^-1*sin(c+d*x)^5+-1//16*a^-1*d^-1*cos(c+d*x)*sin(c+d*x)+1//6*a^-1*d^-1*cos(c+d*x)^3*sin(c+d*x)^3+1//8*a^-1*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-1*sin(c+d*x)^4, x) == :(-1//8*x*a^-1+1//3*a^-1*d^-1*sin(c+d*x)^3+-1//8*a^-1*d^-1*cos(c+d*x)*sin(c+d*x)+1//4*a^-1*d^-1*cos(c+d*x)^3*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-1*sin(c+d*x)^2, x) == :(-1//2*x*a^-1+a^-1*d^-1*sin(c+d*x)+-1//2*a^-1*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-1*csc(c+d*x)^2, x) == :(-1//3*a^-1*d^-1*csc(c+d*x)^3+1//3*a^-1*d^-1*cot(c+d*x)^3)
@test integrate((a+a*sec(c+d*x))^-1*csc(c+d*x)^4, x) == :(-1//5*a^-1*d^-1*csc(c+d*x)^5+1//3*a^-1*d^-1*cot(c+d*x)^3+1//5*a^-1*d^-1*cot(c+d*x)^5)
@test integrate((a+a*sec(c+d*x))^-1*csc(c+d*x)^6, x) == :(-1//7*a^-1*d^-1*csc(c+d*x)^7+1//3*a^-1*d^-1*cot(c+d*x)^3+1//7*a^-1*d^-1*cot(c+d*x)^7+2//5*a^-1*d^-1*cot(c+d*x)^5)
@test integrate((a+a*sec(c+d*x))^-1*csc(c+d*x)^8, x) == :(-1//9*a^-1*d^-1*csc(c+d*x)^9+1//3*a^-1*d^-1*cot(c+d*x)^3+1//9*a^-1*d^-1*cot(c+d*x)^9+3//5*a^-1*d^-1*cot(c+d*x)^5+3//7*a^-1*d^-1*cot(c+d*x)^7)
@test integrate((a+a*sec(c+d*x))^-1*csc(c+d*x)^10, x) == :(-1//11*a^-1*d^-1*csc(c+d*x)^11+1//3*a^-1*d^-1*cot(c+d*x)^3+1//11*a^-1*d^-1*cot(c+d*x)^11+4//5*a^-1*d^-1*cot(c+d*x)^5+4//9*a^-1*d^-1*cot(c+d*x)^9+6//7*a^-1*d^-1*cot(c+d*x)^7)
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x)^11, x) == :(-4*a^-9*d^-1*(a+-1*a*cos(c+d*x))^7+-25//9*a^-11*d^-1*(a+-1*a*cos(c+d*x))^9+-1//11*a^-13*d^-1*(a+-1*a*cos(c+d*x))^11+4//3*a^-8*d^-1*(a+-1*a*cos(c+d*x))^6+4//5*a^-12*d^-1*(a+-1*a*cos(c+d*x))^10+19//4*a^-10*d^-1*(a+-1*a*cos(c+d*x))^8)
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x)^9, x) == :(-2*a^-8*d^-1*(a+-1*a*cos(c+d*x))^6+-3//4*a^-10*d^-1*(a+-1*a*cos(c+d*x))^8+1//9*a^-11*d^-1*(a+-1*a*cos(c+d*x))^9+4//5*a^-7*d^-1*(a+-1*a*cos(c+d*x))^5+13//7*a^-9*d^-1*(a+-1*a*cos(c+d*x))^7)
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x)^7, x) == :((1/2)*a^-2*d^-1*cos(c+d*x)^4+-1//3*a^-2*d^-1*cos(c+d*x)^3+-1//3*a^-2*d^-1*cos(c+d*x)^6+1//7*a^-2*d^-1*cos(c+d*x)^7)
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x)^5, x) == :((1/2)*a^-2*d^-1*cos(c+d*x)^4+-1//3*a^-2*d^-1*cos(c+d*x)^3+-1//5*a^-2*d^-1*cos(c+d*x)^5)
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x)^3, x) == :(-1*a^-2*d^-1*cos(c+d*x)^2+-2*a^-2*d^-1*log(1+cos(c+d*x))+2*a^-2*d^-1*cos(c+d*x)+1//3*a^-2*d^-1*cos(c+d*x)^3)
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x), x) == :(d^-1*(a^2+a^2*cos(c+d*x))^-1+-1*a^-2*d^-1*cos(c+d*x)+2*a^-2*d^-1*log(1+cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^-2*csc(c+d*x), x) == :(-3//4*d^-1*(a^2+a^2*cos(c+d*x))^-1+1//4*d^-1*(a+a*cos(c+d*x))^-2+-1//4*a^-2*d^-1*arctanh(cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^-2*csc(c+d*x)^3, x) == :(-1//6*d^-1*(1+-1*cos(c+d*x))^-1*(a+a*cos(c+d*x))^-3*(a+2*a*cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^-2*csc(c+d*x)^5, x) == :(-1//32*d^-1*(a+a*cos(c+d*x))^-2+-1//32*d^-1*(a^2+a^2*cos(c+d*x))^-1+-1//64*d^-1*(a+-1*a*cos(c+d*x))^-2+-1//64*d^-1*(a^2+-1*a^2*cos(c+d*x))^-1+-1//48*a*d^-1*(a+a*cos(c+d*x))^-3+1//32*a^2*d^-1*(a+a*cos(c+d*x))^-4+1//64*a^-2*d^-1*arctanh(cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x)^8, x) == :(11//128*x*a^-2+-2//5*a^-2*d^-1*sin(c+d*x)^5+2//7*a^-2*d^-1*sin(c+d*x)^7+-7//64*a^-2*d^-1*cos(c+d*x)^3*sin(c+d*x)+-1//6*a^-2*d^-1*cos(c+d*x)^3*sin(c+d*x)^3+-1//8*a^-2*d^-1*cos(c+d*x)^5*sin(c+d*x)^3+-1//16*a^-2*d^-1*cos(c+d*x)^5*sin(c+d*x)+11//128*a^-2*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x)^6, x) == :(3//16*x*a^-2+-1//10*a^-2*d^-1*sin(c+d*x)^5+-3//16*a^-2*d^-1*cos(c+d*x)*sin(c+d*x)+-1//6*a^-5*d^-1*(a+-1*a*cos(c+d*x))^3*sin(c+d*x)^3+-1//8*a^-2*d^-1*sin(c+d*x)^3*cos(c+d*x))
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x)^4, x) == :(7//8*x*a^-2+-2*a^-2*d^-1*sin(c+d*x)+2//3*a^-2*d^-1*sin(c+d*x)^3+1//4*a^-2*d^-1*cos(c+d*x)^3*sin(c+d*x)+7//8*a^-2*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-2*sin(c+d*x)^2, x) == :(-5//2*x*a^-2+2*a^-2*d^-1*sin(c+d*x)+2*a^-2*d^-1*(1+cos(c+d*x))^-1*sin(c+d*x)+-1//2*a^-2*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-2*csc(c+d*x)^2, x) == :(-2//3*a^-2*d^-1*csc(c+d*x)^3+-2//5*a^-2*d^-1*cot(c+d*x)^5+-1//3*a^-2*d^-1*cot(c+d*x)^3+2//5*a^-2*d^-1*csc(c+d*x)^5)
@test integrate((a+a*sec(c+d*x))^-2*csc(c+d*x)^4, x) == :(-3//5*a^-2*d^-1*cot(c+d*x)^5+-2//5*a^-2*d^-1*csc(c+d*x)^5+-2//7*a^-2*d^-1*cot(c+d*x)^7+-1//3*a^-2*d^-1*cot(c+d*x)^3+2//7*a^-2*d^-1*csc(c+d*x)^7)
@test integrate((a+a*sec(c+d*x))^-2*csc(c+d*x)^6, x) == :(-5//7*a^-2*d^-1*cot(c+d*x)^7+-4//5*a^-2*d^-1*cot(c+d*x)^5+-2//7*a^-2*d^-1*csc(c+d*x)^7+-2//9*a^-2*d^-1*cot(c+d*x)^9+-1//3*a^-2*d^-1*cot(c+d*x)^3+2//9*a^-2*d^-1*csc(c+d*x)^9)
@test integrate((a+a*sec(c+d*x))^-2*csc(c+d*x)^8, x) == :(-1*a^-2*d^-1*cot(c+d*x)^5+-9//7*a^-2*d^-1*cot(c+d*x)^7+-7//9*a^-2*d^-1*cot(c+d*x)^9+-2//9*a^-2*d^-1*csc(c+d*x)^9+-2//11*a^-2*d^-1*cot(c+d*x)^11+-1//3*a^-2*d^-1*cot(c+d*x)^3+2//11*a^-2*d^-1*csc(c+d*x)^11)
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x)^11, x) == :(-19//9*a^-12*d^-1*(a+-1*a*cos(c+d*x))^9+-16//7*a^-10*d^-1*(a+-1*a*cos(c+d*x))^7+-1//11*a^-14*d^-1*(a+-1*a*cos(c+d*x))^11+2//3*a^-9*d^-1*(a+-1*a*cos(c+d*x))^6+7//10*a^-13*d^-1*(a+-1*a*cos(c+d*x))^10+25//8*a^-11*d^-1*(a+-1*a*cos(c+d*x))^8)
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x)^9, x) == :(-2//7*a^-3*d^-1*cos(c+d*x)^7+-1//3*a^-3*d^-1*cos(c+d*x)^6+-1//4*a^-3*d^-1*cos(c+d*x)^4+-1//9*a^-3*d^-1*cos(c+d*x)^9+3//5*a^-3*d^-1*cos(c+d*x)^5+3//8*a^-3*d^-1*cos(c+d*x)^8)
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x)^7, x) == :(-1//2*a^-3*d^-1*cos(c+d*x)^6+-1//4*a^-3*d^-1*cos(c+d*x)^4+1//7*a^-3*d^-1*cos(c+d*x)^7+3//5*a^-3*d^-1*cos(c+d*x)^5)
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x)^5, x) == :(-4*a^-3*d^-1*cos(c+d*x)+2*a^-3*d^-1*cos(c+d*x)^2+4*a^-3*d^-1*log(1+cos(c+d*x))+-4//3*a^-3*d^-1*cos(c+d*x)^3+-1//5*a^-3*d^-1*cos(c+d*x)^5+3//4*a^-3*d^-1*cos(c+d*x)^4)
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x)^3, x) == :(-2*d^-1*(a^3+a^3*cos(c+d*x))^-1+-7*a^-3*d^-1*log(1+cos(c+d*x))+5*a^-3*d^-1*cos(c+d*x)+-3//2*a^-3*d^-1*cos(c+d*x)^2+1//3*a^-3*d^-1*cos(c+d*x)^3)
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x), x) == :(3*d^-1*(a^3+a^3*cos(c+d*x))^-1+-1*a^-3*d^-1*cos(c+d*x)+3*a^-3*d^-1*log(1+cos(c+d*x))+-1//2*a^-1*d^-1*(a+a*cos(c+d*x))^-2)
@test integrate((a+a*sec(c+d*x))^-3*csc(c+d*x), x) == :(-7//8*d^-1*(a^3+a^3*cos(c+d*x))^-1+-1//6*d^-1*(a+a*cos(c+d*x))^-3+-1//8*a^-3*d^-1*arctanh(cos(c+d*x))+5//8*a^-1*d^-1*(a+a*cos(c+d*x))^-2)
@test integrate((a+a*sec(c+d*x))^-3*csc(c+d*x)^3, x) == :(-1//16*d^-1*(a^3+a^3*cos(c+d*x))^-1+-1//32*d^-1*(a^3+-1*a^3*cos(c+d*x))^-1+1//6*d^-1*(a+a*cos(c+d*x))^-3+-3//32*a^-1*d^-1*(a+a*cos(c+d*x))^-2+-1//16*a*d^-1*(a+a*cos(c+d*x))^-4+1//32*a^-3*d^-1*arctanh(cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^-3*csc(c+d*x)^5, x) == :(-3//128*d^-1*(a^3+a^3*cos(c+d*x))^-1+-1//40*a^2*d^-1*(a+a*cos(c+d*x))^-5+-1//64*a^-1*d^-1*(a+a*cos(c+d*x))^-2+-1//128*a^-1*d^-1*(a+-1*a*cos(c+d*x))^-2+3//64*a*d^-1*(a+a*cos(c+d*x))^-4+3//128*a^-3*d^-1*arctanh(cos(c+d*x)))
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x)^8, x) == :(-29//128*x*a^-3+-7//5*a^-3*d^-1*sin(c+d*x)^5+3//7*a^-3*d^-1*sin(c+d*x)^7+4//3*a^-3*d^-1*sin(c+d*x)^3+-29//128*a^-3*d^-1*cos(c+d*x)*sin(c+d*x)+-29//192*a^-3*d^-1*cos(c+d*x)^3*sin(c+d*x)+1//8*a^-3*d^-1*cos(c+d*x)^7*sin(c+d*x)+23//48*a^-3*d^-1*cos(c+d*x)^5*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x)^6, x) == :(-23//16*x*a^-3+4*a^-3*d^-1*sin(c+d*x)+-7//3*a^-3*d^-1*sin(c+d*x)^3+3//5*a^-3*d^-1*sin(c+d*x)^5+-23//16*a^-3*d^-1*cos(c+d*x)*sin(c+d*x)+-23//24*a^-3*d^-1*cos(c+d*x)^3*sin(c+d*x)+-1//6*a^-3*d^-1*cos(c+d*x)^5*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x)^4, x) == :(51//8*x*a^-3+a^-3*d^-1*sin(c+d*x)^3+-7*a^-3*d^-1*sin(c+d*x)+-4*a^-3*d^-1*(1+cos(c+d*x))^-1*sin(c+d*x)+1//4*a^-3*d^-1*cos(c+d*x)^3*sin(c+d*x)+19//8*a^-3*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-3*sin(c+d*x)^2, x) == :(-11//2*x*a^-3+3*a^-3*d^-1*sin(c+d*x)+-2//3*a^-3*d^-1*(1+cos(c+d*x))^-2*sin(c+d*x)+-1//2*a^-3*d^-1*cos(c+d*x)*sin(c+d*x)+19//3*a^-3*d^-1*(1+cos(c+d*x))^-1*sin(c+d*x))
@test integrate((a+a*sec(c+d*x))^-3*csc(c+d*x)^2, x) == :(-1*a^-3*d^-1*csc(c+d*x)^3+-4//7*a^-3*d^-1*csc(c+d*x)^7+3//5*a^-3*d^-1*cot(c+d*x)^5+4//7*a^-3*d^-1*cot(c+d*x)^7+7//5*a^-3*d^-1*csc(c+d*x)^5)
@test integrate((a+a*sec(c+d*x))^-3*csc(c+d*x)^4, x) == :(a^-3*d^-1*cot(c+d*x)^7+a^-3*d^-1*csc(c+d*x)^7+-4//9*a^-3*d^-1*csc(c+d*x)^9+-3//5*a^-3*d^-1*csc(c+d*x)^5+3//5*a^-3*d^-1*cot(c+d*x)^5+4//9*a^-3*d^-1*cot(c+d*x)^9)
@test integrate((a+a*sec(c+d*x))^-3*csc(c+d*x)^6, x) == :(-4//11*a^-3*d^-1*csc(c+d*x)^11+-3//7*a^-3*d^-1*csc(c+d*x)^7+3//5*a^-3*d^-1*cot(c+d*x)^5+4//11*a^-3*d^-1*cot(c+d*x)^11+7//9*a^-3*d^-1*csc(c+d*x)^9+10//7*a^-3*d^-1*cot(c+d*x)^7+11//9*a^-3*d^-1*cot(c+d*x)^9)
@test integrate((a+a*sec(c+d*x))^-3*csc(c+d*x)^8, x) == :(-4//13*a^-3*d^-1*csc(c+d*x)^13+-1//3*a^-3*d^-1*csc(c+d*x)^9+3//5*a^-3*d^-1*cot(c+d*x)^5+4//13*a^-3*d^-1*cot(c+d*x)^13+7//3*a^-3*d^-1*cot(c+d*x)^9+7//11*a^-3*d^-1*csc(c+d*x)^11+13//7*a^-3*d^-1*cot(c+d*x)^7+15//11*a^-3*d^-1*cot(c+d*x)^11)
@test integrate((e*sin(c+d*x))^5//2*(a+a*sec(c+d*x)), x) == :(a*d^-1*e^5//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+-1*a*d^-1*e^5//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+-2//3*a*e*d^-1*(e*sin(c+d*x))^3//2+-2//5*a*e*d^-1*(e*sin(c+d*x))^3//2*cos(c+d*x)+6//5*a*d^-1*e^2*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^3//2*(a+a*sec(c+d*x)), x) == :(a*d^-1*e^3//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+a*d^-1*e^3//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+-2*a*e*d^-1*(e*sin(c+d*x))^(1/2)+-2//3*a*e*d^-1*(e*sin(c+d*x))^(1/2)*cos(c+d*x)+2//3*a*d^-1*e^2*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^(1/2)*(a+a*sec(c+d*x)), x) == :(a*d^-1*e^(1/2)*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+-1*a*d^-1*e^(1/2)*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+2*a*d^-1*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-1//2*(a+a*sec(c+d*x)), x) == :(a*d^-1*e^-1//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+a*d^-1*e^-1//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+2*a*d^-1*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-3//2*(a+a*sec(c+d*x)), x) == :(a*d^-1*e^-3//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+-1*a*d^-1*e^-3//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+-2*a*d^-1*e^-1*(e*sin(c+d*x))^-1//2+-2*a*d^-1*e^-1*(e*sin(c+d*x))^-1//2*cos(c+d*x)+-2*a*d^-1*e^-2*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-5//2*(a+a*sec(c+d*x)), x) == :(a*d^-1*e^-5//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+a*d^-1*e^-5//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+-2//3*a*d^-1*e^-1*(e*sin(c+d*x))^-3//2+-2//3*a*d^-1*e^-1*(e*sin(c+d*x))^-3//2*cos(c+d*x)+2//3*a*d^-1*e^-2*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^5//2*(a+a*sec(c+d*x))^2, x) == :(-2*a^2*d^-1*e^5//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+2*a^2*d^-1*e^5//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+-4//3*e*a^2*d^-1*(e*sin(c+d*x))^3//2+e*a^2*d^-1*(e*sin(c+d*x))^3//2*sec(c+d*x)+-2//5*e*a^2*d^-1*(e*sin(c+d*x))^3//2*cos(c+d*x)+-9//5*a^2*d^-1*e^2*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^3//2*(a+a*sec(c+d*x))^2, x) == :(-4*e*a^2*d^-1*(e*sin(c+d*x))^(1/2)+2*a^2*d^-1*e^3//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+2*a^2*d^-1*e^3//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+e*a^2*d^-1*(e*sin(c+d*x))^(1/2)*sec(c+d*x)+-2//3*e*a^2*d^-1*(e*sin(c+d*x))^(1/2)*cos(c+d*x)+-1//3*a^2*d^-1*e^2*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^(1/2)*(a+a*sec(c+d*x))^2, x) == :(-2*a^2*d^-1*e^(1/2)*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+2*a^2*d^-1*e^(1/2)*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+a^2*d^-1*e^-1*(e*sin(c+d*x))^3//2*sec(c+d*x)+a^2*d^-1*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-1//2*(a+a*sec(c+d*x))^2, x) == :(2*a^2*d^-1*e^-1//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+2*a^2*d^-1*e^-1//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+a^2*d^-1*e^-1*(e*sin(c+d*x))^(1/2)*sec(c+d*x)+3*a^2*d^-1*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-3//2*(a+a*sec(c+d*x))^2, x) == :(-4*a^2*d^-1*e^-1*(e*sin(c+d*x))^-1//2+-2*a^2*d^-1*e^-3//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+2*a^2*d^-1*e^-3//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+-2*a^2*d^-1*e^-1*(e*sin(c+d*x))^-1//2*cos(c+d*x)+-2*a^2*d^-1*e^-1*(e*sin(c+d*x))^-1//2*sec(c+d*x)+3*a^2*d^-1*e^-3*(e*sin(c+d*x))^3//2*sec(c+d*x)+-5*a^2*d^-1*e^-2*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-5//2*(a+a*sec(c+d*x))^2, x) == :(2*a^2*d^-1*e^-5//2*arctan(e^-1//2*(e*sin(c+d*x))^(1/2))+2*a^2*d^-1*e^-5//2*arctanh(e^-1//2*(e*sin(c+d*x))^(1/2))+-4//3*a^2*d^-1*e^-1*(e*sin(c+d*x))^-3//2+-2//3*a^2*d^-1*e^-1*(e*sin(c+d*x))^-3//2*cos(c+d*x)+-2//3*a^2*d^-1*e^-1*(e*sin(c+d*x))^-3//2*sec(c+d*x)+5//3*a^2*d^-1*e^-3*(e*sin(c+d*x))^(1/2)*sec(c+d*x)+7//3*a^2*d^-1*e^-2*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^7//2*(a+a*sec(c+d*x))^-1, x) == :(2//5*e*a^-1*d^-1*(e*sin(c+d*x))^5//2+-2//21*a^-1*d^-1*e^3*(e*sin(c+d*x))^(1/2)*cos(c+d*x)+2//7*a^-1*d^-1*e^3*(e*sin(c+d*x))^(1/2)*cos(c+d*x)^3+-4//21*a^-1*d^-1*e^4*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^5//2*(a+a*sec(c+d*x))^-1, x) == :(2//3*e*a^-1*d^-1*(e*sin(c+d*x))^3//2+-2//5*e*a^-1*d^-1*(e*sin(c+d*x))^3//2*cos(c+d*x)+-4//5*a^-1*d^-1*e^2*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^3//2*(a+a*sec(c+d*x))^-1, x) == :(2*e*a^-1*d^-1*(e*sin(c+d*x))^(1/2)+-2//3*e*a^-1*d^-1*(e*sin(c+d*x))^(1/2)*cos(c+d*x)+-4//3*a^-1*d^-1*e^2*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^(1/2)*(a+a*sec(c+d*x))^-1, x) == :(-2*e*a^-1*d^-1*(e*sin(c+d*x))^-1//2+2*e*a^-1*d^-1*(e*sin(c+d*x))^-1//2*cos(c+d*x)+4*a^-1*d^-1*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-1//2*(a+a*sec(c+d*x))^-1, x) == :(-2//3*e*a^-1*d^-1*(e*sin(c+d*x))^-3//2+2//3*e*a^-1*d^-1*(e*sin(c+d*x))^-3//2*cos(c+d*x)+4//3*a^-1*d^-1*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-3//2*(a+a*sec(c+d*x))^-1, x) == :(-2//5*e*a^-1*d^-1*(e*sin(c+d*x))^-5//2+-4//5*a^-1*d^-1*e^-1*(e*sin(c+d*x))^-1//2*cos(c+d*x)+2//5*e*a^-1*d^-1*(e*sin(c+d*x))^-5//2*cos(c+d*x)+-4//5*a^-1*d^-1*e^-2*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-5//2*(a+a*sec(c+d*x))^-1, x) == :(-2//7*e*a^-1*d^-1*(e*sin(c+d*x))^-7//2+-4//21*a^-1*d^-1*e^-1*(e*sin(c+d*x))^-3//2*cos(c+d*x)+2//7*e*a^-1*d^-1*(e*sin(c+d*x))^-7//2*cos(c+d*x)+4//21*a^-1*d^-1*e^-2*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^7//2*(a+a*sec(c+d*x))^-2, x) == :(-4*a^-2*d^-1*e^3*(e*sin(c+d*x))^(1/2)+4//5*e*a^-2*d^-1*(e*sin(c+d*x))^5//2+2//7*a^-2*d^-1*e^3*(e*sin(c+d*x))^(1/2)*cos(c+d*x)^3+26//21*a^-2*d^-1*e^3*(e*sin(c+d*x))^(1/2)*cos(c+d*x)+52//21*a^-2*d^-1*e^4*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^5//2*(a+a*sec(c+d*x))^-2, x) == :(4*a^-2*d^-1*e^3*(e*sin(c+d*x))^-1//2+4//3*e*a^-2*d^-1*(e*sin(c+d*x))^3//2+-2*a^-2*d^-1*e^3*(e*sin(c+d*x))^-1//2*cos(c+d*x)^3+-2*a^-2*d^-1*e^3*(e*sin(c+d*x))^-1//2*cos(c+d*x)+-12//5*e*a^-2*d^-1*(e*sin(c+d*x))^3//2*cos(c+d*x)+-44//5*a^-2*d^-1*e^2*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^3//2*(a+a*sec(c+d*x))^-2, x) == :(4*e*a^-2*d^-1*(e*sin(c+d*x))^(1/2)+4//3*a^-2*d^-1*e^3*(e*sin(c+d*x))^-3//2+-4//3*e*a^-2*d^-1*(e*sin(c+d*x))^(1/2)*cos(c+d*x)+-2//3*a^-2*d^-1*e^3*(e*sin(c+d*x))^-3//2*cos(c+d*x)^3+-2//3*a^-2*d^-1*e^3*(e*sin(c+d*x))^-3//2*cos(c+d*x)+-4*a^-2*d^-1*e^2*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^(1/2)*(a+a*sec(c+d*x))^-2, x) == :(-4*e*a^-2*d^-1*(e*sin(c+d*x))^-1//2+4//5*a^-2*d^-1*e^3*(e*sin(c+d*x))^-5//2+-2//5*a^-2*d^-1*e^3*(e*sin(c+d*x))^-5//2*cos(c+d*x)^3+-2//5*a^-2*d^-1*e^3*(e*sin(c+d*x))^-5//2*cos(c+d*x)+16//5*e*a^-2*d^-1*(e*sin(c+d*x))^-1//2*cos(c+d*x)+28//5*a^-2*d^-1*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-1//2*(a+a*sec(c+d*x))^-2, x) == :(-4//3*e*a^-2*d^-1*(e*sin(c+d*x))^-3//2+4//7*a^-2*d^-1*e^3*(e*sin(c+d*x))^-7//2+-2//7*a^-2*d^-1*e^3*(e*sin(c+d*x))^-7//2*cos(c+d*x)^3+-2//7*a^-2*d^-1*e^3*(e*sin(c+d*x))^-7//2*cos(c+d*x)+16//21*e*a^-2*d^-1*(e*sin(c+d*x))^-3//2*cos(c+d*x)+20//21*a^-2*d^-1*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-3//2*(a+a*sec(c+d*x))^-2, x) == :(-4//5*e*a^-2*d^-1*(e*sin(c+d*x))^-5//2+4//9*a^-2*d^-1*e^3*(e*sin(c+d*x))^-9//2+-4//15*a^-2*d^-1*e^-1*(e*sin(c+d*x))^-1//2*cos(c+d*x)+-2//9*a^-2*d^-1*e^3*(e*sin(c+d*x))^-9//2*cos(c+d*x)^3+-2//9*a^-2*d^-1*e^3*(e*sin(c+d*x))^-9//2*cos(c+d*x)+16//45*e*a^-2*d^-1*(e*sin(c+d*x))^-5//2*cos(c+d*x)+-4//15*a^-2*d^-1*e^-2*(e*sin(c+d*x))^(1/2)*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*sin(c+d*x))^-5//2*(a+a*sec(c+d*x))^-2, x) == :(-4//7*e*a^-2*d^-1*(e*sin(c+d*x))^-7//2+4//11*a^-2*d^-1*e^3*(e*sin(c+d*x))^-11//2+-4//231*a^-2*d^-1*e^-1*(e*sin(c+d*x))^-3//2*cos(c+d*x)+-2//11*a^-2*d^-1*e^3*(e*sin(c+d*x))^-11//2*cos(c+d*x)^3+-2//11*a^-2*d^-1*e^3*(e*sin(c+d*x))^-11//2*cos(c+d*x)+16//77*e*a^-2*d^-1*(e*sin(c+d*x))^-7//2*cos(c+d*x)+4//231*a^-2*d^-1*e^-2*(e*sin(c+d*x))^-1//2*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate(sin(c+d*x)^7*(a+b*sec(c+d*x)), x) == :(a*d^-1*cos(c+d*x)^3+-1*a*d^-1*cos(c+d*x)+-1*b*d^-1*log(cos(c+d*x))+-3//4*b*d^-1*cos(c+d*x)^4+-3//5*a*d^-1*cos(c+d*x)^5+1//6*b*d^-1*cos(c+d*x)^6+1//7*a*d^-1*cos(c+d*x)^7+3//2*b*d^-1*cos(c+d*x)^2)
@test integrate(sin(c+d*x)^5*(a+b*sec(c+d*x)), x) == :(b*d^-1*cos(c+d*x)^2+-1*a*d^-1*cos(c+d*x)+-1*b*d^-1*log(cos(c+d*x))+-1//4*b*d^-1*cos(c+d*x)^4+-1//5*a*d^-1*cos(c+d*x)^5+2//3*a*d^-1*cos(c+d*x)^3)
@test integrate(sin(c+d*x)^3*(a+b*sec(c+d*x)), x) == :((1/2)*b*d^-1*cos(c+d*x)^2+-1*a*d^-1*cos(c+d*x)+-1*b*d^-1*log(cos(c+d*x))+1//3*a*d^-1*cos(c+d*x)^3)
@test integrate((a+b*sec(c+d*x))*sin(c+d*x), x) == :(-1*a*d^-1*cos(c+d*x)+-1*b*d^-1*log(cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))*csc(c+d*x), x) == :(b*d^-1*log(tan(c+d*x))+-1*a*d^-1*arctanh(cos(c+d*x)))
@test integrate(csc(c+d*x)^3*(a+b*sec(c+d*x)), x) == :(b*d^-1*log(tan(c+d*x))+-1//2*a*d^-1*arctanh(cos(c+d*x))+-1//2*b*d^-1*cot(c+d*x)^2+-1//2*a*d^-1*cot(c+d*x)*csc(c+d*x))
@test integrate(csc(c+d*x)^5*(a+b*sec(c+d*x)), x) == :(b*d^-1*log(tan(c+d*x))+-1*b*d^-1*cot(c+d*x)^2+-3//8*a*d^-1*arctanh(cos(c+d*x))+-1//4*b*d^-1*cot(c+d*x)^4+-3//8*a*d^-1*cot(c+d*x)*csc(c+d*x)+-1//4*a*d^-1*csc(c+d*x)^3*cot(c+d*x))
@test integrate(csc(c+d*x)^7*(a+b*sec(c+d*x)), x) == :(b*d^-1*log(tan(c+d*x))+-5//16*a*d^-1*arctanh(cos(c+d*x))+-3//2*b*d^-1*cot(c+d*x)^2+-3//4*b*d^-1*cot(c+d*x)^4+-1//6*b*d^-1*cot(c+d*x)^6+-5//16*a*d^-1*cot(c+d*x)*csc(c+d*x)+-5//24*a*d^-1*csc(c+d*x)^3*cot(c+d*x)+-1//6*a*d^-1*csc(c+d*x)^5*cot(c+d*x))
@test integrate(sin(c+d*x)^6*(a+b*sec(c+d*x)), x) == :(5//16*a*x+b*d^-1*arctanh(sin(c+d*x))+-1*b*d^-1*sin(c+d*x)+-1//3*b*d^-1*sin(c+d*x)^3+-1//5*b*d^-1*sin(c+d*x)^5+-5//16*a*d^-1*cos(c+d*x)*sin(c+d*x)+-5//24*a*d^-1*sin(c+d*x)^3*cos(c+d*x)+-1//6*a*d^-1*sin(c+d*x)^5*cos(c+d*x))
@test integrate(sin(c+d*x)^4*(a+b*sec(c+d*x)), x) == :(3//8*a*x+b*d^-1*arctanh(sin(c+d*x))+-1*b*d^-1*sin(c+d*x)+-1//3*b*d^-1*sin(c+d*x)^3+-3//8*a*d^-1*cos(c+d*x)*sin(c+d*x)+-1//4*a*d^-1*sin(c+d*x)^3*cos(c+d*x))
@test integrate(sin(c+d*x)^2*(a+b*sec(c+d*x)), x) == :((1/2)*a*x+b*d^-1*arctanh(sin(c+d*x))+-1*b*d^-1*sin(c+d*x)+-1//2*a*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate(csc(c+d*x)^2*(a+b*sec(c+d*x)), x) == :(b*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*cot(c+d*x)+-1*b*d^-1*csc(c+d*x))
@test integrate(csc(c+d*x)^4*(a+b*sec(c+d*x)), x) == :(b*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*cot(c+d*x)+-1*b*d^-1*csc(c+d*x)+-1//3*a*d^-1*cot(c+d*x)^3+-1//3*b*d^-1*csc(c+d*x)^3)
@test integrate(csc(c+d*x)^6*(a+b*sec(c+d*x)), x) == :(b*d^-1*arctanh(sin(c+d*x))+-1*a*d^-1*cot(c+d*x)+-1*b*d^-1*csc(c+d*x)+-2//3*a*d^-1*cot(c+d*x)^3+-1//3*b*d^-1*csc(c+d*x)^3+-1//5*a*d^-1*cot(c+d*x)^5+-1//5*b*d^-1*csc(c+d*x)^5)
@test integrate((a+b*sec(c+d*x))^2*sin(c+d*x)^5, x) == :(b^2*d^-1*sec(c+d*x)+-1*d^-1*(a^2+-2*b^2)*cos(c+d*x)+-1//5*a^2*d^-1*cos(c+d*x)^5+1//3*d^-1*cos(c+d*x)^3*(-1*b^2+2*a^2)+-2*a*b*d^-1*log(cos(c+d*x))+2*a*b*d^-1*cos(c+d*x)^2+-1//2*a*b*d^-1*cos(c+d*x)^4)
@test integrate((a+b*sec(c+d*x))^2*sin(c+d*x)^3, x) == :(b^2*d^-1*sec(c+d*x)+-1*d^-1*(a^2+-1*b^2)*cos(c+d*x)+1//3*a^2*d^-1*cos(c+d*x)^3+a*b*d^-1*cos(c+d*x)^2+-2*a*b*d^-1*log(cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^2*sin(c+d*x), x) == :(b^2*d^-1*sec(c+d*x)+-1*a^2*d^-1*cos(c+d*x)+-2*a*b*d^-1*log(cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^2*csc(c+d*x), x) == :(b^2*d^-1*sec(c+d*x)+(1/2)*d^-1*(a+b)^2*log(1+-1*cos(c+d*x))+-1//2*d^-1*(a+-1b)^2*log(1+cos(c+d*x))+-2*a*b*d^-1*log(cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^2*csc(c+d*x)^3, x) == :(b^2*d^-1*sec(c+d*x)+-1//2*d^-1*csc(c+d*x)^2*((a^2+b^2)*cos(c+d*x)+2*a*b)+-2*a*b*d^-1*log(cos(c+d*x))+-1//4*d^-1*(a+-1b)*(a+-3b)*log(1+cos(c+d*x))+1//4*d^-1*(a+b)*(a+3b)*log(1+-1*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^2*sin(c+d*x)^6, x) == :(x*(-15//8*b^2+5//16*a^2)+b^2*d^-1*tan(c+d*x)+-2*a*b*d^-1*sin(c+d*x)+2*a*b*d^-1*arctanh(sin(c+d*x))+-2//3*a*b*d^-1*sin(c+d*x)^3+-2//5*a*b*d^-1*sin(c+d*x)^5+-1//6*a^2*d^-1*cos(c+d*x)^5*sin(c+d*x)+-1//16*d^-1*(-18*b^2+11*a^2)*cos(c+d*x)*sin(c+d*x)+1//24*d^-1*cos(c+d*x)^3*(-6*b^2+13*a^2)*sin(c+d*x))
@test integrate((a+b*sec(c+d*x))^2*sin(c+d*x)^4, x) == :(x*(-3//2*b^2+3//8*a^2)+b^-1*d^-1*(b+a*cos(c+d*x))^3*tan(c+d*x)+2*a*b*d^-1*arctanh(sin(c+d*x))+-1//24*d^-1*(2*b^2+39*a^2)*cos(c+d*x)*sin(c+d*x)+1//4*a^-1*d^-1*(b+a*cos(c+d*x))^3*sin(c+d*x)+-1//6*b*a^-1*d^-1*(b^2+28*a^2)*sin(c+d*x)+-1//12*a^-1*b^-1*d^-1*(b+a*cos(c+d*x))^2*(b^2+12*a^2)*sin(c+d*x))
@test integrate((a+b*sec(c+d*x))^2*sin(c+d*x)^2, x) == :((1/2)*x*a^2+-1*x*b^2+b^2*d^-1*tan(c+d*x)+-2*a*b*d^-1*sin(c+d*x)+2*a*b*d^-1*arctanh(sin(c+d*x))+-1//2*a^2*d^-1*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*sec(c+d*x))^2*csc(c+d*x)^2, x) == :(b^2*d^-1*tan(c+d*x)+-1*d^-1*(a^2+b^2)*cot(c+d*x)+-2*a*b*d^-1*csc(c+d*x)+2*a*b*d^-1*arctanh(sin(c+d*x)))
@test integrate((a+b*sec(c+d*x))^2*csc(c+d*x)^4, x) == :(b^2*d^-1*tan(c+d*x)+-1*d^-1*(a^2+2*b^2)*cot(c+d*x)+-1//3*d^-1*cot(c+d*x)^3*(a^2+b^2)+-2*a*b*d^-1*csc(c+d*x)+2*a*b*d^-1*arctanh(sin(c+d*x))+-2//3*a*b*d^-1*csc(c+d*x)^3)
@test integrate((a+b*sec(c+d*x))^2*csc(c+d*x)^6, x) == :(b^2*d^-1*tan(c+d*x)+-1*d^-1*(a^2+3*b^2)*cot(c+d*x)+-1//3*d^-1*cot(c+d*x)^3*(2*a^2+3*b^2)+-1//5*d^-1*cot(c+d*x)^5*(a^2+b^2)+-2*a*b*d^-1*csc(c+d*x)+2*a*b*d^-1*arctanh(sin(c+d*x))+-2//3*a*b*d^-1*csc(c+d*x)^3+-2//5*a*b*d^-1*csc(c+d*x)^5)
@test integrate((a+b*sec(c+d*x))^3*sin(c+d*x)^5, x) == :((1/2)*b^3*d^-1*sec(c+d*x)^2+-1//5*a^3*d^-1*cos(c+d*x)^5+(1/2)*b*d^-1*cos(c+d*x)^2*(-1*b^2+6*a^2)+-1*a*d^-1*(a^2+-6*b^2)*cos(c+d*x)+-1*b*d^-1*(-2*b^2+3*a^2)*log(cos(c+d*x))+3*a*b^2*d^-1*sec(c+d*x)+-3//4*b*a^2*d^-1*cos(c+d*x)^4+1//3*a*d^-1*cos(c+d*x)^3*(-3*b^2+2*a^2))
@test integrate((a+b*sec(c+d*x))^3*sin(c+d*x)^3, x) == :((1/2)*b^3*d^-1*sec(c+d*x)^2+1//3*a^3*d^-1*cos(c+d*x)^3+-1*a*d^-1*(a^2+-3*b^2)*cos(c+d*x)+-1*b*d^-1*(-1*b^2+3*a^2)*log(cos(c+d*x))+3*a*b^2*d^-1*sec(c+d*x)+3//2*b*a^2*d^-1*cos(c+d*x)^2)
@test integrate((a+b*sec(c+d*x))^3*sin(c+d*x), x) == :((1/2)*b^3*d^-1*sec(c+d*x)^2+-1*a^3*d^-1*cos(c+d*x)+-3*b*a^2*d^-1*log(cos(c+d*x))+3*a*b^2*d^-1*sec(c+d*x))
@test integrate((a+b*sec(c+d*x))^3*csc(c+d*x), x) == :((1/2)*b^3*d^-1*sec(c+d*x)^2+(1/2)*d^-1*(a+b)^3*log(1+-1*cos(c+d*x))+-1//2*d^-1*(a+-1b)^3*log(1+cos(c+d*x))+-1*b*d^-1*(b^2+3*a^2)*log(cos(c+d*x))+3*a*b^2*d^-1*sec(c+d*x))
@test integrate((a+b*sec(c+d*x))^3*csc(c+d*x)^3, x) == :((1/2)*b^3*d^-1*sec(c+d*x)^2+-1*b*d^-1*(2*b^2+3*a^2)*log(cos(c+d*x))+3*a*b^2*d^-1*sec(c+d*x)+-1//2*a^2*d^-1*csc(c+d*x)^2*(b*(3+a^-2*b^2)+a*(1+3*a^-2*b^2)*cos(c+d*x))+-1//4*d^-1*(a+-1b)^2*(a+-4b)*log(1+cos(c+d*x))+1//4*d^-1*(a+b)^2*(a+4b)*log(1+-1*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^3*sin(c+d*x)^6, x) == :(5//16*x*a^3+-45//8*a*x*b^2+-5//2*b^3*d^-1*arctanh(sin(c+d*x))+5//2*b^3*d^-1*sin(c+d*x)+5//6*b^3*d^-1*sin(c+d*x)^3+(1/2)*b^3*d^-1*sin(c+d*x)^3*tan(c+d*x)^2+-1*b*a^2*d^-1*sin(c+d*x)^3+-3*b*a^2*d^-1*sin(c+d*x)+3*b*a^2*d^-1*arctanh(sin(c+d*x))+-5//16*a^3*d^-1*cos(c+d*x)*sin(c+d*x)+-5//24*a^3*d^-1*sin(c+d*x)^3*cos(c+d*x)+-3//5*b*a^2*d^-1*sin(c+d*x)^5+-1//6*a^3*d^-1*sin(c+d*x)^5*cos(c+d*x)+45//8*a*b^2*d^-1*tan(c+d*x)+-15//8*a*b^2*d^-1*sin(c+d*x)^2*tan(c+d*x)+-3//4*a*b^2*d^-1*sin(c+d*x)^4*tan(c+d*x))
@test integrate((a+b*sec(c+d*x))^3*sin(c+d*x)^4, x) == :(3//8*a*x*(a^2+-12*b^2)+-1//2*b*d^-1*(-1*b^2+17*a^2)*sin(c+d*x)+3//2*b*d^-1*(-1*b^2+2*a^2)*arctanh(sin(c+d*x))+a*b^-2*d^-1*(b+a*cos(c+d*x))^4*tan(c+d*x)+(1/2)*b^-1*d^-1*(b+a*cos(c+d*x))^4*sec(c+d*x)*tan(c+d*x)+-1//4*b^-1*d^-1*(b+a*cos(c+d*x))^2*(-1*b^2+6*a^2)*sin(c+d*x)+-1//4*b^-2*d^-1*(b+a*cos(c+d*x))^3*(-1*b^2+4*a^2)*sin(c+d*x)+-1//8*a*d^-1*(-2*b^2+21*a^2)*cos(c+d*x)*sin(c+d*x))
@test integrate((a+b*sec(c+d*x))^3*sin(c+d*x)^2, x) == :((1/2)*a*x*(a^2+-6*b^2)+(1/2)*b*d^-1*(-1*b^2+6*a^2)*arctanh(sin(c+d*x))+(1/2)*d^-1*(b+a*cos(c+d*x))^3*sec(c+d*x)*tan(c+d*x)+-15//2*b*a^2*d^-1*sin(c+d*x)+-5//2*a^3*d^-1*cos(c+d*x)*sin(c+d*x)+3//2*a*d^-1*(b+a*cos(c+d*x))^2*tan(c+d*x))
@test integrate((a+b*sec(c+d*x))^3*csc(c+d*x)^2, x) == :(-1*a^3*d^-1*cot(c+d*x)+-3//2*b^3*d^-1*csc(c+d*x)+3//2*b^3*d^-1*arctanh(sin(c+d*x))+(1/2)*b^3*d^-1*sec(c+d*x)^2*csc(c+d*x)+-3*a*b^2*d^-1*cot(c+d*x)+-3*b*a^2*d^-1*csc(c+d*x)+3*a*b^2*d^-1*tan(c+d*x)+3*b*a^2*d^-1*arctanh(sin(c+d*x)))
@test integrate((a+b*sec(c+d*x))^3*csc(c+d*x)^4, x) == :(-1*a^3*d^-1*cot(c+d*x)+-5//2*b^3*d^-1*csc(c+d*x)+-5//6*b^3*d^-1*csc(c+d*x)^3+-1//3*a^3*d^-1*cot(c+d*x)^3+5//2*b^3*d^-1*arctanh(sin(c+d*x))+(1/2)*b^3*d^-1*csc(c+d*x)^3*sec(c+d*x)^2+-1*a*b^2*d^-1*cot(c+d*x)^3+-1*b*a^2*d^-1*csc(c+d*x)^3+-6*a*b^2*d^-1*cot(c+d*x)+-3*b*a^2*d^-1*csc(c+d*x)+3*a*b^2*d^-1*tan(c+d*x)+3*b*a^2*d^-1*arctanh(sin(c+d*x)))
@test integrate((a+b*sec(c+d*x))^3*csc(c+d*x)^6, x) == :(-1*a^3*d^-1*cot(c+d*x)+-7//2*b^3*d^-1*csc(c+d*x)+-7//6*b^3*d^-1*csc(c+d*x)^3+-7//10*b^3*d^-1*csc(c+d*x)^5+-2//3*a^3*d^-1*cot(c+d*x)^3+-1//5*a^3*d^-1*cot(c+d*x)^5+7//2*b^3*d^-1*arctanh(sin(c+d*x))+(1/2)*b^3*d^-1*csc(c+d*x)^5*sec(c+d*x)^2+-1*b*a^2*d^-1*csc(c+d*x)^3+-9*a*b^2*d^-1*cot(c+d*x)+-3*a*b^2*d^-1*cot(c+d*x)^3+-3*b*a^2*d^-1*csc(c+d*x)+3*a*b^2*d^-1*tan(c+d*x)+3*b*a^2*d^-1*arctanh(sin(c+d*x))+-3//5*a*b^2*d^-1*cot(c+d*x)^5+-3//5*b*a^2*d^-1*csc(c+d*x)^5)
@test integrate((a+b*sec(c+d*x))^-1*sin(c+d*x)^7, x) == :(1//7*a^-1*d^-1*cos(c+d*x)^7+-1*a^-7*d^-1*(a^2+-1*b^2)^3*cos(c+d*x)+-1//5*a^-3*d^-1*cos(c+d*x)^5*(-1*b^2+3*a^2)+-1//6*b*a^-2*d^-1*cos(c+d*x)^6+1//3*a^-5*d^-1*cos(c+d*x)^3*(b^4+3*a^4+-3*a^2*b^2)+b*a^-8*d^-1*(a^2+-1*b^2)^3*log(b+a*cos(c+d*x))+-1//2*b*a^-6*d^-1*cos(c+d*x)^2*(b^4+3*a^4+-3*a^2*b^2)+1//4*b*a^-4*d^-1*cos(c+d*x)^4*(-1*b^2+3*a^2))
@test integrate((a+b*sec(c+d*x))^-1*sin(c+d*x)^5, x) == :(-1//5*a^-1*d^-1*cos(c+d*x)^5+-1*a^-5*d^-1*(a^2+-1*b^2)^2*cos(c+d*x)+1//3*a^-3*d^-1*cos(c+d*x)^3*(-1*b^2+2*a^2)+1//4*b*a^-2*d^-1*cos(c+d*x)^4+b*a^-6*d^-1*(a^2+-1*b^2)^2*log(b+a*cos(c+d*x))+-1//2*b*a^-4*d^-1*cos(c+d*x)^2*(-1*b^2+2*a^2))
@test integrate((a+b*sec(c+d*x))^-1*sin(c+d*x)^3, x) == :(1//3*a^-1*d^-1*cos(c+d*x)^3+-1*a^-3*d^-1*(a^2+-1*b^2)*cos(c+d*x)+-1//2*b*a^-2*d^-1*cos(c+d*x)^2+b*a^-4*d^-1*(a^2+-1*b^2)*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-1*sin(c+d*x), x) == :(-1*a^-1*d^-1*cos(c+d*x)+b*a^-2*d^-1*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-1*csc(c+d*x), x) == :(d^-1*(2a+2b)^-1*log(1+-1*cos(c+d*x))+-1*d^-1*(-2b+2a)^-1*log(1+cos(c+d*x))+b*d^-1*(a^2+-1*b^2)^-1*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-1*csc(c+d*x)^3, x) == :(d^-1*(-2*b^2+2*a^2)^-1*csc(c+d*x)^2*(b+-1*a*cos(c+d*x))+-1//4*a*d^-1*(a+-1b)^-2*log(1+cos(c+d*x))+1//4*a*d^-1*(a+b)^-2*log(1+-1*cos(c+d*x))+b*a^2*d^-1*(a^2+-1*b^2)^-2*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-1*csc(c+d*x)^5, x) == :(d^-1*(-4*b^2+4*a^2)^-1*csc(c+d*x)^4*(b+-1*a*cos(c+d*x))+1//8*d^-1*(a^2+-1*b^2)^-2*csc(c+d*x)^2*(4*b*a^2+-1*a*(b^2+3*a^2)*cos(c+d*x))+b*a^4*d^-1*(a^2+-1*b^2)^-3*log(b+a*cos(c+d*x))+-1//16*a*d^-1*(a+-1b)^-3*(-1b+3a)*log(1+cos(c+d*x))+1//16*a*d^-1*(a+b)^-3*(b+3a)*log(1+-1*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-1*sin(c+d*x)^6, x) == :(1//16*x*a^-7*(-16*b^6+5*a^6+-30*a^4*b^2+40*a^2*b^4)+1//16*a^-6*d^-1*(16*b*(a^2+-1*b^2)^2+-1*a*(5*a^4+8*b^4+-14*a^2*b^2)*cos(c+d*x))*sin(c+d*x)+1//24*a^-4*d^-1*sin(c+d*x)^3*(8*b*(a^2+-1*b^2)+-1*a*(-6*b^2+5*a^2)*cos(c+d*x))+1//30*a^-2*d^-1*sin(c+d*x)^5*(6b+-5*a*cos(c+d*x))+-2*b*a^-7*d^-1*(a+b)^5//2*(a+-1b)^5//2*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-1*sin(c+d*x)^4, x) == :(1//8*x*a^-5*(3*a^4+8*b^4+-12*a^2*b^2)+1//8*a^-4*d^-1*(8*b*(a^2+-1*b^2)+-1*a*(-4*b^2+3*a^2)*cos(c+d*x))*sin(c+d*x)+1//12*a^-2*d^-1*sin(c+d*x)^3*(4b+-3*a*cos(c+d*x))+-2*b*a^-5*d^-1*(a+b)^3//2*(a+-1b)^3//2*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-1*sin(c+d*x)^2, x) == :((1/2)*x*a^-3*(a^2+-2*b^2)+(1/2)*a^-2*d^-1*(2b+-1*a*cos(c+d*x))*sin(c+d*x)+-2*b*a^-3*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-1*csc(c+d*x)^2, x) == :(d^-1*(a^2+-1*b^2)^-1*(b+-1*a*cos(c+d*x))*csc(c+d*x)+-2*a*b*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-1*csc(c+d*x)^4, x) == :(d^-1*(-3*b^2+3*a^2)^-1*csc(c+d*x)^3*(b+-1*a*cos(c+d*x))+1//3*d^-1*(a^2+-1*b^2)^-2*(3*b*a^2+-1*a*(b^2+2*a^2)*cos(c+d*x))*csc(c+d*x)+-2*b*a^3*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-1*csc(c+d*x)^6, x) == :(d^-1*(-5*b^2+5*a^2)^-1*csc(c+d*x)^5*(b+-1*a*cos(c+d*x))+1//15*d^-1*(a^2+-1*b^2)^-3*(15*b*a^4+-1*a*(-2*b^4+8*a^4+9*a^2*b^2)*cos(c+d*x))*csc(c+d*x)+1//15*d^-1*(a^2+-1*b^2)^-2*csc(c+d*x)^3*(5*b*a^2+-1*a*(b^2+4*a^2)*cos(c+d*x))+-2*b*a^5*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-2*sin(c+d*x)^7, x) == :(1//7*a^-2*d^-1*cos(c+d*x)^7+-1//3*b*a^-3*d^-1*cos(c+d*x)^6+-1//5*a^-4*d^-1*cos(c+d*x)^5*(-3*b^2+3*a^2)+1//3*a^-6*d^-1*cos(c+d*x)^3*(3*a^4+5*b^4+-9*a^2*b^2)+a^-9*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^3+(1/2)*b*a^-5*d^-1*cos(c+d*x)^4*(-2*b^2+3*a^2)+-1*a^-8*d^-1*(a^2+-1*b^2)^2*(a^2+-7*b^2)*cos(c+d*x)+-3*b*a^-7*d^-1*(a^2+-1*b^2)^2*cos(c+d*x)^2+2*b*a^-9*d^-1*(a^2+-1*b^2)^2*(a^2+-4*b^2)*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-2*sin(c+d*x)^5, x) == :(-1//5*a^-2*d^-1*cos(c+d*x)^5+(1/2)*b*a^-3*d^-1*cos(c+d*x)^4+-1*a^-6*d^-1*(a^4+5*b^4+-6*a^2*b^2)*cos(c+d*x)+1//3*a^-4*d^-1*cos(c+d*x)^3*(-3*b^2+2*a^2)+a^-7*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^2+-2*b*a^-5*d^-1*cos(c+d*x)^2*(a^2+-1*b^2)+2*b*a^-7*d^-1*(a^4+3*b^4+-4*a^2*b^2)*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-2*sin(c+d*x)^3, x) == :(1//3*a^-2*d^-1*cos(c+d*x)^3+-1*b*a^-3*d^-1*cos(c+d*x)^2+-1*a^-4*d^-1*(a^2+-3*b^2)*cos(c+d*x)+a^-5*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)+2*b*a^-5*d^-1*(a^2+-2*b^2)*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-2*sin(c+d*x), x) == :(-1*a^-2*d^-1*cos(c+d*x)+a^-3*b^2*d^-1*(b+a*cos(c+d*x))^-1+2*b*a^-3*d^-1*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-2*csc(c+d*x), x) == :((1/2)*d^-1*(a+b)^-2*log(1+-1*cos(c+d*x))+-1//2*d^-1*(a+-1b)^-2*log(1+cos(c+d*x))+a^-1*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-1+2*a*b*d^-1*(a^2+-1*b^2)^-2*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-2*csc(c+d*x)^3, x) == :((1/2)*d^-1*(a^2+-1*b^2)^-2*csc(c+d*x)^2*(-1*(a^2+b^2)*cos(c+d*x)+2*a*b)+-1//4*d^-1*(a+-1b)^-3*(a+b)*log(1+cos(c+d*x))+1//4*d^-1*(a+b)^-3*(a+-1b)*log(1+-1*cos(c+d*x))+a*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-2+2*a*b*d^-1*(a^2+-1*b^2)^-3*(a^2+b^2)*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-2*csc(c+d*x)^5, x) == :(-1//16*d^-1*(a+-1b)^-4*(-1*b^2+3*a^2+4*a*b)*log(1+cos(c+d*x))+1//4*d^-1*(a^2+-1*b^2)^-2*csc(c+d*x)^4*(-1*(a^2+b^2)*cos(c+d*x)+2*a*b)+1//8*d^-1*(a^2+-1*b^2)^-3*csc(c+d*x)^2*(-1*(b^4+3*a^4+12*a^2*b^2)*cos(c+d*x)+8*a*b*(a^2+b^2))+1//16*d^-1*(a+b)^-4*(-1*b^2+3*a^2+-4*a*b)*log(1+-1*cos(c+d*x))+a^3*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-3+2*b*a^3*d^-1*(a^2+-1*b^2)^-4*(a^2+2*b^2)*log(b+a*cos(c+d*x)))
@test integrate((a+b*sec(c+d*x))^-2*sin(c+d*x)^6, x) == :(1//16*x*a^-8*(-112*b^6+5*a^6+-90*a^4*b^2+200*a^2*b^4)+-1//3*b^-1*d^-1*(b+a*cos(c+d*x))^-1*cos(c+d*x)^3*sin(c+d*x)+-1//6*a^-1*d^-1*(b+a*cos(c+d*x))^-1*cos(c+d*x)^6*sin(c+d*x)+-1//16*a^-6*d^-1*(27*a^4+56*b^4+-86*a^2*b^2)*cos(c+d*x)*sin(c+d*x)+1//15*b*a^-7*d^-1*(61*a^4+105*b^4+-170*a^2*b^2)*sin(c+d*x)+-1//24*a^-4*b^-2*d^-1*cos(c+d*x)^3*(16*a^4+42*b^4+-61*a^2*b^2)*sin(c+d*x)+1//6*a*b^-2*d^-1*(b+a*cos(c+d*x))^-1*cos(c+d*x)^4*sin(c+d*x)+1//15*a^-5*b^-1*d^-1*cos(c+d*x)^2*(15*a^4+35*b^4+-52*a^2*b^2)*sin(c+d*x)+7//30*b*a^-2*d^-1*(b+a*cos(c+d*x))^-1*cos(c+d*x)^5*sin(c+d*x)+-2*b*a^-8*d^-1*(a+b)^3//2*(a+-1b)^3//2*(-7*b^2+2*a^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+1//10*a^-3*b^-2*d^-1*(b+a*cos(c+d*x))^-1*cos(c+d*x)^4*(5*a^4+14*b^4+-20*a^2*b^2)*sin(c+d*x))
@test integrate((a+b*sec(c+d*x))^-2*sin(c+d*x)^4, x) == :(1//8*x*a^-6*(3*a^4+40*b^4+-36*a^2*b^2)+1//4*a^-2*d^-1*cos(c+d*x)^3*sin(c+d*x)+-1//8*a^-4*d^-1*(-20*b^2+13*a^2)*cos(c+d*x)*sin(c+d*x)+1//3*b*a^-5*d^-1*(-15*b^2+11*a^2)*sin(c+d*x)+1//3*a^-3*b^-1*d^-1*cos(c+d*x)^2*(-5*b^2+3*a^2)*sin(c+d*x)+-1*a^-2*b^-1*d^-1*(b+a*cos(c+d*x))^-1*cos(c+d*x)^3*(a^2+-1*b^2)*sin(c+d*x)+-2*b*a^-6*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*(-5*b^2+2*a^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-2*sin(c+d*x)^2, x) == :((1/2)*x*a^-4*(a^2+-6*b^2)+3*b*a^-3*d^-1*sin(c+d*x)+-3//2*a^-2*d^-1*cos(c+d*x)*sin(c+d*x)+a^-1*d^-1*(b+a*cos(c+d*x))^-1*cos(c+d*x)^2*sin(c+d*x)+-2*b*a^-4*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(-3*b^2+2*a^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-2*csc(c+d*x)^2, x) == :((1/2)*d^-1*(1+cos(c+d*x))^-1*(a+-1b)^-2*sin(c+d*x)+-1//2*d^-1*(1+-1*cos(c+d*x))^-1*(a+b)^-2*sin(c+d*x)+-2*b^3*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+a*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*sin(c+d*x)+-4*b*a^2*d^-1*(a+b)^-5//2*(a+-1b)^-5//2*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-2*csc(c+d*x)^4, x) == :(-1//12*d^-1*(1+-1*cos(c+d*x))^-1*(a+b)^-2*sin(c+d*x)+-1//12*d^-1*(1+-1*cos(c+d*x))^-2*(a+b)^-2*sin(c+d*x)+1//12*d^-1*(1+cos(c+d*x))^-1*(a+-1b)^-2*sin(c+d*x)+1//12*d^-1*(1+cos(c+d*x))^-2*(a+-1b)^-2*sin(c+d*x)+-1//4*d^-1*(1+-1*cos(c+d*x))^-1*(a+b)^-3*(a+-1b)*sin(c+d*x)+1//4*d^-1*(1+cos(c+d*x))^-1*(a+-1b)^-3*(a+b)*sin(c+d*x)+a^3*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*sin(c+d*x)+-2*a^2*b^3*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-4*b*a^2*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(a^2+b^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-3*sin(c+d*x)^7, x) == :(1//7*a^-3*d^-1*cos(c+d*x)^7+a^-7*d^-1*cos(c+d*x)^3*(a^4+5*b^4+-6*a^2*b^2)+-1*a^-9*d^-1*(a^6+-28*b^6+-18*a^4*b^2+45*a^2*b^4)*cos(c+d*x)+-1//2*b*a^-4*d^-1*cos(c+d*x)^6+-1//5*a^-5*d^-1*cos(c+d*x)^5*(-6*b^2+3*a^2)+-3//2*b*a^-8*d^-1*cos(c+d*x)^2*(3*a^4+7*b^4+-10*a^2*b^2)+-1//2*a^-10*b^3*d^-1*(b+a*cos(c+d*x))^-2*(a^2+-1*b^2)^3+1//4*b*a^-6*d^-1*cos(c+d*x)^4*(-10*b^2+9*a^2)+3*b*a^-10*d^-1*(a^2+-1*b^2)*(a^4+12*b^4+-9*a^2*b^2)*log(b+a*cos(c+d*x))+3*a^-10*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^2*(a^2+-3*b^2))
@test integrate((a+b*sec(c+d*x))^-3*sin(c+d*x)^5, x) == :(-1//5*a^-3*d^-1*cos(c+d*x)^5+-1*a^-7*d^-1*(a^4+15*b^4+-12*a^2*b^2)*cos(c+d*x)+1//3*a^-5*d^-1*cos(c+d*x)^3*(-6*b^2+2*a^2)+3//4*b*a^-4*d^-1*cos(c+d*x)^4+b*a^-8*d^-1*(3*a^4+21*b^4+-20*a^2*b^2)*log(b+a*cos(c+d*x))+a^-8*b^2*d^-1*(b+a*cos(c+d*x))^-1*(3*a^4+7*b^4+-10*a^2*b^2)+-1*b*a^-6*d^-1*cos(c+d*x)^2*(-5*b^2+3*a^2)+-1//2*a^-8*b^3*d^-1*(b+a*cos(c+d*x))^-2*(a^2+-1*b^2)^2)
@test integrate((a+b*sec(c+d*x))^-3*sin(c+d*x)^3, x) == :(1//3*a^-3*d^-1*cos(c+d*x)^3+-1*a^-5*d^-1*(a^2+-6*b^2)*cos(c+d*x)+-3//2*b*a^-4*d^-1*cos(c+d*x)^2+b*a^-6*d^-1*(-10*b^2+3*a^2)*log(b+a*cos(c+d*x))+a^-6*b^2*d^-1*(b+a*cos(c+d*x))^-1*(-5*b^2+3*a^2)+-1//2*a^-6*b^3*d^-1*(b+a*cos(c+d*x))^-2*(a^2+-1*b^2))
@test integrate((a+b*sec(c+d*x))^-3*sin(c+d*x), x) == :(-1*a^-3*d^-1*cos(c+d*x)+3*b*a^-4*d^-1*log(b+a*cos(c+d*x))+3*a^-4*b^2*d^-1*(b+a*cos(c+d*x))^-1+-1//2*a^-4*b^3*d^-1*(b+a*cos(c+d*x))^-2)
@test integrate((a+b*sec(c+d*x))^-3*csc(c+d*x), x) == :((1/2)*d^-1*(a+b)^-3*log(1+-1*cos(c+d*x))+-1//2*d^-1*(a+-1b)^-3*log(1+cos(c+d*x))+b*d^-1*(a^2+-1*b^2)^-3*(b^2+3*a^2)*log(b+a*cos(c+d*x))+-1//2*a^-2*b^3*d^-1*(b+a*cos(c+d*x))^-2*(a^2+-1*b^2)^-1+a^-2*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-2*(-1*b^2+3*a^2))
@test integrate((a+b*sec(c+d*x))^-3*csc(c+d*x)^3, x) == :((1/2)*d^-1*(a^2+-1*b^2)^-3*csc(c+d*x)^2*(b*(b^2+3*a^2)+-1*a*(a^2+3*b^2)*cos(c+d*x))+-1//2*b^3*d^-1*(b+a*cos(c+d*x))^-2*(a^2+-1*b^2)^-2+-1//4*d^-1*(a+-1b)^-4*(a+2b)*log(1+cos(c+d*x))+1//4*d^-1*(a+b)^-4*(a+-2b)*log(1+-1*cos(c+d*x))+b*d^-1*(a^2+-1*b^2)^-4*(b^4+3*a^4+8*a^2*b^2)*log(b+a*cos(c+d*x))+b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(b^2+3*a^2))
@test integrate((a+b*sec(c+d*x))^-3*csc(c+d*x)^5, x) == :(1//4*d^-1*(a^2+-1*b^2)^-3*csc(c+d*x)^4*(b*(b^2+3*a^2)+-1*a*(a^2+3*b^2)*cos(c+d*x))+1//8*d^-1*(a^2+-1*b^2)^-4*csc(c+d*x)^2*(4*b*(b^4+3*a^4+8*a^2*b^2)+-3*a*(a^4+5*b^4+10*a^2*b^2)*cos(c+d*x))+-3//16*a*d^-1*(a+-1b)^-5*(a+3b)*log(1+cos(c+d*x))+-1//2*a^2*b^3*d^-1*(b+a*cos(c+d*x))^-2*(a^2+-1*b^2)^-3+3//16*a*d^-1*(a+b)^-5*(a+-3b)*log(1+-1*cos(c+d*x))+3*b*a^2*d^-1*(a^2+-1*b^2)^-5*(a^4+2*b^4+5*a^2*b^2)*log(b+a*cos(c+d*x))+3*a^2*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-4*(a^2+b^2))
@test integrate((a+b*sec(c+d*x))^-3*sin(c+d*x)^6, x) == :(1//16*x*a^-9*(-448*b^6+5*a^6+-180*a^4*b^2+600*a^2*b^4)+-1//4*b^-1*d^-1*(b+a*cos(c+d*x))^-2*cos(c+d*x)^4*sin(c+d*x)+-1//6*a^-1*d^-1*(b+a*cos(c+d*x))^-2*cos(c+d*x)^7*sin(c+d*x)+-1//16*a^-7*d^-1*(43*a^4+224*b^4+-244*a^2*b^2)*cos(c+d*x)*sin(c+d*x)+1//30*b*a^-8*d^-1*(213*a^4+840*b^4+-985*a^2*b^2)*sin(c+d*x)+-1//24*a^-5*b^-2*d^-1*cos(c+d*x)^3*(24*a^4+168*b^4+-169*a^2*b^2)*sin(c+d*x)+1//10*a*b^-2*d^-1*(b+a*cos(c+d*x))^-2*cos(c+d*x)^5*sin(c+d*x)+1//30*a^-6*b^-1*d^-1*cos(c+d*x)^2*(45*a^4+280*b^4+-291*a^2*b^2)*sin(c+d*x)+4//15*b*a^-2*d^-1*(b+a*cos(c+d*x))^-2*cos(c+d*x)^6*sin(c+d*x)+-1*b*a^-9*d^-1*(a+b)^(1/2)*(a+-1b)^(1/2)*(6*a^4+56*b^4+-47*a^2*b^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+1//20*a^-4*b^-2*d^-1*(b+a*cos(c+d*x))^-1*cos(c+d*x)^4*(15*a^4+112*b^4+-110*a^2*b^2)*sin(c+d*x)+1//60*a^-3*b^-2*d^-1*(b+a*cos(c+d*x))^-2*cos(c+d*x)^5*(9*a^4+56*b^4+-60*a^2*b^2)*sin(c+d*x))
@test integrate((a+b*sec(c+d*x))^-3*sin(c+d*x)^4, x) == :(1//8*x*a^-7*(3*a^4+120*b^4+-72*a^2*b^2)+(1/2)*b*a^-6*d^-1*(-30*b^2+13*a^2)*sin(c+d*x)+-1//8*a^-5*d^-1*(-60*b^2+21*a^2)*cos(c+d*x)*sin(c+d*x)+(1/2)*a^-4*b^-1*d^-1*cos(c+d*x)^2*(-10*b^2+3*a^2)*sin(c+d*x)+-1//4*a^-3*b^-2*d^-1*cos(c+d*x)^3*(-15*b^2+4*a^2)*sin(c+d*x)+(1/2)*a^-2*b^-2*d^-1*(b+a*cos(c+d*x))^-1*cos(c+d*x)^4*(-7*b^2+2*a^2)*sin(c+d*x)+-3*b*a^-7*d^-1*(a+b)^-1//2*(a+-1b)^-1//2*(2*a^4+10*b^4+-11*a^2*b^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-1//2*a^-2*b^-1*d^-1*(b+a*cos(c+d*x))^-2*cos(c+d*x)^4*(a^2+-1*b^2)*sin(c+d*x))
@test integrate((a+b*sec(c+d*x))^-3*sin(c+d*x)^2, x) == :((1/2)*x*a^-5*(a^2+-12*b^2)+(1/2)*a^-1*d^-1*(b+a*cos(c+d*x))^-2*cos(c+d*x)^3*sin(c+d*x)+(1/2)*b*a^-4*d^-1*(a^2+-1*b^2)^-1*(-12*b^2+11*a^2)*sin(c+d*x)+-1//2*a^-3*d^-1*(a^2+-1*b^2)^-1*(-6*b^2+5*a^2)*cos(c+d*x)*sin(c+d*x)+(1/2)*a^-2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-1*cos(c+d*x)^2*(-4*b^2+3*a^2)*sin(c+d*x)+-1*b*a^-5*d^-1*(a+b)^-3//2*(a+-1b)^-3//2*(6*a^4+12*b^4+-19*a^2*b^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-3*csc(c+d*x)^2, x) == :((1/2)*d^-1*(1+cos(c+d*x))^-1*(a+-1b)^-3*sin(c+d*x)+-1//2*d^-1*(1+-1*cos(c+d*x))^-1*(a+b)^-3*sin(c+d*x)+-1//2*b^3*d^-1*(b+a*cos(c+d*x))^-2*(a^2+-1*b^2)^-2*sin(c+d*x)+3//2*b^4*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*sin(c+d*x)+b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-3*(-1*b^2+3*a^2)*sin(c+d*x)+-1*a^-1*b^3*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(a^2+2*b^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-2*a*b*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(b^2+3*a^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-2*a^-1*b^3*d^-1*(a+b)^-7//2*(a+-1b)^-7//2*(-1*b^2+3*a^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(c+d*x))^-3*csc(c+d*x)^4, x) == :(-1//12*d^-1*(1+-1*cos(c+d*x))^-1*(a+b)^-3*sin(c+d*x)+-1//12*d^-1*(1+-1*cos(c+d*x))^-2*(a+b)^-3*sin(c+d*x)+1//12*d^-1*(1+cos(c+d*x))^-1*(a+-1b)^-3*sin(c+d*x)+1//12*d^-1*(1+cos(c+d*x))^-2*(a+-1b)^-3*sin(c+d*x)+-1//4*d^-1*(1+-1*cos(c+d*x))^-1*(a+b)^-4*(a+-2b)*sin(c+d*x)+1//4*d^-1*(1+cos(c+d*x))^-1*(a+-1b)^-4*(a+2b)*sin(c+d*x)+-1//2*a^2*b^3*d^-1*(b+a*cos(c+d*x))^-2*(a^2+-1*b^2)^-3*sin(c+d*x)+3//2*a^2*b^4*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-4*sin(c+d*x)+a^2*b^2*d^-1*(b+a*cos(c+d*x))^-1*(a^2+-1*b^2)^-4*(b^2+3*a^2)*sin(c+d*x)+-1*a*b^3*d^-1*(a+b)^-9//2*(a+-1b)^-9//2*(a^2+2*b^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-2*a*b*d^-1*(a+b)^-9//2*(a+-1b)^-9//2*(b^4+3*a^4+8*a^2*b^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x))+-2*a*b^3*d^-1*(a+b)^-9//2*(a+-1b)^-9//2*(b^2+3*a^2)*arctanh((a+b)^-1//2*(a+-1b)^(1/2)*tan((1/2)*c+(1/2)*d*x)))
@test integrate((a+b*sec(e+f*x))^(1/2)*csc(e+f*x)^2, x) == :(-1*f^-1*(a+b*sec(e+f*x))^(1/2)*cot(e+f*x)+f^-1*(b*(a+b)^-1*(1+-1*sec(e+f*x)))^(1/2)*(-1*b*(a+-1b)^-1*(1+sec(e+f*x)))^(1/2)*(a+b)^(1/2)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*sec(e+f*x))^(1/2)),(a+-1b)^-1*(a+b))*cot(e+f*x))
@test integrate((a+b*sec(e+f*x))^3//2*csc(e+f*x)^2, x) == :(-1*f^-1*(a+b*sec(e+f*x))^3//2*cot(e+f*x)+f^-1*(b*(a+b)^-1*(1+-1*sec(e+f*x)))^(1/2)*(-1*b*(a+-1b)^-1*(1+sec(e+f*x)))^(1/2)*(a+b)^(1/2)*(-3b+3a)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*sec(e+f*x))^(1/2)),(a+-1b)^-1*(a+b))*cot(e+f*x)+-1*f^-1*(b*(a+b)^-1*(1+-1*sec(e+f*x)))^(1/2)*(-1*b*(a+-1b)^-1*(1+sec(e+f*x)))^(1/2)*(a+b)^(1/2)*(-3b+3a)*Elliptic.E(arcsin((a+b)^-1//2*(a+b*sec(e+f*x))^(1/2)),(a+-1b)^-1*(a+b))*cot(e+f*x))
@test integrate((a+b*sec(e+f*x))^-1//2*csc(e+f*x)^2, x) == :(-1*f^-1*(a+b*sec(e+f*x))^-1//2*cot(e+f*x)+b^2*f^-1*(a+b*sec(e+f*x))^-1//2*(a^2+-1*b^2)^-1*tan(e+f*x)+f^-1*(b*(a+b)^-1*(1+-1*sec(e+f*x)))^(1/2)*(-1*b*(a+-1b)^-1*(1+sec(e+f*x)))^(1/2)*(a+b)^-1//2*Elliptic.E(arcsin((a+b)^-1//2*(a+b*sec(e+f*x))^(1/2)),(a+-1b)^-1*(a+b))*cot(e+f*x)+-1*f^-1*(b*(a+b)^-1*(1+-1*sec(e+f*x)))^(1/2)*(-1*b*(a+-1b)^-1*(1+sec(e+f*x)))^(1/2)*(a+b)^-1//2*Elliptic.F(arcsin((a+b)^-1//2*(a+b*sec(e+f*x))^(1/2)),(a+-1b)^-1*(a+b))*cot(e+f*x))
@test integrate((a+b*sec(e+f*x))^-3//2*csc(e+f*x)^2, x) == :(-1*f^-1*(a+b*sec(e+f*x))^-3//2*cot(e+f*x)+b^2*f^-1*(a+b*sec(e+f*x))^-3//2*(a^2+-1*b^2)^-1*tan(e+f*x)+4*a*b^2*f^-1*(a+b*sec(e+f*x))^-1//2*(a^2+-1*b^2)^-2*tan(e+f*x)+-1*f^-1*(b*(a+b)^-1*(1+-1*sec(e+f*x)))^(1/2)*(-1*b*(a+-1b)^-1*(1+sec(e+f*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*(-1b+3a)*Elliptic.F(arcsin((a+b)^-1//2*(a+b*sec(e+f*x))^(1/2)),(a+-1b)^-1*(a+b))*cot(e+f*x)+4*a*f^-1*(b*(a+b)^-1*(1+-1*sec(e+f*x)))^(1/2)*(-1*b*(a+-1b)^-1*(1+sec(e+f*x)))^(1/2)*(a+b)^-3//2*(a+-1b)^-1*Elliptic.E(arcsin((a+b)^-1//2*(a+b*sec(e+f*x))^(1/2)),(a+-1b)^-1*(a+b))*cot(e+f*x))
@test integrate((e*csc(c+d*x))^5//2*(a+a*sec(c+d*x)), x) == :(-2//3*a*d^-1*e^2*(e*csc(c+d*x))^(1/2)*cot(c+d*x)+-2//3*a*d^-1*e^2*(e*csc(c+d*x))^(1/2)*csc(c+d*x)+a*d^-1*e^2*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctan(sin(c+d*x)^(1/2))+a*d^-1*e^2*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctanh(sin(c+d*x)^(1/2))+2//3*a*d^-1*e^2*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^3//2*(a+a*sec(c+d*x)), x) == :(-2*a*e*d^-1*(e*csc(c+d*x))^(1/2)+-2*a*e*d^-1*(e*csc(c+d*x))^(1/2)*cos(c+d*x)+a*e*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctanh(sin(c+d*x)^(1/2))+-1*a*e*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctan(sin(c+d*x)^(1/2))+-2*a*e*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^(1/2)*(a+a*sec(c+d*x)), x) == :(a*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctan(sin(c+d*x)^(1/2))+a*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctanh(sin(c+d*x)^(1/2))+2*a*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-1//2*(a+a*sec(c+d*x)), x) == :(a*d^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctanh(sin(c+d*x)^(1/2))+-1*a*d^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctan(sin(c+d*x)^(1/2))+2*a*d^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-3//2*(a+a*sec(c+d*x)), x) == :(-2*a*d^-1*e^-1*(e*csc(c+d*x))^-1//2+-2//3*a*d^-1*e^-1*(e*csc(c+d*x))^-1//2*cos(c+d*x)+a*d^-1*e^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctan(sin(c+d*x)^(1/2))+a*d^-1*e^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctanh(sin(c+d*x)^(1/2))+2//3*a*d^-1*e^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-5//2*(a+a*sec(c+d*x)), x) == :(-2//3*a*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)+a*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctanh(sin(c+d*x)^(1/2))+-1*a*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctan(sin(c+d*x)^(1/2))+-2//5*a*d^-1*e^-2*(e*csc(c+d*x))^-1//2*cos(c+d*x)*sin(c+d*x)+6//5*a*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^5//2*(a+a*sec(c+d*x))^2, x) == :(-4//3*a^2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*csc(c+d*x)+-2//3*a^2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*cot(c+d*x)+5//3*a^2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*tan(c+d*x)+2*a^2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctan(sin(c+d*x)^(1/2))+2*a^2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctanh(sin(c+d*x)^(1/2))+-2//3*a^2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*csc(c+d*x)*sec(c+d*x)+7//3*a^2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^3//2*(a+a*sec(c+d*x))^2, x) == :(-4*e*a^2*d^-1*(e*csc(c+d*x))^(1/2)+-2*e*a^2*d^-1*(e*csc(c+d*x))^(1/2)*cos(c+d*x)+-2*e*a^2*d^-1*(e*csc(c+d*x))^(1/2)*sec(c+d*x)+-5*e*a^2*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2)+-2*e*a^2*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctan(sin(c+d*x)^(1/2))+2*e*a^2*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctanh(sin(c+d*x)^(1/2))+3*e*a^2*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)*tan(c+d*x))
@test integrate((e*csc(c+d*x))^(1/2)*(a+a*sec(c+d*x))^2, x) == :(a^2*d^-1*(e*csc(c+d*x))^(1/2)*tan(c+d*x)+2*a^2*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctan(sin(c+d*x)^(1/2))+2*a^2*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*arctanh(sin(c+d*x)^(1/2))+3*a^2*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-1//2*(a+a*sec(c+d*x))^2, x) == :(a^2*d^-1*(e*csc(c+d*x))^-1//2*tan(c+d*x)+a^2*d^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2)+-2*a^2*d^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctan(sin(c+d*x)^(1/2))+2*a^2*d^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctanh(sin(c+d*x)^(1/2)))
@test integrate((e*csc(c+d*x))^-3//2*(a+a*sec(c+d*x))^2, x) == :(-4*a^2*d^-1*e^-1*(e*csc(c+d*x))^-1//2+a^2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*sec(c+d*x)+-2//3*a^2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*cos(c+d*x)+2*a^2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctan(sin(c+d*x)^(1/2))+2*a^2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctanh(sin(c+d*x)^(1/2))+-1//3*a^2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-5//2*(a+a*sec(c+d*x))^2, x) == :(a^2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*tan(c+d*x)+-4//3*a^2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)+-2*a^2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctan(sin(c+d*x)^(1/2))+2*a^2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*arctanh(sin(c+d*x)^(1/2))+-9//5*a^2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2)+-2//5*a^2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*cos(c+d*x)*sin(c+d*x))
@test integrate((e*csc(c+d*x))^5//2*(a+a*sec(c+d*x))^-1, x) == :(-4//21*a^-1*d^-1*e^2*(e*csc(c+d*x))^(1/2)*cot(c+d*x)+-2//7*a^-1*d^-1*e^2*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^3+2//7*a^-1*d^-1*e^2*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^2*cot(c+d*x)+4//21*a^-1*d^-1*e^2*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^3//2*(a+a*sec(c+d*x))^-1, x) == :(-4//5*e*a^-1*d^-1*(e*csc(c+d*x))^(1/2)*cos(c+d*x)+-2//5*e*a^-1*d^-1*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^2+-4//5*e*a^-1*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2)+2//5*e*a^-1*d^-1*(e*csc(c+d*x))^(1/2)*cot(c+d*x)*csc(c+d*x))
@test integrate((e*csc(c+d*x))^(1/2)*(a+a*sec(c+d*x))^-1, x) == :(-2//3*a^-1*d^-1*(e*csc(c+d*x))^(1/2)*csc(c+d*x)+2//3*a^-1*d^-1*(e*csc(c+d*x))^(1/2)*cot(c+d*x)+4//3*a^-1*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-1//2*(a+a*sec(c+d*x))^-1, x) == :(-2*a^-1*d^-1*(e*csc(c+d*x))^-1//2*csc(c+d*x)+2*a^-1*d^-1*(e*csc(c+d*x))^-1//2*cot(c+d*x)+4*a^-1*d^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-3//2*(a+a*sec(c+d*x))^-1, x) == :(2*a^-1*d^-1*e^-1*(e*csc(c+d*x))^-1//2+-2//3*a^-1*d^-1*e^-1*(e*csc(c+d*x))^-1//2*cos(c+d*x)+-4//3*a^-1*d^-1*e^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-5//2*(a+a*sec(c+d*x))^-1, x) == :(2//3*a^-1*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)+-4//5*a^-1*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2)+-2//5*a^-1*d^-1*e^-2*(e*csc(c+d*x))^-1//2*cos(c+d*x)*sin(c+d*x))
@test integrate((e*csc(c+d*x))^-7//2*(a+a*sec(c+d*x))^-1, x) == :(-2//21*a^-1*d^-1*e^-3*(e*csc(c+d*x))^-1//2*cos(c+d*x)+2//5*a^-1*d^-1*e^-3*(e*csc(c+d*x))^-1//2*sin(c+d*x)^2+2//7*a^-1*d^-1*e^-3*(e*csc(c+d*x))^-1//2*cos(c+d*x)^3+-4//21*a^-1*d^-1*e^-3*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^5//2*(a+a*sec(c+d*x))^-2, x) == :(-4//7*a^-2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^3+-4//231*a^-2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*cot(c+d*x)+4//11*a^-2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^5+-2//11*a^-2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*cot(c+d*x)^3*csc(c+d*x)^2+-2//11*a^-2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^4*cot(c+d*x)+4//231*a^-2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2)+16//77*a^-2*d^-1*e^2*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^2*cot(c+d*x))
@test integrate((e*csc(c+d*x))^3//2*(a+a*sec(c+d*x))^-2, x) == :(-4//5*e*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^2+-4//15*e*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*cos(c+d*x)+4//9*e*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^4+-4//15*e*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2)+-2//9*e*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*cot(c+d*x)^3*csc(c+d*x)+-2//9*e*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^3*cot(c+d*x)+16//45*e*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*cot(c+d*x)*csc(c+d*x))
@test integrate((e*csc(c+d*x))^(1/2)*(a+a*sec(c+d*x))^-2, x) == :(-4//3*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*csc(c+d*x)+-2//7*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*cot(c+d*x)^3+4//7*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^3+16//21*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*cot(c+d*x)+-2//7*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*csc(c+d*x)^2*cot(c+d*x)+20//21*a^-2*d^-1*(e*csc(c+d*x))^(1/2)*sin(c+d*x)^(1/2)*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-1//2*(a+a*sec(c+d*x))^-2, x) == :(-4*a^-2*d^-1*(e*csc(c+d*x))^-1//2*csc(c+d*x)+-2//5*a^-2*d^-1*(e*csc(c+d*x))^-1//2*cot(c+d*x)^3+4//5*a^-2*d^-1*(e*csc(c+d*x))^-1//2*csc(c+d*x)^3+16//5*a^-2*d^-1*(e*csc(c+d*x))^-1//2*cot(c+d*x)+-2//5*a^-2*d^-1*(e*csc(c+d*x))^-1//2*csc(c+d*x)^2*cot(c+d*x)+28//5*a^-2*d^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2))
@test integrate((e*csc(c+d*x))^-3//2*(a+a*sec(c+d*x))^-2, x) == :(4*a^-2*d^-1*e^-1*(e*csc(c+d*x))^-1//2+-4//3*a^-2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*cos(c+d*x)+4//3*a^-2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*csc(c+d*x)^2+-4*a^-2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2)+-2//3*a^-2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*cot(c+d*x)^2*cos(c+d*x)+-2//3*a^-2*d^-1*e^-1*(e*csc(c+d*x))^-1//2*cot(c+d*x)*csc(c+d*x))
@test integrate((e*csc(c+d*x))^-5//2*(a+a*sec(c+d*x))^-2, x) == :(-2*a^-2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*cot(c+d*x)+4*a^-2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*csc(c+d*x)+4//3*a^-2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)+-2*a^-2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*cos(c+d*x)^2*cot(c+d*x)+-44//5*a^-2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.E((1/2)*c+-1//4*pi+(1/2)*d*x,2)+-12//5*a^-2*d^-1*e^-2*(e*csc(c+d*x))^-1//2*cos(c+d*x)*sin(c+d*x))
@test integrate((e*csc(c+d*x))^-7//2*(a+a*sec(c+d*x))^-2, x) == :(-4*a^-2*d^-1*e^-3*(e*csc(c+d*x))^-1//2+2//7*a^-2*d^-1*e^-3*(e*csc(c+d*x))^-1//2*cos(c+d*x)^3+4//5*a^-2*d^-1*e^-3*(e*csc(c+d*x))^-1//2*sin(c+d*x)^2+26//21*a^-2*d^-1*e^-3*(e*csc(c+d*x))^-1//2*cos(c+d*x)+52//21*a^-2*d^-1*e^-3*(e*csc(c+d*x))^-1//2*sin(c+d*x)^-1//2*Elliptic.F((1/2)*c+-1//4*pi+(1/2)*d*x,2))

max_stars_repo_path: test/4 Trig functions/4.5 Secant/4.5.1.3 (d sin)^n (a+b sec)^m.jl


text:
using DashBootstrapComponents, DashHtmlComponents

items = [
    dbc_dropdownmenuitem("First"),
    dbc_dropdownmenuitem(divider=true),
    dbc_dropdownmenuitem("Second"),
];

dropdown = html_div([
    dbc_dropdownmenu(
        label="large dropdown",
        bs_size="lg",
        children=items,
        className="mb-3",
    ),
    dbc_dropdownmenu(label="normal dropdown", children=items, className="mb-3"),
    dbc_dropdownmenu(label="small dropdown", bs_size="sm", children=items),
])
;

ext: jl

max_stars_repo_name: harisbal/dash-bootstrap-components

max_issues_repo_name: harisbal/dash-bootstrap-components

max_forks_repo_name: harisbal/dash-bootstrap-components


text:
# Example 3.25, 3.35 and 3.38 of
# Blekherman, G., Parrilo, P. A., & Thomas, R. R. (Eds.).
# Semidefinite optimization and convex algebraic geometry SIAM 2013
@testset "Example 3.25 with $(factory.constructor)" for factory in sdp_factories
    @polyvar x y
    m = SOSModel(factory)
    @constraint m x^2-x*y^2+y^4+1 >= 0
    JuMP.optimize!(m)
    @test JuMP.primal_status(m) == MOI.FeasiblePoint
end
@testset "Example 3.35 with $(factory.constructor)" for factory in sdp_factories
    @polyvar x
    m = SOSModel(factory)
    @constraint m x^4+4x^3+6x^2+4x+5 in SOSCone() # equivalent to >= 0
    JuMP.optimize!(m)
    @test JuMP.primal_status(m) == MOI.FeasiblePoint
    # p(x) = (x^2+2x)^2 + 2(1+x)^2 + 3
end
@testset "Example 3.38 with $(factory.constructor)" for factory in sdp_factories
    @polyvar x y
    m = SOSModel(factory)
    @constraint m 2x^4 + 5y^4 - x^2*y^2 >= -2(x^3*y + x + 1)
    JuMP.optimize!(m)
    @test JuMP.primal_status(m) == MOI.FeasiblePoint
    # p(x) = (x^2+2x)^2 + 2(1+x)^2 + 3
end