3.436 \(\int \frac{-2 \cot ^2(x)+\sin (x)}{(1+5 \tan ^2(x))^{3/2}} \, dx\)

Optimal. Leaf size=94 \[ -\frac{1}{8} \cos (x) \sqrt{5 \tan ^2(x)+1}-\frac{\cos (x)}{4 \sqrt{5 \tan ^2(x)+1}}-\frac{1}{4} \tanh ^{-1}\left (\frac{2 \tan (x)}{\sqrt{5 \tan ^2(x)+1}}\right )+\frac{9}{2} \sqrt{5 \tan ^2(x)+1} \cot (x)-\frac{5 \cot (x)}{2 \sqrt{5 \tan ^2(x)+1}} \]

[Out]

-ArcTanh[(2*Tan[x])/Sqrt[1 + 5*Tan[x]^2]]/4 - Cos[x]/(4*Sqrt[1 + 5*Tan[x]^2]) - (5*Cot[x])/(2*Sqrt[1 + 5*Tan[x
]^2]) - (Cos[x]*Sqrt[1 + 5*Tan[x]^2])/8 + (9*Cot[x]*Sqrt[1 + 5*Tan[x]^2])/2

________________________________________________________________________________________

Rubi [A]  time = 0.18858, antiderivative size = 94, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 10, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.454, Rules used = {4377, 12, 3670, 472, 583, 377, 206, 3664, 271, 191} \[ -\frac{5 \sec (x)}{8 \sqrt{5 \sec ^2(x)-4}}+\frac{\cos (x)}{4 \sqrt{5 \sec ^2(x)-4}}-\frac{1}{4} \tanh ^{-1}\left (\frac{2 \tan (x)}{\sqrt{5 \tan ^2(x)+1}}\right )+\frac{9}{2} \sqrt{5 \tan ^2(x)+1} \cot (x)-\frac{5 \cot (x)}{2 \sqrt{5 \tan ^2(x)+1}} \]

Antiderivative was successfully verified.

[In]

Int[(-2*Cot[x]^2 + Sin[x])/(1 + 5*Tan[x]^2)^(3/2),x]

[Out]

-ArcTanh[(2*Tan[x])/Sqrt[1 + 5*Tan[x]^2]]/4 + Cos[x]/(4*Sqrt[-4 + 5*Sec[x]^2]) - (5*Sec[x])/(8*Sqrt[-4 + 5*Sec
[x]^2]) - (5*Cot[x])/(2*Sqrt[1 + 5*Tan[x]^2]) + (9*Cot[x]*Sqrt[1 + 5*Tan[x]^2])/2

Rule 4377

Int[(u_)*((v_) + (d_.)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_.)), x_Symbol] :> With[{e = FreeFactors[Cos[c*(a +
b*x)], x]}, Int[ActivateTrig[u*v], x] + Dist[d, Int[ActivateTrig[u]*Sin[c*(a + b*x)]^n, x], x] /; FunctionOfQ[
Cos[c*(a + b*x)]/e, u, x]] /; FreeQ[{a, b, c, d}, x] &&  !FreeQ[v, x] && IntegerQ[(n - 1)/2] && NonsumQ[u] &&
(EqQ[F, Sin] || EqQ[F, sin])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 472

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

Rule 583

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[(e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*c*g*(m + 1)), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

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 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 271

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

Rule 191

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^(p + 1))/a, x] /; FreeQ[{a, b, n, p}, x] &
& EqQ[1/n + p + 1, 0]

Rubi steps

