\(\int \frac {\cos (2 (a+b x))}{\sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \, dx\) [624]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [F(-1)]
   Mupad [F(-1)]

Optimal result

Integrand size = 29, antiderivative size = 138 \[ \int \frac {\cos (2 (a+b x))}{\sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {c} \tan (2 a+2 b x)}{\sqrt {-c+c \sec (2 a+2 b x)}}\right )}{2 b \sqrt {c}}-\frac {\text {arctanh}\left (\frac {\sqrt {c} \tan (2 a+2 b x)}{\sqrt {2} \sqrt {-c+c \sec (2 a+2 b x)}}\right )}{\sqrt {2} b \sqrt {c}}+\frac {\sin (2 a+2 b x)}{2 b \sqrt {-c+c \sec (2 a+2 b x)}} \]

[Out]

1/2*arctanh(c^(1/2)*tan(2*b*x+2*a)/(-c+c*sec(2*b*x+2*a))^(1/2))/b/c^(1/2)-1/2*arctanh(1/2*c^(1/2)*tan(2*b*x+2*
a)*2^(1/2)/(-c+c*sec(2*b*x+2*a))^(1/2))/b*2^(1/2)/c^(1/2)+1/2*sin(2*b*x+2*a)/b/(-c+c*sec(2*b*x+2*a))^(1/2)

Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {4482, 3908, 3989, 3972, 492, 212} \[ \int \frac {\cos (2 (a+b x))}{\sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {c} \tan (2 a+2 b x)}{\sqrt {c \sec (2 a+2 b x)-c}}\right )}{2 b \sqrt {c}}-\frac {\text {arctanh}\left (\frac {\sqrt {c} \tan (2 a+2 b x)}{\sqrt {2} \sqrt {c \sec (2 a+2 b x)-c}}\right )}{\sqrt {2} b \sqrt {c}}+\frac {\sin (2 a+2 b x)}{2 b \sqrt {c \sec (2 a+2 b x)-c}} \]

[In]

Int[Cos[2*(a + b*x)]/Sqrt[c*Tan[a + b*x]*Tan[2*(a + b*x)]],x]

[Out]

ArcTanh[(Sqrt[c]*Tan[2*a + 2*b*x])/Sqrt[-c + c*Sec[2*a + 2*b*x]]]/(2*b*Sqrt[c]) - ArcTanh[(Sqrt[c]*Tan[2*a + 2
*b*x])/(Sqrt[2]*Sqrt[-c + c*Sec[2*a + 2*b*x]])]/(Sqrt[2]*b*Sqrt[c]) + Sin[2*a + 2*b*x]/(2*b*Sqrt[-c + c*Sec[2*
a + 2*b*x]])

Rule 212

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

Rule 492

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

