3.426 \(\int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=35 \[ -\frac {\cot (c+d x)}{a^2 d}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {x}{a^2} \]

[Out]

x/a^2+2*arctanh(cos(d*x+c))/a^2/d-cot(d*x+c)/a^2/d

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2869, 2757, 3770, 3767, 8} \[ -\frac {\cot (c+d x)}{a^2 d}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {x}{a^2} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]^2*Cot[c + d*x]^2)/(a + a*Sin[c + d*x])^2,x]

[Out]

x/a^2 + (2*ArcTanh[Cos[c + d*x]])/(a^2*d) - Cot[c + d*x]/(a^2*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2757

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Int[Expan
dTrig[(a + b*sin[e + f*x])^m*(d*sin[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] &
& IGtQ[m, 0] && RationalQ[n]

Rule 2869

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

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \csc ^2(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (a^2-2 a^2 \csc (c+d x)+a^2 \csc ^2(c+d x)\right ) \, dx}{a^4}\\ &=\frac {x}{a^2}+\frac {\int \csc ^2(c+d x) \, dx}{a^2}-\frac {2 \int \csc (c+d x) \, dx}{a^2}\\ &=\frac {x}{a^2}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {\operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d}\\ &=\frac {x}{a^2}+\frac {2 \tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.37, size = 98, normalized size = 2.80 \[ \frac {\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^4 \left (2 (c+d x)+\tan \left (\frac {1}{2} (c+d x)\right )-\cot \left (\frac {1}{2} (c+d x)\right )-4 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )}{2 d (a \sin (c+d x)+a)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]^2*Cot[c + d*x]^2)/(a + a*Sin[c + d*x])^2,x]

[Out]

((Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4*(2*(c + d*x) - Cot[(c + d*x)/2] + 4*Log[Cos[(c + d*x)/2]] - 4*Log[Sin
[(c + d*x)/2]] + Tan[(c + d*x)/2]))/(2*d*(a + a*Sin[c + d*x])^2)

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 70, normalized size = 2.00 \[ \frac {d x \sin \left (d x + c\right ) + \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - \cos \left (d x + c\right )}{a^{2} d \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^2/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

(d*x*sin(d*x + c) + log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - cos
(d*x + c))/(a^2*d*sin(d*x + c))

________________________________________________________________________________________

giac [B]  time = 0.19, size = 73, normalized size = 2.09 \[ \frac {\frac {2 \, {\left (d x + c\right )}}{a^{2}} - \frac {4 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} + \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} + \frac {4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^2/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/2*(2*(d*x + c)/a^2 - 4*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 + tan(1/2*d*x + 1/2*c)/a^2 + (4*tan(1/2*d*x + 1/2*
c) - 1)/(a^2*tan(1/2*d*x + 1/2*c)))/d

________________________________________________________________________________________

maple [B]  time = 0.54, size = 74, normalized size = 2.11 \[ \frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d \,a^{2}}+\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}-\frac {1}{2 d \,a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*csc(d*x+c)^2/(a+a*sin(d*x+c))^2,x)

[Out]

1/2/d/a^2*tan(1/2*d*x+1/2*c)+2/d/a^2*arctan(tan(1/2*d*x+1/2*c))-1/2/d/a^2/tan(1/2*d*x+1/2*c)-2/d/a^2*ln(tan(1/
2*d*x+1/2*c))

________________________________________________________________________________________

maxima [B]  time = 0.45, size = 93, normalized size = 2.66 \[ \frac {\frac {4 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {4 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {\cos \left (d x + c\right ) + 1}{a^{2} \sin \left (d x + c\right )} + \frac {\sin \left (d x + c\right )}{a^{2} {\left (\cos \left (d x + c\right ) + 1\right )}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^2/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/2*(4*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 - 4*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 - (cos(d*x + c
) + 1)/(a^2*sin(d*x + c)) + sin(d*x + c)/(a^2*(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

mupad [B]  time = 8.83, size = 95, normalized size = 2.71 \[ -\frac {2\,\mathrm {atan}\left (\frac {\sqrt {5}\,\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{5\,\cos \left (\frac {c}{2}-\mathrm {atan}\left (\frac {1}{2}\right )+\frac {d\,x}{2}\right )}\right )}{a^2\,d}-\frac {\mathrm {cot}\left (c+d\,x\right )}{a^2\,d}-\frac {2\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{a^2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^4/(sin(c + d*x)^2*(a + a*sin(c + d*x))^2),x)

[Out]

- (2*atan((5^(1/2)*(cos(c/2 + (d*x)/2) - 2*sin(c/2 + (d*x)/2)))/(5*cos(c/2 - atan(1/2) + (d*x)/2))))/(a^2*d) -
 cot(c + d*x)/(a^2*d) - (2*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(a^2*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cos ^{4}{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*csc(d*x+c)**2/(a+a*sin(d*x+c))**2,x)

[Out]

Integral(cos(c + d*x)**4*csc(c + d*x)**2/(sin(c + d*x)**2 + 2*sin(c + d*x) + 1), x)/a**2

________________________________________________________________________________________