\begin{align*} \int \frac{-2 \cot ^2(x)+\sin (x)}{\left (1+5 \tan ^2(x)\right )^{3/2}} \, dx &=\int -\frac{2 \cot ^2(x)}{\left (1+5 \tan ^2(x)\right )^{3/2}} \, dx+\int \frac{\sin (x)}{\left (1+5 \tan ^2(x)\right )^{3/2}} \, dx\\ &=-\left (2 \int \frac{\cot ^2(x)}{\left (1+5 \tan ^2(x)\right )^{3/2}} \, dx\right )+\operatorname{Subst}\left (\int \frac{1}{x^2 \left (-4+5 x^2\right )^{3/2}} \, dx,x,\sec (x)\right )\\ &=\frac{\cos (x)}{4 \sqrt{-4+5 \sec ^2(x)}}-2 \operatorname{Subst}\left (\int \frac{1}{x^2 \left (1+x^2\right ) \left (1+5 x^2\right )^{3/2}} \, dx,x,\tan (x)\right )+\frac{5}{2} \operatorname{Subst}\left (\int \frac{1}{\left (-4+5 x^2\right )^{3/2}} \, dx,x,\sec (x)\right )\\ &=\frac{\cos (x)}{4 \sqrt{-4+5 \sec ^2(x)}}-\frac{5 \sec (x)}{8 \sqrt{-4+5 \sec ^2(x)}}-\frac{5 \cot (x)}{2 \sqrt{1+5 \tan ^2(x)}}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{-9-10 x^2}{x^2 \left (1+x^2\right ) \sqrt{1+5 x^2}} \, dx,x,\tan (x)\right )\\ &=\frac{\cos (x)}{4 \sqrt{-4+5 \sec ^2(x)}}-\frac{5 \sec (x)}{8 \sqrt{-4+5 \sec ^2(x)}}-\frac{5 \cot (x)}{2 \sqrt{1+5 \tan ^2(x)}}+\frac{9}{2} \cot (x) \sqrt{1+5 \tan ^2(x)}-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{1+5 x^2}} \, dx,x,\tan (x)\right )\\ &=\frac{\cos (x)}{4 \sqrt{-4+5 \sec ^2(x)}}-\frac{5 \sec (x)}{8 \sqrt{-4+5 \sec ^2(x)}}-\frac{5 \cot (x)}{2 \sqrt{1+5 \tan ^2(x)}}+\frac{9}{2} \cot (x) \sqrt{1+5 \tan ^2(x)}-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1-4 x^2} \, dx,x,\frac{\tan (x)}{\sqrt{1+5 \tan ^2(x)}}\right )\\ &=-\frac{1}{4} \tanh ^{-1}\left (\frac{2 \tan (x)}{\sqrt{1+5 \tan ^2(x)}}\right )+\frac{\cos (x)}{4 \sqrt{-4+5 \sec ^2(x)}}-\frac{5 \sec (x)}{8 \sqrt{-4+5 \sec ^2(x)}}-\frac{5 \cot (x)}{2 \sqrt{1+5 \tan ^2(x)}}+\frac{9}{2} \cot (x) \sqrt{1+5 \tan ^2(x)}\\ \end{align*}

Mathematica [A]  time = 0.512624, size = 131, normalized size = 1.39 \[ -\frac{\sin ^2(x) (2 \cos (2 x)-3)^{3/2} \tan (x) \left (2 \cot ^2(x) \csc (x)-1\right ) \left (\sqrt{4 \sin ^2(x)+1} \left (16 \csc ^3(x)-3 \csc ^2(x)+164 \csc (x)-2\right )-2 \left (\csc ^2(x)+4\right ) \sinh ^{-1}(2 \sin (x))\right )}{2 \sqrt{-(3-2 \cos (2 x))^2} \sqrt{5 \tan ^2(x)+1} \left (\cot ^2(x)+5\right ) (-3 \sin (x)+\sin (3 x)+4 \cos (2 x)+4)} \]

Antiderivative was successfully verified.

[In]

Integrate[(-2*Cot[x]^2 + Sin[x])/(1 + 5*Tan[x]^2)^(3/2),x]

[Out]

