3.447 \(\int \frac {\sec ^2(x) (-\cos (2 x)+2 \tan ^2(x))}{(\tan (x) \tan (2 x))^{3/2}} \, dx\)

Optimal. Leaf size=100 \[ \frac {2 \tan ^3(x)}{3 (\tan (x) \tan (2 x))^{3/2}}+\frac {3 \tan (x)}{4 \sqrt {\tan (x) \tan (2 x)}}+\frac {\tan (x)}{2 (\tan (x) \tan (2 x))^{3/2}}+2 \tanh ^{-1}\left (\frac {\tan (x)}{\sqrt {\tan (x) \tan (2 x)}}\right )-\frac {11 \tanh ^{-1}\left (\frac {\sqrt {2} \tan (x)}{\sqrt {\tan (x) \tan (2 x)}}\right )}{4 \sqrt {2}} \]

________________________________________________________________________________________

Rubi [B]  time = 1.23, antiderivative size = 208, normalized size of antiderivative = 2.08, number of steps used = 21, number of rules used = 10, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.345, Rules used = {4397, 12, 6719, 6725, 266, 47, 50, 63, 203, 444} \[ \frac {\left (1-\tan ^2(x)\right ) \tan (x)}{3 \sqrt {2} \sqrt {\frac {\tan ^2(x)}{1-\tan ^2(x)}}}+\frac {3 \tan (x)}{4 \sqrt {2} \sqrt {\frac {\tan ^2(x)}{1-\tan ^2(x)}}}-\frac {11 \tan ^{-1}\left (\sqrt {\tan ^2(x)-1}\right ) \tan (x)}{4 \sqrt {2} \sqrt {\frac {\tan ^2(x)}{1-\tan ^2(x)}} \sqrt {\tan ^2(x)-1}}+\frac {2 \tan ^{-1}\left (\frac {\sqrt {\tan ^2(x)-1}}{\sqrt {2}}\right ) \tan (x)}{\sqrt {\frac {\tan ^2(x)}{1-\tan ^2(x)}} \sqrt {\tan ^2(x)-1}}+\frac {\left (1-\tan ^2(x)\right ) \cot (x)}{4 \sqrt {2} \sqrt {\frac {\tan ^2(x)}{1-\tan ^2(x)}}} \]

Antiderivative was successfully verified.

[In]

Int[(Sec[x]^2*(-Cos[2*x] + 2*Tan[x]^2))/(Tan[x]*Tan[2*x])^(3/2),x]

[Out]

(3*Tan[x])/(4*Sqrt[2]*Sqrt[Tan[x]^2/(1 - Tan[x]^2)]) + (Cot[x]*(1 - Tan[x]^2))/(4*Sqrt[2]*Sqrt[Tan[x]^2/(1 - T
an[x]^2)]) + (Tan[x]*(1 - Tan[x]^2))/(3*Sqrt[2]*Sqrt[Tan[x]^2/(1 - Tan[x]^2)]) - (11*ArcTan[Sqrt[-1 + Tan[x]^2
]]*Tan[x])/(4*Sqrt[2]*Sqrt[Tan[x]^2/(1 - Tan[x]^2)]*Sqrt[-1 + Tan[x]^2]) + (2*ArcTan[Sqrt[-1 + Tan[x]^2]/Sqrt[
2]]*Tan[x])/(Sqrt[Tan[x]^2/(1 - Tan[x]^2)]*Sqrt[-1 + Tan[x]^2])

Rule 12

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

Rule 47

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + 1)), x] - Dist[(d*n)/(b*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d},
x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && LtQ[m, -1] &&  !(IntegerQ[n] &&  !IntegerQ[m]) &&  !(ILeQ[m + n + 2, 0
] && (FractionQ[m] || GeQ[2*n + m + 1, 0])) && IntLinearQ[a, b, c, d, m, n, x]

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 203

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

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 444

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

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rule 6719

Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a*v^m*w^n)^FracPart[p])/(v^(m*F
racPart[p])*w^(n*FracPart[p])), Int[u*v^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] &&  !IntegerQ[p] &&  !
FreeQ[v, x] &&  !FreeQ[w, x]

