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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2839, 3473, 8, 2592, 321, 206} \[ -\frac {\cos (c+d x)}{a d}-\frac {\cot (c+d x)}{a d}+\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {x}{a} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 8

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

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2592

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, (a*Sin[e + f*x])/ff
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 2839

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

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.42, size = 93, normalized size = 1.90 \[ -\frac {\tan \left (\frac {1}{2} (c+d x)\right ) \left (\cot \left (\frac {1}{2} (c+d x)\right )+1\right )^2 \left (\cos (c+d x)+\sin (c+d x) \left (\cos (c+d x)+\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+c+d x\right )\right )}{2 a d (\sin (c+d x)+1)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 80, normalized size = 1.63 \[ -\frac {2 \, {\left (d x + \cos \left (d x + c\right )\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 ) + \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 2 \, \cos \left (d x + c\right )}{2 \, a 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)),x, algorithm="fricas")

[Out]

-1/2*(2*(d*x + cos(d*x + c))*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) + 2*cos(d*x + c))/(a*d*sin(d*x + c))

________________________________________________________________________________________

giac [B]  time = 0.17, size = 113, normalized size = 2.31 \[ -\frac {\frac {6 \, {\left (d x + c\right )}}{a} + \frac {6 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} - \frac {3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} - \frac {2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 10 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} a}}{6 \, 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)),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.39, size = 97, normalized size = 1.98 \[ \frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {2}{a d \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {1}{2 a d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d} \]

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)),x)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 154, normalized size = 3.14 \[ -\frac {\frac {\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + 1}{\frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}} + \frac {4 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {2 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\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)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 8.72, size = 147, normalized size = 3.00 \[ \frac {2\,\mathrm {atan}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-4}+\frac {4}{4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-4}\right )}{a\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1}{d\,\left (2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,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))),x)

[Out]

(2*atan((4*tan(c/2 + (d*x)/2))/(4*tan(c/2 + (d*x)/2) - 4) + 4/(4*tan(c/2 + (d*x)/2) - 4)))/(a*d) - log(tan(c/2
 + (d*x)/2))/(a*d) - (4*tan(c/2 + (d*x)/2) + tan(c/2 + (d*x)/2)^2 + 1)/(d*(2*a*tan(c/2 + (d*x)/2) + 2*a*tan(c/
2 + (d*x)/2)^3)) + tan(c/2 + (d*x)/2)/(2*a*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 {\left (c + d x \right )} + 1}\, dx}{a} \]

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)),x)

[Out]

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

________________________________________________________________________________________