3.625 \(\int \frac{\cos ^2(2 (a+b x))}{\sqrt{c \tan (a+b x) \tan (2 (a+b x))}} \, dx\)

Optimal. Leaf size=182 \[ \frac{\sin (2 a+2 b x)}{8 b \sqrt{c \sec (2 a+2 b x)-c}}+\frac{\sin (2 a+2 b x) \cos (2 a+2 b x)}{4 b \sqrt{c \sec (2 a+2 b x)-c}}+\frac{7 \tanh ^{-1}\left (\frac{\sqrt{c} \tan (2 a+2 b x)}{\sqrt{c \sec (2 a+2 b x)-c}}\right )}{8 b \sqrt{c}}-\frac{\tanh ^{-1}\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}} \]

[Out]

(7*ArcTanh[(Sqrt[c]*Tan[2*a + 2*b*x])/Sqrt[-c + c*Sec[2*a + 2*b*x]]])/(8*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]/(8*b*Sqrt[-c + c*Se
c[2*a + 2*b*x]]) + (Cos[2*a + 2*b*x]*Sin[2*a + 2*b*x])/(4*b*Sqrt[-c + c*Sec[2*a + 2*b*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.369753, antiderivative size = 182, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.226, Rules used = {4397, 3823, 4022, 3920, 3774, 207, 3795} \[ \frac{\sin (2 a+2 b x)}{8 b \sqrt{c \sec (2 a+2 b x)-c}}+\frac{\sin (2 a+2 b x) \cos (2 a+2 b x)}{4 b \sqrt{c \sec (2 a+2 b x)-c}}+\frac{7 \tanh ^{-1}\left (\frac{\sqrt{c} \tan (2 a+2 b x)}{\sqrt{c \sec (2 a+2 b x)-c}}\right )}{8 b \sqrt{c}}-\frac{\tanh ^{-1}\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}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(7*ArcTanh[(Sqrt[c]*Tan[2*a + 2*b*x])/Sqrt[-c + c*Sec[2*a + 2*b*x]]])/(8*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]/(8*b*Sqrt[-c + c*Se
c[2*a + 2*b*x]]) + (Cos[2*a + 2*b*x]*Sin[2*a + 2*b*x])/(4*b*Sqrt[-c + c*Sec[2*a + 2*b*x]])

Rule 4397

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

Rule 3823

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 4022

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

Rule 3920

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[c/a,
Int[Sqrt[a + b*Csc[e + f*x]], x], x] - Dist[(b*c - a*d)/a, Int[Csc[e + f*x]/Sqrt[a + b*Csc[e + f*x]], x], x] /
; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]

Rule 3774

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

Rule 207

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

Rule 3795

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

Rubi steps

\begin{align*} \int \frac{\cos ^2(2 (a+b x))}{\sqrt{c \tan (a+b x) \tan (2 (a+b x))}} \, dx &=\int \frac{\cos ^2(2 a+2 b x)}{\sqrt{-c+c \sec (2 a+2 b x)}} \, dx\\ &=\frac{\cos (2 a+2 b x) \sin (2 a+2 b x)}{4 b \sqrt{-c+c \sec (2 a+2 b x)}}-\frac{\int \frac{\cos (2 a+2 b x) (-c-3 c \sec (2 a+2 b x))}{\sqrt{-c+c \sec (2 a+2 b x)}} \, dx}{4 c}\\ &=\frac{\sin (2 a+2 b x)}{8 b \sqrt{-c+c \sec (2 a+2 b x)}}+\frac{\cos (2 a+2 b x) \sin (2 a+2 b x)}{4 b \sqrt{-c+c \sec (2 a+2 b x)}}-\frac{\int \frac{-\frac{7 c^2}{2}-\frac{1}{2} c^2 \sec (2 a+2 b x)}{\sqrt{-c+c \sec (2 a+2 b x)}} \, dx}{4 c^2}\\ &=\frac{\sin (2 a+2 b x)}{8 b \sqrt{-c+c \sec (2 a+2 b x)}}+\frac{\cos (2 a+2 b x) \sin (2 a+2 b x)}{4 b \sqrt{-c+c \sec (2 a+2 b x)}}-\frac{7 \int \sqrt{-c+c \sec (2 a+2 b x)} \, dx}{8 c}+\int \frac{\sec (2 a+2 b x)}{\sqrt{-c+c \sec (2 a+2 b x)}} \, dx\\ &=\frac{\sin (2 a+2 b x)}{8 b \sqrt{-c+c \sec (2 a+2 b x)}}+\frac{\cos (2 a+2 b x) \sin (2 a+2 b x)}{4 b \sqrt{-c+c \sec (2 a+2 b x)}}+\frac{7 \operatorname{Subst}\left (\int \frac{1}{-c+x^2} \, dx,x,-\frac{c \tan (2 a+2 b x)}{\sqrt{-c+c \sec (2 a+2 b x)}}\right )}{8 b}-\frac{\operatorname{Subst}\left (\int \frac{1}{-2 c+x^2} \, dx,x,-\frac{c \tan (2 a+2 b x)}{\sqrt{-c+c \sec (2 a+2 b x)}}\right )}{b}\\ &=\frac{7 \tanh ^{-1}\left (\frac{\sqrt{c} \tan (2 a+2 b x)}{\sqrt{-c+c \sec (2 a+2 b x)}}\right )}{8 b \sqrt{c}}-\frac{\tanh ^{-1}\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)}{8 b \sqrt{-c+c \sec (2 a+2 b x)}}+\frac{\cos (2 a+2 b x) \sin (2 a+2 b x)}{4 b \sqrt{-c+c \sec (2 a+2 b x)}}\\ \end{align*}

Mathematica [A]  time = 3.07411, size = 186, normalized size = 1.02 \[ \frac{\tan (a+b x) \left (7 \sqrt{2} \tanh ^{-1}\left (\frac{1}{2} \sqrt{2-2 \tan ^2(a+b x)}\right )-7 \tanh ^{-1}\left (\sqrt{1-\tan ^2(a+b x)}\right )+\sqrt{2} \cos ^2(a+b x) \sec (2 (a+b x)) \sqrt{\frac{1}{\sec (2 (a+b x))+1}} \left (2 (\cos (2 (a+b x))+\cos (4 (a+b x))+1)+\sqrt{\tan ^2(a+b x)-1} \tan ^{-1}\left (\sqrt{\tan ^2(a+b x)-1}\right )\right )\right )}{8 b \sqrt{1-\tan ^2(a+b x)} \sqrt{c \tan (a+b x) \tan (2 (a+b x))}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Tan[a + b*x]*(7*Sqrt[2]*ArcTanh[Sqrt[2 - 2*Tan[a + b*x]^2]/2] - 7*ArcTanh[Sqrt[1 - Tan[a + b*x]^2]] + Sqrt[2]
*Cos[a + b*x]^2*Sec[2*(a + b*x)]*Sqrt[(1 + Sec[2*(a + b*x)])^(-1)]*(2*(1 + Cos[2*(a + b*x)] + Cos[4*(a + b*x)]
) + ArcTan[Sqrt[-1 + Tan[a + b*x]^2]]*Sqrt[-1 + Tan[a + b*x]^2])))/(8*b*Sqrt[1 - Tan[a + b*x]^2]*Sqrt[c*Tan[a
+ b*x]*Tan[2*(a + b*x)]])

________________________________________________________________________________________

Maple [B]  time = 0.462, size = 1835, normalized size = 10.1 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8*2^(1/2)/b*4^(1/2)*(cos(b*x+a)+1)*((2*cos(b*x+a)^2-1)/(cos(b*x+a)+1)^2)^(1/2)*(c*(1-cos(b*x+a)^2)/(2*cos(b
*x+a)^2-1))^(1/2)*(2*2^(1/2)*arctanh(1/2*2^(1/2)*cos(b*x+a)*4^(1/2)*(-1+cos(b*x+a))/sin(b*x+a)^2/((2*cos(b*x+a
)^2-1)/(cos(b*x+a)+1)^2)^(1/2))-ln(-2*(cos(b*x+a)^2*((2*cos(b*x+a)^2-1)/(cos(b*x+a)+1)^2)^(1/2)-2*cos(b*x+a)^2
+cos(b*x+a)-((2*cos(b*x+a)^2-1)/(cos(b*x+a)+1)^2)^(1/2)+1)/sin(b*x+a)^2)-arctanh(1/2*4^(1/2)*(2*cos(b*x+a)^2-3
*cos(b*x+a)+1)/sin(b*x+a)^2/((2*cos(b*x+a)^2-1)/(cos(b*x+a)+1)^2)^(1/2)))/sin(b*x+a)/c-1/8*2^(1/2)/b*4^(1/2)*(
-1+cos(b*x+a))^2*(cos(b*x+a)^3*((2*cos(b*x+a)^2-1)/(cos(b*x+a)+1)^2)^(3/2)*4^(1/2)+4*4^(1/2)*((2*cos(b*x+a)^2-
1)/(cos(b*x+a)+1)^2)^(3/2)*cos(b*x+a)^2+5*4^(1/2)*((2*cos(b*x+a)^2-1)/(cos(b*x+a)+1)^2)^(3/2)*cos(b*x+a)+2*4^(
1/2)*((2*cos(b*x+a)^2-1)/(cos(b*x+a)+1)^2)^(3/2)-6*arctanh(1/2*2^(1/2)*cos(b*x+a)*4^(1/2)*(-1+cos(b*x+a))/sin(
b*x+a)^2/((2*cos(b*x+a)^2-1)/(cos(b*x+a)+1)^2)^(1/2))*cos(b*x+a)*2^(1/2)+6*cos(b*x+a)*((2*cos(b*x+a)^2-1)/(cos
(b*x+a)+1)^2)^(1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(b*x+a)+1)^2)^(1/2)/(c*sin(b*x+a)^2/(2*cos(b*x+a)^2-1))^(1/2)/sin(b*x+a)^3

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (2 \, b x + 2 \, a\right )^{2}}{\sqrt{c \tan \left (2 \, b x + 2 \, a\right ) \tan \left (b x + a\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.32684, size = 1503, normalized size = 8.26 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[1/16*(4*sqrt(2)*(tan(b*x + a)^5 + 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) + 7*(tan
(b*x + a)^5 + 2*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)*(tan(b*x + a)^4 - 4*tan(b*x + a)^2 + 3)*sqrt(-c*tan(b*x + a)^2/(tan(b*x + a)^2 - 1)))/(b*c*tan(b*x + a
)^5 + 2*b*c*tan(b*x + a)^3 + b*c*tan(b*x + a)), -1/8*(4*sqrt(2)*(tan(b*x + a)^5 + 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
))) - 7*(tan(b*x + a)^5 + 2*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)*(tan(b*x + a)^4 - 4*tan(b*x +
a)^2 + 3)*sqrt(-c*tan(b*x + a)^2/(tan(b*x + a)^2 - 1)))/(b*c*tan(b*x + a)^5 + 2*b*c*tan(b*x + a)^3 + b*c*tan(b
*x + a))]

________________________________________________________________________________________

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(cos(2*b*x+2*a)**2/(c*tan(b*x+a)*tan(2*b*x+2*a))**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: TypeError