3.918 \(\int \cos ^n(a+b x) \sin ^{-2-n}(a+b x) \, dx\)

Optimal. Leaf size=32 \[ -\frac{\sin ^{-n-1}(a+b x) \cos ^{n+1}(a+b x)}{b (n+1)} \]

[Out]

-((Cos[a + b*x]^(1 + n)*Sin[a + b*x]^(-1 - n))/(b*(1 + n)))

________________________________________________________________________________________

Rubi [A]  time = 0.0400978, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.048, Rules used = {2563} \[ -\frac{\sin ^{-n-1}(a+b x) \cos ^{n+1}(a+b x)}{b (n+1)} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]^n*Sin[a + b*x]^(-2 - n),x]

[Out]

-((Cos[a + b*x]^(1 + n)*Sin[a + b*x]^(-1 - n))/(b*(1 + n)))

Rule 2563

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Simp[((a*Sin[e +
 f*x])^(m + 1)*(b*Cos[e + f*x])^(n + 1))/(a*b*f*(m + 1)), x] /; FreeQ[{a, b, e, f, m, n}, x] && EqQ[m + n + 2,
 0] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \cos ^n(a+b x) \sin ^{-2-n}(a+b x) \, dx &=-\frac{\cos ^{1+n}(a+b x) \sin ^{-1-n}(a+b x)}{b (1+n)}\\ \end{align*}

Mathematica [A]  time = 0.081499, size = 32, normalized size = 1. \[ -\frac{\sin ^{-n-1}(a+b x) \cos ^{n+1}(a+b x)}{b (n+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]^n*Sin[a + b*x]^(-2 - n),x]

[Out]

-((Cos[a + b*x]^(1 + n)*Sin[a + b*x]^(-1 - n))/(b*(1 + n)))

________________________________________________________________________________________

Maple [F]  time = 0.139, size = 0, normalized size = 0. \begin{align*} \int \left ( \cos \left ( bx+a \right ) \right ) ^{n} \left ( \sin \left ( bx+a \right ) \right ) ^{-2-n}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^n*sin(b*x+a)^(-2-n),x)

[Out]

int(cos(b*x+a)^n*sin(b*x+a)^(-2-n),x)

________________________________________________________________________________________

Maxima [B]  time = 1.48542, size = 169, normalized size = 5.28 \begin{align*} \frac{2 \,{\left (\frac{\sin \left (b x + a\right )^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 1\right )}{\left (\cos \left (b x + a\right ) + 1\right )} e^{\left (n \log \left (\frac{\sin \left (b x + a\right )}{\cos \left (b x + a\right ) + 1} + 1\right ) - n \log \left (\frac{\sin \left (b x + a\right )}{\cos \left (b x + a\right ) + 1}\right ) + n \log \left (-\frac{\sin \left (b x + a\right )}{\cos \left (b x + a\right ) + 1} + 1\right )\right )}}{{\left (2^{n + 2} n + 2^{n + 2}\right )} b \sin \left (b x + a\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^n*sin(b*x+a)^(-2-n),x, algorithm="maxima")

[Out]

2*(sin(b*x + a)^2/(cos(b*x + a) + 1)^2 - 1)*(cos(b*x + a) + 1)*e^(n*log(sin(b*x + a)/(cos(b*x + a) + 1) + 1) -
 n*log(sin(b*x + a)/(cos(b*x + a) + 1)) + n*log(-sin(b*x + a)/(cos(b*x + a) + 1) + 1))/((2^(n + 2)*n + 2^(n +
2))*b*sin(b*x + a))

________________________________________________________________________________________

Fricas [A]  time = 2.30636, size = 101, normalized size = 3.16 \begin{align*} -\frac{\cos \left (b x + a\right )^{n} \sin \left (b x + a\right )^{-n - 2} \cos \left (b x + a\right ) \sin \left (b x + a\right )}{b n + b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^n*sin(b*x+a)^(-2-n),x, algorithm="fricas")

[Out]

-cos(b*x + a)^n*sin(b*x + a)^(-n - 2)*cos(b*x + a)*sin(b*x + a)/(b*n + b)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**n*sin(b*x+a)**(-2-n),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos \left (b x + a\right )^{n} \sin \left (b x + a\right )^{-n - 2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^n*sin(b*x+a)^(-2-n),x, algorithm="giac")

[Out]

integrate(cos(b*x + a)^n*sin(b*x + a)^(-n - 2), x)