Rule 3908

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[Cot[e +
 f*x]*((d*Csc[e + f*x])^n/(f*n*Sqrt[a + b*Csc[e + f*x]])), x] + Dist[1/(2*b*d*n), Int[(d*Csc[e + f*x])^(n + 1)
*((a + b*(2*n + 1)*Csc[e + f*x])/Sqrt[a + b*Csc[e + f*x]]), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b
^2, 0] && LtQ[n, 0] && IntegerQ[2*n]

Rule 3972

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[-2*(a^(m/2 +
 n + 1/2)/d), Subst[Int[x^m*((2 + a*x^2)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 3989

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Di
st[((-a)*c)^m, Int[Cot[e + f*x]^(2*m)*(c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x]
&& EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !(IntegerQ[n] && GtQ[m - n, 0])

Rule 4482

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {\cos (2 a+2 b x)}{\sqrt {-c+c \sec (2 a+2 b x)}} \, dx \\ & = \frac {\sin (2 a+2 b x)}{2 b \sqrt {-c+c \sec (2 a+2 b x)}}-\frac {\int \frac {-c-c \sec (2 a+2 b x)}{\sqrt {-c+c \sec (2 a+2 b x)}} \, dx}{2 c} \\ & = \frac {\sin (2 a+2 b x)}{2 b \sqrt {-c+c \sec (2 a+2 b x)}}+\frac {1}{2} c \int \frac {\tan ^2(2 a+2 b x)}{(-c+c \sec (2 a+2 b x))^{3/2}} \, dx \\ & = \frac {\sin (2 a+2 b x)}{2 b \sqrt {-c+c \sec (2 a+2 b x)}}-\frac {c \text {Subst}\left (\int \frac {x^2}{\left (1-c x^2\right ) \left (2-c x^2\right )} \, dx,x,-\frac {\tan (2 a+2 b x)}{\sqrt {-c+c \sec (2 a+2 b x)}}\right )}{2 b} \\ & = \frac {\sin (2 a+2 b x)}{2 b \sqrt {-c+c \sec (2 a+2 b x)}}-\frac {\text {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,-\frac {\tan (2 a+2 b x)}{\sqrt {-c+c \sec (2 a+2 b x)}}\right )}{2 b}+\frac {\text {Subst}\left (\int \frac {1}{2-c x^2} \, dx,x,-\frac {\tan (2 a+2 b x)}{\sqrt {-c+c \sec (2 a+2 b x)}}\right )}{b} \\ & = \frac {\text {arctanh}\left (\frac {\sqrt {c} \tan (2 a+2 b x)}{\sqrt {-c+c \sec (2 a+2 b x)}}\right )}{2 b \sqrt {c}}-\frac {\text {arctanh}\left (\frac {\sqrt {c} \tan (2 a+2 b x)}{\sqrt {2} \sqrt {-c+c \sec (2 a+2 b x)}}\right )}{\sqrt {2} b \sqrt {c}}+\frac {\sin (2 a+2 b x)}{2 b \sqrt {-c+c \sec (2 a+2 b x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 2.43 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.18 \[ \int \frac {\cos (2 (a+b x))}{\sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \, dx=-\frac {\tan (a+b x) \left (\text {arctanh}\left (\sqrt {1-\tan ^2(a+b x)}\right )-\sqrt {2} \left (\text {arctanh}\left (\frac {\sqrt {1-\tan ^2(a+b x)}}{\sqrt {2}}\right )+\cos ^2(a+b x) \sqrt {\frac {1}{1+\sec (2 (a+b x))}} \left (2+\arctan \left (\sqrt {-1+\tan ^2(a+b x)}\right ) \sec (2 (a+b x)) \sqrt {-1+\tan ^2(a+b x)}\right )\right )\right )}{2 b \sqrt {1-\tan ^2(a+b x)} \sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \]

[In]

Integrate[Cos[2*(a + b*x)]/Sqrt[c*Tan[a + b*x]*Tan[2*(a + b*x)]],x]

[Out]

-1/2*(Tan[a + b*x]*(ArcTanh[Sqrt[1 - Tan[a + b*x]^2]] - Sqrt[2]*(ArcTanh[Sqrt[1 - Tan[a + b*x]^2]/Sqrt[2]] + C
os[a + b*x]^2*Sqrt[(1 + Sec[2*(a + b*x)])^(-1)]*(2 + ArcTan[Sqrt[-1 + Tan[a + b*x]^2]]*Sec[2*(a + b*x)]*Sqrt[-
1 + Tan[a + b*x]^2]))))/(b*Sqrt[1 - Tan[a + b*x]^2]*Sqrt[c*Tan[a + b*x]*Tan[2*(a + b*x)]])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(589\) vs. \(2(117)=234\).

Time = 3.28 (sec) , antiderivative size = 590, normalized size of antiderivative = 4.28

method result size
default \(\frac {\sqrt {2}\, \sin \left (x b +a \right ) \left (2 \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}\, \cos \left (x b +a \right )^{2}+3 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\cos \left (x b +a \right ) \sqrt {2}}{\left (1+\cos \left (x b +a \right )\right ) \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}}\right )+2 \cos \left (x b +a \right ) \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}-2 \,\operatorname {arctanh}\left (\frac {2 \cos \left (x b +a \right )-1}{\left (1+\cos \left (x b +a \right )\right ) \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}}\right )+2 \ln \left (\frac {2 \cos \left (x b +a \right ) \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}+2 \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}-4 \cos \left (x b +a \right )-2}{1+\cos \left (x b +a \right )}\right )\right ) \sqrt {4}}{8 b \left (1+\cos \left (x b +a \right )\right ) \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}\, \sqrt {\frac {c \sin \left (x b +a \right )^{2}}{2 \cos \left (x b +a \right )^{2}-1}}}-\frac {\sqrt {2}\, \sin \left (x b +a \right ) \left (2 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\cos \left (x b +a \right ) \sqrt {2}}{\left (1+\cos \left (x b +a \right )\right ) \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}}\right )+\ln \left (\frac {2 \cos \left (x b +a \right ) \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}+2 \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}-4 \cos \left (x b +a \right )-2}{1+\cos \left (x b +a \right )}\right )-\operatorname {arctanh}\left (\frac {2 \cos \left (x b +a \right )-1}{\left (1+\cos \left (x b +a \right )\right ) \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}}\right )\right ) \sqrt {4}}{8 b \left (1+\cos \left (x b +a \right )\right ) \sqrt {\frac {c \sin \left (x b +a \right )^{2}}{2 \cos \left (x b +a \right )^{2}-1}}\, \sqrt {\frac {2 \cos \left (x b +a \right )^{2}-1}{\left (1+\cos \left (x b +a \right )\right )^{2}}}}\) \(590\)