Rule 6725

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 4.83, size = 168, normalized size = 1.68 \[ \frac {\tan ^2(2 x) \left (2 \tan ^2(x)-\cos (2 x)\right ) \left (-3 \sin (x) \cos (x) \tan ^{-1}\left (\sqrt {\tan ^2(x)-1}\right ) \sqrt {\tan ^2(x)-1}+\frac {4 \sqrt {2} \cos (2 x) \tan (x) \left (\sqrt {2} \tanh ^{-1}\left (\sqrt {1-\tan ^2(x)}\right )-2 \tanh ^{-1}\left (\frac {1}{2} \sqrt {2-2 \tan ^2(x)}\right )\right )}{\sqrt {1-\tan ^2(x)}}+\frac {1}{3} \left (-3 \cot (x)-4 \sin (x) \cos (x)+(9 \cos (2 x)+5) \tan ^3(x)\right )\right )}{2 (6 \cos (2 x)+\cos (4 x)-3) (\tan (x) \tan (2 x))^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[x]^2*(-Cos[2*x] + 2*Tan[x]^2))/(Tan[x]*Tan[2*x])^(3/2),x]

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^2(x) \left (-\cos (2 x)+2 \tan ^2(x)\right )}{(\tan (x) \tan (2 x))^{3/2}} \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[(Sec[x]^2*(-Cos[2*x] + 2*Tan[x]^2))/(Tan[x]*Tan[2*x])^(3/2),x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [B]  time = 1.49, size = 271, normalized size = 2.71 \[ -\frac {24 \, {\left (\cos \relax (x)^{5} - \cos \relax (x)^{3}\right )} \log \left (-\frac {4 \, \sqrt {2} {\left (8 \, \cos \relax (x)^{5} - 6 \, \cos \relax (x)^{3} + \cos \relax (x)\right )} \sqrt {-\frac {\cos \relax (x)^{2} - 1}{2 \, \cos \relax (x)^{2} - 1}} - {\left (32 \, \cos \relax (x)^{4} - 16 \, \cos \relax (x)^{2} + 1\right )} \sin \relax (x)}{\sin \relax (x)}\right ) \sin \relax (x) - 33 \, {\left (\sqrt {2} \cos \relax (x)^{5} - \sqrt {2} \cos \relax (x)^{3}\right )} \log \left (\frac {4 \, {\left (\sqrt {2} {\left (2 \, {\left (3 \, \sqrt {2} - 4\right )} \cos \relax (x)^{3} - {\left (3 \, \sqrt {2} - 4\right )} \cos \relax (x)\right )} \sqrt {-\frac {\cos \relax (x)^{2} - 1}{2 \, \cos \relax (x)^{2} - 1}} + {\left (3 \, {\left (2 \, \sqrt {2} - 3\right )} \cos \relax (x)^{2} - 2 \, \sqrt {2} + 3\right )} \sin \relax (x)\right )}}{{\left (\cos \relax (x)^{2} - 1\right )} \sin \relax (x)}\right ) \sin \relax (x) - 2 \, \sqrt {2} {\left (22 \, \cos \relax (x)^{6} - 47 \, \cos \relax (x)^{4} + 26 \, \cos \relax (x)^{2} - 4\right )} \sqrt {-\frac {\cos \relax (x)^{2} - 1}{2 \, \cos \relax (x)^{2} - 1}} - 44 \, {\left (\cos \relax (x)^{5} - \cos \relax (x)^{3}\right )} \sin \relax (x)}{48 \, {\left (\cos \relax (x)^{5} - \cos \relax (x)^{3}\right )} \sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-cos(2*x)+2*tan(x)^2)/cos(x)^2/(tan(x)*tan(2*x))^(3/2),x, algorithm="fricas")

[Out]

-1/48*(24*(cos(x)^5 - cos(x)^3)*log(-(4*sqrt(2)*(8*cos(x)^5 - 6*cos(x)^3 + cos(x))*sqrt(-(cos(x)^2 - 1)/(2*cos
(x)^2 - 1)) - (32*cos(x)^4 - 16*cos(x)^2 + 1)*sin(x))/sin(x))*sin(x) - 33*(sqrt(2)*cos(x)^5 - sqrt(2)*cos(x)^3
)*log(4*(sqrt(2)*(2*(3*sqrt(2) - 4)*cos(x)^3 - (3*sqrt(2) - 4)*cos(x))*sqrt(-(cos(x)^2 - 1)/(2*cos(x)^2 - 1))
+ (3*(2*sqrt(2) - 3)*cos(x)^2 - 2*sqrt(2) + 3)*sin(x))/((cos(x)^2 - 1)*sin(x)))*sin(x) - 2*sqrt(2)*(22*cos(x)^
6 - 47*cos(x)^4 + 26*cos(x)^2 - 4)*sqrt(-(cos(x)^2 - 1)/(2*cos(x)^2 - 1)) - 44*(cos(x)^5 - cos(x)^3)*sin(x))/(
(cos(x)^5 - cos(x)^3)*sin(x))

________________________________________________________________________________________

giac [B]  time = 1.87, size = 193, normalized size = 1.93 \[ -\frac {\sqrt {2} {\left (2 \, {\left (-\tan \relax (x)^{2} + 1\right )}^{\frac {3}{2}} + 3 \, \sqrt {-\tan \relax (x)^{2} + 1}\right )}}{12 \, \mathrm {sgn}\left (\tan \relax (x)^{2} - 1\right ) \mathrm {sgn}\left (\tan \relax (x)\right )} + \frac {11 \, \sqrt {2} \log \left (\sqrt {-\tan \relax (x)^{2} + 1} + 1\right )}{16 \, \mathrm {sgn}\left (\tan \relax (x)^{2} - 1\right ) \mathrm {sgn}\left (\tan \relax (x)\right )} - \frac {11 \, \sqrt {2} \log \left (-\sqrt {-\tan \relax (x)^{2} + 1} + 1\right )}{16 \, \mathrm {sgn}\left (\tan \relax (x)^{2} - 1\right ) \mathrm {sgn}\left (\tan \relax (x)\right )} + \frac {\log \left (\frac {\sqrt {2} - \sqrt {-\tan \relax (x)^{2} + 1}}{\sqrt {2} + \sqrt {-\tan \relax (x)^{2} + 1}}\right )}{\mathrm {sgn}\left (\tan \relax (x)^{2} - 1\right ) \mathrm {sgn}\left (\tan \relax (x)\right )} - \frac {\sqrt {2} \sqrt {-\tan \relax (x)^{2} + 1}}{8 \, \mathrm {sgn}\left (\tan \relax (x)^{2} - 1\right ) \mathrm {sgn}\left (\tan \relax (x)\right ) \tan \relax (x)^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-cos(2*x)+2*tan(x)^2)/cos(x)^2/(tan(x)*tan(2*x))^(3/2),x, algorithm="giac")

[Out]

-1/12*sqrt(2)*(2*(-tan(x)^2 + 1)^(3/2) + 3*sqrt(-tan(x)^2 + 1))/(sgn(tan(x)^2 - 1)*sgn(tan(x))) + 11/16*sqrt(2
)*log(sqrt(-tan(x)^2 + 1) + 1)/(sgn(tan(x)^2 - 1)*sgn(tan(x))) - 11/16*sqrt(2)*log(-sqrt(-tan(x)^2 + 1) + 1)/(
sgn(tan(x)^2 - 1)*sgn(tan(x))) + log((sqrt(2) - sqrt(-tan(x)^2 + 1))/(sqrt(2) + sqrt(-tan(x)^2 + 1)))/(sgn(tan
(x)^2 - 1)*sgn(tan(x))) - 1/8*sqrt(2)*sqrt(-tan(x)^2 + 1)/(sgn(tan(x)^2 - 1)*sgn(tan(x))*tan(x)^2)

________________________________________________________________________________________

maple [B]  time = 1.02, size = 559, normalized size = 5.59




method result size



default \(-\frac {\sqrt {2}\, \sqrt {4}\, \left (-1+\cos \relax (x )\right )^{2} \left (-48 \left (\cos ^{4}\relax (x )\right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {2}\, \cos \relax (x ) \sqrt {4}\, \left (-1+\cos \relax (x )\right )}{2 \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}\, \sin \relax (x )^{2}}\right )+22 \left (\cos ^{4}\relax (x )\right ) \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}-168 \left (\cos ^{4}\relax (x )\right ) \ln \left (-\frac {4 \left (\left (\cos ^{2}\relax (x )\right ) \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}-2 \left (\cos ^{2}\relax (x )\right )+\cos \relax (x )-\sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}+1\right )}{\sin \relax (x )^{2}}\right )+33 \left (\cos ^{4}\relax (x )\right ) \arctanh \left (\frac {\sqrt {4}\, \left (2 \left (\cos ^{2}\relax (x )\right )-3 \cos \relax (x )+1\right )}{2 \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}\, \sin \relax (x )^{2}}\right )+201 \left (\cos ^{4}\relax (x )\right ) \ln \left (-\frac {2 \left (\left (\cos ^{2}\relax (x )\right ) \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}-2 \left (\cos ^{2}\relax (x )\right )+\cos \relax (x )-\sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}+1\right )}{\sin \relax (x )^{2}}\right )+48 \left (\cos ^{3}\relax (x )\right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {2}\, \cos \relax (x ) \sqrt {4}\, \left (-1+\cos \relax (x )\right )}{2 \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}\, \sin \relax (x )^{2}}\right )+168 \left (\cos ^{3}\relax (x )\right ) \ln \left (-\frac {4 \left (\left (\cos ^{2}\relax (x )\right ) \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}-2 \left (\cos ^{2}\relax (x )\right )+\cos \relax (x )-\sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}+1\right )}{\sin \relax (x )^{2}}\right )-33 \left (\cos ^{3}\relax (x )\right ) \arctanh \left (\frac {\sqrt {4}\, \left (2 \left (\cos ^{2}\relax (x )\right )-3 \cos \relax (x )+1\right )}{2 \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}\, \sin \relax (x )^{2}}\right )-201 \left (\cos ^{3}\relax (x )\right ) \ln \left (-\frac {2 \left (\left (\cos ^{2}\relax (x )\right ) \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}-2 \left (\cos ^{2}\relax (x )\right )+\cos \relax (x )-\sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}+1\right )}{\sin \relax (x )^{2}}\right )-36 \left (\cos ^{2}\relax (x )\right ) \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}+8 \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}\right )}{96 \cos \relax (x )^{3} \sin \relax (x )^{3} \left (\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}\right )^{\frac {3}{2}} \left (\frac {\sin ^{2}\relax (x )}{2 \left (\cos ^{2}\relax (x )\right )-1}\right )^{\frac {3}{2}}}\) \(559\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-cos(2*x)+2*tan(x)^2)/cos(x)^2/(tan(x)*tan(2*x))^(3/2),x,method=_RETURNVERBOSE)