-((-3 + 2*Cos[2*x])^(3/2)*(-1 + 2*Cot[x]^2*Csc[x])*Sin[x]^2*(-2*ArcSinh[2*Sin[x]]*(4 + Csc[x]^2) + (-2 + 164*C
sc[x] - 3*Csc[x]^2 + 16*Csc[x]^3)*Sqrt[1 + 4*Sin[x]^2])*Tan[x])/(2*Sqrt[-(3 - 2*Cos[2*x])^2]*(5 + Cot[x]^2)*(4
 + 4*Cos[2*x] - 3*Sin[x] + Sin[3*x])*Sqrt[1 + 5*Tan[x]^2])

________________________________________________________________________________________

Maple [C]  time = 0.412, size = 975, normalized size = 10.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-2*cot(x)^2+sin(x))/(1+5*tan(x)^2)^(3/2),x)

[Out]

-1/8*I/(-9+4*5^(1/2))^(1/2)/(2+5^(1/2))^2/(-2+5^(1/2))^2/(4*cos(x)^2-5)^2*(-4*I*2^(1/2)*cos(x)*sin(x)*Elliptic
F(I*(-2+5^(1/2))*(cos(x)-1)/sin(x),9+4*5^(1/2))*((2*cos(x)*5^(1/2)-2*5^(1/2)-4*cos(x)+5)/(cos(x)+1))^(1/2)*(-2
*(2*cos(x)*5^(1/2)-2*5^(1/2)+4*cos(x)-5)/(cos(x)+1))^(1/2)+3*I*arctanh(1/2*(-16)^(1/2)*cos(x)*(cos(x)-1)/sin(x
)^2/(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2))*cos(x)*sin(x)*5^(1/2)*(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2)-4*I*Ellip
ticF(I*(-2+5^(1/2))*(cos(x)-1)/sin(x),9+4*5^(1/2))*sin(x)*2^(1/2)*((2*cos(x)*5^(1/2)-2*5^(1/2)-4*cos(x)+5)/(co
s(x)+1))^(1/2)*(-2*(2*cos(x)*5^(1/2)-2*5^(1/2)+4*cos(x)-5)/(cos(x)+1))^(1/2)+8*I*EllipticPi((-9+4*5^(1/2))^(1/
2)*(cos(x)-1)/sin(x),-1/(-9+4*5^(1/2)),(-9-4*5^(1/2))^(1/2)/(-9+4*5^(1/2))^(1/2))*sin(x)*2^(1/2)*((2*cos(x)*5^
(1/2)-2*5^(1/2)-4*cos(x)+5)/(cos(x)+1))^(1/2)*(-2*(2*cos(x)*5^(1/2)-2*5^(1/2)+4*cos(x)-5)/(cos(x)+1))^(1/2)+8*
I*EllipticPi((-9+4*5^(1/2))^(1/2)*(cos(x)-1)/sin(x),-1/(-9+4*5^(1/2)),(-9-4*5^(1/2))^(1/2)/(-9+4*5^(1/2))^(1/2
))*cos(x)*sin(x)*2^(1/2)*((2*cos(x)*5^(1/2)-2*5^(1/2)-4*cos(x)+5)/(cos(x)+1))^(1/2)*(-2*(2*cos(x)*5^(1/2)-2*5^
(1/2)+4*cos(x)-5)/(cos(x)+1))^(1/2)-6*I*arctanh(1/2*(-16)^(1/2)*cos(x)*(cos(x)-1)/sin(x)^2/(-(4*cos(x)^2-5)/(c
os(x)+1)^2)^(1/2))*sin(x)*(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2)+3*I*sin(x)*5^(1/2)*arctanh(1/2*(-16)^(1/2)*cos(
x)*(cos(x)-1)/sin(x)^2/(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2))*(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2)+3*arctan(2*c
os(x)*(cos(x)-1)/sin(x)^2/(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2))*cos(x)*sin(x)*5^(1/2)*(-(4*cos(x)^2-5)/(cos(x)
+1)^2)^(1/2)-6*I*cos(x)*sin(x)*arctanh(1/2*(-16)^(1/2)*cos(x)*(cos(x)-1)/sin(x)^2/(-(4*cos(x)^2-5)/(cos(x)+1)^
2)^(1/2))*(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2)-6*arctan(2*cos(x)*(cos(x)-1)/sin(x)^2/(-(4*cos(x)^2-5)/(cos(x)+
1)^2)^(1/2))*(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2)*sin(x)*cos(x)+3*sin(x)*5^(1/2)*arctan(2*cos(x)*(cos(x)-1)/si
n(x)^2/(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2))*(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2)-2*cos(x)^2*sin(x)*5^(1/2)-6*
arctan(2*cos(x)*(cos(x)-1)/sin(x)^2/(-(4*cos(x)^2-5)/(cos(x)+1)^2)^(1/2))*sin(x)*(-(4*cos(x)^2-5)/(cos(x)+1)^2
)^(1/2)+4*cos(x)^2*sin(x)+164*cos(x)^2*5^(1/2)-328*cos(x)^2+5*sin(x)*5^(1/2)-10*sin(x)-180*5^(1/2)+360)*cos(x)
^3*(-(4*cos(x)^2-5)/cos(x)^2)^(3/2)/sin(x)

