import sys
from sympy.external import import_module
matchpy = import_module("matchpy")

if not matchpy:
    #bin/test will not execute any tests now
    disabled = True

if sys.version_info[:2] < (3, 6):
    disabled = True

from sympy.integrals.rubi.utility_function import (
        sympy_op_factory, Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ,
        ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ,
        PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ,
        ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ,
        NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart,
        FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest,
        SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient,
        Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart,
        IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan,
        ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec,
        ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less,
        Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ,
        PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ,
        ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ,
        Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ,
        SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator,
        NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ,
        InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ,
        EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree,
        PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts,
        TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ,
        NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll,
        ExpandLinearProduct, GCD, ContentFactor, NumericFactor,
        NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst,
        ExpandExpression, Apart, SmartApart, MatchQ,
        PolynomialQuotientRemainder, FreeFactors, NonfreeFactors,
        RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms,
        ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup,
        AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor,
        RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon,
        MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ,
        GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList,
        PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ,
        RationalFunctionFactors, NonrationalFunctionFactors, Reverse,
        RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand,
        SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree,
        CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree,
        GeneralizedBinomialParts, GeneralizedTrinomialDegree,
        GeneralizedTrinomialParts, MonomialQ, MonomialSumQ,
        MinimumMonomialExponent, MonomialExponent, LinearMatchQ,
        PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ,
        TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ,
        QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms,
        NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial,
        PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD,
        AlgebraicFunctionFactors, NonalgebraicFunctionFactors,
        QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ,
        Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors,
        NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop,
        CombineExponents, FactorInteger, FactorAbsurdNumber,
        SubstForInverseFunction, SubstForFractionalPower,
        SubstForFractionalPowerOfQuotientOfLinears,
        FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ,
        SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ,
        FractionalPowerSubexpressionQ, Apply, FactorNumericGcd,
        MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ,
        TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest,
        OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors,
        PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn,
        PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree,
        FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify,
        FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand,
        NormalizeIntegrandAux, NormalizeIntegrandFactor,
        NormalizeIntegrandFactorBase, NormalizeTogether,
        NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors,
        SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm,
        TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum,
        UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear,
        PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ,
        IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor,
        FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ,
        FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator,
        SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand,
        SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM,
        SubstForFractionalPowerOfLinear, FractionalPowerOfLinear,
        InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig,
        FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ,
        PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ,
        KnownTangentIntegrandQ, KnownCotangentIntegrandQ,
        KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst,
        AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand,
        ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp,
        ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ,
        FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ,
        PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ,
        FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ,
        FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ,
        FunctionOfLog, PowerVariableExpn, PowerVariableDegree,
        PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic,
        SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ,
        Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ,
        SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2,
        ConstantFactor, SameQ, ReplacePart, CommonFactors,
        MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential,
        FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux,
        FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev,
        rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent,
        RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct,
        SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma,
        FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ,
        _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify,
        _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum,
        _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux,
        TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor,
        PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral,
        CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial,
        Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ
    )
from sympy.core.add import Add
from sympy.core.mod import Mod
from sympy.core.mul import Mul
from sympy.core.numbers import (Float, I, Integer)
from sympy.core.power import Pow
from sympy.core.singleton import S
from sympy.functions.elementary.complexes import Abs
from sympy.functions.elementary.miscellaneous import sqrt
from sympy.integrals.integrals import Integral
from sympy.logic.boolalg import (And, Or)
from sympy.simplify.simplify import simplify
from sympy.integrals.rubi.symbol import WC
from sympy.core.symbol import symbols, Symbol
from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf, exp, log)
from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch)
from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec)
from sympy.integrals.rubi.rubimain import rubi_integrate
from sympy.core.numbers import pi as Pi
a, b, c, d, e, f, m, n, x, u , k, p, r, s, t, i, j= symbols('a b c d e f m n x u k p r s t i j')
A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F', )