[In]

int(cos(2*b*x+2*a)/(c*tan(b*x+a)*tan(2*b*x+2*a))^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/8*2^(1/2)/b*sin(b*x+a)*(2*((2*cos(b*x+a)^2-1)/(1+cos(b*x+a))^2)^(1/2)*cos(b*x+a)^2+3*2^(1/2)*arctanh(cos(b*x
+a)/(1+cos(b*x+a))/((2*cos(b*x+a)^2-1)/(1+cos(b*x+a))^2)^(1/2)*2^(1/2))+2*cos(b*x+a)*((2*cos(b*x+a)^2-1)/(1+co
s(b*x+a))^2)^(1/2)-2*arctanh((2*cos(b*x+a)-1)/(1+cos(b*x+a))/((2*cos(b*x+a)^2-1)/(1+cos(b*x+a))^2)^(1/2))+2*ln
(2*(cos(b*x+a)*((2*cos(b*x+a)^2-1)/(1+cos(b*x+a))^2)^(1/2)+((2*cos(b*x+a)^2-1)/(1+cos(b*x+a))^2)^(1/2)-2*cos(b
*x+a)-1)/(1+cos(b*x+a))))/(1+cos(b*x+a))/((2*cos(b*x+a)^2-1)/(1+cos(b*x+a))^2)^(1/2)/(c*sin(b*x+a)^2/(2*cos(b*
x+a)^2-1))^(1/2)*4^(1/2)-1/8*2^(1/2)/b*sin(b*x+a)*(2*2^(1/2)*arctanh(cos(b*x+a)/(1+cos(b*x+a))/((2*cos(b*x+a)^
2-1)/(1+cos(b*x+a))^2)^(1/2)*2^(1/2))+ln(2*(cos(b*x+a)*((2*cos(b*x+a)^2-1)/(1+cos(b*x+a))^2)^(1/2)+((2*cos(b*x
+a)^2-1)/(1+cos(b*x+a))^2)^(1/2)-2*cos(b*x+a)-1)/(1+cos(b*x+a)))-arctanh((2*cos(b*x+a)-1)/(1+cos(b*x+a))/((2*c
os(b*x+a)^2-1)/(1+cos(b*x+a))^2)^(1/2)))/(1+cos(b*x+a))/(c*sin(b*x+a)^2/(2*cos(b*x+a)^2-1))^(1/2)/((2*cos(b*x+
a)^2-1)/(1+cos(b*x+a))^2)^(1/2)*4^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 481, normalized size of antiderivative = 3.49 \[ \int \frac {\cos (2 (a+b x))}{\sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \, dx=\left [\frac {\sqrt {2} {\left (\tan \left (b x + a\right )^{3} + \tan \left (b x + a\right )\right )} \sqrt {c} \log \left (\frac {c \tan \left (b x + a\right )^{3} - 2 \, \sqrt {-\frac {c \tan \left (b x + a\right )^{2}}{\tan \left (b x + a\right )^{2} - 1}} {\left (\tan \left (b x + a\right )^{2} - 1\right )} \sqrt {c} - 2 \, c \tan \left (b x + a\right )}{\tan \left (b x + a\right )^{3}}\right ) + {\left (\tan \left (b x + a\right )^{3} + \tan \left (b x + a\right )\right )} \sqrt {c} \log \left (\frac {c \tan \left (b x + a\right )^{3} + 2 \, \sqrt {2} \sqrt {-\frac {c \tan \left (b x + a\right )^{2}}{\tan \left (b x + a\right )^{2} - 1}} {\left (\tan \left (b x + a\right )^{2} - 1\right )} \sqrt {c} - 3 \, c \tan \left (b x + a\right )}{\tan \left (b x + a\right )^{3} + \tan \left (b x + a\right )}\right ) - 2 \, \sqrt {2} \sqrt {-\frac {c \tan \left (b x + a\right )^{2}}{\tan \left (b x + a\right )^{2} - 1}} {\left (\tan \left (b x + a\right )^{2} - 1\right )}}{4 \, {\left (b c \tan \left (b x + a\right )^{3} + b c \tan \left (b x + a\right )\right )}}, -\frac {\sqrt {2} {\left (\tan \left (b x + a\right )^{3} + \tan \left (b x + a\right )\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {-\frac {c \tan \left (b x + a\right )^{2}}{\tan \left (b x + a\right )^{2} - 1}} {\left (\tan \left (b x + a\right )^{2} - 1\right )} \sqrt {-c}}{c \tan \left (b x + a\right )}\right ) - {\left (\tan \left (b x + a\right )^{3} + \tan \left (b x + a\right )\right )} \sqrt {-c} \arctan \left (\frac {\sqrt {2} \sqrt {-\frac {c \tan \left (b x + a\right )^{2}}{\tan \left (b x + a\right )^{2} - 1}} {\left (\tan \left (b x + a\right )^{2} - 1\right )} \sqrt {-c}}{2 \, c \tan \left (b x + a\right )}\right ) + \sqrt {2} \sqrt {-\frac {c \tan \left (b x + a\right )^{2}}{\tan \left (b x + a\right )^{2} - 1}} {\left (\tan \left (b x + a\right )^{2} - 1\right )}}{2 \, {\left (b c \tan \left (b x + a\right )^{3} + b c \tan \left (b x + a\right )\right )}}\right ] \]

[In]

integrate(cos(2*b*x+2*a)/(c*tan(b*x+a)*tan(2*b*x+2*a))^(1/2),x, algorithm="fricas")

[Out]

[1/4*(sqrt(2)*(tan(b*x + a)^3 + tan(b*x + a))*sqrt(c)*log((c*tan(b*x + a)^3 - 2*sqrt(-c*tan(b*x + a)^2/(tan(b*
x + a)^2 - 1))*(tan(b*x + a)^2 - 1)*sqrt(c) - 2*c*tan(b*x + a))/tan(b*x + a)^3) + (tan(b*x + a)^3 + tan(b*x +
a))*sqrt(c)*log((c*tan(b*x + a)^3 + 2*sqrt(2)*sqrt(-c*tan(b*x + a)^2/(tan(b*x + a)^2 - 1))*(tan(b*x + a)^2 - 1
)*sqrt(c) - 3*c*tan(b*x + a))/(tan(b*x + a)^3 + tan(b*x + a))) - 2*sqrt(2)*sqrt(-c*tan(b*x + a)^2/(tan(b*x + a
)^2 - 1))*(tan(b*x + a)^2 - 1))/(b*c*tan(b*x + a)^3 + b*c*tan(b*x + a)), -1/2*(sqrt(2)*(tan(b*x + a)^3 + tan(b
*x + a))*sqrt(-c)*arctan(sqrt(-c*tan(b*x + a)^2/(tan(b*x + a)^2 - 1))*(tan(b*x + a)^2 - 1)*sqrt(-c)/(c*tan(b*x
 + a))) - (tan(b*x + a)^3 + tan(b*x + a))*sqrt(-c)*arctan(1/2*sqrt(2)*sqrt(-c*tan(b*x + a)^2/(tan(b*x + a)^2 -
 1))*(tan(b*x + a)^2 - 1)*sqrt(-c)/(c*tan(b*x + a))) + sqrt(2)*sqrt(-c*tan(b*x + a)^2/(tan(b*x + a)^2 - 1))*(t
an(b*x + a)^2 - 1))/(b*c*tan(b*x + a)^3 + b*c*tan(b*x + a))]

Sympy [F(-1)]

Timed out. \[ \int \frac {\cos (2 (a+b x))}{\sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \, dx=\text {Timed out} \]

[In]

integrate(cos(2*b*x+2*a)/(c*tan(b*x+a)*tan(2*b*x+2*a))**(1/2),x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {\cos (2 (a+b x))}{\sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \, dx=\int { \frac {\cos \left (2 \, b x + 2 \, a\right )}{\sqrt {c \tan \left (2 \, b x + 2 \, a\right ) \tan \left (b x + a\right )}} \,d x } \]

[In]

integrate(cos(2*b*x+2*a)/(c*tan(b*x+a)*tan(2*b*x+2*a))^(1/2),x, algorithm="maxima")

[Out]

integrate(cos(2*b*x + 2*a)/sqrt(c*tan(2*b*x + 2*a)*tan(b*x + a)), x)

Giac [F(-1)]

Timed out. \[ \int \frac {\cos (2 (a+b x))}{\sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \, dx=\text {Timed out} \]

[In]

integrate(cos(2*b*x+2*a)/(c*tan(b*x+a)*tan(2*b*x+2*a))^(1/2),x, algorithm="giac")

[Out]

Timed out

Mupad [F(-1)]

Timed out. \[ \int \frac {\cos (2 (a+b x))}{\sqrt {c \tan (a+b x) \tan (2 (a+b x))}} \, dx=\int \frac {\cos \left (2\,a+2\,b\,x\right )}{\sqrt {c\,\mathrm {tan}\left (a+b\,x\right )\,\mathrm {tan}\left (2\,a+2\,b\,x\right )}} \,d x \]

[In]

int(cos(2*a + 2*b*x)/(c*tan(a + b*x)*tan(2*a + 2*b*x))^(1/2),x)

[Out]

int(cos(2*a + 2*b*x)/(c*tan(a + b*x)*tan(2*a + 2*b*x))^(1/2), x)