[Out]

-1/96*2^(1/2)*4^(1/2)*(-1+cos(x))^2*(-48*cos(x)^4*2^(1/2)*arctanh(1/2*2^(1/2)*cos(x)*4^(1/2)*(-1+cos(x))/((2*c
os(x)^2-1)/(1+cos(x))^2)^(1/2)/sin(x)^2)+22*cos(x)^4*((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)-168*cos(x)^4*ln(-4*(c
os(x)^2*((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)-2*cos(x)^2+cos(x)-((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)+1)/sin(x)^2)
+33*cos(x)^4*arctanh(1/2*4^(1/2)*(2*cos(x)^2-3*cos(x)+1)/((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)/sin(x)^2)+201*cos
(x)^4*ln(-2*(cos(x)^2*((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)-2*cos(x)^2+cos(x)-((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2
)+1)/sin(x)^2)+48*cos(x)^3*2^(1/2)*arctanh(1/2*2^(1/2)*cos(x)*4^(1/2)*(-1+cos(x))/((2*cos(x)^2-1)/(1+cos(x))^2
)^(1/2)/sin(x)^2)+168*cos(x)^3*ln(-4*(cos(x)^2*((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)-2*cos(x)^2+cos(x)-((2*cos(x
)^2-1)/(1+cos(x))^2)^(1/2)+1)/sin(x)^2)-33*cos(x)^3*arctanh(1/2*4^(1/2)*(2*cos(x)^2-3*cos(x)+1)/((2*cos(x)^2-1
)/(1+cos(x))^2)^(1/2)/sin(x)^2)-201*cos(x)^3*ln(-2*(cos(x)^2*((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)-2*cos(x)^2+co
s(x)-((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)+1)/sin(x)^2)-36*cos(x)^2*((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)+8*((2*co
s(x)^2-1)/(1+cos(x))^2)^(1/2))/cos(x)^3/sin(x)^3/((2*cos(x)^2-1)/(1+cos(x))^2)^(3/2)/(sin(x)^2/(2*cos(x)^2-1))
^(3/2)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {2 \, \tan \relax (x)^{2} - \cos \left (2 \, x\right )}{\left (\tan \left (2 \, x\right ) \tan \relax (x)\right )^{\frac {3}{2}} \cos \relax (x)^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-cos(2*x)+2*tan(x)^2)/cos(x)^2/(tan(x)*tan(2*x))^(3/2),x, algorithm="maxima")

[Out]

integrate((2*tan(x)^2 - cos(2*x))/((tan(2*x)*tan(x))^(3/2)*cos(x)^2), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ -\int \frac {\cos \left (2\,x\right )-2\,{\mathrm {tan}\relax (x)}^2}{{\cos \relax (x)}^2\,{\left (\mathrm {tan}\left (2\,x\right )\,\mathrm {tan}\relax (x)\right )}^{3/2}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(cos(2*x) - 2*tan(x)^2)/(cos(x)^2*(tan(2*x)*tan(x))^(3/2)),x)

[Out]

-int((cos(2*x) - 2*tan(x)^2)/(cos(x)^2*(tan(2*x)*tan(x))^(3/2)), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-cos(2*x)+2*tan(x)**2)/cos(x)**2/(tan(x)*tan(2*x))**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________