3.439 \(\int \frac{\csc ^2(x) (\sec ^2(x)-3 \tan (x) \sqrt{4 \sec ^2(x)+5 \tan ^2(x)})}{(4 \sec ^2(x)+5 \tan ^2(x))^{3/2}} \, dx\)

Optimal. Leaf size=57 \[ -\frac{7 \tan (x)}{8 \sqrt{9 \tan ^2(x)+4}}+\frac{3}{8} \log \left (9 \tan ^2(x)+4\right )-\frac{3}{4} \log (\tan (x))-\frac{\cot (x)}{4 \sqrt{9 \tan ^2(x)+4}} \]

[Out]

(-3*Log[Tan[x]])/4 + (3*Log[4 + 9*Tan[x]^2])/8 - Cot[x]/(4*Sqrt[4 + 9*Tan[x]^2]) - (7*Tan[x])/(8*Sqrt[4 + 9*Ta
n[x]^2])

________________________________________________________________________________________

Rubi [A]  time = 0.849005, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 48, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.146, Rules used = {6742, 191, 271, 266, 36, 29, 31} \[ -\frac{7 \tan (x)}{8 \sqrt{9 \tan ^2(x)+4}}+\frac{3}{8} \log \left (9 \tan ^2(x)+4\right )-\frac{3}{4} \log (\tan (x))-\frac{\cot (x)}{4 \sqrt{9 \tan ^2(x)+4}} \]

Antiderivative was successfully verified.

[In]

Int[(Csc[x]^2*(Sec[x]^2 - 3*Tan[x]*Sqrt[4*Sec[x]^2 + 5*Tan[x]^2]))/(4*Sec[x]^2 + 5*Tan[x]^2)^(3/2),x]

[Out]

(-3*Log[Tan[x]])/4 + (3*Log[4 + 9*Tan[x]^2])/8 - Cot[x]/(4*Sqrt[4 + 9*Tan[x]^2]) - (7*Tan[x])/(8*Sqrt[4 + 9*Ta
n[x]^2])

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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]

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 266

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

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

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

Mathematica [B]  time = 1.81516, size = 116, normalized size = 2.04 \[ \frac{-5 \tan (x)+5 \cot (x)-9 \csc (x) \sec (x)-6 \sqrt{2} \log \left (\tan \left (\frac{x}{2}\right )\right ) \sqrt{5 \tan ^2(x)+13 \sec ^2(x)-5}+6 \sqrt{\frac{13-5 \cos (2 x)}{\cos (2 x)+1}} \log \left (\tan ^4\left (\frac{x}{2}\right )+7 \tan ^2\left (\frac{x}{2}\right )+1\right )}{16 \sqrt{\frac{13-5 \cos (2 x)}{\cos (2 x)+1}}} \]

Antiderivative was successfully verified.

[In]

Integrate[(Csc[x]^2*(Sec[x]^2 - 3*Tan[x]*Sqrt[4*Sec[x]^2 + 5*Tan[x]^2]))/(4*Sec[x]^2 + 5*Tan[x]^2)^(3/2),x]

[Out]

(5*Cot[x] + 6*Sqrt[(13 - 5*Cos[2*x])/(1 + Cos[2*x])]*Log[1 + 7*Tan[x/2]^2 + Tan[x/2]^4] - 9*Csc[x]*Sec[x] - 5*
Tan[x] - 6*Sqrt[2]*Log[Tan[x/2]]*Sqrt[-5 + 13*Sec[x]^2 + 5*Tan[x]^2])/(16*Sqrt[(13 - 5*Cos[2*x])/(1 + Cos[2*x]
)])

________________________________________________________________________________________