def test_1():

    assert rubi_test(rubi_integrate(sec(a + b*x), x), x, atanh(sin(a + b*x))/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**S(2), x), x, tan(a + b*x)/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**S(3), x), x, tan(a + b*x)*sec(a + b*x)/(S(2)*b) + atanh(sin(a + b*x))/(S(2)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**S(4), x), x, tan(a + b*x)**S(3)/(S(3)*b) + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**S(5), x), x, tan(a + b*x)*sec(a + b*x)**S(3)/(S(4)*b) + S(3)*tan(a + b*x)*sec(a + b*x)/(S(8)*b) + S(3)*atanh(sin(a + b*x))/(S(8)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**S(6), x), x, tan(a + b*x)**S(5)/(S(5)*b) + S(2)*tan(a + b*x)**S(3)/(S(3)*b) + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**S(7), x), x, tan(a + b*x)*sec(a + b*x)**S(5)/(S(6)*b) + S(5)*tan(a + b*x)*sec(a + b*x)**S(3)/(S(24)*b) + S(5)*tan(a + b*x)*sec(a + b*x)/(S(16)*b) + S(5)*atanh(sin(a + b*x))/(S(16)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**S(8), x), x, tan(a + b*x)**S(7)/(S(7)*b) + S(3)*tan(a + b*x)**S(5)/(S(5)*b) + tan(a + b*x)**S(3)/b + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(7)/2), x), x, -S(6)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(5)*b) + S(2)*sin(a + b*x)*sec(a + b*x)**(S(5)/2)/(S(5)*b) + S(6)*sin(a + b*x)*sqrt(sec(a + b*x))/(S(5)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(5)/2), x), x, S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(3)*b) + S(2)*sin(a + b*x)*sec(a + b*x)**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(3)/2), x), x, -S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/b + S(2)*sin(a + b*x)*sqrt(sec(a + b*x))/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(sec(a + b*x)), x), x, S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/sqrt(sec(a + b*x)), x), x, S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-3)/2), x), x, S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(3)*b) + S(2)*sin(a + b*x)/(S(3)*b*sqrt(sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-5)/2), x), x, S(6)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(5)*b) + S(2)*sin(a + b*x)/(S(5)*b*sec(a + b*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-7)/2), x), x, S(10)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(21)*b) + S(10)*sin(a + b*x)/(S(21)*b*sqrt(sec(a + b*x))) + S(2)*sin(a + b*x)/(S(7)*b*sec(a + b*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(7)/2), x), x, -S(6)*c**S(4)*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))) + S(6)*c**S(3)*sqrt(c*sec(a + b*x))*sin(a + b*x)/(S(5)*b) + S(2)*c*(c*sec(a + b*x))**(S(5)/2)*sin(a + b*x)/(S(5)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2), x), x, S(2)*c**S(2)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b) + S(2)*c*(c*sec(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*c**S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))) + S(2)*c*sqrt(c*sec(a + b*x))*sin(a + b*x)/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x)), x), x, S(2)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/sqrt(c*sec(a + b*x)), x), x, S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-3)/2), x), x, S(2)*sin(a + b*x)/(S(3)*b*c*sqrt(c*sec(a + b*x))) + S(2)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b*c**S(2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-5)/2), x), x, S(2)*sin(a + b*x)/(S(5)*b*c*(c*sec(a + b*x))**(S(3)/2)) + S(6)*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-7)/2), x), x, S(2)*sin(a + b*x)/(S(7)*b*c*(c*sec(a + b*x))**(S(5)/2)) + S(10)*sin(a + b*x)/(S(21)*b*c**S(3)*sqrt(c*sec(a + b*x))) + S(10)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(21)*b*c**S(4)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(4)/3), x), x, S(3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(a + b*x)**S(2))*sin(a + b*x)*sec(a + b*x)**(S(1)/3)/(b*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(2)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(1)/3)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(2)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(2)/3)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(4)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(4)/3)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-2)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(5)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(5)/3)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(7)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(7)/3)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(4)/3), x), x, S(3)*c*(c*sec(a + b*x))**(S(1)/3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(b*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(2)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(b*(c*sec(a + b*x))**(S(1)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(1)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(2)*b*(c*sec(a + b*x))**(S(2)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-1)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(4)*b*(c*sec(a + b*x))**(S(4)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-2)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(5)*b*(c*sec(a + b*x))**(S(5)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-4)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(7)*b*(c*sec(a + b*x))**(S(7)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(a + b*x)**n, x), x, -Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*sin(a + b*x)*sec(a + b*x)**(n + S(-1))/(b*(-n + S(1))*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**n, x), x, -c*(c*sec(a + b*x))**(n + S(-1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*sin(a + b*x)/(b*(-n + S(1))*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(7)/2), x), x, (sec(x)**S(2))**(S(5)/2)*tan(x)/S(6) + S(5)*(sec(x)**S(2))**(S(3)/2)*tan(x)/S(24) + S(5)*sqrt(sec(x)**S(2))*tan(x)/S(16) + S(5)*asinh(tan(x))/S(16), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(5)/2), x), x, (sec(x)**S(2))**(S(3)/2)*tan(x)/S(4) + S(3)*sqrt(sec(x)**S(2))*tan(x)/S(8) + S(3)*asinh(tan(x))/S(8), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(3)/2), x), x, sqrt(sec(x)**S(2))*tan(x)/S(2) + asinh(tan(x))/S(2), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(sec(x)**S(2)), x), x, asinh(tan(x)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/sqrt(sec(x)**S(2)), x), x, tan(x)/sqrt(sec(x)**S(2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(-3)/2), x), x, S(2)*tan(x)/(S(3)*sqrt(sec(x)**S(2))) + tan(x)/(S(3)*(sec(x)**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(-5)/2), x), x, S(8)*tan(x)/(S(15)*sqrt(sec(x)**S(2))) + S(4)*tan(x)/(S(15)*(sec(x)**S(2))**(S(3)/2)) + tan(x)/(S(5)*(sec(x)**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(-7)/2), x), x, S(16)*tan(x)/(S(35)*sqrt(sec(x)**S(2))) + S(8)*tan(x)/(S(35)*(sec(x)**S(2))**(S(3)/2)) + S(6)*tan(x)/(S(35)*(sec(x)**S(2))**(S(5)/2)) + tan(x)/(S(7)*(sec(x)**S(2))**(S(7)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(7)/2), x), x, S(5)*a**(S(7)/2)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2)))/S(16) + S(5)*a**S(3)*sqrt(a*sec(x)**S(2))*tan(x)/S(16) + S(5)*a**S(2)*(a*sec(x)**S(2))**(S(3)/2)*tan(x)/S(24) + a*(a*sec(x)**S(2))**(S(5)/2)*tan(x)/S(6), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(5)/2), x), x, S(3)*a**(S(5)/2)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2)))/S(8) + S(3)*a**S(2)*sqrt(a*sec(x)**S(2))*tan(x)/S(8) + a*(a*sec(x)**S(2))**(S(3)/2)*tan(x)/S(4), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(3)/2), x), x, a**(S(3)/2)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2)))/S(2) + a*sqrt(a*sec(x)**S(2))*tan(x)/S(2), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(a*sec(x)**S(2)), x), x, sqrt(a)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/sqrt(a*sec(x)**S(2)), x), x, tan(x)/sqrt(a*sec(x)**S(2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(-3)/2), x), x, tan(x)/(S(3)*(a*sec(x)**S(2))**(S(3)/2)) + S(2)*tan(x)/(S(3)*a*sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(-5)/2), x), x, tan(x)/(S(5)*(a*sec(x)**S(2))**(S(5)/2)) + S(4)*tan(x)/(S(15)*a*(a*sec(x)**S(2))**(S(3)/2)) + S(8)*tan(x)/(S(15)*a**S(2)*sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(-7)/2), x), x, tan(x)/(S(7)*(a*sec(x)**S(2))**(S(7)/2)) + S(6)*tan(x)/(S(35)*a*(a*sec(x)**S(2))**(S(5)/2)) + S(8)*tan(x)/(S(35)*a**S(2)*(a*sec(x)**S(2))**(S(3)/2)) + S(16)*tan(x)/(S(35)*a**S(3)*sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(5)/2), x), x, -S(154)*a**S(2)*sqrt(a*sec(x)**S(3))*EllipticE(x/S(2), S(2))*cos(x)**(S(3)/2)/S(195) + S(154)*a**S(2)*sqrt(a*sec(x)**S(3))*sin(x)*cos(x)/S(195) + S(2)*a**S(2)*sqrt(a*sec(x)**S(3))*tan(x)*sec(x)**S(4)/S(13) + S(22)*a**S(2)*sqrt(a*sec(x)**S(3))*tan(x)*sec(x)**S(2)/S(117) + S(154)*a**S(2)*sqrt(a*sec(x)**S(3))*tan(x)/S(585), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(3)/2), x), x, S(10)*a*sqrt(a*sec(x)**S(3))*EllipticF(x/S(2), S(2))*cos(x)**(S(3)/2)/S(21) + S(10)*a*sqrt(a*sec(x)**S(3))*sin(x)/S(21) + S(2)*a*sqrt(a*sec(x)**S(3))*tan(x)*sec(x)/S(7), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(a*sec(x)**S(3)), x), x, -S(2)*sqrt(a*sec(x)**S(3))*EllipticE(x/S(2), S(2))*cos(x)**(S(3)/2) + S(2)*sqrt(a*sec(x)**S(3))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/sqrt(a*sec(x)**S(3)), x), x, S(2)*EllipticF(x/S(2), S(2))/(S(3)*sqrt(a*sec(x)**S(3))*cos(x)**(S(3)/2)) + S(2)*tan(x)/(S(3)*sqrt(a*sec(x)**S(3))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(-3)/2), x), x, S(14)*EllipticE(x/S(2), S(2))/(S(15)*a*sqrt(a*sec(x)**S(3))*cos(x)**(S(3)/2)) + S(2)*sin(x)*cos(x)**S(2)/(S(9)*a*sqrt(a*sec(x)**S(3))) + S(14)*sin(x)/(S(45)*a*sqrt(a*sec(x)**S(3))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(-5)/2), x), x, S(26)*EllipticF(x/S(2), S(2))/(S(77)*a**S(2)*sqrt(a*sec(x)**S(3))*cos(x)**(S(3)/2)) + S(2)*sin(x)*cos(x)**S(5)/(S(15)*a**S(2)*sqrt(a*sec(x)**S(3))) + S(26)*sin(x)*cos(x)**S(3)/(S(165)*a**S(2)*sqrt(a*sec(x)**S(3))) + S(78)*sin(x)*cos(x)/(S(385)*a**S(2)*sqrt(a*sec(x)**S(3))) + S(26)*tan(x)/(S(77)*a**S(2)*sqrt(a*sec(x)**S(3))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(7)/2), x), x, a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(11)/S(13) + S(6)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(9)/S(11) + S(5)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(7)/S(3) + S(20)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(5)/S(7) + S(3)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(3) + S(2)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x) + a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(5)/2), x), x, a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(7)/S(9) + S(4)*a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(5)/S(7) + S(6)*a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(3)/S(5) + S(4)*a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)/S(3) + a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(3)/2), x), x, a*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(3)/S(5) + S(2)*a*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)/S(3) + a*sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(a*sec(x)**S(4)), x), x, sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/sqrt(a*sec(x)**S(4)), x), x, x*sec(x)**S(2)/(S(2)*sqrt(a*sec(x)**S(4))) + tan(x)/(S(2)*sqrt(a*sec(x)**S(4))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(-3)/2), x), x, S(5)*x*sec(x)**S(2)/(S(16)*a*sqrt(a*sec(x)**S(4))) + sin(x)*cos(x)**S(3)/(S(6)*a*sqrt(a*sec(x)**S(4))) + S(5)*sin(x)*cos(x)/(S(24)*a*sqrt(a*sec(x)**S(4))) + S(5)*tan(x)/(S(16)*a*sqrt(a*sec(x)**S(4))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(-5)/2), x), x, S(63)*x*sec(x)**S(2)/(S(256)*a**S(2)*sqrt(a*sec(x)**S(4))) + sin(x)*cos(x)**S(7)/(S(10)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(9)*sin(x)*cos(x)**S(5)/(S(80)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(21)*sin(x)*cos(x)**S(3)/(S(160)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(21)*sin(x)*cos(x)/(S(128)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(63)*tan(x)/(S(256)*a**S(2)*sqrt(a*sec(x)**S(4))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(((b*sec(c + d*x))**p)**n, x), x, -((b*sec(c + d*x))**p)**n*Hypergeometric2F1(S(1)/2, -n*p/S(2) + S(1)/2, -n*p/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)*cos(c + d*x)/(d*(-n*p + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*(b*sec(c + d*x))**p)**n, x), x, -(a*(b*sec(c + d*x))**p)**n*Hypergeometric2F1(S(1)/2, -n*p/S(2) + S(1)/2, -n*p/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)*cos(c + d*x)/(d*(-n*p + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**S(4), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**S(3), x), x, -S(6)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(2)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**S(2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x), x), x, -S(2)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x)), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x), x), x, S(2)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(2), x), x, S(2)*b*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(3), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(4), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*b*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(5), x), x, S(2)*b**S(4)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b**S(2)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**S(3), x), x, S(10)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(2)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**S(2), x), x, -S(6)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x), x), x, S(2)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2), x), x, -S(2)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x), x), x, S(2)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(2), x), x, S(2)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(3), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(4), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(5), x), x, S(2)*b**S(4)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*b**S(2)*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(6), x), x, S(2)*b**S(5)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b**S(3)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**S(2), x), x, S(10)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d) + S(10)*b*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x), x), x, -S(6)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2), x), x, S(2)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d) + S(2)*b*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x), x), x, -S(2)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(2), x), x, S(2)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(3), x), x, S(2)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(4), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(5), x), x, S(2)*b**S(4)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(6), x), x, S(2)*b**S(5)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*b**S(3)*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(7), x), x, S(2)*b**S(6)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b**S(4)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(7)/2), x), x, -S(6)*b**S(4)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*b**S(3)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*b*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(5)/sqrt(b*sec(c + d*x)), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b**S(2)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(4)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(4)/sqrt(b*sec(c + d*x)), x), x, -S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*b*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(3)/sqrt(b*sec(c + d*x)), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b**S(2)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/sqrt(b*sec(c + d*x)), x), x, -S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)/sqrt(b*sec(c + d*x)), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(b*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/sqrt(b*sec(c + d*x)), x), x, S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)/sqrt(b*sec(c + d*x)), x), x, S(2)*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/sqrt(b*sec(c + d*x)), x), x, S(2)*b*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)**S(3)/sqrt(b*sec(c + d*x)), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)**S(4)/sqrt(b*sec(c + d*x)), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(6)/(b*sec(c + d*x))**(S(3)/2), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(2)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b**S(3)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(5)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(5)/(b*sec(c + d*x))**(S(3)/2), x), x, -S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*b**S(2)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(4)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(4)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(2)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b**S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(3)/(b*sec(c + d*x))**(S(3)/2), x), x, -S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(b**S(2)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(b**S(2)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-3)/2), x), x, S(2)*sin(c + d*x)/(S(3)*b*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(2)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*b*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*b*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(2)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)**S(3)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(7)/(b*sec(c + d*x))**(S(5)/2), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(3)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b**S(4)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(6)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(6)/(b*sec(c + d*x))**(S(5)/2), x), x, -S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*b**S(3)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(5)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(5)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(3)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b**S(4)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(4)/(b*sec(c + d*x))**(S(5)/2), x), x, -S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(b**S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(3)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(b**S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sin(c + d*x)/(S(3)*b**S(2)*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-5)/2), x), x, S(2)*sin(c + d*x)/(S(5)*b*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*b**S(2)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(3)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*b*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*sin(c + d*x)/(S(45)*b*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-7)/2), x), x, S(2)*sin(c + d*x)/(S(7)*b*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*b**S(3)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(4)*d), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(9)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(7)/2)/(S(4)*d) + S(3)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(8)*d) + S(3)*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(8)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(7)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(2)*d) + sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(2)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(3)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x)), x), x, sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), x), x, x*sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(3)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(5)/2), x), x, x*sqrt(b*sec(c + d*x))/(S(2)*sqrt(sec(c + d*x))) + sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(2)*d*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(7)/2), x), x, -sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)/(S(3)*d*sqrt(sec(c + d*x))) + sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(9)/2), x), x, S(3)*x*sqrt(b*sec(c + d*x))/(S(8)*sqrt(sec(c + d*x))) + S(3)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(8)*d*sec(c + d*x)**(S(3)/2)) + sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(4)*d*sec(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(7)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(7)/2)/(S(4)*d) + S(3)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(8)*d) + S(3)*b*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(8)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(5)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(3)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(2)*d) + b*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(2)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sqrt(sec(c + d*x)), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sqrt(sec(c + d*x)), x), x, b*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(3)/2), x), x, b*x*sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(5)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(7)/2), x), x, b*x*sqrt(b*sec(c + d*x))/(S(2)*sqrt(sec(c + d*x))) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(2)*d*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(9)/2), x), x, -b*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)/(S(3)*d*sqrt(sec(c + d*x))) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(11)/2), x), x, S(3)*b*x*sqrt(b*sec(c + d*x))/(S(8)*sqrt(sec(c + d*x))) + S(3)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(8)*d*sec(c + d*x)**(S(3)/2)) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(4)*d*sec(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**(S(7)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(5)*sec(c + d*x)**(S(9)/2)/(S(5)*d) + S(2)*b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**(S(3)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sqrt(sec(c + d*x)), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(2)*d) + b**S(2)*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(2)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sqrt(sec(c + d*x)), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(3)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(5)/2), x), x, b**S(2)*x*sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(7)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(9)/2), x), x, b**S(2)*x*sqrt(b*sec(c + d*x))/(S(2)*sqrt(sec(c + d*x))) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(2)*d*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(11)/2), x), x, -b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)/(S(3)*d*sqrt(sec(c + d*x))) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(7)/2)/sqrt(b*sec(c + d*x)), x), x, sin(c + d*x)*sec(c + d*x)**(S(5)/2)/(S(2)*d*sqrt(b*sec(c + d*x))) + atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(5)/2)/sqrt(b*sec(c + d*x)), x), x, sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(3)/2)/sqrt(b*sec(c + d*x)), x), x, atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(sec(c + d*x))/sqrt(b*sec(c + d*x)), x), x, x*sqrt(sec(c + d*x))/sqrt(b*sec(c + d*x)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), x), x, sin(c + d*x)*sqrt(sec(c + d*x))/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(3)/2)), x), x, x*sqrt(sec(c + d*x))/(S(2)*sqrt(b*sec(c + d*x))) + sin(c + d*x)/(S(2)*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2)), x), x, -sin(c + d*x)**S(3)*sqrt(sec(c + d*x))/(S(3)*d*sqrt(b*sec(c + d*x))) + sin(c + d*x)*sqrt(sec(c + d*x))/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(9)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(5)/2)/(S(2)*b*d*sqrt(b*sec(c + d*x))) + atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(S(2)*b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(7)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(5)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(3)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, x*sqrt(sec(c + d*x))/(b*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(sec(c + d*x))/(b*sec(c + d*x))**(S(3)/2), x), x, sin(c + d*x)*sqrt(sec(c + d*x))/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(3)/2)*sqrt(sec(c + d*x))), x), x, x*sqrt(sec(c + d*x))/(S(2)*b*sqrt(b*sec(c + d*x))) + sin(c + d*x)/(S(2)*b*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(3)/2)), x), x, -sin(c + d*x)**S(3)*sqrt(sec(c + d*x))/(S(3)*b*d*sqrt(b*sec(c + d*x))) + sin(c + d*x)*sqrt(sec(c + d*x))/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(5)/2)), x), x, S(3)*x*sqrt(sec(c + d*x))/(S(8)*b*sqrt(b*sec(c + d*x))) + S(3)*sin(c + d*x)/(S(8)*b*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))) + sin(c + d*x)/(S(4)*b*d*sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(11)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(5)/2)/(S(2)*b**S(2)*d*sqrt(b*sec(c + d*x))) + atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(S(2)*b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(9)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(7)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(5)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, x*sqrt(sec(c + d*x))/(b**S(2)*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**(S(3)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, sin(c + d*x)*sqrt(sec(c + d*x))/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(sec(c + d*x))/(b*sec(c + d*x))**(S(5)/2), x), x, x*sqrt(sec(c + d*x))/(S(2)*b**S(2)*sqrt(b*sec(c + d*x))) + sin(c + d*x)/(S(2)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(5)/2)*sqrt(sec(c + d*x))), x), x, -sin(c + d*x)**S(3)*sqrt(sec(c + d*x))/(S(3)*b**S(2)*d*sqrt(b*sec(c + d*x))) + sin(c + d*x)*sqrt(sec(c + d*x))/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**(S(3)/2)), x), x, S(3)*x*sqrt(sec(c + d*x))/(S(8)*b**S(2)*sqrt(b*sec(c + d*x))) + S(3)*sin(c + d*x)/(S(8)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))) + sin(c + d*x)/(S(4)*b**S(2)*d*sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*sec(c + d*x)**S(2), x), x, S(3)*(b*sec(c + d*x))**(S(4)/3)*Hypergeometric2F1(S(-2)/3, S(1)/2, S(1)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*b*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*sec(c + d*x), x), x, S(3)*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*b*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(2)*d*(b*sec(c + d*x))**(S(2)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*cos(c + d*x), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(5)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*cos(c + d*x)**S(2), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(4)/3, S(7)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(8)*d*(b*sec(c + d*x))**(S(8)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*sec(c + d*x)**S(2), x), x, S(3)*(b*sec(c + d*x))**(S(7)/3)*Hypergeometric2F1(S(-7)/6, S(1)/2, S(-1)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(7)*b*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*sec(c + d*x), x), x, S(3)*(b*sec(c + d*x))**(S(4)/3)*Hypergeometric2F1(S(-2)/3, S(1)/2, S(1)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3), x), x, S(3)*b*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*cos(c + d*x), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(2)*d*(b*sec(c + d*x))**(S(2)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*cos(c + d*x)**S(2), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(5)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(1)/3), x), x, S(3)*(b*sec(c + d*x))**(S(2)/3)*Hypergeometric2F1(S(-1)/3, S(1)/2, S(2)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(2)*b*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(b*sec(c + d*x))**(S(1)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-1)/3), x), x, -S(3)*b*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*d*(b*sec(c + d*x))**(S(4)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(7)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(5)/3, S(8)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(10)*d*(b*sec(c + d*x))**(S(10)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(b*d*(b*sec(c + d*x))**(S(1)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*d*(b*sec(c + d*x))**(S(4)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-4)/3), x), x, -S(3)*b*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(7)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/2, S(5)/3, S(8)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(10)*d*(b*sec(c + d*x))**(S(10)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(13)/6, S(19)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(13)*d*(b*sec(c + d*x))**(S(13)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*sec(c + d*x)**m, x), x, S(3)*b*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(-1)/6, -m/S(2) + S(5)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**m/(d*(S(3)*m + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(2)/3)*sec(c + d*x)**m, x), x, -S(3)*(b*sec(c + d*x))**(S(2)/3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(1)/6, -m/S(2) + S(7)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(-S(3)*m + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*sec(c + d*x)**m, x), x, -S(3)*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(1)/3, -m/S(2) + S(4)/3, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(-S(3)*m + S(2))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**m/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(2)/3, -m/S(2) + S(5)/3, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(b*sec(c + d*x))**(S(1)/3)*(-S(3)*m + S(4))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**m/(b*sec(c + d*x))**(S(2)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(5)/6, -m/S(2) + S(11)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(b*sec(c + d*x))**(S(2)/3)*(-S(3)*m + S(5))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sec(c + d*x)**m/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(7)/6, -m/S(2) + S(13)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-2))/(b*d*(b*sec(c + d*x))**(S(1)/3)*(-S(3)*m + S(7))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**m, x), x, -(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -m/S(2) - n/S(2) + S(1)/2, -m/S(2) - n/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(-m - n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**S(2), x), x, (b*sec(c + d*x))**(n + S(1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(-1)/2, -n/S(2) + S(1)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(b*d*(n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x), x), x, (b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2), -n/S(2) + S(1), cos(c + d*x)**S(2))*sin(c + d*x)/(d*n*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n, x), x, -b*(b*sec(c + d*x))**(n + S(-1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*cos(c + d*x), x), x, -b**S(2)*(b*sec(c + d*x))**(n + S(-2))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1), -n/S(2) + S(2), cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(2))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*cos(c + d*x)**S(2), x), x, -b**S(3)*(b*sec(c + d*x))**(n + S(-3))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(3)/2, -n/S(2) + S(5)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(3))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*cos(c + d*x)**S(3), x), x, -b**S(4)*(b*sec(c + d*x))**(n + S(-4))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(2), -n/S(2) + S(3), cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(4))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**(S(5)/2), x), x, S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(-3)/4, -n/S(2) + S(1)/4, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(d*(S(2)*n + S(3))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**(S(3)/2), x), x, S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(-1)/4, -n/S(2) + S(3)/4, cos(c + d*x)**S(2))*sin(c + d*x)*sqrt(sec(c + d*x))/(d*(S(2)*n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sqrt(sec(c + d*x)), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/4, -n/S(2) + S(5)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(1))*sqrt(sin(c + d*x)**S(2))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n/sqrt(sec(c + d*x)), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(3)/4, -n/S(2) + S(7)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(3))*sqrt(sin(c + d*x)**S(2))*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n/sec(c + d*x)**(S(3)/2), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(5)/4, -n/S(2) + S(9)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(5))*sqrt(sin(c + d*x)**S(2))*sec(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*sec(c + d*x))**n/sec(c + d*x)**(S(5)/2), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(7)/4, -n/S(2) + S(11)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(7))*sqrt(sin(c + d*x)**S(2))*sec(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(7)/2)*sin(a + b*x), x), x, S(2)*d*(d*sec(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(5)/2)*sin(a + b*x), x), x, S(2)*d*(d*sec(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(3)/2)*sin(a + b*x), x), x, S(2)*d*sqrt(d*sec(a + b*x))/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(d*sec(a + b*x))*sin(a + b*x), x), x, -S(2)*d/(b*sqrt(d*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sin(a + b*x)/sqrt(d*sec(a + b*x)), x), x, -S(2)*d/(S(3)*b*(d*sec(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(5)/2)*sin(a + b*x)**S(3), x), x, S(2)*d**S(3)/(b*sqrt(d*sec(a + b*x))) + S(2)*d*(d*sec(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(9)/2)*sin(a + b*x)**S(3), x), x, -S(2)*d**S(3)*(d*sec(a + b*x))**(S(3)/2)/(S(3)*b) + S(2)*d*(d*sec(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(9)/2), x), x, -S(4)*c*d**S(3)*(d*csc(a + b*x))**(S(3)/2)/(S(7)*b*sqrt(c*sec(a + b*x))) - S(2)*c*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*sqrt(c*sec(a + b*x))) + S(4)*d**S(4)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(7)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(7)/2), x), x, -S(8)*c*d**S(3)*sqrt(d*csc(a + b*x))/(S(5)*b*sqrt(c*sec(a + b*x))) - S(2)*c*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(5)/2), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*sqrt(c*sec(a + b*x))) + S(2)*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2), x), x, -S(2)*c*d*sqrt(d*csc(a + b*x))/(b*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x)), x), x, sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))/sqrt(d*csc(a + b*x)), x), x, -sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))/(d*csc(a + b*x))**(S(3)/2), x), x, -c/(b*d*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))) + sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(2)*b*d**S(2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))/(d*csc(a + b*x))**(S(5)/2), x), x, -c/(S(2)*b*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(9)/2), x), x, S(64)*c*d**S(5)*sqrt(c*sec(a + b*x))/(S(21)*b*sqrt(d*csc(a + b*x))) - S(16)*c*d**S(3)*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b) - S(2)*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(7)/2), x), x, -S(24)*c**S(2)*d**S(4)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(24)*c*d**S(5)*sqrt(c*sec(a + b*x))/(S(5)*b*(d*csc(a + b*x))**(S(3)/2)) - S(12)*c*d**S(3)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))/(S(5)*b) - S(2)*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(5)/2), x), x, S(8)*c*d**S(3)*sqrt(c*sec(a + b*x))/(S(3)*b*sqrt(d*csc(a + b*x))) - S(2)*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2), x), x, -S(4)*c**S(2)*d**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(4)*c*d**S(3)*sqrt(c*sec(a + b*x))/(b*(d*csc(a + b*x))**(S(3)/2)) - S(2)*c*d*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x)), x), x, S(2)*c*d*sqrt(c*sec(a + b*x))/(b*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)/sqrt(d*csc(a + b*x)), x), x, -S(2)*c**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*c*d*sqrt(c*sec(a + b*x))/(b*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)/(d*csc(a + b*x))**(S(3)/2), x), x, sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*d**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*d**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*d**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*d**S(2)*sqrt(c*sec(a + b*x))) + S(2)*c*sqrt(c*sec(a + b*x))/(b*d*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)/(d*csc(a + b*x))**(S(5)/2), x), x, -S(3)*c**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*c*sqrt(c*sec(a + b*x))/(b*d*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(9)/2), x), x, S(40)*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(21)*b) + S(40)*c*d**S(5)*(c*sec(a + b*x))**(S(3)/2)/(S(21)*b*sqrt(d*csc(a + b*x))) - S(20)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(7)/2), x), x, S(64)*c*d**S(5)*(c*sec(a + b*x))**(S(3)/2)/(S(15)*b*(d*csc(a + b*x))**(S(3)/2)) - S(16)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))/(S(5)*b) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(5)/2), x), x, S(4)*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b) + S(4)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*sqrt(d*csc(a + b*x))) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(3)/2), x), x, S(8)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*(d*csc(a + b*x))**(S(3)/2)) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))/b, expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*sqrt(d*csc(a + b*x)), x), x, S(2)*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b) + S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)/sqrt(d*csc(a + b*x)), x), x, S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)/(d*csc(a + b*x))**(S(3)/2), x), x, -c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b*d**S(2)) + S(2)*c*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*d*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)/(d*csc(a + b*x))**(S(5)/2), x), x, sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(2)*c*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*d*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(9)/2)/sqrt(c*sec(a + b*x)), x), x, -S(8)*c*d**S(3)*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b*(c*sec(a + b*x))**(S(3)/2)) - S(2)*c*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*(c*sec(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(7)/2)/sqrt(c*sec(a + b*x)), x), x, -S(4)*c*d**S(3)*sqrt(d*csc(a + b*x))/(S(5)*b*(c*sec(a + b*x))**(S(3)/2)) - S(2)*c*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*(c*sec(a + b*x))**(S(3)/2)) - S(4)*d**S(4)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(5)/2)/sqrt(c*sec(a + b*x)), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*(c*sec(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(3)/2)/sqrt(c*sec(a + b*x)), x), x, -S(2)*c*d*sqrt(d*csc(a + b*x))/(b*(c*sec(a + b*x))**(S(3)/2)) - S(2)*d**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(d*csc(a + b*x))/sqrt(c*sec(a + b*x)), x), x, -sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*sqrt(c*sec(a + b*x))) - sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))), x), x, EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)), x), x, -c/(S(2)*b*d*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*d**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*d**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*d**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*d**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(5)/2)), x), x, -c/(S(3)*b*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)) + EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(2)*b*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(11)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, S(8)*d**S(5)*sqrt(d*csc(a + b*x))/(S(45)*b*c*sqrt(c*sec(a + b*x))) + S(2)*d**S(3)*(d*csc(a + b*x))**(S(5)/2)/(S(45)*b*c*sqrt(c*sec(a + b*x))) - S(2)*d*(d*csc(a + b*x))**(S(9)/2)/(S(9)*b*c*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(9)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, S(2)*d**S(3)*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b*c*sqrt(c*sec(a + b*x))) - S(2)*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*c*sqrt(c*sec(a + b*x))) - S(2)*d**S(4)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(21)*b*c**S(2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(7)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*(c*sec(a + b*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(5)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*c*sqrt(c*sec(a + b*x))) - d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b*c**S(2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(3)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*d*sqrt(d*csc(a + b*x))/(b*c*sqrt(c*sec(a + b*x))) + sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(d*csc(a + b*x))/(c*sec(a + b*x))**(S(3)/2), x), x, d/(b*c*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))) + sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(2)*b*c**S(2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))), x), x, d/(S(2)*b*c*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)) - sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)), x), x, -c/(S(3)*b*d*(c*sec(a + b*x))**(S(5)/2)*sqrt(d*csc(a + b*x))) + S(1)/(S(6)*b*c*d*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))) + sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(12)*b*c**S(2)*d**S(2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(5)/2)), x), x, -c/(S(4)*b*d*(c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(3)/2)) + S(3)/(S(16)*b*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(64)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(64)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(128)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(128)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(9)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*(c*sec(a + b*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(7)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, S(6)*d**S(3)*sqrt(d*csc(a + b*x))/(S(5)*b*c*(c*sec(a + b*x))**(S(3)/2)) - S(2)*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*c*(c*sec(a + b*x))**(S(3)/2)) + S(6)*d**S(4)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(5)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, -S(2)*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*c*(c*sec(a + b*x))**(S(3)/2)) + sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*c**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*c**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*c**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*c**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(3)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, -S(2)*d*sqrt(d*csc(a + b*x))/(b*c*(c*sec(a + b*x))**(S(3)/2)) - S(3)*d**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(sqrt(d*csc(a + b*x))/(c*sec(a + b*x))**(S(5)/2), x), x, d/(S(2)*b*c*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*c**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*c**S(2)*sqrt(c*sec(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*c**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*c**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*sqrt(d*csc(a + b*x))), x), x, d/(S(3)*b*c*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)) + EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(2)*b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(3)/2)), x), x, -c/(S(4)*b*d*(c*sec(a + b*x))**(S(7)/2)*sqrt(d*csc(a + b*x))) + S(1)/(S(16)*b*c*d*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(64)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(64)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(128)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(128)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(5)/2)), x), x, -c/(S(5)*b*d*(c*sec(a + b*x))**(S(7)/2)*(d*csc(a + b*x))**(S(3)/2)) + S(1)/(S(10)*b*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)) + S(3)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(20)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(7)/2)), x), x, -c/(S(6)*b*d*(c*sec(a + b*x))**(S(7)/2)*(d*csc(a + b*x))**(S(5)/2)) - S(5)*c/(S(48)*b*d**S(3)*(c*sec(a + b*x))**(S(7)/2)*sqrt(d*csc(a + b*x))) + S(5)/(S(192)*b*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(256)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))) + S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(256)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))) - S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(512)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))) + S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(512)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate(csc(e + f*x)**n*sec(e + f*x)**m, x), x, (cos(e + f*x)**S(2))**(m/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, sin(e + f*x)**S(2))*csc(e + f*x)**(n + S(-1))*sec(e + f*x)**(m + S(1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((a*sec(e + f*x))**m*csc(e + f*x)**n, x), x, -(a*sec(e + f*x))**m*(sin(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(-m/S(2) + S(1)/2, n/S(2) + S(1)/2, -m/S(2) + S(3)/2, cos(e + f*x)**S(2))*cos(e + f*x)*csc(e + f*x)**(n + S(1))/(f*(-m + S(1))), expand=True, _diff=True, _numerical=True)
    assert rubi_test(rubi_integrate((b*csc(e + f*x))**n*sec(e + f*x)**m, x), x, (b*csc(e + f*x))**n*(cos(e + f*x)**S(2))**(m/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, sin(e + f*x)**S(2))*sin(e + f*x)*sec(e + f*x)**(m + S(1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True)