________________________________________________________________________________________

Maxima [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((-2*cot(x)^2+sin(x))/(1+5*tan(x)^2)^(3/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [A]  time = 4.15037, size = 285, normalized size = 3.03 \begin{align*} \frac{2 \,{\left (4 \, \cos \left (x\right )^{2} - 5\right )} \log \left (\sqrt{-\frac{4 \, \cos \left (x\right )^{2} - 5}{\cos \left (x\right )^{2}}} \cos \left (x\right ) - 2 \, \sin \left (x\right )\right ) \sin \left (x\right ) +{\left (164 \, \cos \left (x\right )^{3} -{\left (2 \, \cos \left (x\right )^{3} - 5 \, \cos \left (x\right )\right )} \sin \left (x\right ) - 180 \, \cos \left (x\right )\right )} \sqrt{-\frac{4 \, \cos \left (x\right )^{2} - 5}{\cos \left (x\right )^{2}}}}{8 \,{\left (4 \, \cos \left (x\right )^{2} - 5\right )} \sin \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*cot(x)^2+sin(x))/(1+5*tan(x)^2)^(3/2),x, algorithm="fricas")

[Out]

1/8*(2*(4*cos(x)^2 - 5)*log(sqrt(-(4*cos(x)^2 - 5)/cos(x)^2)*cos(x) - 2*sin(x))*sin(x) + (164*cos(x)^3 - (2*co
s(x)^3 - 5*cos(x))*sin(x) - 180*cos(x))*sqrt(-(4*cos(x)^2 - 5)/cos(x)^2))/((4*cos(x)^2 - 5)*sin(x))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \int - \frac{\sin{\left (x \right )}}{5 \sqrt{5 \tan ^{2}{\left (x \right )} + 1} \tan ^{2}{\left (x \right )} + \sqrt{5 \tan ^{2}{\left (x \right )} + 1}}\, dx - \int \frac{2 \cot ^{2}{\left (x \right )}}{5 \sqrt{5 \tan ^{2}{\left (x \right )} + 1} \tan ^{2}{\left (x \right )} + \sqrt{5 \tan ^{2}{\left (x \right )} + 1}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*cot(x)**2+sin(x))/(1+5*tan(x)**2)**(3/2),x)

[Out]

-Integral(-sin(x)/(5*sqrt(5*tan(x)**2 + 1)*tan(x)**2 + sqrt(5*tan(x)**2 + 1)), x) - Integral(2*cot(x)**2/(5*sq
rt(5*tan(x)**2 + 1)*tan(x)**2 + sqrt(5*tan(x)**2 + 1)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{2 \, \cot \left (x\right )^{2} - \sin \left (x\right )}{{\left (5 \, \tan \left (x\right )^{2} + 1\right )}^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*cot(x)^2+sin(x))/(1+5*tan(x)^2)^(3/2),x, algorithm="giac")

[Out]

integrate(-(2*cot(x)^2 - sin(x))/(5*tan(x)^2 + 1)^(3/2), x)