Maple [B]  time = 0.337, size = 117, normalized size = 2.1 \begin{align*} -{\frac{1}{8\, \left ( \cos \left ( x \right ) \right ) ^{3}\sin \left ( x \right ) } \left ( 6\, \left ( -{\frac{5\, \left ( \cos \left ( x \right ) \right ) ^{2}-9}{ \left ( \cos \left ( x \right ) \right ) ^{2}}} \right ) ^{3/2}\ln \left ( -{\frac{\cos \left ( x \right ) -1}{\sin \left ( x \right ) }} \right ) \left ( \cos \left ( x \right ) \right ) ^{3}\sin \left ( x \right ) -3\, \left ( -{\frac{5\, \left ( \cos \left ( x \right ) \right ) ^{2}-9}{ \left ( \cos \left ( x \right ) \right ) ^{2}}} \right ) ^{3/2}\ln \left ( -{\frac{5\, \left ( \cos \left ( x \right ) \right ) ^{2}-9}{ \left ( \cos \left ( x \right ) +1 \right ) ^{2}}} \right ) \left ( \cos \left ( x \right ) \right ) ^{3}\sin \left ( x \right ) +25\, \left ( \cos \left ( x \right ) \right ) ^{4}-80\, \left ( \cos \left ( x \right ) \right ) ^{2}+63 \right ) \left ( -{\frac{5\, \left ( \cos \left ( x \right ) \right ) ^{2}-9}{ \left ( \cos \left ( x \right ) \right ) ^{2}}} \right ) ^{-{\frac{3}{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8*(6*(-(5*cos(x)^2-9)/cos(x)^2)^(3/2)*ln(-(cos(x)-1)/sin(x))*cos(x)^3*sin(x)-3*(-(5*cos(x)^2-9)/cos(x)^2)^(
3/2)*ln(-(5*cos(x)^2-9)/(cos(x)+1)^2)*cos(x)^3*sin(x)+25*cos(x)^4-80*cos(x)^2+63)/(-(5*cos(x)^2-9)/cos(x)^2)^(
3/2)/cos(x)^3/sin(x)

________________________________________________________________________________________

Maxima [A]  time = 1.428, size = 63, normalized size = 1.11 \begin{align*} -\frac{7 \, \tan \left (x\right )}{8 \, \sqrt{9 \, \tan \left (x\right )^{2} + 4}} - \frac{1}{4 \, \sqrt{9 \, \tan \left (x\right )^{2} + 4} \tan \left (x\right )} + \frac{3}{8} \, \log \left (9 \, \tan \left (x\right )^{2} + 4\right ) - \frac{3}{4} \, \log \left (\tan \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)^2-3*(4*sec(x)^2+5*tan(x)^2)^(1/2)*tan(x))/sin(x)^2/(4*sec(x)^2+5*tan(x)^2)^(3/2),x, algorith
m="maxima")

[Out]

-7/8*tan(x)/sqrt(9*tan(x)^2 + 4) - 1/4/(sqrt(9*tan(x)^2 + 4)*tan(x)) + 3/8*log(9*tan(x)^2 + 4) - 3/4*log(tan(x
))

________________________________________________________________________________________

Fricas [A]  time = 3.26581, size = 252, normalized size = 4.42 \begin{align*} \frac{3 \,{\left (5 \, \cos \left (x\right )^{2} - 9\right )} \log \left (-\frac{5}{4} \, \cos \left (x\right )^{2} + \frac{9}{4}\right ) \sin \left (x\right ) - 6 \,{\left (5 \, \cos \left (x\right )^{2} - 9\right )} \log \left (\frac{1}{2} \, \sin \left (x\right )\right ) \sin \left (x\right ) -{\left (5 \, \cos \left (x\right )^{3} - 7 \, \cos \left (x\right )\right )} \sqrt{-\frac{5 \, \cos \left (x\right )^{2} - 9}{\cos \left (x\right )^{2}}}}{8 \,{\left (5 \, \cos \left (x\right )^{2} - 9\right )} \sin \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)^2-3*(4*sec(x)^2+5*tan(x)^2)^(1/2)*tan(x))/sin(x)^2/(4*sec(x)^2+5*tan(x)^2)^(3/2),x, algorith
m="fricas")

[Out]

1/8*(3*(5*cos(x)^2 - 9)*log(-5/4*cos(x)^2 + 9/4)*sin(x) - 6*(5*cos(x)^2 - 9)*log(1/2*sin(x))*sin(x) - (5*cos(x
)^3 - 7*cos(x))*sqrt(-(5*cos(x)^2 - 9)/cos(x)^2))/((5*cos(x)^2 - 9)*sin(x))

________________________________________________________________________________________

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((sec(x)**2-3*(4*sec(x)**2+5*tan(x)**2)**(1/2)*tan(x))/sin(x)**2/(4*sec(x)**2+5*tan(x)**2)**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)^2-3*(4*sec(x)^2+5*tan(x)^2)^(1/2)*tan(x))/sin(x)^2/(4*sec(x)^2+5*tan(x)^2)^(3/2),x, algorith
m="giac")

[Out]

integrate((sec(x)^2 - 3*sqrt(4*sec(x)^2 + 5*tan(x)^2)*tan(x))/((4*sec(x)^2 + 5*tan(x)^2)^(3/2)*sin(x)^2), x)